blob: 517caab30ec542c77d15bce69cfccf8f674333f5 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00002# From configure.in Revision: 1.355 .
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`
Martin v. Löwisdbe3f762002-10-10 14:27:30 +0000904ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +0000905ac_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öwis19ff4462002-10-07 17:45:56 +00003893
Martin v. Löwis11437992002-04-12 09:54:03 +00003894for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003895libintl.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00003896signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Skip Montanaro57454e52002-06-14 20:30:31 +00003897sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003898sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Martin v. Löwis19ff4462002-10-07 17:45:56 +00003899sys/un.h sys/utsname.h sys/wait.h pty.h term.h wctype.h libutil.h \
Skip Montanaro8345f712002-06-25 05:53:48 +00003900sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00003901do
Martin v. Löwis11437992002-04-12 09:54:03 +00003902as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3903if eval "test \"\${$as_ac_Header+set}\" = set"; then
3904 echo "$as_me:$LINENO: checking for $ac_header" >&5
3905echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3906if eval "test \"\${$as_ac_Header+set}\" = set"; then
3907 echo $ECHO_N "(cached) $ECHO_C" >&6
3908fi
3909echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3910echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003911else
Martin v. Löwis11437992002-04-12 09:54:03 +00003912 # Is the header compilable?
3913echo "$as_me:$LINENO: checking $ac_header usability" >&5
3914echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3915cat >conftest.$ac_ext <<_ACEOF
3916#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003917#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00003918$ac_includes_default
3919#include <$ac_header>
3920_ACEOF
3921rm -f conftest.$ac_objext
3922if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3923 (eval $ac_compile) 2>&5
3924 ac_status=$?
3925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3926 (exit $ac_status); } &&
3927 { ac_try='test -s conftest.$ac_objext'
3928 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3929 (eval $ac_try) 2>&5
3930 ac_status=$?
3931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3932 (exit $ac_status); }; }; then
3933 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00003934else
Martin v. Löwis11437992002-04-12 09:54:03 +00003935 echo "$as_me: failed program was:" >&5
3936cat conftest.$ac_ext >&5
3937ac_header_compiler=no
3938fi
3939rm -f conftest.$ac_objext conftest.$ac_ext
3940echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3941echo "${ECHO_T}$ac_header_compiler" >&6
3942
3943# Is the header present?
3944echo "$as_me:$LINENO: checking $ac_header presence" >&5
3945echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3946cat >conftest.$ac_ext <<_ACEOF
3947#line $LINENO "configure"
3948#include "confdefs.h"
3949#include <$ac_header>
3950_ACEOF
3951if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3952 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3953 ac_status=$?
3954 egrep -v '^ *\+' conftest.er1 >conftest.err
3955 rm -f conftest.er1
3956 cat conftest.err >&5
3957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3958 (exit $ac_status); } >/dev/null; then
3959 if test -s conftest.err; then
3960 ac_cpp_err=$ac_c_preproc_warn_flag
3961 else
3962 ac_cpp_err=
3963 fi
3964else
3965 ac_cpp_err=yes
3966fi
3967if test -z "$ac_cpp_err"; then
3968 ac_header_preproc=yes
3969else
3970 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003971 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003972 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00003973fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003974rm -f conftest.err conftest.$ac_ext
3975echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3976echo "${ECHO_T}$ac_header_preproc" >&6
3977
3978# So? What about this header?
3979case $ac_header_compiler:$ac_header_preproc in
3980 yes:no )
3981 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3982echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3983 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3984echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3985 no:yes )
3986 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3987echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3988 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3989echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3990 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3991echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3992esac
3993echo "$as_me:$LINENO: checking for $ac_header" >&5
3994echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3995if eval "test \"\${$as_ac_Header+set}\" = set"; then
3996 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003997else
Martin v. Löwis11437992002-04-12 09:54:03 +00003998 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003999fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004000echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4001echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4002
4003fi
4004if test `eval echo '${'$as_ac_Header'}'` = yes; then
4005 cat >>confdefs.h <<_ACEOF
4006#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4007_ACEOF
4008
4009fi
4010
Guido van Rossum627b2d71993-12-24 10:39:16 +00004011done
4012
Martin v. Löwis11437992002-04-12 09:54:03 +00004013
4014
4015
4016
4017
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004018ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004019for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4020 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4021echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4022echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4023if eval "test \"\${$as_ac_Header+set}\" = set"; then
4024 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004025else
Martin v. Löwis11437992002-04-12 09:54:03 +00004026 cat >conftest.$ac_ext <<_ACEOF
4027#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004028#include "confdefs.h"
4029#include <sys/types.h>
4030#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004031
4032#ifdef F77_DUMMY_MAIN
4033# ifdef __cplusplus
4034 extern "C"
4035# endif
4036 int F77_DUMMY_MAIN() { return 1; }
4037#endif
4038int
4039main ()
4040{
4041if ((DIR *) 0)
4042return 0;
4043 ;
4044 return 0;
4045}
4046_ACEOF
4047rm -f conftest.$ac_objext
4048if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4049 (eval $ac_compile) 2>&5
4050 ac_status=$?
4051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4052 (exit $ac_status); } &&
4053 { ac_try='test -s conftest.$ac_objext'
4054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4055 (eval $ac_try) 2>&5
4056 ac_status=$?
4057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4058 (exit $ac_status); }; }; then
4059 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004060else
Martin v. Löwis11437992002-04-12 09:54:03 +00004061 echo "$as_me: failed program was:" >&5
4062cat conftest.$ac_ext >&5
4063eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004064fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004065rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004066fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004067echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4068echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4069if test `eval echo '${'$as_ac_Header'}'` = yes; then
4070 cat >>confdefs.h <<_ACEOF
4071#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4072_ACEOF
4073
4074ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004075fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004076
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004077done
4078# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4079if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004080 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4081echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4082if test "${ac_cv_search_opendir+set}" = set; then
4083 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004084else
Martin v. Löwis11437992002-04-12 09:54:03 +00004085 ac_func_search_save_LIBS=$LIBS
4086ac_cv_search_opendir=no
4087cat >conftest.$ac_ext <<_ACEOF
4088#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004089#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004090
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004091/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004092#ifdef __cplusplus
4093extern "C"
4094#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004095/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004096 builtin and then its argument prototype would still apply. */
4097char opendir ();
4098#ifdef F77_DUMMY_MAIN
4099# ifdef __cplusplus
4100 extern "C"
4101# endif
4102 int F77_DUMMY_MAIN() { return 1; }
4103#endif
4104int
4105main ()
4106{
4107opendir ();
4108 ;
4109 return 0;
4110}
4111_ACEOF
4112rm -f conftest.$ac_objext conftest$ac_exeext
4113if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4114 (eval $ac_link) 2>&5
4115 ac_status=$?
4116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4117 (exit $ac_status); } &&
4118 { ac_try='test -s conftest$ac_exeext'
4119 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4120 (eval $ac_try) 2>&5
4121 ac_status=$?
4122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4123 (exit $ac_status); }; }; then
4124 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004125else
Martin v. Löwis11437992002-04-12 09:54:03 +00004126 echo "$as_me: failed program was:" >&5
4127cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004128fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004129rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4130if test "$ac_cv_search_opendir" = no; then
4131 for ac_lib in dir; do
4132 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4133 cat >conftest.$ac_ext <<_ACEOF
4134#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004135#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004136
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004137/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004138#ifdef __cplusplus
4139extern "C"
4140#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004141/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004142 builtin and then its argument prototype would still apply. */
4143char opendir ();
4144#ifdef F77_DUMMY_MAIN
4145# ifdef __cplusplus
4146 extern "C"
4147# endif
4148 int F77_DUMMY_MAIN() { return 1; }
4149#endif
4150int
4151main ()
4152{
4153opendir ();
4154 ;
4155 return 0;
4156}
4157_ACEOF
4158rm -f conftest.$ac_objext conftest$ac_exeext
4159if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4160 (eval $ac_link) 2>&5
4161 ac_status=$?
4162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4163 (exit $ac_status); } &&
4164 { ac_try='test -s conftest$ac_exeext'
4165 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4166 (eval $ac_try) 2>&5
4167 ac_status=$?
4168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4169 (exit $ac_status); }; }; then
4170 ac_cv_search_opendir="-l$ac_lib"
4171break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004172else
Martin v. Löwis11437992002-04-12 09:54:03 +00004173 echo "$as_me: failed program was:" >&5
4174cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004175fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004176rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4177 done
4178fi
4179LIBS=$ac_func_search_save_LIBS
4180fi
4181echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4182echo "${ECHO_T}$ac_cv_search_opendir" >&6
4183if test "$ac_cv_search_opendir" != no; then
4184 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004185
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004186fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004187
Michael W. Hudson54241132001-12-07 15:38:26 +00004188else
Martin v. Löwis11437992002-04-12 09:54:03 +00004189 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4190echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4191if test "${ac_cv_search_opendir+set}" = set; then
4192 echo $ECHO_N "(cached) $ECHO_C" >&6
4193else
4194 ac_func_search_save_LIBS=$LIBS
4195ac_cv_search_opendir=no
4196cat >conftest.$ac_ext <<_ACEOF
4197#line $LINENO "configure"
4198#include "confdefs.h"
4199
4200/* Override any gcc2 internal prototype to avoid an error. */
4201#ifdef __cplusplus
4202extern "C"
4203#endif
4204/* We use char because int might match the return type of a gcc2
4205 builtin and then its argument prototype would still apply. */
4206char opendir ();
4207#ifdef F77_DUMMY_MAIN
4208# ifdef __cplusplus
4209 extern "C"
4210# endif
4211 int F77_DUMMY_MAIN() { return 1; }
4212#endif
4213int
4214main ()
4215{
4216opendir ();
4217 ;
4218 return 0;
4219}
4220_ACEOF
4221rm -f conftest.$ac_objext conftest$ac_exeext
4222if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4223 (eval $ac_link) 2>&5
4224 ac_status=$?
4225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4226 (exit $ac_status); } &&
4227 { ac_try='test -s conftest$ac_exeext'
4228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4229 (eval $ac_try) 2>&5
4230 ac_status=$?
4231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4232 (exit $ac_status); }; }; then
4233 ac_cv_search_opendir="none required"
4234else
4235 echo "$as_me: failed program was:" >&5
4236cat conftest.$ac_ext >&5
4237fi
4238rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4239if test "$ac_cv_search_opendir" = no; then
4240 for ac_lib in x; do
4241 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4242 cat >conftest.$ac_ext <<_ACEOF
4243#line $LINENO "configure"
4244#include "confdefs.h"
4245
4246/* Override any gcc2 internal prototype to avoid an error. */
4247#ifdef __cplusplus
4248extern "C"
4249#endif
4250/* We use char because int might match the return type of a gcc2
4251 builtin and then its argument prototype would still apply. */
4252char opendir ();
4253#ifdef F77_DUMMY_MAIN
4254# ifdef __cplusplus
4255 extern "C"
4256# endif
4257 int F77_DUMMY_MAIN() { return 1; }
4258#endif
4259int
4260main ()
4261{
4262opendir ();
4263 ;
4264 return 0;
4265}
4266_ACEOF
4267rm -f conftest.$ac_objext conftest$ac_exeext
4268if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4269 (eval $ac_link) 2>&5
4270 ac_status=$?
4271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4272 (exit $ac_status); } &&
4273 { ac_try='test -s conftest$ac_exeext'
4274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4275 (eval $ac_try) 2>&5
4276 ac_status=$?
4277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4278 (exit $ac_status); }; }; then
4279 ac_cv_search_opendir="-l$ac_lib"
4280break
4281else
4282 echo "$as_me: failed program was:" >&5
4283cat conftest.$ac_ext >&5
4284fi
4285rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4286 done
4287fi
4288LIBS=$ac_func_search_save_LIBS
4289fi
4290echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4291echo "${ECHO_T}$ac_cv_search_opendir" >&6
4292if test "$ac_cv_search_opendir" != no; then
4293 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4294
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004295fi
4296
4297fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004298
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004299echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4300echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4301if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4302 echo $ECHO_N "(cached) $ECHO_C" >&6
4303else
4304 cat >conftest.$ac_ext <<_ACEOF
4305#line $LINENO "configure"
4306#include "confdefs.h"
4307#include <sys/types.h>
4308#ifdef F77_DUMMY_MAIN
4309# ifdef __cplusplus
4310 extern "C"
4311# endif
4312 int F77_DUMMY_MAIN() { return 1; }
4313#endif
4314int
4315main ()
4316{
4317return makedev(0, 0);
4318 ;
4319 return 0;
4320}
4321_ACEOF
4322rm -f conftest.$ac_objext conftest$ac_exeext
4323if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4324 (eval $ac_link) 2>&5
4325 ac_status=$?
4326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4327 (exit $ac_status); } &&
4328 { ac_try='test -s conftest$ac_exeext'
4329 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4330 (eval $ac_try) 2>&5
4331 ac_status=$?
4332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4333 (exit $ac_status); }; }; then
4334 ac_cv_header_sys_types_h_makedev=yes
4335else
4336 echo "$as_me: failed program was:" >&5
4337cat conftest.$ac_ext >&5
4338ac_cv_header_sys_types_h_makedev=no
4339fi
4340rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4341
4342fi
4343echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4344echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4345
4346if test $ac_cv_header_sys_types_h_makedev = no; then
4347if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4348 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4349echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4350if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4351 echo $ECHO_N "(cached) $ECHO_C" >&6
4352fi
4353echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4354echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4355else
4356 # Is the header compilable?
4357echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4358echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4359cat >conftest.$ac_ext <<_ACEOF
4360#line $LINENO "configure"
4361#include "confdefs.h"
4362$ac_includes_default
4363#include <sys/mkdev.h>
4364_ACEOF
4365rm -f conftest.$ac_objext
4366if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4367 (eval $ac_compile) 2>&5
4368 ac_status=$?
4369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4370 (exit $ac_status); } &&
4371 { ac_try='test -s conftest.$ac_objext'
4372 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4373 (eval $ac_try) 2>&5
4374 ac_status=$?
4375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4376 (exit $ac_status); }; }; then
4377 ac_header_compiler=yes
4378else
4379 echo "$as_me: failed program was:" >&5
4380cat conftest.$ac_ext >&5
4381ac_header_compiler=no
4382fi
4383rm -f conftest.$ac_objext conftest.$ac_ext
4384echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4385echo "${ECHO_T}$ac_header_compiler" >&6
4386
4387# Is the header present?
4388echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4389echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4390cat >conftest.$ac_ext <<_ACEOF
4391#line $LINENO "configure"
4392#include "confdefs.h"
4393#include <sys/mkdev.h>
4394_ACEOF
4395if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4396 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4397 ac_status=$?
4398 egrep -v '^ *\+' conftest.er1 >conftest.err
4399 rm -f conftest.er1
4400 cat conftest.err >&5
4401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4402 (exit $ac_status); } >/dev/null; then
4403 if test -s conftest.err; then
4404 ac_cpp_err=$ac_c_preproc_warn_flag
4405 else
4406 ac_cpp_err=
4407 fi
4408else
4409 ac_cpp_err=yes
4410fi
4411if test -z "$ac_cpp_err"; then
4412 ac_header_preproc=yes
4413else
4414 echo "$as_me: failed program was:" >&5
4415 cat conftest.$ac_ext >&5
4416 ac_header_preproc=no
4417fi
4418rm -f conftest.err conftest.$ac_ext
4419echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4420echo "${ECHO_T}$ac_header_preproc" >&6
4421
4422# So? What about this header?
4423case $ac_header_compiler:$ac_header_preproc in
4424 yes:no )
4425 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4426echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4427 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4428echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4429 no:yes )
4430 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4431echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4432 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4433echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4434 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4435echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4436esac
4437echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4438echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4439if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4440 echo $ECHO_N "(cached) $ECHO_C" >&6
4441else
4442 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4443fi
4444echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4445echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4446
4447fi
4448if test $ac_cv_header_sys_mkdev_h = yes; then
4449
4450cat >>confdefs.h <<\_ACEOF
4451#define MAJOR_IN_MKDEV 1
4452_ACEOF
4453
4454fi
4455
4456
4457
4458 if test $ac_cv_header_sys_mkdev_h = no; then
4459 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4460 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4461echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4462if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4463 echo $ECHO_N "(cached) $ECHO_C" >&6
4464fi
4465echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4466echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4467else
4468 # Is the header compilable?
4469echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4470echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4471cat >conftest.$ac_ext <<_ACEOF
4472#line $LINENO "configure"
4473#include "confdefs.h"
4474$ac_includes_default
4475#include <sys/sysmacros.h>
4476_ACEOF
4477rm -f conftest.$ac_objext
4478if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4479 (eval $ac_compile) 2>&5
4480 ac_status=$?
4481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4482 (exit $ac_status); } &&
4483 { ac_try='test -s conftest.$ac_objext'
4484 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4485 (eval $ac_try) 2>&5
4486 ac_status=$?
4487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4488 (exit $ac_status); }; }; then
4489 ac_header_compiler=yes
4490else
4491 echo "$as_me: failed program was:" >&5
4492cat conftest.$ac_ext >&5
4493ac_header_compiler=no
4494fi
4495rm -f conftest.$ac_objext conftest.$ac_ext
4496echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4497echo "${ECHO_T}$ac_header_compiler" >&6
4498
4499# Is the header present?
4500echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
4501echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
4502cat >conftest.$ac_ext <<_ACEOF
4503#line $LINENO "configure"
4504#include "confdefs.h"
4505#include <sys/sysmacros.h>
4506_ACEOF
4507if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4508 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4509 ac_status=$?
4510 egrep -v '^ *\+' conftest.er1 >conftest.err
4511 rm -f conftest.er1
4512 cat conftest.err >&5
4513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4514 (exit $ac_status); } >/dev/null; then
4515 if test -s conftest.err; then
4516 ac_cpp_err=$ac_c_preproc_warn_flag
4517 else
4518 ac_cpp_err=
4519 fi
4520else
4521 ac_cpp_err=yes
4522fi
4523if test -z "$ac_cpp_err"; then
4524 ac_header_preproc=yes
4525else
4526 echo "$as_me: failed program was:" >&5
4527 cat conftest.$ac_ext >&5
4528 ac_header_preproc=no
4529fi
4530rm -f conftest.err conftest.$ac_ext
4531echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4532echo "${ECHO_T}$ac_header_preproc" >&6
4533
4534# So? What about this header?
4535case $ac_header_compiler:$ac_header_preproc in
4536 yes:no )
4537 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
4538echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4539 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4540echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4541 no:yes )
4542 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
4543echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
4544 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
4545echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
4546 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4547echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4548esac
4549echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4550echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4551if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4552 echo $ECHO_N "(cached) $ECHO_C" >&6
4553else
4554 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
4555fi
4556echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4557echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4558
4559fi
4560if test $ac_cv_header_sys_sysmacros_h = yes; then
4561
4562cat >>confdefs.h <<\_ACEOF
4563#define MAJOR_IN_SYSMACROS 1
4564_ACEOF
4565
4566fi
4567
4568
4569 fi
4570fi
4571
Michael W. Hudson54241132001-12-07 15:38:26 +00004572
Guido van Rossum627b2d71993-12-24 10:39:16 +00004573# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004574was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004575echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4576echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4577cat >conftest.$ac_ext <<_ACEOF
4578#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004579#include "confdefs.h"
4580#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004581
4582_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004583if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4584 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004585 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004586else
Martin v. Löwis11437992002-04-12 09:54:03 +00004587
4588
4589cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004590#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004591_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004592
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004593
Guido van Rossum627b2d71993-12-24 10:39:16 +00004594fi
4595rm -f conftest*
4596
Martin v. Löwis11437992002-04-12 09:54:03 +00004597echo "$as_me:$LINENO: result: $was_it_defined" >&5
4598echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004599
Neal Norwitz11690112002-07-30 01:08:28 +00004600# Check whether using makedev requires defining _OSF_SOURCE
4601echo "$as_me:$LINENO: checking for makedev" >&5
4602echo $ECHO_N "checking for makedev... $ECHO_C" >&6
4603cat >conftest.$ac_ext <<_ACEOF
4604#line $LINENO "configure"
4605#include "confdefs.h"
4606 #include <sys/types.h>
4607#ifdef F77_DUMMY_MAIN
4608# ifdef __cplusplus
4609 extern "C"
4610# endif
4611 int F77_DUMMY_MAIN() { return 1; }
4612#endif
4613int
4614main ()
4615{
4616 makedev(0, 0)
4617 ;
4618 return 0;
4619}
4620_ACEOF
4621rm -f conftest.$ac_objext conftest$ac_exeext
4622if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4623 (eval $ac_link) 2>&5
4624 ac_status=$?
4625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4626 (exit $ac_status); } &&
4627 { ac_try='test -s conftest$ac_exeext'
4628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4629 (eval $ac_try) 2>&5
4630 ac_status=$?
4631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4632 (exit $ac_status); }; }; then
4633 ac_cv_has_makedev=yes
4634else
4635 echo "$as_me: failed program was:" >&5
4636cat conftest.$ac_ext >&5
4637ac_cv_has_makedev=no
4638fi
4639rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4640if test "$ac_cv_has_makedev" = "no"; then
4641 # we didn't link, try if _OSF_SOURCE will allow us to link
4642 cat >conftest.$ac_ext <<_ACEOF
4643#line $LINENO "configure"
4644#include "confdefs.h"
4645
4646 #define _OSF_SOURCE 1
4647 #include <sys/types.h>
4648
4649#ifdef F77_DUMMY_MAIN
4650# ifdef __cplusplus
4651 extern "C"
4652# endif
4653 int F77_DUMMY_MAIN() { return 1; }
4654#endif
4655int
4656main ()
4657{
4658 makedev(0, 0)
4659 ;
4660 return 0;
4661}
4662_ACEOF
4663rm -f conftest.$ac_objext conftest$ac_exeext
4664if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4665 (eval $ac_link) 2>&5
4666 ac_status=$?
4667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4668 (exit $ac_status); } &&
4669 { ac_try='test -s conftest$ac_exeext'
4670 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4671 (eval $ac_try) 2>&5
4672 ac_status=$?
4673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4674 (exit $ac_status); }; }; then
4675 ac_cv_has_makedev=yes
4676else
4677 echo "$as_me: failed program was:" >&5
4678cat conftest.$ac_ext >&5
4679ac_cv_has_makedev=no
4680fi
4681rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4682 if test "$ac_cv_has_makedev" = "yes"; then
4683
4684cat >>confdefs.h <<\_ACEOF
4685#define _OSF_SOURCE 1
4686_ACEOF
4687
4688 fi
4689fi
4690echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
4691echo "${ECHO_T}$ac_cv_has_makedev" >&6
4692if test "$ac_cv_has_makedev" = "yes"; then
4693
4694cat >>confdefs.h <<\_ACEOF
4695#define HAVE_MAKEDEV 1
4696_ACEOF
4697
4698fi
4699
Martin v. Löwis399a6892002-10-04 10:22:02 +00004700# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
4701# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
4702# defined, but the compiler does not support pragma redefine_extname,
4703# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
4704# structures (such as rlimit64) without declaring them. As a
4705# work-around, disable LFS on such configurations
4706
4707use_lfs=yes
4708echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
4709echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
4710cat >conftest.$ac_ext <<_ACEOF
4711#line $LINENO "configure"
4712#include "confdefs.h"
4713
4714#define _LARGEFILE_SOURCE 1
4715#define _FILE_OFFSET_BITS 64
4716#include <sys/resource.h>
4717
4718#ifdef F77_DUMMY_MAIN
4719# ifdef __cplusplus
4720 extern "C"
4721# endif
4722 int F77_DUMMY_MAIN() { return 1; }
4723#endif
4724int
4725main ()
4726{
4727struct rlimit foo;
4728 ;
4729 return 0;
4730}
4731_ACEOF
4732rm -f conftest.$ac_objext
4733if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4734 (eval $ac_compile) 2>&5
4735 ac_status=$?
4736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4737 (exit $ac_status); } &&
4738 { ac_try='test -s conftest.$ac_objext'
4739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4740 (eval $ac_try) 2>&5
4741 ac_status=$?
4742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4743 (exit $ac_status); }; }; then
4744 sol_lfs_bug=no
4745else
4746 echo "$as_me: failed program was:" >&5
4747cat conftest.$ac_ext >&5
4748sol_lfs_bug=yes
4749fi
4750rm -f conftest.$ac_objext conftest.$ac_ext
4751echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
4752echo "${ECHO_T}$sol_lfs_bug" >&6
4753if test "$sol_lfs_bug" = "yes"; then
4754 use_lfs=no
4755fi
4756
4757if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00004758# Two defines needed to enable largefile support on various platforms
4759# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004760
Martin v. Löwis11437992002-04-12 09:54:03 +00004761cat >>confdefs.h <<\_ACEOF
4762#define _LARGEFILE_SOURCE 1
4763_ACEOF
4764
4765
4766cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004767#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004768_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004769
Martin v. Löwis399a6892002-10-04 10:22:02 +00004770fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004771
Guido van Rossum84e7b241996-08-19 21:59:00 +00004772# Add some code to confdefs.h so that the test for off_t works on SCO
4773cat >> confdefs.h <<\EOF
4774#if defined(SCO_DS)
4775#undef _OFF_T
4776#endif
4777EOF
4778
Guido van Rossumef2255b2000-03-10 22:30:29 +00004779# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004780echo "$as_me:$LINENO: checking for mode_t" >&5
4781echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4782if test "${ac_cv_type_mode_t+set}" = set; then
4783 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004784else
Martin v. Löwis11437992002-04-12 09:54:03 +00004785 cat >conftest.$ac_ext <<_ACEOF
4786#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004787#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004788$ac_includes_default
4789#ifdef F77_DUMMY_MAIN
4790# ifdef __cplusplus
4791 extern "C"
4792# endif
4793 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004794#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004795int
4796main ()
4797{
4798if ((mode_t *) 0)
4799 return 0;
4800if (sizeof (mode_t))
4801 return 0;
4802 ;
4803 return 0;
4804}
4805_ACEOF
4806rm -f conftest.$ac_objext
4807if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4808 (eval $ac_compile) 2>&5
4809 ac_status=$?
4810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4811 (exit $ac_status); } &&
4812 { ac_try='test -s conftest.$ac_objext'
4813 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4814 (eval $ac_try) 2>&5
4815 ac_status=$?
4816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4817 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00004818 ac_cv_type_mode_t=yes
4819else
Martin v. Löwis11437992002-04-12 09:54:03 +00004820 echo "$as_me: failed program was:" >&5
4821cat conftest.$ac_ext >&5
4822ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00004823fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004824rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004825fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004826echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4827echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4828if test $ac_cv_type_mode_t = yes; then
4829 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004830else
Martin v. Löwis11437992002-04-12 09:54:03 +00004831
4832cat >>confdefs.h <<_ACEOF
4833#define mode_t int
4834_ACEOF
4835
4836fi
4837
4838echo "$as_me:$LINENO: checking for off_t" >&5
4839echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4840if test "${ac_cv_type_off_t+set}" = set; then
4841 echo $ECHO_N "(cached) $ECHO_C" >&6
4842else
4843 cat >conftest.$ac_ext <<_ACEOF
4844#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004845#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004846$ac_includes_default
4847#ifdef F77_DUMMY_MAIN
4848# ifdef __cplusplus
4849 extern "C"
4850# endif
4851 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004852#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004853int
4854main ()
4855{
4856if ((off_t *) 0)
4857 return 0;
4858if (sizeof (off_t))
4859 return 0;
4860 ;
4861 return 0;
4862}
4863_ACEOF
4864rm -f conftest.$ac_objext
4865if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4866 (eval $ac_compile) 2>&5
4867 ac_status=$?
4868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4869 (exit $ac_status); } &&
4870 { ac_try='test -s conftest.$ac_objext'
4871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4872 (eval $ac_try) 2>&5
4873 ac_status=$?
4874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4875 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004876 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004877else
Martin v. Löwis11437992002-04-12 09:54:03 +00004878 echo "$as_me: failed program was:" >&5
4879cat conftest.$ac_ext >&5
4880ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004881fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004882rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004883fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004884echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
4885echo "${ECHO_T}$ac_cv_type_off_t" >&6
4886if test $ac_cv_type_off_t = yes; then
4887 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004888else
Martin v. Löwis11437992002-04-12 09:54:03 +00004889
4890cat >>confdefs.h <<_ACEOF
4891#define off_t long
4892_ACEOF
4893
4894fi
4895
4896echo "$as_me:$LINENO: checking for pid_t" >&5
4897echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4898if test "${ac_cv_type_pid_t+set}" = set; then
4899 echo $ECHO_N "(cached) $ECHO_C" >&6
4900else
4901 cat >conftest.$ac_ext <<_ACEOF
4902#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004903#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004904$ac_includes_default
4905#ifdef F77_DUMMY_MAIN
4906# ifdef __cplusplus
4907 extern "C"
4908# endif
4909 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004910#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004911int
4912main ()
4913{
4914if ((pid_t *) 0)
4915 return 0;
4916if (sizeof (pid_t))
4917 return 0;
4918 ;
4919 return 0;
4920}
4921_ACEOF
4922rm -f conftest.$ac_objext
4923if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4924 (eval $ac_compile) 2>&5
4925 ac_status=$?
4926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4927 (exit $ac_status); } &&
4928 { ac_try='test -s conftest.$ac_objext'
4929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4930 (eval $ac_try) 2>&5
4931 ac_status=$?
4932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4933 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004934 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004935else
Martin v. Löwis11437992002-04-12 09:54:03 +00004936 echo "$as_me: failed program was:" >&5
4937cat conftest.$ac_ext >&5
4938ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004939fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004940rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004941fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004942echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4943echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4944if test $ac_cv_type_pid_t = yes; then
4945 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004946else
Martin v. Löwis11437992002-04-12 09:54:03 +00004947
4948cat >>confdefs.h <<_ACEOF
4949#define pid_t int
4950_ACEOF
4951
4952fi
4953
4954echo "$as_me:$LINENO: checking return type of signal handlers" >&5
4955echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4956if test "${ac_cv_type_signal+set}" = set; then
4957 echo $ECHO_N "(cached) $ECHO_C" >&6
4958else
4959 cat >conftest.$ac_ext <<_ACEOF
4960#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004961#include "confdefs.h"
4962#include <sys/types.h>
4963#include <signal.h>
4964#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004965# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00004966#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004967#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004968extern "C" void (*signal (int, void (*)(int)))(int);
4969#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004970void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004971#endif
4972
Martin v. Löwis11437992002-04-12 09:54:03 +00004973#ifdef F77_DUMMY_MAIN
4974# ifdef __cplusplus
4975 extern "C"
4976# endif
4977 int F77_DUMMY_MAIN() { return 1; }
4978#endif
4979int
4980main ()
4981{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004982int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00004983 ;
4984 return 0;
4985}
4986_ACEOF
4987rm -f conftest.$ac_objext
4988if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4989 (eval $ac_compile) 2>&5
4990 ac_status=$?
4991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4992 (exit $ac_status); } &&
4993 { ac_try='test -s conftest.$ac_objext'
4994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4995 (eval $ac_try) 2>&5
4996 ac_status=$?
4997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4998 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004999 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005000else
Martin v. Löwis11437992002-04-12 09:54:03 +00005001 echo "$as_me: failed program was:" >&5
5002cat conftest.$ac_ext >&5
5003ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005004fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005005rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005006fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005007echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5008echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005009
Martin v. Löwis11437992002-04-12 09:54:03 +00005010cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005011#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005012_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005013
Michael W. Hudson54241132001-12-07 15:38:26 +00005014
Martin v. Löwis11437992002-04-12 09:54:03 +00005015echo "$as_me:$LINENO: checking for size_t" >&5
5016echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5017if test "${ac_cv_type_size_t+set}" = set; then
5018 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005019else
Martin v. Löwis11437992002-04-12 09:54:03 +00005020 cat >conftest.$ac_ext <<_ACEOF
5021#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005022#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005023$ac_includes_default
5024#ifdef F77_DUMMY_MAIN
5025# ifdef __cplusplus
5026 extern "C"
5027# endif
5028 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005029#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005030int
5031main ()
5032{
5033if ((size_t *) 0)
5034 return 0;
5035if (sizeof (size_t))
5036 return 0;
5037 ;
5038 return 0;
5039}
5040_ACEOF
5041rm -f conftest.$ac_objext
5042if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5043 (eval $ac_compile) 2>&5
5044 ac_status=$?
5045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5046 (exit $ac_status); } &&
5047 { ac_try='test -s conftest.$ac_objext'
5048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5049 (eval $ac_try) 2>&5
5050 ac_status=$?
5051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5052 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005053 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005054else
Martin v. Löwis11437992002-04-12 09:54:03 +00005055 echo "$as_me: failed program was:" >&5
5056cat conftest.$ac_ext >&5
5057ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005058fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005059rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005060fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005061echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5062echo "${ECHO_T}$ac_cv_type_size_t" >&6
5063if test $ac_cv_type_size_t = yes; then
5064 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005065else
Martin v. Löwis11437992002-04-12 09:54:03 +00005066
5067cat >>confdefs.h <<_ACEOF
5068#define size_t unsigned
5069_ACEOF
5070
5071fi
5072
5073echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5074echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5075if test "${ac_cv_type_uid_t+set}" = set; then
5076 echo $ECHO_N "(cached) $ECHO_C" >&6
5077else
5078 cat >conftest.$ac_ext <<_ACEOF
5079#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005080#include "confdefs.h"
5081#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005082
5083_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005084if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5085 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005086 ac_cv_type_uid_t=yes
5087else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005088 ac_cv_type_uid_t=no
5089fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005090rm -f conftest*
5091
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005092fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005093echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5094echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005095if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005096
Martin v. Löwis11437992002-04-12 09:54:03 +00005097cat >>confdefs.h <<\_ACEOF
5098#define uid_t int
5099_ACEOF
5100
5101
5102cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005103#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005104_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005105
5106fi
5107
Jack Jansendd19cf82001-12-06 22:36:17 +00005108
Michael W. Hudson54241132001-12-07 15:38:26 +00005109# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00005110echo "$as_me:$LINENO: checking for int" >&5
5111echo $ECHO_N "checking for int... $ECHO_C" >&6
5112if test "${ac_cv_type_int+set}" = set; then
5113 echo $ECHO_N "(cached) $ECHO_C" >&6
5114else
5115 cat >conftest.$ac_ext <<_ACEOF
5116#line $LINENO "configure"
5117#include "confdefs.h"
5118$ac_includes_default
5119#ifdef F77_DUMMY_MAIN
5120# ifdef __cplusplus
5121 extern "C"
5122# endif
5123 int F77_DUMMY_MAIN() { return 1; }
5124#endif
5125int
5126main ()
5127{
5128if ((int *) 0)
5129 return 0;
5130if (sizeof (int))
5131 return 0;
5132 ;
5133 return 0;
5134}
5135_ACEOF
5136rm -f conftest.$ac_objext
5137if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5138 (eval $ac_compile) 2>&5
5139 ac_status=$?
5140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5141 (exit $ac_status); } &&
5142 { ac_try='test -s conftest.$ac_objext'
5143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5144 (eval $ac_try) 2>&5
5145 ac_status=$?
5146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5147 (exit $ac_status); }; }; then
5148 ac_cv_type_int=yes
5149else
5150 echo "$as_me: failed program was:" >&5
5151cat conftest.$ac_ext >&5
5152ac_cv_type_int=no
5153fi
5154rm -f conftest.$ac_objext conftest.$ac_ext
5155fi
5156echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5157echo "${ECHO_T}$ac_cv_type_int" >&6
5158
5159echo "$as_me:$LINENO: checking size of int" >&5
5160echo $ECHO_N "checking size of int... $ECHO_C" >&6
5161if test "${ac_cv_sizeof_int+set}" = set; then
5162 echo $ECHO_N "(cached) $ECHO_C" >&6
5163else
5164 if test "$ac_cv_type_int" = yes; then
5165 # The cast to unsigned long works around a bug in the HP C Compiler
5166 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5167 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5168 # This bug is HP SR number 8606223364.
5169 if test "$cross_compiling" = yes; then
5170 # Depending upon the size, compute the lo and hi bounds.
5171cat >conftest.$ac_ext <<_ACEOF
5172#line $LINENO "configure"
5173#include "confdefs.h"
5174$ac_includes_default
5175#ifdef F77_DUMMY_MAIN
5176# ifdef __cplusplus
5177 extern "C"
5178# endif
5179 int F77_DUMMY_MAIN() { return 1; }
5180#endif
5181int
5182main ()
5183{
5184static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5185test_array [0] = 0
5186
5187 ;
5188 return 0;
5189}
5190_ACEOF
5191rm -f conftest.$ac_objext
5192if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5193 (eval $ac_compile) 2>&5
5194 ac_status=$?
5195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5196 (exit $ac_status); } &&
5197 { ac_try='test -s conftest.$ac_objext'
5198 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5199 (eval $ac_try) 2>&5
5200 ac_status=$?
5201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5202 (exit $ac_status); }; }; then
5203 ac_lo=0 ac_mid=0
5204 while :; do
5205 cat >conftest.$ac_ext <<_ACEOF
5206#line $LINENO "configure"
5207#include "confdefs.h"
5208$ac_includes_default
5209#ifdef F77_DUMMY_MAIN
5210# ifdef __cplusplus
5211 extern "C"
5212# endif
5213 int F77_DUMMY_MAIN() { return 1; }
5214#endif
5215int
5216main ()
5217{
5218static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5219test_array [0] = 0
5220
5221 ;
5222 return 0;
5223}
5224_ACEOF
5225rm -f conftest.$ac_objext
5226if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5227 (eval $ac_compile) 2>&5
5228 ac_status=$?
5229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5230 (exit $ac_status); } &&
5231 { ac_try='test -s conftest.$ac_objext'
5232 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5233 (eval $ac_try) 2>&5
5234 ac_status=$?
5235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5236 (exit $ac_status); }; }; then
5237 ac_hi=$ac_mid; break
5238else
5239 echo "$as_me: failed program was:" >&5
5240cat conftest.$ac_ext >&5
5241ac_lo=`expr $ac_mid + 1`
5242 if test $ac_lo -le $ac_mid; then
5243 ac_lo= ac_hi=
5244 break
5245 fi
5246 ac_mid=`expr 2 '*' $ac_mid + 1`
5247fi
5248rm -f conftest.$ac_objext conftest.$ac_ext
5249 done
5250else
5251 echo "$as_me: failed program was:" >&5
5252cat conftest.$ac_ext >&5
5253cat >conftest.$ac_ext <<_ACEOF
5254#line $LINENO "configure"
5255#include "confdefs.h"
5256$ac_includes_default
5257#ifdef F77_DUMMY_MAIN
5258# ifdef __cplusplus
5259 extern "C"
5260# endif
5261 int F77_DUMMY_MAIN() { return 1; }
5262#endif
5263int
5264main ()
5265{
5266static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5267test_array [0] = 0
5268
5269 ;
5270 return 0;
5271}
5272_ACEOF
5273rm -f conftest.$ac_objext
5274if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5275 (eval $ac_compile) 2>&5
5276 ac_status=$?
5277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5278 (exit $ac_status); } &&
5279 { ac_try='test -s conftest.$ac_objext'
5280 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5281 (eval $ac_try) 2>&5
5282 ac_status=$?
5283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5284 (exit $ac_status); }; }; then
5285 ac_hi=-1 ac_mid=-1
5286 while :; do
5287 cat >conftest.$ac_ext <<_ACEOF
5288#line $LINENO "configure"
5289#include "confdefs.h"
5290$ac_includes_default
5291#ifdef F77_DUMMY_MAIN
5292# ifdef __cplusplus
5293 extern "C"
5294# endif
5295 int F77_DUMMY_MAIN() { return 1; }
5296#endif
5297int
5298main ()
5299{
5300static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5301test_array [0] = 0
5302
5303 ;
5304 return 0;
5305}
5306_ACEOF
5307rm -f conftest.$ac_objext
5308if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5309 (eval $ac_compile) 2>&5
5310 ac_status=$?
5311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5312 (exit $ac_status); } &&
5313 { ac_try='test -s conftest.$ac_objext'
5314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5315 (eval $ac_try) 2>&5
5316 ac_status=$?
5317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5318 (exit $ac_status); }; }; then
5319 ac_lo=$ac_mid; break
5320else
5321 echo "$as_me: failed program was:" >&5
5322cat conftest.$ac_ext >&5
5323ac_hi=`expr '(' $ac_mid ')' - 1`
5324 if test $ac_mid -le $ac_hi; then
5325 ac_lo= ac_hi=
5326 break
5327 fi
5328 ac_mid=`expr 2 '*' $ac_mid`
5329fi
5330rm -f conftest.$ac_objext conftest.$ac_ext
5331 done
5332else
5333 echo "$as_me: failed program was:" >&5
5334cat conftest.$ac_ext >&5
5335ac_lo= ac_hi=
5336fi
5337rm -f conftest.$ac_objext conftest.$ac_ext
5338fi
5339rm -f conftest.$ac_objext conftest.$ac_ext
5340# Binary search between lo and hi bounds.
5341while test "x$ac_lo" != "x$ac_hi"; do
5342 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5343 cat >conftest.$ac_ext <<_ACEOF
5344#line $LINENO "configure"
5345#include "confdefs.h"
5346$ac_includes_default
5347#ifdef F77_DUMMY_MAIN
5348# ifdef __cplusplus
5349 extern "C"
5350# endif
5351 int F77_DUMMY_MAIN() { return 1; }
5352#endif
5353int
5354main ()
5355{
5356static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5357test_array [0] = 0
5358
5359 ;
5360 return 0;
5361}
5362_ACEOF
5363rm -f conftest.$ac_objext
5364if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5365 (eval $ac_compile) 2>&5
5366 ac_status=$?
5367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5368 (exit $ac_status); } &&
5369 { ac_try='test -s conftest.$ac_objext'
5370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5371 (eval $ac_try) 2>&5
5372 ac_status=$?
5373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5374 (exit $ac_status); }; }; then
5375 ac_hi=$ac_mid
5376else
5377 echo "$as_me: failed program was:" >&5
5378cat conftest.$ac_ext >&5
5379ac_lo=`expr '(' $ac_mid ')' + 1`
5380fi
5381rm -f conftest.$ac_objext conftest.$ac_ext
5382done
5383case $ac_lo in
5384?*) ac_cv_sizeof_int=$ac_lo;;
5385'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5386echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5387 { (exit 1); exit 1; }; } ;;
5388esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005389else
5390 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005391 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5392echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5393 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005394else
Martin v. Löwis11437992002-04-12 09:54:03 +00005395 cat >conftest.$ac_ext <<_ACEOF
5396#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005397#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005398$ac_includes_default
5399long longval () { return (long) (sizeof (int)); }
5400unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005401#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005402#include <stdlib.h>
5403#ifdef F77_DUMMY_MAIN
5404# ifdef __cplusplus
5405 extern "C"
5406# endif
5407 int F77_DUMMY_MAIN() { return 1; }
5408#endif
5409int
5410main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005411{
Martin v. Löwis11437992002-04-12 09:54:03 +00005412
5413 FILE *f = fopen ("conftest.val", "w");
5414 if (! f)
5415 exit (1);
5416 if (((long) (sizeof (int))) < 0)
5417 {
5418 long i = longval ();
5419 if (i != ((long) (sizeof (int))))
5420 exit (1);
5421 fprintf (f, "%ld\n", i);
5422 }
5423 else
5424 {
5425 unsigned long i = ulongval ();
5426 if (i != ((long) (sizeof (int))))
5427 exit (1);
5428 fprintf (f, "%lu\n", i);
5429 }
5430 exit (ferror (f) || fclose (f) != 0);
5431
5432 ;
5433 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005434}
Martin v. Löwis11437992002-04-12 09:54:03 +00005435_ACEOF
5436rm -f conftest$ac_exeext
5437if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5438 (eval $ac_link) 2>&5
5439 ac_status=$?
5440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5441 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5442 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5443 (eval $ac_try) 2>&5
5444 ac_status=$?
5445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5446 (exit $ac_status); }; }; then
5447 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005448else
Martin v. Löwis11437992002-04-12 09:54:03 +00005449 echo "$as_me: program exited with status $ac_status" >&5
5450echo "$as_me: failed program was:" >&5
5451cat conftest.$ac_ext >&5
5452( exit $ac_status )
5453{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5454echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5455 { (exit 1); exit 1; }; }
5456fi
5457rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5458fi
5459fi
5460rm -f conftest.val
5461else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005462 ac_cv_sizeof_int=0
5463fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005464fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005465echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5466echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5467cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005468#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005469_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005470
5471
Martin v. Löwis11437992002-04-12 09:54:03 +00005472echo "$as_me:$LINENO: checking for long" >&5
5473echo $ECHO_N "checking for long... $ECHO_C" >&6
5474if test "${ac_cv_type_long+set}" = set; then
5475 echo $ECHO_N "(cached) $ECHO_C" >&6
5476else
5477 cat >conftest.$ac_ext <<_ACEOF
5478#line $LINENO "configure"
5479#include "confdefs.h"
5480$ac_includes_default
5481#ifdef F77_DUMMY_MAIN
5482# ifdef __cplusplus
5483 extern "C"
5484# endif
5485 int F77_DUMMY_MAIN() { return 1; }
5486#endif
5487int
5488main ()
5489{
5490if ((long *) 0)
5491 return 0;
5492if (sizeof (long))
5493 return 0;
5494 ;
5495 return 0;
5496}
5497_ACEOF
5498rm -f conftest.$ac_objext
5499if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5500 (eval $ac_compile) 2>&5
5501 ac_status=$?
5502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5503 (exit $ac_status); } &&
5504 { ac_try='test -s conftest.$ac_objext'
5505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5506 (eval $ac_try) 2>&5
5507 ac_status=$?
5508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5509 (exit $ac_status); }; }; then
5510 ac_cv_type_long=yes
5511else
5512 echo "$as_me: failed program was:" >&5
5513cat conftest.$ac_ext >&5
5514ac_cv_type_long=no
5515fi
5516rm -f conftest.$ac_objext conftest.$ac_ext
5517fi
5518echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5519echo "${ECHO_T}$ac_cv_type_long" >&6
5520
5521echo "$as_me:$LINENO: checking size of long" >&5
5522echo $ECHO_N "checking size of long... $ECHO_C" >&6
5523if test "${ac_cv_sizeof_long+set}" = set; then
5524 echo $ECHO_N "(cached) $ECHO_C" >&6
5525else
5526 if test "$ac_cv_type_long" = yes; then
5527 # The cast to unsigned long works around a bug in the HP C Compiler
5528 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5529 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5530 # This bug is HP SR number 8606223364.
5531 if test "$cross_compiling" = yes; then
5532 # Depending upon the size, compute the lo and hi bounds.
5533cat >conftest.$ac_ext <<_ACEOF
5534#line $LINENO "configure"
5535#include "confdefs.h"
5536$ac_includes_default
5537#ifdef F77_DUMMY_MAIN
5538# ifdef __cplusplus
5539 extern "C"
5540# endif
5541 int F77_DUMMY_MAIN() { return 1; }
5542#endif
5543int
5544main ()
5545{
5546static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5547test_array [0] = 0
5548
5549 ;
5550 return 0;
5551}
5552_ACEOF
5553rm -f conftest.$ac_objext
5554if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5555 (eval $ac_compile) 2>&5
5556 ac_status=$?
5557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5558 (exit $ac_status); } &&
5559 { ac_try='test -s conftest.$ac_objext'
5560 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5561 (eval $ac_try) 2>&5
5562 ac_status=$?
5563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5564 (exit $ac_status); }; }; then
5565 ac_lo=0 ac_mid=0
5566 while :; do
5567 cat >conftest.$ac_ext <<_ACEOF
5568#line $LINENO "configure"
5569#include "confdefs.h"
5570$ac_includes_default
5571#ifdef F77_DUMMY_MAIN
5572# ifdef __cplusplus
5573 extern "C"
5574# endif
5575 int F77_DUMMY_MAIN() { return 1; }
5576#endif
5577int
5578main ()
5579{
5580static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5581test_array [0] = 0
5582
5583 ;
5584 return 0;
5585}
5586_ACEOF
5587rm -f conftest.$ac_objext
5588if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5589 (eval $ac_compile) 2>&5
5590 ac_status=$?
5591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5592 (exit $ac_status); } &&
5593 { ac_try='test -s conftest.$ac_objext'
5594 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5595 (eval $ac_try) 2>&5
5596 ac_status=$?
5597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5598 (exit $ac_status); }; }; then
5599 ac_hi=$ac_mid; break
5600else
5601 echo "$as_me: failed program was:" >&5
5602cat conftest.$ac_ext >&5
5603ac_lo=`expr $ac_mid + 1`
5604 if test $ac_lo -le $ac_mid; then
5605 ac_lo= ac_hi=
5606 break
5607 fi
5608 ac_mid=`expr 2 '*' $ac_mid + 1`
5609fi
5610rm -f conftest.$ac_objext conftest.$ac_ext
5611 done
5612else
5613 echo "$as_me: failed program was:" >&5
5614cat conftest.$ac_ext >&5
5615cat >conftest.$ac_ext <<_ACEOF
5616#line $LINENO "configure"
5617#include "confdefs.h"
5618$ac_includes_default
5619#ifdef F77_DUMMY_MAIN
5620# ifdef __cplusplus
5621 extern "C"
5622# endif
5623 int F77_DUMMY_MAIN() { return 1; }
5624#endif
5625int
5626main ()
5627{
5628static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5629test_array [0] = 0
5630
5631 ;
5632 return 0;
5633}
5634_ACEOF
5635rm -f conftest.$ac_objext
5636if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5637 (eval $ac_compile) 2>&5
5638 ac_status=$?
5639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5640 (exit $ac_status); } &&
5641 { ac_try='test -s conftest.$ac_objext'
5642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5643 (eval $ac_try) 2>&5
5644 ac_status=$?
5645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5646 (exit $ac_status); }; }; then
5647 ac_hi=-1 ac_mid=-1
5648 while :; do
5649 cat >conftest.$ac_ext <<_ACEOF
5650#line $LINENO "configure"
5651#include "confdefs.h"
5652$ac_includes_default
5653#ifdef F77_DUMMY_MAIN
5654# ifdef __cplusplus
5655 extern "C"
5656# endif
5657 int F77_DUMMY_MAIN() { return 1; }
5658#endif
5659int
5660main ()
5661{
5662static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5663test_array [0] = 0
5664
5665 ;
5666 return 0;
5667}
5668_ACEOF
5669rm -f conftest.$ac_objext
5670if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5671 (eval $ac_compile) 2>&5
5672 ac_status=$?
5673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5674 (exit $ac_status); } &&
5675 { ac_try='test -s conftest.$ac_objext'
5676 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5677 (eval $ac_try) 2>&5
5678 ac_status=$?
5679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5680 (exit $ac_status); }; }; then
5681 ac_lo=$ac_mid; break
5682else
5683 echo "$as_me: failed program was:" >&5
5684cat conftest.$ac_ext >&5
5685ac_hi=`expr '(' $ac_mid ')' - 1`
5686 if test $ac_mid -le $ac_hi; then
5687 ac_lo= ac_hi=
5688 break
5689 fi
5690 ac_mid=`expr 2 '*' $ac_mid`
5691fi
5692rm -f conftest.$ac_objext conftest.$ac_ext
5693 done
5694else
5695 echo "$as_me: failed program was:" >&5
5696cat conftest.$ac_ext >&5
5697ac_lo= ac_hi=
5698fi
5699rm -f conftest.$ac_objext conftest.$ac_ext
5700fi
5701rm -f conftest.$ac_objext conftest.$ac_ext
5702# Binary search between lo and hi bounds.
5703while test "x$ac_lo" != "x$ac_hi"; do
5704 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5705 cat >conftest.$ac_ext <<_ACEOF
5706#line $LINENO "configure"
5707#include "confdefs.h"
5708$ac_includes_default
5709#ifdef F77_DUMMY_MAIN
5710# ifdef __cplusplus
5711 extern "C"
5712# endif
5713 int F77_DUMMY_MAIN() { return 1; }
5714#endif
5715int
5716main ()
5717{
5718static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5719test_array [0] = 0
5720
5721 ;
5722 return 0;
5723}
5724_ACEOF
5725rm -f conftest.$ac_objext
5726if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5727 (eval $ac_compile) 2>&5
5728 ac_status=$?
5729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5730 (exit $ac_status); } &&
5731 { ac_try='test -s conftest.$ac_objext'
5732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5733 (eval $ac_try) 2>&5
5734 ac_status=$?
5735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5736 (exit $ac_status); }; }; then
5737 ac_hi=$ac_mid
5738else
5739 echo "$as_me: failed program was:" >&5
5740cat conftest.$ac_ext >&5
5741ac_lo=`expr '(' $ac_mid ')' + 1`
5742fi
5743rm -f conftest.$ac_objext conftest.$ac_ext
5744done
5745case $ac_lo in
5746?*) ac_cv_sizeof_long=$ac_lo;;
5747'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5748echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5749 { (exit 1); exit 1; }; } ;;
5750esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005751else
5752 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005753 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5754echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5755 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005756else
Martin v. Löwis11437992002-04-12 09:54:03 +00005757 cat >conftest.$ac_ext <<_ACEOF
5758#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005759#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005760$ac_includes_default
5761long longval () { return (long) (sizeof (long)); }
5762unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005763#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005764#include <stdlib.h>
5765#ifdef F77_DUMMY_MAIN
5766# ifdef __cplusplus
5767 extern "C"
5768# endif
5769 int F77_DUMMY_MAIN() { return 1; }
5770#endif
5771int
5772main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005773{
Martin v. Löwis11437992002-04-12 09:54:03 +00005774
5775 FILE *f = fopen ("conftest.val", "w");
5776 if (! f)
5777 exit (1);
5778 if (((long) (sizeof (long))) < 0)
5779 {
5780 long i = longval ();
5781 if (i != ((long) (sizeof (long))))
5782 exit (1);
5783 fprintf (f, "%ld\n", i);
5784 }
5785 else
5786 {
5787 unsigned long i = ulongval ();
5788 if (i != ((long) (sizeof (long))))
5789 exit (1);
5790 fprintf (f, "%lu\n", i);
5791 }
5792 exit (ferror (f) || fclose (f) != 0);
5793
5794 ;
5795 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005796}
Martin v. Löwis11437992002-04-12 09:54:03 +00005797_ACEOF
5798rm -f conftest$ac_exeext
5799if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5800 (eval $ac_link) 2>&5
5801 ac_status=$?
5802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5803 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5805 (eval $ac_try) 2>&5
5806 ac_status=$?
5807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5808 (exit $ac_status); }; }; then
5809 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005810else
Martin v. Löwis11437992002-04-12 09:54:03 +00005811 echo "$as_me: program exited with status $ac_status" >&5
5812echo "$as_me: failed program was:" >&5
5813cat conftest.$ac_ext >&5
5814( exit $ac_status )
5815{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5816echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5817 { (exit 1); exit 1; }; }
5818fi
5819rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5820fi
5821fi
5822rm -f conftest.val
5823else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005824 ac_cv_sizeof_long=0
5825fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005826fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005827echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5828echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5829cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005830#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00005831_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005832
5833
Martin v. Löwis11437992002-04-12 09:54:03 +00005834echo "$as_me:$LINENO: checking for void *" >&5
5835echo $ECHO_N "checking for void *... $ECHO_C" >&6
5836if test "${ac_cv_type_void_p+set}" = set; then
5837 echo $ECHO_N "(cached) $ECHO_C" >&6
5838else
5839 cat >conftest.$ac_ext <<_ACEOF
5840#line $LINENO "configure"
5841#include "confdefs.h"
5842$ac_includes_default
5843#ifdef F77_DUMMY_MAIN
5844# ifdef __cplusplus
5845 extern "C"
5846# endif
5847 int F77_DUMMY_MAIN() { return 1; }
5848#endif
5849int
5850main ()
5851{
5852if ((void * *) 0)
5853 return 0;
5854if (sizeof (void *))
5855 return 0;
5856 ;
5857 return 0;
5858}
5859_ACEOF
5860rm -f conftest.$ac_objext
5861if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5862 (eval $ac_compile) 2>&5
5863 ac_status=$?
5864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5865 (exit $ac_status); } &&
5866 { ac_try='test -s conftest.$ac_objext'
5867 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5868 (eval $ac_try) 2>&5
5869 ac_status=$?
5870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5871 (exit $ac_status); }; }; then
5872 ac_cv_type_void_p=yes
5873else
5874 echo "$as_me: failed program was:" >&5
5875cat conftest.$ac_ext >&5
5876ac_cv_type_void_p=no
5877fi
5878rm -f conftest.$ac_objext conftest.$ac_ext
5879fi
5880echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
5881echo "${ECHO_T}$ac_cv_type_void_p" >&6
5882
5883echo "$as_me:$LINENO: checking size of void *" >&5
5884echo $ECHO_N "checking size of void *... $ECHO_C" >&6
5885if test "${ac_cv_sizeof_void_p+set}" = set; then
5886 echo $ECHO_N "(cached) $ECHO_C" >&6
5887else
5888 if test "$ac_cv_type_void_p" = yes; then
5889 # The cast to unsigned long works around a bug in the HP C Compiler
5890 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5891 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5892 # This bug is HP SR number 8606223364.
5893 if test "$cross_compiling" = yes; then
5894 # Depending upon the size, compute the lo and hi bounds.
5895cat >conftest.$ac_ext <<_ACEOF
5896#line $LINENO "configure"
5897#include "confdefs.h"
5898$ac_includes_default
5899#ifdef F77_DUMMY_MAIN
5900# ifdef __cplusplus
5901 extern "C"
5902# endif
5903 int F77_DUMMY_MAIN() { return 1; }
5904#endif
5905int
5906main ()
5907{
5908static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
5909test_array [0] = 0
5910
5911 ;
5912 return 0;
5913}
5914_ACEOF
5915rm -f conftest.$ac_objext
5916if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5917 (eval $ac_compile) 2>&5
5918 ac_status=$?
5919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5920 (exit $ac_status); } &&
5921 { ac_try='test -s conftest.$ac_objext'
5922 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5923 (eval $ac_try) 2>&5
5924 ac_status=$?
5925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5926 (exit $ac_status); }; }; then
5927 ac_lo=0 ac_mid=0
5928 while :; do
5929 cat >conftest.$ac_ext <<_ACEOF
5930#line $LINENO "configure"
5931#include "confdefs.h"
5932$ac_includes_default
5933#ifdef F77_DUMMY_MAIN
5934# ifdef __cplusplus
5935 extern "C"
5936# endif
5937 int F77_DUMMY_MAIN() { return 1; }
5938#endif
5939int
5940main ()
5941{
5942static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5943test_array [0] = 0
5944
5945 ;
5946 return 0;
5947}
5948_ACEOF
5949rm -f conftest.$ac_objext
5950if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5951 (eval $ac_compile) 2>&5
5952 ac_status=$?
5953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5954 (exit $ac_status); } &&
5955 { ac_try='test -s conftest.$ac_objext'
5956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5957 (eval $ac_try) 2>&5
5958 ac_status=$?
5959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5960 (exit $ac_status); }; }; then
5961 ac_hi=$ac_mid; break
5962else
5963 echo "$as_me: failed program was:" >&5
5964cat conftest.$ac_ext >&5
5965ac_lo=`expr $ac_mid + 1`
5966 if test $ac_lo -le $ac_mid; then
5967 ac_lo= ac_hi=
5968 break
5969 fi
5970 ac_mid=`expr 2 '*' $ac_mid + 1`
5971fi
5972rm -f conftest.$ac_objext conftest.$ac_ext
5973 done
5974else
5975 echo "$as_me: failed program was:" >&5
5976cat conftest.$ac_ext >&5
5977cat >conftest.$ac_ext <<_ACEOF
5978#line $LINENO "configure"
5979#include "confdefs.h"
5980$ac_includes_default
5981#ifdef F77_DUMMY_MAIN
5982# ifdef __cplusplus
5983 extern "C"
5984# endif
5985 int F77_DUMMY_MAIN() { return 1; }
5986#endif
5987int
5988main ()
5989{
5990static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
5991test_array [0] = 0
5992
5993 ;
5994 return 0;
5995}
5996_ACEOF
5997rm -f conftest.$ac_objext
5998if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5999 (eval $ac_compile) 2>&5
6000 ac_status=$?
6001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6002 (exit $ac_status); } &&
6003 { ac_try='test -s conftest.$ac_objext'
6004 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6005 (eval $ac_try) 2>&5
6006 ac_status=$?
6007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6008 (exit $ac_status); }; }; then
6009 ac_hi=-1 ac_mid=-1
6010 while :; do
6011 cat >conftest.$ac_ext <<_ACEOF
6012#line $LINENO "configure"
6013#include "confdefs.h"
6014$ac_includes_default
6015#ifdef F77_DUMMY_MAIN
6016# ifdef __cplusplus
6017 extern "C"
6018# endif
6019 int F77_DUMMY_MAIN() { return 1; }
6020#endif
6021int
6022main ()
6023{
6024static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6025test_array [0] = 0
6026
6027 ;
6028 return 0;
6029}
6030_ACEOF
6031rm -f conftest.$ac_objext
6032if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6033 (eval $ac_compile) 2>&5
6034 ac_status=$?
6035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6036 (exit $ac_status); } &&
6037 { ac_try='test -s conftest.$ac_objext'
6038 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6039 (eval $ac_try) 2>&5
6040 ac_status=$?
6041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6042 (exit $ac_status); }; }; then
6043 ac_lo=$ac_mid; break
6044else
6045 echo "$as_me: failed program was:" >&5
6046cat conftest.$ac_ext >&5
6047ac_hi=`expr '(' $ac_mid ')' - 1`
6048 if test $ac_mid -le $ac_hi; then
6049 ac_lo= ac_hi=
6050 break
6051 fi
6052 ac_mid=`expr 2 '*' $ac_mid`
6053fi
6054rm -f conftest.$ac_objext conftest.$ac_ext
6055 done
6056else
6057 echo "$as_me: failed program was:" >&5
6058cat conftest.$ac_ext >&5
6059ac_lo= ac_hi=
6060fi
6061rm -f conftest.$ac_objext conftest.$ac_ext
6062fi
6063rm -f conftest.$ac_objext conftest.$ac_ext
6064# Binary search between lo and hi bounds.
6065while test "x$ac_lo" != "x$ac_hi"; do
6066 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6067 cat >conftest.$ac_ext <<_ACEOF
6068#line $LINENO "configure"
6069#include "confdefs.h"
6070$ac_includes_default
6071#ifdef F77_DUMMY_MAIN
6072# ifdef __cplusplus
6073 extern "C"
6074# endif
6075 int F77_DUMMY_MAIN() { return 1; }
6076#endif
6077int
6078main ()
6079{
6080static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6081test_array [0] = 0
6082
6083 ;
6084 return 0;
6085}
6086_ACEOF
6087rm -f conftest.$ac_objext
6088if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6089 (eval $ac_compile) 2>&5
6090 ac_status=$?
6091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6092 (exit $ac_status); } &&
6093 { ac_try='test -s conftest.$ac_objext'
6094 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6095 (eval $ac_try) 2>&5
6096 ac_status=$?
6097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6098 (exit $ac_status); }; }; then
6099 ac_hi=$ac_mid
6100else
6101 echo "$as_me: failed program was:" >&5
6102cat conftest.$ac_ext >&5
6103ac_lo=`expr '(' $ac_mid ')' + 1`
6104fi
6105rm -f conftest.$ac_objext conftest.$ac_ext
6106done
6107case $ac_lo in
6108?*) ac_cv_sizeof_void_p=$ac_lo;;
6109'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6110echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6111 { (exit 1); exit 1; }; } ;;
6112esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006113else
6114 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006115 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6116echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6117 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006118else
Martin v. Löwis11437992002-04-12 09:54:03 +00006119 cat >conftest.$ac_ext <<_ACEOF
6120#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00006121#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006122$ac_includes_default
6123long longval () { return (long) (sizeof (void *)); }
6124unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006125#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006126#include <stdlib.h>
6127#ifdef F77_DUMMY_MAIN
6128# ifdef __cplusplus
6129 extern "C"
6130# endif
6131 int F77_DUMMY_MAIN() { return 1; }
6132#endif
6133int
6134main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006135{
Martin v. Löwis11437992002-04-12 09:54:03 +00006136
6137 FILE *f = fopen ("conftest.val", "w");
6138 if (! f)
6139 exit (1);
6140 if (((long) (sizeof (void *))) < 0)
6141 {
6142 long i = longval ();
6143 if (i != ((long) (sizeof (void *))))
6144 exit (1);
6145 fprintf (f, "%ld\n", i);
6146 }
6147 else
6148 {
6149 unsigned long i = ulongval ();
6150 if (i != ((long) (sizeof (void *))))
6151 exit (1);
6152 fprintf (f, "%lu\n", i);
6153 }
6154 exit (ferror (f) || fclose (f) != 0);
6155
6156 ;
6157 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006158}
Martin v. Löwis11437992002-04-12 09:54:03 +00006159_ACEOF
6160rm -f conftest$ac_exeext
6161if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6162 (eval $ac_link) 2>&5
6163 ac_status=$?
6164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6165 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6167 (eval $ac_try) 2>&5
6168 ac_status=$?
6169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6170 (exit $ac_status); }; }; then
6171 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006172else
Martin v. Löwis11437992002-04-12 09:54:03 +00006173 echo "$as_me: program exited with status $ac_status" >&5
6174echo "$as_me: failed program was:" >&5
6175cat conftest.$ac_ext >&5
6176( exit $ac_status )
6177{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6178echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6179 { (exit 1); exit 1; }; }
6180fi
6181rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6182fi
6183fi
6184rm -f conftest.val
6185else
Guido van Rossumad678af1998-10-02 14:42:15 +00006186 ac_cv_sizeof_void_p=0
6187fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006188fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006189echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6190echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6191cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006192#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006193_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006194
6195
Martin v. Löwis11437992002-04-12 09:54:03 +00006196echo "$as_me:$LINENO: checking for char" >&5
6197echo $ECHO_N "checking for char... $ECHO_C" >&6
6198if test "${ac_cv_type_char+set}" = set; then
6199 echo $ECHO_N "(cached) $ECHO_C" >&6
6200else
6201 cat >conftest.$ac_ext <<_ACEOF
6202#line $LINENO "configure"
6203#include "confdefs.h"
6204$ac_includes_default
6205#ifdef F77_DUMMY_MAIN
6206# ifdef __cplusplus
6207 extern "C"
6208# endif
6209 int F77_DUMMY_MAIN() { return 1; }
6210#endif
6211int
6212main ()
6213{
6214if ((char *) 0)
6215 return 0;
6216if (sizeof (char))
6217 return 0;
6218 ;
6219 return 0;
6220}
6221_ACEOF
6222rm -f conftest.$ac_objext
6223if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6224 (eval $ac_compile) 2>&5
6225 ac_status=$?
6226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6227 (exit $ac_status); } &&
6228 { ac_try='test -s conftest.$ac_objext'
6229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6230 (eval $ac_try) 2>&5
6231 ac_status=$?
6232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6233 (exit $ac_status); }; }; then
6234 ac_cv_type_char=yes
6235else
6236 echo "$as_me: failed program was:" >&5
6237cat conftest.$ac_ext >&5
6238ac_cv_type_char=no
6239fi
6240rm -f conftest.$ac_objext conftest.$ac_ext
6241fi
6242echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
6243echo "${ECHO_T}$ac_cv_type_char" >&6
6244
6245echo "$as_me:$LINENO: checking size of char" >&5
6246echo $ECHO_N "checking size of char... $ECHO_C" >&6
6247if test "${ac_cv_sizeof_char+set}" = set; then
6248 echo $ECHO_N "(cached) $ECHO_C" >&6
6249else
6250 if test "$ac_cv_type_char" = yes; then
6251 # The cast to unsigned long works around a bug in the HP C Compiler
6252 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6253 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6254 # This bug is HP SR number 8606223364.
6255 if test "$cross_compiling" = yes; then
6256 # Depending upon the size, compute the lo and hi bounds.
6257cat >conftest.$ac_ext <<_ACEOF
6258#line $LINENO "configure"
6259#include "confdefs.h"
6260$ac_includes_default
6261#ifdef F77_DUMMY_MAIN
6262# ifdef __cplusplus
6263 extern "C"
6264# endif
6265 int F77_DUMMY_MAIN() { return 1; }
6266#endif
6267int
6268main ()
6269{
6270static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
6271test_array [0] = 0
6272
6273 ;
6274 return 0;
6275}
6276_ACEOF
6277rm -f conftest.$ac_objext
6278if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6279 (eval $ac_compile) 2>&5
6280 ac_status=$?
6281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6282 (exit $ac_status); } &&
6283 { ac_try='test -s conftest.$ac_objext'
6284 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6285 (eval $ac_try) 2>&5
6286 ac_status=$?
6287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6288 (exit $ac_status); }; }; then
6289 ac_lo=0 ac_mid=0
6290 while :; do
6291 cat >conftest.$ac_ext <<_ACEOF
6292#line $LINENO "configure"
6293#include "confdefs.h"
6294$ac_includes_default
6295#ifdef F77_DUMMY_MAIN
6296# ifdef __cplusplus
6297 extern "C"
6298# endif
6299 int F77_DUMMY_MAIN() { return 1; }
6300#endif
6301int
6302main ()
6303{
6304static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6305test_array [0] = 0
6306
6307 ;
6308 return 0;
6309}
6310_ACEOF
6311rm -f conftest.$ac_objext
6312if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6313 (eval $ac_compile) 2>&5
6314 ac_status=$?
6315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6316 (exit $ac_status); } &&
6317 { ac_try='test -s conftest.$ac_objext'
6318 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6319 (eval $ac_try) 2>&5
6320 ac_status=$?
6321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6322 (exit $ac_status); }; }; then
6323 ac_hi=$ac_mid; break
6324else
6325 echo "$as_me: failed program was:" >&5
6326cat conftest.$ac_ext >&5
6327ac_lo=`expr $ac_mid + 1`
6328 if test $ac_lo -le $ac_mid; then
6329 ac_lo= ac_hi=
6330 break
6331 fi
6332 ac_mid=`expr 2 '*' $ac_mid + 1`
6333fi
6334rm -f conftest.$ac_objext conftest.$ac_ext
6335 done
6336else
6337 echo "$as_me: failed program was:" >&5
6338cat conftest.$ac_ext >&5
6339cat >conftest.$ac_ext <<_ACEOF
6340#line $LINENO "configure"
6341#include "confdefs.h"
6342$ac_includes_default
6343#ifdef F77_DUMMY_MAIN
6344# ifdef __cplusplus
6345 extern "C"
6346# endif
6347 int F77_DUMMY_MAIN() { return 1; }
6348#endif
6349int
6350main ()
6351{
6352static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
6353test_array [0] = 0
6354
6355 ;
6356 return 0;
6357}
6358_ACEOF
6359rm -f conftest.$ac_objext
6360if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6361 (eval $ac_compile) 2>&5
6362 ac_status=$?
6363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6364 (exit $ac_status); } &&
6365 { ac_try='test -s conftest.$ac_objext'
6366 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6367 (eval $ac_try) 2>&5
6368 ac_status=$?
6369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6370 (exit $ac_status); }; }; then
6371 ac_hi=-1 ac_mid=-1
6372 while :; do
6373 cat >conftest.$ac_ext <<_ACEOF
6374#line $LINENO "configure"
6375#include "confdefs.h"
6376$ac_includes_default
6377#ifdef F77_DUMMY_MAIN
6378# ifdef __cplusplus
6379 extern "C"
6380# endif
6381 int F77_DUMMY_MAIN() { return 1; }
6382#endif
6383int
6384main ()
6385{
6386static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
6387test_array [0] = 0
6388
6389 ;
6390 return 0;
6391}
6392_ACEOF
6393rm -f conftest.$ac_objext
6394if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6395 (eval $ac_compile) 2>&5
6396 ac_status=$?
6397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6398 (exit $ac_status); } &&
6399 { ac_try='test -s conftest.$ac_objext'
6400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6401 (eval $ac_try) 2>&5
6402 ac_status=$?
6403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6404 (exit $ac_status); }; }; then
6405 ac_lo=$ac_mid; break
6406else
6407 echo "$as_me: failed program was:" >&5
6408cat conftest.$ac_ext >&5
6409ac_hi=`expr '(' $ac_mid ')' - 1`
6410 if test $ac_mid -le $ac_hi; then
6411 ac_lo= ac_hi=
6412 break
6413 fi
6414 ac_mid=`expr 2 '*' $ac_mid`
6415fi
6416rm -f conftest.$ac_objext conftest.$ac_ext
6417 done
6418else
6419 echo "$as_me: failed program was:" >&5
6420cat conftest.$ac_ext >&5
6421ac_lo= ac_hi=
6422fi
6423rm -f conftest.$ac_objext conftest.$ac_ext
6424fi
6425rm -f conftest.$ac_objext conftest.$ac_ext
6426# Binary search between lo and hi bounds.
6427while test "x$ac_lo" != "x$ac_hi"; do
6428 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6429 cat >conftest.$ac_ext <<_ACEOF
6430#line $LINENO "configure"
6431#include "confdefs.h"
6432$ac_includes_default
6433#ifdef F77_DUMMY_MAIN
6434# ifdef __cplusplus
6435 extern "C"
6436# endif
6437 int F77_DUMMY_MAIN() { return 1; }
6438#endif
6439int
6440main ()
6441{
6442static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6443test_array [0] = 0
6444
6445 ;
6446 return 0;
6447}
6448_ACEOF
6449rm -f conftest.$ac_objext
6450if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6451 (eval $ac_compile) 2>&5
6452 ac_status=$?
6453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6454 (exit $ac_status); } &&
6455 { ac_try='test -s conftest.$ac_objext'
6456 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6457 (eval $ac_try) 2>&5
6458 ac_status=$?
6459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6460 (exit $ac_status); }; }; then
6461 ac_hi=$ac_mid
6462else
6463 echo "$as_me: failed program was:" >&5
6464cat conftest.$ac_ext >&5
6465ac_lo=`expr '(' $ac_mid ')' + 1`
6466fi
6467rm -f conftest.$ac_objext conftest.$ac_ext
6468done
6469case $ac_lo in
6470?*) ac_cv_sizeof_char=$ac_lo;;
6471'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6472echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6473 { (exit 1); exit 1; }; } ;;
6474esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006475else
6476 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006477 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6478echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6479 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006480else
Martin v. Löwis11437992002-04-12 09:54:03 +00006481 cat >conftest.$ac_ext <<_ACEOF
6482#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006483#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006484$ac_includes_default
6485long longval () { return (long) (sizeof (char)); }
6486unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006487#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006488#include <stdlib.h>
6489#ifdef F77_DUMMY_MAIN
6490# ifdef __cplusplus
6491 extern "C"
6492# endif
6493 int F77_DUMMY_MAIN() { return 1; }
6494#endif
6495int
6496main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006497{
Martin v. Löwis11437992002-04-12 09:54:03 +00006498
6499 FILE *f = fopen ("conftest.val", "w");
6500 if (! f)
6501 exit (1);
6502 if (((long) (sizeof (char))) < 0)
6503 {
6504 long i = longval ();
6505 if (i != ((long) (sizeof (char))))
6506 exit (1);
6507 fprintf (f, "%ld\n", i);
6508 }
6509 else
6510 {
6511 unsigned long i = ulongval ();
6512 if (i != ((long) (sizeof (char))))
6513 exit (1);
6514 fprintf (f, "%lu\n", i);
6515 }
6516 exit (ferror (f) || fclose (f) != 0);
6517
6518 ;
6519 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006520}
Martin v. Löwis11437992002-04-12 09:54:03 +00006521_ACEOF
6522rm -f conftest$ac_exeext
6523if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6524 (eval $ac_link) 2>&5
6525 ac_status=$?
6526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6527 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6528 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6529 (eval $ac_try) 2>&5
6530 ac_status=$?
6531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6532 (exit $ac_status); }; }; then
6533 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006534else
Martin v. Löwis11437992002-04-12 09:54:03 +00006535 echo "$as_me: program exited with status $ac_status" >&5
6536echo "$as_me: failed program was:" >&5
6537cat conftest.$ac_ext >&5
6538( exit $ac_status )
6539{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6540echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6541 { (exit 1); exit 1; }; }
6542fi
6543rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6544fi
6545fi
6546rm -f conftest.val
6547else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006548 ac_cv_sizeof_char=0
6549fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006550fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006551echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6552echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6553cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006554#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006555_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006556
6557
Martin v. Löwis11437992002-04-12 09:54:03 +00006558echo "$as_me:$LINENO: checking for short" >&5
6559echo $ECHO_N "checking for short... $ECHO_C" >&6
6560if test "${ac_cv_type_short+set}" = set; then
6561 echo $ECHO_N "(cached) $ECHO_C" >&6
6562else
6563 cat >conftest.$ac_ext <<_ACEOF
6564#line $LINENO "configure"
6565#include "confdefs.h"
6566$ac_includes_default
6567#ifdef F77_DUMMY_MAIN
6568# ifdef __cplusplus
6569 extern "C"
6570# endif
6571 int F77_DUMMY_MAIN() { return 1; }
6572#endif
6573int
6574main ()
6575{
6576if ((short *) 0)
6577 return 0;
6578if (sizeof (short))
6579 return 0;
6580 ;
6581 return 0;
6582}
6583_ACEOF
6584rm -f conftest.$ac_objext
6585if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6586 (eval $ac_compile) 2>&5
6587 ac_status=$?
6588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6589 (exit $ac_status); } &&
6590 { ac_try='test -s conftest.$ac_objext'
6591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6592 (eval $ac_try) 2>&5
6593 ac_status=$?
6594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6595 (exit $ac_status); }; }; then
6596 ac_cv_type_short=yes
6597else
6598 echo "$as_me: failed program was:" >&5
6599cat conftest.$ac_ext >&5
6600ac_cv_type_short=no
6601fi
6602rm -f conftest.$ac_objext conftest.$ac_ext
6603fi
6604echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6605echo "${ECHO_T}$ac_cv_type_short" >&6
6606
6607echo "$as_me:$LINENO: checking size of short" >&5
6608echo $ECHO_N "checking size of short... $ECHO_C" >&6
6609if test "${ac_cv_sizeof_short+set}" = set; then
6610 echo $ECHO_N "(cached) $ECHO_C" >&6
6611else
6612 if test "$ac_cv_type_short" = yes; then
6613 # The cast to unsigned long works around a bug in the HP C Compiler
6614 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6615 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6616 # This bug is HP SR number 8606223364.
6617 if test "$cross_compiling" = yes; then
6618 # Depending upon the size, compute the lo and hi bounds.
6619cat >conftest.$ac_ext <<_ACEOF
6620#line $LINENO "configure"
6621#include "confdefs.h"
6622$ac_includes_default
6623#ifdef F77_DUMMY_MAIN
6624# ifdef __cplusplus
6625 extern "C"
6626# endif
6627 int F77_DUMMY_MAIN() { return 1; }
6628#endif
6629int
6630main ()
6631{
6632static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6633test_array [0] = 0
6634
6635 ;
6636 return 0;
6637}
6638_ACEOF
6639rm -f conftest.$ac_objext
6640if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6641 (eval $ac_compile) 2>&5
6642 ac_status=$?
6643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6644 (exit $ac_status); } &&
6645 { ac_try='test -s conftest.$ac_objext'
6646 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6647 (eval $ac_try) 2>&5
6648 ac_status=$?
6649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6650 (exit $ac_status); }; }; then
6651 ac_lo=0 ac_mid=0
6652 while :; do
6653 cat >conftest.$ac_ext <<_ACEOF
6654#line $LINENO "configure"
6655#include "confdefs.h"
6656$ac_includes_default
6657#ifdef F77_DUMMY_MAIN
6658# ifdef __cplusplus
6659 extern "C"
6660# endif
6661 int F77_DUMMY_MAIN() { return 1; }
6662#endif
6663int
6664main ()
6665{
6666static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6667test_array [0] = 0
6668
6669 ;
6670 return 0;
6671}
6672_ACEOF
6673rm -f conftest.$ac_objext
6674if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6675 (eval $ac_compile) 2>&5
6676 ac_status=$?
6677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6678 (exit $ac_status); } &&
6679 { ac_try='test -s conftest.$ac_objext'
6680 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6681 (eval $ac_try) 2>&5
6682 ac_status=$?
6683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6684 (exit $ac_status); }; }; then
6685 ac_hi=$ac_mid; break
6686else
6687 echo "$as_me: failed program was:" >&5
6688cat conftest.$ac_ext >&5
6689ac_lo=`expr $ac_mid + 1`
6690 if test $ac_lo -le $ac_mid; then
6691 ac_lo= ac_hi=
6692 break
6693 fi
6694 ac_mid=`expr 2 '*' $ac_mid + 1`
6695fi
6696rm -f conftest.$ac_objext conftest.$ac_ext
6697 done
6698else
6699 echo "$as_me: failed program was:" >&5
6700cat conftest.$ac_ext >&5
6701cat >conftest.$ac_ext <<_ACEOF
6702#line $LINENO "configure"
6703#include "confdefs.h"
6704$ac_includes_default
6705#ifdef F77_DUMMY_MAIN
6706# ifdef __cplusplus
6707 extern "C"
6708# endif
6709 int F77_DUMMY_MAIN() { return 1; }
6710#endif
6711int
6712main ()
6713{
6714static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6715test_array [0] = 0
6716
6717 ;
6718 return 0;
6719}
6720_ACEOF
6721rm -f conftest.$ac_objext
6722if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6723 (eval $ac_compile) 2>&5
6724 ac_status=$?
6725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6726 (exit $ac_status); } &&
6727 { ac_try='test -s conftest.$ac_objext'
6728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6729 (eval $ac_try) 2>&5
6730 ac_status=$?
6731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6732 (exit $ac_status); }; }; then
6733 ac_hi=-1 ac_mid=-1
6734 while :; do
6735 cat >conftest.$ac_ext <<_ACEOF
6736#line $LINENO "configure"
6737#include "confdefs.h"
6738$ac_includes_default
6739#ifdef F77_DUMMY_MAIN
6740# ifdef __cplusplus
6741 extern "C"
6742# endif
6743 int F77_DUMMY_MAIN() { return 1; }
6744#endif
6745int
6746main ()
6747{
6748static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6749test_array [0] = 0
6750
6751 ;
6752 return 0;
6753}
6754_ACEOF
6755rm -f conftest.$ac_objext
6756if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6757 (eval $ac_compile) 2>&5
6758 ac_status=$?
6759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6760 (exit $ac_status); } &&
6761 { ac_try='test -s conftest.$ac_objext'
6762 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6763 (eval $ac_try) 2>&5
6764 ac_status=$?
6765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6766 (exit $ac_status); }; }; then
6767 ac_lo=$ac_mid; break
6768else
6769 echo "$as_me: failed program was:" >&5
6770cat conftest.$ac_ext >&5
6771ac_hi=`expr '(' $ac_mid ')' - 1`
6772 if test $ac_mid -le $ac_hi; then
6773 ac_lo= ac_hi=
6774 break
6775 fi
6776 ac_mid=`expr 2 '*' $ac_mid`
6777fi
6778rm -f conftest.$ac_objext conftest.$ac_ext
6779 done
6780else
6781 echo "$as_me: failed program was:" >&5
6782cat conftest.$ac_ext >&5
6783ac_lo= ac_hi=
6784fi
6785rm -f conftest.$ac_objext conftest.$ac_ext
6786fi
6787rm -f conftest.$ac_objext conftest.$ac_ext
6788# Binary search between lo and hi bounds.
6789while test "x$ac_lo" != "x$ac_hi"; do
6790 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6791 cat >conftest.$ac_ext <<_ACEOF
6792#line $LINENO "configure"
6793#include "confdefs.h"
6794$ac_includes_default
6795#ifdef F77_DUMMY_MAIN
6796# ifdef __cplusplus
6797 extern "C"
6798# endif
6799 int F77_DUMMY_MAIN() { return 1; }
6800#endif
6801int
6802main ()
6803{
6804static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6805test_array [0] = 0
6806
6807 ;
6808 return 0;
6809}
6810_ACEOF
6811rm -f conftest.$ac_objext
6812if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6813 (eval $ac_compile) 2>&5
6814 ac_status=$?
6815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6816 (exit $ac_status); } &&
6817 { ac_try='test -s conftest.$ac_objext'
6818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6819 (eval $ac_try) 2>&5
6820 ac_status=$?
6821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6822 (exit $ac_status); }; }; then
6823 ac_hi=$ac_mid
6824else
6825 echo "$as_me: failed program was:" >&5
6826cat conftest.$ac_ext >&5
6827ac_lo=`expr '(' $ac_mid ')' + 1`
6828fi
6829rm -f conftest.$ac_objext conftest.$ac_ext
6830done
6831case $ac_lo in
6832?*) ac_cv_sizeof_short=$ac_lo;;
6833'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6834echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6835 { (exit 1); exit 1; }; } ;;
6836esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006837else
6838 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006839 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6840echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6841 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006842else
Martin v. Löwis11437992002-04-12 09:54:03 +00006843 cat >conftest.$ac_ext <<_ACEOF
6844#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006845#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006846$ac_includes_default
6847long longval () { return (long) (sizeof (short)); }
6848unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006849#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006850#include <stdlib.h>
6851#ifdef F77_DUMMY_MAIN
6852# ifdef __cplusplus
6853 extern "C"
6854# endif
6855 int F77_DUMMY_MAIN() { return 1; }
6856#endif
6857int
6858main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006859{
Martin v. Löwis11437992002-04-12 09:54:03 +00006860
6861 FILE *f = fopen ("conftest.val", "w");
6862 if (! f)
6863 exit (1);
6864 if (((long) (sizeof (short))) < 0)
6865 {
6866 long i = longval ();
6867 if (i != ((long) (sizeof (short))))
6868 exit (1);
6869 fprintf (f, "%ld\n", i);
6870 }
6871 else
6872 {
6873 unsigned long i = ulongval ();
6874 if (i != ((long) (sizeof (short))))
6875 exit (1);
6876 fprintf (f, "%lu\n", i);
6877 }
6878 exit (ferror (f) || fclose (f) != 0);
6879
6880 ;
6881 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006882}
Martin v. Löwis11437992002-04-12 09:54:03 +00006883_ACEOF
6884rm -f conftest$ac_exeext
6885if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6886 (eval $ac_link) 2>&5
6887 ac_status=$?
6888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6889 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6891 (eval $ac_try) 2>&5
6892 ac_status=$?
6893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6894 (exit $ac_status); }; }; then
6895 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006896else
Martin v. Löwis11437992002-04-12 09:54:03 +00006897 echo "$as_me: program exited with status $ac_status" >&5
6898echo "$as_me: failed program was:" >&5
6899cat conftest.$ac_ext >&5
6900( exit $ac_status )
6901{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6902echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6903 { (exit 1); exit 1; }; }
6904fi
6905rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6906fi
6907fi
6908rm -f conftest.val
6909else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006910 ac_cv_sizeof_short=0
6911fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006912fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006913echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
6914echo "${ECHO_T}$ac_cv_sizeof_short" >&6
6915cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006916#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006917_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006918
6919
Martin v. Löwis11437992002-04-12 09:54:03 +00006920echo "$as_me:$LINENO: checking for float" >&5
6921echo $ECHO_N "checking for float... $ECHO_C" >&6
6922if test "${ac_cv_type_float+set}" = set; then
6923 echo $ECHO_N "(cached) $ECHO_C" >&6
6924else
6925 cat >conftest.$ac_ext <<_ACEOF
6926#line $LINENO "configure"
6927#include "confdefs.h"
6928$ac_includes_default
6929#ifdef F77_DUMMY_MAIN
6930# ifdef __cplusplus
6931 extern "C"
6932# endif
6933 int F77_DUMMY_MAIN() { return 1; }
6934#endif
6935int
6936main ()
6937{
6938if ((float *) 0)
6939 return 0;
6940if (sizeof (float))
6941 return 0;
6942 ;
6943 return 0;
6944}
6945_ACEOF
6946rm -f conftest.$ac_objext
6947if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6948 (eval $ac_compile) 2>&5
6949 ac_status=$?
6950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6951 (exit $ac_status); } &&
6952 { ac_try='test -s conftest.$ac_objext'
6953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6954 (eval $ac_try) 2>&5
6955 ac_status=$?
6956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6957 (exit $ac_status); }; }; then
6958 ac_cv_type_float=yes
6959else
6960 echo "$as_me: failed program was:" >&5
6961cat conftest.$ac_ext >&5
6962ac_cv_type_float=no
6963fi
6964rm -f conftest.$ac_objext conftest.$ac_ext
6965fi
6966echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
6967echo "${ECHO_T}$ac_cv_type_float" >&6
6968
6969echo "$as_me:$LINENO: checking size of float" >&5
6970echo $ECHO_N "checking size of float... $ECHO_C" >&6
6971if test "${ac_cv_sizeof_float+set}" = set; then
6972 echo $ECHO_N "(cached) $ECHO_C" >&6
6973else
6974 if test "$ac_cv_type_float" = yes; then
6975 # The cast to unsigned long works around a bug in the HP C Compiler
6976 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6977 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6978 # This bug is HP SR number 8606223364.
6979 if test "$cross_compiling" = yes; then
6980 # Depending upon the size, compute the lo and hi bounds.
6981cat >conftest.$ac_ext <<_ACEOF
6982#line $LINENO "configure"
6983#include "confdefs.h"
6984$ac_includes_default
6985#ifdef F77_DUMMY_MAIN
6986# ifdef __cplusplus
6987 extern "C"
6988# endif
6989 int F77_DUMMY_MAIN() { return 1; }
6990#endif
6991int
6992main ()
6993{
6994static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
6995test_array [0] = 0
6996
6997 ;
6998 return 0;
6999}
7000_ACEOF
7001rm -f conftest.$ac_objext
7002if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7003 (eval $ac_compile) 2>&5
7004 ac_status=$?
7005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7006 (exit $ac_status); } &&
7007 { ac_try='test -s conftest.$ac_objext'
7008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7009 (eval $ac_try) 2>&5
7010 ac_status=$?
7011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7012 (exit $ac_status); }; }; then
7013 ac_lo=0 ac_mid=0
7014 while :; do
7015 cat >conftest.$ac_ext <<_ACEOF
7016#line $LINENO "configure"
7017#include "confdefs.h"
7018$ac_includes_default
7019#ifdef F77_DUMMY_MAIN
7020# ifdef __cplusplus
7021 extern "C"
7022# endif
7023 int F77_DUMMY_MAIN() { return 1; }
7024#endif
7025int
7026main ()
7027{
7028static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7029test_array [0] = 0
7030
7031 ;
7032 return 0;
7033}
7034_ACEOF
7035rm -f conftest.$ac_objext
7036if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7037 (eval $ac_compile) 2>&5
7038 ac_status=$?
7039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7040 (exit $ac_status); } &&
7041 { ac_try='test -s conftest.$ac_objext'
7042 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7043 (eval $ac_try) 2>&5
7044 ac_status=$?
7045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7046 (exit $ac_status); }; }; then
7047 ac_hi=$ac_mid; break
7048else
7049 echo "$as_me: failed program was:" >&5
7050cat conftest.$ac_ext >&5
7051ac_lo=`expr $ac_mid + 1`
7052 if test $ac_lo -le $ac_mid; then
7053 ac_lo= ac_hi=
7054 break
7055 fi
7056 ac_mid=`expr 2 '*' $ac_mid + 1`
7057fi
7058rm -f conftest.$ac_objext conftest.$ac_ext
7059 done
7060else
7061 echo "$as_me: failed program was:" >&5
7062cat conftest.$ac_ext >&5
7063cat >conftest.$ac_ext <<_ACEOF
7064#line $LINENO "configure"
7065#include "confdefs.h"
7066$ac_includes_default
7067#ifdef F77_DUMMY_MAIN
7068# ifdef __cplusplus
7069 extern "C"
7070# endif
7071 int F77_DUMMY_MAIN() { return 1; }
7072#endif
7073int
7074main ()
7075{
7076static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7077test_array [0] = 0
7078
7079 ;
7080 return 0;
7081}
7082_ACEOF
7083rm -f conftest.$ac_objext
7084if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7085 (eval $ac_compile) 2>&5
7086 ac_status=$?
7087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7088 (exit $ac_status); } &&
7089 { ac_try='test -s conftest.$ac_objext'
7090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7091 (eval $ac_try) 2>&5
7092 ac_status=$?
7093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7094 (exit $ac_status); }; }; then
7095 ac_hi=-1 ac_mid=-1
7096 while :; do
7097 cat >conftest.$ac_ext <<_ACEOF
7098#line $LINENO "configure"
7099#include "confdefs.h"
7100$ac_includes_default
7101#ifdef F77_DUMMY_MAIN
7102# ifdef __cplusplus
7103 extern "C"
7104# endif
7105 int F77_DUMMY_MAIN() { return 1; }
7106#endif
7107int
7108main ()
7109{
7110static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7111test_array [0] = 0
7112
7113 ;
7114 return 0;
7115}
7116_ACEOF
7117rm -f conftest.$ac_objext
7118if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7119 (eval $ac_compile) 2>&5
7120 ac_status=$?
7121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7122 (exit $ac_status); } &&
7123 { ac_try='test -s conftest.$ac_objext'
7124 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7125 (eval $ac_try) 2>&5
7126 ac_status=$?
7127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7128 (exit $ac_status); }; }; then
7129 ac_lo=$ac_mid; break
7130else
7131 echo "$as_me: failed program was:" >&5
7132cat conftest.$ac_ext >&5
7133ac_hi=`expr '(' $ac_mid ')' - 1`
7134 if test $ac_mid -le $ac_hi; then
7135 ac_lo= ac_hi=
7136 break
7137 fi
7138 ac_mid=`expr 2 '*' $ac_mid`
7139fi
7140rm -f conftest.$ac_objext conftest.$ac_ext
7141 done
7142else
7143 echo "$as_me: failed program was:" >&5
7144cat conftest.$ac_ext >&5
7145ac_lo= ac_hi=
7146fi
7147rm -f conftest.$ac_objext conftest.$ac_ext
7148fi
7149rm -f conftest.$ac_objext conftest.$ac_ext
7150# Binary search between lo and hi bounds.
7151while test "x$ac_lo" != "x$ac_hi"; do
7152 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7153 cat >conftest.$ac_ext <<_ACEOF
7154#line $LINENO "configure"
7155#include "confdefs.h"
7156$ac_includes_default
7157#ifdef F77_DUMMY_MAIN
7158# ifdef __cplusplus
7159 extern "C"
7160# endif
7161 int F77_DUMMY_MAIN() { return 1; }
7162#endif
7163int
7164main ()
7165{
7166static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7167test_array [0] = 0
7168
7169 ;
7170 return 0;
7171}
7172_ACEOF
7173rm -f conftest.$ac_objext
7174if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7175 (eval $ac_compile) 2>&5
7176 ac_status=$?
7177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7178 (exit $ac_status); } &&
7179 { ac_try='test -s conftest.$ac_objext'
7180 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7181 (eval $ac_try) 2>&5
7182 ac_status=$?
7183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7184 (exit $ac_status); }; }; then
7185 ac_hi=$ac_mid
7186else
7187 echo "$as_me: failed program was:" >&5
7188cat conftest.$ac_ext >&5
7189ac_lo=`expr '(' $ac_mid ')' + 1`
7190fi
7191rm -f conftest.$ac_objext conftest.$ac_ext
7192done
7193case $ac_lo in
7194?*) ac_cv_sizeof_float=$ac_lo;;
7195'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7196echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7197 { (exit 1); exit 1; }; } ;;
7198esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007199else
7200 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007201 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7202echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7203 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007204else
Martin v. Löwis11437992002-04-12 09:54:03 +00007205 cat >conftest.$ac_ext <<_ACEOF
7206#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007207#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007208$ac_includes_default
7209long longval () { return (long) (sizeof (float)); }
7210unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007211#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007212#include <stdlib.h>
7213#ifdef F77_DUMMY_MAIN
7214# ifdef __cplusplus
7215 extern "C"
7216# endif
7217 int F77_DUMMY_MAIN() { return 1; }
7218#endif
7219int
7220main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007221{
Martin v. Löwis11437992002-04-12 09:54:03 +00007222
7223 FILE *f = fopen ("conftest.val", "w");
7224 if (! f)
7225 exit (1);
7226 if (((long) (sizeof (float))) < 0)
7227 {
7228 long i = longval ();
7229 if (i != ((long) (sizeof (float))))
7230 exit (1);
7231 fprintf (f, "%ld\n", i);
7232 }
7233 else
7234 {
7235 unsigned long i = ulongval ();
7236 if (i != ((long) (sizeof (float))))
7237 exit (1);
7238 fprintf (f, "%lu\n", i);
7239 }
7240 exit (ferror (f) || fclose (f) != 0);
7241
7242 ;
7243 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007244}
Martin v. Löwis11437992002-04-12 09:54:03 +00007245_ACEOF
7246rm -f conftest$ac_exeext
7247if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7248 (eval $ac_link) 2>&5
7249 ac_status=$?
7250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7251 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7253 (eval $ac_try) 2>&5
7254 ac_status=$?
7255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7256 (exit $ac_status); }; }; then
7257 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007258else
Martin v. Löwis11437992002-04-12 09:54:03 +00007259 echo "$as_me: program exited with status $ac_status" >&5
7260echo "$as_me: failed program was:" >&5
7261cat conftest.$ac_ext >&5
7262( exit $ac_status )
7263{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7264echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7265 { (exit 1); exit 1; }; }
7266fi
7267rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7268fi
7269fi
7270rm -f conftest.val
7271else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007272 ac_cv_sizeof_float=0
7273fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007274fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007275echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7276echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7277cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007278#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007279_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007280
7281
Martin v. Löwis11437992002-04-12 09:54:03 +00007282echo "$as_me:$LINENO: checking for double" >&5
7283echo $ECHO_N "checking for double... $ECHO_C" >&6
7284if test "${ac_cv_type_double+set}" = set; then
7285 echo $ECHO_N "(cached) $ECHO_C" >&6
7286else
7287 cat >conftest.$ac_ext <<_ACEOF
7288#line $LINENO "configure"
7289#include "confdefs.h"
7290$ac_includes_default
7291#ifdef F77_DUMMY_MAIN
7292# ifdef __cplusplus
7293 extern "C"
7294# endif
7295 int F77_DUMMY_MAIN() { return 1; }
7296#endif
7297int
7298main ()
7299{
7300if ((double *) 0)
7301 return 0;
7302if (sizeof (double))
7303 return 0;
7304 ;
7305 return 0;
7306}
7307_ACEOF
7308rm -f conftest.$ac_objext
7309if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7310 (eval $ac_compile) 2>&5
7311 ac_status=$?
7312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7313 (exit $ac_status); } &&
7314 { ac_try='test -s conftest.$ac_objext'
7315 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7316 (eval $ac_try) 2>&5
7317 ac_status=$?
7318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7319 (exit $ac_status); }; }; then
7320 ac_cv_type_double=yes
7321else
7322 echo "$as_me: failed program was:" >&5
7323cat conftest.$ac_ext >&5
7324ac_cv_type_double=no
7325fi
7326rm -f conftest.$ac_objext conftest.$ac_ext
7327fi
7328echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7329echo "${ECHO_T}$ac_cv_type_double" >&6
7330
7331echo "$as_me:$LINENO: checking size of double" >&5
7332echo $ECHO_N "checking size of double... $ECHO_C" >&6
7333if test "${ac_cv_sizeof_double+set}" = set; then
7334 echo $ECHO_N "(cached) $ECHO_C" >&6
7335else
7336 if test "$ac_cv_type_double" = yes; then
7337 # The cast to unsigned long works around a bug in the HP C Compiler
7338 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7339 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7340 # This bug is HP SR number 8606223364.
7341 if test "$cross_compiling" = yes; then
7342 # Depending upon the size, compute the lo and hi bounds.
7343cat >conftest.$ac_ext <<_ACEOF
7344#line $LINENO "configure"
7345#include "confdefs.h"
7346$ac_includes_default
7347#ifdef F77_DUMMY_MAIN
7348# ifdef __cplusplus
7349 extern "C"
7350# endif
7351 int F77_DUMMY_MAIN() { return 1; }
7352#endif
7353int
7354main ()
7355{
7356static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7357test_array [0] = 0
7358
7359 ;
7360 return 0;
7361}
7362_ACEOF
7363rm -f conftest.$ac_objext
7364if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7365 (eval $ac_compile) 2>&5
7366 ac_status=$?
7367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7368 (exit $ac_status); } &&
7369 { ac_try='test -s conftest.$ac_objext'
7370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7371 (eval $ac_try) 2>&5
7372 ac_status=$?
7373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7374 (exit $ac_status); }; }; then
7375 ac_lo=0 ac_mid=0
7376 while :; do
7377 cat >conftest.$ac_ext <<_ACEOF
7378#line $LINENO "configure"
7379#include "confdefs.h"
7380$ac_includes_default
7381#ifdef F77_DUMMY_MAIN
7382# ifdef __cplusplus
7383 extern "C"
7384# endif
7385 int F77_DUMMY_MAIN() { return 1; }
7386#endif
7387int
7388main ()
7389{
7390static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7391test_array [0] = 0
7392
7393 ;
7394 return 0;
7395}
7396_ACEOF
7397rm -f conftest.$ac_objext
7398if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7399 (eval $ac_compile) 2>&5
7400 ac_status=$?
7401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7402 (exit $ac_status); } &&
7403 { ac_try='test -s conftest.$ac_objext'
7404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7405 (eval $ac_try) 2>&5
7406 ac_status=$?
7407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7408 (exit $ac_status); }; }; then
7409 ac_hi=$ac_mid; break
7410else
7411 echo "$as_me: failed program was:" >&5
7412cat conftest.$ac_ext >&5
7413ac_lo=`expr $ac_mid + 1`
7414 if test $ac_lo -le $ac_mid; then
7415 ac_lo= ac_hi=
7416 break
7417 fi
7418 ac_mid=`expr 2 '*' $ac_mid + 1`
7419fi
7420rm -f conftest.$ac_objext conftest.$ac_ext
7421 done
7422else
7423 echo "$as_me: failed program was:" >&5
7424cat conftest.$ac_ext >&5
7425cat >conftest.$ac_ext <<_ACEOF
7426#line $LINENO "configure"
7427#include "confdefs.h"
7428$ac_includes_default
7429#ifdef F77_DUMMY_MAIN
7430# ifdef __cplusplus
7431 extern "C"
7432# endif
7433 int F77_DUMMY_MAIN() { return 1; }
7434#endif
7435int
7436main ()
7437{
7438static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7439test_array [0] = 0
7440
7441 ;
7442 return 0;
7443}
7444_ACEOF
7445rm -f conftest.$ac_objext
7446if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7447 (eval $ac_compile) 2>&5
7448 ac_status=$?
7449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7450 (exit $ac_status); } &&
7451 { ac_try='test -s conftest.$ac_objext'
7452 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7453 (eval $ac_try) 2>&5
7454 ac_status=$?
7455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7456 (exit $ac_status); }; }; then
7457 ac_hi=-1 ac_mid=-1
7458 while :; do
7459 cat >conftest.$ac_ext <<_ACEOF
7460#line $LINENO "configure"
7461#include "confdefs.h"
7462$ac_includes_default
7463#ifdef F77_DUMMY_MAIN
7464# ifdef __cplusplus
7465 extern "C"
7466# endif
7467 int F77_DUMMY_MAIN() { return 1; }
7468#endif
7469int
7470main ()
7471{
7472static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7473test_array [0] = 0
7474
7475 ;
7476 return 0;
7477}
7478_ACEOF
7479rm -f conftest.$ac_objext
7480if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7481 (eval $ac_compile) 2>&5
7482 ac_status=$?
7483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7484 (exit $ac_status); } &&
7485 { ac_try='test -s conftest.$ac_objext'
7486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7487 (eval $ac_try) 2>&5
7488 ac_status=$?
7489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7490 (exit $ac_status); }; }; then
7491 ac_lo=$ac_mid; break
7492else
7493 echo "$as_me: failed program was:" >&5
7494cat conftest.$ac_ext >&5
7495ac_hi=`expr '(' $ac_mid ')' - 1`
7496 if test $ac_mid -le $ac_hi; then
7497 ac_lo= ac_hi=
7498 break
7499 fi
7500 ac_mid=`expr 2 '*' $ac_mid`
7501fi
7502rm -f conftest.$ac_objext conftest.$ac_ext
7503 done
7504else
7505 echo "$as_me: failed program was:" >&5
7506cat conftest.$ac_ext >&5
7507ac_lo= ac_hi=
7508fi
7509rm -f conftest.$ac_objext conftest.$ac_ext
7510fi
7511rm -f conftest.$ac_objext conftest.$ac_ext
7512# Binary search between lo and hi bounds.
7513while test "x$ac_lo" != "x$ac_hi"; do
7514 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7515 cat >conftest.$ac_ext <<_ACEOF
7516#line $LINENO "configure"
7517#include "confdefs.h"
7518$ac_includes_default
7519#ifdef F77_DUMMY_MAIN
7520# ifdef __cplusplus
7521 extern "C"
7522# endif
7523 int F77_DUMMY_MAIN() { return 1; }
7524#endif
7525int
7526main ()
7527{
7528static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7529test_array [0] = 0
7530
7531 ;
7532 return 0;
7533}
7534_ACEOF
7535rm -f conftest.$ac_objext
7536if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7537 (eval $ac_compile) 2>&5
7538 ac_status=$?
7539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7540 (exit $ac_status); } &&
7541 { ac_try='test -s conftest.$ac_objext'
7542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7543 (eval $ac_try) 2>&5
7544 ac_status=$?
7545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7546 (exit $ac_status); }; }; then
7547 ac_hi=$ac_mid
7548else
7549 echo "$as_me: failed program was:" >&5
7550cat conftest.$ac_ext >&5
7551ac_lo=`expr '(' $ac_mid ')' + 1`
7552fi
7553rm -f conftest.$ac_objext conftest.$ac_ext
7554done
7555case $ac_lo in
7556?*) ac_cv_sizeof_double=$ac_lo;;
7557'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7558echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7559 { (exit 1); exit 1; }; } ;;
7560esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007561else
7562 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007563 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7564echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7565 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007566else
Martin v. Löwis11437992002-04-12 09:54:03 +00007567 cat >conftest.$ac_ext <<_ACEOF
7568#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007569#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007570$ac_includes_default
7571long longval () { return (long) (sizeof (double)); }
7572unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007573#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007574#include <stdlib.h>
7575#ifdef F77_DUMMY_MAIN
7576# ifdef __cplusplus
7577 extern "C"
7578# endif
7579 int F77_DUMMY_MAIN() { return 1; }
7580#endif
7581int
7582main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007583{
Martin v. Löwis11437992002-04-12 09:54:03 +00007584
7585 FILE *f = fopen ("conftest.val", "w");
7586 if (! f)
7587 exit (1);
7588 if (((long) (sizeof (double))) < 0)
7589 {
7590 long i = longval ();
7591 if (i != ((long) (sizeof (double))))
7592 exit (1);
7593 fprintf (f, "%ld\n", i);
7594 }
7595 else
7596 {
7597 unsigned long i = ulongval ();
7598 if (i != ((long) (sizeof (double))))
7599 exit (1);
7600 fprintf (f, "%lu\n", i);
7601 }
7602 exit (ferror (f) || fclose (f) != 0);
7603
7604 ;
7605 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007606}
Martin v. Löwis11437992002-04-12 09:54:03 +00007607_ACEOF
7608rm -f conftest$ac_exeext
7609if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7610 (eval $ac_link) 2>&5
7611 ac_status=$?
7612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7613 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7614 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7615 (eval $ac_try) 2>&5
7616 ac_status=$?
7617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7618 (exit $ac_status); }; }; then
7619 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007620else
Martin v. Löwis11437992002-04-12 09:54:03 +00007621 echo "$as_me: program exited with status $ac_status" >&5
7622echo "$as_me: failed program was:" >&5
7623cat conftest.$ac_ext >&5
7624( exit $ac_status )
7625{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7626echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7627 { (exit 1); exit 1; }; }
7628fi
7629rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7630fi
7631fi
7632rm -f conftest.val
7633else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007634 ac_cv_sizeof_double=0
7635fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007636fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007637echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7638echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7639cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007640#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007641_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007642
7643
Martin v. Löwis11437992002-04-12 09:54:03 +00007644echo "$as_me:$LINENO: checking for fpos_t" >&5
7645echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7646if test "${ac_cv_type_fpos_t+set}" = set; then
7647 echo $ECHO_N "(cached) $ECHO_C" >&6
7648else
7649 cat >conftest.$ac_ext <<_ACEOF
7650#line $LINENO "configure"
7651#include "confdefs.h"
7652$ac_includes_default
7653#ifdef F77_DUMMY_MAIN
7654# ifdef __cplusplus
7655 extern "C"
7656# endif
7657 int F77_DUMMY_MAIN() { return 1; }
7658#endif
7659int
7660main ()
7661{
7662if ((fpos_t *) 0)
7663 return 0;
7664if (sizeof (fpos_t))
7665 return 0;
7666 ;
7667 return 0;
7668}
7669_ACEOF
7670rm -f conftest.$ac_objext
7671if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7672 (eval $ac_compile) 2>&5
7673 ac_status=$?
7674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7675 (exit $ac_status); } &&
7676 { ac_try='test -s conftest.$ac_objext'
7677 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7678 (eval $ac_try) 2>&5
7679 ac_status=$?
7680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7681 (exit $ac_status); }; }; then
7682 ac_cv_type_fpos_t=yes
7683else
7684 echo "$as_me: failed program was:" >&5
7685cat conftest.$ac_ext >&5
7686ac_cv_type_fpos_t=no
7687fi
7688rm -f conftest.$ac_objext conftest.$ac_ext
7689fi
7690echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7691echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7692
7693echo "$as_me:$LINENO: checking size of fpos_t" >&5
7694echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7695if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7696 echo $ECHO_N "(cached) $ECHO_C" >&6
7697else
7698 if test "$ac_cv_type_fpos_t" = yes; then
7699 # The cast to unsigned long works around a bug in the HP C Compiler
7700 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7701 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7702 # This bug is HP SR number 8606223364.
7703 if test "$cross_compiling" = yes; then
7704 # Depending upon the size, compute the lo and hi bounds.
7705cat >conftest.$ac_ext <<_ACEOF
7706#line $LINENO "configure"
7707#include "confdefs.h"
7708$ac_includes_default
7709#ifdef F77_DUMMY_MAIN
7710# ifdef __cplusplus
7711 extern "C"
7712# endif
7713 int F77_DUMMY_MAIN() { return 1; }
7714#endif
7715int
7716main ()
7717{
7718static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7719test_array [0] = 0
7720
7721 ;
7722 return 0;
7723}
7724_ACEOF
7725rm -f conftest.$ac_objext
7726if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7727 (eval $ac_compile) 2>&5
7728 ac_status=$?
7729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7730 (exit $ac_status); } &&
7731 { ac_try='test -s conftest.$ac_objext'
7732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7733 (eval $ac_try) 2>&5
7734 ac_status=$?
7735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7736 (exit $ac_status); }; }; then
7737 ac_lo=0 ac_mid=0
7738 while :; do
7739 cat >conftest.$ac_ext <<_ACEOF
7740#line $LINENO "configure"
7741#include "confdefs.h"
7742$ac_includes_default
7743#ifdef F77_DUMMY_MAIN
7744# ifdef __cplusplus
7745 extern "C"
7746# endif
7747 int F77_DUMMY_MAIN() { return 1; }
7748#endif
7749int
7750main ()
7751{
7752static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7753test_array [0] = 0
7754
7755 ;
7756 return 0;
7757}
7758_ACEOF
7759rm -f conftest.$ac_objext
7760if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7761 (eval $ac_compile) 2>&5
7762 ac_status=$?
7763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7764 (exit $ac_status); } &&
7765 { ac_try='test -s conftest.$ac_objext'
7766 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7767 (eval $ac_try) 2>&5
7768 ac_status=$?
7769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7770 (exit $ac_status); }; }; then
7771 ac_hi=$ac_mid; break
7772else
7773 echo "$as_me: failed program was:" >&5
7774cat conftest.$ac_ext >&5
7775ac_lo=`expr $ac_mid + 1`
7776 if test $ac_lo -le $ac_mid; then
7777 ac_lo= ac_hi=
7778 break
7779 fi
7780 ac_mid=`expr 2 '*' $ac_mid + 1`
7781fi
7782rm -f conftest.$ac_objext conftest.$ac_ext
7783 done
7784else
7785 echo "$as_me: failed program was:" >&5
7786cat conftest.$ac_ext >&5
7787cat >conftest.$ac_ext <<_ACEOF
7788#line $LINENO "configure"
7789#include "confdefs.h"
7790$ac_includes_default
7791#ifdef F77_DUMMY_MAIN
7792# ifdef __cplusplus
7793 extern "C"
7794# endif
7795 int F77_DUMMY_MAIN() { return 1; }
7796#endif
7797int
7798main ()
7799{
7800static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7801test_array [0] = 0
7802
7803 ;
7804 return 0;
7805}
7806_ACEOF
7807rm -f conftest.$ac_objext
7808if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7809 (eval $ac_compile) 2>&5
7810 ac_status=$?
7811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7812 (exit $ac_status); } &&
7813 { ac_try='test -s conftest.$ac_objext'
7814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7815 (eval $ac_try) 2>&5
7816 ac_status=$?
7817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7818 (exit $ac_status); }; }; then
7819 ac_hi=-1 ac_mid=-1
7820 while :; do
7821 cat >conftest.$ac_ext <<_ACEOF
7822#line $LINENO "configure"
7823#include "confdefs.h"
7824$ac_includes_default
7825#ifdef F77_DUMMY_MAIN
7826# ifdef __cplusplus
7827 extern "C"
7828# endif
7829 int F77_DUMMY_MAIN() { return 1; }
7830#endif
7831int
7832main ()
7833{
7834static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7835test_array [0] = 0
7836
7837 ;
7838 return 0;
7839}
7840_ACEOF
7841rm -f conftest.$ac_objext
7842if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7843 (eval $ac_compile) 2>&5
7844 ac_status=$?
7845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7846 (exit $ac_status); } &&
7847 { ac_try='test -s conftest.$ac_objext'
7848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7849 (eval $ac_try) 2>&5
7850 ac_status=$?
7851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7852 (exit $ac_status); }; }; then
7853 ac_lo=$ac_mid; break
7854else
7855 echo "$as_me: failed program was:" >&5
7856cat conftest.$ac_ext >&5
7857ac_hi=`expr '(' $ac_mid ')' - 1`
7858 if test $ac_mid -le $ac_hi; then
7859 ac_lo= ac_hi=
7860 break
7861 fi
7862 ac_mid=`expr 2 '*' $ac_mid`
7863fi
7864rm -f conftest.$ac_objext conftest.$ac_ext
7865 done
7866else
7867 echo "$as_me: failed program was:" >&5
7868cat conftest.$ac_ext >&5
7869ac_lo= ac_hi=
7870fi
7871rm -f conftest.$ac_objext conftest.$ac_ext
7872fi
7873rm -f conftest.$ac_objext conftest.$ac_ext
7874# Binary search between lo and hi bounds.
7875while test "x$ac_lo" != "x$ac_hi"; do
7876 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7877 cat >conftest.$ac_ext <<_ACEOF
7878#line $LINENO "configure"
7879#include "confdefs.h"
7880$ac_includes_default
7881#ifdef F77_DUMMY_MAIN
7882# ifdef __cplusplus
7883 extern "C"
7884# endif
7885 int F77_DUMMY_MAIN() { return 1; }
7886#endif
7887int
7888main ()
7889{
7890static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7891test_array [0] = 0
7892
7893 ;
7894 return 0;
7895}
7896_ACEOF
7897rm -f conftest.$ac_objext
7898if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7899 (eval $ac_compile) 2>&5
7900 ac_status=$?
7901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7902 (exit $ac_status); } &&
7903 { ac_try='test -s conftest.$ac_objext'
7904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7905 (eval $ac_try) 2>&5
7906 ac_status=$?
7907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7908 (exit $ac_status); }; }; then
7909 ac_hi=$ac_mid
7910else
7911 echo "$as_me: failed program was:" >&5
7912cat conftest.$ac_ext >&5
7913ac_lo=`expr '(' $ac_mid ')' + 1`
7914fi
7915rm -f conftest.$ac_objext conftest.$ac_ext
7916done
7917case $ac_lo in
7918?*) ac_cv_sizeof_fpos_t=$ac_lo;;
7919'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7920echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7921 { (exit 1); exit 1; }; } ;;
7922esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007923else
7924 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007925 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7926echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7927 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007928else
Martin v. Löwis11437992002-04-12 09:54:03 +00007929 cat >conftest.$ac_ext <<_ACEOF
7930#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007931#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007932$ac_includes_default
7933long longval () { return (long) (sizeof (fpos_t)); }
7934unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007935#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007936#include <stdlib.h>
7937#ifdef F77_DUMMY_MAIN
7938# ifdef __cplusplus
7939 extern "C"
7940# endif
7941 int F77_DUMMY_MAIN() { return 1; }
7942#endif
7943int
7944main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007945{
Martin v. Löwis11437992002-04-12 09:54:03 +00007946
7947 FILE *f = fopen ("conftest.val", "w");
7948 if (! f)
7949 exit (1);
7950 if (((long) (sizeof (fpos_t))) < 0)
7951 {
7952 long i = longval ();
7953 if (i != ((long) (sizeof (fpos_t))))
7954 exit (1);
7955 fprintf (f, "%ld\n", i);
7956 }
7957 else
7958 {
7959 unsigned long i = ulongval ();
7960 if (i != ((long) (sizeof (fpos_t))))
7961 exit (1);
7962 fprintf (f, "%lu\n", i);
7963 }
7964 exit (ferror (f) || fclose (f) != 0);
7965
7966 ;
7967 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007968}
Martin v. Löwis11437992002-04-12 09:54:03 +00007969_ACEOF
7970rm -f conftest$ac_exeext
7971if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7972 (eval $ac_link) 2>&5
7973 ac_status=$?
7974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7975 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7976 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7977 (eval $ac_try) 2>&5
7978 ac_status=$?
7979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7980 (exit $ac_status); }; }; then
7981 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007982else
Martin v. Löwis11437992002-04-12 09:54:03 +00007983 echo "$as_me: program exited with status $ac_status" >&5
7984echo "$as_me: failed program was:" >&5
7985cat conftest.$ac_ext >&5
7986( exit $ac_status )
7987{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7988echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7989 { (exit 1); exit 1; }; }
7990fi
7991rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7992fi
7993fi
7994rm -f conftest.val
7995else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007996 ac_cv_sizeof_fpos_t=0
7997fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007998fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007999echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8000echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8001cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008002#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008003_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008004
Michael W. Hudson54241132001-12-07 15:38:26 +00008005
8006
Martin v. Löwis11437992002-04-12 09:54:03 +00008007echo "$as_me:$LINENO: checking for long long support" >&5
8008echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008009have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008010cat >conftest.$ac_ext <<_ACEOF
8011#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008012#include "confdefs.h"
8013
Martin v. Löwis11437992002-04-12 09:54:03 +00008014#ifdef F77_DUMMY_MAIN
8015# ifdef __cplusplus
8016 extern "C"
8017# endif
8018 int F77_DUMMY_MAIN() { return 1; }
8019#endif
8020int
8021main ()
8022{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008023long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008024 ;
8025 return 0;
8026}
8027_ACEOF
8028rm -f conftest.$ac_objext
8029if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8030 (eval $ac_compile) 2>&5
8031 ac_status=$?
8032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8033 (exit $ac_status); } &&
8034 { ac_try='test -s conftest.$ac_objext'
8035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8036 (eval $ac_try) 2>&5
8037 ac_status=$?
8038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8039 (exit $ac_status); }; }; then
8040
8041
8042cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008043#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008044_ACEOF
8045
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008046 have_long_long=yes
8047
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008048else
Martin v. Löwis11437992002-04-12 09:54:03 +00008049 echo "$as_me: failed program was:" >&5
8050cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008051fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008052rm -f conftest.$ac_objext conftest.$ac_ext
8053echo "$as_me:$LINENO: result: $have_long_long" >&5
8054echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008055if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008056echo "$as_me:$LINENO: checking for long long" >&5
8057echo $ECHO_N "checking for long long... $ECHO_C" >&6
8058if test "${ac_cv_type_long_long+set}" = set; then
8059 echo $ECHO_N "(cached) $ECHO_C" >&6
8060else
8061 cat >conftest.$ac_ext <<_ACEOF
8062#line $LINENO "configure"
8063#include "confdefs.h"
8064$ac_includes_default
8065#ifdef F77_DUMMY_MAIN
8066# ifdef __cplusplus
8067 extern "C"
8068# endif
8069 int F77_DUMMY_MAIN() { return 1; }
8070#endif
8071int
8072main ()
8073{
8074if ((long long *) 0)
8075 return 0;
8076if (sizeof (long long))
8077 return 0;
8078 ;
8079 return 0;
8080}
8081_ACEOF
8082rm -f conftest.$ac_objext
8083if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8084 (eval $ac_compile) 2>&5
8085 ac_status=$?
8086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8087 (exit $ac_status); } &&
8088 { ac_try='test -s conftest.$ac_objext'
8089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8090 (eval $ac_try) 2>&5
8091 ac_status=$?
8092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8093 (exit $ac_status); }; }; then
8094 ac_cv_type_long_long=yes
8095else
8096 echo "$as_me: failed program was:" >&5
8097cat conftest.$ac_ext >&5
8098ac_cv_type_long_long=no
8099fi
8100rm -f conftest.$ac_objext conftest.$ac_ext
8101fi
8102echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8103echo "${ECHO_T}$ac_cv_type_long_long" >&6
8104
8105echo "$as_me:$LINENO: checking size of long long" >&5
8106echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8107if test "${ac_cv_sizeof_long_long+set}" = set; then
8108 echo $ECHO_N "(cached) $ECHO_C" >&6
8109else
8110 if test "$ac_cv_type_long_long" = yes; then
8111 # The cast to unsigned long works around a bug in the HP C Compiler
8112 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8113 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8114 # This bug is HP SR number 8606223364.
8115 if test "$cross_compiling" = yes; then
8116 # Depending upon the size, compute the lo and hi bounds.
8117cat >conftest.$ac_ext <<_ACEOF
8118#line $LINENO "configure"
8119#include "confdefs.h"
8120$ac_includes_default
8121#ifdef F77_DUMMY_MAIN
8122# ifdef __cplusplus
8123 extern "C"
8124# endif
8125 int F77_DUMMY_MAIN() { return 1; }
8126#endif
8127int
8128main ()
8129{
8130static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8131test_array [0] = 0
8132
8133 ;
8134 return 0;
8135}
8136_ACEOF
8137rm -f conftest.$ac_objext
8138if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8139 (eval $ac_compile) 2>&5
8140 ac_status=$?
8141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8142 (exit $ac_status); } &&
8143 { ac_try='test -s conftest.$ac_objext'
8144 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8145 (eval $ac_try) 2>&5
8146 ac_status=$?
8147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8148 (exit $ac_status); }; }; then
8149 ac_lo=0 ac_mid=0
8150 while :; do
8151 cat >conftest.$ac_ext <<_ACEOF
8152#line $LINENO "configure"
8153#include "confdefs.h"
8154$ac_includes_default
8155#ifdef F77_DUMMY_MAIN
8156# ifdef __cplusplus
8157 extern "C"
8158# endif
8159 int F77_DUMMY_MAIN() { return 1; }
8160#endif
8161int
8162main ()
8163{
8164static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8165test_array [0] = 0
8166
8167 ;
8168 return 0;
8169}
8170_ACEOF
8171rm -f conftest.$ac_objext
8172if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8173 (eval $ac_compile) 2>&5
8174 ac_status=$?
8175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8176 (exit $ac_status); } &&
8177 { ac_try='test -s conftest.$ac_objext'
8178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8179 (eval $ac_try) 2>&5
8180 ac_status=$?
8181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8182 (exit $ac_status); }; }; then
8183 ac_hi=$ac_mid; break
8184else
8185 echo "$as_me: failed program was:" >&5
8186cat conftest.$ac_ext >&5
8187ac_lo=`expr $ac_mid + 1`
8188 if test $ac_lo -le $ac_mid; then
8189 ac_lo= ac_hi=
8190 break
8191 fi
8192 ac_mid=`expr 2 '*' $ac_mid + 1`
8193fi
8194rm -f conftest.$ac_objext conftest.$ac_ext
8195 done
8196else
8197 echo "$as_me: failed program was:" >&5
8198cat conftest.$ac_ext >&5
8199cat >conftest.$ac_ext <<_ACEOF
8200#line $LINENO "configure"
8201#include "confdefs.h"
8202$ac_includes_default
8203#ifdef F77_DUMMY_MAIN
8204# ifdef __cplusplus
8205 extern "C"
8206# endif
8207 int F77_DUMMY_MAIN() { return 1; }
8208#endif
8209int
8210main ()
8211{
8212static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8213test_array [0] = 0
8214
8215 ;
8216 return 0;
8217}
8218_ACEOF
8219rm -f conftest.$ac_objext
8220if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8221 (eval $ac_compile) 2>&5
8222 ac_status=$?
8223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8224 (exit $ac_status); } &&
8225 { ac_try='test -s conftest.$ac_objext'
8226 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8227 (eval $ac_try) 2>&5
8228 ac_status=$?
8229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8230 (exit $ac_status); }; }; then
8231 ac_hi=-1 ac_mid=-1
8232 while :; do
8233 cat >conftest.$ac_ext <<_ACEOF
8234#line $LINENO "configure"
8235#include "confdefs.h"
8236$ac_includes_default
8237#ifdef F77_DUMMY_MAIN
8238# ifdef __cplusplus
8239 extern "C"
8240# endif
8241 int F77_DUMMY_MAIN() { return 1; }
8242#endif
8243int
8244main ()
8245{
8246static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8247test_array [0] = 0
8248
8249 ;
8250 return 0;
8251}
8252_ACEOF
8253rm -f conftest.$ac_objext
8254if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8255 (eval $ac_compile) 2>&5
8256 ac_status=$?
8257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8258 (exit $ac_status); } &&
8259 { ac_try='test -s conftest.$ac_objext'
8260 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8261 (eval $ac_try) 2>&5
8262 ac_status=$?
8263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8264 (exit $ac_status); }; }; then
8265 ac_lo=$ac_mid; break
8266else
8267 echo "$as_me: failed program was:" >&5
8268cat conftest.$ac_ext >&5
8269ac_hi=`expr '(' $ac_mid ')' - 1`
8270 if test $ac_mid -le $ac_hi; then
8271 ac_lo= ac_hi=
8272 break
8273 fi
8274 ac_mid=`expr 2 '*' $ac_mid`
8275fi
8276rm -f conftest.$ac_objext conftest.$ac_ext
8277 done
8278else
8279 echo "$as_me: failed program was:" >&5
8280cat conftest.$ac_ext >&5
8281ac_lo= ac_hi=
8282fi
8283rm -f conftest.$ac_objext conftest.$ac_ext
8284fi
8285rm -f conftest.$ac_objext conftest.$ac_ext
8286# Binary search between lo and hi bounds.
8287while test "x$ac_lo" != "x$ac_hi"; do
8288 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8289 cat >conftest.$ac_ext <<_ACEOF
8290#line $LINENO "configure"
8291#include "confdefs.h"
8292$ac_includes_default
8293#ifdef F77_DUMMY_MAIN
8294# ifdef __cplusplus
8295 extern "C"
8296# endif
8297 int F77_DUMMY_MAIN() { return 1; }
8298#endif
8299int
8300main ()
8301{
8302static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8303test_array [0] = 0
8304
8305 ;
8306 return 0;
8307}
8308_ACEOF
8309rm -f conftest.$ac_objext
8310if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8311 (eval $ac_compile) 2>&5
8312 ac_status=$?
8313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8314 (exit $ac_status); } &&
8315 { ac_try='test -s conftest.$ac_objext'
8316 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8317 (eval $ac_try) 2>&5
8318 ac_status=$?
8319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8320 (exit $ac_status); }; }; then
8321 ac_hi=$ac_mid
8322else
8323 echo "$as_me: failed program was:" >&5
8324cat conftest.$ac_ext >&5
8325ac_lo=`expr '(' $ac_mid ')' + 1`
8326fi
8327rm -f conftest.$ac_objext conftest.$ac_ext
8328done
8329case $ac_lo in
8330?*) ac_cv_sizeof_long_long=$ac_lo;;
8331'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8332echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8333 { (exit 1); exit 1; }; } ;;
8334esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008335else
8336 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008337 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8338echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8339 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008340else
Martin v. Löwis11437992002-04-12 09:54:03 +00008341 cat >conftest.$ac_ext <<_ACEOF
8342#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008343#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008344$ac_includes_default
8345long longval () { return (long) (sizeof (long long)); }
8346unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008347#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008348#include <stdlib.h>
8349#ifdef F77_DUMMY_MAIN
8350# ifdef __cplusplus
8351 extern "C"
8352# endif
8353 int F77_DUMMY_MAIN() { return 1; }
8354#endif
8355int
8356main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008357{
Martin v. Löwis11437992002-04-12 09:54:03 +00008358
8359 FILE *f = fopen ("conftest.val", "w");
8360 if (! f)
8361 exit (1);
8362 if (((long) (sizeof (long long))) < 0)
8363 {
8364 long i = longval ();
8365 if (i != ((long) (sizeof (long long))))
8366 exit (1);
8367 fprintf (f, "%ld\n", i);
8368 }
8369 else
8370 {
8371 unsigned long i = ulongval ();
8372 if (i != ((long) (sizeof (long long))))
8373 exit (1);
8374 fprintf (f, "%lu\n", i);
8375 }
8376 exit (ferror (f) || fclose (f) != 0);
8377
8378 ;
8379 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008380}
Martin v. Löwis11437992002-04-12 09:54:03 +00008381_ACEOF
8382rm -f conftest$ac_exeext
8383if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8384 (eval $ac_link) 2>&5
8385 ac_status=$?
8386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8387 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8388 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8389 (eval $ac_try) 2>&5
8390 ac_status=$?
8391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8392 (exit $ac_status); }; }; then
8393 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008394else
Martin v. Löwis11437992002-04-12 09:54:03 +00008395 echo "$as_me: program exited with status $ac_status" >&5
8396echo "$as_me: failed program was:" >&5
8397cat conftest.$ac_ext >&5
8398( exit $ac_status )
8399{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8400echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8401 { (exit 1); exit 1; }; }
8402fi
8403rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8404fi
8405fi
8406rm -f conftest.val
8407else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008408 ac_cv_sizeof_long_long=0
8409fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008410fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008411echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8412echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8413cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008414#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008415_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008416
Michael W. Hudson54241132001-12-07 15:38:26 +00008417
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008418fi
8419
Martin v. Löwis11437992002-04-12 09:54:03 +00008420echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8421echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008422have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008423cat >conftest.$ac_ext <<_ACEOF
8424#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008425#include "confdefs.h"
8426
Martin v. Löwis11437992002-04-12 09:54:03 +00008427#ifdef F77_DUMMY_MAIN
8428# ifdef __cplusplus
8429 extern "C"
8430# endif
8431 int F77_DUMMY_MAIN() { return 1; }
8432#endif
8433int
8434main ()
8435{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008436uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008437 ;
8438 return 0;
8439}
8440_ACEOF
8441rm -f conftest.$ac_objext
8442if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8443 (eval $ac_compile) 2>&5
8444 ac_status=$?
8445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8446 (exit $ac_status); } &&
8447 { ac_try='test -s conftest.$ac_objext'
8448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8449 (eval $ac_try) 2>&5
8450 ac_status=$?
8451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8452 (exit $ac_status); }; }; then
8453
8454
8455cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008456#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008457_ACEOF
8458
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008459 have_uintptr_t=yes
8460
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008461else
Martin v. Löwis11437992002-04-12 09:54:03 +00008462 echo "$as_me: failed program was:" >&5
8463cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008464fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008465rm -f conftest.$ac_objext conftest.$ac_ext
8466echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8467echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008468if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008469echo "$as_me:$LINENO: checking for uintptr_t" >&5
8470echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8471if test "${ac_cv_type_uintptr_t+set}" = set; then
8472 echo $ECHO_N "(cached) $ECHO_C" >&6
8473else
8474 cat >conftest.$ac_ext <<_ACEOF
8475#line $LINENO "configure"
8476#include "confdefs.h"
8477$ac_includes_default
8478#ifdef F77_DUMMY_MAIN
8479# ifdef __cplusplus
8480 extern "C"
8481# endif
8482 int F77_DUMMY_MAIN() { return 1; }
8483#endif
8484int
8485main ()
8486{
8487if ((uintptr_t *) 0)
8488 return 0;
8489if (sizeof (uintptr_t))
8490 return 0;
8491 ;
8492 return 0;
8493}
8494_ACEOF
8495rm -f conftest.$ac_objext
8496if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8497 (eval $ac_compile) 2>&5
8498 ac_status=$?
8499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8500 (exit $ac_status); } &&
8501 { ac_try='test -s conftest.$ac_objext'
8502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8503 (eval $ac_try) 2>&5
8504 ac_status=$?
8505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8506 (exit $ac_status); }; }; then
8507 ac_cv_type_uintptr_t=yes
8508else
8509 echo "$as_me: failed program was:" >&5
8510cat conftest.$ac_ext >&5
8511ac_cv_type_uintptr_t=no
8512fi
8513rm -f conftest.$ac_objext conftest.$ac_ext
8514fi
8515echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8516echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8517
8518echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8519echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8520if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8521 echo $ECHO_N "(cached) $ECHO_C" >&6
8522else
8523 if test "$ac_cv_type_uintptr_t" = yes; then
8524 # The cast to unsigned long works around a bug in the HP C Compiler
8525 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8526 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8527 # This bug is HP SR number 8606223364.
8528 if test "$cross_compiling" = yes; then
8529 # Depending upon the size, compute the lo and hi bounds.
8530cat >conftest.$ac_ext <<_ACEOF
8531#line $LINENO "configure"
8532#include "confdefs.h"
8533$ac_includes_default
8534#ifdef F77_DUMMY_MAIN
8535# ifdef __cplusplus
8536 extern "C"
8537# endif
8538 int F77_DUMMY_MAIN() { return 1; }
8539#endif
8540int
8541main ()
8542{
8543static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8544test_array [0] = 0
8545
8546 ;
8547 return 0;
8548}
8549_ACEOF
8550rm -f conftest.$ac_objext
8551if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8552 (eval $ac_compile) 2>&5
8553 ac_status=$?
8554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8555 (exit $ac_status); } &&
8556 { ac_try='test -s conftest.$ac_objext'
8557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8558 (eval $ac_try) 2>&5
8559 ac_status=$?
8560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8561 (exit $ac_status); }; }; then
8562 ac_lo=0 ac_mid=0
8563 while :; do
8564 cat >conftest.$ac_ext <<_ACEOF
8565#line $LINENO "configure"
8566#include "confdefs.h"
8567$ac_includes_default
8568#ifdef F77_DUMMY_MAIN
8569# ifdef __cplusplus
8570 extern "C"
8571# endif
8572 int F77_DUMMY_MAIN() { return 1; }
8573#endif
8574int
8575main ()
8576{
8577static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8578test_array [0] = 0
8579
8580 ;
8581 return 0;
8582}
8583_ACEOF
8584rm -f conftest.$ac_objext
8585if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8586 (eval $ac_compile) 2>&5
8587 ac_status=$?
8588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8589 (exit $ac_status); } &&
8590 { ac_try='test -s conftest.$ac_objext'
8591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8592 (eval $ac_try) 2>&5
8593 ac_status=$?
8594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8595 (exit $ac_status); }; }; then
8596 ac_hi=$ac_mid; break
8597else
8598 echo "$as_me: failed program was:" >&5
8599cat conftest.$ac_ext >&5
8600ac_lo=`expr $ac_mid + 1`
8601 if test $ac_lo -le $ac_mid; then
8602 ac_lo= ac_hi=
8603 break
8604 fi
8605 ac_mid=`expr 2 '*' $ac_mid + 1`
8606fi
8607rm -f conftest.$ac_objext conftest.$ac_ext
8608 done
8609else
8610 echo "$as_me: failed program was:" >&5
8611cat conftest.$ac_ext >&5
8612cat >conftest.$ac_ext <<_ACEOF
8613#line $LINENO "configure"
8614#include "confdefs.h"
8615$ac_includes_default
8616#ifdef F77_DUMMY_MAIN
8617# ifdef __cplusplus
8618 extern "C"
8619# endif
8620 int F77_DUMMY_MAIN() { return 1; }
8621#endif
8622int
8623main ()
8624{
8625static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8626test_array [0] = 0
8627
8628 ;
8629 return 0;
8630}
8631_ACEOF
8632rm -f conftest.$ac_objext
8633if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8634 (eval $ac_compile) 2>&5
8635 ac_status=$?
8636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8637 (exit $ac_status); } &&
8638 { ac_try='test -s conftest.$ac_objext'
8639 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8640 (eval $ac_try) 2>&5
8641 ac_status=$?
8642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8643 (exit $ac_status); }; }; then
8644 ac_hi=-1 ac_mid=-1
8645 while :; do
8646 cat >conftest.$ac_ext <<_ACEOF
8647#line $LINENO "configure"
8648#include "confdefs.h"
8649$ac_includes_default
8650#ifdef F77_DUMMY_MAIN
8651# ifdef __cplusplus
8652 extern "C"
8653# endif
8654 int F77_DUMMY_MAIN() { return 1; }
8655#endif
8656int
8657main ()
8658{
8659static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8660test_array [0] = 0
8661
8662 ;
8663 return 0;
8664}
8665_ACEOF
8666rm -f conftest.$ac_objext
8667if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8668 (eval $ac_compile) 2>&5
8669 ac_status=$?
8670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8671 (exit $ac_status); } &&
8672 { ac_try='test -s conftest.$ac_objext'
8673 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8674 (eval $ac_try) 2>&5
8675 ac_status=$?
8676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8677 (exit $ac_status); }; }; then
8678 ac_lo=$ac_mid; break
8679else
8680 echo "$as_me: failed program was:" >&5
8681cat conftest.$ac_ext >&5
8682ac_hi=`expr '(' $ac_mid ')' - 1`
8683 if test $ac_mid -le $ac_hi; then
8684 ac_lo= ac_hi=
8685 break
8686 fi
8687 ac_mid=`expr 2 '*' $ac_mid`
8688fi
8689rm -f conftest.$ac_objext conftest.$ac_ext
8690 done
8691else
8692 echo "$as_me: failed program was:" >&5
8693cat conftest.$ac_ext >&5
8694ac_lo= ac_hi=
8695fi
8696rm -f conftest.$ac_objext conftest.$ac_ext
8697fi
8698rm -f conftest.$ac_objext conftest.$ac_ext
8699# Binary search between lo and hi bounds.
8700while test "x$ac_lo" != "x$ac_hi"; do
8701 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8702 cat >conftest.$ac_ext <<_ACEOF
8703#line $LINENO "configure"
8704#include "confdefs.h"
8705$ac_includes_default
8706#ifdef F77_DUMMY_MAIN
8707# ifdef __cplusplus
8708 extern "C"
8709# endif
8710 int F77_DUMMY_MAIN() { return 1; }
8711#endif
8712int
8713main ()
8714{
8715static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8716test_array [0] = 0
8717
8718 ;
8719 return 0;
8720}
8721_ACEOF
8722rm -f conftest.$ac_objext
8723if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8724 (eval $ac_compile) 2>&5
8725 ac_status=$?
8726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8727 (exit $ac_status); } &&
8728 { ac_try='test -s conftest.$ac_objext'
8729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8730 (eval $ac_try) 2>&5
8731 ac_status=$?
8732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8733 (exit $ac_status); }; }; then
8734 ac_hi=$ac_mid
8735else
8736 echo "$as_me: failed program was:" >&5
8737cat conftest.$ac_ext >&5
8738ac_lo=`expr '(' $ac_mid ')' + 1`
8739fi
8740rm -f conftest.$ac_objext conftest.$ac_ext
8741done
8742case $ac_lo in
8743?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8744'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8745echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8746 { (exit 1); exit 1; }; } ;;
8747esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008748else
8749 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008750 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8751echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8752 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008753else
Martin v. Löwis11437992002-04-12 09:54:03 +00008754 cat >conftest.$ac_ext <<_ACEOF
8755#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008756#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008757$ac_includes_default
8758long longval () { return (long) (sizeof (uintptr_t)); }
8759unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008760#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008761#include <stdlib.h>
8762#ifdef F77_DUMMY_MAIN
8763# ifdef __cplusplus
8764 extern "C"
8765# endif
8766 int F77_DUMMY_MAIN() { return 1; }
8767#endif
8768int
8769main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008770{
Martin v. Löwis11437992002-04-12 09:54:03 +00008771
8772 FILE *f = fopen ("conftest.val", "w");
8773 if (! f)
8774 exit (1);
8775 if (((long) (sizeof (uintptr_t))) < 0)
8776 {
8777 long i = longval ();
8778 if (i != ((long) (sizeof (uintptr_t))))
8779 exit (1);
8780 fprintf (f, "%ld\n", i);
8781 }
8782 else
8783 {
8784 unsigned long i = ulongval ();
8785 if (i != ((long) (sizeof (uintptr_t))))
8786 exit (1);
8787 fprintf (f, "%lu\n", i);
8788 }
8789 exit (ferror (f) || fclose (f) != 0);
8790
8791 ;
8792 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008793}
Martin v. Löwis11437992002-04-12 09:54:03 +00008794_ACEOF
8795rm -f conftest$ac_exeext
8796if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8797 (eval $ac_link) 2>&5
8798 ac_status=$?
8799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8800 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8801 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8802 (eval $ac_try) 2>&5
8803 ac_status=$?
8804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8805 (exit $ac_status); }; }; then
8806 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008807else
Martin v. Löwis11437992002-04-12 09:54:03 +00008808 echo "$as_me: program exited with status $ac_status" >&5
8809echo "$as_me: failed program was:" >&5
8810cat conftest.$ac_ext >&5
8811( exit $ac_status )
8812{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8813echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8814 { (exit 1); exit 1; }; }
8815fi
8816rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8817fi
8818fi
8819rm -f conftest.val
8820else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008821 ac_cv_sizeof_uintptr_t=0
8822fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008823fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008824echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8825echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8826cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008827#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008828_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008829
Michael W. Hudson54241132001-12-07 15:38:26 +00008830
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008831fi
8832
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008833# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008834echo "$as_me:$LINENO: checking size of off_t" >&5
8835echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8836if test "${ac_cv_sizeof_off_t+set}" = set; then
8837 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008838else
8839 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008840 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008841else
Martin v. Löwis11437992002-04-12 09:54:03 +00008842 cat >conftest.$ac_ext <<_ACEOF
8843#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008844#include "confdefs.h"
8845#include <stdio.h>
8846#include <sys/types.h>
8847main()
8848{
8849 FILE *f=fopen("conftestval", "w");
8850 if (!f) exit(1);
8851 fprintf(f, "%d\n", sizeof(off_t));
8852 exit(0);
8853}
Martin v. Löwis11437992002-04-12 09:54:03 +00008854_ACEOF
8855rm -f conftest$ac_exeext
8856if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8857 (eval $ac_link) 2>&5
8858 ac_status=$?
8859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8860 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8861 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8862 (eval $ac_try) 2>&5
8863 ac_status=$?
8864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8865 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008866 ac_cv_sizeof_off_t=`cat conftestval`
8867else
Martin v. Löwis11437992002-04-12 09:54:03 +00008868 echo "$as_me: program exited with status $ac_status" >&5
8869echo "$as_me: failed program was:" >&5
8870cat conftest.$ac_ext >&5
8871( exit $ac_status )
8872ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008873fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008874rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008875fi
8876
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008877fi
8878
Martin v. Löwis11437992002-04-12 09:54:03 +00008879echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
8880echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
8881
8882cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008883#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008884_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008885
Michael W. Hudson54241132001-12-07 15:38:26 +00008886
Martin v. Löwis11437992002-04-12 09:54:03 +00008887echo "$as_me:$LINENO: checking whether to enable large file support" >&5
8888echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008889if test "$have_long_long" = yes -a \
8890 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
8891 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008892
Martin v. Löwis11437992002-04-12 09:54:03 +00008893cat >>confdefs.h <<\_ACEOF
8894#define HAVE_LARGEFILE_SUPPORT 1
8895_ACEOF
8896
8897 echo "$as_me:$LINENO: result: yes" >&5
8898echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008899else
Martin v. Löwis11437992002-04-12 09:54:03 +00008900 echo "$as_me:$LINENO: result: no" >&5
8901echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008902fi
8903
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008904# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008905echo "$as_me:$LINENO: checking size of time_t" >&5
8906echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
8907if test "${ac_cv_sizeof_time_t+set}" = set; then
8908 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008909else
8910 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008911 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008912else
Martin v. Löwis11437992002-04-12 09:54:03 +00008913 cat >conftest.$ac_ext <<_ACEOF
8914#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008915#include "confdefs.h"
8916#include <stdio.h>
8917#include <time.h>
8918main()
8919{
8920 FILE *f=fopen("conftestval", "w");
8921 if (!f) exit(1);
8922 fprintf(f, "%d\n", sizeof(time_t));
8923 exit(0);
8924}
Martin v. Löwis11437992002-04-12 09:54:03 +00008925_ACEOF
8926rm -f conftest$ac_exeext
8927if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8928 (eval $ac_link) 2>&5
8929 ac_status=$?
8930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8931 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8932 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8933 (eval $ac_try) 2>&5
8934 ac_status=$?
8935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8936 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008937 ac_cv_sizeof_time_t=`cat conftestval`
8938else
Martin v. Löwis11437992002-04-12 09:54:03 +00008939 echo "$as_me: program exited with status $ac_status" >&5
8940echo "$as_me: failed program was:" >&5
8941cat conftest.$ac_ext >&5
8942( exit $ac_status )
8943ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008944fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008945rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008946fi
8947
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008948fi
8949
Martin v. Löwis11437992002-04-12 09:54:03 +00008950echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
8951echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
8952
8953cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008954#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008955_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008956
Michael W. Hudson54241132001-12-07 15:38:26 +00008957
8958
Trent Mick635f6fb2000-08-23 21:33:05 +00008959# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008960ac_save_cc="$CC"
8961if test "$ac_cv_kpthread" = "yes"
8962then CC="$CC -Kpthread"
8963fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008964echo "$as_me:$LINENO: checking for pthread_t" >&5
8965echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008966have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008967cat >conftest.$ac_ext <<_ACEOF
8968#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008969#include "confdefs.h"
8970#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008971#ifdef F77_DUMMY_MAIN
8972# ifdef __cplusplus
8973 extern "C"
8974# endif
8975 int F77_DUMMY_MAIN() { return 1; }
8976#endif
8977int
8978main ()
8979{
Guido van Rossum12580492000-09-24 16:47:19 +00008980pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008981 ;
8982 return 0;
8983}
8984_ACEOF
8985rm -f conftest.$ac_objext
8986if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8987 (eval $ac_compile) 2>&5
8988 ac_status=$?
8989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8990 (exit $ac_status); } &&
8991 { ac_try='test -s conftest.$ac_objext'
8992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8993 (eval $ac_try) 2>&5
8994 ac_status=$?
8995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8996 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008997 have_pthread_t=yes
8998else
Martin v. Löwis11437992002-04-12 09:54:03 +00008999 echo "$as_me: failed program was:" >&5
9000cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00009001fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009002rm -f conftest.$ac_objext conftest.$ac_ext
9003echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9004echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009005if test "$have_pthread_t" = yes ; then
9006 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009007 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9008echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9009 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9010 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009011else
9012 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009013 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009014else
Martin v. Löwis11437992002-04-12 09:54:03 +00009015 cat >conftest.$ac_ext <<_ACEOF
9016#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009017#include "confdefs.h"
9018#include <stdio.h>
9019 #include <pthread.h>
9020 main()
9021 {
9022 FILE *f=fopen("conftestval", "w");
9023 if (!f) exit(1);
9024 fprintf(f, "%d\n", sizeof(pthread_t));
9025 exit(0);
9026 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009027_ACEOF
9028rm -f conftest$ac_exeext
9029if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9030 (eval $ac_link) 2>&5
9031 ac_status=$?
9032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9033 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9035 (eval $ac_try) 2>&5
9036 ac_status=$?
9037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9038 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009039 ac_cv_sizeof_pthread_t=`cat conftestval`
9040else
Martin v. Löwis11437992002-04-12 09:54:03 +00009041 echo "$as_me: program exited with status $ac_status" >&5
9042echo "$as_me: failed program was:" >&5
9043cat conftest.$ac_ext >&5
9044( exit $ac_status )
9045ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009046fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009047rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009048fi
9049
Trent Mick635f6fb2000-08-23 21:33:05 +00009050fi
9051
Martin v. Löwis11437992002-04-12 09:54:03 +00009052 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9053echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9054
9055cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009056#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009057_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009058
9059fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009060CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009061
Martin v. Löwis11437992002-04-12 09:54:03 +00009062echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9063echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009064# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9065if test "${enable_toolbox_glue+set}" = set; then
9066 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009067
Martin v. Löwis11437992002-04-12 09:54:03 +00009068fi;
Jack Jansene578a632001-08-15 01:27:14 +00009069
9070if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009071then
Jack Jansene578a632001-08-15 01:27:14 +00009072 case $ac_sys_system/$ac_sys_release in
9073 Darwin/*)
9074 enable_toolbox_glue="yes";;
9075 *)
9076 enable_toolbox_glue="no";;
9077 esac
9078fi
9079case "$enable_toolbox_glue" in
9080yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009081 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009082 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009083 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009084
9085cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009086#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009087_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009088
9089 ;;
9090*)
9091 extra_frameworks=""
9092 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009093 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009094 ;;
9095esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009096echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9097echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009098
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009099
9100case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009101 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009102 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009103 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00009104 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9105 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009106 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009107 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009108 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00009109 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9110 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009111esac
9112
Martin v. Löwis11437992002-04-12 09:54:03 +00009113echo "$as_me:$LINENO: checking for --enable-framework" >&5
9114echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009115if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009116then
Jack Jansenca06bc62001-08-03 15:32:23 +00009117 OPT="$OPT -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009118 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009119 # in the build location.
Jack Jansenea0c3822002-08-01 21:57:49 +00009120 LDFLAGS="$LDFLAGS -Wl,-F."
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009121
Martin v. Löwis11437992002-04-12 09:54:03 +00009122cat >>confdefs.h <<\_ACEOF
9123#define WITH_NEXT_FRAMEWORK 1
9124_ACEOF
9125
9126 echo "$as_me:$LINENO: result: yes" >&5
9127echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009128else
Martin v. Löwis11437992002-04-12 09:54:03 +00009129 echo "$as_me:$LINENO: result: no" >&5
9130echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009131fi
9132
Martin v. Löwis11437992002-04-12 09:54:03 +00009133echo "$as_me:$LINENO: checking for dyld" >&5
9134echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009135case $ac_sys_system/$ac_sys_release in
9136 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009137
Martin v. Löwis11437992002-04-12 09:54:03 +00009138cat >>confdefs.h <<\_ACEOF
9139#define WITH_DYLD 1
9140_ACEOF
9141
9142 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9143echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009144 ;;
9145 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009146 echo "$as_me:$LINENO: result: no" >&5
9147echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009148 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009149esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009150
Guido van Rossum0a516c91994-09-12 10:58:40 +00009151# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009152
Michael W. Hudson54241132001-12-07 15:38:26 +00009153
9154
9155
9156
Guido van Rossum0a516c91994-09-12 10:58:40 +00009157# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009158# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009159echo "$as_me:$LINENO: checking SO" >&5
9160echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009161if test -z "$SO"
9162then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009163 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009164 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009165 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009166 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009167 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009168fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009169echo "$as_me:$LINENO: result: $SO" >&5
9170echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009171# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00009172# -- "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 +00009173# (Shared libraries in this instance are shared modules to be loaded into
9174# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009175echo "$as_me:$LINENO: checking LDSHARED" >&5
9176echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009177if test -z "$LDSHARED"
9178then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009179 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009180 AIX*)
9181 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009182 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009183 ;;
9184 BeOS*)
9185 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009186 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009187 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009188 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009189 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009190 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009191 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00009192 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009193 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009194 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +00009195 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009196 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009197 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
9198 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009199 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009200 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9201 if test "$enable_framework" ; then
9202 # Link against the framework. All externals should be defined.
9203 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9204 else
9205 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009206 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009207 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009208 Darwin/*)
9209 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9210 if test "$enable_framework" ; then
9211 # Link against the framework. All externals should be defined.
9212 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9213 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009214 # No framework, use the Python app as bundle-loader
9215 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9216 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009217 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009218 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00009219 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009220 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009221 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009222 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009223 then
9224 LDSHARED="cc -shared ${LDFLAGS}"
9225 else
9226 LDSHARED="ld -Bshareable ${LDFLAGS}"
9227 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009228 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009229 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009230 if test "$GCC" = "yes"
9231 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009232 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009233 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009234 SCO_SV*) LDSHARED="$(CC) -Wl,-G,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00009235 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009236 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009237 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009238 *) LDSHARED="ld";;
9239 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009240fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009241echo "$as_me:$LINENO: result: $LDSHARED" >&5
9242echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009243BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009244# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009245# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009246echo "$as_me:$LINENO: checking CCSHARED" >&5
9247echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009248if test -z "$CCSHARED"
9249then
Guido van Rossum07397971997-04-29 21:49:50 +00009250 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009251 SunOS*) if test "$GCC" = yes;
9252 then CCSHARED="-fPIC";
9253 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009254 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009255 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009256 else CCSHARED="+z";
9257 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009258 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009259 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009260 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009261 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009262 if test "$GCC" = "yes"
9263 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009264 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009265 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009266 SCO_SV*)
9267 if test "$GCC" = "yes"
9268 then CCSHARED="-fPIC"
9269 else CCSHARED="-Kpic -belf"
9270 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009271 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009272 IRIX*/6*) case $CC in
9273 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009274 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009275 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009276 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009277 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009278fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009279echo "$as_me:$LINENO: result: $CCSHARED" >&5
9280echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009281# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009282# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009283echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9284echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009285if test -z "$LINKFORSHARED"
9286then
Guido van Rossum07397971997-04-29 21:49:50 +00009287 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009288 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009289 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009290 LINKFORSHARED="-Wl,-E -Wl,+s";;
9291# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009292 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009293 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009294 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009295 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009296 # -u __dummy makes the linker aware of the objc runtime
9297 # in System.framework; otherwise, __objcInit (referenced in
9298 # crt1.o) gets erroneously defined as common, which breaks dynamic
9299 # loading of any modules which reference it in System.framework.
9300 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9301 # not used by the core itself but which needs to be in the core so
9302 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00009303 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009304 if test "$enable_framework"
9305 then
9306 LINKFORSHARED="$LINKFORSHARED -framework Python"
9307 fi
9308 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009309 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009310 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009311 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009312 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009313 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9314 then
9315 LINKFORSHARED="-Wl,--export-dynamic"
9316 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009317 SunOS/5*) case $CC in
9318 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009319 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009320 then
9321 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009322 fi;;
9323 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009324 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009325fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009326echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9327echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009328
Michael W. Hudson54241132001-12-07 15:38:26 +00009329
Martin v. Löwis11437992002-04-12 09:54:03 +00009330echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9331echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009332if test ! "$LIBRARY" = "$LDLIBRARY"
9333then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009334 case $ac_sys_system in
9335 CYGWIN*)
9336 # Cygwin needs CCSHARED when building extension DLLs
9337 # but not when building the interpreter DLL.
9338 CFLAGSFORSHARED='';;
9339 *)
9340 CFLAGSFORSHARED='$(CCSHARED)'
9341 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009342fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009343echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9344echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009345
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009346# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9347# library (with --enable-shared).
9348# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009349# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9350# if it is not required, since it creates a dependency of the shared library
9351# to LIBS. This, in turn, means that applications linking the shared libpython
9352# don't need to link LIBS explicitly. The default should be only changed
9353# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009354
9355echo "$as_me:$LINENO: checking SHLIBS" >&5
9356echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9357case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009358 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009359 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009360esac
9361echo "$as_me:$LINENO: result: $SHLIBS" >&5
9362echo "${ECHO_T}$SHLIBS" >&6
9363
9364
Guido van Rossum627b2d71993-12-24 10:39:16 +00009365# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009366
9367echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9368echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9369if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9370 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009371else
Martin v. Löwis11437992002-04-12 09:54:03 +00009372 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009373LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009374cat >conftest.$ac_ext <<_ACEOF
9375#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009376#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009377
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009378/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009379#ifdef __cplusplus
9380extern "C"
9381#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009382/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009383 builtin and then its argument prototype would still apply. */
9384char dlopen ();
9385#ifdef F77_DUMMY_MAIN
9386# ifdef __cplusplus
9387 extern "C"
9388# endif
9389 int F77_DUMMY_MAIN() { return 1; }
9390#endif
9391int
9392main ()
9393{
9394dlopen ();
9395 ;
9396 return 0;
9397}
9398_ACEOF
9399rm -f conftest.$ac_objext conftest$ac_exeext
9400if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9401 (eval $ac_link) 2>&5
9402 ac_status=$?
9403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9404 (exit $ac_status); } &&
9405 { ac_try='test -s conftest$ac_exeext'
9406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9407 (eval $ac_try) 2>&5
9408 ac_status=$?
9409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9410 (exit $ac_status); }; }; then
9411 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009412else
Martin v. Löwis11437992002-04-12 09:54:03 +00009413 echo "$as_me: failed program was:" >&5
9414cat conftest.$ac_ext >&5
9415ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009416fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009417rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9418LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009419fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009420echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9421echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9422if test $ac_cv_lib_dl_dlopen = yes; then
9423 cat >>confdefs.h <<_ACEOF
9424#define HAVE_LIBDL 1
9425_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009426
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009427 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009428
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009429fi
9430 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009431
9432echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9433echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9434if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9435 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009436else
Martin v. Löwis11437992002-04-12 09:54:03 +00009437 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009438LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009439cat >conftest.$ac_ext <<_ACEOF
9440#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009441#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009442
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009443/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009444#ifdef __cplusplus
9445extern "C"
9446#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009447/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009448 builtin and then its argument prototype would still apply. */
9449char shl_load ();
9450#ifdef F77_DUMMY_MAIN
9451# ifdef __cplusplus
9452 extern "C"
9453# endif
9454 int F77_DUMMY_MAIN() { return 1; }
9455#endif
9456int
9457main ()
9458{
9459shl_load ();
9460 ;
9461 return 0;
9462}
9463_ACEOF
9464rm -f conftest.$ac_objext conftest$ac_exeext
9465if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9466 (eval $ac_link) 2>&5
9467 ac_status=$?
9468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9469 (exit $ac_status); } &&
9470 { ac_try='test -s conftest$ac_exeext'
9471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9472 (eval $ac_try) 2>&5
9473 ac_status=$?
9474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9475 (exit $ac_status); }; }; then
9476 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009477else
Martin v. Löwis11437992002-04-12 09:54:03 +00009478 echo "$as_me: failed program was:" >&5
9479cat conftest.$ac_ext >&5
9480ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009481fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009482rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9483LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009484fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009485echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9486echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9487if test $ac_cv_lib_dld_shl_load = yes; then
9488 cat >>confdefs.h <<_ACEOF
9489#define HAVE_LIBDLD 1
9490_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009491
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009492 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009493
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009494fi
9495 # Dynamic linking for HP-UX
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009496echo "$as_me:$LINENO: checking for library containing sem_init" >&5
9497echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9498if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009499 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009500else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009501 ac_func_search_save_LIBS=$LIBS
9502ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009503cat >conftest.$ac_ext <<_ACEOF
9504#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009505#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009506
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009507/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009508#ifdef __cplusplus
9509extern "C"
9510#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009511/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009512 builtin and then its argument prototype would still apply. */
9513char sem_init ();
9514#ifdef F77_DUMMY_MAIN
9515# ifdef __cplusplus
9516 extern "C"
9517# endif
9518 int F77_DUMMY_MAIN() { return 1; }
9519#endif
9520int
9521main ()
9522{
9523sem_init ();
9524 ;
9525 return 0;
9526}
9527_ACEOF
9528rm -f conftest.$ac_objext conftest$ac_exeext
9529if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9530 (eval $ac_link) 2>&5
9531 ac_status=$?
9532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9533 (exit $ac_status); } &&
9534 { ac_try='test -s conftest$ac_exeext'
9535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9536 (eval $ac_try) 2>&5
9537 ac_status=$?
9538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9539 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009540 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009541else
Martin v. Löwis11437992002-04-12 09:54:03 +00009542 echo "$as_me: failed program was:" >&5
9543cat conftest.$ac_ext >&5
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009544fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009545rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009546if test "$ac_cv_search_sem_init" = no; then
9547 for ac_lib in rt posix4; do
9548 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9549 cat >conftest.$ac_ext <<_ACEOF
9550#line $LINENO "configure"
9551#include "confdefs.h"
9552
9553/* Override any gcc2 internal prototype to avoid an error. */
9554#ifdef __cplusplus
9555extern "C"
9556#endif
9557/* We use char because int might match the return type of a gcc2
9558 builtin and then its argument prototype would still apply. */
9559char sem_init ();
9560#ifdef F77_DUMMY_MAIN
9561# ifdef __cplusplus
9562 extern "C"
9563# endif
9564 int F77_DUMMY_MAIN() { return 1; }
9565#endif
9566int
9567main ()
9568{
9569sem_init ();
9570 ;
9571 return 0;
9572}
Martin v. Löwis11437992002-04-12 09:54:03 +00009573_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009574rm -f conftest.$ac_objext conftest$ac_exeext
9575if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9576 (eval $ac_link) 2>&5
9577 ac_status=$?
9578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9579 (exit $ac_status); } &&
9580 { ac_try='test -s conftest$ac_exeext'
9581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9582 (eval $ac_try) 2>&5
9583 ac_status=$?
9584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9585 (exit $ac_status); }; }; then
9586 ac_cv_search_sem_init="-l$ac_lib"
9587break
9588else
9589 echo "$as_me: failed program was:" >&5
9590cat conftest.$ac_ext >&5
9591fi
9592rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9593 done
9594fi
9595LIBS=$ac_func_search_save_LIBS
9596fi
9597echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9598echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9599if test "$ac_cv_search_sem_init" != no; then
9600 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009601
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009602fi
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009603 # 'Real Time' functions on Solaris,
9604 # posix4 on Solaris 2.6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009605
9606# checks for system dependent C++ extensions support
9607case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009608 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9609echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9610 cat >conftest.$ac_ext <<_ACEOF
9611#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009612#include "confdefs.h"
9613#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009614#ifdef F77_DUMMY_MAIN
9615# ifdef __cplusplus
9616 extern "C"
9617# endif
9618 int F77_DUMMY_MAIN() { return 1; }
9619#endif
9620int
9621main ()
9622{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009623loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009624 ;
9625 return 0;
9626}
9627_ACEOF
9628rm -f conftest.$ac_objext conftest$ac_exeext
9629if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9630 (eval $ac_link) 2>&5
9631 ac_status=$?
9632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9633 (exit $ac_status); } &&
9634 { ac_try='test -s conftest$ac_exeext'
9635 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9636 (eval $ac_try) 2>&5
9637 ac_status=$?
9638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9639 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009640
Martin v. Löwis11437992002-04-12 09:54:03 +00009641cat >>confdefs.h <<\_ACEOF
9642#define AIX_GENUINE_CPLUSPLUS 1
9643_ACEOF
9644
9645 echo "$as_me:$LINENO: result: yes" >&5
9646echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009647else
Martin v. Löwis11437992002-04-12 09:54:03 +00009648 echo "$as_me: failed program was:" >&5
9649cat conftest.$ac_ext >&5
9650echo "$as_me:$LINENO: result: no" >&5
9651echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009652fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009653rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009654 *) ;;
9655esac
9656
Guido van Rossum70c7f481998-03-26 18:44:10 +00009657# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
9658# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009659# BeOS' sockets are stashed in libnet.
9660case "$ac_sys_system" in
9661IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009662*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009663echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9664echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9665if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9666 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009667else
Martin v. Löwis11437992002-04-12 09:54:03 +00009668 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009669LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009670cat >conftest.$ac_ext <<_ACEOF
9671#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009672#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009673
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009674/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009675#ifdef __cplusplus
9676extern "C"
9677#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009678/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009679 builtin and then its argument prototype would still apply. */
9680char t_open ();
9681#ifdef F77_DUMMY_MAIN
9682# ifdef __cplusplus
9683 extern "C"
9684# endif
9685 int F77_DUMMY_MAIN() { return 1; }
9686#endif
9687int
9688main ()
9689{
9690t_open ();
9691 ;
9692 return 0;
9693}
9694_ACEOF
9695rm -f conftest.$ac_objext conftest$ac_exeext
9696if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9697 (eval $ac_link) 2>&5
9698 ac_status=$?
9699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9700 (exit $ac_status); } &&
9701 { ac_try='test -s conftest$ac_exeext'
9702 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9703 (eval $ac_try) 2>&5
9704 ac_status=$?
9705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9706 (exit $ac_status); }; }; then
9707 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009708else
Martin v. Löwis11437992002-04-12 09:54:03 +00009709 echo "$as_me: failed program was:" >&5
9710cat conftest.$ac_ext >&5
9711ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009712fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009713rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9714LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009715fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009716echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9717echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9718if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009719 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009720fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009721 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009722echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9723echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9724if test "${ac_cv_lib_socket_socket+set}" = set; then
9725 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009726else
Martin v. Löwis11437992002-04-12 09:54:03 +00009727 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009728LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009729cat >conftest.$ac_ext <<_ACEOF
9730#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009731#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009732
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009733/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009734#ifdef __cplusplus
9735extern "C"
9736#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009737/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009738 builtin and then its argument prototype would still apply. */
9739char socket ();
9740#ifdef F77_DUMMY_MAIN
9741# ifdef __cplusplus
9742 extern "C"
9743# endif
9744 int F77_DUMMY_MAIN() { return 1; }
9745#endif
9746int
9747main ()
9748{
9749socket ();
9750 ;
9751 return 0;
9752}
9753_ACEOF
9754rm -f conftest.$ac_objext conftest$ac_exeext
9755if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9756 (eval $ac_link) 2>&5
9757 ac_status=$?
9758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9759 (exit $ac_status); } &&
9760 { ac_try='test -s conftest$ac_exeext'
9761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9762 (eval $ac_try) 2>&5
9763 ac_status=$?
9764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9765 (exit $ac_status); }; }; then
9766 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009767else
Martin v. Löwis11437992002-04-12 09:54:03 +00009768 echo "$as_me: failed program was:" >&5
9769cat conftest.$ac_ext >&5
9770ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009771fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009772rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9773LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009774fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009775echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9776echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9777if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009778 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009779fi
9780 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009781;;
9782esac
9783case "$ac_sys_system" in
9784BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009785echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9786echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9787if test "${ac_cv_lib_net_socket+set}" = set; then
9788 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009789else
Martin v. Löwis11437992002-04-12 09:54:03 +00009790 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009791LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009792cat >conftest.$ac_ext <<_ACEOF
9793#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009794#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009795
Guido van Rossumad678af1998-10-02 14:42:15 +00009796/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009797#ifdef __cplusplus
9798extern "C"
9799#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009800/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009801 builtin and then its argument prototype would still apply. */
9802char socket ();
9803#ifdef F77_DUMMY_MAIN
9804# ifdef __cplusplus
9805 extern "C"
9806# endif
9807 int F77_DUMMY_MAIN() { return 1; }
9808#endif
9809int
9810main ()
9811{
9812socket ();
9813 ;
9814 return 0;
9815}
9816_ACEOF
9817rm -f conftest.$ac_objext conftest$ac_exeext
9818if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9819 (eval $ac_link) 2>&5
9820 ac_status=$?
9821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9822 (exit $ac_status); } &&
9823 { ac_try='test -s conftest$ac_exeext'
9824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9825 (eval $ac_try) 2>&5
9826 ac_status=$?
9827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9828 (exit $ac_status); }; }; then
9829 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009830else
Martin v. Löwis11437992002-04-12 09:54:03 +00009831 echo "$as_me: failed program was:" >&5
9832cat conftest.$ac_ext >&5
9833ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009834fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009835rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9836LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009837fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009838echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
9839echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
9840if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009841 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009842fi
9843 # BeOS
9844;;
9845esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009846
Martin v. Löwis11437992002-04-12 09:54:03 +00009847echo "$as_me:$LINENO: checking for --with-libs" >&5
9848echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
9849
Guido van Rossuma68acba1996-07-31 17:36:39 +00009850# Check whether --with-libs or --without-libs was given.
9851if test "${with_libs+set}" = set; then
9852 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +00009853
9854echo "$as_me:$LINENO: result: $withval" >&5
9855echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00009856LIBS="$withval $LIBS"
9857
9858else
Martin v. Löwis11437992002-04-12 09:54:03 +00009859 echo "$as_me:$LINENO: result: no" >&5
9860echo "${ECHO_T}no" >&6
9861fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +00009862
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009863# Determine if signalmodule should be used.
9864
9865
Martin v. Löwis11437992002-04-12 09:54:03 +00009866echo "$as_me:$LINENO: checking for --with-signal-module" >&5
9867echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
9868
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009869# Check whether --with-signal-module or --without-signal-module was given.
9870if test "${with_signal_module+set}" = set; then
9871 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009872
Martin v. Löwis11437992002-04-12 09:54:03 +00009873fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009874
9875if test -z "$with_signal_module"
9876then with_signal_module="yes"
9877fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009878echo "$as_me:$LINENO: result: $with_signal_module" >&5
9879echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009880
9881if test "${with_signal_module}" = "yes"; then
9882 USE_SIGNAL_MODULE=""
9883 SIGNAL_OBJS=""
9884else
9885 USE_SIGNAL_MODULE="#"
9886 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9887fi
9888
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009889# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009890
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009891USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009892
Martin v. Löwis11437992002-04-12 09:54:03 +00009893echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
9894echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
9895
Guido van Rossumec2f0731997-01-22 20:54:01 +00009896
9897# Check whether --with-dec-threads or --without-dec-threads was given.
9898if test "${with_dec_threads+set}" = set; then
9899 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +00009900
9901echo "$as_me:$LINENO: result: $withval" >&5
9902echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00009903LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009904if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009905 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009906fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009907else
Martin v. Löwis11437992002-04-12 09:54:03 +00009908 echo "$as_me:$LINENO: result: no" >&5
9909echo "${ECHO_T}no" >&6
9910fi;
9911
9912# Templates for things AC_DEFINEd more than once.
9913# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009914
9915
Martin v. Löwis11437992002-04-12 09:54:03 +00009916
9917
9918
9919
9920
9921echo "$as_me:$LINENO: checking for --with-threads" >&5
9922echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
9923
Guido van Rossumec2f0731997-01-22 20:54:01 +00009924# Check whether --with-threads or --without-threads was given.
9925if test "${with_threads+set}" = set; then
9926 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +00009927
Martin v. Löwis11437992002-04-12 09:54:03 +00009928fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +00009929
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009930# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009931
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009932# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009933if test "${with_thread+set}" = set; then
9934 withval="$with_thread"
Michael W. Hudson54241132001-12-07 15:38:26 +00009935
Martin v. Löwis11437992002-04-12 09:54:03 +00009936with_threads=$with_thread
9937fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009938
9939if test -z "$with_threads"
9940then with_threads="yes"
9941fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009942echo "$as_me:$LINENO: result: $with_threads" >&5
9943echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009944
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009945
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009946if test "$with_threads" = "no"
9947then
9948 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009949elif test "$ac_cv_pthread_is_default" = yes
9950then
Martin v. Löwis11437992002-04-12 09:54:03 +00009951 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009952#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009953_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009954
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009955 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +00009956 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009957#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009958_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009959
9960 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009961 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009962elif test "$ac_cv_kpthread" = "yes"
9963then
9964 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009965 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009966#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009967_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009968
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009969 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009970 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009971else
9972 if test ! -z "$with_threads" -a -d "$with_threads"
9973 then LDFLAGS="$LDFLAGS -L$with_threads"
9974 fi
9975 if test ! -z "$withval" -a -d "$withval"
9976 then LDFLAGS="$LDFLAGS -L$withval"
9977 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009978
9979 # According to the POSIX spec, a pthreads implementation must
9980 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +00009981 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
9982echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
9983 cat >conftest.$ac_ext <<_ACEOF
9984#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009985#include "confdefs.h"
9986#include <unistd.h>
9987 #ifdef _POSIX_THREADS
9988 yes
9989 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009990
9991_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009992if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9993 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009994 unistd_defines_pthreads=yes
9995else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009996 unistd_defines_pthreads=no
9997fi
9998rm -f conftest*
9999
Martin v. Löwis11437992002-04-12 09:54:03 +000010000 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10001echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010002
Martin v. Löwis11437992002-04-12 09:54:03 +000010003 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010004#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010005_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010006
Martin v. Löwis11437992002-04-12 09:54:03 +000010007 if test "${ac_cv_header_cthreads_h+set}" = set; then
10008 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10009echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10010if test "${ac_cv_header_cthreads_h+set}" = set; then
10011 echo $ECHO_N "(cached) $ECHO_C" >&6
10012fi
10013echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10014echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010015else
Martin v. Löwis11437992002-04-12 09:54:03 +000010016 # Is the header compilable?
10017echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10018echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10019cat >conftest.$ac_ext <<_ACEOF
10020#line $LINENO "configure"
10021#include "confdefs.h"
10022$ac_includes_default
10023#include <cthreads.h>
10024_ACEOF
10025rm -f conftest.$ac_objext
10026if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10027 (eval $ac_compile) 2>&5
10028 ac_status=$?
10029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10030 (exit $ac_status); } &&
10031 { ac_try='test -s conftest.$ac_objext'
10032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10033 (eval $ac_try) 2>&5
10034 ac_status=$?
10035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10036 (exit $ac_status); }; }; then
10037 ac_header_compiler=yes
10038else
10039 echo "$as_me: failed program was:" >&5
10040cat conftest.$ac_ext >&5
10041ac_header_compiler=no
10042fi
10043rm -f conftest.$ac_objext conftest.$ac_ext
10044echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10045echo "${ECHO_T}$ac_header_compiler" >&6
10046
10047# Is the header present?
10048echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10049echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10050cat >conftest.$ac_ext <<_ACEOF
10051#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010052#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010053#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010054_ACEOF
10055if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10056 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10057 ac_status=$?
10058 egrep -v '^ *\+' conftest.er1 >conftest.err
10059 rm -f conftest.er1
10060 cat conftest.err >&5
10061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10062 (exit $ac_status); } >/dev/null; then
10063 if test -s conftest.err; then
10064 ac_cpp_err=$ac_c_preproc_warn_flag
10065 else
10066 ac_cpp_err=
10067 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010068else
Martin v. Löwis11437992002-04-12 09:54:03 +000010069 ac_cpp_err=yes
10070fi
10071if test -z "$ac_cpp_err"; then
10072 ac_header_preproc=yes
10073else
10074 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +000010075 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010076 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010077fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010078rm -f conftest.err conftest.$ac_ext
10079echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10080echo "${ECHO_T}$ac_header_preproc" >&6
10081
10082# So? What about this header?
10083case $ac_header_compiler:$ac_header_preproc in
10084 yes:no )
10085 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10086echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10087 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10088echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10089 no:yes )
10090 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10091echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10092 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10093echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10094 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10095echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10096esac
10097echo "$as_me:$LINENO: checking for cthreads.h" >&5
10098echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10099if test "${ac_cv_header_cthreads_h+set}" = set; then
10100 echo $ECHO_N "(cached) $ECHO_C" >&6
10101else
10102 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010103fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010104echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10105echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10106
10107fi
10108if test $ac_cv_header_cthreads_h = yes; then
10109 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010110#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010111_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010112
Martin v. Löwis11437992002-04-12 09:54:03 +000010113 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010114#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010115_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010116
Martin v. Löwis11437992002-04-12 09:54:03 +000010117
10118cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010119#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010120_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010121
10122 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010123 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010124else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010125
Martin v. Löwis11437992002-04-12 09:54:03 +000010126 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10127 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10128echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10129if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10130 echo $ECHO_N "(cached) $ECHO_C" >&6
10131fi
10132echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10133echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010134else
Martin v. Löwis11437992002-04-12 09:54:03 +000010135 # Is the header compilable?
10136echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10137echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10138cat >conftest.$ac_ext <<_ACEOF
10139#line $LINENO "configure"
10140#include "confdefs.h"
10141$ac_includes_default
10142#include <mach/cthreads.h>
10143_ACEOF
10144rm -f conftest.$ac_objext
10145if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10146 (eval $ac_compile) 2>&5
10147 ac_status=$?
10148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10149 (exit $ac_status); } &&
10150 { ac_try='test -s conftest.$ac_objext'
10151 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10152 (eval $ac_try) 2>&5
10153 ac_status=$?
10154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10155 (exit $ac_status); }; }; then
10156 ac_header_compiler=yes
10157else
10158 echo "$as_me: failed program was:" >&5
10159cat conftest.$ac_ext >&5
10160ac_header_compiler=no
10161fi
10162rm -f conftest.$ac_objext conftest.$ac_ext
10163echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10164echo "${ECHO_T}$ac_header_compiler" >&6
10165
10166# Is the header present?
10167echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10168echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10169cat >conftest.$ac_ext <<_ACEOF
10170#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010171#include "confdefs.h"
10172#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010173_ACEOF
10174if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10175 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10176 ac_status=$?
10177 egrep -v '^ *\+' conftest.er1 >conftest.err
10178 rm -f conftest.er1
10179 cat conftest.err >&5
10180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10181 (exit $ac_status); } >/dev/null; then
10182 if test -s conftest.err; then
10183 ac_cpp_err=$ac_c_preproc_warn_flag
10184 else
10185 ac_cpp_err=
10186 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010187else
Martin v. Löwis11437992002-04-12 09:54:03 +000010188 ac_cpp_err=yes
10189fi
10190if test -z "$ac_cpp_err"; then
10191 ac_header_preproc=yes
10192else
10193 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010194 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010195 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010196fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010197rm -f conftest.err conftest.$ac_ext
10198echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10199echo "${ECHO_T}$ac_header_preproc" >&6
10200
10201# So? What about this header?
10202case $ac_header_compiler:$ac_header_preproc in
10203 yes:no )
10204 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10205echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10206 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10207echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10208 no:yes )
10209 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10210echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10211 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10212echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10213 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10214echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10215esac
10216echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10217echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10218if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10219 echo $ECHO_N "(cached) $ECHO_C" >&6
10220else
10221 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010222fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010223echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10224echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10225
10226fi
10227if test $ac_cv_header_mach_cthreads_h = yes; then
10228 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010229#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010230_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010231
Martin v. Löwis11437992002-04-12 09:54:03 +000010232 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010233#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010234_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010235
Martin v. Löwis11437992002-04-12 09:54:03 +000010236
10237cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010238#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010239_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010240
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010241 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010242else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010243
Martin v. Löwis11437992002-04-12 09:54:03 +000010244 echo "$as_me:$LINENO: checking for --with-pth" >&5
10245echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10246
10247# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010248if test "${with_pth+set}" = set; then
10249 withval="$with_pth"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010250
Martin v. Löwis11437992002-04-12 09:54:03 +000010251 echo "$as_me:$LINENO: result: $withval" >&5
10252echo "${ECHO_T}$withval" >&6
10253 cat >>confdefs.h <<\_ACEOF
10254#define WITH_THREAD 1
10255_ACEOF
10256
10257
10258cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010259#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010260_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010261
Martin v. Löwis130fb172001-07-19 11:00:41 +000010262 LIBS="-lpth $LIBS"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010263 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010264else
Martin v. Löwis11437992002-04-12 09:54:03 +000010265
10266 echo "$as_me:$LINENO: result: no" >&5
10267echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010268
10269 # Just looking for pthread_create in libpthread is not enough:
10270 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10271 # So we really have to include pthread.h, and then link.
10272 _libs=$LIBS
10273 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010274 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10275echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10276 cat >conftest.$ac_ext <<_ACEOF
10277#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010278#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010279#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010280
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010281void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010282#ifdef F77_DUMMY_MAIN
10283# ifdef __cplusplus
10284 extern "C"
10285# endif
10286 int F77_DUMMY_MAIN() { return 1; }
10287#endif
10288int
10289main ()
10290{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010291
10292pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010293 ;
10294 return 0;
10295}
10296_ACEOF
10297rm -f conftest.$ac_objext conftest$ac_exeext
10298if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10299 (eval $ac_link) 2>&5
10300 ac_status=$?
10301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10302 (exit $ac_status); } &&
10303 { ac_try='test -s conftest$ac_exeext'
10304 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10305 (eval $ac_try) 2>&5
10306 ac_status=$?
10307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10308 (exit $ac_status); }; }; then
10309
10310 echo "$as_me:$LINENO: result: yes" >&5
10311echo "${ECHO_T}yes" >&6
10312 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010313#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010314_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010315
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010316 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010317 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010318else
Martin v. Löwis11437992002-04-12 09:54:03 +000010319 echo "$as_me: failed program was:" >&5
10320cat conftest.$ac_ext >&5
10321
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010322 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010323 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10324echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10325if test "${ac_cv_func_pthread_detach+set}" = set; then
10326 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010327else
Martin v. Löwis11437992002-04-12 09:54:03 +000010328 cat >conftest.$ac_ext <<_ACEOF
10329#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010330#include "confdefs.h"
10331/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010332 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010333#include <assert.h>
10334/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010335#ifdef __cplusplus
10336extern "C"
10337#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010338/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010339 builtin and then its argument prototype would still apply. */
10340char pthread_detach ();
10341char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010342
Martin v. Löwis11437992002-04-12 09:54:03 +000010343#ifdef F77_DUMMY_MAIN
10344# ifdef __cplusplus
10345 extern "C"
10346# endif
10347 int F77_DUMMY_MAIN() { return 1; }
10348#endif
10349int
10350main ()
10351{
Guido van Rossumad678af1998-10-02 14:42:15 +000010352/* The GNU C library defines this for functions which it implements
10353 to always fail with ENOSYS. Some functions are actually named
10354 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010355#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010356choke me
10357#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010358f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +000010359#endif
10360
Martin v. Löwis11437992002-04-12 09:54:03 +000010361 ;
10362 return 0;
10363}
10364_ACEOF
10365rm -f conftest.$ac_objext conftest$ac_exeext
10366if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10367 (eval $ac_link) 2>&5
10368 ac_status=$?
10369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10370 (exit $ac_status); } &&
10371 { ac_try='test -s conftest$ac_exeext'
10372 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10373 (eval $ac_try) 2>&5
10374 ac_status=$?
10375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10376 (exit $ac_status); }; }; then
10377 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010378else
Martin v. Löwis11437992002-04-12 09:54:03 +000010379 echo "$as_me: failed program was:" >&5
10380cat conftest.$ac_ext >&5
10381ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010382fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010383rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010384fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010385echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10386echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10387if test $ac_cv_func_pthread_detach = yes; then
10388 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010389#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010390_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010391
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010392 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010393 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010394else
Guido van Rossumad678af1998-10-02 14:42:15 +000010395
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010396 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10397 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10398echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10399if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10400 echo $ECHO_N "(cached) $ECHO_C" >&6
10401fi
10402echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10403echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10404else
10405 # Is the header compilable?
10406echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10407echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10408cat >conftest.$ac_ext <<_ACEOF
10409#line $LINENO "configure"
10410#include "confdefs.h"
10411$ac_includes_default
10412#include <atheos/threads.h>
10413_ACEOF
10414rm -f conftest.$ac_objext
10415if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10416 (eval $ac_compile) 2>&5
10417 ac_status=$?
10418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10419 (exit $ac_status); } &&
10420 { ac_try='test -s conftest.$ac_objext'
10421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10422 (eval $ac_try) 2>&5
10423 ac_status=$?
10424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10425 (exit $ac_status); }; }; then
10426 ac_header_compiler=yes
10427else
10428 echo "$as_me: failed program was:" >&5
10429cat conftest.$ac_ext >&5
10430ac_header_compiler=no
10431fi
10432rm -f conftest.$ac_objext conftest.$ac_ext
10433echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10434echo "${ECHO_T}$ac_header_compiler" >&6
10435
10436# Is the header present?
10437echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10438echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10439cat >conftest.$ac_ext <<_ACEOF
10440#line $LINENO "configure"
10441#include "confdefs.h"
10442#include <atheos/threads.h>
10443_ACEOF
10444if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10445 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10446 ac_status=$?
10447 egrep -v '^ *\+' conftest.er1 >conftest.err
10448 rm -f conftest.er1
10449 cat conftest.err >&5
10450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10451 (exit $ac_status); } >/dev/null; then
10452 if test -s conftest.err; then
10453 ac_cpp_err=$ac_c_preproc_warn_flag
10454 else
10455 ac_cpp_err=
10456 fi
10457else
10458 ac_cpp_err=yes
10459fi
10460if test -z "$ac_cpp_err"; then
10461 ac_header_preproc=yes
10462else
10463 echo "$as_me: failed program was:" >&5
10464 cat conftest.$ac_ext >&5
10465 ac_header_preproc=no
10466fi
10467rm -f conftest.err conftest.$ac_ext
10468echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10469echo "${ECHO_T}$ac_header_preproc" >&6
10470
10471# So? What about this header?
10472case $ac_header_compiler:$ac_header_preproc in
10473 yes:no )
10474 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10475echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10476 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10477echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10478 no:yes )
10479 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10480echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10481 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10482echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10483 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10484echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10485esac
10486echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10487echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10488if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10489 echo $ECHO_N "(cached) $ECHO_C" >&6
10490else
10491 ac_cv_header_atheos_threads_h=$ac_header_preproc
10492fi
10493echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10494echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10495
10496fi
10497if test $ac_cv_header_atheos_threads_h = yes; then
10498 cat >>confdefs.h <<\_ACEOF
10499#define WITH_THREAD 1
10500_ACEOF
10501
10502
10503cat >>confdefs.h <<\_ACEOF
10504#define ATHEOS_THREADS 1
10505_ACEOF
10506
10507 THREADOBJ="Python/thread.o"
10508else
10509
Martin v. Löwis11437992002-04-12 09:54:03 +000010510 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10511 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10512echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10513if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10514 echo $ECHO_N "(cached) $ECHO_C" >&6
10515fi
10516echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10517echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010518else
Martin v. Löwis11437992002-04-12 09:54:03 +000010519 # Is the header compilable?
10520echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10521echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10522cat >conftest.$ac_ext <<_ACEOF
10523#line $LINENO "configure"
10524#include "confdefs.h"
10525$ac_includes_default
10526#include <kernel/OS.h>
10527_ACEOF
10528rm -f conftest.$ac_objext
10529if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10530 (eval $ac_compile) 2>&5
10531 ac_status=$?
10532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10533 (exit $ac_status); } &&
10534 { ac_try='test -s conftest.$ac_objext'
10535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10536 (eval $ac_try) 2>&5
10537 ac_status=$?
10538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10539 (exit $ac_status); }; }; then
10540 ac_header_compiler=yes
10541else
10542 echo "$as_me: failed program was:" >&5
10543cat conftest.$ac_ext >&5
10544ac_header_compiler=no
10545fi
10546rm -f conftest.$ac_objext conftest.$ac_ext
10547echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10548echo "${ECHO_T}$ac_header_compiler" >&6
10549
10550# Is the header present?
10551echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10552echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10553cat >conftest.$ac_ext <<_ACEOF
10554#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010555#include "confdefs.h"
10556#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010557_ACEOF
10558if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10559 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10560 ac_status=$?
10561 egrep -v '^ *\+' conftest.er1 >conftest.err
10562 rm -f conftest.er1
10563 cat conftest.err >&5
10564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10565 (exit $ac_status); } >/dev/null; then
10566 if test -s conftest.err; then
10567 ac_cpp_err=$ac_c_preproc_warn_flag
10568 else
10569 ac_cpp_err=
10570 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010571else
Martin v. Löwis11437992002-04-12 09:54:03 +000010572 ac_cpp_err=yes
10573fi
10574if test -z "$ac_cpp_err"; then
10575 ac_header_preproc=yes
10576else
10577 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010578 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010579 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010580fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010581rm -f conftest.err conftest.$ac_ext
10582echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10583echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010584
Martin v. Löwis11437992002-04-12 09:54:03 +000010585# So? What about this header?
10586case $ac_header_compiler:$ac_header_preproc in
10587 yes:no )
10588 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10589echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10590 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10591echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10592 no:yes )
10593 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10594echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10595 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10596echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10597 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10598echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10599esac
10600echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10601echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10602if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10603 echo $ECHO_N "(cached) $ECHO_C" >&6
10604else
10605 ac_cv_header_kernel_OS_h=$ac_header_preproc
10606fi
10607echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10608echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10609
10610fi
10611if test $ac_cv_header_kernel_OS_h = yes; then
10612 cat >>confdefs.h <<\_ACEOF
10613#define WITH_THREAD 1
10614_ACEOF
10615
10616
10617cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010618#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010619_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010620
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010621 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010622else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010623
Martin v. Löwis11437992002-04-12 09:54:03 +000010624 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10625echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10626if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10627 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010628else
Martin v. Löwis11437992002-04-12 09:54:03 +000010629 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010630LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010631cat >conftest.$ac_ext <<_ACEOF
10632#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010633#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010634
Greg Steinadf63d62000-07-05 10:38:09 +000010635/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010636#ifdef __cplusplus
10637extern "C"
10638#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010639/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010640 builtin and then its argument prototype would still apply. */
10641char pthread_create ();
10642#ifdef F77_DUMMY_MAIN
10643# ifdef __cplusplus
10644 extern "C"
10645# endif
10646 int F77_DUMMY_MAIN() { return 1; }
10647#endif
10648int
10649main ()
10650{
10651pthread_create ();
10652 ;
10653 return 0;
10654}
10655_ACEOF
10656rm -f conftest.$ac_objext conftest$ac_exeext
10657if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10658 (eval $ac_link) 2>&5
10659 ac_status=$?
10660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10661 (exit $ac_status); } &&
10662 { ac_try='test -s conftest$ac_exeext'
10663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10664 (eval $ac_try) 2>&5
10665 ac_status=$?
10666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10667 (exit $ac_status); }; }; then
10668 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010669else
Martin v. Löwis11437992002-04-12 09:54:03 +000010670 echo "$as_me: failed program was:" >&5
10671cat conftest.$ac_ext >&5
10672ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010673fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010674rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10675LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010676fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010677echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10678echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10679if test $ac_cv_lib_pthreads_pthread_create = yes; then
10680 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010681#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010682_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010683
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010684 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010685 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010686 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010687else
Greg Steinadf63d62000-07-05 10:38:09 +000010688
Martin v. Löwis11437992002-04-12 09:54:03 +000010689 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10690echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10691if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10692 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010693else
Martin v. Löwis11437992002-04-12 09:54:03 +000010694 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010695LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010696cat >conftest.$ac_ext <<_ACEOF
10697#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010698#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010699
Guido van Rossum49545951997-12-02 19:28:29 +000010700/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010701#ifdef __cplusplus
10702extern "C"
10703#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010704/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010705 builtin and then its argument prototype would still apply. */
10706char pthread_create ();
10707#ifdef F77_DUMMY_MAIN
10708# ifdef __cplusplus
10709 extern "C"
10710# endif
10711 int F77_DUMMY_MAIN() { return 1; }
10712#endif
10713int
10714main ()
10715{
10716pthread_create ();
10717 ;
10718 return 0;
10719}
10720_ACEOF
10721rm -f conftest.$ac_objext conftest$ac_exeext
10722if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10723 (eval $ac_link) 2>&5
10724 ac_status=$?
10725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10726 (exit $ac_status); } &&
10727 { ac_try='test -s conftest$ac_exeext'
10728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10729 (eval $ac_try) 2>&5
10730 ac_status=$?
10731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10732 (exit $ac_status); }; }; then
10733 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010734else
Martin v. Löwis11437992002-04-12 09:54:03 +000010735 echo "$as_me: failed program was:" >&5
10736cat conftest.$ac_ext >&5
10737ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010738fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010739rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10740LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010741fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010742echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10743echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10744if test $ac_cv_lib_c_r_pthread_create = yes; then
10745 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010746#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010747_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010748
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010749 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010750 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010751 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010752else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010753
Martin v. Löwis11437992002-04-12 09:54:03 +000010754 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10755echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10756if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10757 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010758else
Martin v. Löwis11437992002-04-12 09:54:03 +000010759 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010760LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010761cat >conftest.$ac_ext <<_ACEOF
10762#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010763#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010764
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010765/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010766#ifdef __cplusplus
10767extern "C"
10768#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010769/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010770 builtin and then its argument prototype would still apply. */
10771char __d6_pthread_create ();
10772#ifdef F77_DUMMY_MAIN
10773# ifdef __cplusplus
10774 extern "C"
10775# endif
10776 int F77_DUMMY_MAIN() { return 1; }
10777#endif
10778int
10779main ()
10780{
10781__d6_pthread_create ();
10782 ;
10783 return 0;
10784}
10785_ACEOF
10786rm -f conftest.$ac_objext conftest$ac_exeext
10787if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10788 (eval $ac_link) 2>&5
10789 ac_status=$?
10790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10791 (exit $ac_status); } &&
10792 { ac_try='test -s conftest$ac_exeext'
10793 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10794 (eval $ac_try) 2>&5
10795 ac_status=$?
10796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10797 (exit $ac_status); }; }; then
10798 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010799else
Martin v. Löwis11437992002-04-12 09:54:03 +000010800 echo "$as_me: failed program was:" >&5
10801cat conftest.$ac_ext >&5
10802ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010803fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010804rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10805LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010806fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010807echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10808echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10809if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10810 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010811#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010812_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010813
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010814 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010815 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010816 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010817else
Guido van Rossum49545951997-12-02 19:28:29 +000010818
Martin v. Löwis11437992002-04-12 09:54:03 +000010819 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10820echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10821if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10822 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010823else
Martin v. Löwis11437992002-04-12 09:54:03 +000010824 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010825LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010826cat >conftest.$ac_ext <<_ACEOF
10827#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010828#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010829
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010830/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010831#ifdef __cplusplus
10832extern "C"
10833#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010834/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010835 builtin and then its argument prototype would still apply. */
10836char __pthread_create_system ();
10837#ifdef F77_DUMMY_MAIN
10838# ifdef __cplusplus
10839 extern "C"
10840# endif
10841 int F77_DUMMY_MAIN() { return 1; }
10842#endif
10843int
10844main ()
10845{
10846__pthread_create_system ();
10847 ;
10848 return 0;
10849}
10850_ACEOF
10851rm -f conftest.$ac_objext conftest$ac_exeext
10852if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10853 (eval $ac_link) 2>&5
10854 ac_status=$?
10855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10856 (exit $ac_status); } &&
10857 { ac_try='test -s conftest$ac_exeext'
10858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10859 (eval $ac_try) 2>&5
10860 ac_status=$?
10861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10862 (exit $ac_status); }; }; then
10863 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010864else
Martin v. Löwis11437992002-04-12 09:54:03 +000010865 echo "$as_me: failed program was:" >&5
10866cat conftest.$ac_ext >&5
10867ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010868fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010869rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10870LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010871fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010872echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10873echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
10874if test $ac_cv_lib_pthread___pthread_create_system = yes; then
10875 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010876#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010877_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010878
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010879 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010880 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010881 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010882else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010883
Martin v. Löwis11437992002-04-12 09:54:03 +000010884 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
10885echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
10886if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
10887 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010888else
Martin v. Löwis11437992002-04-12 09:54:03 +000010889 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010890LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010891cat >conftest.$ac_ext <<_ACEOF
10892#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010893#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010894
Guido van Rossumb93a8621998-05-07 13:27:32 +000010895/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010896#ifdef __cplusplus
10897extern "C"
10898#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000010899/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010900 builtin and then its argument prototype would still apply. */
10901char pthread_create ();
10902#ifdef F77_DUMMY_MAIN
10903# ifdef __cplusplus
10904 extern "C"
10905# endif
10906 int F77_DUMMY_MAIN() { return 1; }
10907#endif
10908int
10909main ()
10910{
10911pthread_create ();
10912 ;
10913 return 0;
10914}
10915_ACEOF
10916rm -f conftest.$ac_objext conftest$ac_exeext
10917if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10918 (eval $ac_link) 2>&5
10919 ac_status=$?
10920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10921 (exit $ac_status); } &&
10922 { ac_try='test -s conftest$ac_exeext'
10923 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10924 (eval $ac_try) 2>&5
10925 ac_status=$?
10926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10927 (exit $ac_status); }; }; then
10928 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010929else
Martin v. Löwis11437992002-04-12 09:54:03 +000010930 echo "$as_me: failed program was:" >&5
10931cat conftest.$ac_ext >&5
10932ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010933fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010934rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10935LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010936fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010937echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
10938echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
10939if test $ac_cv_lib_cma_pthread_create = yes; then
10940 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010941#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010942_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010943
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010944 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010945 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010946 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010947else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010948
Martin v. Löwis130fb172001-07-19 11:00:41 +000010949 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010950fi
10951
Guido van Rossum627b2d71993-12-24 10:39:16 +000010952
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010953fi
10954
Guido van Rossum0be3e491997-05-22 20:33:33 +000010955fi
10956
Guido van Rossum49545951997-12-02 19:28:29 +000010957fi
10958
Guido van Rossumb93a8621998-05-07 13:27:32 +000010959fi
10960
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010961fi
10962
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010963
Michael W. Hudson54241132001-12-07 15:38:26 +000010964fi
10965
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010966
10967fi
10968
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010969fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010970rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10971fi;
10972fi
10973
10974
10975fi
10976
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010977
Michael W. Hudson54241132001-12-07 15:38:26 +000010978
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010979 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010980 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010981
10982cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010983#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010984_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010985
10986 fi
10987
Martin v. Löwis11437992002-04-12 09:54:03 +000010988 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10989echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
10990 if test "${ac_cv_pthread_system_supported+set}" = set; then
10991 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010992else
10993 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010994 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010995else
Martin v. Löwis11437992002-04-12 09:54:03 +000010996 cat >conftest.$ac_ext <<_ACEOF
10997#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010998#include "confdefs.h"
10999#include <pthread.h>
11000 void *foo(void *parm) {
11001 return NULL;
11002 }
11003 main() {
11004 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011005 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011006 if (pthread_attr_init(&attr)) exit(-1);
11007 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011008 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011009 exit(0);
11010 }
Martin v. Löwis11437992002-04-12 09:54:03 +000011011_ACEOF
11012rm -f conftest$ac_exeext
11013if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11014 (eval $ac_link) 2>&5
11015 ac_status=$?
11016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11017 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11018 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11019 (eval $ac_try) 2>&5
11020 ac_status=$?
11021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11022 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011023 ac_cv_pthread_system_supported=yes
11024else
Martin v. Löwis11437992002-04-12 09:54:03 +000011025 echo "$as_me: program exited with status $ac_status" >&5
11026echo "$as_me: failed program was:" >&5
11027cat conftest.$ac_ext >&5
11028( exit $ac_status )
11029ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011030fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011031rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011032fi
11033
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011034fi
11035
Martin v. Löwis11437992002-04-12 09:54:03 +000011036 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11037echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011038 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011039
11040cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011041#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011042_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011043
11044 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011045
11046for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011047do
Martin v. Löwis11437992002-04-12 09:54:03 +000011048as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11049echo "$as_me:$LINENO: checking for $ac_func" >&5
11050echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11051if eval "test \"\${$as_ac_var+set}\" = set"; then
11052 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011053else
Martin v. Löwis11437992002-04-12 09:54:03 +000011054 cat >conftest.$ac_ext <<_ACEOF
11055#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011056#include "confdefs.h"
11057/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011058 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011059#include <assert.h>
11060/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011061#ifdef __cplusplus
11062extern "C"
11063#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011064/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011065 builtin and then its argument prototype would still apply. */
11066char $ac_func ();
11067char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011068
Martin v. Löwis11437992002-04-12 09:54:03 +000011069#ifdef F77_DUMMY_MAIN
11070# ifdef __cplusplus
11071 extern "C"
11072# endif
11073 int F77_DUMMY_MAIN() { return 1; }
11074#endif
11075int
11076main ()
11077{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011078/* The GNU C library defines this for functions which it implements
11079 to always fail with ENOSYS. Some functions are actually named
11080 something starting with __ and the normal name is an alias. */
11081#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11082choke me
11083#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011084f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011085#endif
11086
Martin v. Löwis11437992002-04-12 09:54:03 +000011087 ;
11088 return 0;
11089}
11090_ACEOF
11091rm -f conftest.$ac_objext conftest$ac_exeext
11092if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11093 (eval $ac_link) 2>&5
11094 ac_status=$?
11095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11096 (exit $ac_status); } &&
11097 { ac_try='test -s conftest$ac_exeext'
11098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11099 (eval $ac_try) 2>&5
11100 ac_status=$?
11101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11102 (exit $ac_status); }; }; then
11103 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011104else
Martin v. Löwis11437992002-04-12 09:54:03 +000011105 echo "$as_me: failed program was:" >&5
11106cat conftest.$ac_ext >&5
11107eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011108fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011109rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011110fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011111echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11112echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11113if test `eval echo '${'$as_ac_var'}'` = yes; then
11114 cat >>confdefs.h <<_ACEOF
11115#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11116_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011117
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011118fi
11119done
11120
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011121 fi
11122
Martin v. Löwis11437992002-04-12 09:54:03 +000011123 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11124echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11125if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11126 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011127else
Martin v. Löwis11437992002-04-12 09:54:03 +000011128 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011129LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011130cat >conftest.$ac_ext <<_ACEOF
11131#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011132#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011133
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011134/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011135#ifdef __cplusplus
11136extern "C"
11137#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011138/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011139 builtin and then its argument prototype would still apply. */
11140char usconfig ();
11141#ifdef F77_DUMMY_MAIN
11142# ifdef __cplusplus
11143 extern "C"
11144# endif
11145 int F77_DUMMY_MAIN() { return 1; }
11146#endif
11147int
11148main ()
11149{
11150usconfig ();
11151 ;
11152 return 0;
11153}
11154_ACEOF
11155rm -f conftest.$ac_objext conftest$ac_exeext
11156if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11157 (eval $ac_link) 2>&5
11158 ac_status=$?
11159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11160 (exit $ac_status); } &&
11161 { ac_try='test -s conftest$ac_exeext'
11162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11163 (eval $ac_try) 2>&5
11164 ac_status=$?
11165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11166 (exit $ac_status); }; }; then
11167 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011168else
Martin v. Löwis11437992002-04-12 09:54:03 +000011169 echo "$as_me: failed program was:" >&5
11170cat conftest.$ac_ext >&5
11171ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011172fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011173rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11174LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011175fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011176echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11177echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11178if test $ac_cv_lib_mpc_usconfig = yes; then
11179 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011180#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011181_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011182
Martin v. Löwis130fb172001-07-19 11:00:41 +000011183 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011184 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011185 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011186fi
11187
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011188
Martin v. Löwis11437992002-04-12 09:54:03 +000011189 if test $posix_threads != "yes"; then
11190 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11191echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11192if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11193 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011194else
Martin v. Löwis11437992002-04-12 09:54:03 +000011195 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011196LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011197cat >conftest.$ac_ext <<_ACEOF
11198#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011199#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011200
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011201/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011202#ifdef __cplusplus
11203extern "C"
11204#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011205/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011206 builtin and then its argument prototype would still apply. */
11207char thr_create ();
11208#ifdef F77_DUMMY_MAIN
11209# ifdef __cplusplus
11210 extern "C"
11211# endif
11212 int F77_DUMMY_MAIN() { return 1; }
11213#endif
11214int
11215main ()
11216{
11217thr_create ();
11218 ;
11219 return 0;
11220}
11221_ACEOF
11222rm -f conftest.$ac_objext conftest$ac_exeext
11223if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11224 (eval $ac_link) 2>&5
11225 ac_status=$?
11226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11227 (exit $ac_status); } &&
11228 { ac_try='test -s conftest$ac_exeext'
11229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11230 (eval $ac_try) 2>&5
11231 ac_status=$?
11232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11233 (exit $ac_status); }; }; then
11234 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011235else
Martin v. Löwis11437992002-04-12 09:54:03 +000011236 echo "$as_me: failed program was:" >&5
11237cat conftest.$ac_ext >&5
11238ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011239fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011240rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11241LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011242fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011243echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11244echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11245if test $ac_cv_lib_thread_thr_create = yes; then
11246 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011247#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011248_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011249
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011250 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011251 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011252 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011253fi
11254
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011255 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011256
Martin v. Löwis130fb172001-07-19 11:00:41 +000011257 if test "$USE_THREAD_MODULE" != "#"
11258 then
11259 # If the above checks didn't disable threads, (at least) OSF1
11260 # needs this '-threads' argument during linking.
11261 case $ac_sys_system in
11262 OSF1) LDLAST=-threads;;
11263 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011264 fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011265
11266 if test "$posix_threads" = yes -a \
11267 "$ac_sys_system" = "SunOS" -a \
11268 "$ac_sys_release" = "5.6"; then
11269
11270cat >>confdefs.h <<\_ACEOF
11271#define HAVE_PTHREAD_DESTRUCTOR 1
11272_ACEOF
11273
11274 fi
11275
Guido van Rossum627b2d71993-12-24 10:39:16 +000011276fi
11277
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011278# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011279
11280
11281echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11282echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011283# Check whether --enable-ipv6 or --disable-ipv6 was given.
11284if test "${enable_ipv6+set}" = set; then
11285 enableval="$enable_ipv6"
11286 case "$enableval" in
11287 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011288 echo "$as_me:$LINENO: result: no" >&5
11289echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011290 ipv6=no
11291 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011292 *) echo "$as_me:$LINENO: result: yes" >&5
11293echo "${ECHO_T}yes" >&6
11294 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011295#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011296_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011297
11298 ipv6=yes
11299 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011300 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011301else
Martin v. Löwis11437992002-04-12 09:54:03 +000011302
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011303 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011304 echo "$as_me:$LINENO: result: no" >&5
11305echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011306 ipv6=no
11307
11308else
Martin v. Löwis11437992002-04-12 09:54:03 +000011309 cat >conftest.$ac_ext <<_ACEOF
11310#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011311#include "confdefs.h"
11312 /* AF_INET6 available check */
11313#include <sys/types.h>
11314#include <sys/socket.h>
11315main()
11316{
11317 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11318 exit(1);
11319 else
11320 exit(0);
11321}
11322
Martin v. Löwis11437992002-04-12 09:54:03 +000011323_ACEOF
11324rm -f conftest$ac_exeext
11325if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11326 (eval $ac_link) 2>&5
11327 ac_status=$?
11328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11329 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11330 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11331 (eval $ac_try) 2>&5
11332 ac_status=$?
11333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11334 (exit $ac_status); }; }; then
11335 echo "$as_me:$LINENO: result: yes" >&5
11336echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011337 ipv6=yes
11338else
Martin v. Löwis11437992002-04-12 09:54:03 +000011339 echo "$as_me: program exited with status $ac_status" >&5
11340echo "$as_me: failed program was:" >&5
11341cat conftest.$ac_ext >&5
11342( exit $ac_status )
11343echo "$as_me:$LINENO: result: no" >&5
11344echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011345 ipv6=no
11346fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011347rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011348fi
11349
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011350if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011351 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11352echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11353 cat >conftest.$ac_ext <<_ACEOF
11354#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011355#include "confdefs.h"
11356#include <sys/types.h>
11357#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011358#ifdef F77_DUMMY_MAIN
11359# ifdef __cplusplus
11360 extern "C"
11361# endif
11362 int F77_DUMMY_MAIN() { return 1; }
11363#endif
11364int
11365main ()
11366{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011367struct sockaddr_in6 x;
11368x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011369 ;
11370 return 0;
11371}
11372_ACEOF
11373rm -f conftest.$ac_objext
11374if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11375 (eval $ac_compile) 2>&5
11376 ac_status=$?
11377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11378 (exit $ac_status); } &&
11379 { ac_try='test -s conftest.$ac_objext'
11380 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11381 (eval $ac_try) 2>&5
11382 ac_status=$?
11383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11384 (exit $ac_status); }; }; then
11385 echo "$as_me:$LINENO: result: yes" >&5
11386echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011387 ipv6=yes
11388else
Martin v. Löwis11437992002-04-12 09:54:03 +000011389 echo "$as_me: failed program was:" >&5
11390cat conftest.$ac_ext >&5
11391echo "$as_me:$LINENO: result: no" >&5
11392echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011393 ipv6=no
11394fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011395rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011396fi
11397
11398if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011399 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011400#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011401_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011402
11403fi
11404
Martin v. Löwis11437992002-04-12 09:54:03 +000011405fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011406
11407ipv6type=unknown
11408ipv6lib=none
11409ipv6trylibc=no
11410
11411if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011412 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11413echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011414 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11415 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011416 case $i in
11417 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011418 cat >conftest.$ac_ext <<_ACEOF
11419#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011420#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011421
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011422#include <netinet/in.h>
11423#ifdef IPV6_INRIA_VERSION
11424yes
11425#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011426_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011427if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11428 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011429 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011430fi
11431rm -f conftest*
11432
11433 ;;
11434 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011435 cat >conftest.$ac_ext <<_ACEOF
11436#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011437#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011438
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011439#include <netinet/in.h>
11440#ifdef __KAME__
11441yes
11442#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011443_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011444if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11445 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011446 ipv6type=$i;
11447 ipv6lib=inet6
11448 ipv6libdir=/usr/local/v6/lib
11449 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011450fi
11451rm -f conftest*
11452
11453 ;;
11454 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011455 cat >conftest.$ac_ext <<_ACEOF
11456#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011457#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011458
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011459#include <features.h>
11460#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11461yes
11462#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011463_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011464if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11465 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011466 ipv6type=$i;
11467 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011468fi
11469rm -f conftest*
11470
11471 ;;
11472 linux-inet6)
11473 if test -d /usr/inet6; then
11474 ipv6type=$i
11475 ipv6lib=inet6
11476 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011477 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011478 fi
11479 ;;
11480 solaris)
11481 if test -f /etc/netconfig; then
11482 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11483 ipv6type=$i
11484 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011485 fi
11486 fi
11487 ;;
11488 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011489 cat >conftest.$ac_ext <<_ACEOF
11490#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011491#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011492
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011493#include <sys/param.h>
11494#ifdef _TOSHIBA_INET6
11495yes
11496#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011497_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011498if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11499 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011500 ipv6type=$i;
11501 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011502 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011503fi
11504rm -f conftest*
11505
11506 ;;
11507 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011508 cat >conftest.$ac_ext <<_ACEOF
11509#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011510#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011511
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011512#include </usr/local/v6/include/sys/v6config.h>
11513#ifdef __V6D__
11514yes
11515#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011516_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011517if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11518 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011519 ipv6type=$i;
11520 ipv6lib=v6;
11521 ipv6libdir=/usr/local/v6/lib;
11522 OPT="-I/usr/local/v6/include $OPT"
11523fi
11524rm -f conftest*
11525
11526 ;;
11527 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011528 cat >conftest.$ac_ext <<_ACEOF
11529#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011530#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011531
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011532#include <sys/param.h>
11533#ifdef _ZETA_MINAMI_INET6
11534yes
11535#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011536_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011537if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11538 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011539 ipv6type=$i;
11540 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011541 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011542fi
11543rm -f conftest*
11544
11545 ;;
11546 esac
11547 if test "$ipv6type" != "unknown"; then
11548 break
11549 fi
11550 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011551 echo "$as_me:$LINENO: result: $ipv6type" >&5
11552echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011553fi
11554
11555if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11556 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11557 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11558 echo "using lib$ipv6lib"
11559 else
11560 if test $ipv6trylibc = "yes"; then
11561 echo "using libc"
11562 else
11563 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11564 echo "You need to fetch lib$ipv6lib.a from appropriate"
11565 echo 'ipv6 kit and compile beforehand.'
11566 exit 1
11567 fi
11568 fi
11569fi
11570
Jack Jansen7b8c7542002-04-14 20:12:41 +000011571# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000011572echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
11573echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000011574
11575# Check whether --with-universal-newlines or --without-universal-newlines was given.
11576if test "${with_universal_newlines+set}" = set; then
11577 withval="$with_universal_newlines"
11578
11579fi;
11580
11581if test -z "$with_universal_newlines"
11582then with_universal_newlines="yes"
11583fi
11584if test "$with_universal_newlines" != "no"
11585then
Martin v. Löwise8aea582002-04-16 05:51:02 +000011586
11587cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011588#define WITH_UNIVERSAL_NEWLINES 1
11589_ACEOF
11590
11591fi
11592echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11593echo "${ECHO_T}$with_universal_newlines" >&6
11594
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011595# Check for --with-doc-strings
11596echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11597echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11598
11599# Check whether --with-doc-strings or --without-doc-strings was given.
11600if test "${with_doc_strings+set}" = set; then
11601 withval="$with_doc_strings"
11602
11603fi;
11604
11605if test -z "$with_doc_strings"
11606then with_doc_strings="yes"
11607fi
11608if test "$with_doc_strings" != "no"
11609then
11610
11611cat >>confdefs.h <<\_ACEOF
11612#define WITH_DOC_STRINGS 1
11613_ACEOF
11614
11615fi
11616echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11617echo "${ECHO_T}$with_doc_strings" >&6
11618
Neil Schemenauera35c6882001-02-27 04:45:05 +000011619# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011620echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11621echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11622
Neil Schemenauera35c6882001-02-27 04:45:05 +000011623# Check whether --with-pymalloc or --without-pymalloc was given.
11624if test "${with_pymalloc+set}" = set; then
11625 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011626
Martin v. Löwis11437992002-04-12 09:54:03 +000011627fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011628
Neil Schemenauer16c22972002-03-22 15:34:49 +000011629if test -z "$with_pymalloc"
11630then with_pymalloc="yes"
11631fi
11632if test "$with_pymalloc" != "no"
11633then
Martin v. Löwis11437992002-04-12 09:54:03 +000011634
11635cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011636#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011637_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011638
11639fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011640echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11641echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011642
Barry Warsawef82cd72000-06-30 16:21:01 +000011643# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011644echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11645echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11646
Barry Warsawef82cd72000-06-30 16:21:01 +000011647# Check whether --with-wctype-functions or --without-wctype-functions was given.
11648if test "${with_wctype_functions+set}" = set; then
11649 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011650
Barry Warsawef82cd72000-06-30 16:21:01 +000011651if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011652then
11653
11654cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011655#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011656_ACEOF
11657
11658 echo "$as_me:$LINENO: result: yes" >&5
11659echo "${ECHO_T}yes" >&6
11660else echo "$as_me:$LINENO: result: no" >&5
11661echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011662fi
11663else
Martin v. Löwis11437992002-04-12 09:54:03 +000011664 echo "$as_me:$LINENO: result: no" >&5
11665echo "${ECHO_T}no" >&6
11666fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011667
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011668# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011669
Guido van Rossum98935bf2001-09-05 19:13:16 +000011670DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011671
Martin v. Löwis11437992002-04-12 09:54:03 +000011672echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11673echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11674
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011675# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011676if test "${with_sgi_dl+set}" = set; then
11677 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011678
11679echo "$as_me:$LINENO: result: $withval" >&5
11680echo "${ECHO_T}$withval" >&6
11681
11682cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011683#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011684_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011685
Guido van Rossume97ee181999-12-20 21:27:22 +000011686DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011687dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011688if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011689then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011690else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11691echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11692 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011693fi
11694DLINCLDIR=${dldir}
11695LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011696else
Martin v. Löwis11437992002-04-12 09:54:03 +000011697 echo "$as_me:$LINENO: result: no" >&5
11698echo "${ECHO_T}no" >&6
11699fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011700
Martin v. Löwis11437992002-04-12 09:54:03 +000011701echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11702echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011703
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011704# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011705if test "${with_dl_dld+set}" = set; then
11706 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011707
11708echo "$as_me:$LINENO: result: $withval" >&5
11709echo "${ECHO_T}$withval" >&6
11710
11711cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011712#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011713_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011714
Guido van Rossume97ee181999-12-20 21:27:22 +000011715DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011716dldir=`echo "$withval" | sed 's/,.*//'`
11717dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011718if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011719then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011720else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&5
11721echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&2;}
11722 { (exit DLD_DIRECTORY); exit DLD_DIRECTORY; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011723fi
11724DLINCLDIR=${dldir}
11725LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011726else
Martin v. Löwis11437992002-04-12 09:54:03 +000011727 echo "$as_me:$LINENO: result: no" >&5
11728echo "${ECHO_T}no" >&6
11729fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011730
Guido van Rossume97ee181999-12-20 21:27:22 +000011731# the dlopen() function means we might want to use dynload_shlib.o. some
11732# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011733
Thomas Wouters3a584202000-08-05 23:28:51 +000011734for ac_func in dlopen
11735do
Martin v. Löwis11437992002-04-12 09:54:03 +000011736as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11737echo "$as_me:$LINENO: checking for $ac_func" >&5
11738echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11739if eval "test \"\${$as_ac_var+set}\" = set"; then
11740 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011741else
Martin v. Löwis11437992002-04-12 09:54:03 +000011742 cat >conftest.$ac_ext <<_ACEOF
11743#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011744#include "confdefs.h"
11745/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011746 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011747#include <assert.h>
11748/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011749#ifdef __cplusplus
11750extern "C"
11751#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011752/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011753 builtin and then its argument prototype would still apply. */
11754char $ac_func ();
11755char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011756
Martin v. Löwis11437992002-04-12 09:54:03 +000011757#ifdef F77_DUMMY_MAIN
11758# ifdef __cplusplus
11759 extern "C"
11760# endif
11761 int F77_DUMMY_MAIN() { return 1; }
11762#endif
11763int
11764main ()
11765{
Guido van Rossume97ee181999-12-20 21:27:22 +000011766/* The GNU C library defines this for functions which it implements
11767 to always fail with ENOSYS. Some functions are actually named
11768 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011769#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011770choke me
11771#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011772f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011773#endif
11774
Martin v. Löwis11437992002-04-12 09:54:03 +000011775 ;
11776 return 0;
11777}
11778_ACEOF
11779rm -f conftest.$ac_objext conftest$ac_exeext
11780if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11781 (eval $ac_link) 2>&5
11782 ac_status=$?
11783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11784 (exit $ac_status); } &&
11785 { ac_try='test -s conftest$ac_exeext'
11786 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11787 (eval $ac_try) 2>&5
11788 ac_status=$?
11789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11790 (exit $ac_status); }; }; then
11791 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011792else
Martin v. Löwis11437992002-04-12 09:54:03 +000011793 echo "$as_me: failed program was:" >&5
11794cat conftest.$ac_ext >&5
11795eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011796fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011797rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011798fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011799echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11800echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11801if test `eval echo '${'$as_ac_var'}'` = yes; then
11802 cat >>confdefs.h <<_ACEOF
11803#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11804_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011805
Guido van Rossume97ee181999-12-20 21:27:22 +000011806fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011807done
Guido van Rossume97ee181999-12-20 21:27:22 +000011808
Michael W. Hudson54241132001-12-07 15:38:26 +000011809
Guido van Rossume97ee181999-12-20 21:27:22 +000011810# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11811# loading of modules.
11812
Martin v. Löwis11437992002-04-12 09:54:03 +000011813echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11814echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011815if test -z "$DYNLOADFILE"
11816then
11817 case $ac_sys_system/$ac_sys_release in
11818 AIX*) DYNLOADFILE="dynload_aix.o";;
11819 BeOS*) DYNLOADFILE="dynload_beos.o";;
11820 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000011821 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011822 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011823 *)
11824 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11825 # out any dynamic loading
11826 if test "$ac_cv_func_dlopen" = yes
11827 then DYNLOADFILE="dynload_shlib.o"
11828 else DYNLOADFILE="dynload_stub.o"
11829 fi
11830 ;;
11831 esac
11832fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011833echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
11834echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011835if test "$DYNLOADFILE" != "dynload_stub.o"
11836then
Martin v. Löwis11437992002-04-12 09:54:03 +000011837
11838cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011839#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011840_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011841
11842fi
11843
Neil Schemenauer4e425612001-06-19 15:44:15 +000011844# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11845
Michael W. Hudson54241132001-12-07 15:38:26 +000011846
Martin v. Löwis11437992002-04-12 09:54:03 +000011847echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
11848echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011849if test -z "$MACHDEP_OBJS"
11850then
Jack Jansene578a632001-08-15 01:27:14 +000011851 MACHDEP_OBJS=$extra_machdep_objs
11852else
11853 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011854fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011855echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
11856echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011857
Guido van Rossum627b2d71993-12-24 10:39:16 +000011858# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011932
Fred Drake6b3cc522002-04-15 19:20:27 +000011933
Jack Jansen0b06be72002-06-21 14:48:38 +000011934
Martin v. Löwis0cec0ff2002-07-28 16:33:45 +000011935
Martin v. Löwis6aa9fdb2002-09-10 09:16:13 +000011936
Martin v. Löwisfed24052002-10-07 13:55:50 +000011937
11938
Martin v. Löwis244edc82001-10-04 22:44:26 +000011939for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake6b3cc522002-04-15 19:20:27 +000011940 fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis606edc12002-06-13 21:09:11 +000011941 gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd \
Martin v. Löwisfed24052002-10-07 13:55:50 +000011942 hstrerror inet_pton iswprint kill killpg lchown link lstat mbtowc mkfifo \
11943 mknod mktime mremap nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000011944 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +000011945 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000011946 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Michael W. Hudson065c1a22002-06-06 13:03:44 +000011947 sigaction siginterrupt sigrelse strftime strptime symlink \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011948 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis6aa9fdb2002-09-10 09:16:13 +000011949 truncate uname unsetenv utimes waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +000011950do
Martin v. Löwis11437992002-04-12 09:54:03 +000011951as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11952echo "$as_me:$LINENO: checking for $ac_func" >&5
11953echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11954if eval "test \"\${$as_ac_var+set}\" = set"; then
11955 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011956else
Martin v. Löwis11437992002-04-12 09:54:03 +000011957 cat >conftest.$ac_ext <<_ACEOF
11958#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011959#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011960/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011961 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011962#include <assert.h>
11963/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011964#ifdef __cplusplus
11965extern "C"
11966#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011967/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011968 builtin and then its argument prototype would still apply. */
11969char $ac_func ();
11970char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011971
Martin v. Löwis11437992002-04-12 09:54:03 +000011972#ifdef F77_DUMMY_MAIN
11973# ifdef __cplusplus
11974 extern "C"
11975# endif
11976 int F77_DUMMY_MAIN() { return 1; }
11977#endif
11978int
11979main ()
11980{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011981/* The GNU C library defines this for functions which it implements
11982 to always fail with ENOSYS. Some functions are actually named
11983 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011984#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011985choke me
11986#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011987f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011988#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011989
Martin v. Löwis11437992002-04-12 09:54:03 +000011990 ;
11991 return 0;
11992}
11993_ACEOF
11994rm -f conftest.$ac_objext conftest$ac_exeext
11995if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11996 (eval $ac_link) 2>&5
11997 ac_status=$?
11998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11999 (exit $ac_status); } &&
12000 { ac_try='test -s conftest$ac_exeext'
12001 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12002 (eval $ac_try) 2>&5
12003 ac_status=$?
12004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12005 (exit $ac_status); }; }; then
12006 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012007else
Martin v. Löwis11437992002-04-12 09:54:03 +000012008 echo "$as_me: failed program was:" >&5
12009cat conftest.$ac_ext >&5
12010eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012011fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012012rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012013fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012014echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12015echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12016if test `eval echo '${'$as_ac_var'}'` = yes; then
12017 cat >>confdefs.h <<_ACEOF
12018#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12019_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012020
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012021fi
12022done
12023
Michael W. Hudson54241132001-12-07 15:38:26 +000012024
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012025# check for openpty and forkpty
12026
Martin v. Löwis11437992002-04-12 09:54:03 +000012027
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012028for ac_func in openpty
12029do
Martin v. Löwis11437992002-04-12 09:54:03 +000012030as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12031echo "$as_me:$LINENO: checking for $ac_func" >&5
12032echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12033if eval "test \"\${$as_ac_var+set}\" = set"; then
12034 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012035else
Martin v. Löwis11437992002-04-12 09:54:03 +000012036 cat >conftest.$ac_ext <<_ACEOF
12037#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012038#include "confdefs.h"
12039/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012040 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012041#include <assert.h>
12042/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012043#ifdef __cplusplus
12044extern "C"
12045#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012046/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012047 builtin and then its argument prototype would still apply. */
12048char $ac_func ();
12049char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012050
Martin v. Löwis11437992002-04-12 09:54:03 +000012051#ifdef F77_DUMMY_MAIN
12052# ifdef __cplusplus
12053 extern "C"
12054# endif
12055 int F77_DUMMY_MAIN() { return 1; }
12056#endif
12057int
12058main ()
12059{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012060/* The GNU C library defines this for functions which it implements
12061 to always fail with ENOSYS. Some functions are actually named
12062 something starting with __ and the normal name is an alias. */
12063#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12064choke me
12065#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012066f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012067#endif
12068
Martin v. Löwis11437992002-04-12 09:54:03 +000012069 ;
12070 return 0;
12071}
12072_ACEOF
12073rm -f conftest.$ac_objext conftest$ac_exeext
12074if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12075 (eval $ac_link) 2>&5
12076 ac_status=$?
12077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12078 (exit $ac_status); } &&
12079 { ac_try='test -s conftest$ac_exeext'
12080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12081 (eval $ac_try) 2>&5
12082 ac_status=$?
12083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12084 (exit $ac_status); }; }; then
12085 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012086else
Martin v. Löwis11437992002-04-12 09:54:03 +000012087 echo "$as_me: failed program was:" >&5
12088cat conftest.$ac_ext >&5
12089eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012090fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012091rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012092fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012093echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12094echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12095if test `eval echo '${'$as_ac_var'}'` = yes; then
12096 cat >>confdefs.h <<_ACEOF
12097#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12098_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012099
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012100else
Martin v. Löwis11437992002-04-12 09:54:03 +000012101 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
12102echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
12103if test "${ac_cv_lib_util_openpty+set}" = set; then
12104 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012105else
Martin v. Löwis11437992002-04-12 09:54:03 +000012106 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012107LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012108cat >conftest.$ac_ext <<_ACEOF
12109#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012110#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012111
Fred Drake8cef4cf2000-06-28 16:40:38 +000012112/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012113#ifdef __cplusplus
12114extern "C"
12115#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012116/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012117 builtin and then its argument prototype would still apply. */
12118char openpty ();
12119#ifdef F77_DUMMY_MAIN
12120# ifdef __cplusplus
12121 extern "C"
12122# endif
12123 int F77_DUMMY_MAIN() { return 1; }
12124#endif
12125int
12126main ()
12127{
12128openpty ();
12129 ;
12130 return 0;
12131}
12132_ACEOF
12133rm -f conftest.$ac_objext conftest$ac_exeext
12134if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12135 (eval $ac_link) 2>&5
12136 ac_status=$?
12137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12138 (exit $ac_status); } &&
12139 { ac_try='test -s conftest$ac_exeext'
12140 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12141 (eval $ac_try) 2>&5
12142 ac_status=$?
12143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12144 (exit $ac_status); }; }; then
12145 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012146else
Martin v. Löwis11437992002-04-12 09:54:03 +000012147 echo "$as_me: failed program was:" >&5
12148cat conftest.$ac_ext >&5
12149ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012150fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012151rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12152LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012153fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012154echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
12155echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
12156if test $ac_cv_lib_util_openpty = yes; then
12157 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012158#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012159_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012160 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012161fi
12162
12163fi
12164done
12165
Martin v. Löwis11437992002-04-12 09:54:03 +000012166
Fred Drake8cef4cf2000-06-28 16:40:38 +000012167for ac_func in forkpty
12168do
Martin v. Löwis11437992002-04-12 09:54:03 +000012169as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12170echo "$as_me:$LINENO: checking for $ac_func" >&5
12171echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12172if eval "test \"\${$as_ac_var+set}\" = set"; then
12173 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012174else
Martin v. Löwis11437992002-04-12 09:54:03 +000012175 cat >conftest.$ac_ext <<_ACEOF
12176#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012177#include "confdefs.h"
12178/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012179 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000012180#include <assert.h>
12181/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012182#ifdef __cplusplus
12183extern "C"
12184#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012185/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012186 builtin and then its argument prototype would still apply. */
12187char $ac_func ();
12188char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000012189
Martin v. Löwis11437992002-04-12 09:54:03 +000012190#ifdef F77_DUMMY_MAIN
12191# ifdef __cplusplus
12192 extern "C"
12193# endif
12194 int F77_DUMMY_MAIN() { return 1; }
12195#endif
12196int
12197main ()
12198{
Fred Drake8cef4cf2000-06-28 16:40:38 +000012199/* The GNU C library defines this for functions which it implements
12200 to always fail with ENOSYS. Some functions are actually named
12201 something starting with __ and the normal name is an alias. */
12202#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12203choke me
12204#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012205f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000012206#endif
12207
Martin v. Löwis11437992002-04-12 09:54:03 +000012208 ;
12209 return 0;
12210}
12211_ACEOF
12212rm -f conftest.$ac_objext conftest$ac_exeext
12213if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12214 (eval $ac_link) 2>&5
12215 ac_status=$?
12216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12217 (exit $ac_status); } &&
12218 { ac_try='test -s conftest$ac_exeext'
12219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12220 (eval $ac_try) 2>&5
12221 ac_status=$?
12222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12223 (exit $ac_status); }; }; then
12224 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012225else
Martin v. Löwis11437992002-04-12 09:54:03 +000012226 echo "$as_me: failed program was:" >&5
12227cat conftest.$ac_ext >&5
12228eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012229fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012230rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012231fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012232echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12233echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12234if test `eval echo '${'$as_ac_var'}'` = yes; then
12235 cat >>confdefs.h <<_ACEOF
12236#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12237_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012238
Fred Drake8cef4cf2000-06-28 16:40:38 +000012239else
Martin v. Löwis11437992002-04-12 09:54:03 +000012240 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
12241echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
12242if test "${ac_cv_lib_util_forkpty+set}" = set; then
12243 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012244else
Martin v. Löwis11437992002-04-12 09:54:03 +000012245 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012246LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012247cat >conftest.$ac_ext <<_ACEOF
12248#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012249#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012250
Fred Drake8cef4cf2000-06-28 16:40:38 +000012251/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012252#ifdef __cplusplus
12253extern "C"
12254#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012255/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012256 builtin and then its argument prototype would still apply. */
12257char forkpty ();
12258#ifdef F77_DUMMY_MAIN
12259# ifdef __cplusplus
12260 extern "C"
12261# endif
12262 int F77_DUMMY_MAIN() { return 1; }
12263#endif
12264int
12265main ()
12266{
12267forkpty ();
12268 ;
12269 return 0;
12270}
12271_ACEOF
12272rm -f conftest.$ac_objext conftest$ac_exeext
12273if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12274 (eval $ac_link) 2>&5
12275 ac_status=$?
12276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12277 (exit $ac_status); } &&
12278 { ac_try='test -s conftest$ac_exeext'
12279 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12280 (eval $ac_try) 2>&5
12281 ac_status=$?
12282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12283 (exit $ac_status); }; }; then
12284 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012285else
Martin v. Löwis11437992002-04-12 09:54:03 +000012286 echo "$as_me: failed program was:" >&5
12287cat conftest.$ac_ext >&5
12288ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012289fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012290rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12291LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012292fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012293echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
12294echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
12295if test $ac_cv_lib_util_forkpty = yes; then
12296 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012297#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012298_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012299 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012300fi
12301
12302fi
12303done
12304
Jack Jansendd19cf82001-12-06 22:36:17 +000012305
Michael W. Hudson54241132001-12-07 15:38:26 +000012306# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012307
12308
12309
12310
12311
12312
Fred Drake8cef4cf2000-06-28 16:40:38 +000012313for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
12314do
Martin v. Löwis11437992002-04-12 09:54:03 +000012315as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12316echo "$as_me:$LINENO: checking for $ac_func" >&5
12317echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12318if eval "test \"\${$as_ac_var+set}\" = set"; then
12319 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012320else
Martin v. Löwis11437992002-04-12 09:54:03 +000012321 cat >conftest.$ac_ext <<_ACEOF
12322#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012323#include "confdefs.h"
12324/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012325 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012326#include <assert.h>
12327/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012328#ifdef __cplusplus
12329extern "C"
12330#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012331/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012332 builtin and then its argument prototype would still apply. */
12333char $ac_func ();
12334char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012335
Martin v. Löwis11437992002-04-12 09:54:03 +000012336#ifdef F77_DUMMY_MAIN
12337# ifdef __cplusplus
12338 extern "C"
12339# endif
12340 int F77_DUMMY_MAIN() { return 1; }
12341#endif
12342int
12343main ()
12344{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012345/* The GNU C library defines this for functions which it implements
12346 to always fail with ENOSYS. Some functions are actually named
12347 something starting with __ and the normal name is an alias. */
12348#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12349choke me
12350#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012351f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012352#endif
12353
Martin v. Löwis11437992002-04-12 09:54:03 +000012354 ;
12355 return 0;
12356}
12357_ACEOF
12358rm -f conftest.$ac_objext conftest$ac_exeext
12359if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12360 (eval $ac_link) 2>&5
12361 ac_status=$?
12362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12363 (exit $ac_status); } &&
12364 { ac_try='test -s conftest$ac_exeext'
12365 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12366 (eval $ac_try) 2>&5
12367 ac_status=$?
12368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12369 (exit $ac_status); }; }; then
12370 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012371else
Martin v. Löwis11437992002-04-12 09:54:03 +000012372 echo "$as_me: failed program was:" >&5
12373cat conftest.$ac_ext >&5
12374eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012375fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012376rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012377fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012378echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12379echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12380if test `eval echo '${'$as_ac_var'}'` = yes; then
12381 cat >>confdefs.h <<_ACEOF
12382#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12383_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012384
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012385fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012386done
12387
Michael W. Hudson54241132001-12-07 15:38:26 +000012388
Martin v. Löwis11437992002-04-12 09:54:03 +000012389
12390
12391
12392
12393
Martin v. Löwis1142de32002-03-29 16:28:31 +000012394for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000012395do
Martin v. Löwis11437992002-04-12 09:54:03 +000012396as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12397echo "$as_me:$LINENO: checking for $ac_func" >&5
12398echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12399if eval "test \"\${$as_ac_var+set}\" = set"; then
12400 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012401else
Martin v. Löwis11437992002-04-12 09:54:03 +000012402 cat >conftest.$ac_ext <<_ACEOF
12403#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012404#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012405/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012406 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012407#include <assert.h>
12408/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012409#ifdef __cplusplus
12410extern "C"
12411#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012412/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012413 builtin and then its argument prototype would still apply. */
12414char $ac_func ();
12415char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012416
Martin v. Löwis11437992002-04-12 09:54:03 +000012417#ifdef F77_DUMMY_MAIN
12418# ifdef __cplusplus
12419 extern "C"
12420# endif
12421 int F77_DUMMY_MAIN() { return 1; }
12422#endif
12423int
12424main ()
12425{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012426/* The GNU C library defines this for functions which it implements
12427 to always fail with ENOSYS. Some functions are actually named
12428 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012429#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012430choke me
12431#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012432f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012433#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012434
Martin v. Löwis11437992002-04-12 09:54:03 +000012435 ;
12436 return 0;
12437}
12438_ACEOF
12439rm -f conftest.$ac_objext conftest$ac_exeext
12440if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12441 (eval $ac_link) 2>&5
12442 ac_status=$?
12443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12444 (exit $ac_status); } &&
12445 { ac_try='test -s conftest$ac_exeext'
12446 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12447 (eval $ac_try) 2>&5
12448 ac_status=$?
12449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12450 (exit $ac_status); }; }; then
12451 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012452else
Martin v. Löwis11437992002-04-12 09:54:03 +000012453 echo "$as_me: failed program was:" >&5
12454cat conftest.$ac_ext >&5
12455eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012456fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012457rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000012458fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012459echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12460echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12461if test `eval echo '${'$as_ac_var'}'` = yes; then
12462 cat >>confdefs.h <<_ACEOF
12463#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12464_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000012465
Martin v. Löwis1142de32002-03-29 16:28:31 +000012466else
Martin v. Löwis11437992002-04-12 09:54:03 +000012467 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012468fi
12469done
12470
12471
Martin v. Löwis11437992002-04-12 09:54:03 +000012472
Martin v. Löwis1142de32002-03-29 16:28:31 +000012473for ac_func in getpgrp
12474do
Martin v. Löwis11437992002-04-12 09:54:03 +000012475as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12476echo "$as_me:$LINENO: checking for $ac_func" >&5
12477echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12478if eval "test \"\${$as_ac_var+set}\" = set"; then
12479 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000012480else
Martin v. Löwis11437992002-04-12 09:54:03 +000012481 cat >conftest.$ac_ext <<_ACEOF
12482#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012483#include "confdefs.h"
12484/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012485 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000012486#include <assert.h>
12487/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012488#ifdef __cplusplus
12489extern "C"
12490#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000012491/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012492 builtin and then its argument prototype would still apply. */
12493char $ac_func ();
12494char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000012495
Martin v. Löwis11437992002-04-12 09:54:03 +000012496#ifdef F77_DUMMY_MAIN
12497# ifdef __cplusplus
12498 extern "C"
12499# endif
12500 int F77_DUMMY_MAIN() { return 1; }
12501#endif
12502int
12503main ()
12504{
Martin v. Löwis1142de32002-03-29 16:28:31 +000012505/* The GNU C library defines this for functions which it implements
12506 to always fail with ENOSYS. Some functions are actually named
12507 something starting with __ and the normal name is an alias. */
12508#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12509choke me
12510#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012511f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000012512#endif
12513
Martin v. Löwis11437992002-04-12 09:54:03 +000012514 ;
12515 return 0;
12516}
12517_ACEOF
12518rm -f conftest.$ac_objext conftest$ac_exeext
12519if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12520 (eval $ac_link) 2>&5
12521 ac_status=$?
12522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12523 (exit $ac_status); } &&
12524 { ac_try='test -s conftest$ac_exeext'
12525 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12526 (eval $ac_try) 2>&5
12527 ac_status=$?
12528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12529 (exit $ac_status); }; }; then
12530 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012531else
Martin v. Löwis11437992002-04-12 09:54:03 +000012532 echo "$as_me: failed program was:" >&5
12533cat conftest.$ac_ext >&5
12534eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012535fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012536rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012537fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012538echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12539echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12540if test `eval echo '${'$as_ac_var'}'` = yes; then
12541 cat >>confdefs.h <<_ACEOF
12542#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12543_ACEOF
12544 cat >conftest.$ac_ext <<_ACEOF
12545#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012546#include "confdefs.h"
12547#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012548#ifdef F77_DUMMY_MAIN
12549# ifdef __cplusplus
12550 extern "C"
12551# endif
12552 int F77_DUMMY_MAIN() { return 1; }
12553#endif
12554int
12555main ()
12556{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012557getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012558 ;
12559 return 0;
12560}
12561_ACEOF
12562rm -f conftest.$ac_objext
12563if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12564 (eval $ac_compile) 2>&5
12565 ac_status=$?
12566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12567 (exit $ac_status); } &&
12568 { ac_try='test -s conftest.$ac_objext'
12569 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12570 (eval $ac_try) 2>&5
12571 ac_status=$?
12572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12573 (exit $ac_status); }; }; then
12574
12575cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012576#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012577_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012578
Martin v. Löwis11437992002-04-12 09:54:03 +000012579
Guido van Rossumf78abae1997-01-21 22:02:36 +000012580else
Martin v. Löwis11437992002-04-12 09:54:03 +000012581 echo "$as_me: failed program was:" >&5
12582cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000012583fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012584rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012585
Guido van Rossum627b2d71993-12-24 10:39:16 +000012586fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012587done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012588
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012589echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
12590echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
12591if test "${ac_cv_func_setpgrp_void+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012592 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012593else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012594 if test "$cross_compiling" = yes; then
12595 { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
12596echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
12597 { (exit 1); exit 1; }; }
12598else
Martin v. Löwis11437992002-04-12 09:54:03 +000012599 cat >conftest.$ac_ext <<_ACEOF
12600#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012601#include "confdefs.h"
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012602#if HAVE_UNISTD_H
12603# include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012604#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012605
Martin v. Löwis11437992002-04-12 09:54:03 +000012606#ifdef F77_DUMMY_MAIN
12607# ifdef __cplusplus
12608 extern "C"
12609# endif
12610 int F77_DUMMY_MAIN() { return 1; }
12611#endif
12612int
12613main ()
12614{
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012615/* If this system has a BSD-style setpgrp which takes arguments,
12616 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12617 exit successfully. */
12618 exit (setpgrp (1,1) == -1 ? 0 : 1);
Martin v. Löwis11437992002-04-12 09:54:03 +000012619 ;
12620 return 0;
12621}
12622_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012623rm -f conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000012624if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12625 (eval $ac_link) 2>&5
12626 ac_status=$?
12627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012628 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12630 (eval $ac_try) 2>&5
12631 ac_status=$?
12632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12633 (exit $ac_status); }; }; then
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012634 ac_cv_func_setpgrp_void=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012635else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012636 echo "$as_me: program exited with status $ac_status" >&5
12637echo "$as_me: failed program was:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012638cat conftest.$ac_ext >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012639( exit $ac_status )
12640ac_cv_func_setpgrp_void=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012641fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012642rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012643fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012644fi
12645echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
12646echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
12647if test $ac_cv_func_setpgrp_void = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012648
12649cat >>confdefs.h <<\_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012650#define SETPGRP_VOID 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012651_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012652
12653fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012654
Martin v. Löwis11437992002-04-12 09:54:03 +000012655
Thomas Wouters3a584202000-08-05 23:28:51 +000012656for ac_func in gettimeofday
12657do
Martin v. Löwis11437992002-04-12 09:54:03 +000012658as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12659echo "$as_me:$LINENO: checking for $ac_func" >&5
12660echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12661if eval "test \"\${$as_ac_var+set}\" = set"; then
12662 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012663else
Martin v. Löwis11437992002-04-12 09:54:03 +000012664 cat >conftest.$ac_ext <<_ACEOF
12665#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012666#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012667/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012668 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012669#include <assert.h>
12670/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012671#ifdef __cplusplus
12672extern "C"
12673#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012674/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012675 builtin and then its argument prototype would still apply. */
12676char $ac_func ();
12677char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012678
Martin v. Löwis11437992002-04-12 09:54:03 +000012679#ifdef F77_DUMMY_MAIN
12680# ifdef __cplusplus
12681 extern "C"
12682# endif
12683 int F77_DUMMY_MAIN() { return 1; }
12684#endif
12685int
12686main ()
12687{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012688/* The GNU C library defines this for functions which it implements
12689 to always fail with ENOSYS. Some functions are actually named
12690 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012691#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012692choke me
12693#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012694f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012695#endif
12696
Martin v. Löwis11437992002-04-12 09:54:03 +000012697 ;
12698 return 0;
12699}
12700_ACEOF
12701rm -f conftest.$ac_objext conftest$ac_exeext
12702if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12703 (eval $ac_link) 2>&5
12704 ac_status=$?
12705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12706 (exit $ac_status); } &&
12707 { ac_try='test -s conftest$ac_exeext'
12708 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12709 (eval $ac_try) 2>&5
12710 ac_status=$?
12711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12712 (exit $ac_status); }; }; then
12713 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012714else
Martin v. Löwis11437992002-04-12 09:54:03 +000012715 echo "$as_me: failed program was:" >&5
12716cat conftest.$ac_ext >&5
12717eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012718fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012719rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012720fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012721echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12722echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12723if test `eval echo '${'$as_ac_var'}'` = yes; then
12724 cat >>confdefs.h <<_ACEOF
12725#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12726_ACEOF
12727 cat >conftest.$ac_ext <<_ACEOF
12728#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012729#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012730#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012731#ifdef F77_DUMMY_MAIN
12732# ifdef __cplusplus
12733 extern "C"
12734# endif
12735 int F77_DUMMY_MAIN() { return 1; }
12736#endif
12737int
12738main ()
12739{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012740gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012741 ;
12742 return 0;
12743}
12744_ACEOF
12745rm -f conftest.$ac_objext
12746if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12747 (eval $ac_compile) 2>&5
12748 ac_status=$?
12749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12750 (exit $ac_status); } &&
12751 { ac_try='test -s conftest.$ac_objext'
12752 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12753 (eval $ac_try) 2>&5
12754 ac_status=$?
12755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12756 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000012757 :
12758else
Martin v. Löwis11437992002-04-12 09:54:03 +000012759 echo "$as_me: failed program was:" >&5
12760cat conftest.$ac_ext >&5
12761
12762cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012763#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012764_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012765
Martin v. Löwis11437992002-04-12 09:54:03 +000012766
Guido van Rossum627b2d71993-12-24 10:39:16 +000012767fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012768rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012769
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012770fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012771done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012772
Michael W. Hudson54241132001-12-07 15:38:26 +000012773
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012774echo "$as_me:$LINENO: checking for major" >&5
12775echo $ECHO_N "checking for major... $ECHO_C" >&6
12776cat >conftest.$ac_ext <<_ACEOF
12777#line $LINENO "configure"
12778#include "confdefs.h"
12779
12780 #if defined(MAJOR_IN_MKDEV)
12781 #include <sys/mkdev.h>
12782 #elif defined(MAJOR_IN_SYSMACROS)
12783 #include <sys/sysmacros.h>
12784 #else
12785 #include <sys/types.h>
12786 #endif
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{
12797
12798 makedev(major(0),minor(0));
12799
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
12817
12818cat >>confdefs.h <<\_ACEOF
12819#define HAVE_DEVICE_MACROS 1
12820_ACEOF
12821
12822 echo "$as_me:$LINENO: result: yes" >&5
12823echo "${ECHO_T}yes" >&6
12824
12825else
12826 echo "$as_me: failed program was:" >&5
12827cat conftest.$ac_ext >&5
12828
12829 echo "$as_me:$LINENO: result: no" >&5
12830echo "${ECHO_T}no" >&6
12831
12832fi
12833rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012834
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012835# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012836# for [no]getaddrinfo in netdb.h.
12837echo "$as_me:$LINENO: checking for getaddrinfo" >&5
12838echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
12839cat >conftest.$ac_ext <<_ACEOF
12840#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012841#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012842
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012843#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012844#include <sys/socket.h>
12845#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012846#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012847
Martin v. Löwis11437992002-04-12 09:54:03 +000012848#ifdef F77_DUMMY_MAIN
12849# ifdef __cplusplus
12850 extern "C"
12851# endif
12852 int F77_DUMMY_MAIN() { return 1; }
12853#endif
12854int
12855main ()
12856{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012857
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012858getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012859
Martin v. Löwis11437992002-04-12 09:54:03 +000012860 ;
12861 return 0;
12862}
12863_ACEOF
12864rm -f conftest.$ac_objext conftest$ac_exeext
12865if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12866 (eval $ac_link) 2>&5
12867 ac_status=$?
12868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12869 (exit $ac_status); } &&
12870 { ac_try='test -s conftest$ac_exeext'
12871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12872 (eval $ac_try) 2>&5
12873 ac_status=$?
12874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12875 (exit $ac_status); }; }; then
12876
12877echo "$as_me:$LINENO: result: yes" >&5
12878echo "${ECHO_T}yes" >&6
12879echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
12880echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012881if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012882 echo "$as_me:$LINENO: result: buggy" >&5
12883echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012884buggygetaddrinfo=yes
12885else
Martin v. Löwis11437992002-04-12 09:54:03 +000012886 cat >conftest.$ac_ext <<_ACEOF
12887#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012888#include "confdefs.h"
12889
12890#include <sys/types.h>
12891#include <netdb.h>
12892#include <string.h>
12893#include <sys/socket.h>
12894#include <netinet/in.h>
12895
12896main()
12897{
12898 int passive, gaierr, inet4 = 0, inet6 = 0;
12899 struct addrinfo hints, *ai, *aitop;
12900 char straddr[INET6_ADDRSTRLEN], strport[16];
12901
12902 for (passive = 0; passive <= 1; passive++) {
12903 memset(&hints, 0, sizeof(hints));
12904 hints.ai_family = AF_UNSPEC;
12905 hints.ai_flags = passive ? AI_PASSIVE : 0;
12906 hints.ai_socktype = SOCK_STREAM;
12907 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12908 (void)gai_strerror(gaierr);
12909 goto bad;
12910 }
12911 for (ai = aitop; ai; ai = ai->ai_next) {
12912 if (ai->ai_addr == NULL ||
12913 ai->ai_addrlen == 0 ||
12914 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12915 straddr, sizeof(straddr), strport, sizeof(strport),
12916 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12917 goto bad;
12918 }
12919 switch (ai->ai_family) {
12920 case AF_INET:
12921 if (strcmp(strport, "54321") != 0) {
12922 goto bad;
12923 }
12924 if (passive) {
12925 if (strcmp(straddr, "0.0.0.0") != 0) {
12926 goto bad;
12927 }
12928 } else {
12929 if (strcmp(straddr, "127.0.0.1") != 0) {
12930 goto bad;
12931 }
12932 }
12933 inet4++;
12934 break;
12935 case AF_INET6:
12936 if (strcmp(strport, "54321") != 0) {
12937 goto bad;
12938 }
12939 if (passive) {
12940 if (strcmp(straddr, "::") != 0) {
12941 goto bad;
12942 }
12943 } else {
12944 if (strcmp(straddr, "::1") != 0) {
12945 goto bad;
12946 }
12947 }
12948 inet6++;
12949 break;
12950 case AF_UNSPEC:
12951 goto bad;
12952 break;
12953 default:
12954 /* another family support? */
12955 break;
12956 }
12957 }
12958 }
12959
12960 if (!(inet4 == 0 || inet4 == 2))
12961 goto bad;
12962 if (!(inet6 == 0 || inet6 == 2))
12963 goto bad;
12964
12965 if (aitop)
12966 freeaddrinfo(aitop);
12967 exit(0);
12968
12969 bad:
12970 if (aitop)
12971 freeaddrinfo(aitop);
12972 exit(1);
12973}
12974
Martin v. Löwis11437992002-04-12 09:54:03 +000012975_ACEOF
12976rm -f conftest$ac_exeext
12977if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12978 (eval $ac_link) 2>&5
12979 ac_status=$?
12980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12981 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12983 (eval $ac_try) 2>&5
12984 ac_status=$?
12985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12986 (exit $ac_status); }; }; then
12987 echo "$as_me:$LINENO: result: good" >&5
12988echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012989buggygetaddrinfo=no
12990else
Martin v. Löwis11437992002-04-12 09:54:03 +000012991 echo "$as_me: program exited with status $ac_status" >&5
12992echo "$as_me: failed program was:" >&5
12993cat conftest.$ac_ext >&5
12994( exit $ac_status )
12995echo "$as_me:$LINENO: result: buggy" >&5
12996echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012997buggygetaddrinfo=yes
12998fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012999rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013000fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013001else
Martin v. Löwis11437992002-04-12 09:54:03 +000013002 echo "$as_me: failed program was:" >&5
13003cat conftest.$ac_ext >&5
13004
13005echo "$as_me:$LINENO: result: no" >&5
13006echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013007buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013008
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013009fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013010rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013011
13012if test "$buggygetaddrinfo" = "yes"; then
13013 if test "$ipv6" = "yes"; then
13014 echo 'Fatal: You must get working getaddrinfo() function.'
13015 echo ' or you can specify "--disable-ipv6"'.
13016 exit 1
13017 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013018else
Martin v. Löwis11437992002-04-12 09:54:03 +000013019
13020cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013021#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013022_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013023
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013024fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013025
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013026for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013027do
Martin v. Löwis11437992002-04-12 09:54:03 +000013028as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13029echo "$as_me:$LINENO: checking for $ac_func" >&5
13030echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13031if eval "test \"\${$as_ac_var+set}\" = set"; then
13032 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013033else
Martin v. Löwis11437992002-04-12 09:54:03 +000013034 cat >conftest.$ac_ext <<_ACEOF
13035#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013036#include "confdefs.h"
13037/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013038 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013039#include <assert.h>
13040/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013041#ifdef __cplusplus
13042extern "C"
13043#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013044/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013045 builtin and then its argument prototype would still apply. */
13046char $ac_func ();
13047char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013048
Martin v. Löwis11437992002-04-12 09:54:03 +000013049#ifdef F77_DUMMY_MAIN
13050# ifdef __cplusplus
13051 extern "C"
13052# endif
13053 int F77_DUMMY_MAIN() { return 1; }
13054#endif
13055int
13056main ()
13057{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013058/* The GNU C library defines this for functions which it implements
13059 to always fail with ENOSYS. Some functions are actually named
13060 something starting with __ and the normal name is an alias. */
13061#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13062choke me
13063#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013064f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013065#endif
13066
Martin v. Löwis11437992002-04-12 09:54:03 +000013067 ;
13068 return 0;
13069}
13070_ACEOF
13071rm -f conftest.$ac_objext conftest$ac_exeext
13072if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13073 (eval $ac_link) 2>&5
13074 ac_status=$?
13075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13076 (exit $ac_status); } &&
13077 { ac_try='test -s conftest$ac_exeext'
13078 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13079 (eval $ac_try) 2>&5
13080 ac_status=$?
13081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13082 (exit $ac_status); }; }; then
13083 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013084else
Martin v. Löwis11437992002-04-12 09:54:03 +000013085 echo "$as_me: failed program was:" >&5
13086cat conftest.$ac_ext >&5
13087eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013088fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013089rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013090fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013091echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13092echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13093if test `eval echo '${'$as_ac_var'}'` = yes; then
13094 cat >>confdefs.h <<_ACEOF
13095#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13096_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013097
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013098fi
13099done
13100
Michael W. Hudson54241132001-12-07 15:38:26 +000013101
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013102# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000013103echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
13104echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13105if test "${ac_cv_header_time+set}" = set; then
13106 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013107else
Martin v. Löwis11437992002-04-12 09:54:03 +000013108 cat >conftest.$ac_ext <<_ACEOF
13109#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013110#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013111#include <sys/types.h>
13112#include <sys/time.h>
13113#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013114
13115#ifdef F77_DUMMY_MAIN
13116# ifdef __cplusplus
13117 extern "C"
13118# endif
13119 int F77_DUMMY_MAIN() { return 1; }
13120#endif
13121int
13122main ()
13123{
13124if ((struct tm *) 0)
13125return 0;
13126 ;
13127 return 0;
13128}
13129_ACEOF
13130rm -f conftest.$ac_objext
13131if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13132 (eval $ac_compile) 2>&5
13133 ac_status=$?
13134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13135 (exit $ac_status); } &&
13136 { ac_try='test -s conftest.$ac_objext'
13137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13138 (eval $ac_try) 2>&5
13139 ac_status=$?
13140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13141 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013142 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013143else
Martin v. Löwis11437992002-04-12 09:54:03 +000013144 echo "$as_me: failed program was:" >&5
13145cat conftest.$ac_ext >&5
13146ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013147fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013148rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013149fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013150echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
13151echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013152if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013153
13154cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013155#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013156_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013157
13158fi
13159
Martin v. Löwis11437992002-04-12 09:54:03 +000013160echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
13161echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
13162if test "${ac_cv_struct_tm+set}" = set; then
13163 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013164else
Martin v. Löwis11437992002-04-12 09:54:03 +000013165 cat >conftest.$ac_ext <<_ACEOF
13166#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013167#include "confdefs.h"
13168#include <sys/types.h>
13169#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013170
13171#ifdef F77_DUMMY_MAIN
13172# ifdef __cplusplus
13173 extern "C"
13174# endif
13175 int F77_DUMMY_MAIN() { return 1; }
13176#endif
13177int
13178main ()
13179{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013180struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000013181 ;
13182 return 0;
13183}
13184_ACEOF
13185rm -f conftest.$ac_objext
13186if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13187 (eval $ac_compile) 2>&5
13188 ac_status=$?
13189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13190 (exit $ac_status); } &&
13191 { ac_try='test -s conftest.$ac_objext'
13192 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13193 (eval $ac_try) 2>&5
13194 ac_status=$?
13195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13196 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013197 ac_cv_struct_tm=time.h
13198else
Martin v. Löwis11437992002-04-12 09:54:03 +000013199 echo "$as_me: failed program was:" >&5
13200cat conftest.$ac_ext >&5
13201ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013202fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013203rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013204fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013205echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
13206echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013207if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013208
13209cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013210#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013211_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013212
13213fi
13214
Martin v. Löwis11437992002-04-12 09:54:03 +000013215echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
13216echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
13217if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
13218 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013219else
Martin v. Löwis11437992002-04-12 09:54:03 +000013220 cat >conftest.$ac_ext <<_ACEOF
13221#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013222#include "confdefs.h"
13223#include <sys/types.h>
13224#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013225
13226
13227#ifdef F77_DUMMY_MAIN
13228# ifdef __cplusplus
13229 extern "C"
13230# endif
13231 int F77_DUMMY_MAIN() { return 1; }
13232#endif
13233int
13234main ()
13235{
13236static struct tm ac_aggr;
13237if (ac_aggr.tm_zone)
13238return 0;
13239 ;
13240 return 0;
13241}
13242_ACEOF
13243rm -f conftest.$ac_objext
13244if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13245 (eval $ac_compile) 2>&5
13246 ac_status=$?
13247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13248 (exit $ac_status); } &&
13249 { ac_try='test -s conftest.$ac_objext'
13250 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13251 (eval $ac_try) 2>&5
13252 ac_status=$?
13253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13254 (exit $ac_status); }; }; then
13255 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013256else
Martin v. Löwis11437992002-04-12 09:54:03 +000013257 echo "$as_me: failed program was:" >&5
13258cat conftest.$ac_ext >&5
13259ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013260fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013261rm -f conftest.$ac_objext conftest.$ac_ext
13262fi
13263echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
13264echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
13265if test $ac_cv_member_struct_tm_tm_zone = yes; then
13266
13267cat >>confdefs.h <<_ACEOF
13268#define HAVE_STRUCT_TM_TM_ZONE 1
13269_ACEOF
13270
13271
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013272fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013273
Martin v. Löwis11437992002-04-12 09:54:03 +000013274if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13275
13276cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013277#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013278_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013279
13280else
Martin v. Löwis11437992002-04-12 09:54:03 +000013281 echo "$as_me:$LINENO: checking for tzname" >&5
13282echo $ECHO_N "checking for tzname... $ECHO_C" >&6
13283if test "${ac_cv_var_tzname+set}" = set; then
13284 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013285else
Martin v. Löwis11437992002-04-12 09:54:03 +000013286 cat >conftest.$ac_ext <<_ACEOF
13287#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013288#include "confdefs.h"
13289#include <time.h>
13290#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013291extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013292#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013293
13294#ifdef F77_DUMMY_MAIN
13295# ifdef __cplusplus
13296 extern "C"
13297# endif
13298 int F77_DUMMY_MAIN() { return 1; }
13299#endif
13300int
13301main ()
13302{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013303atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000013304 ;
13305 return 0;
13306}
13307_ACEOF
13308rm -f conftest.$ac_objext conftest$ac_exeext
13309if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13310 (eval $ac_link) 2>&5
13311 ac_status=$?
13312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13313 (exit $ac_status); } &&
13314 { ac_try='test -s conftest$ac_exeext'
13315 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13316 (eval $ac_try) 2>&5
13317 ac_status=$?
13318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13319 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013320 ac_cv_var_tzname=yes
13321else
Martin v. Löwis11437992002-04-12 09:54:03 +000013322 echo "$as_me: failed program was:" >&5
13323cat conftest.$ac_ext >&5
13324ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013325fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013326rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013327fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013328echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
13329echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013330 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013331
13332cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013333#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013334_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013335
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013336 fi
13337fi
13338
Jack Jansendd19cf82001-12-06 22:36:17 +000013339
Martin v. Löwis11437992002-04-12 09:54:03 +000013340echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
13341echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
13342if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
13343 echo $ECHO_N "(cached) $ECHO_C" >&6
13344else
13345 cat >conftest.$ac_ext <<_ACEOF
13346#line $LINENO "configure"
13347#include "confdefs.h"
13348$ac_includes_default
13349#ifdef F77_DUMMY_MAIN
13350# ifdef __cplusplus
13351 extern "C"
13352# endif
13353 int F77_DUMMY_MAIN() { return 1; }
13354#endif
13355int
13356main ()
13357{
13358static struct stat ac_aggr;
13359if (ac_aggr.st_rdev)
13360return 0;
13361 ;
13362 return 0;
13363}
13364_ACEOF
13365rm -f conftest.$ac_objext
13366if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13367 (eval $ac_compile) 2>&5
13368 ac_status=$?
13369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13370 (exit $ac_status); } &&
13371 { ac_try='test -s conftest.$ac_objext'
13372 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13373 (eval $ac_try) 2>&5
13374 ac_status=$?
13375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13376 (exit $ac_status); }; }; then
13377 ac_cv_member_struct_stat_st_rdev=yes
13378else
13379 echo "$as_me: failed program was:" >&5
13380cat conftest.$ac_ext >&5
13381ac_cv_member_struct_stat_st_rdev=no
13382fi
13383rm -f conftest.$ac_objext conftest.$ac_ext
13384fi
13385echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
13386echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
13387if test $ac_cv_member_struct_stat_st_rdev = yes; then
13388
13389cat >>confdefs.h <<_ACEOF
13390#define HAVE_STRUCT_STAT_ST_RDEV 1
13391_ACEOF
13392
13393
13394cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013395#define HAVE_ST_RDEV 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013396_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013397
13398fi
13399
Martin v. Löwis11437992002-04-12 09:54:03 +000013400
13401
13402echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
13403echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
13404if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
13405 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013406else
Martin v. Löwis11437992002-04-12 09:54:03 +000013407 cat >conftest.$ac_ext <<_ACEOF
13408#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013409#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013410$ac_includes_default
13411#ifdef F77_DUMMY_MAIN
13412# ifdef __cplusplus
13413 extern "C"
13414# endif
13415 int F77_DUMMY_MAIN() { return 1; }
13416#endif
13417int
13418main ()
13419{
13420static struct stat ac_aggr;
13421if (ac_aggr.st_blksize)
13422return 0;
13423 ;
13424 return 0;
13425}
13426_ACEOF
13427rm -f conftest.$ac_objext
13428if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13429 (eval $ac_compile) 2>&5
13430 ac_status=$?
13431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13432 (exit $ac_status); } &&
13433 { ac_try='test -s conftest.$ac_objext'
13434 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13435 (eval $ac_try) 2>&5
13436 ac_status=$?
13437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13438 (exit $ac_status); }; }; then
13439 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013440else
Martin v. Löwis11437992002-04-12 09:54:03 +000013441 echo "$as_me: failed program was:" >&5
13442cat conftest.$ac_ext >&5
13443ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013444fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013445rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013446fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013447echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
13448echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
13449if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013450
Martin v. Löwis11437992002-04-12 09:54:03 +000013451cat >>confdefs.h <<_ACEOF
13452#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13453_ACEOF
13454
13455
13456cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013457#define HAVE_ST_BLKSIZE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013458_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013459
13460fi
13461
Martin v. Löwis11437992002-04-12 09:54:03 +000013462
13463echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
13464echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
13465if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
13466 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013467else
Martin v. Löwis11437992002-04-12 09:54:03 +000013468 cat >conftest.$ac_ext <<_ACEOF
13469#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013470#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013471$ac_includes_default
13472#ifdef F77_DUMMY_MAIN
13473# ifdef __cplusplus
13474 extern "C"
13475# endif
13476 int F77_DUMMY_MAIN() { return 1; }
13477#endif
13478int
13479main ()
13480{
13481static struct stat ac_aggr;
13482if (ac_aggr.st_blocks)
13483return 0;
13484 ;
13485 return 0;
13486}
13487_ACEOF
13488rm -f conftest.$ac_objext
13489if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13490 (eval $ac_compile) 2>&5
13491 ac_status=$?
13492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13493 (exit $ac_status); } &&
13494 { ac_try='test -s conftest.$ac_objext'
13495 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13496 (eval $ac_try) 2>&5
13497 ac_status=$?
13498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13499 (exit $ac_status); }; }; then
13500 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013501else
Martin v. Löwis11437992002-04-12 09:54:03 +000013502 echo "$as_me: failed program was:" >&5
13503cat conftest.$ac_ext >&5
13504ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013505fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013506rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013507fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013508echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
13509echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
13510if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013511
Martin v. Löwis11437992002-04-12 09:54:03 +000013512cat >>confdefs.h <<_ACEOF
13513#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13514_ACEOF
13515
13516
13517cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013518#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013519_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013520
13521else
Martin v. Löwis11437992002-04-12 09:54:03 +000013522 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013523fi
13524
Michael W. Hudson54241132001-12-07 15:38:26 +000013525
Martin v. Löwis11437992002-04-12 09:54:03 +000013526
13527echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
13528echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
13529if test "${ac_cv_header_time_altzone+set}" = set; then
13530 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013531else
Martin v. Löwis11437992002-04-12 09:54:03 +000013532 cat >conftest.$ac_ext <<_ACEOF
13533#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013534#include "confdefs.h"
13535#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013536#ifdef F77_DUMMY_MAIN
13537# ifdef __cplusplus
13538 extern "C"
13539# endif
13540 int F77_DUMMY_MAIN() { return 1; }
13541#endif
13542int
13543main ()
13544{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013545return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013546 ;
13547 return 0;
13548}
13549_ACEOF
13550rm -f conftest.$ac_objext
13551if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13552 (eval $ac_compile) 2>&5
13553 ac_status=$?
13554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13555 (exit $ac_status); } &&
13556 { ac_try='test -s conftest.$ac_objext'
13557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13558 (eval $ac_try) 2>&5
13559 ac_status=$?
13560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13561 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013562 ac_cv_header_time_altzone=yes
13563else
Martin v. Löwis11437992002-04-12 09:54:03 +000013564 echo "$as_me: failed program was:" >&5
13565cat conftest.$ac_ext >&5
13566ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013567fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013568rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013569fi
13570
Martin v. Löwis11437992002-04-12 09:54:03 +000013571echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
13572echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013573if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013574
13575cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013576#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013577_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013578
13579fi
13580
Guido van Rossumda88dad1995-01-26 00:46:29 +000013581was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013582echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
13583echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
13584cat >conftest.$ac_ext <<_ACEOF
13585#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013586#include "confdefs.h"
13587
13588#include <sys/types.h>
13589#include <sys/select.h>
13590#include <sys/time.h>
13591
Martin v. Löwis11437992002-04-12 09:54:03 +000013592#ifdef F77_DUMMY_MAIN
13593# ifdef __cplusplus
13594 extern "C"
13595# endif
13596 int F77_DUMMY_MAIN() { return 1; }
13597#endif
13598int
13599main ()
13600{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013601;
Martin v. Löwis11437992002-04-12 09:54:03 +000013602 ;
13603 return 0;
13604}
13605_ACEOF
13606rm -f conftest.$ac_objext
13607if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13608 (eval $ac_compile) 2>&5
13609 ac_status=$?
13610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13611 (exit $ac_status); } &&
13612 { ac_try='test -s conftest.$ac_objext'
13613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13614 (eval $ac_try) 2>&5
13615 ac_status=$?
13616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13617 (exit $ac_status); }; }; then
13618
13619
13620cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013621#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013622_ACEOF
13623
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013624 was_it_defined=yes
13625
Guido van Rossumf78abae1997-01-21 22:02:36 +000013626else
Martin v. Löwis11437992002-04-12 09:54:03 +000013627 echo "$as_me: failed program was:" >&5
13628cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013629fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013630rm -f conftest.$ac_objext conftest.$ac_ext
13631echo "$as_me:$LINENO: result: $was_it_defined" >&5
13632echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013633
Martin v. Löwis11437992002-04-12 09:54:03 +000013634echo "$as_me:$LINENO: checking for addrinfo" >&5
13635echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
13636if test "${ac_cv_struct_addrinfo+set}" = set; then
13637 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013638else
Martin v. Löwis11437992002-04-12 09:54:03 +000013639 cat >conftest.$ac_ext <<_ACEOF
13640#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013641#include "confdefs.h"
13642
13643# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013644#ifdef F77_DUMMY_MAIN
13645# ifdef __cplusplus
13646 extern "C"
13647# endif
13648 int F77_DUMMY_MAIN() { return 1; }
13649#endif
13650int
13651main ()
13652{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013653struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013654 ;
13655 return 0;
13656}
13657_ACEOF
13658rm -f conftest.$ac_objext
13659if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13660 (eval $ac_compile) 2>&5
13661 ac_status=$?
13662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13663 (exit $ac_status); } &&
13664 { ac_try='test -s conftest.$ac_objext'
13665 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13666 (eval $ac_try) 2>&5
13667 ac_status=$?
13668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13669 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013670 ac_cv_struct_addrinfo=yes
13671else
Martin v. Löwis11437992002-04-12 09:54:03 +000013672 echo "$as_me: failed program was:" >&5
13673cat conftest.$ac_ext >&5
13674ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013675fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013676rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013677fi
13678
Martin v. Löwis11437992002-04-12 09:54:03 +000013679echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
13680echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013681if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013682
13683cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013684#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013685_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013686
13687fi
13688
Martin v. Löwis11437992002-04-12 09:54:03 +000013689echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
13690echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
13691if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
13692 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013693else
Martin v. Löwis11437992002-04-12 09:54:03 +000013694 cat >conftest.$ac_ext <<_ACEOF
13695#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013696#include "confdefs.h"
13697
13698# include <sys/types.h>
13699# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013700#ifdef F77_DUMMY_MAIN
13701# ifdef __cplusplus
13702 extern "C"
13703# endif
13704 int F77_DUMMY_MAIN() { return 1; }
13705#endif
13706int
13707main ()
13708{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013709struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013710 ;
13711 return 0;
13712}
13713_ACEOF
13714rm -f conftest.$ac_objext
13715if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13716 (eval $ac_compile) 2>&5
13717 ac_status=$?
13718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13719 (exit $ac_status); } &&
13720 { ac_try='test -s conftest.$ac_objext'
13721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13722 (eval $ac_try) 2>&5
13723 ac_status=$?
13724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13725 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013726 ac_cv_struct_sockaddr_storage=yes
13727else
Martin v. Löwis11437992002-04-12 09:54:03 +000013728 echo "$as_me: failed program was:" >&5
13729cat conftest.$ac_ext >&5
13730ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013731fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013732rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013733fi
13734
Martin v. Löwis11437992002-04-12 09:54:03 +000013735echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
13736echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013737if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013738
13739cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013740#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013741_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013742
13743fi
13744
Guido van Rossum627b2d71993-12-24 10:39:16 +000013745# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013746
Michael W. Hudson54241132001-12-07 15:38:26 +000013747
Martin v. Löwis11437992002-04-12 09:54:03 +000013748echo "$as_me:$LINENO: checking whether char is unsigned" >&5
13749echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
13750if test "${ac_cv_c_char_unsigned+set}" = set; then
13751 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013752else
Martin v. Löwis11437992002-04-12 09:54:03 +000013753 cat >conftest.$ac_ext <<_ACEOF
13754#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000013755#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013756$ac_includes_default
13757#ifdef F77_DUMMY_MAIN
13758# ifdef __cplusplus
13759 extern "C"
13760# endif
13761 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013762#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013763int
13764main ()
13765{
13766static int test_array [1 - 2 * !(((char) -1) < 0)];
13767test_array [0] = 0
13768
13769 ;
13770 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013771}
Martin v. Löwis11437992002-04-12 09:54:03 +000013772_ACEOF
13773rm -f conftest.$ac_objext
13774if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13775 (eval $ac_compile) 2>&5
13776 ac_status=$?
13777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13778 (exit $ac_status); } &&
13779 { ac_try='test -s conftest.$ac_objext'
13780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13781 (eval $ac_try) 2>&5
13782 ac_status=$?
13783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13784 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000013785 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013786else
13787 echo "$as_me: failed program was:" >&5
13788cat conftest.$ac_ext >&5
13789ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013790fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013791rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013792fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013793echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
13794echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013795if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013796 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013797#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013798_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013799
13800fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013801
Martin v. Löwis11437992002-04-12 09:54:03 +000013802echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
13803echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13804if test "${ac_cv_prog_cc_stdc+set}" = set; then
13805 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013806else
Martin v. Löwis11437992002-04-12 09:54:03 +000013807 ac_cv_prog_cc_stdc=no
13808ac_save_CC=$CC
13809cat >conftest.$ac_ext <<_ACEOF
13810#line $LINENO "configure"
13811#include "confdefs.h"
13812#include <stdarg.h>
13813#include <stdio.h>
13814#include <sys/types.h>
13815#include <sys/stat.h>
13816/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
13817struct buf { int x; };
13818FILE * (*rcsopen) (struct buf *, struct stat *, int);
13819static char *e (p, i)
13820 char **p;
13821 int i;
13822{
13823 return p[i];
13824}
13825static char *f (char * (*g) (char **, int), char **p, ...)
13826{
13827 char *s;
13828 va_list v;
13829 va_start (v,p);
13830 s = g (p, va_arg (v,int));
13831 va_end (v);
13832 return s;
13833}
13834int test (int i, double x);
13835struct s1 {int (*f) (int a);};
13836struct s2 {int (*f) (double a);};
13837int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13838int argc;
13839char **argv;
13840#ifdef F77_DUMMY_MAIN
13841# ifdef __cplusplus
13842 extern "C"
13843# endif
13844 int F77_DUMMY_MAIN() { return 1; }
13845#endif
13846int
13847main ()
13848{
13849return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
13850 ;
13851 return 0;
13852}
13853_ACEOF
13854# Don't try gcc -ansi; that turns off useful extensions and
13855# breaks some systems' header files.
13856# AIX -qlanglvl=ansi
13857# Ultrix and OSF/1 -std1
13858# HP-UX 10.20 and later -Ae
13859# HP-UX older versions -Aa -D_HPUX_SOURCE
13860# SVR4 -Xc -D__EXTENSIONS__
13861for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13862do
13863 CC="$ac_save_CC $ac_arg"
13864 rm -f conftest.$ac_objext
13865if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13866 (eval $ac_compile) 2>&5
13867 ac_status=$?
13868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13869 (exit $ac_status); } &&
13870 { ac_try='test -s conftest.$ac_objext'
13871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13872 (eval $ac_try) 2>&5
13873 ac_status=$?
13874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13875 (exit $ac_status); }; }; then
13876 ac_cv_prog_cc_stdc=$ac_arg
13877break
13878else
13879 echo "$as_me: failed program was:" >&5
13880cat conftest.$ac_ext >&5
13881fi
13882rm -f conftest.$ac_objext
13883done
13884rm -f conftest.$ac_ext conftest.$ac_objext
13885CC=$ac_save_CC
13886
13887fi
13888
13889case "x$ac_cv_prog_cc_stdc" in
13890 x|xno)
13891 echo "$as_me:$LINENO: result: none needed" >&5
13892echo "${ECHO_T}none needed" >&6 ;;
13893 *)
13894 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
13895echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13896 CC="$CC $ac_cv_prog_cc_stdc" ;;
13897esac
13898
13899echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
13900echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13901if test "${ac_cv_c_const+set}" = set; then
13902 echo $ECHO_N "(cached) $ECHO_C" >&6
13903else
13904 cat >conftest.$ac_ext <<_ACEOF
13905#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013906#include "confdefs.h"
13907
Martin v. Löwis11437992002-04-12 09:54:03 +000013908#ifdef F77_DUMMY_MAIN
13909# ifdef __cplusplus
13910 extern "C"
13911# endif
13912 int F77_DUMMY_MAIN() { return 1; }
13913#endif
13914int
13915main ()
13916{
13917/* FIXME: Include the comments suggested by Paul. */
13918#ifndef __cplusplus
13919 /* Ultrix mips cc rejects this. */
13920 typedef int charset[2];
13921 const charset x;
13922 /* SunOS 4.1.1 cc rejects this. */
13923 char const *const *ccp;
13924 char **p;
13925 /* NEC SVR4.0.2 mips cc rejects this. */
13926 struct point {int x, y;};
13927 static struct point const zero = {0,0};
13928 /* AIX XL C 1.02.0.0 rejects this.
13929 It does not let you subtract one const X* pointer from another in
13930 an arm of an if-expression whose if-part is not a constant
13931 expression */
13932 const char *g = "string";
13933 ccp = &g + (g ? g-g : 0);
13934 /* HPUX 7.0 cc rejects these. */
13935 ++ccp;
13936 p = (char**) ccp;
13937 ccp = (char const *const *) p;
13938 { /* SCO 3.2v4 cc rejects this. */
13939 char *t;
13940 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013941
Martin v. Löwis11437992002-04-12 09:54:03 +000013942 *t++ = 0;
13943 }
13944 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13945 int x[] = {25, 17};
13946 const int *foo = &x[0];
13947 ++foo;
13948 }
13949 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13950 typedef const int *iptr;
13951 iptr p = 0;
13952 ++p;
13953 }
13954 { /* AIX XL C 1.02.0.0 rejects this saying
13955 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13956 struct s { int j; const int *ap[3]; };
13957 struct s *b; b->j = 5;
13958 }
13959 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13960 const int foo = 10;
13961 }
13962#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013963
Martin v. Löwis11437992002-04-12 09:54:03 +000013964 ;
13965 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013966}
Martin v. Löwis11437992002-04-12 09:54:03 +000013967_ACEOF
13968rm -f conftest.$ac_objext
13969if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13970 (eval $ac_compile) 2>&5
13971 ac_status=$?
13972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13973 (exit $ac_status); } &&
13974 { ac_try='test -s conftest.$ac_objext'
13975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13976 (eval $ac_try) 2>&5
13977 ac_status=$?
13978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13979 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013980 ac_cv_c_const=yes
13981else
Martin v. Löwis11437992002-04-12 09:54:03 +000013982 echo "$as_me: failed program was:" >&5
13983cat conftest.$ac_ext >&5
13984ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013985fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013986rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013987fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013988echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
13989echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013990if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013991
13992cat >>confdefs.h <<\_ACEOF
13993#define const
13994_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013995
13996fi
13997
Michael W. Hudson54241132001-12-07 15:38:26 +000013998
Guido van Rossumda88dad1995-01-26 00:46:29 +000013999works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014000echo "$as_me:$LINENO: checking for working volatile" >&5
14001echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
14002cat >conftest.$ac_ext <<_ACEOF
14003#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014004#include "confdefs.h"
14005
Martin v. Löwis11437992002-04-12 09:54:03 +000014006#ifdef F77_DUMMY_MAIN
14007# ifdef __cplusplus
14008 extern "C"
14009# endif
14010 int F77_DUMMY_MAIN() { return 1; }
14011#endif
14012int
14013main ()
14014{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014015volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014016 ;
14017 return 0;
14018}
14019_ACEOF
14020rm -f conftest.$ac_objext
14021if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14022 (eval $ac_compile) 2>&5
14023 ac_status=$?
14024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14025 (exit $ac_status); } &&
14026 { ac_try='test -s conftest.$ac_objext'
14027 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14028 (eval $ac_try) 2>&5
14029 ac_status=$?
14030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14031 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014032 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014033else
Martin v. Löwis11437992002-04-12 09:54:03 +000014034 echo "$as_me: failed program was:" >&5
14035cat conftest.$ac_ext >&5
14036
14037cat >>confdefs.h <<\_ACEOF
14038#define volatile
14039_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014040
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014041
Guido van Rossum627b2d71993-12-24 10:39:16 +000014042fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014043rm -f conftest.$ac_objext conftest.$ac_ext
14044echo "$as_me:$LINENO: result: $works" >&5
14045echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014046
Guido van Rossumda88dad1995-01-26 00:46:29 +000014047works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014048echo "$as_me:$LINENO: checking for working signed char" >&5
14049echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
14050cat >conftest.$ac_ext <<_ACEOF
14051#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014052#include "confdefs.h"
14053
Martin v. Löwis11437992002-04-12 09:54:03 +000014054#ifdef F77_DUMMY_MAIN
14055# ifdef __cplusplus
14056 extern "C"
14057# endif
14058 int F77_DUMMY_MAIN() { return 1; }
14059#endif
14060int
14061main ()
14062{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014063signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000014064 ;
14065 return 0;
14066}
14067_ACEOF
14068rm -f conftest.$ac_objext
14069if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14070 (eval $ac_compile) 2>&5
14071 ac_status=$?
14072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14073 (exit $ac_status); } &&
14074 { ac_try='test -s conftest.$ac_objext'
14075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14076 (eval $ac_try) 2>&5
14077 ac_status=$?
14078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14079 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014080 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014081else
Martin v. Löwis11437992002-04-12 09:54:03 +000014082 echo "$as_me: failed program was:" >&5
14083cat conftest.$ac_ext >&5
14084
14085cat >>confdefs.h <<\_ACEOF
14086#define signed
14087_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000014088
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014089
Guido van Rossum7f43da71994-08-01 12:15:30 +000014090fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014091rm -f conftest.$ac_objext conftest.$ac_ext
14092echo "$as_me:$LINENO: result: $works" >&5
14093echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014094
Guido van Rossumda88dad1995-01-26 00:46:29 +000014095have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014096echo "$as_me:$LINENO: checking for prototypes" >&5
14097echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
14098cat >conftest.$ac_ext <<_ACEOF
14099#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014100#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014101int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014102#ifdef F77_DUMMY_MAIN
14103# ifdef __cplusplus
14104 extern "C"
14105# endif
14106 int F77_DUMMY_MAIN() { return 1; }
14107#endif
14108int
14109main ()
14110{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014111return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000014112 ;
14113 return 0;
14114}
14115_ACEOF
14116rm -f conftest.$ac_objext
14117if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14118 (eval $ac_compile) 2>&5
14119 ac_status=$?
14120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14121 (exit $ac_status); } &&
14122 { ac_try='test -s conftest.$ac_objext'
14123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14124 (eval $ac_try) 2>&5
14125 ac_status=$?
14126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14127 (exit $ac_status); }; }; then
14128
14129
14130cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014131#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014132_ACEOF
14133
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014134 have_prototypes=yes
14135
Guido van Rossumf78abae1997-01-21 22:02:36 +000014136else
Martin v. Löwis11437992002-04-12 09:54:03 +000014137 echo "$as_me: failed program was:" >&5
14138cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014139fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014140rm -f conftest.$ac_objext conftest.$ac_ext
14141echo "$as_me:$LINENO: result: $have_prototypes" >&5
14142echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014143
Guido van Rossumda88dad1995-01-26 00:46:29 +000014144works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014145echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
14146echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
14147cat >conftest.$ac_ext <<_ACEOF
14148#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014149#include "confdefs.h"
14150
14151#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000014152int foo(int x, ...) {
14153 va_list va;
14154 va_start(va, x);
14155 va_arg(va, int);
14156 va_arg(va, char *);
14157 va_arg(va, double);
14158 return 0;
14159}
Guido van Rossum7f43da71994-08-01 12:15:30 +000014160
Martin v. Löwis11437992002-04-12 09:54:03 +000014161#ifdef F77_DUMMY_MAIN
14162# ifdef __cplusplus
14163 extern "C"
14164# endif
14165 int F77_DUMMY_MAIN() { return 1; }
14166#endif
14167int
14168main ()
14169{
Guido van Rossum90eea071996-08-30 20:58:57 +000014170return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000014171 ;
14172 return 0;
14173}
14174_ACEOF
14175rm -f conftest.$ac_objext
14176if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14177 (eval $ac_compile) 2>&5
14178 ac_status=$?
14179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14180 (exit $ac_status); } &&
14181 { ac_try='test -s conftest.$ac_objext'
14182 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14183 (eval $ac_try) 2>&5
14184 ac_status=$?
14185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14186 (exit $ac_status); }; }; then
14187
14188
14189cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014190#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014191_ACEOF
14192
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014193 works=yes
14194
Guido van Rossumf78abae1997-01-21 22:02:36 +000014195else
Martin v. Löwis11437992002-04-12 09:54:03 +000014196 echo "$as_me: failed program was:" >&5
14197cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000014198fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014199rm -f conftest.$ac_objext conftest.$ac_ext
14200echo "$as_me:$LINENO: result: $works" >&5
14201echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014202
Guido van Rossumda88dad1995-01-26 00:46:29 +000014203if test "$have_prototypes" = yes; then
14204bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014205echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
14206echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
14207cat >conftest.$ac_ext <<_ACEOF
14208#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014209#include "confdefs.h"
14210#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014211#ifdef F77_DUMMY_MAIN
14212# ifdef __cplusplus
14213 extern "C"
14214# endif
14215 int F77_DUMMY_MAIN() { return 1; }
14216#endif
14217int
14218main ()
14219{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014220char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000014221 ;
14222 return 0;
14223}
14224_ACEOF
14225rm -f conftest.$ac_objext
14226if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14227 (eval $ac_compile) 2>&5
14228 ac_status=$?
14229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14230 (exit $ac_status); } &&
14231 { ac_try='test -s conftest.$ac_objext'
14232 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14233 (eval $ac_try) 2>&5
14234 ac_status=$?
14235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14236 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014237 :
14238else
Martin v. Löwis11437992002-04-12 09:54:03 +000014239 echo "$as_me: failed program was:" >&5
14240cat conftest.$ac_ext >&5
14241
14242cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014243#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014244_ACEOF
14245
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014246 bad_prototypes=yes
14247
Guido van Rossum627b2d71993-12-24 10:39:16 +000014248fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014249rm -f conftest.$ac_objext conftest.$ac_ext
14250echo "$as_me:$LINENO: result: $bad_prototypes" >&5
14251echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000014252fi
14253
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014254# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000014255echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
14256echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
14257cat >conftest.$ac_ext <<_ACEOF
14258#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014259#include "confdefs.h"
14260#include <sys/types.h>
14261#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014262#ifdef F77_DUMMY_MAIN
14263# ifdef __cplusplus
14264 extern "C"
14265# endif
14266 int F77_DUMMY_MAIN() { return 1; }
14267#endif
14268int
14269main ()
14270{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014271struct sockaddr x;
14272x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014273 ;
14274 return 0;
14275}
14276_ACEOF
14277rm -f conftest.$ac_objext
14278if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14279 (eval $ac_compile) 2>&5
14280 ac_status=$?
14281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14282 (exit $ac_status); } &&
14283 { ac_try='test -s conftest.$ac_objext'
14284 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14285 (eval $ac_try) 2>&5
14286 ac_status=$?
14287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14288 (exit $ac_status); }; }; then
14289 echo "$as_me:$LINENO: result: yes" >&5
14290echo "${ECHO_T}yes" >&6
14291
14292cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014293#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014294_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014295
14296else
Martin v. Löwis11437992002-04-12 09:54:03 +000014297 echo "$as_me: failed program was:" >&5
14298cat conftest.$ac_ext >&5
14299echo "$as_me:$LINENO: result: no" >&5
14300echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014301fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014302rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014303
Guido van Rossumda88dad1995-01-26 00:46:29 +000014304va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014305echo "$as_me:$LINENO: checking whether va_list is an array" >&5
14306echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
14307cat >conftest.$ac_ext <<_ACEOF
14308#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014309#include "confdefs.h"
14310
14311#ifdef HAVE_STDARG_PROTOTYPES
14312#include <stdarg.h>
14313#else
14314#include <varargs.h>
14315#endif
14316
Martin v. Löwis11437992002-04-12 09:54:03 +000014317#ifdef F77_DUMMY_MAIN
14318# ifdef __cplusplus
14319 extern "C"
14320# endif
14321 int F77_DUMMY_MAIN() { return 1; }
14322#endif
14323int
14324main ()
14325{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014326va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000014327 ;
14328 return 0;
14329}
14330_ACEOF
14331rm -f conftest.$ac_objext
14332if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14333 (eval $ac_compile) 2>&5
14334 ac_status=$?
14335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14336 (exit $ac_status); } &&
14337 { ac_try='test -s conftest.$ac_objext'
14338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14339 (eval $ac_try) 2>&5
14340 ac_status=$?
14341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14342 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014343 :
14344else
Martin v. Löwis11437992002-04-12 09:54:03 +000014345 echo "$as_me: failed program was:" >&5
14346cat conftest.$ac_ext >&5
14347
14348
14349cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014350#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014351_ACEOF
14352
Guido van Rossumda88dad1995-01-26 00:46:29 +000014353 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014354
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014355fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014356rm -f conftest.$ac_objext conftest.$ac_ext
14357echo "$as_me:$LINENO: result: $va_list_is_array" >&5
14358echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014359
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014360# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014361
14362
14363
14364echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
14365echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
14366if test "${ac_cv_func_gethostbyname_r+set}" = set; then
14367 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014368else
Martin v. Löwis11437992002-04-12 09:54:03 +000014369 cat >conftest.$ac_ext <<_ACEOF
14370#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014371#include "confdefs.h"
14372/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014373 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014374#include <assert.h>
14375/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014376#ifdef __cplusplus
14377extern "C"
14378#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014379/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014380 builtin and then its argument prototype would still apply. */
14381char gethostbyname_r ();
14382char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014383
Martin v. Löwis11437992002-04-12 09:54:03 +000014384#ifdef F77_DUMMY_MAIN
14385# ifdef __cplusplus
14386 extern "C"
14387# endif
14388 int F77_DUMMY_MAIN() { return 1; }
14389#endif
14390int
14391main ()
14392{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014393/* The GNU C library defines this for functions which it implements
14394 to always fail with ENOSYS. Some functions are actually named
14395 something starting with __ and the normal name is an alias. */
14396#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
14397choke me
14398#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014399f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014400#endif
14401
Martin v. Löwis11437992002-04-12 09:54:03 +000014402 ;
14403 return 0;
14404}
14405_ACEOF
14406rm -f conftest.$ac_objext conftest$ac_exeext
14407if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14408 (eval $ac_link) 2>&5
14409 ac_status=$?
14410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14411 (exit $ac_status); } &&
14412 { ac_try='test -s conftest$ac_exeext'
14413 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14414 (eval $ac_try) 2>&5
14415 ac_status=$?
14416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14417 (exit $ac_status); }; }; then
14418 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014419else
Martin v. Löwis11437992002-04-12 09:54:03 +000014420 echo "$as_me: failed program was:" >&5
14421cat conftest.$ac_ext >&5
14422ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014423fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014424rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014425fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014426echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
14427echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
14428if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014429
Martin v. Löwis11437992002-04-12 09:54:03 +000014430 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014431#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014432_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014433
Martin v. Löwis11437992002-04-12 09:54:03 +000014434 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
14435echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014436 OLD_CFLAGS=$CFLAGS
14437 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014438 cat >conftest.$ac_ext <<_ACEOF
14439#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014440#include "confdefs.h"
14441
14442# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014443
14444#ifdef F77_DUMMY_MAIN
14445# ifdef __cplusplus
14446 extern "C"
14447# endif
14448 int F77_DUMMY_MAIN() { return 1; }
14449#endif
14450int
14451main ()
14452{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014453
14454 char *name;
14455 struct hostent *he, *res;
14456 char buffer[2048];
14457 int buflen = 2048;
14458 int h_errnop;
14459
14460 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014461
14462 ;
14463 return 0;
14464}
14465_ACEOF
14466rm -f conftest.$ac_objext
14467if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14468 (eval $ac_compile) 2>&5
14469 ac_status=$?
14470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14471 (exit $ac_status); } &&
14472 { ac_try='test -s conftest.$ac_objext'
14473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14474 (eval $ac_try) 2>&5
14475 ac_status=$?
14476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14477 (exit $ac_status); }; }; then
14478
14479 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014480#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014481_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014482
Martin v. Löwis11437992002-04-12 09:54:03 +000014483
14484cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014485#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014486_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014487
Martin v. Löwis11437992002-04-12 09:54:03 +000014488 echo "$as_me:$LINENO: result: yes" >&5
14489echo "${ECHO_T}yes" >&6
14490
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014491else
Martin v. Löwis11437992002-04-12 09:54:03 +000014492 echo "$as_me: failed program was:" >&5
14493cat conftest.$ac_ext >&5
14494
14495 echo "$as_me:$LINENO: result: no" >&5
14496echo "${ECHO_T}no" >&6
14497 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
14498echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
14499 cat >conftest.$ac_ext <<_ACEOF
14500#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014501#include "confdefs.h"
14502
14503# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014504
14505#ifdef F77_DUMMY_MAIN
14506# ifdef __cplusplus
14507 extern "C"
14508# endif
14509 int F77_DUMMY_MAIN() { return 1; }
14510#endif
14511int
14512main ()
14513{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014514
14515 char *name;
14516 struct hostent *he;
14517 char buffer[2048];
14518 int buflen = 2048;
14519 int h_errnop;
14520
14521 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014522
14523 ;
14524 return 0;
14525}
14526_ACEOF
14527rm -f conftest.$ac_objext
14528if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14529 (eval $ac_compile) 2>&5
14530 ac_status=$?
14531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14532 (exit $ac_status); } &&
14533 { ac_try='test -s conftest.$ac_objext'
14534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14535 (eval $ac_try) 2>&5
14536 ac_status=$?
14537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14538 (exit $ac_status); }; }; then
14539
14540 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014541#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014542_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014543
Martin v. Löwis11437992002-04-12 09:54:03 +000014544
14545cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014546#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014547_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014548
Martin v. Löwis11437992002-04-12 09:54:03 +000014549 echo "$as_me:$LINENO: result: yes" >&5
14550echo "${ECHO_T}yes" >&6
14551
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014552else
Martin v. Löwis11437992002-04-12 09:54:03 +000014553 echo "$as_me: failed program was:" >&5
14554cat conftest.$ac_ext >&5
14555
14556 echo "$as_me:$LINENO: result: no" >&5
14557echo "${ECHO_T}no" >&6
14558 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
14559echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
14560 cat >conftest.$ac_ext <<_ACEOF
14561#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014562#include "confdefs.h"
14563
14564# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014565
14566#ifdef F77_DUMMY_MAIN
14567# ifdef __cplusplus
14568 extern "C"
14569# endif
14570 int F77_DUMMY_MAIN() { return 1; }
14571#endif
14572int
14573main ()
14574{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014575
14576 char *name;
14577 struct hostent *he;
14578 struct hostent_data data;
14579
14580 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000014581
14582 ;
14583 return 0;
14584}
14585_ACEOF
14586rm -f conftest.$ac_objext
14587if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14588 (eval $ac_compile) 2>&5
14589 ac_status=$?
14590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14591 (exit $ac_status); } &&
14592 { ac_try='test -s conftest.$ac_objext'
14593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14594 (eval $ac_try) 2>&5
14595 ac_status=$?
14596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14597 (exit $ac_status); }; }; then
14598
14599 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014600#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014601_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014602
Martin v. Löwis11437992002-04-12 09:54:03 +000014603
14604cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014605#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014606_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014607
Martin v. Löwis11437992002-04-12 09:54:03 +000014608 echo "$as_me:$LINENO: result: yes" >&5
14609echo "${ECHO_T}yes" >&6
14610
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014611else
Martin v. Löwis11437992002-04-12 09:54:03 +000014612 echo "$as_me: failed program was:" >&5
14613cat conftest.$ac_ext >&5
14614
14615 echo "$as_me:$LINENO: result: no" >&5
14616echo "${ECHO_T}no" >&6
14617
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014618fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014619rm -f conftest.$ac_objext conftest.$ac_ext
14620
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014621fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014622rm -f conftest.$ac_objext conftest.$ac_ext
14623
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014624fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014625rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014626 CFLAGS=$OLD_CFLAGS
14627
14628else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014629
Martin v. Löwis11437992002-04-12 09:54:03 +000014630
14631for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000014632do
Martin v. Löwis11437992002-04-12 09:54:03 +000014633as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14634echo "$as_me:$LINENO: checking for $ac_func" >&5
14635echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14636if eval "test \"\${$as_ac_var+set}\" = set"; then
14637 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014638else
Martin v. Löwis11437992002-04-12 09:54:03 +000014639 cat >conftest.$ac_ext <<_ACEOF
14640#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014641#include "confdefs.h"
14642/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014643 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014644#include <assert.h>
14645/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014646#ifdef __cplusplus
14647extern "C"
14648#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014649/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014650 builtin and then its argument prototype would still apply. */
14651char $ac_func ();
14652char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014653
Martin v. Löwis11437992002-04-12 09:54:03 +000014654#ifdef F77_DUMMY_MAIN
14655# ifdef __cplusplus
14656 extern "C"
14657# endif
14658 int F77_DUMMY_MAIN() { return 1; }
14659#endif
14660int
14661main ()
14662{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014663/* The GNU C library defines this for functions which it implements
14664 to always fail with ENOSYS. Some functions are actually named
14665 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014666#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014667choke me
14668#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014669f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014670#endif
14671
Martin v. Löwis11437992002-04-12 09:54:03 +000014672 ;
14673 return 0;
14674}
14675_ACEOF
14676rm -f conftest.$ac_objext conftest$ac_exeext
14677if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14678 (eval $ac_link) 2>&5
14679 ac_status=$?
14680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14681 (exit $ac_status); } &&
14682 { ac_try='test -s conftest$ac_exeext'
14683 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14684 (eval $ac_try) 2>&5
14685 ac_status=$?
14686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14687 (exit $ac_status); }; }; then
14688 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014689else
Martin v. Löwis11437992002-04-12 09:54:03 +000014690 echo "$as_me: failed program was:" >&5
14691cat conftest.$ac_ext >&5
14692eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014693fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014694rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014695fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014696echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14697echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14698if test `eval echo '${'$as_ac_var'}'` = yes; then
14699 cat >>confdefs.h <<_ACEOF
14700#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14701_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014702
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014703fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014704done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014705
Michael W. Hudson54241132001-12-07 15:38:26 +000014706
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014707fi
14708
Michael W. Hudson54241132001-12-07 15:38:26 +000014709
14710
14711
14712
14713
14714
Guido van Rossum627b2d71993-12-24 10:39:16 +000014715# checks for system services
14716# (none yet)
14717
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014718# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000014719echo "$as_me:$LINENO: checking for __fpu_control" >&5
14720echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
14721if test "${ac_cv_func___fpu_control+set}" = set; then
14722 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014723else
Martin v. Löwis11437992002-04-12 09:54:03 +000014724 cat >conftest.$ac_ext <<_ACEOF
14725#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014726#include "confdefs.h"
14727/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014728 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014729#include <assert.h>
14730/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014731#ifdef __cplusplus
14732extern "C"
14733#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014734/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014735 builtin and then its argument prototype would still apply. */
14736char __fpu_control ();
14737char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014738
Martin v. Löwis11437992002-04-12 09:54:03 +000014739#ifdef F77_DUMMY_MAIN
14740# ifdef __cplusplus
14741 extern "C"
14742# endif
14743 int F77_DUMMY_MAIN() { return 1; }
14744#endif
14745int
14746main ()
14747{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014748/* The GNU C library defines this for functions which it implements
14749 to always fail with ENOSYS. Some functions are actually named
14750 something starting with __ and the normal name is an alias. */
14751#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
14752choke me
14753#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014754f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014755#endif
14756
Martin v. Löwis11437992002-04-12 09:54:03 +000014757 ;
14758 return 0;
14759}
14760_ACEOF
14761rm -f conftest.$ac_objext conftest$ac_exeext
14762if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14763 (eval $ac_link) 2>&5
14764 ac_status=$?
14765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14766 (exit $ac_status); } &&
14767 { ac_try='test -s conftest$ac_exeext'
14768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14769 (eval $ac_try) 2>&5
14770 ac_status=$?
14771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14772 (exit $ac_status); }; }; then
14773 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014774else
Martin v. Löwis11437992002-04-12 09:54:03 +000014775 echo "$as_me: failed program was:" >&5
14776cat conftest.$ac_ext >&5
14777ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014778fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014779rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014780fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014781echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
14782echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
14783if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014784 :
14785else
Martin v. Löwis11437992002-04-12 09:54:03 +000014786
14787echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
14788echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
14789if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
14790 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014791else
Martin v. Löwis11437992002-04-12 09:54:03 +000014792 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014793LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014794cat >conftest.$ac_ext <<_ACEOF
14795#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014796#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014797
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014798/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014799#ifdef __cplusplus
14800extern "C"
14801#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014802/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014803 builtin and then its argument prototype would still apply. */
14804char __fpu_control ();
14805#ifdef F77_DUMMY_MAIN
14806# ifdef __cplusplus
14807 extern "C"
14808# endif
14809 int F77_DUMMY_MAIN() { return 1; }
14810#endif
14811int
14812main ()
14813{
14814__fpu_control ();
14815 ;
14816 return 0;
14817}
14818_ACEOF
14819rm -f conftest.$ac_objext conftest$ac_exeext
14820if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14821 (eval $ac_link) 2>&5
14822 ac_status=$?
14823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14824 (exit $ac_status); } &&
14825 { ac_try='test -s conftest$ac_exeext'
14826 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14827 (eval $ac_try) 2>&5
14828 ac_status=$?
14829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14830 (exit $ac_status); }; }; then
14831 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014832else
Martin v. Löwis11437992002-04-12 09:54:03 +000014833 echo "$as_me: failed program was:" >&5
14834cat conftest.$ac_ext >&5
14835ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014836fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014837rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14838LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014839fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014840echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
14841echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
14842if test $ac_cv_lib_ieee___fpu_control = yes; then
14843 cat >>confdefs.h <<_ACEOF
14844#define HAVE_LIBIEEE 1
14845_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014846
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014847 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014848
Guido van Rossum627b2d71993-12-24 10:39:16 +000014849fi
14850
Michael W. Hudson54241132001-12-07 15:38:26 +000014851
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014852fi
14853
Michael W. Hudson54241132001-12-07 15:38:26 +000014854
Guido van Rossum7f253911997-05-09 02:42:48 +000014855# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000014856echo "$as_me:$LINENO: checking for --with-fpectl" >&5
14857echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
14858
Guido van Rossum7f253911997-05-09 02:42:48 +000014859# Check whether --with-fpectl or --without-fpectl was given.
14860if test "${with_fpectl+set}" = set; then
14861 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000014862
Guido van Rossum7f253911997-05-09 02:42:48 +000014863if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000014864then
14865
14866cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000014867#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014868_ACEOF
14869
14870 echo "$as_me:$LINENO: result: yes" >&5
14871echo "${ECHO_T}yes" >&6
14872else echo "$as_me:$LINENO: result: no" >&5
14873echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014874fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014875else
Martin v. Löwis11437992002-04-12 09:54:03 +000014876 echo "$as_me:$LINENO: result: no" >&5
14877echo "${ECHO_T}no" >&6
14878fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000014879
Guido van Rossum7f43da71994-08-01 12:15:30 +000014880# check for --with-libm=...
14881
Guido van Rossum563e7081996-09-10 18:20:48 +000014882case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014883Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014884BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014885*) LIBM=-lm
14886esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014887echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
14888echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
14889
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014890# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014891if test "${with_libm+set}" = set; then
14892 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000014893
Guido van Rossum7f253911997-05-09 02:42:48 +000014894if test "$withval" = no
14895then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000014896 echo "$as_me:$LINENO: result: force LIBM empty" >&5
14897echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014898elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014899then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014900 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
14901echo "${ECHO_T}set LIBM=\"$withval\"" >&6
14902else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
14903echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
14904 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014905fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014906else
Martin v. Löwis11437992002-04-12 09:54:03 +000014907 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
14908echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
14909fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014910
14911# check for --with-libc=...
14912
Martin v. Löwis11437992002-04-12 09:54:03 +000014913echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
14914echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
14915
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014916# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014917if test "${with_libc+set}" = set; then
14918 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000014919
Guido van Rossum7f253911997-05-09 02:42:48 +000014920if test "$withval" = no
14921then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000014922 echo "$as_me:$LINENO: result: force LIBC empty" >&5
14923echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014924elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014925then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014926 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
14927echo "${ECHO_T}set LIBC=\"$withval\"" >&6
14928else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
14929echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
14930 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014931fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014932else
Martin v. Löwis11437992002-04-12 09:54:03 +000014933 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
14934echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
14935fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014936
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014937# check for hypot() in math library
14938LIBS_SAVE=$LIBS
14939LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000014940
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014941for ac_func in hypot
14942do
Martin v. Löwis11437992002-04-12 09:54:03 +000014943as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14944echo "$as_me:$LINENO: checking for $ac_func" >&5
14945echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14946if eval "test \"\${$as_ac_var+set}\" = set"; then
14947 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014948else
Martin v. Löwis11437992002-04-12 09:54:03 +000014949 cat >conftest.$ac_ext <<_ACEOF
14950#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014951#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014952/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014953 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014954#include <assert.h>
14955/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014956#ifdef __cplusplus
14957extern "C"
14958#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014959/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014960 builtin and then its argument prototype would still apply. */
14961char $ac_func ();
14962char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014963
Martin v. Löwis11437992002-04-12 09:54:03 +000014964#ifdef F77_DUMMY_MAIN
14965# ifdef __cplusplus
14966 extern "C"
14967# endif
14968 int F77_DUMMY_MAIN() { return 1; }
14969#endif
14970int
14971main ()
14972{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014973/* The GNU C library defines this for functions which it implements
14974 to always fail with ENOSYS. Some functions are actually named
14975 something starting with __ and the normal name is an alias. */
14976#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14977choke me
14978#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014979f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014980#endif
14981
Martin v. Löwis11437992002-04-12 09:54:03 +000014982 ;
14983 return 0;
14984}
14985_ACEOF
14986rm -f conftest.$ac_objext conftest$ac_exeext
14987if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14988 (eval $ac_link) 2>&5
14989 ac_status=$?
14990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14991 (exit $ac_status); } &&
14992 { ac_try='test -s conftest$ac_exeext'
14993 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14994 (eval $ac_try) 2>&5
14995 ac_status=$?
14996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14997 (exit $ac_status); }; }; then
14998 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014999else
Martin v. Löwis11437992002-04-12 09:54:03 +000015000 echo "$as_me: failed program was:" >&5
15001cat conftest.$ac_ext >&5
15002eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015003fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015004rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015005fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015006echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15007echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15008if test `eval echo '${'$as_ac_var'}'` = yes; then
15009 cat >>confdefs.h <<_ACEOF
15010#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15011_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000015012
Michael W. Hudson54241132001-12-07 15:38:26 +000015013else
Martin v. Löwis11437992002-04-12 09:54:03 +000015014 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015015fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015016done
15017
Michael W. Hudson54241132001-12-07 15:38:26 +000015018
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015019LIBS=$LIBS_SAVE
15020
Guido van Rossumad713701997-07-10 22:42:38 +000015021# check whether malloc(0) returns NULL or not
Martin v. Löwis11437992002-04-12 09:54:03 +000015022echo "$as_me:$LINENO: checking what malloc(0) returns" >&5
15023echo $ECHO_N "checking what malloc(0) returns... $ECHO_C" >&6
15024if test "${ac_cv_malloc_zero+set}" = set; then
15025 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000015026else
15027 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015028 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +000015029else
Martin v. Löwis11437992002-04-12 09:54:03 +000015030 cat >conftest.$ac_ext <<_ACEOF
15031#line $LINENO "configure"
Guido van Rossumad713701997-07-10 22:42:38 +000015032#include "confdefs.h"
15033#include <stdio.h>
15034#ifdef HAVE_STDLIB
15035#include <stdlib.h>
15036#else
15037char *malloc(), *realloc();
15038int *free();
15039#endif
15040main() {
15041 char *p;
15042 p = malloc(0);
15043 if (p == NULL) exit(1);
15044 p = realloc(p, 0);
15045 if (p == NULL) exit(1);
15046 free(p);
15047 exit(0);
15048}
Martin v. Löwis11437992002-04-12 09:54:03 +000015049_ACEOF
15050rm -f conftest$ac_exeext
15051if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15052 (eval $ac_link) 2>&5
15053 ac_status=$?
15054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15055 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15057 (eval $ac_try) 2>&5
15058 ac_status=$?
15059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15060 (exit $ac_status); }; }; then
Guido van Rossumad713701997-07-10 22:42:38 +000015061 ac_cv_malloc_zero=nonnull
15062else
Martin v. Löwis11437992002-04-12 09:54:03 +000015063 echo "$as_me: program exited with status $ac_status" >&5
15064echo "$as_me: failed program was:" >&5
15065cat conftest.$ac_ext >&5
15066( exit $ac_status )
15067ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +000015068fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015069rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumad713701997-07-10 22:42:38 +000015070fi
Guido van Rossumad713701997-07-10 22:42:38 +000015071fi
Guido van Rossum3065c942001-09-17 04:03:14 +000015072 # XXX arm cross-compile?
Martin v. Löwis11437992002-04-12 09:54:03 +000015073echo "$as_me:$LINENO: result: $ac_cv_malloc_zero" >&5
15074echo "${ECHO_T}$ac_cv_malloc_zero" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000015075if test "$ac_cv_malloc_zero" = null
15076then
Martin v. Löwis11437992002-04-12 09:54:03 +000015077
15078cat >>confdefs.h <<\_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000015079#define MALLOC_ZERO_RETURNS_NULL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015080_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000015081
15082fi
15083
Guido van Rossumef2255b2000-03-10 22:30:29 +000015084# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015085if test "${ac_cv_header_wchar_h+set}" = set; then
15086 echo "$as_me:$LINENO: checking for wchar.h" >&5
15087echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15088if test "${ac_cv_header_wchar_h+set}" = set; then
15089 echo $ECHO_N "(cached) $ECHO_C" >&6
15090fi
15091echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15092echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015093else
Martin v. Löwis11437992002-04-12 09:54:03 +000015094 # Is the header compilable?
15095echo "$as_me:$LINENO: checking wchar.h usability" >&5
15096echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
15097cat >conftest.$ac_ext <<_ACEOF
15098#line $LINENO "configure"
15099#include "confdefs.h"
15100$ac_includes_default
15101#include <wchar.h>
15102_ACEOF
15103rm -f conftest.$ac_objext
15104if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15105 (eval $ac_compile) 2>&5
15106 ac_status=$?
15107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15108 (exit $ac_status); } &&
15109 { ac_try='test -s conftest.$ac_objext'
15110 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15111 (eval $ac_try) 2>&5
15112 ac_status=$?
15113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15114 (exit $ac_status); }; }; then
15115 ac_header_compiler=yes
15116else
15117 echo "$as_me: failed program was:" >&5
15118cat conftest.$ac_ext >&5
15119ac_header_compiler=no
15120fi
15121rm -f conftest.$ac_objext conftest.$ac_ext
15122echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15123echo "${ECHO_T}$ac_header_compiler" >&6
15124
15125# Is the header present?
15126echo "$as_me:$LINENO: checking wchar.h presence" >&5
15127echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
15128cat >conftest.$ac_ext <<_ACEOF
15129#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015130#include "confdefs.h"
15131#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015132_ACEOF
15133if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15134 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15135 ac_status=$?
15136 egrep -v '^ *\+' conftest.er1 >conftest.err
15137 rm -f conftest.er1
15138 cat conftest.err >&5
15139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15140 (exit $ac_status); } >/dev/null; then
15141 if test -s conftest.err; then
15142 ac_cpp_err=$ac_c_preproc_warn_flag
15143 else
15144 ac_cpp_err=
15145 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015146else
Martin v. Löwis11437992002-04-12 09:54:03 +000015147 ac_cpp_err=yes
15148fi
15149if test -z "$ac_cpp_err"; then
15150 ac_header_preproc=yes
15151else
15152 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000015153 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015154 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015155fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015156rm -f conftest.err conftest.$ac_ext
15157echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15158echo "${ECHO_T}$ac_header_preproc" >&6
15159
15160# So? What about this header?
15161case $ac_header_compiler:$ac_header_preproc in
15162 yes:no )
15163 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
15164echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15165 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
15166echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
15167 no:yes )
15168 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
15169echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
15170 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
15171echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
15172 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
15173echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
15174esac
15175echo "$as_me:$LINENO: checking for wchar.h" >&5
15176echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15177if test "${ac_cv_header_wchar_h+set}" = set; then
15178 echo $ECHO_N "(cached) $ECHO_C" >&6
15179else
15180 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000015181fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015182echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15183echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
15184
15185fi
15186if test $ac_cv_header_wchar_h = yes; then
15187
15188
15189cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015190#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015191_ACEOF
15192
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015193 wchar_h="yes"
15194
Guido van Rossumef2255b2000-03-10 22:30:29 +000015195else
Martin v. Löwis11437992002-04-12 09:54:03 +000015196 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015197
15198fi
15199
Michael W. Hudson54241132001-12-07 15:38:26 +000015200
Martin v. Löwis11437992002-04-12 09:54:03 +000015201
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015202# determine wchar_t size
15203if test "$wchar_h" = yes
15204then
Martin v. Löwis11437992002-04-12 09:54:03 +000015205 echo "$as_me:$LINENO: checking for wchar_t" >&5
15206echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
15207if test "${ac_cv_type_wchar_t+set}" = set; then
15208 echo $ECHO_N "(cached) $ECHO_C" >&6
15209else
15210 cat >conftest.$ac_ext <<_ACEOF
15211#line $LINENO "configure"
15212#include "confdefs.h"
15213#include <wchar.h>
15214
15215#ifdef F77_DUMMY_MAIN
15216# ifdef __cplusplus
15217 extern "C"
15218# endif
15219 int F77_DUMMY_MAIN() { return 1; }
15220#endif
15221int
15222main ()
15223{
15224if ((wchar_t *) 0)
15225 return 0;
15226if (sizeof (wchar_t))
15227 return 0;
15228 ;
15229 return 0;
15230}
15231_ACEOF
15232rm -f conftest.$ac_objext
15233if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15234 (eval $ac_compile) 2>&5
15235 ac_status=$?
15236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15237 (exit $ac_status); } &&
15238 { ac_try='test -s conftest.$ac_objext'
15239 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15240 (eval $ac_try) 2>&5
15241 ac_status=$?
15242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15243 (exit $ac_status); }; }; then
15244 ac_cv_type_wchar_t=yes
15245else
15246 echo "$as_me: failed program was:" >&5
15247cat conftest.$ac_ext >&5
15248ac_cv_type_wchar_t=no
15249fi
15250rm -f conftest.$ac_objext conftest.$ac_ext
15251fi
15252echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
15253echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
15254
15255echo "$as_me:$LINENO: checking size of wchar_t" >&5
15256echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
15257if test "${ac_cv_sizeof_wchar_t+set}" = set; then
15258 echo $ECHO_N "(cached) $ECHO_C" >&6
15259else
15260 if test "$ac_cv_type_wchar_t" = yes; then
15261 # The cast to unsigned long works around a bug in the HP C Compiler
15262 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15263 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15264 # This bug is HP SR number 8606223364.
15265 if test "$cross_compiling" = yes; then
15266 # Depending upon the size, compute the lo and hi bounds.
15267cat >conftest.$ac_ext <<_ACEOF
15268#line $LINENO "configure"
15269#include "confdefs.h"
15270#include <wchar.h>
15271
15272#ifdef F77_DUMMY_MAIN
15273# ifdef __cplusplus
15274 extern "C"
15275# endif
15276 int F77_DUMMY_MAIN() { return 1; }
15277#endif
15278int
15279main ()
15280{
15281static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
15282test_array [0] = 0
15283
15284 ;
15285 return 0;
15286}
15287_ACEOF
15288rm -f conftest.$ac_objext
15289if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15290 (eval $ac_compile) 2>&5
15291 ac_status=$?
15292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15293 (exit $ac_status); } &&
15294 { ac_try='test -s conftest.$ac_objext'
15295 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15296 (eval $ac_try) 2>&5
15297 ac_status=$?
15298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15299 (exit $ac_status); }; }; then
15300 ac_lo=0 ac_mid=0
15301 while :; do
15302 cat >conftest.$ac_ext <<_ACEOF
15303#line $LINENO "configure"
15304#include "confdefs.h"
15305#include <wchar.h>
15306
15307#ifdef F77_DUMMY_MAIN
15308# ifdef __cplusplus
15309 extern "C"
15310# endif
15311 int F77_DUMMY_MAIN() { return 1; }
15312#endif
15313int
15314main ()
15315{
15316static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
15317test_array [0] = 0
15318
15319 ;
15320 return 0;
15321}
15322_ACEOF
15323rm -f conftest.$ac_objext
15324if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15325 (eval $ac_compile) 2>&5
15326 ac_status=$?
15327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15328 (exit $ac_status); } &&
15329 { ac_try='test -s conftest.$ac_objext'
15330 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15331 (eval $ac_try) 2>&5
15332 ac_status=$?
15333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15334 (exit $ac_status); }; }; then
15335 ac_hi=$ac_mid; break
15336else
15337 echo "$as_me: failed program was:" >&5
15338cat conftest.$ac_ext >&5
15339ac_lo=`expr $ac_mid + 1`
15340 if test $ac_lo -le $ac_mid; then
15341 ac_lo= ac_hi=
15342 break
15343 fi
15344 ac_mid=`expr 2 '*' $ac_mid + 1`
15345fi
15346rm -f conftest.$ac_objext conftest.$ac_ext
15347 done
15348else
15349 echo "$as_me: failed program was:" >&5
15350cat conftest.$ac_ext >&5
15351cat >conftest.$ac_ext <<_ACEOF
15352#line $LINENO "configure"
15353#include "confdefs.h"
15354#include <wchar.h>
15355
15356#ifdef F77_DUMMY_MAIN
15357# ifdef __cplusplus
15358 extern "C"
15359# endif
15360 int F77_DUMMY_MAIN() { return 1; }
15361#endif
15362int
15363main ()
15364{
15365static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
15366test_array [0] = 0
15367
15368 ;
15369 return 0;
15370}
15371_ACEOF
15372rm -f conftest.$ac_objext
15373if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15374 (eval $ac_compile) 2>&5
15375 ac_status=$?
15376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15377 (exit $ac_status); } &&
15378 { ac_try='test -s conftest.$ac_objext'
15379 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15380 (eval $ac_try) 2>&5
15381 ac_status=$?
15382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15383 (exit $ac_status); }; }; then
15384 ac_hi=-1 ac_mid=-1
15385 while :; do
15386 cat >conftest.$ac_ext <<_ACEOF
15387#line $LINENO "configure"
15388#include "confdefs.h"
15389#include <wchar.h>
15390
15391#ifdef F77_DUMMY_MAIN
15392# ifdef __cplusplus
15393 extern "C"
15394# endif
15395 int F77_DUMMY_MAIN() { return 1; }
15396#endif
15397int
15398main ()
15399{
15400static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
15401test_array [0] = 0
15402
15403 ;
15404 return 0;
15405}
15406_ACEOF
15407rm -f conftest.$ac_objext
15408if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15409 (eval $ac_compile) 2>&5
15410 ac_status=$?
15411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15412 (exit $ac_status); } &&
15413 { ac_try='test -s conftest.$ac_objext'
15414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15415 (eval $ac_try) 2>&5
15416 ac_status=$?
15417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15418 (exit $ac_status); }; }; then
15419 ac_lo=$ac_mid; break
15420else
15421 echo "$as_me: failed program was:" >&5
15422cat conftest.$ac_ext >&5
15423ac_hi=`expr '(' $ac_mid ')' - 1`
15424 if test $ac_mid -le $ac_hi; then
15425 ac_lo= ac_hi=
15426 break
15427 fi
15428 ac_mid=`expr 2 '*' $ac_mid`
15429fi
15430rm -f conftest.$ac_objext conftest.$ac_ext
15431 done
15432else
15433 echo "$as_me: failed program was:" >&5
15434cat conftest.$ac_ext >&5
15435ac_lo= ac_hi=
15436fi
15437rm -f conftest.$ac_objext conftest.$ac_ext
15438fi
15439rm -f conftest.$ac_objext conftest.$ac_ext
15440# Binary search between lo and hi bounds.
15441while test "x$ac_lo" != "x$ac_hi"; do
15442 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
15443 cat >conftest.$ac_ext <<_ACEOF
15444#line $LINENO "configure"
15445#include "confdefs.h"
15446#include <wchar.h>
15447
15448#ifdef F77_DUMMY_MAIN
15449# ifdef __cplusplus
15450 extern "C"
15451# endif
15452 int F77_DUMMY_MAIN() { return 1; }
15453#endif
15454int
15455main ()
15456{
15457static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
15458test_array [0] = 0
15459
15460 ;
15461 return 0;
15462}
15463_ACEOF
15464rm -f conftest.$ac_objext
15465if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15466 (eval $ac_compile) 2>&5
15467 ac_status=$?
15468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15469 (exit $ac_status); } &&
15470 { ac_try='test -s conftest.$ac_objext'
15471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15472 (eval $ac_try) 2>&5
15473 ac_status=$?
15474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15475 (exit $ac_status); }; }; then
15476 ac_hi=$ac_mid
15477else
15478 echo "$as_me: failed program was:" >&5
15479cat conftest.$ac_ext >&5
15480ac_lo=`expr '(' $ac_mid ')' + 1`
15481fi
15482rm -f conftest.$ac_objext conftest.$ac_ext
15483done
15484case $ac_lo in
15485?*) ac_cv_sizeof_wchar_t=$ac_lo;;
15486'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15487echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15488 { (exit 1); exit 1; }; } ;;
15489esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015490else
15491 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015492 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
15493echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15494 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000015495else
Martin v. Löwis11437992002-04-12 09:54:03 +000015496 cat >conftest.$ac_ext <<_ACEOF
15497#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015498#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015499#include <wchar.h>
15500
15501long longval () { return (long) (sizeof (wchar_t)); }
15502unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000015503#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015504#include <stdlib.h>
15505#ifdef F77_DUMMY_MAIN
15506# ifdef __cplusplus
15507 extern "C"
15508# endif
15509 int F77_DUMMY_MAIN() { return 1; }
15510#endif
15511int
15512main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015513{
Martin v. Löwis11437992002-04-12 09:54:03 +000015514
15515 FILE *f = fopen ("conftest.val", "w");
15516 if (! f)
15517 exit (1);
15518 if (((long) (sizeof (wchar_t))) < 0)
15519 {
15520 long i = longval ();
15521 if (i != ((long) (sizeof (wchar_t))))
15522 exit (1);
15523 fprintf (f, "%ld\n", i);
15524 }
15525 else
15526 {
15527 unsigned long i = ulongval ();
15528 if (i != ((long) (sizeof (wchar_t))))
15529 exit (1);
15530 fprintf (f, "%lu\n", i);
15531 }
15532 exit (ferror (f) || fclose (f) != 0);
15533
15534 ;
15535 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015536}
Martin v. Löwis11437992002-04-12 09:54:03 +000015537_ACEOF
15538rm -f conftest$ac_exeext
15539if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15540 (eval $ac_link) 2>&5
15541 ac_status=$?
15542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15543 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15544 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15545 (eval $ac_try) 2>&5
15546 ac_status=$?
15547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15548 (exit $ac_status); }; }; then
15549 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000015550else
Martin v. Löwis11437992002-04-12 09:54:03 +000015551 echo "$as_me: program exited with status $ac_status" >&5
15552echo "$as_me: failed program was:" >&5
15553cat conftest.$ac_ext >&5
15554( exit $ac_status )
15555{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15556echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15557 { (exit 1); exit 1; }; }
15558fi
15559rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15560fi
15561fi
15562rm -f conftest.val
15563else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015564 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000015565fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015566fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015567echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
15568echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
15569cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015570#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015571_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015572
Michael W. Hudson54241132001-12-07 15:38:26 +000015573
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015574fi
15575
Martin v. Löwis11437992002-04-12 09:54:03 +000015576echo "$as_me:$LINENO: checking what type to use for unicode" >&5
15577echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015578# Check whether --enable-unicode or --disable-unicode was given.
15579if test "${enable_unicode+set}" = set; then
15580 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000015581
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015582else
15583 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015584fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015585
15586if test $enable_unicode = yes
15587then
Martin v. Löwisfd917792001-06-27 20:22:04 +000015588 # Without any arguments, Py_UNICODE defaults to two-byte mode
15589 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015590fi
15591
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015592
15593
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015594case "$enable_unicode" in
15595ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000015596 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015597#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000015598_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015599
15600 ;;
15601ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000015602 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015603#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000015604_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015605
15606 ;;
15607esac
15608
Michael W. Hudson54241132001-12-07 15:38:26 +000015609
Martin v. Löwis11437992002-04-12 09:54:03 +000015610
15611
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015612
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015613if test "$enable_unicode" = "no"
15614then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015615 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000015616 echo "$as_me:$LINENO: result: not used" >&5
15617echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015618else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015619 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000015620
15621cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015622#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015623_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015624
15625 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
15626 then
15627 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015628
Martin v. Löwis11437992002-04-12 09:54:03 +000015629cat >>confdefs.h <<\_ACEOF
15630#define HAVE_USABLE_WCHAR_T 1
15631_ACEOF
15632
15633 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015634#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015635_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015636
15637 elif test "$ac_cv_sizeof_short" = "$unicode_size"
15638 then
15639 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000015640 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015641#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000015642_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015643
15644 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15645 then
15646 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015647 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015648#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015649_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015650
15651 else
15652 PY_UNICODE_TYPE="no type found"
15653 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015654 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15655echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015656fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015657
15658# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015659echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15660echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15661if test "${ac_cv_c_bigendian+set}" = set; then
15662 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015663else
Martin v. Löwis11437992002-04-12 09:54:03 +000015664 # See if sys/param.h defines the BYTE_ORDER macro.
15665cat >conftest.$ac_ext <<_ACEOF
15666#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015667#include "confdefs.h"
15668#include <sys/types.h>
15669#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015670
Martin v. Löwis11437992002-04-12 09:54:03 +000015671#ifdef F77_DUMMY_MAIN
15672# ifdef __cplusplus
15673 extern "C"
15674# endif
15675 int F77_DUMMY_MAIN() { return 1; }
15676#endif
15677int
15678main ()
15679{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015680#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15681 bogus endian macros
15682#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015683
15684 ;
15685 return 0;
15686}
15687_ACEOF
15688rm -f conftest.$ac_objext
15689if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15690 (eval $ac_compile) 2>&5
15691 ac_status=$?
15692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15693 (exit $ac_status); } &&
15694 { ac_try='test -s conftest.$ac_objext'
15695 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15696 (eval $ac_try) 2>&5
15697 ac_status=$?
15698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15699 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015700 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015701cat >conftest.$ac_ext <<_ACEOF
15702#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015703#include "confdefs.h"
15704#include <sys/types.h>
15705#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015706
Martin v. Löwis11437992002-04-12 09:54:03 +000015707#ifdef F77_DUMMY_MAIN
15708# ifdef __cplusplus
15709 extern "C"
15710# endif
15711 int F77_DUMMY_MAIN() { return 1; }
15712#endif
15713int
15714main ()
15715{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015716#if BYTE_ORDER != BIG_ENDIAN
15717 not big endian
15718#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015719
15720 ;
15721 return 0;
15722}
15723_ACEOF
15724rm -f conftest.$ac_objext
15725if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15726 (eval $ac_compile) 2>&5
15727 ac_status=$?
15728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15729 (exit $ac_status); } &&
15730 { ac_try='test -s conftest.$ac_objext'
15731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15732 (eval $ac_try) 2>&5
15733 ac_status=$?
15734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15735 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015736 ac_cv_c_bigendian=yes
15737else
Martin v. Löwis11437992002-04-12 09:54:03 +000015738 echo "$as_me: failed program was:" >&5
15739cat conftest.$ac_ext >&5
15740ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015741fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015742rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015743else
Martin v. Löwis11437992002-04-12 09:54:03 +000015744 echo "$as_me: failed program was:" >&5
15745cat conftest.$ac_ext >&5
15746# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000015747if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015748 # try to guess the endianess by grep'ing values into an object file
15749 ac_cv_c_bigendian=unknown
15750 cat >conftest.$ac_ext <<_ACEOF
15751#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015752#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015753short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15754short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15755void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
15756short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15757short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15758void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
15759#ifdef F77_DUMMY_MAIN
15760# ifdef __cplusplus
15761 extern "C"
15762# endif
15763 int F77_DUMMY_MAIN() { return 1; }
15764#endif
15765int
15766main ()
15767{
15768 _ascii (); _ebcdic ();
15769 ;
15770 return 0;
15771}
15772_ACEOF
15773rm -f conftest.$ac_objext
15774if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15775 (eval $ac_compile) 2>&5
15776 ac_status=$?
15777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15778 (exit $ac_status); } &&
15779 { ac_try='test -s conftest.$ac_objext'
15780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15781 (eval $ac_try) 2>&5
15782 ac_status=$?
15783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15784 (exit $ac_status); }; }; then
15785 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
15786 ac_cv_c_bigendian=yes
15787fi
15788if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15789 if test "$ac_cv_c_bigendian" = unknown; then
15790 ac_cv_c_bigendian=no
15791 else
15792 # finding both strings is unlikely to happen, but who knows?
15793 ac_cv_c_bigendian=unknown
15794 fi
15795fi
15796else
15797 echo "$as_me: failed program was:" >&5
15798cat conftest.$ac_ext >&5
15799fi
15800rm -f conftest.$ac_objext conftest.$ac_ext
15801else
15802 cat >conftest.$ac_ext <<_ACEOF
15803#line $LINENO "configure"
15804#include "confdefs.h"
15805int
15806main ()
15807{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015808 /* Are we little or big endian? From Harbison&Steele. */
15809 union
15810 {
15811 long l;
15812 char c[sizeof (long)];
15813 } u;
15814 u.l = 1;
15815 exit (u.c[sizeof (long) - 1] == 1);
15816}
Martin v. Löwis11437992002-04-12 09:54:03 +000015817_ACEOF
15818rm -f conftest$ac_exeext
15819if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15820 (eval $ac_link) 2>&5
15821 ac_status=$?
15822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15823 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15825 (eval $ac_try) 2>&5
15826 ac_status=$?
15827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15828 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015829 ac_cv_c_bigendian=no
15830else
Martin v. Löwis11437992002-04-12 09:54:03 +000015831 echo "$as_me: program exited with status $ac_status" >&5
15832echo "$as_me: failed program was:" >&5
15833cat conftest.$ac_ext >&5
15834( exit $ac_status )
15835ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015836fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015837rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015838fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015839fi
15840rm -f conftest.$ac_objext conftest.$ac_ext
15841fi
15842echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
15843echo "${ECHO_T}$ac_cv_c_bigendian" >&6
15844case $ac_cv_c_bigendian in
15845 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000015846
Martin v. Löwis11437992002-04-12 09:54:03 +000015847cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015848#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015849_ACEOF
15850 ;;
15851 no)
15852 ;;
15853 *)
15854 { { echo "$as_me:$LINENO: error: unknown endianess
15855presetting ac_cv_c_bigendian=no (or yes) will help" >&5
15856echo "$as_me: error: unknown endianess
15857presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
15858 { (exit 1); exit 1; }; } ;;
15859esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015860
Michael W. Hudson54241132001-12-07 15:38:26 +000015861
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015862# Check whether right shifting a negative integer extends the sign bit
15863# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000015864echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
15865echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
15866if test "${ac_cv_rshift_extends_sign+set}" = set; then
15867 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015868else
Martin v. Löwis11437992002-04-12 09:54:03 +000015869
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015870if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015871 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015872else
Martin v. Löwis11437992002-04-12 09:54:03 +000015873 cat >conftest.$ac_ext <<_ACEOF
15874#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015875#include "confdefs.h"
15876
15877int main()
15878{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015879 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015880}
15881
Martin v. Löwis11437992002-04-12 09:54:03 +000015882_ACEOF
15883rm -f conftest$ac_exeext
15884if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15885 (eval $ac_link) 2>&5
15886 ac_status=$?
15887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15888 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15890 (eval $ac_try) 2>&5
15891 ac_status=$?
15892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15893 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000015894 ac_cv_rshift_extends_sign=yes
15895else
Martin v. Löwis11437992002-04-12 09:54:03 +000015896 echo "$as_me: program exited with status $ac_status" >&5
15897echo "$as_me: failed program was:" >&5
15898cat conftest.$ac_ext >&5
15899( exit $ac_status )
15900ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015901fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015902rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15903fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000015904fi
15905
Martin v. Löwis11437992002-04-12 09:54:03 +000015906echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
15907echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015908if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015909then
Martin v. Löwis11437992002-04-12 09:54:03 +000015910
15911cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015912#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015913_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015914
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015915fi
15916
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015917# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015918echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
15919echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
15920if test "${ac_cv_have_getc_unlocked+set}" = set; then
15921 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015922else
Martin v. Löwis11437992002-04-12 09:54:03 +000015923
15924cat >conftest.$ac_ext <<_ACEOF
15925#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015926#include "confdefs.h"
15927#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015928#ifdef F77_DUMMY_MAIN
15929# ifdef __cplusplus
15930 extern "C"
15931# endif
15932 int F77_DUMMY_MAIN() { return 1; }
15933#endif
15934int
15935main ()
15936{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015937
15938 FILE *f = fopen("/dev/null", "r");
15939 flockfile(f);
15940 getc_unlocked(f);
15941 funlockfile(f);
15942
Martin v. Löwis11437992002-04-12 09:54:03 +000015943 ;
15944 return 0;
15945}
15946_ACEOF
15947rm -f conftest.$ac_objext conftest$ac_exeext
15948if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15949 (eval $ac_link) 2>&5
15950 ac_status=$?
15951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15952 (exit $ac_status); } &&
15953 { ac_try='test -s conftest$ac_exeext'
15954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15955 (eval $ac_try) 2>&5
15956 ac_status=$?
15957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15958 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015959 ac_cv_have_getc_unlocked=yes
15960else
Martin v. Löwis11437992002-04-12 09:54:03 +000015961 echo "$as_me: failed program was:" >&5
15962cat conftest.$ac_ext >&5
15963ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015964fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015965rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015966fi
15967
Martin v. Löwis11437992002-04-12 09:54:03 +000015968echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
15969echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015970if test "$ac_cv_have_getc_unlocked" = yes
15971then
Martin v. Löwis11437992002-04-12 09:54:03 +000015972
15973cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015974#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015975_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015976
15977fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015978
Martin v. Löwis0daad592001-09-30 21:09:59 +000015979# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000015980echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
15981echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
15982if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
15983 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015984else
Martin v. Löwis11437992002-04-12 09:54:03 +000015985 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000015986LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015987cat >conftest.$ac_ext <<_ACEOF
15988#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000015989#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015990
Guido van Rossum353ae582001-07-10 16:45:32 +000015991/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015992#ifdef __cplusplus
15993extern "C"
15994#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000015995/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015996 builtin and then its argument prototype would still apply. */
15997char rl_pre_input_hook ();
15998#ifdef F77_DUMMY_MAIN
15999# ifdef __cplusplus
16000 extern "C"
16001# endif
16002 int F77_DUMMY_MAIN() { return 1; }
16003#endif
16004int
16005main ()
16006{
16007rl_pre_input_hook ();
16008 ;
16009 return 0;
16010}
16011_ACEOF
16012rm -f conftest.$ac_objext conftest$ac_exeext
16013if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16014 (eval $ac_link) 2>&5
16015 ac_status=$?
16016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16017 (exit $ac_status); } &&
16018 { ac_try='test -s conftest$ac_exeext'
16019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16020 (eval $ac_try) 2>&5
16021 ac_status=$?
16022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16023 (exit $ac_status); }; }; then
16024 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000016025else
Martin v. Löwis11437992002-04-12 09:54:03 +000016026 echo "$as_me: failed program was:" >&5
16027cat conftest.$ac_ext >&5
16028ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000016029fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016030rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16031LIBS=$ac_check_lib_save_LIBS
16032fi
16033echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
16034echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
16035if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016036
Martin v. Löwis11437992002-04-12 09:54:03 +000016037cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016038#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016039_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016040
Martin v. Löwis0daad592001-09-30 21:09:59 +000016041fi
16042
Michael W. Hudson54241132001-12-07 15:38:26 +000016043
Martin v. Löwis0daad592001-09-30 21:09:59 +000016044# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000016045echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
16046echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
16047if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
16048 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000016049else
Martin v. Löwis11437992002-04-12 09:54:03 +000016050 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000016051LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016052cat >conftest.$ac_ext <<_ACEOF
16053#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000016054#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016055
Martin v. Löwis0daad592001-09-30 21:09:59 +000016056/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016057#ifdef __cplusplus
16058extern "C"
16059#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000016060/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016061 builtin and then its argument prototype would still apply. */
16062char rl_completion_matches ();
16063#ifdef F77_DUMMY_MAIN
16064# ifdef __cplusplus
16065 extern "C"
16066# endif
16067 int F77_DUMMY_MAIN() { return 1; }
16068#endif
16069int
16070main ()
16071{
16072rl_completion_matches ();
16073 ;
16074 return 0;
16075}
16076_ACEOF
16077rm -f conftest.$ac_objext conftest$ac_exeext
16078if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16079 (eval $ac_link) 2>&5
16080 ac_status=$?
16081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16082 (exit $ac_status); } &&
16083 { ac_try='test -s conftest$ac_exeext'
16084 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16085 (eval $ac_try) 2>&5
16086 ac_status=$?
16087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16088 (exit $ac_status); }; }; then
16089 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000016090else
Martin v. Löwis11437992002-04-12 09:54:03 +000016091 echo "$as_me: failed program was:" >&5
16092cat conftest.$ac_ext >&5
16093ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000016094fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016095rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16096LIBS=$ac_check_lib_save_LIBS
16097fi
16098echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
16099echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
16100if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016101
Martin v. Löwis11437992002-04-12 09:54:03 +000016102cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000016103#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016104_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000016105
Guido van Rossum353ae582001-07-10 16:45:32 +000016106fi
16107
Jack Jansendd19cf82001-12-06 22:36:17 +000016108
Martin v. Löwis11437992002-04-12 09:54:03 +000016109echo "$as_me:$LINENO: checking for broken nice()" >&5
16110echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
16111if test "${ac_cv_broken_nice+set}" = set; then
16112 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016113else
Martin v. Löwis11437992002-04-12 09:54:03 +000016114
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016115if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000016116 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016117else
Martin v. Löwis11437992002-04-12 09:54:03 +000016118 cat >conftest.$ac_ext <<_ACEOF
16119#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016120#include "confdefs.h"
16121
16122int main()
16123{
16124 int val1 = nice(1);
16125 if (val1 != -1 && val1 == nice(2))
16126 exit(0);
16127 exit(1);
16128}
16129
Martin v. Löwis11437992002-04-12 09:54:03 +000016130_ACEOF
16131rm -f conftest$ac_exeext
16132if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16133 (eval $ac_link) 2>&5
16134 ac_status=$?
16135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16136 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16138 (eval $ac_try) 2>&5
16139 ac_status=$?
16140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16141 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016142 ac_cv_broken_nice=yes
16143else
Martin v. Löwis11437992002-04-12 09:54:03 +000016144 echo "$as_me: program exited with status $ac_status" >&5
16145echo "$as_me: failed program was:" >&5
16146cat conftest.$ac_ext >&5
16147( exit $ac_status )
16148ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016149fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016150rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16151fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016152fi
16153
Martin v. Löwis11437992002-04-12 09:54:03 +000016154echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
16155echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016156if test "$ac_cv_broken_nice" = yes
16157then
Martin v. Löwis11437992002-04-12 09:54:03 +000016158
16159cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016160#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016161_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016162
16163fi
16164
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016165# Look for subsecond timestamps in struct stat
16166echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
16167echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
16168if test "${ac_cv_stat_tv_nsec+set}" = set; then
16169 echo $ECHO_N "(cached) $ECHO_C" >&6
16170else
16171 cat >conftest.$ac_ext <<_ACEOF
16172#line $LINENO "configure"
16173#include "confdefs.h"
16174#include <sys/stat.h>
16175#ifdef F77_DUMMY_MAIN
16176# ifdef __cplusplus
16177 extern "C"
16178# endif
16179 int F77_DUMMY_MAIN() { return 1; }
16180#endif
16181int
16182main ()
16183{
16184
16185struct stat st;
16186st.st_mtim.tv_nsec = 1;
16187
16188 ;
16189 return 0;
16190}
16191_ACEOF
16192rm -f conftest.$ac_objext
16193if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16194 (eval $ac_compile) 2>&5
16195 ac_status=$?
16196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16197 (exit $ac_status); } &&
16198 { ac_try='test -s conftest.$ac_objext'
16199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16200 (eval $ac_try) 2>&5
16201 ac_status=$?
16202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16203 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000016204 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016205else
16206 echo "$as_me: failed program was:" >&5
16207cat conftest.$ac_ext >&5
16208ac_cv_stat_tv_nsec=no
16209fi
16210rm -f conftest.$ac_objext conftest.$ac_ext
16211fi
16212
16213echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
16214echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
16215if test "$ac_cv_stat_tv_nsec" = yes
16216then
16217
16218cat >>confdefs.h <<\_ACEOF
16219#define HAVE_STAT_TV_NSEC 1
16220_ACEOF
16221
16222fi
16223
Jack Jansen666b1e72001-10-31 12:11:48 +000016224# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000016225echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
16226echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
16227if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
16228 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016229else
Martin v. Löwis11437992002-04-12 09:54:03 +000016230 cat >conftest.$ac_ext <<_ACEOF
16231#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000016232#include "confdefs.h"
16233#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016234#ifdef F77_DUMMY_MAIN
16235# ifdef __cplusplus
16236 extern "C"
16237# endif
16238 int F77_DUMMY_MAIN() { return 1; }
16239#endif
16240int
16241main ()
16242{
Jack Jansen666b1e72001-10-31 12:11:48 +000016243
16244 int rtn;
16245 rtn = mvwdelch(0,0,0);
16246
Martin v. Löwis11437992002-04-12 09:54:03 +000016247 ;
16248 return 0;
16249}
16250_ACEOF
16251rm -f conftest.$ac_objext
16252if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16253 (eval $ac_compile) 2>&5
16254 ac_status=$?
16255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16256 (exit $ac_status); } &&
16257 { ac_try='test -s conftest.$ac_objext'
16258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16259 (eval $ac_try) 2>&5
16260 ac_status=$?
16261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16262 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000016263 ac_cv_mvwdelch_is_expression=yes
16264else
Martin v. Löwis11437992002-04-12 09:54:03 +000016265 echo "$as_me: failed program was:" >&5
16266cat conftest.$ac_ext >&5
16267ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016268fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016269rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000016270fi
16271
Martin v. Löwis11437992002-04-12 09:54:03 +000016272echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
16273echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016274
16275if test "$ac_cv_mvwdelch_is_expression" = yes
16276then
Martin v. Löwis11437992002-04-12 09:54:03 +000016277
16278cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016279#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016280_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016281
16282fi
16283
Martin v. Löwis11437992002-04-12 09:54:03 +000016284echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
16285echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
16286if test "${ac_cv_window_has_flags+set}" = set; then
16287 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016288else
Martin v. Löwis11437992002-04-12 09:54:03 +000016289 cat >conftest.$ac_ext <<_ACEOF
16290#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000016291#include "confdefs.h"
16292#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016293#ifdef F77_DUMMY_MAIN
16294# ifdef __cplusplus
16295 extern "C"
16296# endif
16297 int F77_DUMMY_MAIN() { return 1; }
16298#endif
16299int
16300main ()
16301{
Jack Jansen666b1e72001-10-31 12:11:48 +000016302
16303 WINDOW *w;
16304 w->_flags = 0;
16305
Martin v. Löwis11437992002-04-12 09:54:03 +000016306 ;
16307 return 0;
16308}
16309_ACEOF
16310rm -f conftest.$ac_objext
16311if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16312 (eval $ac_compile) 2>&5
16313 ac_status=$?
16314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16315 (exit $ac_status); } &&
16316 { ac_try='test -s conftest.$ac_objext'
16317 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16318 (eval $ac_try) 2>&5
16319 ac_status=$?
16320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16321 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000016322 ac_cv_window_has_flags=yes
16323else
Martin v. Löwis11437992002-04-12 09:54:03 +000016324 echo "$as_me: failed program was:" >&5
16325cat conftest.$ac_ext >&5
16326ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016327fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016328rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000016329fi
16330
Martin v. Löwis11437992002-04-12 09:54:03 +000016331echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
16332echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016333
Jack Jansen666b1e72001-10-31 12:11:48 +000016334
16335if test "$ac_cv_window_has_flags" = yes
16336then
Martin v. Löwis11437992002-04-12 09:54:03 +000016337
16338cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016339#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016340_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016341
16342fi
16343
Guido van Rossum95713eb2000-05-18 20:53:31 +000016344# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
16345# Add sys/socket.h to confdefs.h
16346cat >> confdefs.h <<\EOF
16347#ifdef HAVE_SYS_SOCKET_H
16348#include <sys/socket.h>
16349#endif
16350EOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016351echo "$as_me:$LINENO: checking for socklen_t" >&5
16352echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
16353if test "${ac_cv_type_socklen_t+set}" = set; then
16354 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000016355else
Martin v. Löwis11437992002-04-12 09:54:03 +000016356 cat >conftest.$ac_ext <<_ACEOF
16357#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000016358#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016359$ac_includes_default
16360#ifdef F77_DUMMY_MAIN
16361# ifdef __cplusplus
16362 extern "C"
16363# endif
16364 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016365#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016366int
16367main ()
16368{
16369if ((socklen_t *) 0)
16370 return 0;
16371if (sizeof (socklen_t))
16372 return 0;
16373 ;
16374 return 0;
16375}
16376_ACEOF
16377rm -f conftest.$ac_objext
16378if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16379 (eval $ac_compile) 2>&5
16380 ac_status=$?
16381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16382 (exit $ac_status); } &&
16383 { ac_try='test -s conftest.$ac_objext'
16384 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16385 (eval $ac_try) 2>&5
16386 ac_status=$?
16387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16388 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016389 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000016390else
Martin v. Löwis11437992002-04-12 09:54:03 +000016391 echo "$as_me: failed program was:" >&5
16392cat conftest.$ac_ext >&5
16393ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000016394fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016395rm -f conftest.$ac_objext conftest.$ac_ext
16396fi
16397echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
16398echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
16399if test $ac_cv_type_socklen_t = yes; then
16400 :
16401else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016402
Martin v. Löwis11437992002-04-12 09:54:03 +000016403cat >>confdefs.h <<_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000016404#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000016405_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000016406
16407fi
16408
Michael W. Hudson54241132001-12-07 15:38:26 +000016409
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016410#AC_MSG_CHECKING(for Modules/Setup)
16411#if test ! -f Modules/Setup ; then
16412# if test ! -d Modules ; then
16413# mkdir Modules
16414# fi
16415# cp "$srcdir/Modules/Setup.dist" Modules/Setup
16416# AC_MSG_RESULT(creating)
16417#else
16418# AC_MSG_RESULT(already exists)
16419#fi
16420
Michael W. Hudson54241132001-12-07 15:38:26 +000016421
16422
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016423for h in `(cd $srcdir;echo Python/thread_*.h)`
16424do
16425 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16426done
16427
Michael W. Hudson54241132001-12-07 15:38:26 +000016428
Jack Jansen0b06be72002-06-21 14:48:38 +000016429SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000016430echo "$as_me:$LINENO: checking for build directories" >&5
16431echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016432for dir in $SRCDIRS; do
16433 if test ! -d $dir; then
16434 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016435 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016436done
Martin v. Löwis11437992002-04-12 09:54:03 +000016437echo "$as_me:$LINENO: result: done" >&5
16438echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000016439
Guido van Rossum627b2d71993-12-24 10:39:16 +000016440# generate output files
Martin v. Löwis11437992002-04-12 09:54:03 +000016441ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
16442cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016443# This file is a shell script that caches the results of configure
16444# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016445# scripts and configure runs, see configure's option --config-cache.
16446# It is not useful on other systems. If it contains results you don't
16447# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016448#
Martin v. Löwis11437992002-04-12 09:54:03 +000016449# config.status only pays attention to the cache file if you give it
16450# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016451#
Martin v. Löwis11437992002-04-12 09:54:03 +000016452# `ac_cv_env_foo' variables (set or unset) will be overriden when
16453# loading this file, other *unset* `ac_cv_foo' will be assigned the
16454# following values.
16455
16456_ACEOF
16457
Guido van Rossumf78abae1997-01-21 22:02:36 +000016458# The following way of writing the cache mishandles newlines in values,
16459# but we know of no workaround that is simple, portable, and efficient.
16460# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016461# Ultrix sh set writes to stderr and can't be redirected directly,
16462# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000016463{
16464 (set) 2>&1 |
16465 case `(ac_space=' '; set | grep ac_space) 2>&1` in
16466 *ac_space=\ *)
16467 # `set' does not quote correctly, so add quotes (double-quote
16468 # substitution turns \\\\ into \\, and sed turns \\ into \).
16469 sed -n \
16470 "s/'/'\\\\''/g;
16471 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16472 ;;
16473 *)
16474 # `set' quotes correctly as required by POSIX, so do not add quotes.
16475 sed -n \
16476 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16477 ;;
16478 esac;
16479} |
16480 sed '
16481 t clear
16482 : clear
16483 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16484 t end
16485 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16486 : end' >>confcache
16487if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016488 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016489 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16490 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016491 else
16492 echo "not updating unwritable cache $cache_file"
16493 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016494fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016495rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016496
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016497test "x$prefix" = xNONE && prefix=$ac_default_prefix
16498# Let make expand exec_prefix.
16499test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016500
Martin v. Löwis11437992002-04-12 09:54:03 +000016501# VPATH may cause trouble with some makes, so we remove $(srcdir),
16502# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16503# trailing colons and then remove the whole line if VPATH becomes empty
16504# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000016505if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016506 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16507s/:*\$(srcdir):*/:/;
16508s/:*\${srcdir}:*/:/;
16509s/:*@srcdir@:*/:/;
16510s/^\([^=]*=[ ]*\):*/\1/;
16511s/:*$//;
16512s/^[^=]*=[ ]*$//;
16513}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016514fi
16515
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016516DEFS=-DHAVE_CONFIG_H
16517
Martin v. Löwis11437992002-04-12 09:54:03 +000016518
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016519: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000016520ac_clean_files_save=$ac_clean_files
16521ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16522{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
16523echo "$as_me: creating $CONFIG_STATUS" >&6;}
16524cat >$CONFIG_STATUS <<_ACEOF
16525#! $SHELL
16526# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016527# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016528# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016529# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016530
Martin v. Löwis11437992002-04-12 09:54:03 +000016531debug=false
16532SHELL=\${CONFIG_SHELL-$SHELL}
16533_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016534
Martin v. Löwis11437992002-04-12 09:54:03 +000016535cat >>$CONFIG_STATUS <<\_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016536
Martin v. Löwis11437992002-04-12 09:54:03 +000016537## --------------------- ##
16538## M4sh Initialization. ##
16539## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016540
Martin v. Löwis11437992002-04-12 09:54:03 +000016541# Be Bourne compatible
16542if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16543 emulate sh
16544 NULLCMD=:
16545elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16546 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000016547fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016548
Martin v. Löwis11437992002-04-12 09:54:03 +000016549# NLS nuisances.
16550# Support unset when possible.
16551if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16552 as_unset=unset
16553else
16554 as_unset=false
16555fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016556
Martin v. Löwis11437992002-04-12 09:54:03 +000016557(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
16558 { $as_unset LANG || test "${LANG+set}" != set; } ||
16559 { LANG=C; export LANG; }
16560(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
16561 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
16562 { LC_ALL=C; export LC_ALL; }
16563(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
16564 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
16565 { LC_TIME=C; export LC_TIME; }
16566(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
16567 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
16568 { LC_CTYPE=C; export LC_CTYPE; }
16569(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
16570 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
16571 { LANGUAGE=C; export LANGUAGE; }
16572(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
16573 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
16574 { LC_COLLATE=C; export LC_COLLATE; }
16575(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
16576 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
16577 { LC_NUMERIC=C; export LC_NUMERIC; }
16578(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
16579 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
16580 { LC_MESSAGES=C; export LC_MESSAGES; }
16581
16582
16583# Name of the executable.
16584as_me=`(basename "$0") 2>/dev/null ||
16585$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16586 X"$0" : 'X\(//\)$' \| \
16587 X"$0" : 'X\(/\)$' \| \
16588 . : '\(.\)' 2>/dev/null ||
16589echo X/"$0" |
16590 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
16591 /^X\/\(\/\/\)$/{ s//\1/; q; }
16592 /^X\/\(\/\).*/{ s//\1/; q; }
16593 s/.*/./; q'`
16594
16595# PATH needs CR, and LINENO needs CR and PATH.
16596# Avoid depending upon Character Ranges.
16597as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16598as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16599as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16600as_cr_digits='0123456789'
16601as_cr_alnum=$as_cr_Letters$as_cr_digits
16602
16603# The user is always right.
16604if test "${PATH_SEPARATOR+set}" != set; then
16605 echo "#! /bin/sh" >conftest.sh
16606 echo "exit 0" >>conftest.sh
16607 chmod +x conftest.sh
16608 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
16609 PATH_SEPARATOR=';'
16610 else
16611 PATH_SEPARATOR=:
16612 fi
16613 rm -f conftest.sh
16614fi
16615
16616
16617 as_lineno_1=$LINENO
16618 as_lineno_2=$LINENO
16619 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16620 test "x$as_lineno_1" != "x$as_lineno_2" &&
16621 test "x$as_lineno_3" = "x$as_lineno_2" || {
16622 # Find who we are. Look in the path if we contain no path at all
16623 # relative or not.
16624 case $0 in
16625 *[\\/]* ) as_myself=$0 ;;
16626 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16627for as_dir in $PATH
16628do
16629 IFS=$as_save_IFS
16630 test -z "$as_dir" && as_dir=.
16631 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16632done
16633
16634 ;;
16635 esac
16636 # We did not find ourselves, most probably we were run as `sh COMMAND'
16637 # in which case we are not to be found in the path.
16638 if test "x$as_myself" = x; then
16639 as_myself=$0
16640 fi
16641 if test ! -f "$as_myself"; then
16642 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16643echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16644 { (exit 1); exit 1; }; }
16645 fi
16646 case $CONFIG_SHELL in
16647 '')
16648 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16649for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16650do
16651 IFS=$as_save_IFS
16652 test -z "$as_dir" && as_dir=.
16653 for as_base in sh bash ksh sh5; do
16654 case $as_dir in
16655 /*)
16656 if ("$as_dir/$as_base" -c '
16657 as_lineno_1=$LINENO
16658 as_lineno_2=$LINENO
16659 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16660 test "x$as_lineno_1" != "x$as_lineno_2" &&
16661 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
16662 CONFIG_SHELL=$as_dir/$as_base
16663 export CONFIG_SHELL
16664 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16665 fi;;
16666 esac
16667 done
16668done
16669;;
Jack Jansendd19cf82001-12-06 22:36:17 +000016670 esac
16671
Martin v. Löwis11437992002-04-12 09:54:03 +000016672 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16673 # uniformly replaced by the line number. The first 'sed' inserts a
16674 # line-number line before each line; the second 'sed' does the real
16675 # work. The second script uses 'N' to pair each line-number line
16676 # with the numbered line, and appends trailing '-' during
16677 # substitution so that $LINENO is not a special case at line end.
16678 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16679 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16680 sed '=' <$as_myself |
16681 sed '
16682 N
16683 s,$,-,
16684 : loop
16685 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16686 t loop
16687 s,-$,,
16688 s,^['$as_cr_digits']*\n,,
16689 ' >$as_me.lineno &&
16690 chmod +x $as_me.lineno ||
16691 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16692echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16693 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016694
Martin v. Löwis11437992002-04-12 09:54:03 +000016695 # Don't try to exec as it changes $[0], causing all sort of problems
16696 # (the dirname of $[0] is not the place where we might find the
16697 # original and so on. Autoconf is especially sensible to this).
16698 . ./$as_me.lineno
16699 # Exit status is that of the last command.
16700 exit
16701}
16702
16703
16704case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16705 *c*,-n*) ECHO_N= ECHO_C='
16706' ECHO_T=' ' ;;
16707 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16708 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16709esac
16710
16711if expr a : '\(a\)' >/dev/null 2>&1; then
16712 as_expr=expr
16713else
16714 as_expr=false
16715fi
16716
16717rm -f conf$$ conf$$.exe conf$$.file
16718echo >conf$$.file
16719if ln -s conf$$.file conf$$ 2>/dev/null; then
16720 # We could just check for DJGPP; but this test a) works b) is more generic
16721 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16722 if test -f conf$$.exe; then
16723 # Don't use ln at all; we don't have any links
16724 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016725 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016726 as_ln_s='ln -s'
16727 fi
16728elif ln conf$$.file conf$$ 2>/dev/null; then
16729 as_ln_s=ln
16730else
16731 as_ln_s='cp -p'
16732fi
16733rm -f conf$$ conf$$.exe conf$$.file
16734
16735as_executable_p="test -f"
16736
16737# Sed expression to map a string onto a valid CPP name.
16738as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16739
16740# Sed expression to map a string onto a valid variable name.
16741as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16742
16743
16744# IFS
16745# We need space, tab and new line, in precisely that order.
16746as_nl='
16747'
16748IFS=" $as_nl"
16749
16750# CDPATH.
16751$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
16752
16753exec 6>&1
16754
16755# Open the log real soon, to keep \$[0] and so on meaningful, and to
16756# report actual input values of CONFIG_FILES etc. instead of their
16757# values after options handling. Logging --version etc. is OK.
16758exec 5>>config.log
16759{
16760 echo
16761 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16762## Running $as_me. ##
16763_ASBOX
16764} >&5
16765cat >&5 <<_CSEOF
16766
16767This file was extended by $as_me, which was
16768generated by GNU Autoconf 2.53. Invocation command line was
16769
16770 CONFIG_FILES = $CONFIG_FILES
16771 CONFIG_HEADERS = $CONFIG_HEADERS
16772 CONFIG_LINKS = $CONFIG_LINKS
16773 CONFIG_COMMANDS = $CONFIG_COMMANDS
16774 $ $0 $@
16775
16776_CSEOF
16777echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16778echo >&5
16779_ACEOF
16780
16781# Files that config.status was made for.
16782if test -n "$ac_config_files"; then
16783 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16784fi
16785
16786if test -n "$ac_config_headers"; then
16787 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16788fi
16789
16790if test -n "$ac_config_links"; then
16791 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16792fi
16793
16794if test -n "$ac_config_commands"; then
16795 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16796fi
16797
16798cat >>$CONFIG_STATUS <<\_ACEOF
16799
16800ac_cs_usage="\
16801\`$as_me' instantiates files from templates according to the
16802current configuration.
16803
16804Usage: $0 [OPTIONS] [FILE]...
16805
16806 -h, --help print this help, then exit
16807 -V, --version print version number, then exit
16808 -d, --debug don't remove temporary files
16809 --recheck update $as_me by reconfiguring in the same conditions
16810 --file=FILE[:TEMPLATE]
16811 instantiate the configuration file FILE
16812 --header=FILE[:TEMPLATE]
16813 instantiate the configuration header FILE
16814
16815Configuration files:
16816$config_files
16817
16818Configuration headers:
16819$config_headers
16820
16821Report bugs to <bug-autoconf@gnu.org>."
16822_ACEOF
16823
16824cat >>$CONFIG_STATUS <<_ACEOF
16825ac_cs_version="\\
16826config.status
16827configured by $0, generated by GNU Autoconf 2.53,
16828 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16829
16830Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16831Free Software Foundation, Inc.
16832This config.status script is free software; the Free Software Foundation
16833gives unlimited permission to copy, distribute and modify it."
16834srcdir=$srcdir
16835INSTALL="$INSTALL"
16836_ACEOF
16837
16838cat >>$CONFIG_STATUS <<\_ACEOF
16839# If no file are specified by the user, then we need to provide default
16840# value. By we need to know if files were specified by the user.
16841ac_need_defaults=:
16842while test $# != 0
16843do
16844 case $1 in
16845 --*=*)
16846 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16847 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16848 shift
16849 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16850 shift
16851 ;;
16852 -*);;
16853 *) # This is not an option, so the user has probably given explicit
16854 # arguments.
16855 ac_need_defaults=false;;
16856 esac
16857
16858 case $1 in
16859 # Handling of the options.
16860_ACEOF
16861cat >>$CONFIG_STATUS <<_ACEOF
16862 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16863 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16864 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16865_ACEOF
16866cat >>$CONFIG_STATUS <<\_ACEOF
16867 --version | --vers* | -V )
16868 echo "$ac_cs_version"; exit 0 ;;
16869 --he | --h)
16870 # Conflict between --help and --header
16871 { { echo "$as_me:$LINENO: error: ambiguous option: $1
16872Try \`$0 --help' for more information." >&5
16873echo "$as_me: error: ambiguous option: $1
16874Try \`$0 --help' for more information." >&2;}
16875 { (exit 1); exit 1; }; };;
16876 --help | --hel | -h )
16877 echo "$ac_cs_usage"; exit 0 ;;
16878 --debug | --d* | -d )
16879 debug=: ;;
16880 --file | --fil | --fi | --f )
16881 shift
16882 CONFIG_FILES="$CONFIG_FILES $1"
16883 ac_need_defaults=false;;
16884 --header | --heade | --head | --hea )
16885 shift
16886 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16887 ac_need_defaults=false;;
16888
16889 # This is an error.
16890 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16891Try \`$0 --help' for more information." >&5
16892echo "$as_me: error: unrecognized option: $1
16893Try \`$0 --help' for more information." >&2;}
16894 { (exit 1); exit 1; }; } ;;
16895
16896 *) ac_config_targets="$ac_config_targets $1" ;;
16897
16898 esac
16899 shift
16900done
16901
16902_ACEOF
16903
16904
16905
16906
16907
16908cat >>$CONFIG_STATUS <<\_ACEOF
16909for ac_config_target in $ac_config_targets
16910do
16911 case "$ac_config_target" in
16912 # Handling of arguments.
16913 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16914 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
16915 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16916 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16917echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16918 { (exit 1); exit 1; }; };;
16919 esac
16920done
16921
16922# If the user did not use the arguments to specify the items to instantiate,
16923# then the envvar interface is used. Set only those that are not.
16924# We use the long form for the default assignment because of an extremely
16925# bizarre bug on SunOS 4.1.3.
16926if $ac_need_defaults; then
16927 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16928 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16929fi
16930
16931# Create a temporary directory, and hook for its removal unless debugging.
16932$debug ||
16933{
16934 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16935 trap '{ (exit 1); exit 1; }' 1 2 13 15
16936}
16937
16938# Create a (secure) tmp directory for tmp files.
16939: ${TMPDIR=/tmp}
16940{
16941 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16942 test -n "$tmp" && test -d "$tmp"
16943} ||
16944{
16945 tmp=$TMPDIR/cs$$-$RANDOM
16946 (umask 077 && mkdir $tmp)
16947} ||
16948{
16949 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16950 { (exit 1); exit 1; }
16951}
16952
16953_ACEOF
16954
16955cat >>$CONFIG_STATUS <<_ACEOF
16956
16957#
16958# CONFIG_FILES section.
16959#
16960
16961# No need to generate the scripts if there are no CONFIG_FILES.
16962# This happens for instance when ./config.status config.h
16963if test -n "\$CONFIG_FILES"; then
16964 # Protect against being on the right side of a sed subst in config.status.
16965 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16966 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16967s,@SHELL@,$SHELL,;t t
16968s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16969s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16970s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16971s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16972s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16973s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16974s,@exec_prefix@,$exec_prefix,;t t
16975s,@prefix@,$prefix,;t t
16976s,@program_transform_name@,$program_transform_name,;t t
16977s,@bindir@,$bindir,;t t
16978s,@sbindir@,$sbindir,;t t
16979s,@libexecdir@,$libexecdir,;t t
16980s,@datadir@,$datadir,;t t
16981s,@sysconfdir@,$sysconfdir,;t t
16982s,@sharedstatedir@,$sharedstatedir,;t t
16983s,@localstatedir@,$localstatedir,;t t
16984s,@libdir@,$libdir,;t t
16985s,@includedir@,$includedir,;t t
16986s,@oldincludedir@,$oldincludedir,;t t
16987s,@infodir@,$infodir,;t t
16988s,@mandir@,$mandir,;t t
16989s,@build_alias@,$build_alias,;t t
16990s,@host_alias@,$host_alias,;t t
16991s,@target_alias@,$target_alias,;t t
16992s,@DEFS@,$DEFS,;t t
16993s,@ECHO_C@,$ECHO_C,;t t
16994s,@ECHO_N@,$ECHO_N,;t t
16995s,@ECHO_T@,$ECHO_T,;t t
16996s,@LIBS@,$LIBS,;t t
16997s,@VERSION@,$VERSION,;t t
16998s,@SOVERSION@,$SOVERSION,;t t
16999s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
17000s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
17001s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
17002s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
17003s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
17004s,@MACHDEP@,$MACHDEP,;t t
17005s,@SGI_ABI@,$SGI_ABI,;t t
17006s,@CXX@,$CXX,;t t
17007s,@MAINOBJ@,$MAINOBJ,;t t
17008s,@EXEEXT@,$EXEEXT,;t t
17009s,@CC@,$CC,;t t
17010s,@CFLAGS@,$CFLAGS,;t t
17011s,@LDFLAGS@,$LDFLAGS,;t t
17012s,@CPPFLAGS@,$CPPFLAGS,;t t
17013s,@ac_ct_CC@,$ac_ct_CC,;t t
17014s,@OBJEXT@,$OBJEXT,;t t
17015s,@CPP@,$CPP,;t t
17016s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
17017s,@LIBRARY@,$LIBRARY,;t t
17018s,@LDLIBRARY@,$LDLIBRARY,;t t
17019s,@DLLLIBRARY@,$DLLLIBRARY,;t t
17020s,@BLDLIBRARY@,$BLDLIBRARY,;t t
17021s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
17022s,@INSTSONAME@,$INSTSONAME,;t t
17023s,@RUNSHARED@,$RUNSHARED,;t t
17024s,@LINKCC@,$LINKCC,;t t
17025s,@RANLIB@,$RANLIB,;t t
17026s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17027s,@AR@,$AR,;t t
17028s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17029s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17030s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17031s,@LN@,$LN,;t t
17032s,@OPT@,$OPT,;t t
17033s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
17034s,@SO@,$SO,;t t
17035s,@LDSHARED@,$LDSHARED,;t t
17036s,@BLDSHARED@,$BLDSHARED,;t t
17037s,@CCSHARED@,$CCSHARED,;t t
17038s,@LINKFORSHARED@,$LINKFORSHARED,;t t
17039s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017040s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000017041s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
17042s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
17043s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
17044s,@LDLAST@,$LDLAST,;t t
17045s,@THREADOBJ@,$THREADOBJ,;t t
17046s,@DLINCLDIR@,$DLINCLDIR,;t t
17047s,@DYNLOADFILE@,$DYNLOADFILE,;t t
17048s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
17049s,@LIBOBJS@,$LIBOBJS,;t t
17050s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
17051s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
17052s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
17053s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
17054s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
17055s,@LIBM@,$LIBM,;t t
17056s,@LIBC@,$LIBC,;t t
17057s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
17058s,@THREADHEADERS@,$THREADHEADERS,;t t
17059s,@SRCDIRS@,$SRCDIRS,;t t
17060CEOF
17061
17062_ACEOF
17063
17064 cat >>$CONFIG_STATUS <<\_ACEOF
17065 # Split the substitutions into bite-sized pieces for seds with
17066 # small command number limits, like on Digital OSF/1 and HP-UX.
17067 ac_max_sed_lines=48
17068 ac_sed_frag=1 # Number of current file.
17069 ac_beg=1 # First line for current file.
17070 ac_end=$ac_max_sed_lines # Line after last line for current file.
17071 ac_more_lines=:
17072 ac_sed_cmds=
17073 while $ac_more_lines; do
17074 if test $ac_beg -gt 1; then
17075 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17076 else
17077 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17078 fi
17079 if test ! -s $tmp/subs.frag; then
17080 ac_more_lines=false
17081 else
17082 # The purpose of the label and of the branching condition is to
17083 # speed up the sed processing (if there are no `@' at all, there
17084 # is no need to browse any of the substitutions).
17085 # These are the two extra sed commands mentioned above.
17086 (echo ':t
17087 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17088 if test -z "$ac_sed_cmds"; then
17089 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17090 else
17091 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17092 fi
17093 ac_sed_frag=`expr $ac_sed_frag + 1`
17094 ac_beg=$ac_end
17095 ac_end=`expr $ac_end + $ac_max_sed_lines`
17096 fi
17097 done
17098 if test -z "$ac_sed_cmds"; then
17099 ac_sed_cmds=cat
17100 fi
17101fi # test -n "$CONFIG_FILES"
17102
17103_ACEOF
17104cat >>$CONFIG_STATUS <<\_ACEOF
17105for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17106 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17107 case $ac_file in
17108 - | *:- | *:-:* ) # input from stdin
17109 cat >$tmp/stdin
17110 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17111 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17112 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17113 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17114 * ) ac_file_in=$ac_file.in ;;
17115 esac
17116
17117 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17118 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17119$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17120 X"$ac_file" : 'X\(//\)[^/]' \| \
17121 X"$ac_file" : 'X\(//\)$' \| \
17122 X"$ac_file" : 'X\(/\)' \| \
17123 . : '\(.\)' 2>/dev/null ||
17124echo X"$ac_file" |
17125 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17126 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17127 /^X\(\/\/\)$/{ s//\1/; q; }
17128 /^X\(\/\).*/{ s//\1/; q; }
17129 s/.*/./; q'`
17130 { case "$ac_dir" in
17131 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17132 *) as_incr_dir=.;;
17133esac
17134as_dummy="$ac_dir"
17135for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17136 case $as_mkdir_dir in
17137 # Skip DOS drivespec
17138 ?:) as_incr_dir=$as_mkdir_dir ;;
17139 *)
17140 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17141 test -d "$as_incr_dir" ||
17142 mkdir "$as_incr_dir" ||
17143 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
17144echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
17145 { (exit 1); exit 1; }; }
17146 ;;
17147 esac
17148done; }
17149
17150 ac_builddir=.
17151
17152if test "$ac_dir" != .; then
17153 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
17154 # A "../" for each directory in $ac_dir_suffix.
17155 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
17156else
17157 ac_dir_suffix= ac_top_builddir=
17158fi
17159
17160case $srcdir in
17161 .) # No --srcdir option. We are building in place.
17162 ac_srcdir=.
17163 if test -z "$ac_top_builddir"; then
17164 ac_top_srcdir=.
17165 else
17166 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
17167 fi ;;
17168 [\\/]* | ?:[\\/]* ) # Absolute path.
17169 ac_srcdir=$srcdir$ac_dir_suffix;
17170 ac_top_srcdir=$srcdir ;;
17171 *) # Relative path.
17172 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
17173 ac_top_srcdir=$ac_top_builddir$srcdir ;;
17174esac
17175# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
17176# absolute.
17177ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017178ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000017179ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
17180ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
17181
17182
17183 case $INSTALL in
17184 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17185 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
17186 esac
17187
17188 if test x"$ac_file" != x-; then
17189 { echo "$as_me:$LINENO: creating $ac_file" >&5
17190echo "$as_me: creating $ac_file" >&6;}
17191 rm -f "$ac_file"
17192 fi
17193 # Let's still pretend it is `configure' which instantiates (i.e., don't
17194 # use $as_me), people would be surprised to read:
17195 # /* config.h. Generated by config.status. */
17196 if test x"$ac_file" = x-; then
17197 configure_input=
17198 else
17199 configure_input="$ac_file. "
17200 fi
17201 configure_input=$configure_input"Generated from `echo $ac_file_in |
17202 sed 's,.*/,,'` by configure."
17203
17204 # First look for the input files in the build tree, otherwise in the
17205 # src tree.
17206 ac_file_inputs=`IFS=:
17207 for f in $ac_file_in; do
17208 case $f in
17209 -) echo $tmp/stdin ;;
17210 [\\/$]*)
17211 # Absolute (can't be DOS-style, as IFS=:)
17212 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17213echo "$as_me: error: cannot find input file: $f" >&2;}
17214 { (exit 1); exit 1; }; }
17215 echo $f;;
17216 *) # Relative
17217 if test -f "$f"; then
17218 # Build tree
17219 echo $f
17220 elif test -f "$srcdir/$f"; then
17221 # Source tree
17222 echo $srcdir/$f
17223 else
17224 # /dev/null tree
17225 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17226echo "$as_me: error: cannot find input file: $f" >&2;}
17227 { (exit 1); exit 1; }; }
17228 fi;;
17229 esac
17230 done` || { (exit 1); exit 1; }
17231_ACEOF
17232cat >>$CONFIG_STATUS <<_ACEOF
17233 sed "$ac_vpsub
17234$extrasub
17235_ACEOF
17236cat >>$CONFIG_STATUS <<\_ACEOF
17237:t
17238/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17239s,@configure_input@,$configure_input,;t t
17240s,@srcdir@,$ac_srcdir,;t t
17241s,@abs_srcdir@,$ac_abs_srcdir,;t t
17242s,@top_srcdir@,$ac_top_srcdir,;t t
17243s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
17244s,@builddir@,$ac_builddir,;t t
17245s,@abs_builddir@,$ac_abs_builddir,;t t
17246s,@top_builddir@,$ac_top_builddir,;t t
17247s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
17248s,@INSTALL@,$ac_INSTALL,;t t
17249" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17250 rm -f $tmp/stdin
17251 if test x"$ac_file" != x-; then
17252 mv $tmp/out $ac_file
17253 else
17254 cat $tmp/out
17255 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017256 fi
17257
Martin v. Löwis11437992002-04-12 09:54:03 +000017258done
17259_ACEOF
17260cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017261
Martin v. Löwis11437992002-04-12 09:54:03 +000017262#
17263# CONFIG_HEADER section.
17264#
Guido van Rossum627b2d71993-12-24 10:39:16 +000017265
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017266# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17267# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017268#
17269# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000017270ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
17271ac_dB='[ ].*$,\1#\2'
17272ac_dC=' '
17273ac_dD=',;t'
17274# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17275ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
17276ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017277ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000017278ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017279
Martin v. Löwis11437992002-04-12 09:54:03 +000017280for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000017281 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000017282 case $ac_file in
17283 - | *:- | *:-:* ) # input from stdin
17284 cat >$tmp/stdin
17285 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17286 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17287 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17288 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17289 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017290 esac
17291
Martin v. Löwis11437992002-04-12 09:54:03 +000017292 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
17293echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000017294
Martin v. Löwis11437992002-04-12 09:54:03 +000017295 # First look for the input files in the build tree, otherwise in the
17296 # src tree.
17297 ac_file_inputs=`IFS=:
17298 for f in $ac_file_in; do
17299 case $f in
17300 -) echo $tmp/stdin ;;
17301 [\\/$]*)
17302 # Absolute (can't be DOS-style, as IFS=:)
17303 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17304echo "$as_me: error: cannot find input file: $f" >&2;}
17305 { (exit 1); exit 1; }; }
17306 echo $f;;
17307 *) # Relative
17308 if test -f "$f"; then
17309 # Build tree
17310 echo $f
17311 elif test -f "$srcdir/$f"; then
17312 # Source tree
17313 echo $srcdir/$f
17314 else
17315 # /dev/null tree
17316 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17317echo "$as_me: error: cannot find input file: $f" >&2;}
17318 { (exit 1); exit 1; }; }
17319 fi;;
17320 esac
17321 done` || { (exit 1); exit 1; }
17322 # Remove the trailing spaces.
17323 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017324
Martin v. Löwis11437992002-04-12 09:54:03 +000017325_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017326
Martin v. Löwis11437992002-04-12 09:54:03 +000017327# Transform confdefs.h into two sed scripts, `conftest.defines' and
17328# `conftest.undefs', that substitutes the proper values into
17329# config.h.in to produce config.h. The first handles `#define'
17330# templates, and the second `#undef' templates.
17331# And first: Protect against being on the right side of a sed subst in
17332# config.status. Protect against being in an unquoted here document
17333# in config.status.
17334rm -f conftest.defines conftest.undefs
17335# Using a here document instead of a string reduces the quoting nightmare.
17336# Putting comments in sed scripts is not portable.
17337#
17338# `end' is used to avoid that the second main sed command (meant for
17339# 0-ary CPP macros) applies to n-ary macro definitions.
17340# See the Autoconf documentation for `clear'.
17341cat >confdef2sed.sed <<\_ACEOF
17342s/[\\&,]/\\&/g
17343s,[\\$`],\\&,g
17344t clear
17345: clear
17346s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
17347t end
17348s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
17349: end
17350_ACEOF
17351# If some macros were called several times there might be several times
17352# the same #defines, which is useless. Nevertheless, we may not want to
17353# sort them, since we want the *last* AC-DEFINE to be honored.
17354uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
17355sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
17356rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017357
17358# This sed command replaces #undef with comments. This is necessary, for
17359# example, in the case of _POSIX_SOURCE, which is predefined and required
17360# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017361cat >>conftest.undefs <<\_ACEOF
17362s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
17363_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017364
Martin v. Löwis11437992002-04-12 09:54:03 +000017365# Break up conftest.defines because some shells have a limit on the size
17366# of here documents, and old seds have small limits too (100 cmds).
17367echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
17368echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
17369echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
17370echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017371rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000017372while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000017373do
Martin v. Löwis11437992002-04-12 09:54:03 +000017374 # Write a limited-size here document to $tmp/defines.sed.
17375 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
17376 # Speed up: don't consider the non `#define' lines.
17377 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
17378 # Work around the forget-to-reset-the-flag bug.
17379 echo 't clr' >>$CONFIG_STATUS
17380 echo ': clr' >>$CONFIG_STATUS
17381 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017382 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017383 sed -f $tmp/defines.sed $tmp/in >$tmp/out
17384 rm -f $tmp/in
17385 mv $tmp/out $tmp/in
17386' >>$CONFIG_STATUS
17387 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
17388 rm -f conftest.defines
17389 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000017390done
Martin v. Löwis11437992002-04-12 09:54:03 +000017391rm -f conftest.defines
17392echo ' fi # egrep' >>$CONFIG_STATUS
17393echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017394
Martin v. Löwis11437992002-04-12 09:54:03 +000017395# Break up conftest.undefs because some shells have a limit on the size
17396# of here documents, and old seds have small limits too (100 cmds).
17397echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
17398rm -f conftest.tail
17399while grep . conftest.undefs >/dev/null
17400do
17401 # Write a limited-size here document to $tmp/undefs.sed.
17402 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
17403 # Speed up: don't consider the non `#undef'
17404 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
17405 # Work around the forget-to-reset-the-flag bug.
17406 echo 't clr' >>$CONFIG_STATUS
17407 echo ': clr' >>$CONFIG_STATUS
17408 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
17409 echo 'CEOF
17410 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
17411 rm -f $tmp/in
17412 mv $tmp/out $tmp/in
17413' >>$CONFIG_STATUS
17414 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
17415 rm -f conftest.undefs
17416 mv conftest.tail conftest.undefs
17417done
17418rm -f conftest.undefs
17419
17420cat >>$CONFIG_STATUS <<\_ACEOF
17421 # Let's still pretend it is `configure' which instantiates (i.e., don't
17422 # use $as_me), people would be surprised to read:
17423 # /* config.h. Generated by config.status. */
17424 if test x"$ac_file" = x-; then
17425 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000017426 else
Martin v. Löwis11437992002-04-12 09:54:03 +000017427 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000017428 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017429 cat $tmp/in >>$tmp/config.h
17430 rm -f $tmp/in
17431 if test x"$ac_file" != x-; then
17432 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17433 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
17434echo "$as_me: $ac_file is unchanged" >&6;}
17435 else
17436 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17437$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17438 X"$ac_file" : 'X\(//\)[^/]' \| \
17439 X"$ac_file" : 'X\(//\)$' \| \
17440 X"$ac_file" : 'X\(/\)' \| \
17441 . : '\(.\)' 2>/dev/null ||
17442echo X"$ac_file" |
17443 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17444 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17445 /^X\(\/\/\)$/{ s//\1/; q; }
17446 /^X\(\/\).*/{ s//\1/; q; }
17447 s/.*/./; q'`
17448 { case "$ac_dir" in
17449 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17450 *) as_incr_dir=.;;
17451esac
17452as_dummy="$ac_dir"
17453for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17454 case $as_mkdir_dir in
17455 # Skip DOS drivespec
17456 ?:) as_incr_dir=$as_mkdir_dir ;;
17457 *)
17458 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17459 test -d "$as_incr_dir" ||
17460 mkdir "$as_incr_dir" ||
17461 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
17462echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
17463 { (exit 1); exit 1; }; }
17464 ;;
17465 esac
17466done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017467
Martin v. Löwis11437992002-04-12 09:54:03 +000017468 rm -f $ac_file
17469 mv $tmp/config.h $ac_file
17470 fi
17471 else
17472 cat $tmp/config.h
17473 rm -f $tmp/config.h
17474 fi
17475done
17476_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000017477
Martin v. Löwis11437992002-04-12 09:54:03 +000017478cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017479
Martin v. Löwis11437992002-04-12 09:54:03 +000017480{ (exit 0); exit 0; }
17481_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017482chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000017483ac_clean_files=$ac_clean_files_save
17484
17485
17486# configure is writing to config.log, and then calls config.status.
17487# config.status does its own redirection, appending to config.log.
17488# Unfortunately, on DOS this fails, as config.log is still kept open
17489# by configure, so config.status won't be able to write to it; its
17490# output is simply discarded. So we exec the FD to /dev/null,
17491# effectively closing config.log, so it can be properly (re)opened and
17492# appended to by config.status. When coming back to configure, we
17493# need to make the FD available again.
17494if test "$no_create" != yes; then
17495 ac_cs_success=:
17496 exec 5>/dev/null
17497 $SHELL $CONFIG_STATUS || ac_cs_success=false
17498 exec 5>>config.log
17499 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17500 # would make configure fail if this is the last instruction.
17501 $ac_cs_success || { (exit 1); exit 1; }
17502fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017503
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017504
17505echo "creating Setup"
17506if test ! -f Modules/Setup
17507then
17508 cp $srcdir/Modules/Setup.dist Modules/Setup
17509fi
17510
17511echo "creating Setup.local"
17512if test ! -f Modules/Setup.local
17513then
17514 echo "# Edit this file for local setup changes" >Modules/Setup.local
17515fi
17516
17517echo "creating Makefile"
17518$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17519 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017520 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017521mv config.c Modules