blob: d067edd70d7fbb8e16281b3ae49b2f57cce0d8c2 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Jason Tishlerfac083d2003-07-22 15:20:49 +00002# From configure.in Revision: 1.425 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwisf3322282003-07-13 09:46:13 +00004# Generated by GNU Autoconf 2.53 for python 2.3.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis11437992002-04-12 09:54:03 +00006# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
7# Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008# This configure script is free software; the Free Software Foundation
9# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwisf3322282003-07-13 09:46:13 +000010
11if expr a : '\(a\)' >/dev/null 2>&1; then
12 as_expr=expr
13else
14 as_expr=false
15fi
16
17
Martin v. Löwis11437992002-04-12 09:54:03 +000018## --------------------- ##
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
Martin v. Löwisf3322282003-07-13 09:46:13 +000030# NLS nuisances.
Martin v. Löwis11437992002-04-12 09:54:03 +000031# 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
Martin v. Löwisf3322282003-07-13 09:46:13 +000038(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; }
Martin v. Löwis11437992002-04-12 09:54:03 +000062
63
64# Name of the executable.
Martin v. Löwisf3322282003-07-13 09:46:13 +000065as_me=`(basename "$0") 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000066$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
Martin v. Löwisf3322282003-07-13 09:46:13 +000086 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
Martin v. Löwis11437992002-04-12 09:54:03 +000090 PATH_SEPARATOR=';'
91 else
92 PATH_SEPARATOR=:
93 fi
Martin v. Löwisf3322282003-07-13 09:46:13 +000094 rm -f conftest.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000095fi
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.
Martin v. Löwisf3322282003-07-13 09:46:13 +0000230$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000231
232
233# Name of the host.
234# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
235# so uname gets run too.
236ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
237
238exec 6>&1
239
240#
241# Initializations.
242#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000243ac_default_prefix=/usr/local
Martin v. Löwis11437992002-04-12 09:54:03 +0000244cross_compiling=no
245subdirs=
246MFLAGS=
247MAKEFLAGS=
248SHELL=${CONFIG_SHELL-/bin/sh}
249
250# Maximum number of lines to put in a shell here document.
251# This variable seems obsolete. It should probably be removed, and
252# only ac_max_sed_lines should be used.
253: ${ac_max_here_lines=38}
254
255# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000256PACKAGE_NAME='python'
257PACKAGE_TARNAME='python'
258PACKAGE_VERSION='2.3'
259PACKAGE_STRING='python 2.3'
260PACKAGE_BUGREPORT=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000261
262ac_unique_file="Include/object.h"
263# Factoring default headers for most tests.
264ac_includes_default="\
265#include <stdio.h>
266#if HAVE_SYS_TYPES_H
267# include <sys/types.h>
268#endif
269#if HAVE_SYS_STAT_H
270# include <sys/stat.h>
271#endif
272#if STDC_HEADERS
273# include <stdlib.h>
274# include <stddef.h>
275#else
276# if HAVE_STDLIB_H
277# include <stdlib.h>
278# endif
279#endif
280#if HAVE_STRING_H
281# if !STDC_HEADERS && HAVE_MEMORY_H
282# include <memory.h>
283# endif
284# include <string.h>
285#endif
286#if HAVE_STRINGS_H
287# include <strings.h>
288#endif
289#if HAVE_INTTYPES_H
290# include <inttypes.h>
291#else
292# if HAVE_STDINT_H
293# include <stdint.h>
294# endif
295#endif
296#if HAVE_UNISTD_H
297# include <unistd.h>
298#endif"
299
Guido van Rossum627b2d71993-12-24 10:39:16 +0000300
Guido van Rossum7f43da71994-08-01 12:15:30 +0000301# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000302ac_init_help=
303ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000304# The variables have the same names as the options, with
305# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000306cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000307exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000308no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000309no_recursion=
310prefix=NONE
311program_prefix=NONE
312program_suffix=NONE
313program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000314silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000315site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000316srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000317verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000318x_includes=NONE
319x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000320
321# Installation directory options.
322# These are left unexpanded so users can "make install exec_prefix=/foo"
323# and all the variables that are supposed to be based on exec_prefix
324# by default will actually change.
325# Use braces instead of parens because sh, perl, etc. also accept them.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000326bindir='${exec_prefix}/bin'
327sbindir='${exec_prefix}/sbin'
328libexecdir='${exec_prefix}/libexec'
329datadir='${prefix}/share'
330sysconfdir='${prefix}/etc'
331sharedstatedir='${prefix}/com'
332localstatedir='${prefix}/var'
333libdir='${exec_prefix}/lib'
334includedir='${prefix}/include'
335oldincludedir='/usr/include'
336infodir='${prefix}/info'
337mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000338
Guido van Rossum7f43da71994-08-01 12:15:30 +0000339ac_prev=
340for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000341do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000342 # If the previous option needs an argument, assign it.
343 if test -n "$ac_prev"; then
344 eval "$ac_prev=\$ac_option"
345 ac_prev=
346 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000347 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000348
Martin v. Löwis11437992002-04-12 09:54:03 +0000349 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000350
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000351 # Accept the important Cygnus configure options, so we can diagnose typos.
352
Martin v. Löwis11437992002-04-12 09:54:03 +0000353 case $ac_option in
Guido van Rossum7f43da71994-08-01 12:15:30 +0000354
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000355 -bindir | --bindir | --bindi | --bind | --bin | --bi)
356 ac_prev=bindir ;;
357 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000358 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000359
360 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000361 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000362 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000363 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000364
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000365 -cache-file | --cache-file | --cache-fil | --cache-fi \
366 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
367 ac_prev=cache_file ;;
368 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
369 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000370 cache_file=$ac_optarg ;;
371
372 --config-cache | -C)
373 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000374
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000375 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
376 ac_prev=datadir ;;
377 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
378 | --da=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000379 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000380
Guido van Rossum7f43da71994-08-01 12:15:30 +0000381 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000382 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000383 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000384 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
385 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
386 { (exit 1); exit 1; }; }
387 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
388 eval "enable_$ac_feature=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000389
390 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000391 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000392 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000393 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
394 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
395 { (exit 1); exit 1; }; }
396 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
397 case $ac_option in
398 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000399 *) ac_optarg=yes ;;
400 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000401 eval "enable_$ac_feature='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000402
Guido van Rossum7f43da71994-08-01 12:15:30 +0000403 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
404 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
405 | --exec | --exe | --ex)
406 ac_prev=exec_prefix ;;
407 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
408 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
409 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000410 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000411
412 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000413 # Obsolete; use --with-gas.
414 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000415
Martin v. Löwis11437992002-04-12 09:54:03 +0000416 -help | --help | --hel | --he | -h)
417 ac_init_help=long ;;
418 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
419 ac_init_help=recursive ;;
420 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
421 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000422
423 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000424 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000425 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000426 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000427
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000428 -includedir | --includedir | --includedi | --included | --include \
429 | --includ | --inclu | --incl | --inc)
430 ac_prev=includedir ;;
431 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
432 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000433 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000434
435 -infodir | --infodir | --infodi | --infod | --info | --inf)
436 ac_prev=infodir ;;
437 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000439
440 -libdir | --libdir | --libdi | --libd)
441 ac_prev=libdir ;;
442 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000443 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000444
445 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
446 | --libexe | --libex | --libe)
447 ac_prev=libexecdir ;;
448 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
449 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000451
452 -localstatedir | --localstatedir | --localstatedi | --localstated \
453 | --localstate | --localstat | --localsta | --localst \
454 | --locals | --local | --loca | --loc | --lo)
455 ac_prev=localstatedir ;;
456 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
457 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
458 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000459 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000460
461 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
462 ac_prev=mandir ;;
463 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000465
Guido van Rossum7f43da71994-08-01 12:15:30 +0000466 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000467 # Obsolete; use --without-fp.
468 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000469
470 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000471 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000472 no_create=yes ;;
473
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000474 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
475 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
476 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000477
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000478 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
479 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
480 | --oldin | --oldi | --old | --ol | --o)
481 ac_prev=oldincludedir ;;
482 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
483 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
484 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000486
Guido van Rossum7f43da71994-08-01 12:15:30 +0000487 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
488 ac_prev=prefix ;;
489 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000490 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000491
492 -program-prefix | --program-prefix | --program-prefi | --program-pref \
493 | --program-pre | --program-pr | --program-p)
494 ac_prev=program_prefix ;;
495 -program-prefix=* | --program-prefix=* | --program-prefi=* \
496 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000497 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000498
499 -program-suffix | --program-suffix | --program-suffi | --program-suff \
500 | --program-suf | --program-su | --program-s)
501 ac_prev=program_suffix ;;
502 -program-suffix=* | --program-suffix=* | --program-suffi=* \
503 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000504 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000505
506 -program-transform-name | --program-transform-name \
507 | --program-transform-nam | --program-transform-na \
508 | --program-transform-n | --program-transform- \
509 | --program-transform | --program-transfor \
510 | --program-transfo | --program-transf \
511 | --program-trans | --program-tran \
512 | --progr-tra | --program-tr | --program-t)
513 ac_prev=program_transform_name ;;
514 -program-transform-name=* | --program-transform-name=* \
515 | --program-transform-nam=* | --program-transform-na=* \
516 | --program-transform-n=* | --program-transform-=* \
517 | --program-transform=* | --program-transfor=* \
518 | --program-transfo=* | --program-transf=* \
519 | --program-trans=* | --program-tran=* \
520 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000521 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000522
523 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
524 | -silent | --silent | --silen | --sile | --sil)
525 silent=yes ;;
526
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000527 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
528 ac_prev=sbindir ;;
529 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
530 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000531 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000532
533 -sharedstatedir | --sharedstatedir | --sharedstatedi \
534 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
535 | --sharedst | --shareds | --shared | --share | --shar \
536 | --sha | --sh)
537 ac_prev=sharedstatedir ;;
538 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
539 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
540 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
541 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000542 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000543
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544 -site | --site | --sit)
545 ac_prev=site ;;
546 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000547 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000548
Guido van Rossum7f43da71994-08-01 12:15:30 +0000549 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
550 ac_prev=srcdir ;;
551 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000552 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000553
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000554 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
555 | --syscon | --sysco | --sysc | --sys | --sy)
556 ac_prev=sysconfdir ;;
557 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
558 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000559 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000560
Guido van Rossum7f43da71994-08-01 12:15:30 +0000561 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +0000562 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000563 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000564 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000565
566 -v | -verbose | --verbose | --verbos | --verbo | --verb)
567 verbose=yes ;;
568
Martin v. Löwis11437992002-04-12 09:54:03 +0000569 -version | --version | --versio | --versi | --vers | -V)
570 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000571
572 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000573 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000574 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000575 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
576 { echo "$as_me: error: invalid package name: $ac_package" >&2
577 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000578 ac_package=`echo $ac_package| sed 's/-/_/g'`
Martin v. Löwis11437992002-04-12 09:54:03 +0000579 case $ac_option in
580 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000581 *) ac_optarg=yes ;;
582 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000583 eval "with_$ac_package='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000584
585 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000586 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000587 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000588 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
589 { echo "$as_me: error: invalid package name: $ac_package" >&2
590 { (exit 1); exit 1; }; }
591 ac_package=`echo $ac_package | sed 's/-/_/g'`
592 eval "with_$ac_package=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000593
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000594 --x)
595 # Obsolete; use --with-x.
596 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000597
598 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
599 | --x-incl | --x-inc | --x-in | --x-i)
600 ac_prev=x_includes ;;
601 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
602 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000603 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000604
605 -x-libraries | --x-libraries | --x-librarie | --x-librari \
606 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
607 ac_prev=x_libraries ;;
608 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
609 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000610 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000611
Martin v. Löwis11437992002-04-12 09:54:03 +0000612 -*) { echo "$as_me: error: unrecognized option: $ac_option
613Try \`$0 --help' for more information." >&2
614 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000615 ;;
616
Martin v. Löwis11437992002-04-12 09:54:03 +0000617 *=*)
618 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
619 # Reject names that are not valid shell variable names.
620 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
621 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
622 { (exit 1); exit 1; }; }
623 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
624 eval "$ac_envvar='$ac_optarg'"
625 export $ac_envvar ;;
626
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000627 *)
Martin v. Löwis11437992002-04-12 09:54:03 +0000628 # FIXME: should be removed in autoconf 3.0.
629 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
630 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
631 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
632 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000633 ;;
634
635 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000636done
637
Guido van Rossum7f43da71994-08-01 12:15:30 +0000638if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000639 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
640 { echo "$as_me: error: missing argument to $ac_option" >&2
641 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000642fi
643
Martin v. Löwis11437992002-04-12 09:54:03 +0000644# Be sure to have absolute paths.
645for ac_var in exec_prefix prefix
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000646do
Martin v. Löwis11437992002-04-12 09:54:03 +0000647 eval ac_val=$`echo $ac_var`
648 case $ac_val in
649 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
650 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
651 { (exit 1); exit 1; }; };;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000652 esac
653done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000654
Martin v. Löwis11437992002-04-12 09:54:03 +0000655# Be sure to have absolute paths.
656for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
657 localstatedir libdir includedir oldincludedir infodir mandir
658do
659 eval ac_val=$`echo $ac_var`
660 case $ac_val in
661 [\\/$]* | ?:[\\/]* ) ;;
662 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
663 { (exit 1); exit 1; }; };;
664 esac
665done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000666
Martin v. Löwis11437992002-04-12 09:54:03 +0000667# There might be people who depend on the old broken behavior: `$host'
668# used to hold the argument of --host etc.
669# FIXME: To remove some day.
670build=$build_alias
671host=$host_alias
672target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +0000673
Martin v. Löwis11437992002-04-12 09:54:03 +0000674# FIXME: To remove some day.
675if test "x$host_alias" != x; then
676 if test "x$build_alias" = x; then
677 cross_compiling=maybe
678 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
679 If a cross compiler is detected then cross compile mode will be used." >&2
680 elif test "x$build_alias" != "x$host_alias"; then
681 cross_compiling=yes
682 fi
683fi
684
685ac_tool_prefix=
686test -n "$host_alias" && ac_tool_prefix=$host_alias-
687
688test "$silent" = yes && exec 6>/dev/null
689
Guido van Rossum627b2d71993-12-24 10:39:16 +0000690
691# Find the source files, if location was not specified.
692if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000693 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000694 # Try the directory containing this script, then its parent.
Martin v. Löwis11437992002-04-12 09:54:03 +0000695 ac_confdir=`(dirname "$0") 2>/dev/null ||
696$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
697 X"$0" : 'X\(//\)[^/]' \| \
698 X"$0" : 'X\(//\)$' \| \
699 X"$0" : 'X\(/\)' \| \
700 . : '\(.\)' 2>/dev/null ||
701echo X"$0" |
702 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
703 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
704 /^X\(\/\/\)$/{ s//\1/; q; }
705 /^X\(\/\).*/{ s//\1/; q; }
706 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000707 srcdir=$ac_confdir
708 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000709 srcdir=..
710 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000711else
712 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000713fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000714if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000715 if test "$ac_srcdir_defaulted" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000716 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
717 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000718 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000719 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
720 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000721 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000722fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000723srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
724ac_env_build_alias_set=${build_alias+set}
725ac_env_build_alias_value=$build_alias
726ac_cv_env_build_alias_set=${build_alias+set}
727ac_cv_env_build_alias_value=$build_alias
728ac_env_host_alias_set=${host_alias+set}
729ac_env_host_alias_value=$host_alias
730ac_cv_env_host_alias_set=${host_alias+set}
731ac_cv_env_host_alias_value=$host_alias
732ac_env_target_alias_set=${target_alias+set}
733ac_env_target_alias_value=$target_alias
734ac_cv_env_target_alias_set=${target_alias+set}
735ac_cv_env_target_alias_value=$target_alias
736ac_env_CC_set=${CC+set}
737ac_env_CC_value=$CC
738ac_cv_env_CC_set=${CC+set}
739ac_cv_env_CC_value=$CC
740ac_env_CFLAGS_set=${CFLAGS+set}
741ac_env_CFLAGS_value=$CFLAGS
742ac_cv_env_CFLAGS_set=${CFLAGS+set}
743ac_cv_env_CFLAGS_value=$CFLAGS
744ac_env_LDFLAGS_set=${LDFLAGS+set}
745ac_env_LDFLAGS_value=$LDFLAGS
746ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
747ac_cv_env_LDFLAGS_value=$LDFLAGS
748ac_env_CPPFLAGS_set=${CPPFLAGS+set}
749ac_env_CPPFLAGS_value=$CPPFLAGS
750ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
751ac_cv_env_CPPFLAGS_value=$CPPFLAGS
752ac_env_CPP_set=${CPP+set}
753ac_env_CPP_value=$CPP
754ac_cv_env_CPP_set=${CPP+set}
755ac_cv_env_CPP_value=$CPP
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000756
Martin v. Löwis11437992002-04-12 09:54:03 +0000757#
758# Report the --help message.
759#
760if test "$ac_init_help" = "long"; then
761 # Omit some internal or obsolete options to make the list less imposing.
762 # This message is too long to be a string in the A/UX 3.1 sh.
763 cat <<_ACEOF
Martin v. Löwis88afe662002-10-26 13:47:44 +0000764\`configure' configures python 2.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +0000765
766Usage: $0 [OPTION]... [VAR=VALUE]...
767
768To assign environment variables (e.g., CC, CFLAGS...), specify them as
769VAR=VALUE. See below for descriptions of some of the useful variables.
770
771Defaults for the options are specified in brackets.
772
773Configuration:
774 -h, --help display this help and exit
775 --help=short display options specific to this package
776 --help=recursive display the short help of all the included packages
777 -V, --version display version information and exit
778 -q, --quiet, --silent do not print \`checking...' messages
779 --cache-file=FILE cache test results in FILE [disabled]
780 -C, --config-cache alias for \`--cache-file=config.cache'
781 -n, --no-create do not create output files
782 --srcdir=DIR find the sources in DIR [configure dir or \`..']
783
784_ACEOF
785
786 cat <<_ACEOF
787Installation directories:
788 --prefix=PREFIX install architecture-independent files in PREFIX
789 [$ac_default_prefix]
790 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
791 [PREFIX]
792
793By default, \`make install' will install all the files in
794\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
795an installation prefix other than \`$ac_default_prefix' using \`--prefix',
796for instance \`--prefix=\$HOME'.
797
798For better control, use the options below.
799
800Fine tuning of the installation directories:
801 --bindir=DIR user executables [EPREFIX/bin]
802 --sbindir=DIR system admin executables [EPREFIX/sbin]
803 --libexecdir=DIR program executables [EPREFIX/libexec]
804 --datadir=DIR read-only architecture-independent data [PREFIX/share]
805 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
806 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
807 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
808 --libdir=DIR object code libraries [EPREFIX/lib]
809 --includedir=DIR C header files [PREFIX/include]
810 --oldincludedir=DIR C header files for non-gcc [/usr/include]
811 --infodir=DIR info documentation [PREFIX/info]
812 --mandir=DIR man documentation [PREFIX/man]
813_ACEOF
814
815 cat <<\_ACEOF
816_ACEOF
817fi
818
819if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +0000820 case $ac_init_help in
821 short | recursive ) echo "Configuration of python 2.3:";;
822 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 cat <<\_ACEOF
824
825Optional Features:
826 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
827 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000828 --enable-framework[=INSTALLDIR]
829 Build (MacOSX|Darwin) framework
830 --enable-shared disable/enable building shared python library
831 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
832 --enable-ipv6 Enable ipv6 (with ipv4) support
833 --disable-ipv6 Disable ipv6 support
834 --enable-unicode[=ucs[24]]
835 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +0000836
837Optional Packages:
838 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
839 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000840 --without-gcc never use gcc
841 --with-cxx=<compiler> enable C++ support
842 --with-suffix=.exe set executable suffix
843 --with-pydebug build with Py_DEBUG defined
844 --with-libs='lib1 ...' link against additional libs
845 --with-signal-module disable/enable signal module
846 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
847 --with(out)-threads[=DIRECTORY]
848 disable/enable thread support
849 --with(out)-thread[=DIRECTORY]
850 deprecated; use --with(out)-threads
851 --with-pth use GNU pth threading libraries
852 --with(out)-universal-newlines
853 disable/enable foreign newlines
854 --with(out)-doc-strings disable/enable documentation strings
855 --with(out)-pymalloc disable/enable specialized mallocs
856 --with-wctype-functions use wctype.h functions
857 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking
858 --with-dl-dld=DL_DIR GNU dynamic linking
859 --with-fpectl enable SIGFPE catching
860 --with-libm=STRING math library
861 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +0000862
863Some influential environment variables:
864 CC C compiler command
865 CFLAGS C compiler flags
866 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
867 nonstandard directory <lib dir>
868 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
869 headers in a nonstandard directory <include dir>
870 CPP C preprocessor
871
872Use these variables to override the choices made by `configure' or to help
873it to find libraries and programs with nonstandard names/locations.
874
875_ACEOF
876fi
877
878if test "$ac_init_help" = "recursive"; then
879 # If there are subdirs, report their specific --help.
880 ac_popdir=`pwd`
881 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
882 test -d $ac_dir || continue
883 ac_builddir=.
884
885if test "$ac_dir" != .; then
886 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
887 # A "../" for each directory in $ac_dir_suffix.
888 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
889else
890 ac_dir_suffix= ac_top_builddir=
891fi
892
893case $srcdir in
894 .) # No --srcdir option. We are building in place.
895 ac_srcdir=.
896 if test -z "$ac_top_builddir"; then
897 ac_top_srcdir=.
898 else
899 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
900 fi ;;
901 [\\/]* | ?:[\\/]* ) # Absolute path.
902 ac_srcdir=$srcdir$ac_dir_suffix;
903 ac_top_srcdir=$srcdir ;;
904 *) # Relative path.
905 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
906 ac_top_srcdir=$ac_top_builddir$srcdir ;;
907esac
908# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
909# absolute.
910ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Jason Tishlerfac083d2003-07-22 15:20:49 +0000911ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +0000912ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
913ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
914
915 cd $ac_dir
916 # Check for guested configure; otherwise get Cygnus style configure.
917 if test -f $ac_srcdir/configure.gnu; then
918 echo
919 $SHELL $ac_srcdir/configure.gnu --help=recursive
920 elif test -f $ac_srcdir/configure; then
921 echo
922 $SHELL $ac_srcdir/configure --help=recursive
923 elif test -f $ac_srcdir/configure.ac ||
924 test -f $ac_srcdir/configure.in; then
925 echo
926 $ac_configure --help
927 else
928 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
929 fi
930 cd $ac_popdir
931 done
932fi
933
934test -n "$ac_init_help" && exit 0
935if $ac_init_version; then
936 cat <<\_ACEOF
Martin v. Löwis88afe662002-10-26 13:47:44 +0000937python configure 2.3
Martin v. Löwisf3322282003-07-13 09:46:13 +0000938generated by GNU Autoconf 2.53
Martin v. Löwis11437992002-04-12 09:54:03 +0000939
940Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
941Free Software Foundation, Inc.
942This configure script is free software; the Free Software Foundation
943gives unlimited permission to copy, distribute and modify it.
944_ACEOF
945 exit 0
946fi
947exec 5>config.log
948cat >&5 <<_ACEOF
949This file contains any messages produced by compilers while
950running configure, to aid debugging if configure makes a mistake.
951
Martin v. Löwis88afe662002-10-26 13:47:44 +0000952It was created by python $as_me 2.3, which was
Martin v. Löwisf3322282003-07-13 09:46:13 +0000953generated by GNU Autoconf 2.53. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +0000954
955 $ $0 $@
956
957_ACEOF
958{
959cat <<_ASUNAME
960## --------- ##
961## Platform. ##
962## --------- ##
963
964hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
965uname -m = `(uname -m) 2>/dev/null || echo unknown`
966uname -r = `(uname -r) 2>/dev/null || echo unknown`
967uname -s = `(uname -s) 2>/dev/null || echo unknown`
968uname -v = `(uname -v) 2>/dev/null || echo unknown`
969
970/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
971/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
972
973/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
974/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
975/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
976hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
977/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
978/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
979/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
980
981_ASUNAME
982
983as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
984for as_dir in $PATH
985do
986 IFS=$as_save_IFS
987 test -z "$as_dir" && as_dir=.
988 echo "PATH: $as_dir"
989done
990
991} >&5
992
993cat >&5 <<_ACEOF
994
995
996## ----------- ##
997## Core tests. ##
998## ----------- ##
999
1000_ACEOF
1001
1002
1003# Keep a trace of the command line.
1004# Strip out --no-create and --no-recursion so they do not pile up.
1005# Also quote any args containing shell meta-characters.
1006ac_configure_args=
1007ac_sep=
Martin v. Löwisf3322282003-07-13 09:46:13 +00001008for ac_arg
Martin v. Löwis11437992002-04-12 09:54:03 +00001009do
Martin v. Löwisf3322282003-07-13 09:46:13 +00001010 case $ac_arg in
1011 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1012 | --no-cr | --no-c | -n ) continue ;;
1013 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1014 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1015 continue ;;
1016 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1017 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1018 esac
1019 case " $ac_configure_args " in
1020 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1021 *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1022 ac_sep=" " ;;
1023 esac
1024 # Get rid of the leading space.
Martin v. Löwis11437992002-04-12 09:54:03 +00001025done
1026
1027# When interrupted or exit'd, cleanup temporary files, and complete
1028# config.log. We remove comments because anyway the quotes in there
1029# would cause problems or look ugly.
1030# WARNING: Be sure not to use single quotes in there, as some shells,
1031# such as our DU 5.0 friend, will then `close' the trap.
1032trap 'exit_status=$?
1033 # Save into config.log some information that might help in debugging.
1034 {
1035 echo
1036 cat <<\_ASBOX
1037## ---------------- ##
1038## Cache variables. ##
1039## ---------------- ##
1040_ASBOX
1041 echo
1042 # The following way of writing the cache mishandles newlines in values,
1043{
1044 (set) 2>&1 |
1045 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1046 *ac_space=\ *)
1047 sed -n \
1048 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1049 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1050 ;;
1051 *)
1052 sed -n \
1053 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1054 ;;
1055 esac;
1056}
1057 echo
1058 if test -s confdefs.h; then
1059 cat <<\_ASBOX
1060## ----------- ##
1061## confdefs.h. ##
1062## ----------- ##
1063_ASBOX
1064 echo
Martin v. Löwisf3322282003-07-13 09:46:13 +00001065 sed "/^$/d" confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001066 echo
1067 fi
1068 test "$ac_signal" != 0 &&
1069 echo "$as_me: caught signal $ac_signal"
1070 echo "$as_me: exit $exit_status"
1071 } >&5
1072 rm -f core core.* *.core &&
1073 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1074 exit $exit_status
1075 ' 0
1076for ac_signal in 1 2 13 15; do
1077 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1078done
1079ac_signal=0
1080
1081# confdefs.h avoids OS command line length limits that DEFS can exceed.
1082rm -rf conftest* confdefs.h
1083# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1084echo >confdefs.h
1085
1086# Predefined preprocessor variables.
1087
1088cat >>confdefs.h <<_ACEOF
1089#define PACKAGE_NAME "$PACKAGE_NAME"
1090_ACEOF
1091
1092
1093cat >>confdefs.h <<_ACEOF
1094#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1095_ACEOF
1096
1097
1098cat >>confdefs.h <<_ACEOF
1099#define PACKAGE_VERSION "$PACKAGE_VERSION"
1100_ACEOF
1101
1102
1103cat >>confdefs.h <<_ACEOF
1104#define PACKAGE_STRING "$PACKAGE_STRING"
1105_ACEOF
1106
1107
1108cat >>confdefs.h <<_ACEOF
1109#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1110_ACEOF
1111
1112
1113# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001114# Prefer explicitly selected file to automatically selected ones.
1115if test -z "$CONFIG_SITE"; then
1116 if test "x$prefix" != xNONE; then
1117 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1118 else
1119 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1120 fi
1121fi
1122for ac_site_file in $CONFIG_SITE; do
1123 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1125echo "$as_me: loading site script $ac_site_file" >&6;}
1126 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001127 . "$ac_site_file"
1128 fi
1129done
1130
1131if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 # Some versions of bash will fail to source /dev/null (special
1133 # files actually), so we avoid doing that.
1134 if test -f "$cache_file"; then
1135 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1136echo "$as_me: loading cache $cache_file" >&6;}
1137 case $cache_file in
1138 [\\/]* | ?:[\\/]* ) . $cache_file;;
1139 *) . ./$cache_file;;
1140 esac
1141 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001142else
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1144echo "$as_me: creating cache $cache_file" >&6;}
1145 >$cache_file
1146fi
1147
1148# Check that the precious variables saved in the cache have kept the same
1149# value.
1150ac_cache_corrupted=false
1151for ac_var in `(set) 2>&1 |
1152 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1153 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1154 eval ac_new_set=\$ac_env_${ac_var}_set
1155 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1156 eval ac_new_val="\$ac_env_${ac_var}_value"
1157 case $ac_old_set,$ac_new_set in
1158 set,)
1159 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1160echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1161 ac_cache_corrupted=: ;;
1162 ,set)
1163 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1164echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1165 ac_cache_corrupted=: ;;
1166 ,);;
1167 *)
1168 if test "x$ac_old_val" != "x$ac_new_val"; then
1169 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1170echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1171 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1172echo "$as_me: former value: $ac_old_val" >&2;}
1173 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1174echo "$as_me: current value: $ac_new_val" >&2;}
1175 ac_cache_corrupted=:
1176 fi;;
1177 esac
1178 # Pass precious variables to config.status.
1179 if test "$ac_new_set" = set; then
1180 case $ac_new_val in
1181 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1182 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1183 *) ac_arg=$ac_var=$ac_new_val ;;
1184 esac
1185 case " $ac_configure_args " in
1186 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1187 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1188 esac
1189 fi
1190done
1191if $ac_cache_corrupted; then
1192 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1193echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1194 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1195echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1196 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001197fi
1198
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001200ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001201ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1202ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1203ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001204
Guido van Rossum627b2d71993-12-24 10:39:16 +00001205
Michael W. Hudson54241132001-12-07 15:38:26 +00001206
1207
Guido van Rossum627b2d71993-12-24 10:39:16 +00001208
Martin v. Löwis11437992002-04-12 09:54:03 +00001209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
Martin v. Löwis88afe662002-10-26 13:47:44 +00001222
1223
1224
1225
1226
1227
1228
1229
1230
Martin v. Löwisf3322282003-07-13 09:46:13 +00001231ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001232
1233
Martin v. Löwis11437992002-04-12 09:54:03 +00001234
1235
1236
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001237
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001238
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001239# We don't use PACKAGE_ variables, and they cause conflicts
1240# with other autoconf-based packages that include Python.h
1241grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1242rm confdefs.h
1243mv confdefs.h.new confdefs.h
1244
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001245
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00001246VERSION=2.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001247
Martin v. Löwis1142de32002-03-29 16:28:31 +00001248
1249SOVERSION=1.0
1250
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001251# The later defininition of _XOPEN_SOURCE disables certain features
1252# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1253
1254cat >>confdefs.h <<\_ACEOF
1255#define _GNU_SOURCE 1
1256_ACEOF
1257
1258
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001259# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1260# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1261# them.
1262
1263cat >>confdefs.h <<\_ACEOF
1264#define _NETBSD_SOURCE 1
1265_ACEOF
1266
1267
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001268# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1269# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1270# them.
1271
1272cat >>confdefs.h <<\_ACEOF
1273#define __BSD_VISIBLE 1
1274_ACEOF
1275
1276
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001277define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001278
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001279# Arguments passed to configure.
1280
1281CONFIG_ARGS="$ac_configure_args"
1282
Jack Jansene578a632001-08-15 01:27:14 +00001283# Check whether --enable-framework or --disable-framework was given.
1284if test "${enable_framework+set}" = set; then
1285 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001286
Jack Jansene578a632001-08-15 01:27:14 +00001287 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001288 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001289 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001290 esac
1291 case $enableval in
1292 no)
1293 PYTHONFRAMEWORK=
1294 PYTHONFRAMEWORKDIR=no-framework
1295 PYTHONFRAMEWORKPREFIX=
1296 PYTHONFRAMEWORKINSTALLDIR=
1297 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001298 ;;
1299 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001300 PYTHONFRAMEWORK=Python
1301 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001302 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001303 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1304 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001305 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001306
Guido van Rossum563e7081996-09-10 18:20:48 +00001307else
Martin v. Löwis11437992002-04-12 09:54:03 +00001308
Jack Jansene578a632001-08-15 01:27:14 +00001309 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001310 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001311 PYTHONFRAMEWORKPREFIX=
1312 PYTHONFRAMEWORKINSTALLDIR=
1313 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001314
Martin v. Löwis11437992002-04-12 09:54:03 +00001315fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001316
1317
1318
1319
Jack Jansene578a632001-08-15 01:27:14 +00001320
1321##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001322## AC_HELP_STRING(--with-dyld,
1323## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001324##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001325# Set name for machine-dependent library files
1326
Martin v. Löwis11437992002-04-12 09:54:03 +00001327echo "$as_me:$LINENO: checking MACHDEP" >&5
1328echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001329if test -z "$MACHDEP"
1330then
Guido van Rossum563e7081996-09-10 18:20:48 +00001331 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001332 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1333 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001334 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001335 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001336 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001337 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001338 ac_md_system=`echo $ac_sys_system |
1339 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1340 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001341 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001342 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001343
Guido van Rossum07397971997-04-29 21:49:50 +00001344 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001345 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001346 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001347 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00001348 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001349 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001350 esac
1351fi
Guido van Rossum91922671997-10-09 20:24:13 +00001352
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001353# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1354# disable features if it is defined, without any means to access these
1355# features as extensions. For these systems, we skip the definition of
1356# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1357# some feature, make sure there is no alternative way to access this
1358# feature. Also, when using wildcards, make sure you have verified the
1359# need for not defining _XOPEN_SOURCE on all systems matching the
1360# wildcard, and that the wildcard does not include future systems
1361# (which may remove their limitations).
1362case $ac_sys_system/$ac_sys_release in
1363 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1364 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis858f8172003-05-24 12:35:47 +00001365 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm.
1366 OpenBSD/2.* | OpenBSD/3.[0123])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001367 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00001368 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
1369 # of union __?sigval. Reported by Stuart Bishop.
1370 SunOS/5.6)
1371 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001372 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
1373 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
1374 OpenUNIX/8.0.0| UnixWare/7.1.[0-3])
1375 define_xopen_source=no;;
1376 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001377 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001378 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001379 define_xopen_source=no;;
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001380esac
1381
1382if test $define_xopen_source = yes
1383then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001384
1385cat >>confdefs.h <<\_ACEOF
1386#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001387_ACEOF
1388
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001389
1390 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1391 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1392 # several APIs are not declared. Since this is also needed in some
1393 # cases for HP-UX, we define it globally.
1394
1395
1396cat >>confdefs.h <<\_ACEOF
1397#define _XOPEN_SOURCE_EXTENDED 1
1398_ACEOF
1399
1400
1401cat >>confdefs.h <<\_ACEOF
1402#define _POSIX_C_SOURCE 200112L
1403_ACEOF
1404
1405
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001406fi
1407
Guido van Rossum91922671997-10-09 20:24:13 +00001408#
1409# SGI compilers allow the specification of the both the ABI and the
1410# ISA on the command line. Depending on the values of these switches,
1411# different and often incompatable code will be generated.
1412#
1413# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1414# thus supply support for various ABI/ISA combinations. The MACHDEP
1415# variable is also adjusted.
1416#
1417
1418if test ! -z "$SGI_ABI"
1419then
1420 CC="cc $SGI_ABI"
1421 LDFLAGS="$SGI_ABI $LDFLAGS"
1422 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1423fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001424echo "$as_me:$LINENO: result: $MACHDEP" >&5
1425echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001426
Jack Jansen83f898c2002-12-30 22:23:40 +00001427# And add extra plat-mac for darwin
1428
Jack Jansen7b59b422003-03-17 15:44:10 +00001429
Jack Jansen83f898c2002-12-30 22:23:40 +00001430echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1431echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1432if test -z "$EXTRAPLATDIR"
1433then
1434 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001435 darwin)
1436 EXTRAPLATDIR="\$(PLATMACDIRS)"
1437 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1438 ;;
1439 *)
1440 EXTRAPLATDIR=""
1441 EXTRAMACHDEPPATH=""
1442 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001443 esac
1444fi
1445echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1446echo "${ECHO_T}$EXTRAPLATDIR" >&6
1447
Guido van Rossum627b2d71993-12-24 10:39:16 +00001448# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001449
1450# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1451# for debug/optimization stuff. BASECFLAGS is for flags that are required
1452# just to get things to compile and link. Users are free to override OPT
1453# when running configure or make. The build should not break if they do.
1454# BASECFLAGS should generally not be messed with, however.
1455
1456# XXX shouldn't some/most/all of this code be merged with the stuff later
1457# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001458echo "$as_me:$LINENO: checking for --without-gcc" >&5
1459echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1460
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001461# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001462if test "${with_gcc+set}" = set; then
1463 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001464
Guido van Rossum7f43da71994-08-01 12:15:30 +00001465 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001466 no) CC=cc
1467 without_gcc=yes;;
1468 yes) CC=gcc
1469 without_gcc=no;;
1470 *) CC=$withval
1471 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001472 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001473else
Martin v. Löwis11437992002-04-12 09:54:03 +00001474
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001475 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001476 AIX*) CC=cc_r
1477 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001478 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001479 case $BE_HOST_CPU in
1480 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001481 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001482 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001483 BASECFLAGS="$BASECFLAGS -export pragma"
1484 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001485 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001486 ;;
1487 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001488 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001489 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001490 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001491 ;;
1492 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001493 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1494echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1495 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001496 ;;
1497 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001498 AR="\$(srcdir)/Modules/ar_beos"
1499 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001500 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001501 Monterey*)
1502 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001503 without_gcc=;;
1504 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001505 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001506fi;
1507echo "$as_me:$LINENO: result: $without_gcc" >&5
1508echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001509
1510
Guido van Rossum95012191999-12-16 17:50:52 +00001511
Fred Drakea1a84e72001-03-06 05:52:16 +00001512MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001513echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1514echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1515
Guido van Rossum95012191999-12-16 17:50:52 +00001516# Check whether --with-cxx or --without-cxx was given.
1517if test "${with_cxx+set}" = set; then
1518 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001519
Martin v. Löwis22352952000-12-13 17:37:02 +00001520 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001521 case $withval in
1522 no) CXX=
1523 with_cxx=no;;
1524 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001525 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001526 with_cxx=$withval;;
1527 esac
1528else
Martin v. Löwis11437992002-04-12 09:54:03 +00001529
Guido van Rossum95012191999-12-16 17:50:52 +00001530 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001531 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001532
Martin v. Löwis11437992002-04-12 09:54:03 +00001533fi;
1534echo "$as_me:$LINENO: result: $with_cxx" >&5
1535echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001536
1537if test "$with_cxx" = "yes"
1538then
Martin v. Löwis11437992002-04-12 09:54:03 +00001539 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1540echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1541 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001542fi
1543
1544
1545
1546
Martin v. Löwis11437992002-04-12 09:54:03 +00001547if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001548then
1549 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1550do
Martin v. Löwis11437992002-04-12 09:54:03 +00001551 # 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 +00001552set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001553echo "$as_me:$LINENO: checking for $ac_word" >&5
1554echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1555if test "${ac_cv_prog_CXX+set}" = set; then
1556 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001557else
1558 if test -n "$CXX"; then
1559 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1560else
Martin v. Löwis11437992002-04-12 09:54:03 +00001561as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1562for as_dir in $PATH
1563do
1564 IFS=$as_save_IFS
1565 test -z "$as_dir" && as_dir=.
1566 for ac_exec_ext in '' $ac_executable_extensions; do
1567 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1568 ac_cv_prog_CXX="$ac_prog"
1569 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1570 break 2
1571 fi
1572done
1573done
1574
Martin v. Löwis22352952000-12-13 17:37:02 +00001575fi
1576fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001577CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001578if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001579 echo "$as_me:$LINENO: result: $CXX" >&5
1580echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001581else
Martin v. Löwis11437992002-04-12 09:54:03 +00001582 echo "$as_me:$LINENO: result: no" >&5
1583echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001584fi
1585
Martin v. Löwis11437992002-04-12 09:54:03 +00001586 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001587done
1588test -n "$CXX" || CXX="notfound"
1589
1590 if test "$CXX" = "notfound"
1591 then
1592 CXX=
1593 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001594 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001595ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001596ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1597ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1598ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1599 cat >conftest.$ac_ext <<_ACEOF
1600#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00001601#include "confdefs.h"
Martin v. Löwis22352952000-12-13 17:37:02 +00001602
Martin v. Löwisf3322282003-07-13 09:46:13 +00001603#ifdef F77_DUMMY_MAIN
1604# ifdef __cplusplus
1605 extern "C"
1606# endif
1607 int F77_DUMMY_MAIN() { return 1; }
1608#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00001609int
1610main ()
1611{
Michael W. Hudson54241132001-12-07 15:38:26 +00001612
Martin v. Löwis11437992002-04-12 09:54:03 +00001613 ;
1614 return 0;
1615}
1616_ACEOF
1617ac_clean_files_save=$ac_clean_files
Martin v. Löwisf3322282003-07-13 09:46:13 +00001618ac_clean_files="$ac_clean_files a.out a.exe"
Martin v. Löwis11437992002-04-12 09:54:03 +00001619# Try to create an executable without -o first, disregard a.out.
1620# It will help us diagnose broken compilers, and finding out an intuition
1621# of exeext.
1622echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1623echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1624ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1625if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1626 (eval $ac_link_default) 2>&5
1627 ac_status=$?
1628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1629 (exit $ac_status); }; then
1630 # Find the output, starting from the most likely. This scheme is
1631# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1632# resort.
1633
1634# Be careful to initialize this variable, since it used to be cached.
1635# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1636ac_cv_exeext=
Martin v. Löwisf3322282003-07-13 09:46:13 +00001637for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1638 ls a.out conftest 2>/dev/null;
1639 ls a.* conftest.* 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001640 case $ac_file in
Martin v. Löwisf3322282003-07-13 09:46:13 +00001641 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1642 a.out ) # We found the default executable, but exeext='' is most
1643 # certainly right.
1644 break;;
1645 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1646 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1647 export ac_cv_exeext
1648 break;;
1649 * ) break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001650 esac
1651done
1652else
1653 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00001654cat conftest.$ac_ext >&5
1655{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1656echo "$as_me: error: C++ compiler cannot create executables" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001657 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001658fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001659
1660ac_exeext=$ac_cv_exeext
1661echo "$as_me:$LINENO: result: $ac_file" >&5
1662echo "${ECHO_T}$ac_file" >&6
1663
1664# Check the compiler produces executables we can run. If not, either
1665# the compiler is broken, or we cross compile.
1666echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1667echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1668# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1669# If not cross compiling, check that we can run a simple program.
1670if test "$cross_compiling" != yes; then
1671 if { ac_try='./$ac_file'
1672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1673 (eval $ac_try) 2>&5
1674 ac_status=$?
1675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1676 (exit $ac_status); }; }; then
1677 cross_compiling=no
1678 else
1679 if test "$cross_compiling" = maybe; then
1680 cross_compiling=yes
1681 else
1682 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
Martin v. Löwisf3322282003-07-13 09:46:13 +00001683If you meant to cross compile, use \`--host'." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001684echo "$as_me: error: cannot run C++ compiled programs.
Martin v. Löwisf3322282003-07-13 09:46:13 +00001685If you meant to cross compile, use \`--host'." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001686 { (exit 1); exit 1; }; }
1687 fi
1688 fi
1689fi
1690echo "$as_me:$LINENO: result: yes" >&5
1691echo "${ECHO_T}yes" >&6
1692
Martin v. Löwisf3322282003-07-13 09:46:13 +00001693rm -f a.out a.exe conftest$ac_cv_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +00001694ac_clean_files=$ac_clean_files_save
1695# Check the compiler produces executables we can run. If not, either
1696# the compiler is broken, or we cross compile.
1697echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1698echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1699echo "$as_me:$LINENO: result: $cross_compiling" >&5
1700echo "${ECHO_T}$cross_compiling" >&6
1701
1702echo "$as_me:$LINENO: checking for suffix of executables" >&5
1703echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1704if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1705 (eval $ac_link) 2>&5
1706 ac_status=$?
1707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1708 (exit $ac_status); }; then
1709 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1710# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1711# work properly (i.e., refer to `conftest.exe'), while it won't with
1712# `rm'.
Martin v. Löwisf3322282003-07-13 09:46:13 +00001713for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001714 case $ac_file in
Martin v. Löwisf3322282003-07-13 09:46:13 +00001715 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001716 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1717 export ac_cv_exeext
1718 break;;
1719 * ) break;;
1720 esac
1721done
1722else
Martin v. Löwisf3322282003-07-13 09:46:13 +00001723 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1724echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001725 { (exit 1); exit 1; }; }
1726fi
1727
1728rm -f conftest$ac_cv_exeext
1729echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1730echo "${ECHO_T}$ac_cv_exeext" >&6
1731
1732rm -f conftest.$ac_ext
1733EXEEXT=$ac_cv_exeext
1734ac_exeext=$EXEEXT
1735
1736 ac_ext=c
1737ac_cpp='$CPP $CPPFLAGS'
1738ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1739ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1740ac_compiler_gnu=$ac_cv_c_compiler_gnu
1741
1742
Martin v. Löwis22352952000-12-13 17:37:02 +00001743
1744 fi
1745fi
1746
Guido van Rossum8b131c51995-03-09 14:10:13 +00001747# If the user switches compilers, we can't believe the cache
1748if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1749then
Martin v. Löwis11437992002-04-12 09:54:03 +00001750 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1751(it is also a good idea to do 'make clean' before compiling)" >&5
1752echo "$as_me: error: cached CC is different -- throw away $cache_file
1753(it is also a good idea to do 'make clean' before compiling)" >&2;}
1754 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001755fi
1756
Martin v. Löwis11437992002-04-12 09:54:03 +00001757ac_ext=c
1758ac_cpp='$CPP $CPPFLAGS'
1759ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1760ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1761ac_compiler_gnu=$ac_cv_c_compiler_gnu
1762if test -n "$ac_tool_prefix"; then
1763 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1764set dummy ${ac_tool_prefix}gcc; ac_word=$2
1765echo "$as_me:$LINENO: checking for $ac_word" >&5
1766echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1767if test "${ac_cv_prog_CC+set}" = set; then
1768 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001769else
1770 if test -n "$CC"; then
1771 ac_cv_prog_CC="$CC" # Let the user override the test.
1772else
Martin v. Löwis11437992002-04-12 09:54:03 +00001773as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1774for as_dir in $PATH
1775do
1776 IFS=$as_save_IFS
1777 test -z "$as_dir" && as_dir=.
1778 for ac_exec_ext in '' $ac_executable_extensions; do
1779 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1780 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1781 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1782 break 2
1783 fi
1784done
1785done
1786
Jack Jansendd19cf82001-12-06 22:36:17 +00001787fi
1788fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001789CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001790if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001791 echo "$as_me:$LINENO: result: $CC" >&5
1792echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001793else
Martin v. Löwis11437992002-04-12 09:54:03 +00001794 echo "$as_me:$LINENO: result: no" >&5
1795echo "${ECHO_T}no" >&6
1796fi
1797
1798fi
1799if test -z "$ac_cv_prog_CC"; then
1800 ac_ct_CC=$CC
1801 # Extract the first word of "gcc", so it can be a program name with args.
1802set dummy gcc; ac_word=$2
1803echo "$as_me:$LINENO: checking for $ac_word" >&5
1804echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1805if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1806 echo $ECHO_N "(cached) $ECHO_C" >&6
1807else
1808 if test -n "$ac_ct_CC"; then
1809 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1810else
1811as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1812for as_dir in $PATH
1813do
1814 IFS=$as_save_IFS
1815 test -z "$as_dir" && as_dir=.
1816 for ac_exec_ext in '' $ac_executable_extensions; do
1817 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1818 ac_cv_prog_ac_ct_CC="gcc"
1819 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1820 break 2
1821 fi
1822done
1823done
1824
1825fi
1826fi
1827ac_ct_CC=$ac_cv_prog_ac_ct_CC
1828if test -n "$ac_ct_CC"; then
1829 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1830echo "${ECHO_T}$ac_ct_CC" >&6
1831else
1832 echo "$as_me:$LINENO: result: no" >&5
1833echo "${ECHO_T}no" >&6
1834fi
1835
1836 CC=$ac_ct_CC
1837else
1838 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001839fi
1840
Jack Jansendd19cf82001-12-06 22:36:17 +00001841if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001842 if test -n "$ac_tool_prefix"; then
1843 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1844set dummy ${ac_tool_prefix}cc; ac_word=$2
1845echo "$as_me:$LINENO: checking for $ac_word" >&5
1846echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1847if test "${ac_cv_prog_CC+set}" = set; then
1848 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001849else
1850 if test -n "$CC"; then
1851 ac_cv_prog_CC="$CC" # Let the user override the test.
1852else
Martin v. Löwis11437992002-04-12 09:54:03 +00001853as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1854for as_dir in $PATH
1855do
1856 IFS=$as_save_IFS
1857 test -z "$as_dir" && as_dir=.
1858 for ac_exec_ext in '' $ac_executable_extensions; do
1859 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1860 ac_cv_prog_CC="${ac_tool_prefix}cc"
1861 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1862 break 2
1863 fi
1864done
1865done
1866
1867fi
1868fi
1869CC=$ac_cv_prog_CC
1870if test -n "$CC"; then
1871 echo "$as_me:$LINENO: result: $CC" >&5
1872echo "${ECHO_T}$CC" >&6
1873else
1874 echo "$as_me:$LINENO: result: no" >&5
1875echo "${ECHO_T}no" >&6
1876fi
1877
1878fi
1879if test -z "$ac_cv_prog_CC"; then
1880 ac_ct_CC=$CC
1881 # Extract the first word of "cc", so it can be a program name with args.
1882set dummy cc; ac_word=$2
1883echo "$as_me:$LINENO: checking for $ac_word" >&5
1884echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1885if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1886 echo $ECHO_N "(cached) $ECHO_C" >&6
1887else
1888 if test -n "$ac_ct_CC"; then
1889 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1890else
1891as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1892for as_dir in $PATH
1893do
1894 IFS=$as_save_IFS
1895 test -z "$as_dir" && as_dir=.
1896 for ac_exec_ext in '' $ac_executable_extensions; do
1897 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1898 ac_cv_prog_ac_ct_CC="cc"
1899 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1900 break 2
1901 fi
1902done
1903done
1904
1905fi
1906fi
1907ac_ct_CC=$ac_cv_prog_ac_ct_CC
1908if test -n "$ac_ct_CC"; then
1909 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1910echo "${ECHO_T}$ac_ct_CC" >&6
1911else
1912 echo "$as_me:$LINENO: result: no" >&5
1913echo "${ECHO_T}no" >&6
1914fi
1915
1916 CC=$ac_ct_CC
1917else
1918 CC="$ac_cv_prog_CC"
1919fi
1920
1921fi
1922if test -z "$CC"; then
1923 # Extract the first word of "cc", so it can be a program name with args.
1924set dummy cc; ac_word=$2
1925echo "$as_me:$LINENO: checking for $ac_word" >&5
1926echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1927if test "${ac_cv_prog_CC+set}" = set; then
1928 echo $ECHO_N "(cached) $ECHO_C" >&6
1929else
1930 if test -n "$CC"; then
1931 ac_cv_prog_CC="$CC" # Let the user override the test.
1932else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001933 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001934as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1935for as_dir in $PATH
1936do
1937 IFS=$as_save_IFS
1938 test -z "$as_dir" && as_dir=.
1939 for ac_exec_ext in '' $ac_executable_extensions; do
1940 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1941 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1942 ac_prog_rejected=yes
1943 continue
1944 fi
1945 ac_cv_prog_CC="cc"
1946 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1947 break 2
1948 fi
1949done
1950done
1951
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001952if test $ac_prog_rejected = yes; then
1953 # We found a bogon in the path, so make sure we never use it.
1954 set dummy $ac_cv_prog_CC
1955 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001956 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001957 # We chose a different compiler from the bogus one.
1958 # However, it has the same basename, so the bogon will be chosen
1959 # first if we set CC to just the basename; use the full file name.
1960 shift
Martin v. Löwisf3322282003-07-13 09:46:13 +00001961 set dummy "$as_dir/$ac_word" ${1+"$@"}
1962 shift
1963 ac_cv_prog_CC="$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001964 fi
1965fi
1966fi
1967fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001968CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001969if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001970 echo "$as_me:$LINENO: result: $CC" >&5
1971echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001972else
Martin v. Löwis11437992002-04-12 09:54:03 +00001973 echo "$as_me:$LINENO: result: no" >&5
1974echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001975fi
1976
Martin v. Löwis11437992002-04-12 09:54:03 +00001977fi
1978if test -z "$CC"; then
1979 if test -n "$ac_tool_prefix"; then
1980 for ac_prog in cl
1981 do
1982 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1983set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1984echo "$as_me:$LINENO: checking for $ac_word" >&5
1985echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1986if test "${ac_cv_prog_CC+set}" = set; then
1987 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001988else
1989 if test -n "$CC"; then
1990 ac_cv_prog_CC="$CC" # Let the user override the test.
1991else
Martin v. Löwis11437992002-04-12 09:54:03 +00001992as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1993for as_dir in $PATH
1994do
1995 IFS=$as_save_IFS
1996 test -z "$as_dir" && as_dir=.
1997 for ac_exec_ext in '' $ac_executable_extensions; do
1998 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1999 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2000 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2001 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002002 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002003done
2004done
2005
2006fi
2007fi
2008CC=$ac_cv_prog_CC
2009if test -n "$CC"; then
2010 echo "$as_me:$LINENO: result: $CC" >&5
2011echo "${ECHO_T}$CC" >&6
2012else
2013 echo "$as_me:$LINENO: result: no" >&5
2014echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002015fi
2016
Martin v. Löwis11437992002-04-12 09:54:03 +00002017 test -n "$CC" && break
2018 done
2019fi
2020if test -z "$CC"; then
2021 ac_ct_CC=$CC
2022 for ac_prog in cl
2023do
2024 # Extract the first word of "$ac_prog", so it can be a program name with args.
2025set dummy $ac_prog; ac_word=$2
2026echo "$as_me:$LINENO: checking for $ac_word" >&5
2027echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2028if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2029 echo $ECHO_N "(cached) $ECHO_C" >&6
2030else
2031 if test -n "$ac_ct_CC"; then
2032 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2033else
2034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2035for as_dir in $PATH
2036do
2037 IFS=$as_save_IFS
2038 test -z "$as_dir" && as_dir=.
2039 for ac_exec_ext in '' $ac_executable_extensions; do
2040 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2041 ac_cv_prog_ac_ct_CC="$ac_prog"
2042 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2043 break 2
2044 fi
2045done
2046done
Jack Jansendd19cf82001-12-06 22:36:17 +00002047
Martin v. Löwis11437992002-04-12 09:54:03 +00002048fi
2049fi
2050ac_ct_CC=$ac_cv_prog_ac_ct_CC
2051if test -n "$ac_ct_CC"; then
2052 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2053echo "${ECHO_T}$ac_ct_CC" >&6
2054else
2055 echo "$as_me:$LINENO: result: no" >&5
2056echo "${ECHO_T}no" >&6
2057fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002058
Martin v. Löwis11437992002-04-12 09:54:03 +00002059 test -n "$ac_ct_CC" && break
2060done
Michael W. Hudson54241132001-12-07 15:38:26 +00002061
Martin v. Löwis11437992002-04-12 09:54:03 +00002062 CC=$ac_ct_CC
2063fi
2064
2065fi
2066
2067
Martin v. Löwisf3322282003-07-13 09:46:13 +00002068test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
2069echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002070 { (exit 1); exit 1; }; }
2071
2072# Provide some information about the compiler.
2073echo "$as_me:$LINENO:" \
2074 "checking for C compiler version" >&5
2075ac_compiler=`set X $ac_compile; echo $2`
2076{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2077 (eval $ac_compiler --version </dev/null >&5) 2>&5
2078 ac_status=$?
2079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2080 (exit $ac_status); }
2081{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2082 (eval $ac_compiler -v </dev/null >&5) 2>&5
2083 ac_status=$?
2084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2085 (exit $ac_status); }
2086{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2087 (eval $ac_compiler -V </dev/null >&5) 2>&5
2088 ac_status=$?
2089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2090 (exit $ac_status); }
2091
2092cat >conftest.$ac_ext <<_ACEOF
2093#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00002094#include "confdefs.h"
Jack Jansendd19cf82001-12-06 22:36:17 +00002095
Martin v. Löwisf3322282003-07-13 09:46:13 +00002096#ifdef F77_DUMMY_MAIN
2097# ifdef __cplusplus
2098 extern "C"
2099# endif
2100 int F77_DUMMY_MAIN() { return 1; }
2101#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002102int
2103main ()
2104{
2105
2106 ;
2107 return 0;
2108}
2109_ACEOF
2110ac_clean_files_save=$ac_clean_files
Martin v. Löwisf3322282003-07-13 09:46:13 +00002111ac_clean_files="$ac_clean_files a.out a.exe"
Martin v. Löwis11437992002-04-12 09:54:03 +00002112# Try to create an executable without -o first, disregard a.out.
2113# It will help us diagnose broken compilers, and finding out an intuition
2114# of exeext.
2115echo "$as_me:$LINENO: checking for C compiler default output" >&5
2116echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2117ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2118if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2119 (eval $ac_link_default) 2>&5
2120 ac_status=$?
2121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2122 (exit $ac_status); }; then
2123 # Find the output, starting from the most likely. This scheme is
2124# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2125# resort.
2126
2127# Be careful to initialize this variable, since it used to be cached.
2128# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2129ac_cv_exeext=
Martin v. Löwisf3322282003-07-13 09:46:13 +00002130for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
2131 ls a.out conftest 2>/dev/null;
2132 ls a.* conftest.* 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002133 case $ac_file in
Martin v. Löwisf3322282003-07-13 09:46:13 +00002134 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
2135 a.out ) # We found the default executable, but exeext='' is most
2136 # certainly right.
2137 break;;
2138 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2139 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2140 export ac_cv_exeext
2141 break;;
2142 * ) break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002143 esac
2144done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002145else
Martin v. Löwis11437992002-04-12 09:54:03 +00002146 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00002147cat conftest.$ac_ext >&5
2148{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2149echo "$as_me: error: C compiler cannot create executables" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002150 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002151fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002152
Martin v. Löwis11437992002-04-12 09:54:03 +00002153ac_exeext=$ac_cv_exeext
2154echo "$as_me:$LINENO: result: $ac_file" >&5
2155echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002156
Martin v. Löwis11437992002-04-12 09:54:03 +00002157# Check the compiler produces executables we can run. If not, either
2158# the compiler is broken, or we cross compile.
2159echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2160echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2161# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2162# If not cross compiling, check that we can run a simple program.
2163if test "$cross_compiling" != yes; then
2164 if { ac_try='./$ac_file'
2165 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2166 (eval $ac_try) 2>&5
2167 ac_status=$?
2168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2169 (exit $ac_status); }; }; then
2170 cross_compiling=no
2171 else
2172 if test "$cross_compiling" = maybe; then
2173 cross_compiling=yes
2174 else
2175 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Martin v. Löwisf3322282003-07-13 09:46:13 +00002176If you meant to cross compile, use \`--host'." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002177echo "$as_me: error: cannot run C compiled programs.
Martin v. Löwisf3322282003-07-13 09:46:13 +00002178If you meant to cross compile, use \`--host'." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002179 { (exit 1); exit 1; }; }
2180 fi
2181 fi
2182fi
2183echo "$as_me:$LINENO: result: yes" >&5
2184echo "${ECHO_T}yes" >&6
2185
Martin v. Löwisf3322282003-07-13 09:46:13 +00002186rm -f a.out a.exe conftest$ac_cv_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +00002187ac_clean_files=$ac_clean_files_save
2188# Check the compiler produces executables we can run. If not, either
2189# the compiler is broken, or we cross compile.
2190echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2191echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2192echo "$as_me:$LINENO: result: $cross_compiling" >&5
2193echo "${ECHO_T}$cross_compiling" >&6
2194
2195echo "$as_me:$LINENO: checking for suffix of executables" >&5
2196echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2197if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2198 (eval $ac_link) 2>&5
2199 ac_status=$?
2200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2201 (exit $ac_status); }; then
2202 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2203# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2204# work properly (i.e., refer to `conftest.exe'), while it won't with
2205# `rm'.
Martin v. Löwisf3322282003-07-13 09:46:13 +00002206for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002207 case $ac_file in
Martin v. Löwisf3322282003-07-13 09:46:13 +00002208 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002209 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2210 export ac_cv_exeext
2211 break;;
2212 * ) break;;
2213 esac
2214done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002215else
Martin v. Löwisf3322282003-07-13 09:46:13 +00002216 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2217echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002218 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002219fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002220
Martin v. Löwis11437992002-04-12 09:54:03 +00002221rm -f conftest$ac_cv_exeext
2222echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2223echo "${ECHO_T}$ac_cv_exeext" >&6
2224
2225rm -f conftest.$ac_ext
2226EXEEXT=$ac_cv_exeext
2227ac_exeext=$EXEEXT
2228echo "$as_me:$LINENO: checking for suffix of object files" >&5
2229echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2230if test "${ac_cv_objext+set}" = set; then
2231 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002232else
Martin v. Löwis11437992002-04-12 09:54:03 +00002233 cat >conftest.$ac_ext <<_ACEOF
2234#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00002235#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002236
Martin v. Löwisf3322282003-07-13 09:46:13 +00002237#ifdef F77_DUMMY_MAIN
2238# ifdef __cplusplus
2239 extern "C"
2240# endif
2241 int F77_DUMMY_MAIN() { return 1; }
2242#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002243int
2244main ()
2245{
2246
2247 ;
2248 return 0;
2249}
2250_ACEOF
2251rm -f conftest.o conftest.obj
2252if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2253 (eval $ac_compile) 2>&5
2254 ac_status=$?
2255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2256 (exit $ac_status); }; then
2257 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2258 case $ac_file in
Martin v. Löwisf3322282003-07-13 09:46:13 +00002259 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002260 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2261 break;;
2262 esac
2263done
2264else
2265 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00002266cat conftest.$ac_ext >&5
2267{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2268echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002269 { (exit 1); exit 1; }; }
2270fi
2271
2272rm -f conftest.$ac_cv_objext conftest.$ac_ext
2273fi
2274echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2275echo "${ECHO_T}$ac_cv_objext" >&6
2276OBJEXT=$ac_cv_objext
2277ac_objext=$OBJEXT
2278echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2279echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2280if test "${ac_cv_c_compiler_gnu+set}" = set; then
2281 echo $ECHO_N "(cached) $ECHO_C" >&6
2282else
2283 cat >conftest.$ac_ext <<_ACEOF
2284#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00002285#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002286
Martin v. Löwisf3322282003-07-13 09:46:13 +00002287#ifdef F77_DUMMY_MAIN
2288# ifdef __cplusplus
2289 extern "C"
2290# endif
2291 int F77_DUMMY_MAIN() { return 1; }
2292#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002293int
2294main ()
2295{
2296#ifndef __GNUC__
2297 choke me
2298#endif
2299
2300 ;
2301 return 0;
2302}
2303_ACEOF
2304rm -f conftest.$ac_objext
2305if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2306 (eval $ac_compile) 2>&5
2307 ac_status=$?
2308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2309 (exit $ac_status); } &&
2310 { ac_try='test -s conftest.$ac_objext'
2311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2312 (eval $ac_try) 2>&5
2313 ac_status=$?
2314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2315 (exit $ac_status); }; }; then
2316 ac_compiler_gnu=yes
2317else
2318 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00002319cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002320ac_compiler_gnu=no
2321fi
2322rm -f conftest.$ac_objext conftest.$ac_ext
2323ac_cv_c_compiler_gnu=$ac_compiler_gnu
2324
2325fi
2326echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2327echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2328GCC=`test $ac_compiler_gnu = yes && echo yes`
2329ac_test_CFLAGS=${CFLAGS+set}
2330ac_save_CFLAGS=$CFLAGS
2331CFLAGS="-g"
2332echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2333echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2334if test "${ac_cv_prog_cc_g+set}" = set; then
2335 echo $ECHO_N "(cached) $ECHO_C" >&6
2336else
2337 cat >conftest.$ac_ext <<_ACEOF
2338#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00002339#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002340
Martin v. Löwisf3322282003-07-13 09:46:13 +00002341#ifdef F77_DUMMY_MAIN
2342# ifdef __cplusplus
2343 extern "C"
2344# endif
2345 int F77_DUMMY_MAIN() { return 1; }
2346#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002347int
2348main ()
2349{
2350
2351 ;
2352 return 0;
2353}
2354_ACEOF
2355rm -f conftest.$ac_objext
2356if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2357 (eval $ac_compile) 2>&5
2358 ac_status=$?
2359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2360 (exit $ac_status); } &&
2361 { ac_try='test -s conftest.$ac_objext'
2362 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2363 (eval $ac_try) 2>&5
2364 ac_status=$?
2365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2366 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002367 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002368else
Martin v. Löwis11437992002-04-12 09:54:03 +00002369 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00002370cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002371ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002372fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002373rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002374fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002375echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2376echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002377if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002378 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002379elif test $ac_cv_prog_cc_g = yes; then
2380 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002381 CFLAGS="-g -O2"
2382 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002383 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002384 fi
2385else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002386 if test "$GCC" = yes; then
2387 CFLAGS="-O2"
2388 else
2389 CFLAGS=
2390 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002391fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002392# Some people use a C++ compiler to compile C. Since we use `exit',
2393# in C++ we need to declare it. In case someone uses the same compiler
2394# for both compiling C and C++ we need to have the C++ compiler decide
2395# the declaration of exit, since it's the most demanding environment.
2396cat >conftest.$ac_ext <<_ACEOF
2397#ifndef __cplusplus
2398 choke me
2399#endif
2400_ACEOF
2401rm -f conftest.$ac_objext
2402if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2403 (eval $ac_compile) 2>&5
2404 ac_status=$?
2405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2406 (exit $ac_status); } &&
2407 { ac_try='test -s conftest.$ac_objext'
2408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2409 (eval $ac_try) 2>&5
2410 ac_status=$?
2411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2412 (exit $ac_status); }; }; then
2413 for ac_declaration in \
2414 ''\
2415 '#include <stdlib.h>' \
2416 'extern "C" void std::exit (int) throw (); using std::exit;' \
2417 'extern "C" void std::exit (int); using std::exit;' \
2418 'extern "C" void exit (int) throw ();' \
2419 'extern "C" void exit (int);' \
2420 'void exit (int);'
2421do
2422 cat >conftest.$ac_ext <<_ACEOF
2423#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00002424#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002425#include <stdlib.h>
2426$ac_declaration
Martin v. Löwisf3322282003-07-13 09:46:13 +00002427#ifdef F77_DUMMY_MAIN
2428# ifdef __cplusplus
2429 extern "C"
2430# endif
2431 int F77_DUMMY_MAIN() { return 1; }
2432#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002433int
2434main ()
2435{
2436exit (42);
2437 ;
2438 return 0;
2439}
2440_ACEOF
2441rm -f conftest.$ac_objext
2442if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2443 (eval $ac_compile) 2>&5
2444 ac_status=$?
2445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2446 (exit $ac_status); } &&
2447 { ac_try='test -s conftest.$ac_objext'
2448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2449 (eval $ac_try) 2>&5
2450 ac_status=$?
2451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2452 (exit $ac_status); }; }; then
2453 :
2454else
2455 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00002456cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002457continue
2458fi
2459rm -f conftest.$ac_objext conftest.$ac_ext
2460 cat >conftest.$ac_ext <<_ACEOF
2461#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00002462#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002463$ac_declaration
Martin v. Löwisf3322282003-07-13 09:46:13 +00002464#ifdef F77_DUMMY_MAIN
2465# ifdef __cplusplus
2466 extern "C"
2467# endif
2468 int F77_DUMMY_MAIN() { return 1; }
2469#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002470int
2471main ()
2472{
2473exit (42);
2474 ;
2475 return 0;
2476}
2477_ACEOF
2478rm -f conftest.$ac_objext
2479if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2480 (eval $ac_compile) 2>&5
2481 ac_status=$?
2482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2483 (exit $ac_status); } &&
2484 { ac_try='test -s conftest.$ac_objext'
2485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2486 (eval $ac_try) 2>&5
2487 ac_status=$?
2488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2489 (exit $ac_status); }; }; then
2490 break
2491else
2492 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00002493cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002494fi
2495rm -f conftest.$ac_objext conftest.$ac_ext
2496done
2497rm -f conftest*
2498if test -n "$ac_declaration"; then
2499 echo '#ifdef __cplusplus' >>confdefs.h
2500 echo $ac_declaration >>confdefs.h
2501 echo '#endif' >>confdefs.h
2502fi
2503
2504else
2505 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00002506cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002507fi
2508rm -f conftest.$ac_objext conftest.$ac_ext
2509ac_ext=c
2510ac_cpp='$CPP $CPPFLAGS'
2511ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2512ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2513ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002514
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002515
2516# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002517
2518ac_ext=c
2519ac_cpp='$CPP $CPPFLAGS'
2520ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2521ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2522ac_compiler_gnu=$ac_cv_c_compiler_gnu
2523echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2524echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002525# On Suns, sometimes $CPP names a directory.
2526if test -n "$CPP" && test -d "$CPP"; then
2527 CPP=
2528fi
2529if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 if test "${ac_cv_prog_CPP+set}" = set; then
2531 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002532else
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 # Double quotes because CPP needs to be expanded
2534 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2535 do
2536 ac_preproc_ok=false
2537for ac_c_preproc_warn_flag in '' yes
2538do
2539 # Use a header file that comes with gcc, so configuring glibc
2540 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002541 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002542 # not just through cpp. "Syntax error" is here to catch this case.
2543 cat >conftest.$ac_ext <<_ACEOF
2544#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00002545#include "confdefs.h"
2546#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002547 Syntax error
2548_ACEOF
2549if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2550 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2551 ac_status=$?
Martin v. Löwisf3322282003-07-13 09:46:13 +00002552 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002553 rm -f conftest.er1
2554 cat conftest.err >&5
2555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2556 (exit $ac_status); } >/dev/null; then
2557 if test -s conftest.err; then
2558 ac_cpp_err=$ac_c_preproc_warn_flag
2559 else
2560 ac_cpp_err=
2561 fi
2562else
2563 ac_cpp_err=yes
2564fi
2565if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002566 :
2567else
Martin v. Löwis11437992002-04-12 09:54:03 +00002568 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00002569 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002570 # Broken: fails on valid input.
2571continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002572fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002573rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002574
Martin v. Löwis11437992002-04-12 09:54:03 +00002575 # OK, works on sane cases. Now check whether non-existent headers
2576 # can be detected and how.
2577 cat >conftest.$ac_ext <<_ACEOF
2578#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00002579#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002580#include <ac_nonexistent.h>
2581_ACEOF
2582if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2583 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2584 ac_status=$?
Martin v. Löwisf3322282003-07-13 09:46:13 +00002585 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002586 rm -f conftest.er1
2587 cat conftest.err >&5
2588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2589 (exit $ac_status); } >/dev/null; then
2590 if test -s conftest.err; then
2591 ac_cpp_err=$ac_c_preproc_warn_flag
2592 else
2593 ac_cpp_err=
2594 fi
2595else
2596 ac_cpp_err=yes
2597fi
2598if test -z "$ac_cpp_err"; then
2599 # Broken: success on invalid input.
2600continue
2601else
2602 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00002603 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002604 # Passes both tests.
2605ac_preproc_ok=:
2606break
2607fi
2608rm -f conftest.err conftest.$ac_ext
2609
2610done
2611# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2612rm -f conftest.err conftest.$ac_ext
2613if $ac_preproc_ok; then
2614 break
2615fi
2616
2617 done
2618 ac_cv_prog_CPP=$CPP
2619
2620fi
2621 CPP=$ac_cv_prog_CPP
2622else
2623 ac_cv_prog_CPP=$CPP
2624fi
2625echo "$as_me:$LINENO: result: $CPP" >&5
2626echo "${ECHO_T}$CPP" >&6
2627ac_preproc_ok=false
2628for ac_c_preproc_warn_flag in '' yes
2629do
2630 # Use a header file that comes with gcc, so configuring glibc
2631 # with a fresh cross-compiler works.
2632 # On the NeXT, cc -E runs the code through the compiler's parser,
2633 # not just through cpp. "Syntax error" is here to catch this case.
2634 cat >conftest.$ac_ext <<_ACEOF
2635#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00002636#include "confdefs.h"
2637#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 Syntax error
2639_ACEOF
2640if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2641 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2642 ac_status=$?
Martin v. Löwisf3322282003-07-13 09:46:13 +00002643 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002644 rm -f conftest.er1
2645 cat conftest.err >&5
2646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2647 (exit $ac_status); } >/dev/null; then
2648 if test -s conftest.err; then
2649 ac_cpp_err=$ac_c_preproc_warn_flag
2650 else
2651 ac_cpp_err=
2652 fi
2653else
2654 ac_cpp_err=yes
2655fi
2656if test -z "$ac_cpp_err"; then
2657 :
2658else
2659 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00002660 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002661 # Broken: fails on valid input.
2662continue
2663fi
2664rm -f conftest.err conftest.$ac_ext
2665
2666 # OK, works on sane cases. Now check whether non-existent headers
2667 # can be detected and how.
2668 cat >conftest.$ac_ext <<_ACEOF
2669#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00002670#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002671#include <ac_nonexistent.h>
2672_ACEOF
2673if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2674 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2675 ac_status=$?
Martin v. Löwisf3322282003-07-13 09:46:13 +00002676 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002677 rm -f conftest.er1
2678 cat conftest.err >&5
2679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2680 (exit $ac_status); } >/dev/null; then
2681 if test -s conftest.err; then
2682 ac_cpp_err=$ac_c_preproc_warn_flag
2683 else
2684 ac_cpp_err=
2685 fi
2686else
2687 ac_cpp_err=yes
2688fi
2689if test -z "$ac_cpp_err"; then
2690 # Broken: success on invalid input.
2691continue
2692else
2693 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00002694 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002695 # Passes both tests.
2696ac_preproc_ok=:
2697break
2698fi
2699rm -f conftest.err conftest.$ac_ext
2700
2701done
2702# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2703rm -f conftest.err conftest.$ac_ext
2704if $ac_preproc_ok; then
2705 :
2706else
Martin v. Löwisf3322282003-07-13 09:46:13 +00002707 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2708echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002709 { (exit 1); exit 1; }; }
2710fi
2711
2712ac_ext=c
2713ac_cpp='$CPP $CPPFLAGS'
2714ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2715ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2716ac_compiler_gnu=$ac_cv_c_compiler_gnu
2717
2718
2719
2720echo "$as_me:$LINENO: checking for AIX" >&5
2721echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2722cat >conftest.$ac_ext <<_ACEOF
2723#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00002724#include "confdefs.h"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002725#ifdef _AIX
2726 yes
2727#endif
2728
Martin v. Löwis11437992002-04-12 09:54:03 +00002729_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002730if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Martin v. Löwisf3322282003-07-13 09:46:13 +00002731 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002732 echo "$as_me:$LINENO: result: yes" >&5
2733echo "${ECHO_T}yes" >&6
2734cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002735#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002736_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002737
2738else
Martin v. Löwis11437992002-04-12 09:54:03 +00002739 echo "$as_me:$LINENO: result: no" >&5
2740echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002741fi
2742rm -f conftest*
2743
Michael W. Hudson54241132001-12-07 15:38:26 +00002744
Martin v. Löwis11437992002-04-12 09:54:03 +00002745echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2746echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2747if test "${ac_cv_header_stdc+set}" = set; then
2748 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002749else
Martin v. Löwis11437992002-04-12 09:54:03 +00002750 cat >conftest.$ac_ext <<_ACEOF
2751#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00002752#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002753#include <stdlib.h>
2754#include <stdarg.h>
2755#include <string.h>
2756#include <float.h>
2757
2758_ACEOF
Martin v. Löwisf3322282003-07-13 09:46:13 +00002759if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2760 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002761 ac_status=$?
Martin v. Löwisf3322282003-07-13 09:46:13 +00002762 egrep -v '^ *\+' conftest.er1 >conftest.err
2763 rm -f conftest.er1
2764 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00002766 (exit $ac_status); } >/dev/null; then
2767 if test -s conftest.err; then
2768 ac_cpp_err=$ac_c_preproc_warn_flag
2769 else
2770 ac_cpp_err=
2771 fi
2772else
2773 ac_cpp_err=yes
2774fi
2775if test -z "$ac_cpp_err"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002776 ac_cv_header_stdc=yes
2777else
2778 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00002779 cat conftest.$ac_ext >&5
2780 ac_cv_header_stdc=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002781fi
Martin v. Löwisf3322282003-07-13 09:46:13 +00002782rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002783
2784if test $ac_cv_header_stdc = yes; then
2785 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2786 cat >conftest.$ac_ext <<_ACEOF
2787#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00002788#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002789#include <string.h>
2790
2791_ACEOF
2792if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Martin v. Löwisf3322282003-07-13 09:46:13 +00002793 egrep "memchr" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002794 :
2795else
2796 ac_cv_header_stdc=no
2797fi
2798rm -f conftest*
2799
2800fi
2801
2802if test $ac_cv_header_stdc = yes; then
2803 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2804 cat >conftest.$ac_ext <<_ACEOF
2805#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00002806#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002807#include <stdlib.h>
2808
2809_ACEOF
2810if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Martin v. Löwisf3322282003-07-13 09:46:13 +00002811 egrep "free" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002812 :
2813else
2814 ac_cv_header_stdc=no
2815fi
2816rm -f conftest*
2817
2818fi
2819
2820if test $ac_cv_header_stdc = yes; then
2821 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2822 if test "$cross_compiling" = yes; then
2823 :
2824else
2825 cat >conftest.$ac_ext <<_ACEOF
2826#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00002827#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002828#include <ctype.h>
2829#if ((' ' & 0x0FF) == 0x020)
2830# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2831# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2832#else
Martin v. Löwisf3322282003-07-13 09:46:13 +00002833# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
Martin v. Löwis11437992002-04-12 09:54:03 +00002834 || ('j' <= (c) && (c) <= 'r') \
2835 || ('s' <= (c) && (c) <= 'z'))
2836# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2837#endif
2838
2839#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2840int
2841main ()
2842{
2843 int i;
2844 for (i = 0; i < 256; i++)
2845 if (XOR (islower (i), ISLOWER (i))
2846 || toupper (i) != TOUPPER (i))
2847 exit(2);
2848 exit (0);
2849}
2850_ACEOF
2851rm -f conftest$ac_exeext
2852if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2853 (eval $ac_link) 2>&5
2854 ac_status=$?
2855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2856 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2857 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2858 (eval $ac_try) 2>&5
2859 ac_status=$?
2860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2861 (exit $ac_status); }; }; then
2862 :
2863else
2864 echo "$as_me: program exited with status $ac_status" >&5
2865echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00002866cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002867( exit $ac_status )
2868ac_cv_header_stdc=no
2869fi
Martin v. Löwisf3322282003-07-13 09:46:13 +00002870rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002871fi
2872fi
2873fi
2874echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2875echo "${ECHO_T}$ac_cv_header_stdc" >&6
2876if test $ac_cv_header_stdc = yes; then
2877
2878cat >>confdefs.h <<\_ACEOF
2879#define STDC_HEADERS 1
2880_ACEOF
2881
2882fi
2883
2884# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2895 inttypes.h stdint.h unistd.h
2896do
2897as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2898echo "$as_me:$LINENO: checking for $ac_header" >&5
2899echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2900if eval "test \"\${$as_ac_Header+set}\" = set"; then
2901 echo $ECHO_N "(cached) $ECHO_C" >&6
2902else
2903 cat >conftest.$ac_ext <<_ACEOF
2904#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00002905#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002906$ac_includes_default
2907
2908#include <$ac_header>
2909_ACEOF
2910rm -f conftest.$ac_objext
2911if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2912 (eval $ac_compile) 2>&5
2913 ac_status=$?
2914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2915 (exit $ac_status); } &&
2916 { ac_try='test -s conftest.$ac_objext'
2917 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2918 (eval $ac_try) 2>&5
2919 ac_status=$?
2920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2921 (exit $ac_status); }; }; then
2922 eval "$as_ac_Header=yes"
2923else
2924 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00002925cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002926eval "$as_ac_Header=no"
2927fi
2928rm -f conftest.$ac_objext conftest.$ac_ext
2929fi
2930echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2931echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2932if test `eval echo '${'$as_ac_Header'}'` = yes; then
2933 cat >>confdefs.h <<_ACEOF
2934#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2935_ACEOF
2936
2937fi
2938
2939done
2940
2941
2942if test "${ac_cv_header_minix_config_h+set}" = set; then
2943 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2944echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2945if test "${ac_cv_header_minix_config_h+set}" = set; then
2946 echo $ECHO_N "(cached) $ECHO_C" >&6
2947fi
2948echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2949echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2950else
2951 # Is the header compilable?
2952echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2953echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2954cat >conftest.$ac_ext <<_ACEOF
2955#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00002956#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002957$ac_includes_default
2958#include <minix/config.h>
2959_ACEOF
2960rm -f conftest.$ac_objext
2961if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2962 (eval $ac_compile) 2>&5
2963 ac_status=$?
2964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2965 (exit $ac_status); } &&
2966 { ac_try='test -s conftest.$ac_objext'
2967 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2968 (eval $ac_try) 2>&5
2969 ac_status=$?
2970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2971 (exit $ac_status); }; }; then
2972 ac_header_compiler=yes
2973else
2974 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00002975cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002976ac_header_compiler=no
2977fi
2978rm -f conftest.$ac_objext conftest.$ac_ext
2979echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2980echo "${ECHO_T}$ac_header_compiler" >&6
2981
2982# Is the header present?
2983echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2984echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2985cat >conftest.$ac_ext <<_ACEOF
2986#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00002987#include "confdefs.h"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002988#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002989_ACEOF
2990if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2991 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2992 ac_status=$?
Martin v. Löwisf3322282003-07-13 09:46:13 +00002993 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002994 rm -f conftest.er1
2995 cat conftest.err >&5
2996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2997 (exit $ac_status); } >/dev/null; then
2998 if test -s conftest.err; then
2999 ac_cpp_err=$ac_c_preproc_warn_flag
3000 else
3001 ac_cpp_err=
3002 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003003else
Martin v. Löwis11437992002-04-12 09:54:03 +00003004 ac_cpp_err=yes
3005fi
3006if test -z "$ac_cpp_err"; then
3007 ac_header_preproc=yes
3008else
3009 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00003010 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003011 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003012fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003013rm -f conftest.err conftest.$ac_ext
3014echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3015echo "${ECHO_T}$ac_header_preproc" >&6
3016
3017# So? What about this header?
3018case $ac_header_compiler:$ac_header_preproc in
3019 yes:no )
3020 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
3021echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3022 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00003023echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwis11437992002-04-12 09:54:03 +00003024 no:yes )
3025 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
3026echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
3027 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
3028echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
3029 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00003030echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwis11437992002-04-12 09:54:03 +00003031esac
3032echo "$as_me:$LINENO: checking for minix/config.h" >&5
3033echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3034if test "${ac_cv_header_minix_config_h+set}" = set; then
3035 echo $ECHO_N "(cached) $ECHO_C" >&6
3036else
3037 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003038fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003039echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3040echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3041
3042fi
3043if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003044 MINIX=yes
3045else
Martin v. Löwis11437992002-04-12 09:54:03 +00003046 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003047fi
3048
Martin v. Löwis11437992002-04-12 09:54:03 +00003049
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003050if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003051
3052cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003053#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003054_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003055
Martin v. Löwis11437992002-04-12 09:54:03 +00003056
3057cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003058#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00003059_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003060
Martin v. Löwis11437992002-04-12 09:54:03 +00003061
3062cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003063#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003064_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003065
3066fi
3067
3068
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003069# Check for unsupported systems
3070case $ac_sys_system/$ac_sys_release in
3071SunOS/4*|DYNIX/*|dgux*/*|IRIX/4*|Linux*/1*)
3072 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3073 echo See README for details.
3074 exit 1;;
3075esac
3076
3077if test "$MINIX" = yes; then
3078 echo This system \(MINIX\) is no longer supported.
3079 echo Read README for details.
3080 exit 1
3081fi
3082
Michael W. Hudson54241132001-12-07 15:38:26 +00003083
Martin v. Löwis11437992002-04-12 09:54:03 +00003084echo "$as_me:$LINENO: checking for --with-suffix" >&5
3085echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003086
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003087# Check whether --with-suffix or --without-suffix was given.
3088if test "${with_suffix+set}" = set; then
3089 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003090
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003091 case $withval in
3092 no) EXEEXT=;;
3093 yes) EXEEXT=.exe;;
3094 *) EXEEXT=$withval;;
3095 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003096fi;
3097echo "$as_me:$LINENO: result: $EXEEXT" >&5
3098echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003099
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003100# Test whether we're running on a non-case-sensitive system, in which
3101# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003102
Martin v. Löwis11437992002-04-12 09:54:03 +00003103echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3104echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003105if test ! -d CaseSensitiveTestDir; then
3106mkdir CaseSensitiveTestDir
3107fi
3108
3109if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003110then
Martin v. Löwis11437992002-04-12 09:54:03 +00003111 echo "$as_me:$LINENO: result: yes" >&5
3112echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003113 BUILDEXEEXT=.exe
3114else
Martin v. Löwis11437992002-04-12 09:54:03 +00003115 echo "$as_me:$LINENO: result: no" >&5
3116echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003117 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003118fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003119rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003120
Guido van Rossumdd997f71998-10-07 19:58:26 +00003121case $MACHDEP in
3122bsdos*)
3123 case $CC in
3124 gcc) CC="$CC -D_HAVE_BSDI";;
3125 esac;;
3126esac
3127
Guido van Rossum24b1e751997-08-21 02:29:16 +00003128case $ac_sys_system in
3129hp*|HP*)
3130 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003131 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003132 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003133Monterey*)
3134 case $CC in
3135 cc) CC="$CC -Wl,-Bexport";;
3136 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003137SunOS*)
3138 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003139
3140cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003141#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003142_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003143
3144 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003145esac
3146
Michael W. Hudson54241132001-12-07 15:38:26 +00003147
3148
Martin v. Löwis11437992002-04-12 09:54:03 +00003149echo "$as_me:$LINENO: checking LIBRARY" >&5
3150echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003151if test -z "$LIBRARY"
3152then
3153 LIBRARY='libpython$(VERSION).a'
3154fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003155echo "$as_me:$LINENO: result: $LIBRARY" >&5
3156echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003157
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003158# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003159# name of the library into which to insert object files). BLDLIBRARY is also
3160# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3161# is blank as the main program is not linked directly against LDLIBRARY.
3162# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3163# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3164# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3165# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003166#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003167# RUNSHARED is used to run shared python without installed libraries
3168#
3169# INSTSONAME is the name of the shared library that will be use to install
3170# on the system - some systems like version suffix, others don't
3171
3172
Michael W. Hudson54241132001-12-07 15:38:26 +00003173
3174
3175
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003176
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003177LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003178BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003179INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003180DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003181LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003182RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003183
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003184# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003185# If CXX is set, and if it is needed to link a main function that was
3186# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3187# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003188# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003189# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003190
Martin v. Löwis11437992002-04-12 09:54:03 +00003191echo "$as_me:$LINENO: checking LINKCC" >&5
3192echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003193if test -z "$LINKCC"
3194then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003195 if test -z "$CXX"; then
3196 LINKCC="\$(PURIFY) \$(CC)"
3197 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003198 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003199 $CXX -c conftest.$ac_ext 2>&5
3200 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3201 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3202 then
3203 LINKCC="\$(PURIFY) \$(CC)"
3204 else
3205 LINKCC="\$(PURIFY) \$(CXX)"
3206 fi
3207 rm -fr conftest*
3208 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003209 case $ac_sys_system in
3210 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003211 exp_extra="\"\""
3212 if test $ac_sys_release -ge 5 -o \
3213 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3214 exp_extra="."
3215 fi
3216 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003217 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003218 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003219 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003220 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003221 esac
3222fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003223echo "$as_me:$LINENO: result: $LINKCC" >&5
3224echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003225
Martin v. Löwis11437992002-04-12 09:54:03 +00003226echo "$as_me:$LINENO: checking for --enable-shared" >&5
3227echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003228# Check whether --enable-shared or --disable-shared was given.
3229if test "${enable_shared+set}" = set; then
3230 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003231
Martin v. Löwis11437992002-04-12 09:54:03 +00003232fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003233
3234if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003235then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003236 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003237 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003238 enable_shared="yes";;
3239 *)
3240 enable_shared="no";;
3241 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003242fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003243echo "$as_me:$LINENO: result: $enable_shared" >&5
3244echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003245
3246
Martin v. Löwis11437992002-04-12 09:54:03 +00003247echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3248echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003249
Guido van Rossumb8552162001-09-05 14:58:11 +00003250# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3251# library that we build, but we do not want to link against it (we
3252# will find it with a -framework option). For this reason there is an
3253# extra variable BLDLIBRARY against which Python and the extension
3254# modules are linked, BLDLIBRARY. This is normally the same as
3255# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003256if test "$enable_framework"
3257then
3258 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003259 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003260 BLDLIBRARY=''
3261else
3262 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003263fi
Jack Jansene578a632001-08-15 01:27:14 +00003264
Martin v. Löwis1142de32002-03-29 16:28:31 +00003265# Other platforms follow
3266if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003267
3268cat >>confdefs.h <<\_ACEOF
3269#define Py_ENABLE_SHARED 1
3270_ACEOF
3271
Martin v. Löwis1142de32002-03-29 16:28:31 +00003272 case $ac_sys_system in
3273 BeOS*)
3274 LDLIBRARY='libpython$(VERSION).so'
3275 ;;
3276 CYGWIN*)
3277 LDLIBRARY='libpython$(VERSION).dll.a'
3278 DLLLIBRARY='libpython$(VERSION).dll'
3279 ;;
3280 SunOS*)
3281 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00003282 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwis1142de32002-03-29 16:28:31 +00003283 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3284 ;;
Martin v. Löwis96ce8052003-05-31 07:58:45 +00003285 Linux*|GNU*|NetBSD*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003286 LDLIBRARY='libpython$(VERSION).so'
3287 BLDLIBRARY='-L. -lpython$(VERSION)'
3288 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3289 INSTSONAME="$LDLIBRARY".$SOVERSION
3290 ;;
3291 hp*|HP*)
3292 LDLIBRARY='libpython$(VERSION).sl'
3293 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3294 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3295 ;;
3296 OSF*)
3297 LDLIBRARY='libpython$(VERSION).so'
3298 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3299 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3300 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003301 atheos*)
3302 LDLIBRARY='libpython$(VERSION).so'
3303 BLDLIBRARY='-L. -lpython$(VERSION)'
3304 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3305 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003306 esac
3307 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3308 case $MACHDEP in
3309 dguxR4)
3310 LDLIBRARY='libpython$(VERSION).so'
Skip Montanarodecc6a42003-01-01 20:07:49 +00003311 BASECFLAGS="$BASECFLAGS -pic"
Martin v. Löwis1142de32002-03-29 16:28:31 +00003312 ;;
3313 esac
3314fi
3315
Martin v. Löwis11437992002-04-12 09:54:03 +00003316echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3317echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003318
Martin v. Löwis11437992002-04-12 09:54:03 +00003319if test -n "$ac_tool_prefix"; then
3320 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3321set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3322echo "$as_me:$LINENO: checking for $ac_word" >&5
3323echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3324if test "${ac_cv_prog_RANLIB+set}" = set; then
3325 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003326else
3327 if test -n "$RANLIB"; then
3328 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3329else
Martin v. Löwis11437992002-04-12 09:54:03 +00003330as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3331for as_dir in $PATH
3332do
3333 IFS=$as_save_IFS
3334 test -z "$as_dir" && as_dir=.
3335 for ac_exec_ext in '' $ac_executable_extensions; do
3336 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3337 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3338 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3339 break 2
3340 fi
3341done
3342done
3343
Guido van Rossum627b2d71993-12-24 10:39:16 +00003344fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003345fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003346RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003347if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003348 echo "$as_me:$LINENO: result: $RANLIB" >&5
3349echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003350else
Martin v. Löwis11437992002-04-12 09:54:03 +00003351 echo "$as_me:$LINENO: result: no" >&5
3352echo "${ECHO_T}no" >&6
3353fi
3354
3355fi
3356if test -z "$ac_cv_prog_RANLIB"; then
3357 ac_ct_RANLIB=$RANLIB
3358 # Extract the first word of "ranlib", so it can be a program name with args.
3359set dummy ranlib; ac_word=$2
3360echo "$as_me:$LINENO: checking for $ac_word" >&5
3361echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3362if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3363 echo $ECHO_N "(cached) $ECHO_C" >&6
3364else
3365 if test -n "$ac_ct_RANLIB"; then
3366 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3367else
3368as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3369for as_dir in $PATH
3370do
3371 IFS=$as_save_IFS
3372 test -z "$as_dir" && as_dir=.
3373 for ac_exec_ext in '' $ac_executable_extensions; do
3374 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3375 ac_cv_prog_ac_ct_RANLIB="ranlib"
3376 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3377 break 2
3378 fi
3379done
3380done
3381
3382 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3383fi
3384fi
3385ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3386if test -n "$ac_ct_RANLIB"; then
3387 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3388echo "${ECHO_T}$ac_ct_RANLIB" >&6
3389else
3390 echo "$as_me:$LINENO: result: no" >&5
3391echo "${ECHO_T}no" >&6
3392fi
3393
3394 RANLIB=$ac_ct_RANLIB
3395else
3396 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003397fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003398
3399
Guido van Rossum7f43da71994-08-01 12:15:30 +00003400for ac_prog in ar aal
3401do
Martin v. Löwis11437992002-04-12 09:54:03 +00003402 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003403set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003404echo "$as_me:$LINENO: checking for $ac_word" >&5
3405echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3406if test "${ac_cv_prog_AR+set}" = set; then
3407 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003408else
3409 if test -n "$AR"; then
3410 ac_cv_prog_AR="$AR" # Let the user override the test.
3411else
Martin v. Löwis11437992002-04-12 09:54:03 +00003412as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3413for as_dir in $PATH
3414do
3415 IFS=$as_save_IFS
3416 test -z "$as_dir" && as_dir=.
3417 for ac_exec_ext in '' $ac_executable_extensions; do
3418 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3419 ac_cv_prog_AR="$ac_prog"
3420 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3421 break 2
3422 fi
3423done
3424done
3425
Guido van Rossum7f43da71994-08-01 12:15:30 +00003426fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003427fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003428AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003429if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003430 echo "$as_me:$LINENO: result: $AR" >&5
3431echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003432else
Martin v. Löwis11437992002-04-12 09:54:03 +00003433 echo "$as_me:$LINENO: result: no" >&5
3434echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003435fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003436
Martin v. Löwis11437992002-04-12 09:54:03 +00003437 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003438done
3439test -n "$AR" || AR="ar"
3440
Michael W. Hudson54241132001-12-07 15:38:26 +00003441
Neil Schemenauera42c8272001-03-31 00:01:55 +00003442case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003443bsdos*|hp*|HP*)
3444 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003445 if test -z "$INSTALL"
3446 then
3447 INSTALL="${srcdir}/install-sh -c"
3448 fi
3449esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003450ac_aux_dir=
3451for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3452 if test -f $ac_dir/install-sh; then
3453 ac_aux_dir=$ac_dir
3454 ac_install_sh="$ac_aux_dir/install-sh -c"
3455 break
3456 elif test -f $ac_dir/install.sh; then
3457 ac_aux_dir=$ac_dir
3458 ac_install_sh="$ac_aux_dir/install.sh -c"
3459 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003460 elif test -f $ac_dir/shtool; then
3461 ac_aux_dir=$ac_dir
3462 ac_install_sh="$ac_aux_dir/shtool install -c"
3463 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003464 fi
3465done
3466if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003467 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3468echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3469 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003470fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003471ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3472ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3473ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003474
3475# Find a good install program. We prefer a C program (faster),
3476# so one script is as good as another. But avoid the broken or
3477# incompatible versions:
3478# SysV /etc/install, /usr/sbin/install
3479# SunOS /usr/etc/install
3480# IRIX /sbin/install
3481# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003482# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003483# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3484# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3485# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3486# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003487echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3488echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003489if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003490if test "${ac_cv_path_install+set}" = set; then
3491 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003492else
Martin v. Löwis11437992002-04-12 09:54:03 +00003493 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3494for as_dir in $PATH
3495do
3496 IFS=$as_save_IFS
3497 test -z "$as_dir" && as_dir=.
3498 # Account for people who put trailing slashes in PATH elements.
3499case $as_dir/ in
3500 ./ | .// | /cC/* | \
3501 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3502 /usr/ucb/* ) ;;
3503 *)
3504 # OSF1 and SCO ODT 3.0 have their own names for install.
3505 # Don't use installbsd from OSF since it installs stuff as root
3506 # by default.
3507 for ac_prog in ginstall scoinst install; do
3508 for ac_exec_ext in '' $ac_executable_extensions; do
3509 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3510 if test $ac_prog = install &&
3511 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3512 # AIX install. It has an incompatible calling convention.
3513 :
3514 elif test $ac_prog = install &&
3515 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3516 # program-specific install script used by HP pwplus--don't use.
3517 :
3518 else
3519 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3520 break 3
3521 fi
3522 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003523 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003524 done
3525 ;;
3526esac
3527done
3528
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003529
3530fi
3531 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003532 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003533 else
3534 # As a last resort, use the slow shell script. We don't cache a
3535 # path for INSTALL within a source directory, because that will
3536 # break other packages using the cache if that directory is
3537 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003538 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003539 fi
3540fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003541echo "$as_me:$LINENO: result: $INSTALL" >&5
3542echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003543
3544# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3545# It thinks the first close brace ends the variable substitution.
3546test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3547
Martin v. Löwis11437992002-04-12 09:54:03 +00003548test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003549
3550test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3551
Michael W. Hudson54241132001-12-07 15:38:26 +00003552
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003553# Not every filesystem supports hard links
3554
3555if test -z "$LN" ; then
3556 case $ac_sys_system in
3557 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003558 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003559 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003560 *) LN=ln;;
3561 esac
3562fi
3563
Fred Drake109d9862001-07-11 06:27:56 +00003564# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003565echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3566echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3567
Fred Drake109d9862001-07-11 06:27:56 +00003568# Check whether --with-pydebug or --without-pydebug was given.
3569if test "${with_pydebug+set}" = set; then
3570 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003571
Fred Drake109d9862001-07-11 06:27:56 +00003572if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003573then
3574
3575cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003576#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003577_ACEOF
3578
3579 echo "$as_me:$LINENO: result: yes" >&5
3580echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003581 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003582else echo "$as_me:$LINENO: result: no" >&5
3583echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003584fi
3585else
Martin v. Löwis11437992002-04-12 09:54:03 +00003586 echo "$as_me:$LINENO: result: no" >&5
3587echo "${ECHO_T}no" >&6
3588fi;
Fred Drake109d9862001-07-11 06:27:56 +00003589
Skip Montanarodecc6a42003-01-01 20:07:49 +00003590# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3591# merged with this chunk of code?
3592
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003593# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003594# ------------------------
3595# (The following bit of code is complicated enough - please keep things
3596# indented properly. Just pretend you're editing Python code. ;-)
3597
3598# There are two parallel sets of case statements below, one that checks to
3599# see if OPT was set and one that does BASECFLAGS setting based upon
3600# compiler and platform. BASECFLAGS tweaks need to be made even if the
3601# user set OPT.
3602
3603# tweak OPT based on compiler and platform, only if the user didn't set
3604# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003605
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003606if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003607then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003608 case $GCC in
3609 yes)
3610 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003611 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003612 if test "$Py_DEBUG" = 'true' ; then
3613 # Optimization messes up debuggers, so turn it off for
3614 # debug builds.
3615 OPT="-g -Wall -Wstrict-prototypes"
3616 else
3617 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003618 fi
3619 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003620 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003621 OPT="-O3 -Wall -Wstrict-prototypes"
3622 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003623 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003624 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003625 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3626 ;;
3627 esac
Fred Drake109d9862001-07-11 06:27:56 +00003628 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003629
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003630 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003631 OPT="-O"
3632 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003633 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003634
3635 # The current (beta) Monterey compiler dies with optimizations
3636 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003637 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003638 Monterey*)
3639 OPT=""
3640 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003641 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003642
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003643fi
3644
Skip Montanarodecc6a42003-01-01 20:07:49 +00003645
3646# tweak BASECFLAGS based on compiler and platform
3647case $GCC in
3648yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003649 # Python violates C99 rules, by casting between incompatible
3650 # pointer types. GCC may generate bad code as a result of that,
3651 # so use -fno-strict-aliasing if supported.
3652 echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
3653echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6
3654 ac_save_cc="$CC"
3655 CC="$CC -fno-strict-aliasing"
3656 if test "$cross_compiling" = yes; then
3657 ac_cv_no_strict_aliasing_ok=no
3658else
3659 cat >conftest.$ac_ext <<_ACEOF
3660#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00003661#include "confdefs.h"
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003662int main() { return 0; }
3663_ACEOF
3664rm -f conftest$ac_exeext
3665if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3666 (eval $ac_link) 2>&5
3667 ac_status=$?
3668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3669 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3670 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3671 (eval $ac_try) 2>&5
3672 ac_status=$?
3673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3674 (exit $ac_status); }; }; then
3675 ac_cv_no_strict_aliasing_ok=yes
3676else
3677 echo "$as_me: program exited with status $ac_status" >&5
3678echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00003679cat conftest.$ac_ext >&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003680( exit $ac_status )
3681ac_cv_no_strict_aliasing_ok=no
3682fi
Martin v. Löwisf3322282003-07-13 09:46:13 +00003683rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003684fi
3685 CC="$ac_save_cc"
3686 echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
3687echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6
3688 if test $ac_cv_no_strict_aliasing_ok = yes
3689 then
3690 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
3691 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00003692 case $ac_sys_system in
3693 SCO_SV*)
3694 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3695 ;;
3696 # is there any other compiler on Darwin besides gcc?
3697 Darwin*)
3698 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp"
3699 ;;
3700 esac
3701 ;;
3702
3703*)
3704 case $ac_sys_system in
3705 OpenUNIX*|UnixWare*)
3706 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3707 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00003708 OSF*)
3709 BASECFLAGS="$BASECFLAGS -ieee -std"
3710 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003711 SCO_SV*)
3712 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3713 ;;
3714 esac
3715 ;;
3716esac
3717
Fred Drakee1ceaa02001-12-04 20:55:47 +00003718if test "$Py_DEBUG" = 'true'; then
3719 :
3720else
3721 OPT="-DNDEBUG $OPT"
3722fi
3723
Guido van Rossum563e7081996-09-10 18:20:48 +00003724if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003725then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003726 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003727fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003728
Martin v. Löwis11437992002-04-12 09:54:03 +00003729echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3730echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3731if test "${ac_cv_opt_olimit_ok+set}" = set; then
3732 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003733else
3734 ac_save_cc="$CC"
3735CC="$CC -OPT:Olimit=0"
3736if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003737 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003738else
Martin v. Löwis11437992002-04-12 09:54:03 +00003739 cat >conftest.$ac_ext <<_ACEOF
3740#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00003741#include "confdefs.h"
Guido van Rossum91922671997-10-09 20:24:13 +00003742int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003743_ACEOF
3744rm -f conftest$ac_exeext
3745if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3746 (eval $ac_link) 2>&5
3747 ac_status=$?
3748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3749 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3751 (eval $ac_try) 2>&5
3752 ac_status=$?
3753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3754 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003755 ac_cv_opt_olimit_ok=yes
3756else
Martin v. Löwis11437992002-04-12 09:54:03 +00003757 echo "$as_me: program exited with status $ac_status" >&5
3758echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00003759cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003760( exit $ac_status )
3761ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003762fi
Martin v. Löwisf3322282003-07-13 09:46:13 +00003763rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003764fi
Guido van Rossum91922671997-10-09 20:24:13 +00003765CC="$ac_save_cc"
3766fi
3767
Martin v. Löwis11437992002-04-12 09:54:03 +00003768echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3769echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003770if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003771 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003772 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3773 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3774 # environment?
3775 Darwin*)
3776 ;;
3777 *)
3778 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3779 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003780 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003781else
Martin v. Löwis11437992002-04-12 09:54:03 +00003782 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3783echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3784 if test "${ac_cv_olimit_ok+set}" = set; then
3785 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003786else
3787 ac_save_cc="$CC"
3788 CC="$CC -Olimit 1500"
3789 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003790 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003791else
Martin v. Löwis11437992002-04-12 09:54:03 +00003792 cat >conftest.$ac_ext <<_ACEOF
3793#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00003794#include "confdefs.h"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003795int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003796_ACEOF
3797rm -f conftest$ac_exeext
3798if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3799 (eval $ac_link) 2>&5
3800 ac_status=$?
3801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3802 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3803 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3804 (eval $ac_try) 2>&5
3805 ac_status=$?
3806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3807 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003808 ac_cv_olimit_ok=yes
3809else
Martin v. Löwis11437992002-04-12 09:54:03 +00003810 echo "$as_me: program exited with status $ac_status" >&5
3811echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00003812cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003813( exit $ac_status )
3814ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003815fi
Martin v. Löwisf3322282003-07-13 09:46:13 +00003816rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003817fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003818 CC="$ac_save_cc"
3819fi
3820
Martin v. Löwis11437992002-04-12 09:54:03 +00003821 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3822echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003823 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003824 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003825 fi
3826fi
3827
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003828# On some compilers, pthreads are available without further options
3829# (e.g. MacOS X). On some of these systems, the compiler will not
3830# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3831# So we have to see first whether pthreads are available without
3832# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003833echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3834echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3835if test "${ac_cv_pthread_is_default+set}" = set; then
3836 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003837else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003838 if test "$cross_compiling" = yes; then
3839 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003840else
Martin v. Löwis11437992002-04-12 09:54:03 +00003841 cat >conftest.$ac_ext <<_ACEOF
3842#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00003843#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003844
Martin v. Löwis130fb172001-07-19 11:00:41 +00003845#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003846
3847void* routine(void* p){return NULL;}
3848
3849int main(){
3850 pthread_t p;
3851 if(pthread_create(&p,NULL,routine,NULL)!=0)
3852 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003853 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003854 return 0;
3855}
3856
Martin v. Löwis11437992002-04-12 09:54:03 +00003857_ACEOF
3858rm -f conftest$ac_exeext
3859if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3860 (eval $ac_link) 2>&5
3861 ac_status=$?
3862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3863 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3865 (eval $ac_try) 2>&5
3866 ac_status=$?
3867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3868 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00003869
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003870 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00003871 ac_cv_kthread=no
3872 ac_cv_pthread=no
3873
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003874else
Martin v. Löwis11437992002-04-12 09:54:03 +00003875 echo "$as_me: program exited with status $ac_status" >&5
3876echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00003877cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003878( exit $ac_status )
3879ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003880fi
Martin v. Löwisf3322282003-07-13 09:46:13 +00003881rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003882fi
3883
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003884fi
3885
Martin v. Löwis11437992002-04-12 09:54:03 +00003886echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3887echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003888
Michael W. Hudson54241132001-12-07 15:38:26 +00003889
Martin v. Löwis11437992002-04-12 09:54:03 +00003890if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003891then
3892 ac_cv_kpthread=no
3893else
3894# -Kpthread, if available, provides the right #defines
3895# and linker options to make pthread_create available
3896# Some compilers won't report that they do not support -Kpthread,
3897# so we need to run a program to see whether it really made the
3898# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003899echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3900echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3901if test "${ac_cv_kpthread+set}" = set; then
3902 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003903else
3904 ac_save_cc="$CC"
3905CC="$CC -Kpthread"
3906if test "$cross_compiling" = yes; then
3907 ac_cv_kpthread=no
3908else
Martin v. Löwis11437992002-04-12 09:54:03 +00003909 cat >conftest.$ac_ext <<_ACEOF
3910#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00003911#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003912
3913#include <pthread.h>
3914
3915void* routine(void* p){return NULL;}
3916
3917int main(){
3918 pthread_t p;
3919 if(pthread_create(&p,NULL,routine,NULL)!=0)
3920 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003921 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003922 return 0;
3923}
3924
Martin v. Löwis11437992002-04-12 09:54:03 +00003925_ACEOF
3926rm -f conftest$ac_exeext
3927if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3928 (eval $ac_link) 2>&5
3929 ac_status=$?
3930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3931 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3932 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3933 (eval $ac_try) 2>&5
3934 ac_status=$?
3935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3936 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003937 ac_cv_kpthread=yes
3938else
Martin v. Löwis11437992002-04-12 09:54:03 +00003939 echo "$as_me: program exited with status $ac_status" >&5
3940echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00003941cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003942( exit $ac_status )
3943ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003944fi
Martin v. Löwisf3322282003-07-13 09:46:13 +00003945rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003946fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003947CC="$ac_save_cc"
3948fi
3949
Martin v. Löwis11437992002-04-12 09:54:03 +00003950echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3951echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003952fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003953
Skip Montanarod8d39a02003-07-10 20:44:10 +00003954if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003955then
3956# -Kthread, if available, provides the right #defines
3957# and linker options to make pthread_create available
3958# Some compilers won't report that they do not support -Kthread,
3959# so we need to run a program to see whether it really made the
3960# function available.
3961echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
3962echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
3963if test "${ac_cv_kthread+set}" = set; then
3964 echo $ECHO_N "(cached) $ECHO_C" >&6
3965else
3966 ac_save_cc="$CC"
3967CC="$CC -Kthread"
3968if test "$cross_compiling" = yes; then
3969 ac_cv_kthread=no
3970else
3971 cat >conftest.$ac_ext <<_ACEOF
3972#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00003973#include "confdefs.h"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003974
3975#include <pthread.h>
3976
3977void* routine(void* p){return NULL;}
3978
3979int main(){
3980 pthread_t p;
3981 if(pthread_create(&p,NULL,routine,NULL)!=0)
3982 return 1;
3983 (void)pthread_detach(p);
3984 return 0;
3985}
3986
3987_ACEOF
3988rm -f conftest$ac_exeext
3989if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3990 (eval $ac_link) 2>&5
3991 ac_status=$?
3992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3993 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3995 (eval $ac_try) 2>&5
3996 ac_status=$?
3997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3998 (exit $ac_status); }; }; then
3999 ac_cv_kthread=yes
4000else
4001 echo "$as_me: program exited with status $ac_status" >&5
4002echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00004003cat conftest.$ac_ext >&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004004( exit $ac_status )
4005ac_cv_kthread=no
4006fi
Martin v. Löwisf3322282003-07-13 09:46:13 +00004007rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004008fi
4009CC="$ac_save_cc"
4010fi
4011
4012echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
4013echo "${ECHO_T}$ac_cv_kthread" >&6
4014fi
4015
Skip Montanarod8d39a02003-07-10 20:44:10 +00004016if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004017then
4018# -pthread, if available, provides the right #defines
4019# and linker options to make pthread_create available
4020# Some compilers won't report that they do not support -pthread,
4021# so we need to run a program to see whether it really made the
4022# function available.
4023echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
4024echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
4025if test "${ac_cv_thread+set}" = set; then
4026 echo $ECHO_N "(cached) $ECHO_C" >&6
4027else
4028 ac_save_cc="$CC"
4029CC="$CC -pthread"
4030if test "$cross_compiling" = yes; then
4031 ac_cv_pthread=no
4032else
4033 cat >conftest.$ac_ext <<_ACEOF
4034#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00004035#include "confdefs.h"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004036
4037#include <pthread.h>
4038
4039void* routine(void* p){return NULL;}
4040
4041int main(){
4042 pthread_t p;
4043 if(pthread_create(&p,NULL,routine,NULL)!=0)
4044 return 1;
4045 (void)pthread_detach(p);
4046 return 0;
4047}
4048
4049_ACEOF
4050rm -f conftest$ac_exeext
4051if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4052 (eval $ac_link) 2>&5
4053 ac_status=$?
4054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4055 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4057 (eval $ac_try) 2>&5
4058 ac_status=$?
4059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4060 (exit $ac_status); }; }; then
4061 ac_cv_pthread=yes
4062else
4063 echo "$as_me: program exited with status $ac_status" >&5
4064echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00004065cat conftest.$ac_ext >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004066( exit $ac_status )
4067ac_cv_pthread=no
4068fi
Martin v. Löwisf3322282003-07-13 09:46:13 +00004069rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004070fi
4071CC="$ac_save_cc"
4072fi
4073
4074echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4075echo "${ECHO_T}$ac_cv_pthread" >&6
4076fi
4077
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004078# If we have set a CC compiler flag for thread support then
4079# check if it works for CXX, too.
4080ac_cv_cxx_thread=no
4081if test ! -z "$CXX"
4082then
4083echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
4084echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6
4085ac_save_cxx="$CXX"
4086
4087if test "$ac_cv_kpthread" = "yes"
4088then
4089 CXX="$CXX -Kpthread"
4090 ac_cv_cxx_thread=yes
4091elif test "$ac_cv_kthread" = "yes"
4092then
4093 CXX="$CXX -Kthread"
4094 ac_cv_cxx_thread=yes
4095elif test "$ac_cv_pthread" = "yes"
4096then
4097 CXX="$CXX -pthread"
4098 ac_cv_cxx_thread=yes
4099fi
4100
4101if test $ac_cv_cxx_thread = yes
4102then
4103 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
4104 $CXX -c conftest.$ac_ext 2>&5
4105 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
4106 && test -s conftest$ac_exeext && ./conftest$ac_exeext
4107 then
4108 ac_cv_cxx_thread=yes
4109 else
4110 ac_cv_cxx_thread=no
4111 CXX="$ac_save_cxx"
4112 fi
4113 rm -fr conftest*
4114else
4115 CXX="$ac_save_cxx"
4116fi
4117fi
4118echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
4119echo "${ECHO_T}$ac_cv_cxx_thread" >&6
4120
Michael W. Hudson54241132001-12-07 15:38:26 +00004121
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004122# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00004123echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4124echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4125if test "${ac_cv_header_stdc+set}" = set; then
4126 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004127else
Martin v. Löwis11437992002-04-12 09:54:03 +00004128 cat >conftest.$ac_ext <<_ACEOF
4129#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00004130#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004131#include <stdlib.h>
4132#include <stdarg.h>
4133#include <string.h>
4134#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004135
4136_ACEOF
Martin v. Löwisf3322282003-07-13 09:46:13 +00004137if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4138 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004139 ac_status=$?
Martin v. Löwisf3322282003-07-13 09:46:13 +00004140 egrep -v '^ *\+' conftest.er1 >conftest.err
4141 rm -f conftest.er1
4142 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00004144 (exit $ac_status); } >/dev/null; then
4145 if test -s conftest.err; then
4146 ac_cpp_err=$ac_c_preproc_warn_flag
4147 else
4148 ac_cpp_err=
4149 fi
4150else
4151 ac_cpp_err=yes
4152fi
4153if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004154 ac_cv_header_stdc=yes
4155else
Martin v. Löwis11437992002-04-12 09:54:03 +00004156 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00004157 cat conftest.$ac_ext >&5
4158 ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004159fi
Martin v. Löwisf3322282003-07-13 09:46:13 +00004160rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004161
4162if test $ac_cv_header_stdc = yes; then
4163 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004164 cat >conftest.$ac_ext <<_ACEOF
4165#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00004166#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004167#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004168
4169_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004170if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Martin v. Löwisf3322282003-07-13 09:46:13 +00004171 egrep "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004172 :
4173else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004174 ac_cv_header_stdc=no
4175fi
4176rm -f conftest*
4177
4178fi
4179
4180if test $ac_cv_header_stdc = yes; then
4181 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004182 cat >conftest.$ac_ext <<_ACEOF
4183#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00004184#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004185#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004186
4187_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004188if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Martin v. Löwisf3322282003-07-13 09:46:13 +00004189 egrep "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004190 :
4191else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004192 ac_cv_header_stdc=no
4193fi
4194rm -f conftest*
4195
4196fi
4197
4198if test $ac_cv_header_stdc = yes; then
4199 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004200 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004201 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004202else
Martin v. Löwis11437992002-04-12 09:54:03 +00004203 cat >conftest.$ac_ext <<_ACEOF
4204#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00004205#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004206#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004207#if ((' ' & 0x0FF) == 0x020)
4208# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4209# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4210#else
Martin v. Löwisf3322282003-07-13 09:46:13 +00004211# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
Martin v. Löwis11437992002-04-12 09:54:03 +00004212 || ('j' <= (c) && (c) <= 'r') \
4213 || ('s' <= (c) && (c) <= 'z'))
4214# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4215#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004216
Martin v. Löwis11437992002-04-12 09:54:03 +00004217#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4218int
4219main ()
4220{
4221 int i;
4222 for (i = 0; i < 256; i++)
4223 if (XOR (islower (i), ISLOWER (i))
4224 || toupper (i) != TOUPPER (i))
4225 exit(2);
4226 exit (0);
4227}
4228_ACEOF
4229rm -f conftest$ac_exeext
4230if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4231 (eval $ac_link) 2>&5
4232 ac_status=$?
4233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4234 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4235 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4236 (eval $ac_try) 2>&5
4237 ac_status=$?
4238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4239 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004240 :
4241else
Martin v. Löwis11437992002-04-12 09:54:03 +00004242 echo "$as_me: program exited with status $ac_status" >&5
4243echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00004244cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004245( exit $ac_status )
4246ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004247fi
Martin v. Löwisf3322282003-07-13 09:46:13 +00004248rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004249fi
4250fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004251fi
4252echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4253echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004254if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004255
4256cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004257#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004258_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004259
4260fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004261
Martin v. Löwis11437992002-04-12 09:54:03 +00004262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004299
Barry Warsawfe33b792003-01-07 22:42:49 +00004300
Neal Norwitz82251032003-05-23 14:35:24 +00004301
Martin v. Löwis11437992002-04-12 09:54:03 +00004302for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004303libintl.h locale.h ncurses.h poll.h pthread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004304signal.h stdarg.h stddef.h stdlib.h stropts.h termios.h thread.h \
4305unistd.h utime.h \
Neal Norwitz82251032003-05-23 14:35:24 +00004306sys/audioio.h sys/bsdtty.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004307sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00004308sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Barry Warsawfe33b792003-01-07 22:42:49 +00004309sys/resource.h netpacket/packet.h sysexits.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004310do
Martin v. Löwis11437992002-04-12 09:54:03 +00004311as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4312if eval "test \"\${$as_ac_Header+set}\" = set"; then
4313 echo "$as_me:$LINENO: checking for $ac_header" >&5
4314echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4315if eval "test \"\${$as_ac_Header+set}\" = set"; then
4316 echo $ECHO_N "(cached) $ECHO_C" >&6
4317fi
4318echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4319echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004320else
Martin v. Löwis11437992002-04-12 09:54:03 +00004321 # Is the header compilable?
4322echo "$as_me:$LINENO: checking $ac_header usability" >&5
4323echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4324cat >conftest.$ac_ext <<_ACEOF
4325#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00004326#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004327$ac_includes_default
4328#include <$ac_header>
4329_ACEOF
4330rm -f conftest.$ac_objext
4331if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4332 (eval $ac_compile) 2>&5
4333 ac_status=$?
4334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4335 (exit $ac_status); } &&
4336 { ac_try='test -s conftest.$ac_objext'
4337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4338 (eval $ac_try) 2>&5
4339 ac_status=$?
4340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4341 (exit $ac_status); }; }; then
4342 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004343else
Martin v. Löwis11437992002-04-12 09:54:03 +00004344 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00004345cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004346ac_header_compiler=no
4347fi
4348rm -f conftest.$ac_objext conftest.$ac_ext
4349echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4350echo "${ECHO_T}$ac_header_compiler" >&6
4351
4352# Is the header present?
4353echo "$as_me:$LINENO: checking $ac_header presence" >&5
4354echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4355cat >conftest.$ac_ext <<_ACEOF
4356#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00004357#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004358#include <$ac_header>
4359_ACEOF
4360if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4361 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4362 ac_status=$?
Martin v. Löwisf3322282003-07-13 09:46:13 +00004363 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004364 rm -f conftest.er1
4365 cat conftest.err >&5
4366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4367 (exit $ac_status); } >/dev/null; then
4368 if test -s conftest.err; then
4369 ac_cpp_err=$ac_c_preproc_warn_flag
4370 else
4371 ac_cpp_err=
4372 fi
4373else
4374 ac_cpp_err=yes
4375fi
4376if test -z "$ac_cpp_err"; then
4377 ac_header_preproc=yes
4378else
4379 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00004380 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004381 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004382fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004383rm -f conftest.err conftest.$ac_ext
4384echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4385echo "${ECHO_T}$ac_header_preproc" >&6
4386
4387# So? What about this header?
4388case $ac_header_compiler:$ac_header_preproc in
4389 yes:no )
4390 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4391echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4392 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00004393echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwis11437992002-04-12 09:54:03 +00004394 no:yes )
4395 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4396echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4397 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4398echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4399 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00004400echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwis11437992002-04-12 09:54:03 +00004401esac
4402echo "$as_me:$LINENO: checking for $ac_header" >&5
4403echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4404if eval "test \"\${$as_ac_Header+set}\" = set"; then
4405 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004406else
Martin v. Löwis11437992002-04-12 09:54:03 +00004407 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004408fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004409echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4410echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4411
4412fi
4413if test `eval echo '${'$as_ac_Header'}'` = yes; then
4414 cat >>confdefs.h <<_ACEOF
4415#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4416_ACEOF
4417
4418fi
4419
Guido van Rossum627b2d71993-12-24 10:39:16 +00004420done
4421
Martin v. Löwis11437992002-04-12 09:54:03 +00004422
4423
4424
4425
4426
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004427ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004428for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4429 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4430echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4431echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4432if eval "test \"\${$as_ac_Header+set}\" = set"; then
4433 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004434else
Martin v. Löwis11437992002-04-12 09:54:03 +00004435 cat >conftest.$ac_ext <<_ACEOF
4436#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00004437#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004438#include <sys/types.h>
4439#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004440
Martin v. Löwisf3322282003-07-13 09:46:13 +00004441#ifdef F77_DUMMY_MAIN
4442# ifdef __cplusplus
4443 extern "C"
4444# endif
4445 int F77_DUMMY_MAIN() { return 1; }
4446#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004447int
4448main ()
4449{
4450if ((DIR *) 0)
4451return 0;
4452 ;
4453 return 0;
4454}
4455_ACEOF
4456rm -f conftest.$ac_objext
4457if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4458 (eval $ac_compile) 2>&5
4459 ac_status=$?
4460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4461 (exit $ac_status); } &&
4462 { ac_try='test -s conftest.$ac_objext'
4463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4464 (eval $ac_try) 2>&5
4465 ac_status=$?
4466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4467 (exit $ac_status); }; }; then
4468 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004469else
Martin v. Löwis11437992002-04-12 09:54:03 +00004470 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00004471cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004472eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004473fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004474rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004475fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004476echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4477echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4478if test `eval echo '${'$as_ac_Header'}'` = yes; then
4479 cat >>confdefs.h <<_ACEOF
4480#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4481_ACEOF
4482
4483ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004484fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004485
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004486done
4487# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4488if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004489 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4490echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4491if test "${ac_cv_search_opendir+set}" = set; then
4492 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004493else
Martin v. Löwis11437992002-04-12 09:54:03 +00004494 ac_func_search_save_LIBS=$LIBS
4495ac_cv_search_opendir=no
4496cat >conftest.$ac_ext <<_ACEOF
4497#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00004498#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004499
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004500/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004501#ifdef __cplusplus
4502extern "C"
4503#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004504/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004505 builtin and then its argument prototype would still apply. */
4506char opendir ();
Martin v. Löwisf3322282003-07-13 09:46:13 +00004507#ifdef F77_DUMMY_MAIN
4508# ifdef __cplusplus
4509 extern "C"
4510# endif
4511 int F77_DUMMY_MAIN() { return 1; }
4512#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004513int
4514main ()
4515{
4516opendir ();
4517 ;
4518 return 0;
4519}
4520_ACEOF
4521rm -f conftest.$ac_objext conftest$ac_exeext
4522if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4523 (eval $ac_link) 2>&5
4524 ac_status=$?
4525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4526 (exit $ac_status); } &&
4527 { ac_try='test -s conftest$ac_exeext'
4528 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4529 (eval $ac_try) 2>&5
4530 ac_status=$?
4531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4532 (exit $ac_status); }; }; then
4533 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004534else
Martin v. Löwis11437992002-04-12 09:54:03 +00004535 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00004536cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004537fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004538rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4539if test "$ac_cv_search_opendir" = no; then
4540 for ac_lib in dir; do
4541 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4542 cat >conftest.$ac_ext <<_ACEOF
4543#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00004544#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004545
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004546/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004547#ifdef __cplusplus
4548extern "C"
4549#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004550/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004551 builtin and then its argument prototype would still apply. */
4552char opendir ();
Martin v. Löwisf3322282003-07-13 09:46:13 +00004553#ifdef F77_DUMMY_MAIN
4554# ifdef __cplusplus
4555 extern "C"
4556# endif
4557 int F77_DUMMY_MAIN() { return 1; }
4558#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004559int
4560main ()
4561{
4562opendir ();
4563 ;
4564 return 0;
4565}
4566_ACEOF
4567rm -f conftest.$ac_objext conftest$ac_exeext
4568if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4569 (eval $ac_link) 2>&5
4570 ac_status=$?
4571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4572 (exit $ac_status); } &&
4573 { ac_try='test -s conftest$ac_exeext'
4574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4575 (eval $ac_try) 2>&5
4576 ac_status=$?
4577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4578 (exit $ac_status); }; }; then
4579 ac_cv_search_opendir="-l$ac_lib"
4580break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004581else
Martin v. Löwis11437992002-04-12 09:54:03 +00004582 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00004583cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004584fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004585rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4586 done
4587fi
4588LIBS=$ac_func_search_save_LIBS
4589fi
4590echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4591echo "${ECHO_T}$ac_cv_search_opendir" >&6
4592if test "$ac_cv_search_opendir" != no; then
4593 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004594
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004595fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004596
Michael W. Hudson54241132001-12-07 15:38:26 +00004597else
Martin v. Löwis11437992002-04-12 09:54:03 +00004598 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4599echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4600if test "${ac_cv_search_opendir+set}" = set; then
4601 echo $ECHO_N "(cached) $ECHO_C" >&6
4602else
4603 ac_func_search_save_LIBS=$LIBS
4604ac_cv_search_opendir=no
4605cat >conftest.$ac_ext <<_ACEOF
4606#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00004607#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004608
4609/* Override any gcc2 internal prototype to avoid an error. */
4610#ifdef __cplusplus
4611extern "C"
4612#endif
4613/* We use char because int might match the return type of a gcc2
4614 builtin and then its argument prototype would still apply. */
4615char opendir ();
Martin v. Löwisf3322282003-07-13 09:46:13 +00004616#ifdef F77_DUMMY_MAIN
4617# ifdef __cplusplus
4618 extern "C"
4619# endif
4620 int F77_DUMMY_MAIN() { return 1; }
4621#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004622int
4623main ()
4624{
4625opendir ();
4626 ;
4627 return 0;
4628}
4629_ACEOF
4630rm -f conftest.$ac_objext conftest$ac_exeext
4631if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4632 (eval $ac_link) 2>&5
4633 ac_status=$?
4634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4635 (exit $ac_status); } &&
4636 { ac_try='test -s conftest$ac_exeext'
4637 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4638 (eval $ac_try) 2>&5
4639 ac_status=$?
4640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4641 (exit $ac_status); }; }; then
4642 ac_cv_search_opendir="none required"
4643else
4644 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00004645cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004646fi
4647rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4648if test "$ac_cv_search_opendir" = no; then
4649 for ac_lib in x; do
4650 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4651 cat >conftest.$ac_ext <<_ACEOF
4652#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00004653#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004654
4655/* Override any gcc2 internal prototype to avoid an error. */
4656#ifdef __cplusplus
4657extern "C"
4658#endif
4659/* We use char because int might match the return type of a gcc2
4660 builtin and then its argument prototype would still apply. */
4661char opendir ();
Martin v. Löwisf3322282003-07-13 09:46:13 +00004662#ifdef F77_DUMMY_MAIN
4663# ifdef __cplusplus
4664 extern "C"
4665# endif
4666 int F77_DUMMY_MAIN() { return 1; }
4667#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004668int
4669main ()
4670{
4671opendir ();
4672 ;
4673 return 0;
4674}
4675_ACEOF
4676rm -f conftest.$ac_objext conftest$ac_exeext
4677if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4678 (eval $ac_link) 2>&5
4679 ac_status=$?
4680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4681 (exit $ac_status); } &&
4682 { ac_try='test -s conftest$ac_exeext'
4683 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4684 (eval $ac_try) 2>&5
4685 ac_status=$?
4686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4687 (exit $ac_status); }; }; then
4688 ac_cv_search_opendir="-l$ac_lib"
4689break
4690else
4691 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00004692cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004693fi
4694rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4695 done
4696fi
4697LIBS=$ac_func_search_save_LIBS
4698fi
4699echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4700echo "${ECHO_T}$ac_cv_search_opendir" >&6
4701if test "$ac_cv_search_opendir" != no; then
4702 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4703
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004704fi
4705
4706fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004707
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004708echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4709echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4710if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4711 echo $ECHO_N "(cached) $ECHO_C" >&6
4712else
4713 cat >conftest.$ac_ext <<_ACEOF
4714#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00004715#include "confdefs.h"
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004716#include <sys/types.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +00004717#ifdef F77_DUMMY_MAIN
4718# ifdef __cplusplus
4719 extern "C"
4720# endif
4721 int F77_DUMMY_MAIN() { return 1; }
4722#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004723int
4724main ()
4725{
4726return makedev(0, 0);
4727 ;
4728 return 0;
4729}
4730_ACEOF
4731rm -f conftest.$ac_objext conftest$ac_exeext
4732if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4733 (eval $ac_link) 2>&5
4734 ac_status=$?
4735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4736 (exit $ac_status); } &&
4737 { ac_try='test -s conftest$ac_exeext'
4738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4739 (eval $ac_try) 2>&5
4740 ac_status=$?
4741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4742 (exit $ac_status); }; }; then
4743 ac_cv_header_sys_types_h_makedev=yes
4744else
4745 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00004746cat conftest.$ac_ext >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004747ac_cv_header_sys_types_h_makedev=no
4748fi
4749rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4750
4751fi
4752echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4753echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4754
4755if test $ac_cv_header_sys_types_h_makedev = no; then
4756if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4757 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4758echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4759if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4760 echo $ECHO_N "(cached) $ECHO_C" >&6
4761fi
4762echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4763echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4764else
4765 # Is the header compilable?
4766echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4767echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4768cat >conftest.$ac_ext <<_ACEOF
4769#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00004770#include "confdefs.h"
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004771$ac_includes_default
4772#include <sys/mkdev.h>
4773_ACEOF
4774rm -f conftest.$ac_objext
4775if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4776 (eval $ac_compile) 2>&5
4777 ac_status=$?
4778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4779 (exit $ac_status); } &&
4780 { ac_try='test -s conftest.$ac_objext'
4781 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4782 (eval $ac_try) 2>&5
4783 ac_status=$?
4784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4785 (exit $ac_status); }; }; then
4786 ac_header_compiler=yes
4787else
4788 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00004789cat conftest.$ac_ext >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004790ac_header_compiler=no
4791fi
4792rm -f conftest.$ac_objext conftest.$ac_ext
4793echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4794echo "${ECHO_T}$ac_header_compiler" >&6
4795
4796# Is the header present?
4797echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4798echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4799cat >conftest.$ac_ext <<_ACEOF
4800#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00004801#include "confdefs.h"
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004802#include <sys/mkdev.h>
4803_ACEOF
4804if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4805 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4806 ac_status=$?
Martin v. Löwisf3322282003-07-13 09:46:13 +00004807 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004808 rm -f conftest.er1
4809 cat conftest.err >&5
4810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4811 (exit $ac_status); } >/dev/null; then
4812 if test -s conftest.err; then
4813 ac_cpp_err=$ac_c_preproc_warn_flag
4814 else
4815 ac_cpp_err=
4816 fi
4817else
4818 ac_cpp_err=yes
4819fi
4820if test -z "$ac_cpp_err"; then
4821 ac_header_preproc=yes
4822else
4823 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00004824 cat conftest.$ac_ext >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004825 ac_header_preproc=no
4826fi
4827rm -f conftest.err conftest.$ac_ext
4828echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4829echo "${ECHO_T}$ac_header_preproc" >&6
4830
4831# So? What about this header?
4832case $ac_header_compiler:$ac_header_preproc in
4833 yes:no )
4834 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4835echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4836 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00004837echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004838 no:yes )
4839 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4840echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4841 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4842echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4843 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00004844echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004845esac
4846echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4847echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4848if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4849 echo $ECHO_N "(cached) $ECHO_C" >&6
4850else
4851 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4852fi
4853echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4854echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4855
4856fi
4857if test $ac_cv_header_sys_mkdev_h = yes; then
4858
4859cat >>confdefs.h <<\_ACEOF
4860#define MAJOR_IN_MKDEV 1
4861_ACEOF
4862
4863fi
4864
4865
4866
4867 if test $ac_cv_header_sys_mkdev_h = no; then
4868 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4869 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4870echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4871if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4872 echo $ECHO_N "(cached) $ECHO_C" >&6
4873fi
4874echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4875echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4876else
4877 # Is the header compilable?
4878echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4879echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4880cat >conftest.$ac_ext <<_ACEOF
4881#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00004882#include "confdefs.h"
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004883$ac_includes_default
4884#include <sys/sysmacros.h>
4885_ACEOF
4886rm -f conftest.$ac_objext
4887if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4888 (eval $ac_compile) 2>&5
4889 ac_status=$?
4890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4891 (exit $ac_status); } &&
4892 { ac_try='test -s conftest.$ac_objext'
4893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4894 (eval $ac_try) 2>&5
4895 ac_status=$?
4896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4897 (exit $ac_status); }; }; then
4898 ac_header_compiler=yes
4899else
4900 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00004901cat conftest.$ac_ext >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004902ac_header_compiler=no
4903fi
4904rm -f conftest.$ac_objext conftest.$ac_ext
4905echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4906echo "${ECHO_T}$ac_header_compiler" >&6
4907
4908# Is the header present?
4909echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
4910echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
4911cat >conftest.$ac_ext <<_ACEOF
4912#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00004913#include "confdefs.h"
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004914#include <sys/sysmacros.h>
4915_ACEOF
4916if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4917 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4918 ac_status=$?
Martin v. Löwisf3322282003-07-13 09:46:13 +00004919 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004920 rm -f conftest.er1
4921 cat conftest.err >&5
4922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4923 (exit $ac_status); } >/dev/null; then
4924 if test -s conftest.err; then
4925 ac_cpp_err=$ac_c_preproc_warn_flag
4926 else
4927 ac_cpp_err=
4928 fi
4929else
4930 ac_cpp_err=yes
4931fi
4932if test -z "$ac_cpp_err"; then
4933 ac_header_preproc=yes
4934else
4935 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00004936 cat conftest.$ac_ext >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004937 ac_header_preproc=no
4938fi
4939rm -f conftest.err conftest.$ac_ext
4940echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4941echo "${ECHO_T}$ac_header_preproc" >&6
4942
4943# So? What about this header?
4944case $ac_header_compiler:$ac_header_preproc in
4945 yes:no )
4946 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
4947echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4948 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00004949echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004950 no:yes )
4951 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
4952echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
4953 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
4954echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
4955 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00004956echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004957esac
4958echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4959echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4960if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4961 echo $ECHO_N "(cached) $ECHO_C" >&6
4962else
4963 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
4964fi
4965echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4966echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4967
4968fi
4969if test $ac_cv_header_sys_sysmacros_h = yes; then
4970
4971cat >>confdefs.h <<\_ACEOF
4972#define MAJOR_IN_SYSMACROS 1
4973_ACEOF
4974
4975fi
4976
4977
4978 fi
4979fi
4980
Michael W. Hudson54241132001-12-07 15:38:26 +00004981
Guido van Rossum627b2d71993-12-24 10:39:16 +00004982# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004983was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004984echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4985echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4986cat >conftest.$ac_ext <<_ACEOF
4987#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00004988#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004989#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004990
4991_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004992if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Martin v. Löwisf3322282003-07-13 09:46:13 +00004993 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004994 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004995else
Martin v. Löwis11437992002-04-12 09:54:03 +00004996
4997
4998cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004999#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00005000_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005001
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005002
Guido van Rossum627b2d71993-12-24 10:39:16 +00005003fi
5004rm -f conftest*
5005
Martin v. Löwis11437992002-04-12 09:54:03 +00005006echo "$as_me:$LINENO: result: $was_it_defined" >&5
5007echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005008
Neal Norwitz11690112002-07-30 01:08:28 +00005009# Check whether using makedev requires defining _OSF_SOURCE
5010echo "$as_me:$LINENO: checking for makedev" >&5
5011echo $ECHO_N "checking for makedev... $ECHO_C" >&6
5012cat >conftest.$ac_ext <<_ACEOF
5013#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00005014#include "confdefs.h"
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005015#include <sys/types.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +00005016#ifdef F77_DUMMY_MAIN
5017# ifdef __cplusplus
5018 extern "C"
5019# endif
5020 int F77_DUMMY_MAIN() { return 1; }
5021#endif
Neal Norwitz11690112002-07-30 01:08:28 +00005022int
5023main ()
5024{
5025 makedev(0, 0)
5026 ;
5027 return 0;
5028}
5029_ACEOF
5030rm -f conftest.$ac_objext conftest$ac_exeext
5031if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5032 (eval $ac_link) 2>&5
5033 ac_status=$?
5034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5035 (exit $ac_status); } &&
5036 { ac_try='test -s conftest$ac_exeext'
5037 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5038 (eval $ac_try) 2>&5
5039 ac_status=$?
5040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5041 (exit $ac_status); }; }; then
5042 ac_cv_has_makedev=yes
5043else
5044 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00005045cat conftest.$ac_ext >&5
Neal Norwitz11690112002-07-30 01:08:28 +00005046ac_cv_has_makedev=no
5047fi
5048rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5049if test "$ac_cv_has_makedev" = "no"; then
5050 # we didn't link, try if _OSF_SOURCE will allow us to link
5051 cat >conftest.$ac_ext <<_ACEOF
5052#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00005053#include "confdefs.h"
Neal Norwitz11690112002-07-30 01:08:28 +00005054
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005055#define _OSF_SOURCE 1
5056#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005057
Martin v. Löwisf3322282003-07-13 09:46:13 +00005058#ifdef F77_DUMMY_MAIN
5059# ifdef __cplusplus
5060 extern "C"
5061# endif
5062 int F77_DUMMY_MAIN() { return 1; }
5063#endif
Neal Norwitz11690112002-07-30 01:08:28 +00005064int
5065main ()
5066{
5067 makedev(0, 0)
5068 ;
5069 return 0;
5070}
5071_ACEOF
5072rm -f conftest.$ac_objext conftest$ac_exeext
5073if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5074 (eval $ac_link) 2>&5
5075 ac_status=$?
5076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5077 (exit $ac_status); } &&
5078 { ac_try='test -s conftest$ac_exeext'
5079 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5080 (eval $ac_try) 2>&5
5081 ac_status=$?
5082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5083 (exit $ac_status); }; }; then
5084 ac_cv_has_makedev=yes
5085else
5086 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00005087cat conftest.$ac_ext >&5
Neal Norwitz11690112002-07-30 01:08:28 +00005088ac_cv_has_makedev=no
5089fi
5090rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5091 if test "$ac_cv_has_makedev" = "yes"; then
5092
5093cat >>confdefs.h <<\_ACEOF
5094#define _OSF_SOURCE 1
5095_ACEOF
5096
5097 fi
5098fi
5099echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
5100echo "${ECHO_T}$ac_cv_has_makedev" >&6
5101if test "$ac_cv_has_makedev" = "yes"; then
5102
5103cat >>confdefs.h <<\_ACEOF
5104#define HAVE_MAKEDEV 1
5105_ACEOF
5106
5107fi
5108
Martin v. Löwis399a6892002-10-04 10:22:02 +00005109# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5110# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5111# defined, but the compiler does not support pragma redefine_extname,
5112# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5113# structures (such as rlimit64) without declaring them. As a
5114# work-around, disable LFS on such configurations
5115
5116use_lfs=yes
5117echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5118echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
5119cat >conftest.$ac_ext <<_ACEOF
5120#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00005121#include "confdefs.h"
Martin v. Löwis399a6892002-10-04 10:22:02 +00005122
5123#define _LARGEFILE_SOURCE 1
5124#define _FILE_OFFSET_BITS 64
5125#include <sys/resource.h>
5126
Martin v. Löwisf3322282003-07-13 09:46:13 +00005127#ifdef F77_DUMMY_MAIN
5128# ifdef __cplusplus
5129 extern "C"
5130# endif
5131 int F77_DUMMY_MAIN() { return 1; }
5132#endif
Martin v. Löwis399a6892002-10-04 10:22:02 +00005133int
5134main ()
5135{
5136struct rlimit foo;
5137 ;
5138 return 0;
5139}
5140_ACEOF
5141rm -f conftest.$ac_objext
5142if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5143 (eval $ac_compile) 2>&5
5144 ac_status=$?
5145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5146 (exit $ac_status); } &&
5147 { ac_try='test -s conftest.$ac_objext'
5148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5149 (eval $ac_try) 2>&5
5150 ac_status=$?
5151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5152 (exit $ac_status); }; }; then
5153 sol_lfs_bug=no
5154else
5155 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00005156cat conftest.$ac_ext >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00005157sol_lfs_bug=yes
5158fi
5159rm -f conftest.$ac_objext conftest.$ac_ext
5160echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5161echo "${ECHO_T}$sol_lfs_bug" >&6
5162if test "$sol_lfs_bug" = "yes"; then
5163 use_lfs=no
5164fi
5165
5166if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005167# Two defines needed to enable largefile support on various platforms
5168# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005169
Martin v. Löwis11437992002-04-12 09:54:03 +00005170cat >>confdefs.h <<\_ACEOF
5171#define _LARGEFILE_SOURCE 1
5172_ACEOF
5173
5174
5175cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005176#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005177_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005178
Martin v. Löwis399a6892002-10-04 10:22:02 +00005179fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005180
Guido van Rossum84e7b241996-08-19 21:59:00 +00005181# Add some code to confdefs.h so that the test for off_t works on SCO
5182cat >> confdefs.h <<\EOF
5183#if defined(SCO_DS)
5184#undef _OFF_T
5185#endif
5186EOF
5187
Guido van Rossumef2255b2000-03-10 22:30:29 +00005188# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005189echo "$as_me:$LINENO: checking for mode_t" >&5
5190echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5191if test "${ac_cv_type_mode_t+set}" = set; then
5192 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005193else
Martin v. Löwis11437992002-04-12 09:54:03 +00005194 cat >conftest.$ac_ext <<_ACEOF
5195#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00005196#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005197$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00005198#ifdef F77_DUMMY_MAIN
5199# ifdef __cplusplus
5200 extern "C"
5201# endif
5202 int F77_DUMMY_MAIN() { return 1; }
5203#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005204int
5205main ()
5206{
5207if ((mode_t *) 0)
5208 return 0;
5209if (sizeof (mode_t))
5210 return 0;
5211 ;
5212 return 0;
5213}
5214_ACEOF
5215rm -f conftest.$ac_objext
5216if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5217 (eval $ac_compile) 2>&5
5218 ac_status=$?
5219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5220 (exit $ac_status); } &&
5221 { ac_try='test -s conftest.$ac_objext'
5222 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5223 (eval $ac_try) 2>&5
5224 ac_status=$?
5225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5226 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005227 ac_cv_type_mode_t=yes
5228else
Martin v. Löwis11437992002-04-12 09:54:03 +00005229 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00005230cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005231ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005232fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005233rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005234fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005235echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5236echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5237if test $ac_cv_type_mode_t = yes; then
5238 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005239else
Martin v. Löwis11437992002-04-12 09:54:03 +00005240
5241cat >>confdefs.h <<_ACEOF
5242#define mode_t int
5243_ACEOF
5244
5245fi
5246
5247echo "$as_me:$LINENO: checking for off_t" >&5
5248echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5249if test "${ac_cv_type_off_t+set}" = set; then
5250 echo $ECHO_N "(cached) $ECHO_C" >&6
5251else
5252 cat >conftest.$ac_ext <<_ACEOF
5253#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00005254#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005255$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00005256#ifdef F77_DUMMY_MAIN
5257# ifdef __cplusplus
5258 extern "C"
5259# endif
5260 int F77_DUMMY_MAIN() { return 1; }
5261#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005262int
5263main ()
5264{
5265if ((off_t *) 0)
5266 return 0;
5267if (sizeof (off_t))
5268 return 0;
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
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005285 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005286else
Martin v. Löwis11437992002-04-12 09:54:03 +00005287 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00005288cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005289ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005290fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005291rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005292fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005293echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5294echo "${ECHO_T}$ac_cv_type_off_t" >&6
5295if test $ac_cv_type_off_t = yes; then
5296 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005297else
Martin v. Löwis11437992002-04-12 09:54:03 +00005298
5299cat >>confdefs.h <<_ACEOF
5300#define off_t long
5301_ACEOF
5302
5303fi
5304
5305echo "$as_me:$LINENO: checking for pid_t" >&5
5306echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5307if test "${ac_cv_type_pid_t+set}" = set; then
5308 echo $ECHO_N "(cached) $ECHO_C" >&6
5309else
5310 cat >conftest.$ac_ext <<_ACEOF
5311#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00005312#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005313$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00005314#ifdef F77_DUMMY_MAIN
5315# ifdef __cplusplus
5316 extern "C"
5317# endif
5318 int F77_DUMMY_MAIN() { return 1; }
5319#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005320int
5321main ()
5322{
5323if ((pid_t *) 0)
5324 return 0;
5325if (sizeof (pid_t))
5326 return 0;
5327 ;
5328 return 0;
5329}
5330_ACEOF
5331rm -f conftest.$ac_objext
5332if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5333 (eval $ac_compile) 2>&5
5334 ac_status=$?
5335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5336 (exit $ac_status); } &&
5337 { ac_try='test -s conftest.$ac_objext'
5338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5339 (eval $ac_try) 2>&5
5340 ac_status=$?
5341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5342 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005343 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005344else
Martin v. Löwis11437992002-04-12 09:54:03 +00005345 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00005346cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005347ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005348fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005349rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005350fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005351echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5352echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5353if test $ac_cv_type_pid_t = yes; then
5354 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005355else
Martin v. Löwis11437992002-04-12 09:54:03 +00005356
5357cat >>confdefs.h <<_ACEOF
5358#define pid_t int
5359_ACEOF
5360
5361fi
5362
5363echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5364echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5365if test "${ac_cv_type_signal+set}" = set; then
5366 echo $ECHO_N "(cached) $ECHO_C" >&6
5367else
5368 cat >conftest.$ac_ext <<_ACEOF
5369#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00005370#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005371#include <sys/types.h>
5372#include <signal.h>
5373#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005374# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005375#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005376#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005377extern "C" void (*signal (int, void (*)(int)))(int);
5378#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005379void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005380#endif
5381
Martin v. Löwisf3322282003-07-13 09:46:13 +00005382#ifdef F77_DUMMY_MAIN
5383# ifdef __cplusplus
5384 extern "C"
5385# endif
5386 int F77_DUMMY_MAIN() { return 1; }
5387#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005388int
5389main ()
5390{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005391int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005392 ;
5393 return 0;
5394}
5395_ACEOF
5396rm -f conftest.$ac_objext
5397if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5398 (eval $ac_compile) 2>&5
5399 ac_status=$?
5400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5401 (exit $ac_status); } &&
5402 { ac_try='test -s conftest.$ac_objext'
5403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5404 (eval $ac_try) 2>&5
5405 ac_status=$?
5406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5407 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005408 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005409else
Martin v. Löwis11437992002-04-12 09:54:03 +00005410 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00005411cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005412ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005413fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005414rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005415fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005416echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5417echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005418
Martin v. Löwis11437992002-04-12 09:54:03 +00005419cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005420#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005421_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005422
Michael W. Hudson54241132001-12-07 15:38:26 +00005423
Martin v. Löwis11437992002-04-12 09:54:03 +00005424echo "$as_me:$LINENO: checking for size_t" >&5
5425echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5426if test "${ac_cv_type_size_t+set}" = set; then
5427 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005428else
Martin v. Löwis11437992002-04-12 09:54:03 +00005429 cat >conftest.$ac_ext <<_ACEOF
5430#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00005431#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005432$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00005433#ifdef F77_DUMMY_MAIN
5434# ifdef __cplusplus
5435 extern "C"
5436# endif
5437 int F77_DUMMY_MAIN() { return 1; }
5438#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005439int
5440main ()
5441{
5442if ((size_t *) 0)
5443 return 0;
5444if (sizeof (size_t))
5445 return 0;
5446 ;
5447 return 0;
5448}
5449_ACEOF
5450rm -f conftest.$ac_objext
5451if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5452 (eval $ac_compile) 2>&5
5453 ac_status=$?
5454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5455 (exit $ac_status); } &&
5456 { ac_try='test -s conftest.$ac_objext'
5457 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5458 (eval $ac_try) 2>&5
5459 ac_status=$?
5460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5461 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005462 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005463else
Martin v. Löwis11437992002-04-12 09:54:03 +00005464 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00005465cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005466ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005467fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005468rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005469fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005470echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5471echo "${ECHO_T}$ac_cv_type_size_t" >&6
5472if test $ac_cv_type_size_t = yes; then
5473 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005474else
Martin v. Löwis11437992002-04-12 09:54:03 +00005475
5476cat >>confdefs.h <<_ACEOF
5477#define size_t unsigned
5478_ACEOF
5479
5480fi
5481
5482echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5483echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5484if test "${ac_cv_type_uid_t+set}" = set; then
5485 echo $ECHO_N "(cached) $ECHO_C" >&6
5486else
5487 cat >conftest.$ac_ext <<_ACEOF
5488#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00005489#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005490#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005491
5492_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005493if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Martin v. Löwisf3322282003-07-13 09:46:13 +00005494 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005495 ac_cv_type_uid_t=yes
5496else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005497 ac_cv_type_uid_t=no
5498fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005499rm -f conftest*
5500
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005501fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005502echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5503echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005504if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005505
Martin v. Löwis11437992002-04-12 09:54:03 +00005506cat >>confdefs.h <<\_ACEOF
5507#define uid_t int
5508_ACEOF
5509
5510
5511cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005512#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005513_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005514
5515fi
5516
Jack Jansendd19cf82001-12-06 22:36:17 +00005517
Michael W. Hudson54241132001-12-07 15:38:26 +00005518# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00005519echo "$as_me:$LINENO: checking for int" >&5
5520echo $ECHO_N "checking for int... $ECHO_C" >&6
5521if test "${ac_cv_type_int+set}" = set; then
5522 echo $ECHO_N "(cached) $ECHO_C" >&6
5523else
5524 cat >conftest.$ac_ext <<_ACEOF
5525#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00005526#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005527$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00005528#ifdef F77_DUMMY_MAIN
5529# ifdef __cplusplus
5530 extern "C"
5531# endif
5532 int F77_DUMMY_MAIN() { return 1; }
5533#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005534int
5535main ()
5536{
5537if ((int *) 0)
5538 return 0;
5539if (sizeof (int))
5540 return 0;
5541 ;
5542 return 0;
5543}
5544_ACEOF
5545rm -f conftest.$ac_objext
5546if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5547 (eval $ac_compile) 2>&5
5548 ac_status=$?
5549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5550 (exit $ac_status); } &&
5551 { ac_try='test -s conftest.$ac_objext'
5552 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5553 (eval $ac_try) 2>&5
5554 ac_status=$?
5555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5556 (exit $ac_status); }; }; then
5557 ac_cv_type_int=yes
5558else
5559 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00005560cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005561ac_cv_type_int=no
5562fi
5563rm -f conftest.$ac_objext conftest.$ac_ext
5564fi
5565echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5566echo "${ECHO_T}$ac_cv_type_int" >&6
5567
5568echo "$as_me:$LINENO: checking size of int" >&5
5569echo $ECHO_N "checking size of int... $ECHO_C" >&6
5570if test "${ac_cv_sizeof_int+set}" = set; then
5571 echo $ECHO_N "(cached) $ECHO_C" >&6
5572else
5573 if test "$ac_cv_type_int" = yes; then
5574 # The cast to unsigned long works around a bug in the HP C Compiler
5575 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5576 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5577 # This bug is HP SR number 8606223364.
5578 if test "$cross_compiling" = yes; then
5579 # Depending upon the size, compute the lo and hi bounds.
5580cat >conftest.$ac_ext <<_ACEOF
5581#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00005582#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005583$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00005584#ifdef F77_DUMMY_MAIN
5585# ifdef __cplusplus
5586 extern "C"
5587# endif
5588 int F77_DUMMY_MAIN() { return 1; }
5589#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005590int
5591main ()
5592{
5593static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5594test_array [0] = 0
5595
5596 ;
5597 return 0;
5598}
5599_ACEOF
5600rm -f conftest.$ac_objext
5601if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5602 (eval $ac_compile) 2>&5
5603 ac_status=$?
5604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5605 (exit $ac_status); } &&
5606 { ac_try='test -s conftest.$ac_objext'
5607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5608 (eval $ac_try) 2>&5
5609 ac_status=$?
5610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5611 (exit $ac_status); }; }; then
5612 ac_lo=0 ac_mid=0
5613 while :; do
5614 cat >conftest.$ac_ext <<_ACEOF
5615#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00005616#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005617$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00005618#ifdef F77_DUMMY_MAIN
5619# ifdef __cplusplus
5620 extern "C"
5621# endif
5622 int F77_DUMMY_MAIN() { return 1; }
5623#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005624int
5625main ()
5626{
5627static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5628test_array [0] = 0
5629
5630 ;
5631 return 0;
5632}
5633_ACEOF
5634rm -f conftest.$ac_objext
5635if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5636 (eval $ac_compile) 2>&5
5637 ac_status=$?
5638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5639 (exit $ac_status); } &&
5640 { ac_try='test -s conftest.$ac_objext'
5641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5642 (eval $ac_try) 2>&5
5643 ac_status=$?
5644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5645 (exit $ac_status); }; }; then
5646 ac_hi=$ac_mid; break
5647else
5648 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00005649cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005650ac_lo=`expr $ac_mid + 1`
5651 if test $ac_lo -le $ac_mid; then
5652 ac_lo= ac_hi=
5653 break
5654 fi
5655 ac_mid=`expr 2 '*' $ac_mid + 1`
5656fi
5657rm -f conftest.$ac_objext conftest.$ac_ext
5658 done
5659else
5660 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00005661cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005662cat >conftest.$ac_ext <<_ACEOF
5663#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00005664#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005665$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00005666#ifdef F77_DUMMY_MAIN
5667# ifdef __cplusplus
5668 extern "C"
5669# endif
5670 int F77_DUMMY_MAIN() { return 1; }
5671#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005672int
5673main ()
5674{
5675static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5676test_array [0] = 0
5677
5678 ;
5679 return 0;
5680}
5681_ACEOF
5682rm -f conftest.$ac_objext
5683if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5684 (eval $ac_compile) 2>&5
5685 ac_status=$?
5686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5687 (exit $ac_status); } &&
5688 { ac_try='test -s conftest.$ac_objext'
5689 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5690 (eval $ac_try) 2>&5
5691 ac_status=$?
5692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5693 (exit $ac_status); }; }; then
5694 ac_hi=-1 ac_mid=-1
5695 while :; do
5696 cat >conftest.$ac_ext <<_ACEOF
5697#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00005698#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005699$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00005700#ifdef F77_DUMMY_MAIN
5701# ifdef __cplusplus
5702 extern "C"
5703# endif
5704 int F77_DUMMY_MAIN() { return 1; }
5705#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005706int
5707main ()
5708{
5709static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5710test_array [0] = 0
5711
5712 ;
5713 return 0;
5714}
5715_ACEOF
5716rm -f conftest.$ac_objext
5717if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5718 (eval $ac_compile) 2>&5
5719 ac_status=$?
5720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5721 (exit $ac_status); } &&
5722 { ac_try='test -s conftest.$ac_objext'
5723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5724 (eval $ac_try) 2>&5
5725 ac_status=$?
5726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5727 (exit $ac_status); }; }; then
5728 ac_lo=$ac_mid; break
5729else
5730 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00005731cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005732ac_hi=`expr '(' $ac_mid ')' - 1`
5733 if test $ac_mid -le $ac_hi; then
5734 ac_lo= ac_hi=
5735 break
5736 fi
5737 ac_mid=`expr 2 '*' $ac_mid`
5738fi
5739rm -f conftest.$ac_objext conftest.$ac_ext
5740 done
5741else
5742 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00005743cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005744ac_lo= ac_hi=
5745fi
5746rm -f conftest.$ac_objext conftest.$ac_ext
5747fi
5748rm -f conftest.$ac_objext conftest.$ac_ext
5749# Binary search between lo and hi bounds.
5750while test "x$ac_lo" != "x$ac_hi"; do
5751 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5752 cat >conftest.$ac_ext <<_ACEOF
5753#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00005754#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005755$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00005756#ifdef F77_DUMMY_MAIN
5757# ifdef __cplusplus
5758 extern "C"
5759# endif
5760 int F77_DUMMY_MAIN() { return 1; }
5761#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005762int
5763main ()
5764{
5765static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5766test_array [0] = 0
5767
5768 ;
5769 return 0;
5770}
5771_ACEOF
5772rm -f conftest.$ac_objext
5773if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5774 (eval $ac_compile) 2>&5
5775 ac_status=$?
5776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5777 (exit $ac_status); } &&
5778 { ac_try='test -s conftest.$ac_objext'
5779 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5780 (eval $ac_try) 2>&5
5781 ac_status=$?
5782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5783 (exit $ac_status); }; }; then
5784 ac_hi=$ac_mid
5785else
5786 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00005787cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005788ac_lo=`expr '(' $ac_mid ')' + 1`
5789fi
5790rm -f conftest.$ac_objext conftest.$ac_ext
5791done
5792case $ac_lo in
5793?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwisf3322282003-07-13 09:46:13 +00005794'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5795echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005796 { (exit 1); exit 1; }; } ;;
5797esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005798else
5799 if test "$cross_compiling" = yes; then
Martin v. Löwisf3322282003-07-13 09:46:13 +00005800 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5801echo "$as_me: error: cannot run test program while cross compiling" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005802 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005803else
Martin v. Löwis11437992002-04-12 09:54:03 +00005804 cat >conftest.$ac_ext <<_ACEOF
5805#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00005806#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005807$ac_includes_default
5808long longval () { return (long) (sizeof (int)); }
5809unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005810#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005811#include <stdlib.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +00005812#ifdef F77_DUMMY_MAIN
5813# ifdef __cplusplus
5814 extern "C"
5815# endif
5816 int F77_DUMMY_MAIN() { return 1; }
5817#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005818int
5819main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005820{
Martin v. Löwis11437992002-04-12 09:54:03 +00005821
5822 FILE *f = fopen ("conftest.val", "w");
5823 if (! f)
5824 exit (1);
5825 if (((long) (sizeof (int))) < 0)
5826 {
5827 long i = longval ();
5828 if (i != ((long) (sizeof (int))))
5829 exit (1);
5830 fprintf (f, "%ld\n", i);
5831 }
5832 else
5833 {
5834 unsigned long i = ulongval ();
5835 if (i != ((long) (sizeof (int))))
5836 exit (1);
5837 fprintf (f, "%lu\n", i);
5838 }
5839 exit (ferror (f) || fclose (f) != 0);
5840
5841 ;
5842 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005843}
Martin v. Löwis11437992002-04-12 09:54:03 +00005844_ACEOF
5845rm -f conftest$ac_exeext
5846if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5847 (eval $ac_link) 2>&5
5848 ac_status=$?
5849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5850 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5852 (eval $ac_try) 2>&5
5853 ac_status=$?
5854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5855 (exit $ac_status); }; }; then
5856 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005857else
Martin v. Löwis11437992002-04-12 09:54:03 +00005858 echo "$as_me: program exited with status $ac_status" >&5
5859echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00005860cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005861( exit $ac_status )
Martin v. Löwisf3322282003-07-13 09:46:13 +00005862{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5863echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005864 { (exit 1); exit 1; }; }
5865fi
Martin v. Löwisf3322282003-07-13 09:46:13 +00005866rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005867fi
5868fi
5869rm -f conftest.val
5870else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005871 ac_cv_sizeof_int=0
5872fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005873fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005874echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5875echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5876cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005877#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005878_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005879
5880
Martin v. Löwis11437992002-04-12 09:54:03 +00005881echo "$as_me:$LINENO: checking for long" >&5
5882echo $ECHO_N "checking for long... $ECHO_C" >&6
5883if test "${ac_cv_type_long+set}" = set; then
5884 echo $ECHO_N "(cached) $ECHO_C" >&6
5885else
5886 cat >conftest.$ac_ext <<_ACEOF
5887#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00005888#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005889$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00005890#ifdef F77_DUMMY_MAIN
5891# ifdef __cplusplus
5892 extern "C"
5893# endif
5894 int F77_DUMMY_MAIN() { return 1; }
5895#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005896int
5897main ()
5898{
5899if ((long *) 0)
5900 return 0;
5901if (sizeof (long))
5902 return 0;
5903 ;
5904 return 0;
5905}
5906_ACEOF
5907rm -f conftest.$ac_objext
5908if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5909 (eval $ac_compile) 2>&5
5910 ac_status=$?
5911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5912 (exit $ac_status); } &&
5913 { ac_try='test -s conftest.$ac_objext'
5914 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5915 (eval $ac_try) 2>&5
5916 ac_status=$?
5917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5918 (exit $ac_status); }; }; then
5919 ac_cv_type_long=yes
5920else
5921 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00005922cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005923ac_cv_type_long=no
5924fi
5925rm -f conftest.$ac_objext conftest.$ac_ext
5926fi
5927echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5928echo "${ECHO_T}$ac_cv_type_long" >&6
5929
5930echo "$as_me:$LINENO: checking size of long" >&5
5931echo $ECHO_N "checking size of long... $ECHO_C" >&6
5932if test "${ac_cv_sizeof_long+set}" = set; then
5933 echo $ECHO_N "(cached) $ECHO_C" >&6
5934else
5935 if test "$ac_cv_type_long" = yes; then
5936 # The cast to unsigned long works around a bug in the HP C Compiler
5937 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5938 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5939 # This bug is HP SR number 8606223364.
5940 if test "$cross_compiling" = yes; then
5941 # Depending upon the size, compute the lo and hi bounds.
5942cat >conftest.$ac_ext <<_ACEOF
5943#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00005944#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005945$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00005946#ifdef F77_DUMMY_MAIN
5947# ifdef __cplusplus
5948 extern "C"
5949# endif
5950 int F77_DUMMY_MAIN() { return 1; }
5951#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005952int
5953main ()
5954{
5955static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5956test_array [0] = 0
5957
5958 ;
5959 return 0;
5960}
5961_ACEOF
5962rm -f conftest.$ac_objext
5963if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5964 (eval $ac_compile) 2>&5
5965 ac_status=$?
5966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5967 (exit $ac_status); } &&
5968 { ac_try='test -s conftest.$ac_objext'
5969 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5970 (eval $ac_try) 2>&5
5971 ac_status=$?
5972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5973 (exit $ac_status); }; }; then
5974 ac_lo=0 ac_mid=0
5975 while :; do
5976 cat >conftest.$ac_ext <<_ACEOF
5977#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00005978#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005979$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00005980#ifdef F77_DUMMY_MAIN
5981# ifdef __cplusplus
5982 extern "C"
5983# endif
5984 int F77_DUMMY_MAIN() { return 1; }
5985#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005986int
5987main ()
5988{
5989static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5990test_array [0] = 0
5991
5992 ;
5993 return 0;
5994}
5995_ACEOF
5996rm -f conftest.$ac_objext
5997if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5998 (eval $ac_compile) 2>&5
5999 ac_status=$?
6000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6001 (exit $ac_status); } &&
6002 { ac_try='test -s conftest.$ac_objext'
6003 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6004 (eval $ac_try) 2>&5
6005 ac_status=$?
6006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6007 (exit $ac_status); }; }; then
6008 ac_hi=$ac_mid; break
6009else
6010 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00006011cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006012ac_lo=`expr $ac_mid + 1`
6013 if test $ac_lo -le $ac_mid; then
6014 ac_lo= ac_hi=
6015 break
6016 fi
6017 ac_mid=`expr 2 '*' $ac_mid + 1`
6018fi
6019rm -f conftest.$ac_objext conftest.$ac_ext
6020 done
6021else
6022 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00006023cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006024cat >conftest.$ac_ext <<_ACEOF
6025#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00006026#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006027$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00006028#ifdef F77_DUMMY_MAIN
6029# ifdef __cplusplus
6030 extern "C"
6031# endif
6032 int F77_DUMMY_MAIN() { return 1; }
6033#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006034int
6035main ()
6036{
6037static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
6038test_array [0] = 0
6039
6040 ;
6041 return 0;
6042}
6043_ACEOF
6044rm -f conftest.$ac_objext
6045if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6046 (eval $ac_compile) 2>&5
6047 ac_status=$?
6048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6049 (exit $ac_status); } &&
6050 { ac_try='test -s conftest.$ac_objext'
6051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6052 (eval $ac_try) 2>&5
6053 ac_status=$?
6054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6055 (exit $ac_status); }; }; then
6056 ac_hi=-1 ac_mid=-1
6057 while :; do
6058 cat >conftest.$ac_ext <<_ACEOF
6059#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00006060#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006061$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00006062#ifdef F77_DUMMY_MAIN
6063# ifdef __cplusplus
6064 extern "C"
6065# endif
6066 int F77_DUMMY_MAIN() { return 1; }
6067#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006068int
6069main ()
6070{
6071static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
6072test_array [0] = 0
6073
6074 ;
6075 return 0;
6076}
6077_ACEOF
6078rm -f conftest.$ac_objext
6079if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6080 (eval $ac_compile) 2>&5
6081 ac_status=$?
6082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6083 (exit $ac_status); } &&
6084 { ac_try='test -s conftest.$ac_objext'
6085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6086 (eval $ac_try) 2>&5
6087 ac_status=$?
6088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6089 (exit $ac_status); }; }; then
6090 ac_lo=$ac_mid; break
6091else
6092 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00006093cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006094ac_hi=`expr '(' $ac_mid ')' - 1`
6095 if test $ac_mid -le $ac_hi; then
6096 ac_lo= ac_hi=
6097 break
6098 fi
6099 ac_mid=`expr 2 '*' $ac_mid`
6100fi
6101rm -f conftest.$ac_objext conftest.$ac_ext
6102 done
6103else
6104 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00006105cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006106ac_lo= ac_hi=
6107fi
6108rm -f conftest.$ac_objext conftest.$ac_ext
6109fi
6110rm -f conftest.$ac_objext conftest.$ac_ext
6111# Binary search between lo and hi bounds.
6112while test "x$ac_lo" != "x$ac_hi"; do
6113 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6114 cat >conftest.$ac_ext <<_ACEOF
6115#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00006116#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006117$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00006118#ifdef F77_DUMMY_MAIN
6119# ifdef __cplusplus
6120 extern "C"
6121# endif
6122 int F77_DUMMY_MAIN() { return 1; }
6123#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006124int
6125main ()
6126{
6127static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6128test_array [0] = 0
6129
6130 ;
6131 return 0;
6132}
6133_ACEOF
6134rm -f conftest.$ac_objext
6135if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6136 (eval $ac_compile) 2>&5
6137 ac_status=$?
6138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6139 (exit $ac_status); } &&
6140 { ac_try='test -s conftest.$ac_objext'
6141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6142 (eval $ac_try) 2>&5
6143 ac_status=$?
6144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6145 (exit $ac_status); }; }; then
6146 ac_hi=$ac_mid
6147else
6148 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00006149cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006150ac_lo=`expr '(' $ac_mid ')' + 1`
6151fi
6152rm -f conftest.$ac_objext conftest.$ac_ext
6153done
6154case $ac_lo in
6155?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwisf3322282003-07-13 09:46:13 +00006156'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
6157echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006158 { (exit 1); exit 1; }; } ;;
6159esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006160else
6161 if test "$cross_compiling" = yes; then
Martin v. Löwisf3322282003-07-13 09:46:13 +00006162 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6163echo "$as_me: error: cannot run test program while cross compiling" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006164 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006165else
Martin v. Löwis11437992002-04-12 09:54:03 +00006166 cat >conftest.$ac_ext <<_ACEOF
6167#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00006168#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006169$ac_includes_default
6170long longval () { return (long) (sizeof (long)); }
6171unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006172#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006173#include <stdlib.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +00006174#ifdef F77_DUMMY_MAIN
6175# ifdef __cplusplus
6176 extern "C"
6177# endif
6178 int F77_DUMMY_MAIN() { return 1; }
6179#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006180int
6181main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006182{
Martin v. Löwis11437992002-04-12 09:54:03 +00006183
6184 FILE *f = fopen ("conftest.val", "w");
6185 if (! f)
6186 exit (1);
6187 if (((long) (sizeof (long))) < 0)
6188 {
6189 long i = longval ();
6190 if (i != ((long) (sizeof (long))))
6191 exit (1);
6192 fprintf (f, "%ld\n", i);
6193 }
6194 else
6195 {
6196 unsigned long i = ulongval ();
6197 if (i != ((long) (sizeof (long))))
6198 exit (1);
6199 fprintf (f, "%lu\n", i);
6200 }
6201 exit (ferror (f) || fclose (f) != 0);
6202
6203 ;
6204 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006205}
Martin v. Löwis11437992002-04-12 09:54:03 +00006206_ACEOF
6207rm -f conftest$ac_exeext
6208if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6209 (eval $ac_link) 2>&5
6210 ac_status=$?
6211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6212 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6213 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6214 (eval $ac_try) 2>&5
6215 ac_status=$?
6216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6217 (exit $ac_status); }; }; then
6218 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006219else
Martin v. Löwis11437992002-04-12 09:54:03 +00006220 echo "$as_me: program exited with status $ac_status" >&5
6221echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00006222cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006223( exit $ac_status )
Martin v. Löwisf3322282003-07-13 09:46:13 +00006224{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
6225echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006226 { (exit 1); exit 1; }; }
6227fi
Martin v. Löwisf3322282003-07-13 09:46:13 +00006228rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006229fi
6230fi
6231rm -f conftest.val
6232else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006233 ac_cv_sizeof_long=0
6234fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006235fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006236echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6237echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6238cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006239#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006240_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006241
6242
Martin v. Löwis11437992002-04-12 09:54:03 +00006243echo "$as_me:$LINENO: checking for void *" >&5
6244echo $ECHO_N "checking for void *... $ECHO_C" >&6
6245if test "${ac_cv_type_void_p+set}" = set; then
6246 echo $ECHO_N "(cached) $ECHO_C" >&6
6247else
6248 cat >conftest.$ac_ext <<_ACEOF
6249#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00006250#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006251$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00006252#ifdef F77_DUMMY_MAIN
6253# ifdef __cplusplus
6254 extern "C"
6255# endif
6256 int F77_DUMMY_MAIN() { return 1; }
6257#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006258int
6259main ()
6260{
6261if ((void * *) 0)
6262 return 0;
6263if (sizeof (void *))
6264 return 0;
6265 ;
6266 return 0;
6267}
6268_ACEOF
6269rm -f conftest.$ac_objext
6270if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6271 (eval $ac_compile) 2>&5
6272 ac_status=$?
6273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6274 (exit $ac_status); } &&
6275 { ac_try='test -s conftest.$ac_objext'
6276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6277 (eval $ac_try) 2>&5
6278 ac_status=$?
6279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6280 (exit $ac_status); }; }; then
6281 ac_cv_type_void_p=yes
6282else
6283 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00006284cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006285ac_cv_type_void_p=no
6286fi
6287rm -f conftest.$ac_objext conftest.$ac_ext
6288fi
6289echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
6290echo "${ECHO_T}$ac_cv_type_void_p" >&6
6291
6292echo "$as_me:$LINENO: checking size of void *" >&5
6293echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6294if test "${ac_cv_sizeof_void_p+set}" = set; then
6295 echo $ECHO_N "(cached) $ECHO_C" >&6
6296else
6297 if test "$ac_cv_type_void_p" = yes; then
6298 # The cast to unsigned long works around a bug in the HP C Compiler
6299 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6300 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6301 # This bug is HP SR number 8606223364.
6302 if test "$cross_compiling" = yes; then
6303 # Depending upon the size, compute the lo and hi bounds.
6304cat >conftest.$ac_ext <<_ACEOF
6305#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00006306#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006307$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00006308#ifdef F77_DUMMY_MAIN
6309# ifdef __cplusplus
6310 extern "C"
6311# endif
6312 int F77_DUMMY_MAIN() { return 1; }
6313#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006314int
6315main ()
6316{
6317static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
6318test_array [0] = 0
6319
6320 ;
6321 return 0;
6322}
6323_ACEOF
6324rm -f conftest.$ac_objext
6325if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6326 (eval $ac_compile) 2>&5
6327 ac_status=$?
6328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6329 (exit $ac_status); } &&
6330 { ac_try='test -s conftest.$ac_objext'
6331 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6332 (eval $ac_try) 2>&5
6333 ac_status=$?
6334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6335 (exit $ac_status); }; }; then
6336 ac_lo=0 ac_mid=0
6337 while :; do
6338 cat >conftest.$ac_ext <<_ACEOF
6339#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00006340#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006341$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00006342#ifdef F77_DUMMY_MAIN
6343# ifdef __cplusplus
6344 extern "C"
6345# endif
6346 int F77_DUMMY_MAIN() { return 1; }
6347#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006348int
6349main ()
6350{
6351static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6352test_array [0] = 0
6353
6354 ;
6355 return 0;
6356}
6357_ACEOF
6358rm -f conftest.$ac_objext
6359if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6360 (eval $ac_compile) 2>&5
6361 ac_status=$?
6362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6363 (exit $ac_status); } &&
6364 { ac_try='test -s conftest.$ac_objext'
6365 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6366 (eval $ac_try) 2>&5
6367 ac_status=$?
6368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6369 (exit $ac_status); }; }; then
6370 ac_hi=$ac_mid; break
6371else
6372 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00006373cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006374ac_lo=`expr $ac_mid + 1`
6375 if test $ac_lo -le $ac_mid; then
6376 ac_lo= ac_hi=
6377 break
6378 fi
6379 ac_mid=`expr 2 '*' $ac_mid + 1`
6380fi
6381rm -f conftest.$ac_objext conftest.$ac_ext
6382 done
6383else
6384 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00006385cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006386cat >conftest.$ac_ext <<_ACEOF
6387#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00006388#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006389$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00006390#ifdef F77_DUMMY_MAIN
6391# ifdef __cplusplus
6392 extern "C"
6393# endif
6394 int F77_DUMMY_MAIN() { return 1; }
6395#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006396int
6397main ()
6398{
6399static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6400test_array [0] = 0
6401
6402 ;
6403 return 0;
6404}
6405_ACEOF
6406rm -f conftest.$ac_objext
6407if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6408 (eval $ac_compile) 2>&5
6409 ac_status=$?
6410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6411 (exit $ac_status); } &&
6412 { ac_try='test -s conftest.$ac_objext'
6413 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6414 (eval $ac_try) 2>&5
6415 ac_status=$?
6416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6417 (exit $ac_status); }; }; then
6418 ac_hi=-1 ac_mid=-1
6419 while :; do
6420 cat >conftest.$ac_ext <<_ACEOF
6421#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00006422#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006423$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00006424#ifdef F77_DUMMY_MAIN
6425# ifdef __cplusplus
6426 extern "C"
6427# endif
6428 int F77_DUMMY_MAIN() { return 1; }
6429#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006430int
6431main ()
6432{
6433static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6434test_array [0] = 0
6435
6436 ;
6437 return 0;
6438}
6439_ACEOF
6440rm -f conftest.$ac_objext
6441if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6442 (eval $ac_compile) 2>&5
6443 ac_status=$?
6444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6445 (exit $ac_status); } &&
6446 { ac_try='test -s conftest.$ac_objext'
6447 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6448 (eval $ac_try) 2>&5
6449 ac_status=$?
6450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6451 (exit $ac_status); }; }; then
6452 ac_lo=$ac_mid; break
6453else
6454 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00006455cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006456ac_hi=`expr '(' $ac_mid ')' - 1`
6457 if test $ac_mid -le $ac_hi; then
6458 ac_lo= ac_hi=
6459 break
6460 fi
6461 ac_mid=`expr 2 '*' $ac_mid`
6462fi
6463rm -f conftest.$ac_objext conftest.$ac_ext
6464 done
6465else
6466 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00006467cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006468ac_lo= ac_hi=
6469fi
6470rm -f conftest.$ac_objext conftest.$ac_ext
6471fi
6472rm -f conftest.$ac_objext conftest.$ac_ext
6473# Binary search between lo and hi bounds.
6474while test "x$ac_lo" != "x$ac_hi"; do
6475 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6476 cat >conftest.$ac_ext <<_ACEOF
6477#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00006478#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006479$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00006480#ifdef F77_DUMMY_MAIN
6481# ifdef __cplusplus
6482 extern "C"
6483# endif
6484 int F77_DUMMY_MAIN() { return 1; }
6485#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006486int
6487main ()
6488{
6489static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6490test_array [0] = 0
6491
6492 ;
6493 return 0;
6494}
6495_ACEOF
6496rm -f conftest.$ac_objext
6497if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6498 (eval $ac_compile) 2>&5
6499 ac_status=$?
6500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6501 (exit $ac_status); } &&
6502 { ac_try='test -s conftest.$ac_objext'
6503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6504 (eval $ac_try) 2>&5
6505 ac_status=$?
6506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6507 (exit $ac_status); }; }; then
6508 ac_hi=$ac_mid
6509else
6510 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00006511cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006512ac_lo=`expr '(' $ac_mid ')' + 1`
6513fi
6514rm -f conftest.$ac_objext conftest.$ac_ext
6515done
6516case $ac_lo in
6517?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwisf3322282003-07-13 09:46:13 +00006518'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6519echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006520 { (exit 1); exit 1; }; } ;;
6521esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006522else
6523 if test "$cross_compiling" = yes; then
Martin v. Löwisf3322282003-07-13 09:46:13 +00006524 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6525echo "$as_me: error: cannot run test program while cross compiling" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006526 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006527else
Martin v. Löwis11437992002-04-12 09:54:03 +00006528 cat >conftest.$ac_ext <<_ACEOF
6529#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00006530#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006531$ac_includes_default
6532long longval () { return (long) (sizeof (void *)); }
6533unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006534#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006535#include <stdlib.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +00006536#ifdef F77_DUMMY_MAIN
6537# ifdef __cplusplus
6538 extern "C"
6539# endif
6540 int F77_DUMMY_MAIN() { return 1; }
6541#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006542int
6543main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006544{
Martin v. Löwis11437992002-04-12 09:54:03 +00006545
6546 FILE *f = fopen ("conftest.val", "w");
6547 if (! f)
6548 exit (1);
6549 if (((long) (sizeof (void *))) < 0)
6550 {
6551 long i = longval ();
6552 if (i != ((long) (sizeof (void *))))
6553 exit (1);
6554 fprintf (f, "%ld\n", i);
6555 }
6556 else
6557 {
6558 unsigned long i = ulongval ();
6559 if (i != ((long) (sizeof (void *))))
6560 exit (1);
6561 fprintf (f, "%lu\n", i);
6562 }
6563 exit (ferror (f) || fclose (f) != 0);
6564
6565 ;
6566 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006567}
Martin v. Löwis11437992002-04-12 09:54:03 +00006568_ACEOF
6569rm -f conftest$ac_exeext
6570if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6571 (eval $ac_link) 2>&5
6572 ac_status=$?
6573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6574 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6576 (eval $ac_try) 2>&5
6577 ac_status=$?
6578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6579 (exit $ac_status); }; }; then
6580 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006581else
Martin v. Löwis11437992002-04-12 09:54:03 +00006582 echo "$as_me: program exited with status $ac_status" >&5
6583echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00006584cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006585( exit $ac_status )
Martin v. Löwisf3322282003-07-13 09:46:13 +00006586{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6587echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006588 { (exit 1); exit 1; }; }
6589fi
Martin v. Löwisf3322282003-07-13 09:46:13 +00006590rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006591fi
6592fi
6593rm -f conftest.val
6594else
Guido van Rossumad678af1998-10-02 14:42:15 +00006595 ac_cv_sizeof_void_p=0
6596fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006597fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006598echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6599echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6600cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006601#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006602_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006603
6604
Martin v. Löwis11437992002-04-12 09:54:03 +00006605echo "$as_me:$LINENO: checking for char" >&5
6606echo $ECHO_N "checking for char... $ECHO_C" >&6
6607if test "${ac_cv_type_char+set}" = set; then
6608 echo $ECHO_N "(cached) $ECHO_C" >&6
6609else
6610 cat >conftest.$ac_ext <<_ACEOF
6611#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00006612#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006613$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00006614#ifdef F77_DUMMY_MAIN
6615# ifdef __cplusplus
6616 extern "C"
6617# endif
6618 int F77_DUMMY_MAIN() { return 1; }
6619#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006620int
6621main ()
6622{
6623if ((char *) 0)
6624 return 0;
6625if (sizeof (char))
6626 return 0;
6627 ;
6628 return 0;
6629}
6630_ACEOF
6631rm -f conftest.$ac_objext
6632if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6633 (eval $ac_compile) 2>&5
6634 ac_status=$?
6635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6636 (exit $ac_status); } &&
6637 { ac_try='test -s conftest.$ac_objext'
6638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6639 (eval $ac_try) 2>&5
6640 ac_status=$?
6641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6642 (exit $ac_status); }; }; then
6643 ac_cv_type_char=yes
6644else
6645 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00006646cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006647ac_cv_type_char=no
6648fi
6649rm -f conftest.$ac_objext conftest.$ac_ext
6650fi
6651echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
6652echo "${ECHO_T}$ac_cv_type_char" >&6
6653
6654echo "$as_me:$LINENO: checking size of char" >&5
6655echo $ECHO_N "checking size of char... $ECHO_C" >&6
6656if test "${ac_cv_sizeof_char+set}" = set; then
6657 echo $ECHO_N "(cached) $ECHO_C" >&6
6658else
6659 if test "$ac_cv_type_char" = yes; then
6660 # The cast to unsigned long works around a bug in the HP C Compiler
6661 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6662 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6663 # This bug is HP SR number 8606223364.
6664 if test "$cross_compiling" = yes; then
6665 # Depending upon the size, compute the lo and hi bounds.
6666cat >conftest.$ac_ext <<_ACEOF
6667#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00006668#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006669$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00006670#ifdef F77_DUMMY_MAIN
6671# ifdef __cplusplus
6672 extern "C"
6673# endif
6674 int F77_DUMMY_MAIN() { return 1; }
6675#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006676int
6677main ()
6678{
6679static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
6680test_array [0] = 0
6681
6682 ;
6683 return 0;
6684}
6685_ACEOF
6686rm -f conftest.$ac_objext
6687if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6688 (eval $ac_compile) 2>&5
6689 ac_status=$?
6690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6691 (exit $ac_status); } &&
6692 { ac_try='test -s conftest.$ac_objext'
6693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6694 (eval $ac_try) 2>&5
6695 ac_status=$?
6696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6697 (exit $ac_status); }; }; then
6698 ac_lo=0 ac_mid=0
6699 while :; do
6700 cat >conftest.$ac_ext <<_ACEOF
6701#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00006702#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006703$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00006704#ifdef F77_DUMMY_MAIN
6705# ifdef __cplusplus
6706 extern "C"
6707# endif
6708 int F77_DUMMY_MAIN() { return 1; }
6709#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006710int
6711main ()
6712{
6713static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6714test_array [0] = 0
6715
6716 ;
6717 return 0;
6718}
6719_ACEOF
6720rm -f conftest.$ac_objext
6721if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6722 (eval $ac_compile) 2>&5
6723 ac_status=$?
6724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6725 (exit $ac_status); } &&
6726 { ac_try='test -s conftest.$ac_objext'
6727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6728 (eval $ac_try) 2>&5
6729 ac_status=$?
6730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6731 (exit $ac_status); }; }; then
6732 ac_hi=$ac_mid; break
6733else
6734 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00006735cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006736ac_lo=`expr $ac_mid + 1`
6737 if test $ac_lo -le $ac_mid; then
6738 ac_lo= ac_hi=
6739 break
6740 fi
6741 ac_mid=`expr 2 '*' $ac_mid + 1`
6742fi
6743rm -f conftest.$ac_objext conftest.$ac_ext
6744 done
6745else
6746 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00006747cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006748cat >conftest.$ac_ext <<_ACEOF
6749#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00006750#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006751$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00006752#ifdef F77_DUMMY_MAIN
6753# ifdef __cplusplus
6754 extern "C"
6755# endif
6756 int F77_DUMMY_MAIN() { return 1; }
6757#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006758int
6759main ()
6760{
6761static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
6762test_array [0] = 0
6763
6764 ;
6765 return 0;
6766}
6767_ACEOF
6768rm -f conftest.$ac_objext
6769if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6770 (eval $ac_compile) 2>&5
6771 ac_status=$?
6772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6773 (exit $ac_status); } &&
6774 { ac_try='test -s conftest.$ac_objext'
6775 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6776 (eval $ac_try) 2>&5
6777 ac_status=$?
6778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6779 (exit $ac_status); }; }; then
6780 ac_hi=-1 ac_mid=-1
6781 while :; do
6782 cat >conftest.$ac_ext <<_ACEOF
6783#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00006784#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006785$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00006786#ifdef F77_DUMMY_MAIN
6787# ifdef __cplusplus
6788 extern "C"
6789# endif
6790 int F77_DUMMY_MAIN() { return 1; }
6791#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006792int
6793main ()
6794{
6795static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
6796test_array [0] = 0
6797
6798 ;
6799 return 0;
6800}
6801_ACEOF
6802rm -f conftest.$ac_objext
6803if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6804 (eval $ac_compile) 2>&5
6805 ac_status=$?
6806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6807 (exit $ac_status); } &&
6808 { ac_try='test -s conftest.$ac_objext'
6809 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6810 (eval $ac_try) 2>&5
6811 ac_status=$?
6812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6813 (exit $ac_status); }; }; then
6814 ac_lo=$ac_mid; break
6815else
6816 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00006817cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006818ac_hi=`expr '(' $ac_mid ')' - 1`
6819 if test $ac_mid -le $ac_hi; then
6820 ac_lo= ac_hi=
6821 break
6822 fi
6823 ac_mid=`expr 2 '*' $ac_mid`
6824fi
6825rm -f conftest.$ac_objext conftest.$ac_ext
6826 done
6827else
6828 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00006829cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006830ac_lo= ac_hi=
6831fi
6832rm -f conftest.$ac_objext conftest.$ac_ext
6833fi
6834rm -f conftest.$ac_objext conftest.$ac_ext
6835# Binary search between lo and hi bounds.
6836while test "x$ac_lo" != "x$ac_hi"; do
6837 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6838 cat >conftest.$ac_ext <<_ACEOF
6839#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00006840#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006841$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00006842#ifdef F77_DUMMY_MAIN
6843# ifdef __cplusplus
6844 extern "C"
6845# endif
6846 int F77_DUMMY_MAIN() { return 1; }
6847#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006848int
6849main ()
6850{
6851static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6852test_array [0] = 0
6853
6854 ;
6855 return 0;
6856}
6857_ACEOF
6858rm -f conftest.$ac_objext
6859if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6860 (eval $ac_compile) 2>&5
6861 ac_status=$?
6862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6863 (exit $ac_status); } &&
6864 { ac_try='test -s conftest.$ac_objext'
6865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6866 (eval $ac_try) 2>&5
6867 ac_status=$?
6868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6869 (exit $ac_status); }; }; then
6870 ac_hi=$ac_mid
6871else
6872 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00006873cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006874ac_lo=`expr '(' $ac_mid ')' + 1`
6875fi
6876rm -f conftest.$ac_objext conftest.$ac_ext
6877done
6878case $ac_lo in
6879?*) ac_cv_sizeof_char=$ac_lo;;
Martin v. Löwisf3322282003-07-13 09:46:13 +00006880'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6881echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006882 { (exit 1); exit 1; }; } ;;
6883esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006884else
6885 if test "$cross_compiling" = yes; then
Martin v. Löwisf3322282003-07-13 09:46:13 +00006886 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6887echo "$as_me: error: cannot run test program while cross compiling" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006888 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006889else
Martin v. Löwis11437992002-04-12 09:54:03 +00006890 cat >conftest.$ac_ext <<_ACEOF
6891#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00006892#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006893$ac_includes_default
6894long longval () { return (long) (sizeof (char)); }
6895unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006896#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006897#include <stdlib.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +00006898#ifdef F77_DUMMY_MAIN
6899# ifdef __cplusplus
6900 extern "C"
6901# endif
6902 int F77_DUMMY_MAIN() { return 1; }
6903#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006904int
6905main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006906{
Martin v. Löwis11437992002-04-12 09:54:03 +00006907
6908 FILE *f = fopen ("conftest.val", "w");
6909 if (! f)
6910 exit (1);
6911 if (((long) (sizeof (char))) < 0)
6912 {
6913 long i = longval ();
6914 if (i != ((long) (sizeof (char))))
6915 exit (1);
6916 fprintf (f, "%ld\n", i);
6917 }
6918 else
6919 {
6920 unsigned long i = ulongval ();
6921 if (i != ((long) (sizeof (char))))
6922 exit (1);
6923 fprintf (f, "%lu\n", i);
6924 }
6925 exit (ferror (f) || fclose (f) != 0);
6926
6927 ;
6928 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006929}
Martin v. Löwis11437992002-04-12 09:54:03 +00006930_ACEOF
6931rm -f conftest$ac_exeext
6932if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6933 (eval $ac_link) 2>&5
6934 ac_status=$?
6935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6936 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6937 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6938 (eval $ac_try) 2>&5
6939 ac_status=$?
6940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6941 (exit $ac_status); }; }; then
6942 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006943else
Martin v. Löwis11437992002-04-12 09:54:03 +00006944 echo "$as_me: program exited with status $ac_status" >&5
6945echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00006946cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006947( exit $ac_status )
Martin v. Löwisf3322282003-07-13 09:46:13 +00006948{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6949echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006950 { (exit 1); exit 1; }; }
6951fi
Martin v. Löwisf3322282003-07-13 09:46:13 +00006952rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006953fi
6954fi
6955rm -f conftest.val
6956else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006957 ac_cv_sizeof_char=0
6958fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006959fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006960echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6961echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6962cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006963#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006964_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006965
6966
Martin v. Löwis11437992002-04-12 09:54:03 +00006967echo "$as_me:$LINENO: checking for short" >&5
6968echo $ECHO_N "checking for short... $ECHO_C" >&6
6969if test "${ac_cv_type_short+set}" = set; then
6970 echo $ECHO_N "(cached) $ECHO_C" >&6
6971else
6972 cat >conftest.$ac_ext <<_ACEOF
6973#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00006974#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006975$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00006976#ifdef F77_DUMMY_MAIN
6977# ifdef __cplusplus
6978 extern "C"
6979# endif
6980 int F77_DUMMY_MAIN() { return 1; }
6981#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006982int
6983main ()
6984{
6985if ((short *) 0)
6986 return 0;
6987if (sizeof (short))
6988 return 0;
6989 ;
6990 return 0;
6991}
6992_ACEOF
6993rm -f conftest.$ac_objext
6994if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6995 (eval $ac_compile) 2>&5
6996 ac_status=$?
6997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6998 (exit $ac_status); } &&
6999 { ac_try='test -s conftest.$ac_objext'
7000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7001 (eval $ac_try) 2>&5
7002 ac_status=$?
7003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7004 (exit $ac_status); }; }; then
7005 ac_cv_type_short=yes
7006else
7007 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00007008cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007009ac_cv_type_short=no
7010fi
7011rm -f conftest.$ac_objext conftest.$ac_ext
7012fi
7013echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
7014echo "${ECHO_T}$ac_cv_type_short" >&6
7015
7016echo "$as_me:$LINENO: checking size of short" >&5
7017echo $ECHO_N "checking size of short... $ECHO_C" >&6
7018if test "${ac_cv_sizeof_short+set}" = set; then
7019 echo $ECHO_N "(cached) $ECHO_C" >&6
7020else
7021 if test "$ac_cv_type_short" = yes; then
7022 # The cast to unsigned long works around a bug in the HP C Compiler
7023 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7024 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7025 # This bug is HP SR number 8606223364.
7026 if test "$cross_compiling" = yes; then
7027 # Depending upon the size, compute the lo and hi bounds.
7028cat >conftest.$ac_ext <<_ACEOF
7029#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00007030#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007031$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00007032#ifdef F77_DUMMY_MAIN
7033# ifdef __cplusplus
7034 extern "C"
7035# endif
7036 int F77_DUMMY_MAIN() { return 1; }
7037#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007038int
7039main ()
7040{
7041static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
7042test_array [0] = 0
7043
7044 ;
7045 return 0;
7046}
7047_ACEOF
7048rm -f conftest.$ac_objext
7049if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7050 (eval $ac_compile) 2>&5
7051 ac_status=$?
7052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7053 (exit $ac_status); } &&
7054 { ac_try='test -s conftest.$ac_objext'
7055 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7056 (eval $ac_try) 2>&5
7057 ac_status=$?
7058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7059 (exit $ac_status); }; }; then
7060 ac_lo=0 ac_mid=0
7061 while :; do
7062 cat >conftest.$ac_ext <<_ACEOF
7063#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00007064#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007065$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00007066#ifdef F77_DUMMY_MAIN
7067# ifdef __cplusplus
7068 extern "C"
7069# endif
7070 int F77_DUMMY_MAIN() { return 1; }
7071#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007072int
7073main ()
7074{
7075static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7076test_array [0] = 0
7077
7078 ;
7079 return 0;
7080}
7081_ACEOF
7082rm -f conftest.$ac_objext
7083if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7084 (eval $ac_compile) 2>&5
7085 ac_status=$?
7086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7087 (exit $ac_status); } &&
7088 { ac_try='test -s conftest.$ac_objext'
7089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7090 (eval $ac_try) 2>&5
7091 ac_status=$?
7092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7093 (exit $ac_status); }; }; then
7094 ac_hi=$ac_mid; break
7095else
7096 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00007097cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007098ac_lo=`expr $ac_mid + 1`
7099 if test $ac_lo -le $ac_mid; then
7100 ac_lo= ac_hi=
7101 break
7102 fi
7103 ac_mid=`expr 2 '*' $ac_mid + 1`
7104fi
7105rm -f conftest.$ac_objext conftest.$ac_ext
7106 done
7107else
7108 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00007109cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007110cat >conftest.$ac_ext <<_ACEOF
7111#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00007112#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007113$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00007114#ifdef F77_DUMMY_MAIN
7115# ifdef __cplusplus
7116 extern "C"
7117# endif
7118 int F77_DUMMY_MAIN() { return 1; }
7119#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007120int
7121main ()
7122{
7123static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
7124test_array [0] = 0
7125
7126 ;
7127 return 0;
7128}
7129_ACEOF
7130rm -f conftest.$ac_objext
7131if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7132 (eval $ac_compile) 2>&5
7133 ac_status=$?
7134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7135 (exit $ac_status); } &&
7136 { ac_try='test -s conftest.$ac_objext'
7137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7138 (eval $ac_try) 2>&5
7139 ac_status=$?
7140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7141 (exit $ac_status); }; }; then
7142 ac_hi=-1 ac_mid=-1
7143 while :; do
7144 cat >conftest.$ac_ext <<_ACEOF
7145#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00007146#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007147$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00007148#ifdef F77_DUMMY_MAIN
7149# ifdef __cplusplus
7150 extern "C"
7151# endif
7152 int F77_DUMMY_MAIN() { return 1; }
7153#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007154int
7155main ()
7156{
7157static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
7158test_array [0] = 0
7159
7160 ;
7161 return 0;
7162}
7163_ACEOF
7164rm -f conftest.$ac_objext
7165if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7166 (eval $ac_compile) 2>&5
7167 ac_status=$?
7168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7169 (exit $ac_status); } &&
7170 { ac_try='test -s conftest.$ac_objext'
7171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7172 (eval $ac_try) 2>&5
7173 ac_status=$?
7174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7175 (exit $ac_status); }; }; then
7176 ac_lo=$ac_mid; break
7177else
7178 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00007179cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007180ac_hi=`expr '(' $ac_mid ')' - 1`
7181 if test $ac_mid -le $ac_hi; then
7182 ac_lo= ac_hi=
7183 break
7184 fi
7185 ac_mid=`expr 2 '*' $ac_mid`
7186fi
7187rm -f conftest.$ac_objext conftest.$ac_ext
7188 done
7189else
7190 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00007191cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007192ac_lo= ac_hi=
7193fi
7194rm -f conftest.$ac_objext conftest.$ac_ext
7195fi
7196rm -f conftest.$ac_objext conftest.$ac_ext
7197# Binary search between lo and hi bounds.
7198while test "x$ac_lo" != "x$ac_hi"; do
7199 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7200 cat >conftest.$ac_ext <<_ACEOF
7201#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00007202#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007203$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00007204#ifdef F77_DUMMY_MAIN
7205# ifdef __cplusplus
7206 extern "C"
7207# endif
7208 int F77_DUMMY_MAIN() { return 1; }
7209#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007210int
7211main ()
7212{
7213static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7214test_array [0] = 0
7215
7216 ;
7217 return 0;
7218}
7219_ACEOF
7220rm -f conftest.$ac_objext
7221if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7222 (eval $ac_compile) 2>&5
7223 ac_status=$?
7224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7225 (exit $ac_status); } &&
7226 { ac_try='test -s conftest.$ac_objext'
7227 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7228 (eval $ac_try) 2>&5
7229 ac_status=$?
7230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7231 (exit $ac_status); }; }; then
7232 ac_hi=$ac_mid
7233else
7234 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00007235cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007236ac_lo=`expr '(' $ac_mid ')' + 1`
7237fi
7238rm -f conftest.$ac_objext conftest.$ac_ext
7239done
7240case $ac_lo in
7241?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwisf3322282003-07-13 09:46:13 +00007242'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
7243echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007244 { (exit 1); exit 1; }; } ;;
7245esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007246else
7247 if test "$cross_compiling" = yes; then
Martin v. Löwisf3322282003-07-13 09:46:13 +00007248 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7249echo "$as_me: error: cannot run test program while cross compiling" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007250 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007251else
Martin v. Löwis11437992002-04-12 09:54:03 +00007252 cat >conftest.$ac_ext <<_ACEOF
7253#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00007254#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007255$ac_includes_default
7256long longval () { return (long) (sizeof (short)); }
7257unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007258#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007259#include <stdlib.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +00007260#ifdef F77_DUMMY_MAIN
7261# ifdef __cplusplus
7262 extern "C"
7263# endif
7264 int F77_DUMMY_MAIN() { return 1; }
7265#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007266int
7267main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007268{
Martin v. Löwis11437992002-04-12 09:54:03 +00007269
7270 FILE *f = fopen ("conftest.val", "w");
7271 if (! f)
7272 exit (1);
7273 if (((long) (sizeof (short))) < 0)
7274 {
7275 long i = longval ();
7276 if (i != ((long) (sizeof (short))))
7277 exit (1);
7278 fprintf (f, "%ld\n", i);
7279 }
7280 else
7281 {
7282 unsigned long i = ulongval ();
7283 if (i != ((long) (sizeof (short))))
7284 exit (1);
7285 fprintf (f, "%lu\n", i);
7286 }
7287 exit (ferror (f) || fclose (f) != 0);
7288
7289 ;
7290 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007291}
Martin v. Löwis11437992002-04-12 09:54:03 +00007292_ACEOF
7293rm -f conftest$ac_exeext
7294if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7295 (eval $ac_link) 2>&5
7296 ac_status=$?
7297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7298 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7299 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7300 (eval $ac_try) 2>&5
7301 ac_status=$?
7302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7303 (exit $ac_status); }; }; then
7304 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007305else
Martin v. Löwis11437992002-04-12 09:54:03 +00007306 echo "$as_me: program exited with status $ac_status" >&5
7307echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00007308cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007309( exit $ac_status )
Martin v. Löwisf3322282003-07-13 09:46:13 +00007310{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
7311echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007312 { (exit 1); exit 1; }; }
7313fi
Martin v. Löwisf3322282003-07-13 09:46:13 +00007314rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007315fi
7316fi
7317rm -f conftest.val
7318else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007319 ac_cv_sizeof_short=0
7320fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007321fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007322echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7323echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7324cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007325#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007326_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007327
7328
Martin v. Löwis11437992002-04-12 09:54:03 +00007329echo "$as_me:$LINENO: checking for float" >&5
7330echo $ECHO_N "checking for float... $ECHO_C" >&6
7331if test "${ac_cv_type_float+set}" = set; then
7332 echo $ECHO_N "(cached) $ECHO_C" >&6
7333else
7334 cat >conftest.$ac_ext <<_ACEOF
7335#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00007336#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007337$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00007338#ifdef F77_DUMMY_MAIN
7339# ifdef __cplusplus
7340 extern "C"
7341# endif
7342 int F77_DUMMY_MAIN() { return 1; }
7343#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007344int
7345main ()
7346{
7347if ((float *) 0)
7348 return 0;
7349if (sizeof (float))
7350 return 0;
7351 ;
7352 return 0;
7353}
7354_ACEOF
7355rm -f conftest.$ac_objext
7356if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7357 (eval $ac_compile) 2>&5
7358 ac_status=$?
7359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7360 (exit $ac_status); } &&
7361 { ac_try='test -s conftest.$ac_objext'
7362 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7363 (eval $ac_try) 2>&5
7364 ac_status=$?
7365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7366 (exit $ac_status); }; }; then
7367 ac_cv_type_float=yes
7368else
7369 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00007370cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007371ac_cv_type_float=no
7372fi
7373rm -f conftest.$ac_objext conftest.$ac_ext
7374fi
7375echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7376echo "${ECHO_T}$ac_cv_type_float" >&6
7377
7378echo "$as_me:$LINENO: checking size of float" >&5
7379echo $ECHO_N "checking size of float... $ECHO_C" >&6
7380if test "${ac_cv_sizeof_float+set}" = set; then
7381 echo $ECHO_N "(cached) $ECHO_C" >&6
7382else
7383 if test "$ac_cv_type_float" = yes; then
7384 # The cast to unsigned long works around a bug in the HP C Compiler
7385 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7386 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7387 # This bug is HP SR number 8606223364.
7388 if test "$cross_compiling" = yes; then
7389 # Depending upon the size, compute the lo and hi bounds.
7390cat >conftest.$ac_ext <<_ACEOF
7391#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00007392#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007393$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00007394#ifdef F77_DUMMY_MAIN
7395# ifdef __cplusplus
7396 extern "C"
7397# endif
7398 int F77_DUMMY_MAIN() { return 1; }
7399#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007400int
7401main ()
7402{
7403static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7404test_array [0] = 0
7405
7406 ;
7407 return 0;
7408}
7409_ACEOF
7410rm -f conftest.$ac_objext
7411if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7412 (eval $ac_compile) 2>&5
7413 ac_status=$?
7414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7415 (exit $ac_status); } &&
7416 { ac_try='test -s conftest.$ac_objext'
7417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7418 (eval $ac_try) 2>&5
7419 ac_status=$?
7420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7421 (exit $ac_status); }; }; then
7422 ac_lo=0 ac_mid=0
7423 while :; do
7424 cat >conftest.$ac_ext <<_ACEOF
7425#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00007426#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007427$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00007428#ifdef F77_DUMMY_MAIN
7429# ifdef __cplusplus
7430 extern "C"
7431# endif
7432 int F77_DUMMY_MAIN() { return 1; }
7433#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007434int
7435main ()
7436{
7437static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7438test_array [0] = 0
7439
7440 ;
7441 return 0;
7442}
7443_ACEOF
7444rm -f conftest.$ac_objext
7445if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7446 (eval $ac_compile) 2>&5
7447 ac_status=$?
7448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7449 (exit $ac_status); } &&
7450 { ac_try='test -s conftest.$ac_objext'
7451 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7452 (eval $ac_try) 2>&5
7453 ac_status=$?
7454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7455 (exit $ac_status); }; }; then
7456 ac_hi=$ac_mid; break
7457else
7458 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00007459cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007460ac_lo=`expr $ac_mid + 1`
7461 if test $ac_lo -le $ac_mid; then
7462 ac_lo= ac_hi=
7463 break
7464 fi
7465 ac_mid=`expr 2 '*' $ac_mid + 1`
7466fi
7467rm -f conftest.$ac_objext conftest.$ac_ext
7468 done
7469else
7470 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00007471cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007472cat >conftest.$ac_ext <<_ACEOF
7473#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00007474#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007475$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00007476#ifdef F77_DUMMY_MAIN
7477# ifdef __cplusplus
7478 extern "C"
7479# endif
7480 int F77_DUMMY_MAIN() { return 1; }
7481#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007482int
7483main ()
7484{
7485static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7486test_array [0] = 0
7487
7488 ;
7489 return 0;
7490}
7491_ACEOF
7492rm -f conftest.$ac_objext
7493if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7494 (eval $ac_compile) 2>&5
7495 ac_status=$?
7496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7497 (exit $ac_status); } &&
7498 { ac_try='test -s conftest.$ac_objext'
7499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7500 (eval $ac_try) 2>&5
7501 ac_status=$?
7502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7503 (exit $ac_status); }; }; then
7504 ac_hi=-1 ac_mid=-1
7505 while :; do
7506 cat >conftest.$ac_ext <<_ACEOF
7507#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00007508#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007509$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00007510#ifdef F77_DUMMY_MAIN
7511# ifdef __cplusplus
7512 extern "C"
7513# endif
7514 int F77_DUMMY_MAIN() { return 1; }
7515#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007516int
7517main ()
7518{
7519static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7520test_array [0] = 0
7521
7522 ;
7523 return 0;
7524}
7525_ACEOF
7526rm -f conftest.$ac_objext
7527if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7528 (eval $ac_compile) 2>&5
7529 ac_status=$?
7530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7531 (exit $ac_status); } &&
7532 { ac_try='test -s conftest.$ac_objext'
7533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7534 (eval $ac_try) 2>&5
7535 ac_status=$?
7536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7537 (exit $ac_status); }; }; then
7538 ac_lo=$ac_mid; break
7539else
7540 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00007541cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007542ac_hi=`expr '(' $ac_mid ')' - 1`
7543 if test $ac_mid -le $ac_hi; then
7544 ac_lo= ac_hi=
7545 break
7546 fi
7547 ac_mid=`expr 2 '*' $ac_mid`
7548fi
7549rm -f conftest.$ac_objext conftest.$ac_ext
7550 done
7551else
7552 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00007553cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007554ac_lo= ac_hi=
7555fi
7556rm -f conftest.$ac_objext conftest.$ac_ext
7557fi
7558rm -f conftest.$ac_objext conftest.$ac_ext
7559# Binary search between lo and hi bounds.
7560while test "x$ac_lo" != "x$ac_hi"; do
7561 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7562 cat >conftest.$ac_ext <<_ACEOF
7563#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00007564#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007565$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00007566#ifdef F77_DUMMY_MAIN
7567# ifdef __cplusplus
7568 extern "C"
7569# endif
7570 int F77_DUMMY_MAIN() { return 1; }
7571#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007572int
7573main ()
7574{
7575static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7576test_array [0] = 0
7577
7578 ;
7579 return 0;
7580}
7581_ACEOF
7582rm -f conftest.$ac_objext
7583if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7584 (eval $ac_compile) 2>&5
7585 ac_status=$?
7586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7587 (exit $ac_status); } &&
7588 { ac_try='test -s conftest.$ac_objext'
7589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7590 (eval $ac_try) 2>&5
7591 ac_status=$?
7592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7593 (exit $ac_status); }; }; then
7594 ac_hi=$ac_mid
7595else
7596 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00007597cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007598ac_lo=`expr '(' $ac_mid ')' + 1`
7599fi
7600rm -f conftest.$ac_objext conftest.$ac_ext
7601done
7602case $ac_lo in
7603?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwisf3322282003-07-13 09:46:13 +00007604'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7605echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007606 { (exit 1); exit 1; }; } ;;
7607esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007608else
7609 if test "$cross_compiling" = yes; then
Martin v. Löwisf3322282003-07-13 09:46:13 +00007610 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7611echo "$as_me: error: cannot run test program while cross compiling" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007612 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007613else
Martin v. Löwis11437992002-04-12 09:54:03 +00007614 cat >conftest.$ac_ext <<_ACEOF
7615#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00007616#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007617$ac_includes_default
7618long longval () { return (long) (sizeof (float)); }
7619unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007620#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007621#include <stdlib.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +00007622#ifdef F77_DUMMY_MAIN
7623# ifdef __cplusplus
7624 extern "C"
7625# endif
7626 int F77_DUMMY_MAIN() { return 1; }
7627#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007628int
7629main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007630{
Martin v. Löwis11437992002-04-12 09:54:03 +00007631
7632 FILE *f = fopen ("conftest.val", "w");
7633 if (! f)
7634 exit (1);
7635 if (((long) (sizeof (float))) < 0)
7636 {
7637 long i = longval ();
7638 if (i != ((long) (sizeof (float))))
7639 exit (1);
7640 fprintf (f, "%ld\n", i);
7641 }
7642 else
7643 {
7644 unsigned long i = ulongval ();
7645 if (i != ((long) (sizeof (float))))
7646 exit (1);
7647 fprintf (f, "%lu\n", i);
7648 }
7649 exit (ferror (f) || fclose (f) != 0);
7650
7651 ;
7652 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007653}
Martin v. Löwis11437992002-04-12 09:54:03 +00007654_ACEOF
7655rm -f conftest$ac_exeext
7656if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7657 (eval $ac_link) 2>&5
7658 ac_status=$?
7659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7660 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7661 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7662 (eval $ac_try) 2>&5
7663 ac_status=$?
7664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7665 (exit $ac_status); }; }; then
7666 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007667else
Martin v. Löwis11437992002-04-12 09:54:03 +00007668 echo "$as_me: program exited with status $ac_status" >&5
7669echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00007670cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007671( exit $ac_status )
Martin v. Löwisf3322282003-07-13 09:46:13 +00007672{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7673echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007674 { (exit 1); exit 1; }; }
7675fi
Martin v. Löwisf3322282003-07-13 09:46:13 +00007676rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007677fi
7678fi
7679rm -f conftest.val
7680else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007681 ac_cv_sizeof_float=0
7682fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007683fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007684echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7685echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7686cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007687#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007688_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007689
7690
Martin v. Löwis11437992002-04-12 09:54:03 +00007691echo "$as_me:$LINENO: checking for double" >&5
7692echo $ECHO_N "checking for double... $ECHO_C" >&6
7693if test "${ac_cv_type_double+set}" = set; then
7694 echo $ECHO_N "(cached) $ECHO_C" >&6
7695else
7696 cat >conftest.$ac_ext <<_ACEOF
7697#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00007698#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007699$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00007700#ifdef F77_DUMMY_MAIN
7701# ifdef __cplusplus
7702 extern "C"
7703# endif
7704 int F77_DUMMY_MAIN() { return 1; }
7705#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007706int
7707main ()
7708{
7709if ((double *) 0)
7710 return 0;
7711if (sizeof (double))
7712 return 0;
7713 ;
7714 return 0;
7715}
7716_ACEOF
7717rm -f conftest.$ac_objext
7718if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7719 (eval $ac_compile) 2>&5
7720 ac_status=$?
7721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7722 (exit $ac_status); } &&
7723 { ac_try='test -s conftest.$ac_objext'
7724 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7725 (eval $ac_try) 2>&5
7726 ac_status=$?
7727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7728 (exit $ac_status); }; }; then
7729 ac_cv_type_double=yes
7730else
7731 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00007732cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007733ac_cv_type_double=no
7734fi
7735rm -f conftest.$ac_objext conftest.$ac_ext
7736fi
7737echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7738echo "${ECHO_T}$ac_cv_type_double" >&6
7739
7740echo "$as_me:$LINENO: checking size of double" >&5
7741echo $ECHO_N "checking size of double... $ECHO_C" >&6
7742if test "${ac_cv_sizeof_double+set}" = set; then
7743 echo $ECHO_N "(cached) $ECHO_C" >&6
7744else
7745 if test "$ac_cv_type_double" = yes; then
7746 # The cast to unsigned long works around a bug in the HP C Compiler
7747 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7748 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7749 # This bug is HP SR number 8606223364.
7750 if test "$cross_compiling" = yes; then
7751 # Depending upon the size, compute the lo and hi bounds.
7752cat >conftest.$ac_ext <<_ACEOF
7753#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00007754#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007755$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00007756#ifdef F77_DUMMY_MAIN
7757# ifdef __cplusplus
7758 extern "C"
7759# endif
7760 int F77_DUMMY_MAIN() { return 1; }
7761#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007762int
7763main ()
7764{
7765static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7766test_array [0] = 0
7767
7768 ;
7769 return 0;
7770}
7771_ACEOF
7772rm -f conftest.$ac_objext
7773if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7774 (eval $ac_compile) 2>&5
7775 ac_status=$?
7776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7777 (exit $ac_status); } &&
7778 { ac_try='test -s conftest.$ac_objext'
7779 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7780 (eval $ac_try) 2>&5
7781 ac_status=$?
7782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7783 (exit $ac_status); }; }; then
7784 ac_lo=0 ac_mid=0
7785 while :; do
7786 cat >conftest.$ac_ext <<_ACEOF
7787#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00007788#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007789$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00007790#ifdef F77_DUMMY_MAIN
7791# ifdef __cplusplus
7792 extern "C"
7793# endif
7794 int F77_DUMMY_MAIN() { return 1; }
7795#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007796int
7797main ()
7798{
7799static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7800test_array [0] = 0
7801
7802 ;
7803 return 0;
7804}
7805_ACEOF
7806rm -f conftest.$ac_objext
7807if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7808 (eval $ac_compile) 2>&5
7809 ac_status=$?
7810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7811 (exit $ac_status); } &&
7812 { ac_try='test -s conftest.$ac_objext'
7813 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7814 (eval $ac_try) 2>&5
7815 ac_status=$?
7816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7817 (exit $ac_status); }; }; then
7818 ac_hi=$ac_mid; break
7819else
7820 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00007821cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007822ac_lo=`expr $ac_mid + 1`
7823 if test $ac_lo -le $ac_mid; then
7824 ac_lo= ac_hi=
7825 break
7826 fi
7827 ac_mid=`expr 2 '*' $ac_mid + 1`
7828fi
7829rm -f conftest.$ac_objext conftest.$ac_ext
7830 done
7831else
7832 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00007833cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007834cat >conftest.$ac_ext <<_ACEOF
7835#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00007836#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007837$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00007838#ifdef F77_DUMMY_MAIN
7839# ifdef __cplusplus
7840 extern "C"
7841# endif
7842 int F77_DUMMY_MAIN() { return 1; }
7843#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007844int
7845main ()
7846{
7847static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7848test_array [0] = 0
7849
7850 ;
7851 return 0;
7852}
7853_ACEOF
7854rm -f conftest.$ac_objext
7855if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7856 (eval $ac_compile) 2>&5
7857 ac_status=$?
7858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7859 (exit $ac_status); } &&
7860 { ac_try='test -s conftest.$ac_objext'
7861 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7862 (eval $ac_try) 2>&5
7863 ac_status=$?
7864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7865 (exit $ac_status); }; }; then
7866 ac_hi=-1 ac_mid=-1
7867 while :; do
7868 cat >conftest.$ac_ext <<_ACEOF
7869#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00007870#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007871$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00007872#ifdef F77_DUMMY_MAIN
7873# ifdef __cplusplus
7874 extern "C"
7875# endif
7876 int F77_DUMMY_MAIN() { return 1; }
7877#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007878int
7879main ()
7880{
7881static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7882test_array [0] = 0
7883
7884 ;
7885 return 0;
7886}
7887_ACEOF
7888rm -f conftest.$ac_objext
7889if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7890 (eval $ac_compile) 2>&5
7891 ac_status=$?
7892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7893 (exit $ac_status); } &&
7894 { ac_try='test -s conftest.$ac_objext'
7895 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7896 (eval $ac_try) 2>&5
7897 ac_status=$?
7898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7899 (exit $ac_status); }; }; then
7900 ac_lo=$ac_mid; break
7901else
7902 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00007903cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007904ac_hi=`expr '(' $ac_mid ')' - 1`
7905 if test $ac_mid -le $ac_hi; then
7906 ac_lo= ac_hi=
7907 break
7908 fi
7909 ac_mid=`expr 2 '*' $ac_mid`
7910fi
7911rm -f conftest.$ac_objext conftest.$ac_ext
7912 done
7913else
7914 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00007915cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007916ac_lo= ac_hi=
7917fi
7918rm -f conftest.$ac_objext conftest.$ac_ext
7919fi
7920rm -f conftest.$ac_objext conftest.$ac_ext
7921# Binary search between lo and hi bounds.
7922while test "x$ac_lo" != "x$ac_hi"; do
7923 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7924 cat >conftest.$ac_ext <<_ACEOF
7925#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00007926#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007927$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00007928#ifdef F77_DUMMY_MAIN
7929# ifdef __cplusplus
7930 extern "C"
7931# endif
7932 int F77_DUMMY_MAIN() { return 1; }
7933#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007934int
7935main ()
7936{
7937static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7938test_array [0] = 0
7939
7940 ;
7941 return 0;
7942}
7943_ACEOF
7944rm -f conftest.$ac_objext
7945if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7946 (eval $ac_compile) 2>&5
7947 ac_status=$?
7948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7949 (exit $ac_status); } &&
7950 { ac_try='test -s conftest.$ac_objext'
7951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7952 (eval $ac_try) 2>&5
7953 ac_status=$?
7954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7955 (exit $ac_status); }; }; then
7956 ac_hi=$ac_mid
7957else
7958 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00007959cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007960ac_lo=`expr '(' $ac_mid ')' + 1`
7961fi
7962rm -f conftest.$ac_objext conftest.$ac_ext
7963done
7964case $ac_lo in
7965?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwisf3322282003-07-13 09:46:13 +00007966'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7967echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007968 { (exit 1); exit 1; }; } ;;
7969esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007970else
7971 if test "$cross_compiling" = yes; then
Martin v. Löwisf3322282003-07-13 09:46:13 +00007972 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7973echo "$as_me: error: cannot run test program while cross compiling" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007974 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007975else
Martin v. Löwis11437992002-04-12 09:54:03 +00007976 cat >conftest.$ac_ext <<_ACEOF
7977#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00007978#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007979$ac_includes_default
7980long longval () { return (long) (sizeof (double)); }
7981unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007982#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007983#include <stdlib.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +00007984#ifdef F77_DUMMY_MAIN
7985# ifdef __cplusplus
7986 extern "C"
7987# endif
7988 int F77_DUMMY_MAIN() { return 1; }
7989#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007990int
7991main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007992{
Martin v. Löwis11437992002-04-12 09:54:03 +00007993
7994 FILE *f = fopen ("conftest.val", "w");
7995 if (! f)
7996 exit (1);
7997 if (((long) (sizeof (double))) < 0)
7998 {
7999 long i = longval ();
8000 if (i != ((long) (sizeof (double))))
8001 exit (1);
8002 fprintf (f, "%ld\n", i);
8003 }
8004 else
8005 {
8006 unsigned long i = ulongval ();
8007 if (i != ((long) (sizeof (double))))
8008 exit (1);
8009 fprintf (f, "%lu\n", i);
8010 }
8011 exit (ferror (f) || fclose (f) != 0);
8012
8013 ;
8014 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008015}
Martin v. Löwis11437992002-04-12 09:54:03 +00008016_ACEOF
8017rm -f conftest$ac_exeext
8018if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8019 (eval $ac_link) 2>&5
8020 ac_status=$?
8021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8022 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8024 (eval $ac_try) 2>&5
8025 ac_status=$?
8026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8027 (exit $ac_status); }; }; then
8028 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008029else
Martin v. Löwis11437992002-04-12 09:54:03 +00008030 echo "$as_me: program exited with status $ac_status" >&5
8031echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00008032cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008033( exit $ac_status )
Martin v. Löwisf3322282003-07-13 09:46:13 +00008034{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
8035echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008036 { (exit 1); exit 1; }; }
8037fi
Martin v. Löwisf3322282003-07-13 09:46:13 +00008038rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008039fi
8040fi
8041rm -f conftest.val
8042else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008043 ac_cv_sizeof_double=0
8044fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008045fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008046echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
8047echo "${ECHO_T}$ac_cv_sizeof_double" >&6
8048cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008049#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008050_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008051
8052
Martin v. Löwis11437992002-04-12 09:54:03 +00008053echo "$as_me:$LINENO: checking for fpos_t" >&5
8054echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
8055if test "${ac_cv_type_fpos_t+set}" = set; then
8056 echo $ECHO_N "(cached) $ECHO_C" >&6
8057else
8058 cat >conftest.$ac_ext <<_ACEOF
8059#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00008060#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008061$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00008062#ifdef F77_DUMMY_MAIN
8063# ifdef __cplusplus
8064 extern "C"
8065# endif
8066 int F77_DUMMY_MAIN() { return 1; }
8067#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008068int
8069main ()
8070{
8071if ((fpos_t *) 0)
8072 return 0;
8073if (sizeof (fpos_t))
8074 return 0;
8075 ;
8076 return 0;
8077}
8078_ACEOF
8079rm -f conftest.$ac_objext
8080if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8081 (eval $ac_compile) 2>&5
8082 ac_status=$?
8083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8084 (exit $ac_status); } &&
8085 { ac_try='test -s conftest.$ac_objext'
8086 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8087 (eval $ac_try) 2>&5
8088 ac_status=$?
8089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8090 (exit $ac_status); }; }; then
8091 ac_cv_type_fpos_t=yes
8092else
8093 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00008094cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008095ac_cv_type_fpos_t=no
8096fi
8097rm -f conftest.$ac_objext conftest.$ac_ext
8098fi
8099echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
8100echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
8101
8102echo "$as_me:$LINENO: checking size of fpos_t" >&5
8103echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
8104if test "${ac_cv_sizeof_fpos_t+set}" = set; then
8105 echo $ECHO_N "(cached) $ECHO_C" >&6
8106else
8107 if test "$ac_cv_type_fpos_t" = yes; then
8108 # The cast to unsigned long works around a bug in the HP C Compiler
8109 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8110 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8111 # This bug is HP SR number 8606223364.
8112 if test "$cross_compiling" = yes; then
8113 # Depending upon the size, compute the lo and hi bounds.
8114cat >conftest.$ac_ext <<_ACEOF
8115#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00008116#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008117$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00008118#ifdef F77_DUMMY_MAIN
8119# ifdef __cplusplus
8120 extern "C"
8121# endif
8122 int F77_DUMMY_MAIN() { return 1; }
8123#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008124int
8125main ()
8126{
8127static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
8128test_array [0] = 0
8129
8130 ;
8131 return 0;
8132}
8133_ACEOF
8134rm -f conftest.$ac_objext
8135if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8136 (eval $ac_compile) 2>&5
8137 ac_status=$?
8138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8139 (exit $ac_status); } &&
8140 { ac_try='test -s conftest.$ac_objext'
8141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8142 (eval $ac_try) 2>&5
8143 ac_status=$?
8144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8145 (exit $ac_status); }; }; then
8146 ac_lo=0 ac_mid=0
8147 while :; do
8148 cat >conftest.$ac_ext <<_ACEOF
8149#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00008150#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008151$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00008152#ifdef F77_DUMMY_MAIN
8153# ifdef __cplusplus
8154 extern "C"
8155# endif
8156 int F77_DUMMY_MAIN() { return 1; }
8157#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008158int
8159main ()
8160{
8161static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8162test_array [0] = 0
8163
8164 ;
8165 return 0;
8166}
8167_ACEOF
8168rm -f conftest.$ac_objext
8169if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8170 (eval $ac_compile) 2>&5
8171 ac_status=$?
8172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8173 (exit $ac_status); } &&
8174 { ac_try='test -s conftest.$ac_objext'
8175 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8176 (eval $ac_try) 2>&5
8177 ac_status=$?
8178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8179 (exit $ac_status); }; }; then
8180 ac_hi=$ac_mid; break
8181else
8182 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00008183cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008184ac_lo=`expr $ac_mid + 1`
8185 if test $ac_lo -le $ac_mid; then
8186 ac_lo= ac_hi=
8187 break
8188 fi
8189 ac_mid=`expr 2 '*' $ac_mid + 1`
8190fi
8191rm -f conftest.$ac_objext conftest.$ac_ext
8192 done
8193else
8194 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00008195cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008196cat >conftest.$ac_ext <<_ACEOF
8197#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00008198#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008199$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00008200#ifdef F77_DUMMY_MAIN
8201# ifdef __cplusplus
8202 extern "C"
8203# endif
8204 int F77_DUMMY_MAIN() { return 1; }
8205#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008206int
8207main ()
8208{
8209static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
8210test_array [0] = 0
8211
8212 ;
8213 return 0;
8214}
8215_ACEOF
8216rm -f conftest.$ac_objext
8217if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8218 (eval $ac_compile) 2>&5
8219 ac_status=$?
8220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8221 (exit $ac_status); } &&
8222 { ac_try='test -s conftest.$ac_objext'
8223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8224 (eval $ac_try) 2>&5
8225 ac_status=$?
8226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8227 (exit $ac_status); }; }; then
8228 ac_hi=-1 ac_mid=-1
8229 while :; do
8230 cat >conftest.$ac_ext <<_ACEOF
8231#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00008232#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008233$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00008234#ifdef F77_DUMMY_MAIN
8235# ifdef __cplusplus
8236 extern "C"
8237# endif
8238 int F77_DUMMY_MAIN() { return 1; }
8239#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008240int
8241main ()
8242{
8243static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8244test_array [0] = 0
8245
8246 ;
8247 return 0;
8248}
8249_ACEOF
8250rm -f conftest.$ac_objext
8251if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8252 (eval $ac_compile) 2>&5
8253 ac_status=$?
8254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8255 (exit $ac_status); } &&
8256 { ac_try='test -s conftest.$ac_objext'
8257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8258 (eval $ac_try) 2>&5
8259 ac_status=$?
8260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8261 (exit $ac_status); }; }; then
8262 ac_lo=$ac_mid; break
8263else
8264 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00008265cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008266ac_hi=`expr '(' $ac_mid ')' - 1`
8267 if test $ac_mid -le $ac_hi; then
8268 ac_lo= ac_hi=
8269 break
8270 fi
8271 ac_mid=`expr 2 '*' $ac_mid`
8272fi
8273rm -f conftest.$ac_objext conftest.$ac_ext
8274 done
8275else
8276 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00008277cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008278ac_lo= ac_hi=
8279fi
8280rm -f conftest.$ac_objext conftest.$ac_ext
8281fi
8282rm -f conftest.$ac_objext conftest.$ac_ext
8283# Binary search between lo and hi bounds.
8284while test "x$ac_lo" != "x$ac_hi"; do
8285 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8286 cat >conftest.$ac_ext <<_ACEOF
8287#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00008288#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008289$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00008290#ifdef F77_DUMMY_MAIN
8291# ifdef __cplusplus
8292 extern "C"
8293# endif
8294 int F77_DUMMY_MAIN() { return 1; }
8295#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008296int
8297main ()
8298{
8299static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8300test_array [0] = 0
8301
8302 ;
8303 return 0;
8304}
8305_ACEOF
8306rm -f conftest.$ac_objext
8307if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8308 (eval $ac_compile) 2>&5
8309 ac_status=$?
8310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8311 (exit $ac_status); } &&
8312 { ac_try='test -s conftest.$ac_objext'
8313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8314 (eval $ac_try) 2>&5
8315 ac_status=$?
8316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8317 (exit $ac_status); }; }; then
8318 ac_hi=$ac_mid
8319else
8320 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00008321cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008322ac_lo=`expr '(' $ac_mid ')' + 1`
8323fi
8324rm -f conftest.$ac_objext conftest.$ac_ext
8325done
8326case $ac_lo in
8327?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwisf3322282003-07-13 09:46:13 +00008328'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8329echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008330 { (exit 1); exit 1; }; } ;;
8331esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008332else
8333 if test "$cross_compiling" = yes; then
Martin v. Löwisf3322282003-07-13 09:46:13 +00008334 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8335echo "$as_me: error: cannot run test program while cross compiling" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008336 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008337else
Martin v. Löwis11437992002-04-12 09:54:03 +00008338 cat >conftest.$ac_ext <<_ACEOF
8339#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00008340#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008341$ac_includes_default
8342long longval () { return (long) (sizeof (fpos_t)); }
8343unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008344#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008345#include <stdlib.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +00008346#ifdef F77_DUMMY_MAIN
8347# ifdef __cplusplus
8348 extern "C"
8349# endif
8350 int F77_DUMMY_MAIN() { return 1; }
8351#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008352int
8353main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008354{
Martin v. Löwis11437992002-04-12 09:54:03 +00008355
8356 FILE *f = fopen ("conftest.val", "w");
8357 if (! f)
8358 exit (1);
8359 if (((long) (sizeof (fpos_t))) < 0)
8360 {
8361 long i = longval ();
8362 if (i != ((long) (sizeof (fpos_t))))
8363 exit (1);
8364 fprintf (f, "%ld\n", i);
8365 }
8366 else
8367 {
8368 unsigned long i = ulongval ();
8369 if (i != ((long) (sizeof (fpos_t))))
8370 exit (1);
8371 fprintf (f, "%lu\n", i);
8372 }
8373 exit (ferror (f) || fclose (f) != 0);
8374
8375 ;
8376 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008377}
Martin v. Löwis11437992002-04-12 09:54:03 +00008378_ACEOF
8379rm -f conftest$ac_exeext
8380if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8381 (eval $ac_link) 2>&5
8382 ac_status=$?
8383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8384 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8385 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8386 (eval $ac_try) 2>&5
8387 ac_status=$?
8388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8389 (exit $ac_status); }; }; then
8390 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008391else
Martin v. Löwis11437992002-04-12 09:54:03 +00008392 echo "$as_me: program exited with status $ac_status" >&5
8393echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00008394cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008395( exit $ac_status )
Martin v. Löwisf3322282003-07-13 09:46:13 +00008396{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8397echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008398 { (exit 1); exit 1; }; }
8399fi
Martin v. Löwisf3322282003-07-13 09:46:13 +00008400rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008401fi
8402fi
8403rm -f conftest.val
8404else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008405 ac_cv_sizeof_fpos_t=0
8406fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008407fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008408echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8409echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8410cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008411#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008412_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008413
Michael W. Hudson54241132001-12-07 15:38:26 +00008414
8415
Martin v. Löwis11437992002-04-12 09:54:03 +00008416echo "$as_me:$LINENO: checking for long long support" >&5
8417echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008418have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008419cat >conftest.$ac_ext <<_ACEOF
8420#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00008421#include "confdefs.h"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008422
Martin v. Löwisf3322282003-07-13 09:46:13 +00008423#ifdef F77_DUMMY_MAIN
8424# ifdef __cplusplus
8425 extern "C"
8426# endif
8427 int F77_DUMMY_MAIN() { return 1; }
8428#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008429int
8430main ()
8431{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008432long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008433 ;
8434 return 0;
8435}
8436_ACEOF
8437rm -f conftest.$ac_objext
8438if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8439 (eval $ac_compile) 2>&5
8440 ac_status=$?
8441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8442 (exit $ac_status); } &&
8443 { ac_try='test -s conftest.$ac_objext'
8444 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8445 (eval $ac_try) 2>&5
8446 ac_status=$?
8447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8448 (exit $ac_status); }; }; then
8449
8450
8451cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008452#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008453_ACEOF
8454
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008455 have_long_long=yes
8456
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008457else
Martin v. Löwis11437992002-04-12 09:54:03 +00008458 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00008459cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008460fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008461rm -f conftest.$ac_objext conftest.$ac_ext
8462echo "$as_me:$LINENO: result: $have_long_long" >&5
8463echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008464if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008465echo "$as_me:$LINENO: checking for long long" >&5
8466echo $ECHO_N "checking for long long... $ECHO_C" >&6
8467if test "${ac_cv_type_long_long+set}" = set; then
8468 echo $ECHO_N "(cached) $ECHO_C" >&6
8469else
8470 cat >conftest.$ac_ext <<_ACEOF
8471#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00008472#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008473$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00008474#ifdef F77_DUMMY_MAIN
8475# ifdef __cplusplus
8476 extern "C"
8477# endif
8478 int F77_DUMMY_MAIN() { return 1; }
8479#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008480int
8481main ()
8482{
8483if ((long long *) 0)
8484 return 0;
8485if (sizeof (long long))
8486 return 0;
8487 ;
8488 return 0;
8489}
8490_ACEOF
8491rm -f conftest.$ac_objext
8492if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8493 (eval $ac_compile) 2>&5
8494 ac_status=$?
8495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8496 (exit $ac_status); } &&
8497 { ac_try='test -s conftest.$ac_objext'
8498 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8499 (eval $ac_try) 2>&5
8500 ac_status=$?
8501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8502 (exit $ac_status); }; }; then
8503 ac_cv_type_long_long=yes
8504else
8505 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00008506cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008507ac_cv_type_long_long=no
8508fi
8509rm -f conftest.$ac_objext conftest.$ac_ext
8510fi
8511echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8512echo "${ECHO_T}$ac_cv_type_long_long" >&6
8513
8514echo "$as_me:$LINENO: checking size of long long" >&5
8515echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8516if test "${ac_cv_sizeof_long_long+set}" = set; then
8517 echo $ECHO_N "(cached) $ECHO_C" >&6
8518else
8519 if test "$ac_cv_type_long_long" = yes; then
8520 # The cast to unsigned long works around a bug in the HP C Compiler
8521 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8522 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8523 # This bug is HP SR number 8606223364.
8524 if test "$cross_compiling" = yes; then
8525 # Depending upon the size, compute the lo and hi bounds.
8526cat >conftest.$ac_ext <<_ACEOF
8527#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00008528#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008529$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00008530#ifdef F77_DUMMY_MAIN
8531# ifdef __cplusplus
8532 extern "C"
8533# endif
8534 int F77_DUMMY_MAIN() { return 1; }
8535#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008536int
8537main ()
8538{
8539static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8540test_array [0] = 0
8541
8542 ;
8543 return 0;
8544}
8545_ACEOF
8546rm -f conftest.$ac_objext
8547if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8548 (eval $ac_compile) 2>&5
8549 ac_status=$?
8550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8551 (exit $ac_status); } &&
8552 { ac_try='test -s conftest.$ac_objext'
8553 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8554 (eval $ac_try) 2>&5
8555 ac_status=$?
8556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8557 (exit $ac_status); }; }; then
8558 ac_lo=0 ac_mid=0
8559 while :; do
8560 cat >conftest.$ac_ext <<_ACEOF
8561#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00008562#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008563$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00008564#ifdef F77_DUMMY_MAIN
8565# ifdef __cplusplus
8566 extern "C"
8567# endif
8568 int F77_DUMMY_MAIN() { return 1; }
8569#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008570int
8571main ()
8572{
8573static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8574test_array [0] = 0
8575
8576 ;
8577 return 0;
8578}
8579_ACEOF
8580rm -f conftest.$ac_objext
8581if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8582 (eval $ac_compile) 2>&5
8583 ac_status=$?
8584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8585 (exit $ac_status); } &&
8586 { ac_try='test -s conftest.$ac_objext'
8587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8588 (eval $ac_try) 2>&5
8589 ac_status=$?
8590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8591 (exit $ac_status); }; }; then
8592 ac_hi=$ac_mid; break
8593else
8594 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00008595cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008596ac_lo=`expr $ac_mid + 1`
8597 if test $ac_lo -le $ac_mid; then
8598 ac_lo= ac_hi=
8599 break
8600 fi
8601 ac_mid=`expr 2 '*' $ac_mid + 1`
8602fi
8603rm -f conftest.$ac_objext conftest.$ac_ext
8604 done
8605else
8606 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00008607cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008608cat >conftest.$ac_ext <<_ACEOF
8609#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00008610#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008611$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00008612#ifdef F77_DUMMY_MAIN
8613# ifdef __cplusplus
8614 extern "C"
8615# endif
8616 int F77_DUMMY_MAIN() { return 1; }
8617#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008618int
8619main ()
8620{
8621static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8622test_array [0] = 0
8623
8624 ;
8625 return 0;
8626}
8627_ACEOF
8628rm -f conftest.$ac_objext
8629if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8630 (eval $ac_compile) 2>&5
8631 ac_status=$?
8632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8633 (exit $ac_status); } &&
8634 { ac_try='test -s conftest.$ac_objext'
8635 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8636 (eval $ac_try) 2>&5
8637 ac_status=$?
8638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8639 (exit $ac_status); }; }; then
8640 ac_hi=-1 ac_mid=-1
8641 while :; do
8642 cat >conftest.$ac_ext <<_ACEOF
8643#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00008644#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008645$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00008646#ifdef F77_DUMMY_MAIN
8647# ifdef __cplusplus
8648 extern "C"
8649# endif
8650 int F77_DUMMY_MAIN() { return 1; }
8651#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008652int
8653main ()
8654{
8655static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8656test_array [0] = 0
8657
8658 ;
8659 return 0;
8660}
8661_ACEOF
8662rm -f conftest.$ac_objext
8663if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8664 (eval $ac_compile) 2>&5
8665 ac_status=$?
8666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8667 (exit $ac_status); } &&
8668 { ac_try='test -s conftest.$ac_objext'
8669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8670 (eval $ac_try) 2>&5
8671 ac_status=$?
8672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8673 (exit $ac_status); }; }; then
8674 ac_lo=$ac_mid; break
8675else
8676 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00008677cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008678ac_hi=`expr '(' $ac_mid ')' - 1`
8679 if test $ac_mid -le $ac_hi; then
8680 ac_lo= ac_hi=
8681 break
8682 fi
8683 ac_mid=`expr 2 '*' $ac_mid`
8684fi
8685rm -f conftest.$ac_objext conftest.$ac_ext
8686 done
8687else
8688 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00008689cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008690ac_lo= ac_hi=
8691fi
8692rm -f conftest.$ac_objext conftest.$ac_ext
8693fi
8694rm -f conftest.$ac_objext conftest.$ac_ext
8695# Binary search between lo and hi bounds.
8696while test "x$ac_lo" != "x$ac_hi"; do
8697 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8698 cat >conftest.$ac_ext <<_ACEOF
8699#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00008700#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008701$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00008702#ifdef F77_DUMMY_MAIN
8703# ifdef __cplusplus
8704 extern "C"
8705# endif
8706 int F77_DUMMY_MAIN() { return 1; }
8707#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008708int
8709main ()
8710{
8711static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8712test_array [0] = 0
8713
8714 ;
8715 return 0;
8716}
8717_ACEOF
8718rm -f conftest.$ac_objext
8719if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8720 (eval $ac_compile) 2>&5
8721 ac_status=$?
8722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8723 (exit $ac_status); } &&
8724 { ac_try='test -s conftest.$ac_objext'
8725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8726 (eval $ac_try) 2>&5
8727 ac_status=$?
8728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8729 (exit $ac_status); }; }; then
8730 ac_hi=$ac_mid
8731else
8732 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00008733cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008734ac_lo=`expr '(' $ac_mid ')' + 1`
8735fi
8736rm -f conftest.$ac_objext conftest.$ac_ext
8737done
8738case $ac_lo in
8739?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwisf3322282003-07-13 09:46:13 +00008740'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8741echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008742 { (exit 1); exit 1; }; } ;;
8743esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008744else
8745 if test "$cross_compiling" = yes; then
Martin v. Löwisf3322282003-07-13 09:46:13 +00008746 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8747echo "$as_me: error: cannot run test program while cross compiling" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008748 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008749else
Martin v. Löwis11437992002-04-12 09:54:03 +00008750 cat >conftest.$ac_ext <<_ACEOF
8751#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00008752#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008753$ac_includes_default
8754long longval () { return (long) (sizeof (long long)); }
8755unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008756#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008757#include <stdlib.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +00008758#ifdef F77_DUMMY_MAIN
8759# ifdef __cplusplus
8760 extern "C"
8761# endif
8762 int F77_DUMMY_MAIN() { return 1; }
8763#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008764int
8765main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008766{
Martin v. Löwis11437992002-04-12 09:54:03 +00008767
8768 FILE *f = fopen ("conftest.val", "w");
8769 if (! f)
8770 exit (1);
8771 if (((long) (sizeof (long long))) < 0)
8772 {
8773 long i = longval ();
8774 if (i != ((long) (sizeof (long long))))
8775 exit (1);
8776 fprintf (f, "%ld\n", i);
8777 }
8778 else
8779 {
8780 unsigned long i = ulongval ();
8781 if (i != ((long) (sizeof (long long))))
8782 exit (1);
8783 fprintf (f, "%lu\n", i);
8784 }
8785 exit (ferror (f) || fclose (f) != 0);
8786
8787 ;
8788 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008789}
Martin v. Löwis11437992002-04-12 09:54:03 +00008790_ACEOF
8791rm -f conftest$ac_exeext
8792if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8793 (eval $ac_link) 2>&5
8794 ac_status=$?
8795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8796 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8798 (eval $ac_try) 2>&5
8799 ac_status=$?
8800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8801 (exit $ac_status); }; }; then
8802 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008803else
Martin v. Löwis11437992002-04-12 09:54:03 +00008804 echo "$as_me: program exited with status $ac_status" >&5
8805echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00008806cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008807( exit $ac_status )
Martin v. Löwisf3322282003-07-13 09:46:13 +00008808{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8809echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008810 { (exit 1); exit 1; }; }
8811fi
Martin v. Löwisf3322282003-07-13 09:46:13 +00008812rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008813fi
8814fi
8815rm -f conftest.val
8816else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008817 ac_cv_sizeof_long_long=0
8818fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008819fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008820echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8821echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8822cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008823#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008824_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008825
Michael W. Hudson54241132001-12-07 15:38:26 +00008826
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008827fi
8828
Martin v. Löwis11437992002-04-12 09:54:03 +00008829echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8830echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008831have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008832cat >conftest.$ac_ext <<_ACEOF
8833#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00008834#include "confdefs.h"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008835
Martin v. Löwisf3322282003-07-13 09:46:13 +00008836#ifdef F77_DUMMY_MAIN
8837# ifdef __cplusplus
8838 extern "C"
8839# endif
8840 int F77_DUMMY_MAIN() { return 1; }
8841#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008842int
8843main ()
8844{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008845uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008846 ;
8847 return 0;
8848}
8849_ACEOF
8850rm -f conftest.$ac_objext
8851if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8852 (eval $ac_compile) 2>&5
8853 ac_status=$?
8854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8855 (exit $ac_status); } &&
8856 { ac_try='test -s conftest.$ac_objext'
8857 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8858 (eval $ac_try) 2>&5
8859 ac_status=$?
8860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8861 (exit $ac_status); }; }; then
8862
8863
8864cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008865#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008866_ACEOF
8867
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008868 have_uintptr_t=yes
8869
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008870else
Martin v. Löwis11437992002-04-12 09:54:03 +00008871 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00008872cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008873fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008874rm -f conftest.$ac_objext conftest.$ac_ext
8875echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8876echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008877if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008878echo "$as_me:$LINENO: checking for uintptr_t" >&5
8879echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8880if test "${ac_cv_type_uintptr_t+set}" = set; then
8881 echo $ECHO_N "(cached) $ECHO_C" >&6
8882else
8883 cat >conftest.$ac_ext <<_ACEOF
8884#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00008885#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008886$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00008887#ifdef F77_DUMMY_MAIN
8888# ifdef __cplusplus
8889 extern "C"
8890# endif
8891 int F77_DUMMY_MAIN() { return 1; }
8892#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008893int
8894main ()
8895{
8896if ((uintptr_t *) 0)
8897 return 0;
8898if (sizeof (uintptr_t))
8899 return 0;
8900 ;
8901 return 0;
8902}
8903_ACEOF
8904rm -f conftest.$ac_objext
8905if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8906 (eval $ac_compile) 2>&5
8907 ac_status=$?
8908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8909 (exit $ac_status); } &&
8910 { ac_try='test -s conftest.$ac_objext'
8911 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8912 (eval $ac_try) 2>&5
8913 ac_status=$?
8914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8915 (exit $ac_status); }; }; then
8916 ac_cv_type_uintptr_t=yes
8917else
8918 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00008919cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008920ac_cv_type_uintptr_t=no
8921fi
8922rm -f conftest.$ac_objext conftest.$ac_ext
8923fi
8924echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8925echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8926
8927echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8928echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8929if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8930 echo $ECHO_N "(cached) $ECHO_C" >&6
8931else
8932 if test "$ac_cv_type_uintptr_t" = yes; then
8933 # The cast to unsigned long works around a bug in the HP C Compiler
8934 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8935 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8936 # This bug is HP SR number 8606223364.
8937 if test "$cross_compiling" = yes; then
8938 # Depending upon the size, compute the lo and hi bounds.
8939cat >conftest.$ac_ext <<_ACEOF
8940#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00008941#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008942$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00008943#ifdef F77_DUMMY_MAIN
8944# ifdef __cplusplus
8945 extern "C"
8946# endif
8947 int F77_DUMMY_MAIN() { return 1; }
8948#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008949int
8950main ()
8951{
8952static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8953test_array [0] = 0
8954
8955 ;
8956 return 0;
8957}
8958_ACEOF
8959rm -f conftest.$ac_objext
8960if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8961 (eval $ac_compile) 2>&5
8962 ac_status=$?
8963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8964 (exit $ac_status); } &&
8965 { ac_try='test -s conftest.$ac_objext'
8966 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8967 (eval $ac_try) 2>&5
8968 ac_status=$?
8969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8970 (exit $ac_status); }; }; then
8971 ac_lo=0 ac_mid=0
8972 while :; do
8973 cat >conftest.$ac_ext <<_ACEOF
8974#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00008975#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008976$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00008977#ifdef F77_DUMMY_MAIN
8978# ifdef __cplusplus
8979 extern "C"
8980# endif
8981 int F77_DUMMY_MAIN() { return 1; }
8982#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008983int
8984main ()
8985{
8986static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8987test_array [0] = 0
8988
8989 ;
8990 return 0;
8991}
8992_ACEOF
8993rm -f conftest.$ac_objext
8994if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8995 (eval $ac_compile) 2>&5
8996 ac_status=$?
8997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8998 (exit $ac_status); } &&
8999 { ac_try='test -s conftest.$ac_objext'
9000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9001 (eval $ac_try) 2>&5
9002 ac_status=$?
9003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9004 (exit $ac_status); }; }; then
9005 ac_hi=$ac_mid; break
9006else
9007 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00009008cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009009ac_lo=`expr $ac_mid + 1`
9010 if test $ac_lo -le $ac_mid; then
9011 ac_lo= ac_hi=
9012 break
9013 fi
9014 ac_mid=`expr 2 '*' $ac_mid + 1`
9015fi
9016rm -f conftest.$ac_objext conftest.$ac_ext
9017 done
9018else
9019 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00009020cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009021cat >conftest.$ac_ext <<_ACEOF
9022#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00009023#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009024$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00009025#ifdef F77_DUMMY_MAIN
9026# ifdef __cplusplus
9027 extern "C"
9028# endif
9029 int F77_DUMMY_MAIN() { return 1; }
9030#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009031int
9032main ()
9033{
9034static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
9035test_array [0] = 0
9036
9037 ;
9038 return 0;
9039}
9040_ACEOF
9041rm -f conftest.$ac_objext
9042if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9043 (eval $ac_compile) 2>&5
9044 ac_status=$?
9045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9046 (exit $ac_status); } &&
9047 { ac_try='test -s conftest.$ac_objext'
9048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9049 (eval $ac_try) 2>&5
9050 ac_status=$?
9051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9052 (exit $ac_status); }; }; then
9053 ac_hi=-1 ac_mid=-1
9054 while :; do
9055 cat >conftest.$ac_ext <<_ACEOF
9056#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00009057#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009058$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00009059#ifdef F77_DUMMY_MAIN
9060# ifdef __cplusplus
9061 extern "C"
9062# endif
9063 int F77_DUMMY_MAIN() { return 1; }
9064#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009065int
9066main ()
9067{
9068static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
9069test_array [0] = 0
9070
9071 ;
9072 return 0;
9073}
9074_ACEOF
9075rm -f conftest.$ac_objext
9076if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9077 (eval $ac_compile) 2>&5
9078 ac_status=$?
9079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9080 (exit $ac_status); } &&
9081 { ac_try='test -s conftest.$ac_objext'
9082 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9083 (eval $ac_try) 2>&5
9084 ac_status=$?
9085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9086 (exit $ac_status); }; }; then
9087 ac_lo=$ac_mid; break
9088else
9089 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00009090cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009091ac_hi=`expr '(' $ac_mid ')' - 1`
9092 if test $ac_mid -le $ac_hi; then
9093 ac_lo= ac_hi=
9094 break
9095 fi
9096 ac_mid=`expr 2 '*' $ac_mid`
9097fi
9098rm -f conftest.$ac_objext conftest.$ac_ext
9099 done
9100else
9101 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00009102cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009103ac_lo= ac_hi=
9104fi
9105rm -f conftest.$ac_objext conftest.$ac_ext
9106fi
9107rm -f conftest.$ac_objext conftest.$ac_ext
9108# Binary search between lo and hi bounds.
9109while test "x$ac_lo" != "x$ac_hi"; do
9110 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9111 cat >conftest.$ac_ext <<_ACEOF
9112#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00009113#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009114$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +00009115#ifdef F77_DUMMY_MAIN
9116# ifdef __cplusplus
9117 extern "C"
9118# endif
9119 int F77_DUMMY_MAIN() { return 1; }
9120#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009121int
9122main ()
9123{
9124static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
9125test_array [0] = 0
9126
9127 ;
9128 return 0;
9129}
9130_ACEOF
9131rm -f conftest.$ac_objext
9132if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9133 (eval $ac_compile) 2>&5
9134 ac_status=$?
9135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9136 (exit $ac_status); } &&
9137 { ac_try='test -s conftest.$ac_objext'
9138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9139 (eval $ac_try) 2>&5
9140 ac_status=$?
9141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9142 (exit $ac_status); }; }; then
9143 ac_hi=$ac_mid
9144else
9145 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00009146cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009147ac_lo=`expr '(' $ac_mid ')' + 1`
9148fi
9149rm -f conftest.$ac_objext conftest.$ac_ext
9150done
9151case $ac_lo in
9152?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwisf3322282003-07-13 09:46:13 +00009153'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
9154echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009155 { (exit 1); exit 1; }; } ;;
9156esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009157else
9158 if test "$cross_compiling" = yes; then
Martin v. Löwisf3322282003-07-13 09:46:13 +00009159 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
9160echo "$as_me: error: cannot run test program while cross compiling" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009161 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009162else
Martin v. Löwis11437992002-04-12 09:54:03 +00009163 cat >conftest.$ac_ext <<_ACEOF
9164#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00009165#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009166$ac_includes_default
9167long longval () { return (long) (sizeof (uintptr_t)); }
9168unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009169#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009170#include <stdlib.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +00009171#ifdef F77_DUMMY_MAIN
9172# ifdef __cplusplus
9173 extern "C"
9174# endif
9175 int F77_DUMMY_MAIN() { return 1; }
9176#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009177int
9178main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009179{
Martin v. Löwis11437992002-04-12 09:54:03 +00009180
9181 FILE *f = fopen ("conftest.val", "w");
9182 if (! f)
9183 exit (1);
9184 if (((long) (sizeof (uintptr_t))) < 0)
9185 {
9186 long i = longval ();
9187 if (i != ((long) (sizeof (uintptr_t))))
9188 exit (1);
9189 fprintf (f, "%ld\n", i);
9190 }
9191 else
9192 {
9193 unsigned long i = ulongval ();
9194 if (i != ((long) (sizeof (uintptr_t))))
9195 exit (1);
9196 fprintf (f, "%lu\n", i);
9197 }
9198 exit (ferror (f) || fclose (f) != 0);
9199
9200 ;
9201 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009202}
Martin v. Löwis11437992002-04-12 09:54:03 +00009203_ACEOF
9204rm -f conftest$ac_exeext
9205if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9206 (eval $ac_link) 2>&5
9207 ac_status=$?
9208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9209 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9211 (eval $ac_try) 2>&5
9212 ac_status=$?
9213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9214 (exit $ac_status); }; }; then
9215 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009216else
Martin v. Löwis11437992002-04-12 09:54:03 +00009217 echo "$as_me: program exited with status $ac_status" >&5
9218echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00009219cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009220( exit $ac_status )
Martin v. Löwisf3322282003-07-13 09:46:13 +00009221{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
9222echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009223 { (exit 1); exit 1; }; }
9224fi
Martin v. Löwisf3322282003-07-13 09:46:13 +00009225rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009226fi
9227fi
9228rm -f conftest.val
9229else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009230 ac_cv_sizeof_uintptr_t=0
9231fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009232fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009233echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
9234echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
9235cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009236#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009237_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009238
Michael W. Hudson54241132001-12-07 15:38:26 +00009239
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009240fi
9241
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009242# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009243echo "$as_me:$LINENO: checking size of off_t" >&5
9244echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
9245if test "${ac_cv_sizeof_off_t+set}" = set; then
9246 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009247else
9248 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009249 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009250else
Martin v. Löwis11437992002-04-12 09:54:03 +00009251 cat >conftest.$ac_ext <<_ACEOF
9252#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00009253#include "confdefs.h"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009254#include <stdio.h>
9255#include <sys/types.h>
9256main()
9257{
9258 FILE *f=fopen("conftestval", "w");
9259 if (!f) exit(1);
9260 fprintf(f, "%d\n", sizeof(off_t));
9261 exit(0);
9262}
Martin v. Löwis11437992002-04-12 09:54:03 +00009263_ACEOF
9264rm -f conftest$ac_exeext
9265if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9266 (eval $ac_link) 2>&5
9267 ac_status=$?
9268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9269 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9271 (eval $ac_try) 2>&5
9272 ac_status=$?
9273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9274 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009275 ac_cv_sizeof_off_t=`cat conftestval`
9276else
Martin v. Löwis11437992002-04-12 09:54:03 +00009277 echo "$as_me: program exited with status $ac_status" >&5
9278echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00009279cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009280( exit $ac_status )
9281ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009282fi
Martin v. Löwisf3322282003-07-13 09:46:13 +00009283rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009284fi
9285
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009286fi
9287
Martin v. Löwis11437992002-04-12 09:54:03 +00009288echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
9289echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
9290
9291cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009292#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009293_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009294
Michael W. Hudson54241132001-12-07 15:38:26 +00009295
Martin v. Löwis11437992002-04-12 09:54:03 +00009296echo "$as_me:$LINENO: checking whether to enable large file support" >&5
9297echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009298if test "$have_long_long" = yes -a \
9299 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
9300 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009301
Martin v. Löwis11437992002-04-12 09:54:03 +00009302cat >>confdefs.h <<\_ACEOF
9303#define HAVE_LARGEFILE_SUPPORT 1
9304_ACEOF
9305
9306 echo "$as_me:$LINENO: result: yes" >&5
9307echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009308else
Martin v. Löwis11437992002-04-12 09:54:03 +00009309 echo "$as_me:$LINENO: result: no" >&5
9310echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009311fi
9312
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009313# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009314echo "$as_me:$LINENO: checking size of time_t" >&5
9315echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
9316if test "${ac_cv_sizeof_time_t+set}" = set; then
9317 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009318else
9319 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009320 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009321else
Martin v. Löwis11437992002-04-12 09:54:03 +00009322 cat >conftest.$ac_ext <<_ACEOF
9323#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00009324#include "confdefs.h"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009325#include <stdio.h>
9326#include <time.h>
9327main()
9328{
9329 FILE *f=fopen("conftestval", "w");
9330 if (!f) exit(1);
9331 fprintf(f, "%d\n", sizeof(time_t));
9332 exit(0);
9333}
Martin v. Löwis11437992002-04-12 09:54:03 +00009334_ACEOF
9335rm -f conftest$ac_exeext
9336if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9337 (eval $ac_link) 2>&5
9338 ac_status=$?
9339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9340 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9342 (eval $ac_try) 2>&5
9343 ac_status=$?
9344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9345 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009346 ac_cv_sizeof_time_t=`cat conftestval`
9347else
Martin v. Löwis11437992002-04-12 09:54:03 +00009348 echo "$as_me: program exited with status $ac_status" >&5
9349echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00009350cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009351( exit $ac_status )
9352ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009353fi
Martin v. Löwisf3322282003-07-13 09:46:13 +00009354rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009355fi
9356
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009357fi
9358
Martin v. Löwis11437992002-04-12 09:54:03 +00009359echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9360echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9361
9362cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009363#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009364_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009365
Michael W. Hudson54241132001-12-07 15:38:26 +00009366
9367
Trent Mick635f6fb2000-08-23 21:33:05 +00009368# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009369ac_save_cc="$CC"
9370if test "$ac_cv_kpthread" = "yes"
9371then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009372elif test "$ac_cv_kthread" = "yes"
9373then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009374elif test "$ac_cv_pthread" = "yes"
9375then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009376fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009377echo "$as_me:$LINENO: checking for pthread_t" >&5
9378echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009379have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009380cat >conftest.$ac_ext <<_ACEOF
9381#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00009382#include "confdefs.h"
Trent Mick635f6fb2000-08-23 21:33:05 +00009383#include <pthread.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +00009384#ifdef F77_DUMMY_MAIN
9385# ifdef __cplusplus
9386 extern "C"
9387# endif
9388 int F77_DUMMY_MAIN() { return 1; }
9389#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009390int
9391main ()
9392{
Guido van Rossum12580492000-09-24 16:47:19 +00009393pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009394 ;
9395 return 0;
9396}
9397_ACEOF
9398rm -f conftest.$ac_objext
9399if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9400 (eval $ac_compile) 2>&5
9401 ac_status=$?
9402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9403 (exit $ac_status); } &&
9404 { ac_try='test -s conftest.$ac_objext'
9405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9406 (eval $ac_try) 2>&5
9407 ac_status=$?
9408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9409 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009410 have_pthread_t=yes
9411else
Martin v. Löwis11437992002-04-12 09:54:03 +00009412 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00009413cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00009414fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009415rm -f conftest.$ac_objext conftest.$ac_ext
9416echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9417echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009418if test "$have_pthread_t" = yes ; then
9419 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009420 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9421echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9422 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9423 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009424else
9425 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009426 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009427else
Martin v. Löwis11437992002-04-12 09:54:03 +00009428 cat >conftest.$ac_ext <<_ACEOF
9429#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00009430#include "confdefs.h"
Trent Mick635f6fb2000-08-23 21:33:05 +00009431#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009432#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +00009433 main()
9434 {
9435 FILE *f=fopen("conftestval", "w");
9436 if (!f) exit(1);
9437 fprintf(f, "%d\n", sizeof(pthread_t));
9438 exit(0);
9439 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009440_ACEOF
9441rm -f conftest$ac_exeext
9442if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9443 (eval $ac_link) 2>&5
9444 ac_status=$?
9445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9446 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9447 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9448 (eval $ac_try) 2>&5
9449 ac_status=$?
9450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9451 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009452 ac_cv_sizeof_pthread_t=`cat conftestval`
9453else
Martin v. Löwis11437992002-04-12 09:54:03 +00009454 echo "$as_me: program exited with status $ac_status" >&5
9455echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00009456cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009457( exit $ac_status )
9458ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009459fi
Martin v. Löwisf3322282003-07-13 09:46:13 +00009460rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009461fi
9462
Trent Mick635f6fb2000-08-23 21:33:05 +00009463fi
9464
Martin v. Löwis11437992002-04-12 09:54:03 +00009465 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9466echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9467
9468cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009469#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009470_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009471
9472fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009473CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009474
Martin v. Löwis11437992002-04-12 09:54:03 +00009475echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9476echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009477# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9478if test "${enable_toolbox_glue+set}" = set; then
9479 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009480
Martin v. Löwis11437992002-04-12 09:54:03 +00009481fi;
Jack Jansene578a632001-08-15 01:27:14 +00009482
9483if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009484then
Jack Jansene578a632001-08-15 01:27:14 +00009485 case $ac_sys_system/$ac_sys_release in
9486 Darwin/*)
9487 enable_toolbox_glue="yes";;
9488 *)
9489 enable_toolbox_glue="no";;
9490 esac
9491fi
9492case "$enable_toolbox_glue" in
9493yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009494 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009495 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009496 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009497
9498cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009499#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009500_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009501
9502 ;;
9503*)
9504 extra_frameworks=""
9505 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009506 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009507 ;;
9508esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009509echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9510echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009511
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009512
9513case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009514 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009515 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009516 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansen66b84832003-07-04 12:14:39 +00009517 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python'
Jack Jansena3891ea2001-09-07 14:25:12 +00009518 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009519 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009520 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009521 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansen66b84832003-07-04 12:14:39 +00009522 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python'
Jack Jansene578a632001-08-15 01:27:14 +00009523 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009524esac
9525
Martin v. Löwis11437992002-04-12 09:54:03 +00009526echo "$as_me:$LINENO: checking for --enable-framework" >&5
9527echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009528if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009529then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009530 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009531 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009532 # in the build location.
Jack Jansenea0c3822002-08-01 21:57:49 +00009533 LDFLAGS="$LDFLAGS -Wl,-F."
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009534
Martin v. Löwis11437992002-04-12 09:54:03 +00009535cat >>confdefs.h <<\_ACEOF
9536#define WITH_NEXT_FRAMEWORK 1
9537_ACEOF
9538
9539 echo "$as_me:$LINENO: result: yes" >&5
9540echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009541else
Martin v. Löwis11437992002-04-12 09:54:03 +00009542 echo "$as_me:$LINENO: result: no" >&5
9543echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009544fi
9545
Martin v. Löwis11437992002-04-12 09:54:03 +00009546echo "$as_me:$LINENO: checking for dyld" >&5
9547echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009548case $ac_sys_system/$ac_sys_release in
9549 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009550
Martin v. Löwis11437992002-04-12 09:54:03 +00009551cat >>confdefs.h <<\_ACEOF
9552#define WITH_DYLD 1
9553_ACEOF
9554
9555 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9556echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009557 ;;
9558 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009559 echo "$as_me:$LINENO: result: no" >&5
9560echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009561 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009562esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009563
Guido van Rossum0a516c91994-09-12 10:58:40 +00009564# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009565
Michael W. Hudson54241132001-12-07 15:38:26 +00009566
9567
9568
9569
Guido van Rossum0a516c91994-09-12 10:58:40 +00009570# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009571# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009572echo "$as_me:$LINENO: checking SO" >&5
9573echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009574if test -z "$SO"
9575then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009576 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009577 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009578 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009579 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009580 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00009581else
9582 # this might also be a termcap variable, see #610332
9583 echo
9584 echo '====================================================================='
9585 echo '+ +'
9586 echo '+ WARNING: You have set SO in your environment. +'
9587 echo '+ Do you really mean to change the extension for shared libraries? +'
9588 echo '+ Continuing in 10 seconds to let you to ponder. +'
9589 echo '+ +'
9590 echo '====================================================================='
9591 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00009592fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009593echo "$as_me:$LINENO: result: $SO" >&5
9594echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009595# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00009596# -- "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 +00009597# (Shared libraries in this instance are shared modules to be loaded into
9598# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009599echo "$as_me:$LINENO: checking LDSHARED" >&5
9600echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009601if test -z "$LDSHARED"
9602then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009603 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009604 AIX*)
9605 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009606 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009607 ;;
9608 BeOS*)
9609 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009610 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009611 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009612 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009613 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009614 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009615 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +00009616 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009617 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009618 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +00009619 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009620 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009621 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
9622 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009623 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009624 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9625 if test "$enable_framework" ; then
9626 # Link against the framework. All externals should be defined.
9627 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9628 else
9629 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009630 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009631 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009632 Darwin/*)
9633 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9634 if test "$enable_framework" ; then
9635 # Link against the framework. All externals should be defined.
9636 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9637 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009638 # No framework, use the Python app as bundle-loader
9639 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009640 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009641 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009642 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00009643 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009644 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009645 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009646 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009647 then
9648 LDSHARED="cc -shared ${LDFLAGS}"
9649 else
9650 LDSHARED="ld -Bshareable ${LDFLAGS}"
9651 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009652 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009653 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009654 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009655 then LDSHARED='$(CC) -shared'
9656 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009657 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009658 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +00009659 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009660 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009661 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009662 *) LDSHARED="ld";;
9663 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009664fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009665echo "$as_me:$LINENO: result: $LDSHARED" >&5
9666echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009667BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009668# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009669# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009670echo "$as_me:$LINENO: checking CCSHARED" >&5
9671echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009672if test -z "$CCSHARED"
9673then
Guido van Rossum07397971997-04-29 21:49:50 +00009674 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009675 SunOS*) if test "$GCC" = yes;
9676 then CCSHARED="-fPIC";
9677 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009678 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009679 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009680 else CCSHARED="+z";
9681 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009682 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009683 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009684 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009685 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009686 if test "$GCC" = "yes"
9687 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009688 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009689 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009690 SCO_SV*)
9691 if test "$GCC" = "yes"
9692 then CCSHARED="-fPIC"
9693 else CCSHARED="-Kpic -belf"
9694 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009695 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009696 IRIX*/6*) case $CC in
9697 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009698 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009699 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009700 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009701 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009702fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009703echo "$as_me:$LINENO: result: $CCSHARED" >&5
9704echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009705# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009706# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009707echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9708echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009709if test -z "$LINKFORSHARED"
9710then
Guido van Rossum07397971997-04-29 21:49:50 +00009711 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009712 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009713 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009714 LINKFORSHARED="-Wl,-E -Wl,+s";;
9715# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009716 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009717 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009718 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009719 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009720 # -u __dummy makes the linker aware of the objc runtime
9721 # in System.framework; otherwise, __objcInit (referenced in
9722 # crt1.o) gets erroneously defined as common, which breaks dynamic
9723 # loading of any modules which reference it in System.framework.
9724 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9725 # not used by the core itself but which needs to be in the core so
9726 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00009727 # -prebind is no longer used, because it actually seems to give a
9728 # slowdown in stead of a speedup, maybe due to the large number of
9729 # dynamic loads Python does.
9730 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009731 if test "$enable_framework"
9732 then
9733 LINKFORSHARED="$LINKFORSHARED -framework Python"
9734 fi
9735 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009736 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009737 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009738 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009739 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009740 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9741 then
9742 LINKFORSHARED="-Wl,--export-dynamic"
9743 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009744 SunOS/5*) case $CC in
9745 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009746 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009747 then
9748 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009749 fi;;
9750 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009751 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009752fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009753echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9754echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009755
Michael W. Hudson54241132001-12-07 15:38:26 +00009756
Martin v. Löwis11437992002-04-12 09:54:03 +00009757echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9758echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009759if test ! "$LIBRARY" = "$LDLIBRARY"
9760then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009761 case $ac_sys_system in
9762 CYGWIN*)
9763 # Cygwin needs CCSHARED when building extension DLLs
9764 # but not when building the interpreter DLL.
9765 CFLAGSFORSHARED='';;
9766 *)
9767 CFLAGSFORSHARED='$(CCSHARED)'
9768 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009769fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009770echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9771echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009772
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009773# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9774# library (with --enable-shared).
9775# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009776# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9777# if it is not required, since it creates a dependency of the shared library
9778# to LIBS. This, in turn, means that applications linking the shared libpython
9779# don't need to link LIBS explicitly. The default should be only changed
9780# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009781
9782echo "$as_me:$LINENO: checking SHLIBS" >&5
9783echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9784case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009785 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009786 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009787esac
9788echo "$as_me:$LINENO: result: $SHLIBS" >&5
9789echo "${ECHO_T}$SHLIBS" >&6
9790
9791
Guido van Rossum627b2d71993-12-24 10:39:16 +00009792# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009793
9794echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9795echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9796if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9797 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009798else
Martin v. Löwis11437992002-04-12 09:54:03 +00009799 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009800LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009801cat >conftest.$ac_ext <<_ACEOF
9802#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00009803#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009804
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009805/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009806#ifdef __cplusplus
9807extern "C"
9808#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009809/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009810 builtin and then its argument prototype would still apply. */
9811char dlopen ();
Martin v. Löwisf3322282003-07-13 09:46:13 +00009812#ifdef F77_DUMMY_MAIN
9813# ifdef __cplusplus
9814 extern "C"
9815# endif
9816 int F77_DUMMY_MAIN() { return 1; }
9817#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009818int
9819main ()
9820{
9821dlopen ();
9822 ;
9823 return 0;
9824}
9825_ACEOF
9826rm -f conftest.$ac_objext conftest$ac_exeext
9827if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9828 (eval $ac_link) 2>&5
9829 ac_status=$?
9830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9831 (exit $ac_status); } &&
9832 { ac_try='test -s conftest$ac_exeext'
9833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9834 (eval $ac_try) 2>&5
9835 ac_status=$?
9836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9837 (exit $ac_status); }; }; then
9838 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009839else
Martin v. Löwis11437992002-04-12 09:54:03 +00009840 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00009841cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009842ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009843fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009844rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9845LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009846fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009847echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9848echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9849if test $ac_cv_lib_dl_dlopen = yes; then
9850 cat >>confdefs.h <<_ACEOF
9851#define HAVE_LIBDL 1
9852_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009853
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009854 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009855
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009856fi
9857 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009858
9859echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9860echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9861if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9862 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009863else
Martin v. Löwis11437992002-04-12 09:54:03 +00009864 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009865LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009866cat >conftest.$ac_ext <<_ACEOF
9867#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00009868#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009869
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009870/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009871#ifdef __cplusplus
9872extern "C"
9873#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009874/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009875 builtin and then its argument prototype would still apply. */
9876char shl_load ();
Martin v. Löwisf3322282003-07-13 09:46:13 +00009877#ifdef F77_DUMMY_MAIN
9878# ifdef __cplusplus
9879 extern "C"
9880# endif
9881 int F77_DUMMY_MAIN() { return 1; }
9882#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009883int
9884main ()
9885{
9886shl_load ();
9887 ;
9888 return 0;
9889}
9890_ACEOF
9891rm -f conftest.$ac_objext conftest$ac_exeext
9892if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9893 (eval $ac_link) 2>&5
9894 ac_status=$?
9895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9896 (exit $ac_status); } &&
9897 { ac_try='test -s conftest$ac_exeext'
9898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9899 (eval $ac_try) 2>&5
9900 ac_status=$?
9901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9902 (exit $ac_status); }; }; then
9903 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009904else
Martin v. Löwis11437992002-04-12 09:54:03 +00009905 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00009906cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009907ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009908fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009909rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9910LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009911fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009912echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9913echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9914if test $ac_cv_lib_dld_shl_load = yes; then
9915 cat >>confdefs.h <<_ACEOF
9916#define HAVE_LIBDLD 1
9917_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009918
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009919 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009920
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009921fi
9922 # Dynamic linking for HP-UX
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009923echo "$as_me:$LINENO: checking for library containing sem_init" >&5
9924echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9925if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009926 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009927else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009928 ac_func_search_save_LIBS=$LIBS
9929ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009930cat >conftest.$ac_ext <<_ACEOF
9931#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00009932#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009933
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009934/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009935#ifdef __cplusplus
9936extern "C"
9937#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009938/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009939 builtin and then its argument prototype would still apply. */
9940char sem_init ();
Martin v. Löwisf3322282003-07-13 09:46:13 +00009941#ifdef F77_DUMMY_MAIN
9942# ifdef __cplusplus
9943 extern "C"
9944# endif
9945 int F77_DUMMY_MAIN() { return 1; }
9946#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009947int
9948main ()
9949{
9950sem_init ();
9951 ;
9952 return 0;
9953}
9954_ACEOF
9955rm -f conftest.$ac_objext conftest$ac_exeext
9956if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9957 (eval $ac_link) 2>&5
9958 ac_status=$?
9959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9960 (exit $ac_status); } &&
9961 { ac_try='test -s conftest$ac_exeext'
9962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9963 (eval $ac_try) 2>&5
9964 ac_status=$?
9965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9966 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009967 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009968else
Martin v. Löwis11437992002-04-12 09:54:03 +00009969 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +00009970cat conftest.$ac_ext >&5
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009971fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009972rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009973if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009974 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009975 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9976 cat >conftest.$ac_ext <<_ACEOF
9977#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +00009978#include "confdefs.h"
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009979
9980/* Override any gcc2 internal prototype to avoid an error. */
9981#ifdef __cplusplus
9982extern "C"
9983#endif
9984/* We use char because int might match the return type of a gcc2
9985 builtin and then its argument prototype would still apply. */
9986char sem_init ();
Martin v. Löwisf3322282003-07-13 09:46:13 +00009987#ifdef F77_DUMMY_MAIN
9988# ifdef __cplusplus
9989 extern "C"
9990# endif
9991 int F77_DUMMY_MAIN() { return 1; }
9992#endif
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009993int
9994main ()
9995{
9996sem_init ();
9997 ;
9998 return 0;
9999}
Martin v. Löwis11437992002-04-12 09:54:03 +000010000_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010001rm -f conftest.$ac_objext conftest$ac_exeext
10002if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10003 (eval $ac_link) 2>&5
10004 ac_status=$?
10005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10006 (exit $ac_status); } &&
10007 { ac_try='test -s conftest$ac_exeext'
10008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10009 (eval $ac_try) 2>&5
10010 ac_status=$?
10011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10012 (exit $ac_status); }; }; then
10013 ac_cv_search_sem_init="-l$ac_lib"
10014break
10015else
10016 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000010017cat conftest.$ac_ext >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010018fi
10019rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10020 done
10021fi
10022LIBS=$ac_func_search_save_LIBS
10023fi
10024echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
10025echo "${ECHO_T}$ac_cv_search_sem_init" >&6
10026if test "$ac_cv_search_sem_init" != no; then
10027 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010028
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010029fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000010030 # 'Real Time' functions on Solaris
10031 # posix4 on Solaris 2.6
10032 # pthread (first!) on Linux
Martin v. Löwis19d17342003-06-14 21:03:05 +000010033# check if we need libintl for locale functions
10034echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
10035echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6
10036if test "${ac_cv_lib_intl_textdomain+set}" = set; then
10037 echo $ECHO_N "(cached) $ECHO_C" >&6
10038else
10039 ac_check_lib_save_LIBS=$LIBS
10040LIBS="-lintl $LIBS"
10041cat >conftest.$ac_ext <<_ACEOF
10042#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000010043#include "confdefs.h"
Martin v. Löwis19d17342003-06-14 21:03:05 +000010044
10045/* Override any gcc2 internal prototype to avoid an error. */
10046#ifdef __cplusplus
10047extern "C"
10048#endif
10049/* We use char because int might match the return type of a gcc2
10050 builtin and then its argument prototype would still apply. */
10051char textdomain ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000010052#ifdef F77_DUMMY_MAIN
10053# ifdef __cplusplus
10054 extern "C"
10055# endif
10056 int F77_DUMMY_MAIN() { return 1; }
10057#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000010058int
10059main ()
10060{
10061textdomain ();
10062 ;
10063 return 0;
10064}
10065_ACEOF
10066rm -f conftest.$ac_objext conftest$ac_exeext
10067if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10068 (eval $ac_link) 2>&5
10069 ac_status=$?
10070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10071 (exit $ac_status); } &&
10072 { ac_try='test -s conftest$ac_exeext'
10073 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10074 (eval $ac_try) 2>&5
10075 ac_status=$?
10076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10077 (exit $ac_status); }; }; then
10078 ac_cv_lib_intl_textdomain=yes
10079else
10080 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000010081cat conftest.$ac_ext >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000010082ac_cv_lib_intl_textdomain=no
10083fi
10084rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10085LIBS=$ac_check_lib_save_LIBS
10086fi
10087echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
10088echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6
10089if test $ac_cv_lib_intl_textdomain = yes; then
10090
10091cat >>confdefs.h <<\_ACEOF
10092#define WITH_LIBINTL 1
10093_ACEOF
10094
10095fi
10096
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010097
10098# checks for system dependent C++ extensions support
10099case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +000010100 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
10101echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
10102 cat >conftest.$ac_ext <<_ACEOF
10103#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000010104#include "confdefs.h"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010105#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwisf3322282003-07-13 09:46:13 +000010106#ifdef F77_DUMMY_MAIN
10107# ifdef __cplusplus
10108 extern "C"
10109# endif
10110 int F77_DUMMY_MAIN() { return 1; }
10111#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010112int
10113main ()
10114{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010115loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010116 ;
10117 return 0;
10118}
10119_ACEOF
10120rm -f conftest.$ac_objext conftest$ac_exeext
10121if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10122 (eval $ac_link) 2>&5
10123 ac_status=$?
10124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10125 (exit $ac_status); } &&
10126 { ac_try='test -s conftest$ac_exeext'
10127 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10128 (eval $ac_try) 2>&5
10129 ac_status=$?
10130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10131 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010132
Martin v. Löwis11437992002-04-12 09:54:03 +000010133cat >>confdefs.h <<\_ACEOF
10134#define AIX_GENUINE_CPLUSPLUS 1
10135_ACEOF
10136
10137 echo "$as_me:$LINENO: result: yes" >&5
10138echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010139else
Martin v. Löwis11437992002-04-12 09:54:03 +000010140 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000010141cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010142echo "$as_me:$LINENO: result: no" >&5
10143echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010144fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010145rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010146 *) ;;
10147esac
10148
Guido van Rossum70c7f481998-03-26 18:44:10 +000010149# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Martin v. Löwise1172582002-11-13 08:51:19 +000010150# However on SGI IRIX 4, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010151# BeOS' sockets are stashed in libnet.
10152case "$ac_sys_system" in
10153IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +000010154*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010155echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
10156echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
10157if test "${ac_cv_lib_nsl_t_open+set}" = set; then
10158 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010159else
Martin v. Löwis11437992002-04-12 09:54:03 +000010160 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010161LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010162cat >conftest.$ac_ext <<_ACEOF
10163#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000010164#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010165
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010166/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010167#ifdef __cplusplus
10168extern "C"
10169#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010170/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010171 builtin and then its argument prototype would still apply. */
10172char t_open ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000010173#ifdef F77_DUMMY_MAIN
10174# ifdef __cplusplus
10175 extern "C"
10176# endif
10177 int F77_DUMMY_MAIN() { return 1; }
10178#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010179int
10180main ()
10181{
10182t_open ();
10183 ;
10184 return 0;
10185}
10186_ACEOF
10187rm -f conftest.$ac_objext conftest$ac_exeext
10188if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10189 (eval $ac_link) 2>&5
10190 ac_status=$?
10191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10192 (exit $ac_status); } &&
10193 { ac_try='test -s conftest$ac_exeext'
10194 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10195 (eval $ac_try) 2>&5
10196 ac_status=$?
10197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10198 (exit $ac_status); }; }; then
10199 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010200else
Martin v. Löwis11437992002-04-12 09:54:03 +000010201 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000010202cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010203ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010204fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010205rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10206LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010207fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010208echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
10209echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
10210if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010211 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010212fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010213 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +000010214echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
10215echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
10216if test "${ac_cv_lib_socket_socket+set}" = set; then
10217 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010218else
Martin v. Löwis11437992002-04-12 09:54:03 +000010219 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010220LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010221cat >conftest.$ac_ext <<_ACEOF
10222#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000010223#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010224
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010225/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010226#ifdef __cplusplus
10227extern "C"
10228#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010229/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010230 builtin and then its argument prototype would still apply. */
10231char socket ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000010232#ifdef F77_DUMMY_MAIN
10233# ifdef __cplusplus
10234 extern "C"
10235# endif
10236 int F77_DUMMY_MAIN() { return 1; }
10237#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010238int
10239main ()
10240{
10241socket ();
10242 ;
10243 return 0;
10244}
10245_ACEOF
10246rm -f conftest.$ac_objext conftest$ac_exeext
10247if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10248 (eval $ac_link) 2>&5
10249 ac_status=$?
10250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10251 (exit $ac_status); } &&
10252 { ac_try='test -s conftest$ac_exeext'
10253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10254 (eval $ac_try) 2>&5
10255 ac_status=$?
10256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10257 (exit $ac_status); }; }; then
10258 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010259else
Martin v. Löwis11437992002-04-12 09:54:03 +000010260 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000010261cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010262ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010263fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010264rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10265LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010266fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010267echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
10268echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
10269if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000010270 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010271fi
10272 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000010273;;
10274esac
10275case "$ac_sys_system" in
10276BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010277echo "$as_me:$LINENO: checking for socket in -lnet" >&5
10278echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
10279if test "${ac_cv_lib_net_socket+set}" = set; then
10280 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010281else
Martin v. Löwis11437992002-04-12 09:54:03 +000010282 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010283LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010284cat >conftest.$ac_ext <<_ACEOF
10285#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000010286#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010287
Guido van Rossumad678af1998-10-02 14:42:15 +000010288/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010289#ifdef __cplusplus
10290extern "C"
10291#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010292/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010293 builtin and then its argument prototype would still apply. */
10294char socket ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000010295#ifdef F77_DUMMY_MAIN
10296# ifdef __cplusplus
10297 extern "C"
10298# endif
10299 int F77_DUMMY_MAIN() { return 1; }
10300#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010301int
10302main ()
10303{
10304socket ();
10305 ;
10306 return 0;
10307}
10308_ACEOF
10309rm -f conftest.$ac_objext conftest$ac_exeext
10310if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10311 (eval $ac_link) 2>&5
10312 ac_status=$?
10313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10314 (exit $ac_status); } &&
10315 { ac_try='test -s conftest$ac_exeext'
10316 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10317 (eval $ac_try) 2>&5
10318 ac_status=$?
10319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10320 (exit $ac_status); }; }; then
10321 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010322else
Martin v. Löwis11437992002-04-12 09:54:03 +000010323 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000010324cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010325ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010326fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010327rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10328LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010329fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010330echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
10331echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
10332if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010333 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010334fi
10335 # BeOS
10336;;
10337esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000010338
Martin v. Löwis11437992002-04-12 09:54:03 +000010339echo "$as_me:$LINENO: checking for --with-libs" >&5
10340echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
10341
Guido van Rossuma68acba1996-07-31 17:36:39 +000010342# Check whether --with-libs or --without-libs was given.
10343if test "${with_libs+set}" = set; then
10344 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000010345
10346echo "$as_me:$LINENO: result: $withval" >&5
10347echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000010348LIBS="$withval $LIBS"
10349
10350else
Martin v. Löwis11437992002-04-12 09:54:03 +000010351 echo "$as_me:$LINENO: result: no" >&5
10352echo "${ECHO_T}no" >&6
10353fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000010354
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010355# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010356
10357
Martin v. Löwis11437992002-04-12 09:54:03 +000010358echo "$as_me:$LINENO: checking for --with-signal-module" >&5
10359echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
10360
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010361# Check whether --with-signal-module or --without-signal-module was given.
10362if test "${with_signal_module+set}" = set; then
10363 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010364
Martin v. Löwis11437992002-04-12 09:54:03 +000010365fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010366
10367if test -z "$with_signal_module"
10368then with_signal_module="yes"
10369fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010370echo "$as_me:$LINENO: result: $with_signal_module" >&5
10371echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010372
10373if test "${with_signal_module}" = "yes"; then
10374 USE_SIGNAL_MODULE=""
10375 SIGNAL_OBJS=""
10376else
10377 USE_SIGNAL_MODULE="#"
10378 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10379fi
10380
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010381# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010382
Barry Warsawc0d24d82000-06-29 16:12:00 +000010383USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010384
Martin v. Löwis11437992002-04-12 09:54:03 +000010385echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
10386echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
10387
Guido van Rossumec2f0731997-01-22 20:54:01 +000010388
10389# Check whether --with-dec-threads or --without-dec-threads was given.
10390if test "${with_dec_threads+set}" = set; then
10391 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000010392
10393echo "$as_me:$LINENO: result: $withval" >&5
10394echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000010395LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000010396if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000010397 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000010398fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010399else
Martin v. Löwis11437992002-04-12 09:54:03 +000010400 echo "$as_me:$LINENO: result: no" >&5
10401echo "${ECHO_T}no" >&6
10402fi;
10403
10404# Templates for things AC_DEFINEd more than once.
10405# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010406
10407
Martin v. Löwis11437992002-04-12 09:54:03 +000010408
10409
10410
10411
10412
10413echo "$as_me:$LINENO: checking for --with-threads" >&5
10414echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
10415
Guido van Rossumec2f0731997-01-22 20:54:01 +000010416# Check whether --with-threads or --without-threads was given.
10417if test "${with_threads+set}" = set; then
10418 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000010419
Martin v. Löwis11437992002-04-12 09:54:03 +000010420fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000010421
Barry Warsawc0d24d82000-06-29 16:12:00 +000010422# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010423
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010424# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010425if test "${with_thread+set}" = set; then
10426 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010427 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000010428fi;
Barry Warsawc0d24d82000-06-29 16:12:00 +000010429
10430if test -z "$with_threads"
10431then with_threads="yes"
10432fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010433echo "$as_me:$LINENO: result: $with_threads" >&5
10434echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d82000-06-29 16:12:00 +000010435
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010436
Barry Warsawc0d24d82000-06-29 16:12:00 +000010437if test "$with_threads" = "no"
10438then
10439 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010440elif test "$ac_cv_pthread_is_default" = yes
10441then
Martin v. Löwis11437992002-04-12 09:54:03 +000010442 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010443#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010444_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010445
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010446 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010447 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010448#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010449_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010450
10451 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010452 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010453elif test "$ac_cv_kpthread" = "yes"
10454then
10455 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010456 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010457#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010458_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010459
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010460 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010461 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010462elif test "$ac_cv_kthread" = "yes"
10463then
10464 CC="$CC -Kthread"
10465 cat >>confdefs.h <<\_ACEOF
10466#define WITH_THREAD 1
10467_ACEOF
10468
10469 posix_threads=yes
10470 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010471elif test "$ac_cv_pthread" = "yes"
10472then
10473 CC="$CC -pthread"
10474 cat >>confdefs.h <<\_ACEOF
10475#define WITH_THREAD 1
10476_ACEOF
10477
10478 posix_threads=yes
10479 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010480else
10481 if test ! -z "$with_threads" -a -d "$with_threads"
10482 then LDFLAGS="$LDFLAGS -L$with_threads"
10483 fi
10484 if test ! -z "$withval" -a -d "$withval"
10485 then LDFLAGS="$LDFLAGS -L$withval"
10486 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010487
10488 # According to the POSIX spec, a pthreads implementation must
10489 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010490 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10491echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10492 cat >conftest.$ac_ext <<_ACEOF
10493#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000010494#include "confdefs.h"
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010495
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010496#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010497#ifdef _POSIX_THREADS
10498yes
10499#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010500
10501_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010502if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Martin v. Löwisf3322282003-07-13 09:46:13 +000010503 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010504 unistd_defines_pthreads=yes
10505else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010506 unistd_defines_pthreads=no
10507fi
10508rm -f conftest*
10509
Martin v. Löwis11437992002-04-12 09:54:03 +000010510 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10511echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010512
Martin v. Löwis11437992002-04-12 09:54:03 +000010513 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010514#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010515_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010516
Martin v. Löwis11437992002-04-12 09:54:03 +000010517 if test "${ac_cv_header_cthreads_h+set}" = set; then
10518 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10519echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10520if test "${ac_cv_header_cthreads_h+set}" = set; then
10521 echo $ECHO_N "(cached) $ECHO_C" >&6
10522fi
10523echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10524echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010525else
Martin v. Löwis11437992002-04-12 09:54:03 +000010526 # Is the header compilable?
10527echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10528echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10529cat >conftest.$ac_ext <<_ACEOF
10530#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000010531#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010532$ac_includes_default
10533#include <cthreads.h>
10534_ACEOF
10535rm -f conftest.$ac_objext
10536if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10537 (eval $ac_compile) 2>&5
10538 ac_status=$?
10539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10540 (exit $ac_status); } &&
10541 { ac_try='test -s conftest.$ac_objext'
10542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10543 (eval $ac_try) 2>&5
10544 ac_status=$?
10545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10546 (exit $ac_status); }; }; then
10547 ac_header_compiler=yes
10548else
10549 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000010550cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010551ac_header_compiler=no
10552fi
10553rm -f conftest.$ac_objext conftest.$ac_ext
10554echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10555echo "${ECHO_T}$ac_header_compiler" >&6
10556
10557# Is the header present?
10558echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10559echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10560cat >conftest.$ac_ext <<_ACEOF
10561#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000010562#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010563#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010564_ACEOF
10565if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10566 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10567 ac_status=$?
Martin v. Löwisf3322282003-07-13 09:46:13 +000010568 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010569 rm -f conftest.er1
10570 cat conftest.err >&5
10571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10572 (exit $ac_status); } >/dev/null; then
10573 if test -s conftest.err; then
10574 ac_cpp_err=$ac_c_preproc_warn_flag
10575 else
10576 ac_cpp_err=
10577 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010578else
Martin v. Löwis11437992002-04-12 09:54:03 +000010579 ac_cpp_err=yes
10580fi
10581if test -z "$ac_cpp_err"; then
10582 ac_header_preproc=yes
10583else
10584 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000010585 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010586 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010587fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010588rm -f conftest.err conftest.$ac_ext
10589echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10590echo "${ECHO_T}$ac_header_preproc" >&6
10591
10592# So? What about this header?
10593case $ac_header_compiler:$ac_header_preproc in
10594 yes:no )
10595 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10596echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10597 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000010598echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwis11437992002-04-12 09:54:03 +000010599 no:yes )
10600 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10601echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10602 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10603echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10604 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000010605echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwis11437992002-04-12 09:54:03 +000010606esac
10607echo "$as_me:$LINENO: checking for cthreads.h" >&5
10608echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10609if test "${ac_cv_header_cthreads_h+set}" = set; then
10610 echo $ECHO_N "(cached) $ECHO_C" >&6
10611else
10612 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010613fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010614echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10615echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10616
10617fi
10618if test $ac_cv_header_cthreads_h = yes; then
10619 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010620#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010621_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010622
Martin v. Löwis11437992002-04-12 09:54:03 +000010623 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010624#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010625_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010626
Martin v. Löwis11437992002-04-12 09:54:03 +000010627
10628cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010629#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010630_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010631
10632 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010633 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010634else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010635
Martin v. Löwis11437992002-04-12 09:54:03 +000010636 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10637 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10638echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10639if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10640 echo $ECHO_N "(cached) $ECHO_C" >&6
10641fi
10642echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10643echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010644else
Martin v. Löwis11437992002-04-12 09:54:03 +000010645 # Is the header compilable?
10646echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10647echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10648cat >conftest.$ac_ext <<_ACEOF
10649#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000010650#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010651$ac_includes_default
10652#include <mach/cthreads.h>
10653_ACEOF
10654rm -f conftest.$ac_objext
10655if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10656 (eval $ac_compile) 2>&5
10657 ac_status=$?
10658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10659 (exit $ac_status); } &&
10660 { ac_try='test -s conftest.$ac_objext'
10661 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10662 (eval $ac_try) 2>&5
10663 ac_status=$?
10664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10665 (exit $ac_status); }; }; then
10666 ac_header_compiler=yes
10667else
10668 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000010669cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010670ac_header_compiler=no
10671fi
10672rm -f conftest.$ac_objext conftest.$ac_ext
10673echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10674echo "${ECHO_T}$ac_header_compiler" >&6
10675
10676# Is the header present?
10677echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10678echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10679cat >conftest.$ac_ext <<_ACEOF
10680#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000010681#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010682#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010683_ACEOF
10684if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10685 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10686 ac_status=$?
Martin v. Löwisf3322282003-07-13 09:46:13 +000010687 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010688 rm -f conftest.er1
10689 cat conftest.err >&5
10690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10691 (exit $ac_status); } >/dev/null; then
10692 if test -s conftest.err; then
10693 ac_cpp_err=$ac_c_preproc_warn_flag
10694 else
10695 ac_cpp_err=
10696 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010697else
Martin v. Löwis11437992002-04-12 09:54:03 +000010698 ac_cpp_err=yes
10699fi
10700if test -z "$ac_cpp_err"; then
10701 ac_header_preproc=yes
10702else
10703 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000010704 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010705 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010706fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010707rm -f conftest.err conftest.$ac_ext
10708echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10709echo "${ECHO_T}$ac_header_preproc" >&6
10710
10711# So? What about this header?
10712case $ac_header_compiler:$ac_header_preproc in
10713 yes:no )
10714 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10715echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10716 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000010717echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwis11437992002-04-12 09:54:03 +000010718 no:yes )
10719 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10720echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10721 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10722echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10723 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000010724echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwis11437992002-04-12 09:54:03 +000010725esac
10726echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10727echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10728if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10729 echo $ECHO_N "(cached) $ECHO_C" >&6
10730else
10731 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010732fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010733echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10734echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10735
10736fi
10737if test $ac_cv_header_mach_cthreads_h = yes; then
10738 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010739#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010740_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010741
Martin v. Löwis11437992002-04-12 09:54:03 +000010742 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010743#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010744_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010745
Martin v. Löwis11437992002-04-12 09:54:03 +000010746
10747cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010748#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010749_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010750
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010751 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010752else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010753
Martin v. Löwis11437992002-04-12 09:54:03 +000010754 echo "$as_me:$LINENO: checking for --with-pth" >&5
10755echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10756
10757# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010758if test "${with_pth+set}" = set; then
10759 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010760 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010761echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010762 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010763#define WITH_THREAD 1
10764_ACEOF
10765
10766
10767cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010768#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010769_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010770
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010771 LIBS="-lpth $LIBS"
10772 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010773else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010774 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010775echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010776
10777 # Just looking for pthread_create in libpthread is not enough:
10778 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10779 # So we really have to include pthread.h, and then link.
10780 _libs=$LIBS
10781 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010782 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10783echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10784 cat >conftest.$ac_ext <<_ACEOF
10785#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000010786#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010787#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010788
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010789void * start_routine (void *arg) { exit (0); }
Martin v. Löwisf3322282003-07-13 09:46:13 +000010790#ifdef F77_DUMMY_MAIN
10791# ifdef __cplusplus
10792 extern "C"
10793# endif
10794 int F77_DUMMY_MAIN() { return 1; }
10795#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010796int
10797main ()
10798{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010799
10800pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010801 ;
10802 return 0;
10803}
10804_ACEOF
10805rm -f conftest.$ac_objext conftest$ac_exeext
10806if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10807 (eval $ac_link) 2>&5
10808 ac_status=$?
10809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10810 (exit $ac_status); } &&
10811 { ac_try='test -s conftest$ac_exeext'
10812 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10813 (eval $ac_try) 2>&5
10814 ac_status=$?
10815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10816 (exit $ac_status); }; }; then
10817
10818 echo "$as_me:$LINENO: result: yes" >&5
10819echo "${ECHO_T}yes" >&6
10820 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010821#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010822_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010823
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010824 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010825 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010826else
Martin v. Löwis11437992002-04-12 09:54:03 +000010827 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000010828cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010829
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010830 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010831 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10832echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10833if test "${ac_cv_func_pthread_detach+set}" = set; then
10834 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010835else
Martin v. Löwis11437992002-04-12 09:54:03 +000010836 cat >conftest.$ac_ext <<_ACEOF
10837#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000010838#include "confdefs.h"
Guido van Rossumad678af1998-10-02 14:42:15 +000010839/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwisf3322282003-07-13 09:46:13 +000010840 which can conflict with char pthread_detach (); below. */
10841#include <assert.h>
Guido van Rossumad678af1998-10-02 14:42:15 +000010842/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010843#ifdef __cplusplus
10844extern "C"
10845#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010846/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010847 builtin and then its argument prototype would still apply. */
10848char pthread_detach ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000010849char (*f) ();
10850
10851#ifdef F77_DUMMY_MAIN
10852# ifdef __cplusplus
10853 extern "C"
10854# endif
10855 int F77_DUMMY_MAIN() { return 1; }
10856#endif
10857int
10858main ()
10859{
Guido van Rossumad678af1998-10-02 14:42:15 +000010860/* The GNU C library defines this for functions which it implements
10861 to always fail with ENOSYS. Some functions are actually named
10862 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010863#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010864choke me
10865#else
Martin v. Löwisf3322282003-07-13 09:46:13 +000010866f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +000010867#endif
10868
Martin v. Löwis11437992002-04-12 09:54:03 +000010869 ;
10870 return 0;
10871}
10872_ACEOF
10873rm -f conftest.$ac_objext conftest$ac_exeext
10874if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10875 (eval $ac_link) 2>&5
10876 ac_status=$?
10877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10878 (exit $ac_status); } &&
10879 { ac_try='test -s conftest$ac_exeext'
10880 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10881 (eval $ac_try) 2>&5
10882 ac_status=$?
10883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10884 (exit $ac_status); }; }; then
10885 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010886else
Martin v. Löwis11437992002-04-12 09:54:03 +000010887 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000010888cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010889ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010890fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010891rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010892fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010893echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10894echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10895if test $ac_cv_func_pthread_detach = yes; then
10896 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010897#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010898_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010899
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010900 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010901 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010902else
Guido van Rossumad678af1998-10-02 14:42:15 +000010903
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010904 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10905 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10906echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10907if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10908 echo $ECHO_N "(cached) $ECHO_C" >&6
10909fi
10910echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10911echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10912else
10913 # Is the header compilable?
10914echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10915echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10916cat >conftest.$ac_ext <<_ACEOF
10917#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000010918#include "confdefs.h"
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010919$ac_includes_default
10920#include <atheos/threads.h>
10921_ACEOF
10922rm -f conftest.$ac_objext
10923if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10924 (eval $ac_compile) 2>&5
10925 ac_status=$?
10926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10927 (exit $ac_status); } &&
10928 { ac_try='test -s conftest.$ac_objext'
10929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10930 (eval $ac_try) 2>&5
10931 ac_status=$?
10932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10933 (exit $ac_status); }; }; then
10934 ac_header_compiler=yes
10935else
10936 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000010937cat conftest.$ac_ext >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010938ac_header_compiler=no
10939fi
10940rm -f conftest.$ac_objext conftest.$ac_ext
10941echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10942echo "${ECHO_T}$ac_header_compiler" >&6
10943
10944# Is the header present?
10945echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10946echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10947cat >conftest.$ac_ext <<_ACEOF
10948#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000010949#include "confdefs.h"
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010950#include <atheos/threads.h>
10951_ACEOF
10952if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10953 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10954 ac_status=$?
Martin v. Löwisf3322282003-07-13 09:46:13 +000010955 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010956 rm -f conftest.er1
10957 cat conftest.err >&5
10958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10959 (exit $ac_status); } >/dev/null; then
10960 if test -s conftest.err; then
10961 ac_cpp_err=$ac_c_preproc_warn_flag
10962 else
10963 ac_cpp_err=
10964 fi
10965else
10966 ac_cpp_err=yes
10967fi
10968if test -z "$ac_cpp_err"; then
10969 ac_header_preproc=yes
10970else
10971 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000010972 cat conftest.$ac_ext >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010973 ac_header_preproc=no
10974fi
10975rm -f conftest.err conftest.$ac_ext
10976echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10977echo "${ECHO_T}$ac_header_preproc" >&6
10978
10979# So? What about this header?
10980case $ac_header_compiler:$ac_header_preproc in
10981 yes:no )
10982 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10983echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10984 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000010985echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010986 no:yes )
10987 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10988echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10989 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10990echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10991 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000010992echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010993esac
10994echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10995echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10996if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10997 echo $ECHO_N "(cached) $ECHO_C" >&6
10998else
10999 ac_cv_header_atheos_threads_h=$ac_header_preproc
11000fi
11001echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
11002echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
11003
11004fi
11005if test $ac_cv_header_atheos_threads_h = yes; then
11006 cat >>confdefs.h <<\_ACEOF
11007#define WITH_THREAD 1
11008_ACEOF
11009
11010
11011cat >>confdefs.h <<\_ACEOF
11012#define ATHEOS_THREADS 1
11013_ACEOF
11014
11015 THREADOBJ="Python/thread.o"
11016else
11017
Martin v. Löwis11437992002-04-12 09:54:03 +000011018 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11019 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
11020echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
11021if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11022 echo $ECHO_N "(cached) $ECHO_C" >&6
11023fi
11024echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
11025echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011026else
Martin v. Löwis11437992002-04-12 09:54:03 +000011027 # Is the header compilable?
11028echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
11029echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
11030cat >conftest.$ac_ext <<_ACEOF
11031#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000011032#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011033$ac_includes_default
11034#include <kernel/OS.h>
11035_ACEOF
11036rm -f conftest.$ac_objext
11037if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11038 (eval $ac_compile) 2>&5
11039 ac_status=$?
11040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11041 (exit $ac_status); } &&
11042 { ac_try='test -s conftest.$ac_objext'
11043 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11044 (eval $ac_try) 2>&5
11045 ac_status=$?
11046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11047 (exit $ac_status); }; }; then
11048 ac_header_compiler=yes
11049else
11050 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000011051cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011052ac_header_compiler=no
11053fi
11054rm -f conftest.$ac_objext conftest.$ac_ext
11055echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11056echo "${ECHO_T}$ac_header_compiler" >&6
11057
11058# Is the header present?
11059echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
11060echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
11061cat >conftest.$ac_ext <<_ACEOF
11062#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000011063#include "confdefs.h"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011064#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011065_ACEOF
11066if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11067 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11068 ac_status=$?
Martin v. Löwisf3322282003-07-13 09:46:13 +000011069 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011070 rm -f conftest.er1
11071 cat conftest.err >&5
11072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11073 (exit $ac_status); } >/dev/null; then
11074 if test -s conftest.err; then
11075 ac_cpp_err=$ac_c_preproc_warn_flag
11076 else
11077 ac_cpp_err=
11078 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011079else
Martin v. Löwis11437992002-04-12 09:54:03 +000011080 ac_cpp_err=yes
11081fi
11082if test -z "$ac_cpp_err"; then
11083 ac_header_preproc=yes
11084else
11085 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000011086 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011087 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011088fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011089rm -f conftest.err conftest.$ac_ext
11090echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11091echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011092
Martin v. Löwis11437992002-04-12 09:54:03 +000011093# So? What about this header?
11094case $ac_header_compiler:$ac_header_preproc in
11095 yes:no )
11096 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
11097echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11098 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000011099echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwis11437992002-04-12 09:54:03 +000011100 no:yes )
11101 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
11102echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
11103 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
11104echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
11105 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000011106echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwis11437992002-04-12 09:54:03 +000011107esac
11108echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
11109echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
11110if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11111 echo $ECHO_N "(cached) $ECHO_C" >&6
11112else
11113 ac_cv_header_kernel_OS_h=$ac_header_preproc
11114fi
11115echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
11116echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
11117
11118fi
11119if test $ac_cv_header_kernel_OS_h = yes; then
11120 cat >>confdefs.h <<\_ACEOF
11121#define WITH_THREAD 1
11122_ACEOF
11123
11124
11125cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011126#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011127_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011128
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011129 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011130else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011131
Martin v. Löwis11437992002-04-12 09:54:03 +000011132 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
11133echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
11134if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
11135 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011136else
Martin v. Löwis11437992002-04-12 09:54:03 +000011137 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011138LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011139cat >conftest.$ac_ext <<_ACEOF
11140#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000011141#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011142
Greg Steinadf63d62000-07-05 10:38:09 +000011143/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011144#ifdef __cplusplus
11145extern "C"
11146#endif
Greg Steinadf63d62000-07-05 10:38:09 +000011147/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011148 builtin and then its argument prototype would still apply. */
11149char pthread_create ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000011150#ifdef F77_DUMMY_MAIN
11151# ifdef __cplusplus
11152 extern "C"
11153# endif
11154 int F77_DUMMY_MAIN() { return 1; }
11155#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011156int
11157main ()
11158{
11159pthread_create ();
11160 ;
11161 return 0;
11162}
11163_ACEOF
11164rm -f conftest.$ac_objext conftest$ac_exeext
11165if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11166 (eval $ac_link) 2>&5
11167 ac_status=$?
11168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11169 (exit $ac_status); } &&
11170 { ac_try='test -s conftest$ac_exeext'
11171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11172 (eval $ac_try) 2>&5
11173 ac_status=$?
11174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11175 (exit $ac_status); }; }; then
11176 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000011177else
Martin v. Löwis11437992002-04-12 09:54:03 +000011178 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000011179cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011180ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000011181fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011182rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11183LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011184fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011185echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
11186echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
11187if test $ac_cv_lib_pthreads_pthread_create = yes; then
11188 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011189#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011190_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011191
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011192 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011193 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011194 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000011195else
Greg Steinadf63d62000-07-05 10:38:09 +000011196
Martin v. Löwis11437992002-04-12 09:54:03 +000011197 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
11198echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
11199if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
11200 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000011201else
Martin v. Löwis11437992002-04-12 09:54:03 +000011202 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011203LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011204cat >conftest.$ac_ext <<_ACEOF
11205#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000011206#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011207
Guido van Rossum49545951997-12-02 19:28:29 +000011208/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011209#ifdef __cplusplus
11210extern "C"
11211#endif
Guido van Rossum49545951997-12-02 19:28:29 +000011212/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011213 builtin and then its argument prototype would still apply. */
11214char pthread_create ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000011215#ifdef F77_DUMMY_MAIN
11216# ifdef __cplusplus
11217 extern "C"
11218# endif
11219 int F77_DUMMY_MAIN() { return 1; }
11220#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011221int
11222main ()
11223{
11224pthread_create ();
11225 ;
11226 return 0;
11227}
11228_ACEOF
11229rm -f conftest.$ac_objext conftest$ac_exeext
11230if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11231 (eval $ac_link) 2>&5
11232 ac_status=$?
11233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11234 (exit $ac_status); } &&
11235 { ac_try='test -s conftest$ac_exeext'
11236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11237 (eval $ac_try) 2>&5
11238 ac_status=$?
11239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11240 (exit $ac_status); }; }; then
11241 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000011242else
Martin v. Löwis11437992002-04-12 09:54:03 +000011243 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000011244cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011245ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000011246fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011247rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11248LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000011249fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011250echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
11251echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
11252if test $ac_cv_lib_c_r_pthread_create = yes; then
11253 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011254#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011255_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011256
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011257 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011258 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011259 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011260else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011261
Martin v. Löwis11437992002-04-12 09:54:03 +000011262 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
11263echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
11264if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
11265 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011266else
Martin v. Löwis11437992002-04-12 09:54:03 +000011267 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011268LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011269cat >conftest.$ac_ext <<_ACEOF
11270#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000011271#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011272
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011273/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011274#ifdef __cplusplus
11275extern "C"
11276#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011277/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011278 builtin and then its argument prototype would still apply. */
11279char __d6_pthread_create ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000011280#ifdef F77_DUMMY_MAIN
11281# ifdef __cplusplus
11282 extern "C"
11283# endif
11284 int F77_DUMMY_MAIN() { return 1; }
11285#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011286int
11287main ()
11288{
11289__d6_pthread_create ();
11290 ;
11291 return 0;
11292}
11293_ACEOF
11294rm -f conftest.$ac_objext conftest$ac_exeext
11295if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11296 (eval $ac_link) 2>&5
11297 ac_status=$?
11298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11299 (exit $ac_status); } &&
11300 { ac_try='test -s conftest$ac_exeext'
11301 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11302 (eval $ac_try) 2>&5
11303 ac_status=$?
11304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11305 (exit $ac_status); }; }; then
11306 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011307else
Martin v. Löwis11437992002-04-12 09:54:03 +000011308 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000011309cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011310ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011311fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011312rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11313LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011314fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011315echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
11316echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
11317if test $ac_cv_lib_thread___d6_pthread_create = yes; then
11318 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011319#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011320_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011321
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011322 echo Systems with __d6_pthread_create are not supported anymore.
11323 echo See README
11324 exit 1
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011325 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011326 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011327 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000011328else
Guido van Rossum49545951997-12-02 19:28:29 +000011329
Martin v. Löwis11437992002-04-12 09:54:03 +000011330 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
11331echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
11332if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
11333 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011334else
Martin v. Löwis11437992002-04-12 09:54:03 +000011335 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011336LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011337cat >conftest.$ac_ext <<_ACEOF
11338#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000011339#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011340
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011341/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011342#ifdef __cplusplus
11343extern "C"
11344#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011345/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011346 builtin and then its argument prototype would still apply. */
11347char __pthread_create_system ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000011348#ifdef F77_DUMMY_MAIN
11349# ifdef __cplusplus
11350 extern "C"
11351# endif
11352 int F77_DUMMY_MAIN() { return 1; }
11353#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011354int
11355main ()
11356{
11357__pthread_create_system ();
11358 ;
11359 return 0;
11360}
11361_ACEOF
11362rm -f conftest.$ac_objext conftest$ac_exeext
11363if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11364 (eval $ac_link) 2>&5
11365 ac_status=$?
11366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11367 (exit $ac_status); } &&
11368 { ac_try='test -s conftest$ac_exeext'
11369 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11370 (eval $ac_try) 2>&5
11371 ac_status=$?
11372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11373 (exit $ac_status); }; }; then
11374 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011375else
Martin v. Löwis11437992002-04-12 09:54:03 +000011376 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000011377cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011378ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011379fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011380rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11381LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011382fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011383echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11384echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
11385if test $ac_cv_lib_pthread___pthread_create_system = yes; then
11386 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011387#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011388_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011389
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011390 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011391 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011392 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011393else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011394
Martin v. Löwis11437992002-04-12 09:54:03 +000011395 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
11396echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
11397if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
11398 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000011399else
Martin v. Löwis11437992002-04-12 09:54:03 +000011400 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011401LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011402cat >conftest.$ac_ext <<_ACEOF
11403#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000011404#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011405
Guido van Rossumb93a8621998-05-07 13:27:32 +000011406/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011407#ifdef __cplusplus
11408extern "C"
11409#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000011410/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011411 builtin and then its argument prototype would still apply. */
11412char pthread_create ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000011413#ifdef F77_DUMMY_MAIN
11414# ifdef __cplusplus
11415 extern "C"
11416# endif
11417 int F77_DUMMY_MAIN() { return 1; }
11418#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011419int
11420main ()
11421{
11422pthread_create ();
11423 ;
11424 return 0;
11425}
11426_ACEOF
11427rm -f conftest.$ac_objext conftest$ac_exeext
11428if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11429 (eval $ac_link) 2>&5
11430 ac_status=$?
11431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11432 (exit $ac_status); } &&
11433 { ac_try='test -s conftest$ac_exeext'
11434 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11435 (eval $ac_try) 2>&5
11436 ac_status=$?
11437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11438 (exit $ac_status); }; }; then
11439 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000011440else
Martin v. Löwis11437992002-04-12 09:54:03 +000011441 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000011442cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011443ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011444fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011445rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11446LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011447fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011448echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
11449echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
11450if test $ac_cv_lib_cma_pthread_create = yes; then
11451 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011452#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011453_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011454
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011455 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011456 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011457 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011458else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011459
Martin v. Löwis130fb172001-07-19 11:00:41 +000011460 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000011461fi
11462
Guido van Rossum627b2d71993-12-24 10:39:16 +000011463
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011464fi
11465
Guido van Rossum0be3e491997-05-22 20:33:33 +000011466fi
11467
Guido van Rossum49545951997-12-02 19:28:29 +000011468fi
11469
Guido van Rossumb93a8621998-05-07 13:27:32 +000011470fi
11471
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011472fi
11473
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011474
Michael W. Hudson54241132001-12-07 15:38:26 +000011475fi
11476
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011477
11478fi
11479
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011480fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011481rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11482fi;
11483fi
11484
11485
11486fi
11487
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011488
Michael W. Hudson54241132001-12-07 15:38:26 +000011489
Martin v. Löwis11437992002-04-12 09:54:03 +000011490 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11491echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11492if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11493 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011494else
Martin v. Löwis11437992002-04-12 09:54:03 +000011495 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011496LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011497cat >conftest.$ac_ext <<_ACEOF
11498#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000011499#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011500
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011501/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011502#ifdef __cplusplus
11503extern "C"
11504#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011505/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011506 builtin and then its argument prototype would still apply. */
11507char usconfig ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000011508#ifdef F77_DUMMY_MAIN
11509# ifdef __cplusplus
11510 extern "C"
11511# endif
11512 int F77_DUMMY_MAIN() { return 1; }
11513#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011514int
11515main ()
11516{
11517usconfig ();
11518 ;
11519 return 0;
11520}
11521_ACEOF
11522rm -f conftest.$ac_objext conftest$ac_exeext
11523if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11524 (eval $ac_link) 2>&5
11525 ac_status=$?
11526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11527 (exit $ac_status); } &&
11528 { ac_try='test -s conftest$ac_exeext'
11529 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11530 (eval $ac_try) 2>&5
11531 ac_status=$?
11532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11533 (exit $ac_status); }; }; then
11534 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011535else
Martin v. Löwis11437992002-04-12 09:54:03 +000011536 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000011537cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011538ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011539fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011540rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11541LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011542fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011543echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11544echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11545if test $ac_cv_lib_mpc_usconfig = yes; then
11546 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011547#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011548_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011549
Martin v. Löwis130fb172001-07-19 11:00:41 +000011550 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011551 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011552 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011553fi
11554
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011555
Neal Norwitza978ab02002-11-02 16:58:05 +000011556 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011557 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11558echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11559if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11560 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011561else
Martin v. Löwis11437992002-04-12 09:54:03 +000011562 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011563LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011564cat >conftest.$ac_ext <<_ACEOF
11565#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000011566#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011567
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011568/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011569#ifdef __cplusplus
11570extern "C"
11571#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011572/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011573 builtin and then its argument prototype would still apply. */
11574char thr_create ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000011575#ifdef F77_DUMMY_MAIN
11576# ifdef __cplusplus
11577 extern "C"
11578# endif
11579 int F77_DUMMY_MAIN() { return 1; }
11580#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011581int
11582main ()
11583{
11584thr_create ();
11585 ;
11586 return 0;
11587}
11588_ACEOF
11589rm -f conftest.$ac_objext conftest$ac_exeext
11590if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11591 (eval $ac_link) 2>&5
11592 ac_status=$?
11593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11594 (exit $ac_status); } &&
11595 { ac_try='test -s conftest$ac_exeext'
11596 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11597 (eval $ac_try) 2>&5
11598 ac_status=$?
11599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11600 (exit $ac_status); }; }; then
11601 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011602else
Martin v. Löwis11437992002-04-12 09:54:03 +000011603 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000011604cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011605ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011606fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011607rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11608LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011609fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011610echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11611echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11612if test $ac_cv_lib_thread_thr_create = yes; then
11613 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011614#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011615_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011616
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011617 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011618 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011619 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011620fi
11621
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011622 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011623
Martin v. Löwis130fb172001-07-19 11:00:41 +000011624 if test "$USE_THREAD_MODULE" != "#"
11625 then
11626 # If the above checks didn't disable threads, (at least) OSF1
11627 # needs this '-threads' argument during linking.
11628 case $ac_sys_system in
11629 OSF1) LDLAST=-threads;;
11630 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011631 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011632fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011633
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011634if test "$posix_threads" = "yes"; then
11635 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011636
11637cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011638#define _POSIX_THREADS 1
11639_ACEOF
11640
11641 fi
11642
11643 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11644 case $ac_sys_system/$ac_sys_release in
11645 SunOS/5.6)
11646cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011647#define HAVE_PTHREAD_DESTRUCTOR 1
11648_ACEOF
11649
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011650 ;;
11651 SunOS/5.8)
11652cat >>confdefs.h <<\_ACEOF
11653#define HAVE_BROKEN_POSIX_SEMAPHORES 1
11654_ACEOF
11655
11656 ;;
11657 esac
11658
11659 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11660echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11661 if test "${ac_cv_pthread_system_supported+set}" = set; then
11662 echo $ECHO_N "(cached) $ECHO_C" >&6
11663else
11664 if test "$cross_compiling" = yes; then
11665 ac_cv_pthread_system_supported=no
11666else
11667 cat >conftest.$ac_ext <<_ACEOF
11668#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000011669#include "confdefs.h"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011670#include <pthread.h>
11671 void *foo(void *parm) {
11672 return NULL;
11673 }
11674 main() {
11675 pthread_attr_t attr;
11676 pthread_t id;
11677 if (pthread_attr_init(&attr)) exit(-1);
11678 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
11679 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
11680 exit(0);
11681 }
11682_ACEOF
11683rm -f conftest$ac_exeext
11684if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11685 (eval $ac_link) 2>&5
11686 ac_status=$?
11687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11688 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11689 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11690 (eval $ac_try) 2>&5
11691 ac_status=$?
11692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11693 (exit $ac_status); }; }; then
11694 ac_cv_pthread_system_supported=yes
11695else
11696 echo "$as_me: program exited with status $ac_status" >&5
11697echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000011698cat conftest.$ac_ext >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011699( exit $ac_status )
11700ac_cv_pthread_system_supported=no
11701fi
Martin v. Löwisf3322282003-07-13 09:46:13 +000011702rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011703fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011704
Guido van Rossum627b2d71993-12-24 10:39:16 +000011705fi
11706
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011707 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11708echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
11709 if test "$ac_cv_pthread_system_supported" = "yes"; then
11710
11711cat >>confdefs.h <<\_ACEOF
11712#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
11713_ACEOF
11714
11715 fi
11716
11717for ac_func in pthread_sigmask
11718do
11719as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11720echo "$as_me:$LINENO: checking for $ac_func" >&5
11721echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11722if eval "test \"\${$as_ac_var+set}\" = set"; then
11723 echo $ECHO_N "(cached) $ECHO_C" >&6
11724else
11725 cat >conftest.$ac_ext <<_ACEOF
11726#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000011727#include "confdefs.h"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011728/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwisf3322282003-07-13 09:46:13 +000011729 which can conflict with char $ac_func (); below. */
11730#include <assert.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011731/* Override any gcc2 internal prototype to avoid an error. */
11732#ifdef __cplusplus
11733extern "C"
11734#endif
11735/* We use char because int might match the return type of a gcc2
11736 builtin and then its argument prototype would still apply. */
11737char $ac_func ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000011738char (*f) ();
11739
11740#ifdef F77_DUMMY_MAIN
11741# ifdef __cplusplus
11742 extern "C"
11743# endif
11744 int F77_DUMMY_MAIN() { return 1; }
11745#endif
11746int
11747main ()
11748{
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011749/* The GNU C library defines this for functions which it implements
11750 to always fail with ENOSYS. Some functions are actually named
11751 something starting with __ and the normal name is an alias. */
11752#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11753choke me
11754#else
Martin v. Löwisf3322282003-07-13 09:46:13 +000011755f = $ac_func;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011756#endif
11757
11758 ;
11759 return 0;
11760}
11761_ACEOF
11762rm -f conftest.$ac_objext conftest$ac_exeext
11763if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11764 (eval $ac_link) 2>&5
11765 ac_status=$?
11766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11767 (exit $ac_status); } &&
11768 { ac_try='test -s conftest$ac_exeext'
11769 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11770 (eval $ac_try) 2>&5
11771 ac_status=$?
11772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11773 (exit $ac_status); }; }; then
11774 eval "$as_ac_var=yes"
11775else
11776 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000011777cat conftest.$ac_ext >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011778eval "$as_ac_var=no"
11779fi
11780rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11781fi
11782echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11783echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11784if test `eval echo '${'$as_ac_var'}'` = yes; then
11785 cat >>confdefs.h <<_ACEOF
11786#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11787_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011788 case $ac_sys_system in
11789 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011790
Jason Tishlerfac083d2003-07-22 15:20:49 +000011791cat >>confdefs.h <<\_ACEOF
11792#define HAVE_BROKEN_PTHREAD_SIGMASK 1
11793_ACEOF
11794
11795 ;;
11796 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011797fi
11798done
11799
11800fi
11801
11802
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011803# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011804
11805
11806echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11807echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011808# Check whether --enable-ipv6 or --disable-ipv6 was given.
11809if test "${enable_ipv6+set}" = set; then
11810 enableval="$enable_ipv6"
11811 case "$enableval" in
11812 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011813 echo "$as_me:$LINENO: result: no" >&5
11814echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011815 ipv6=no
11816 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011817 *) echo "$as_me:$LINENO: result: yes" >&5
11818echo "${ECHO_T}yes" >&6
11819 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011820#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011821_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011822
11823 ipv6=yes
11824 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011825 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011826else
Martin v. Löwis11437992002-04-12 09:54:03 +000011827
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011828 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011829 echo "$as_me:$LINENO: result: no" >&5
11830echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011831 ipv6=no
11832
11833else
Martin v. Löwis11437992002-04-12 09:54:03 +000011834 cat >conftest.$ac_ext <<_ACEOF
11835#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000011836#include "confdefs.h"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011837 /* AF_INET6 available check */
11838#include <sys/types.h>
11839#include <sys/socket.h>
11840main()
11841{
11842 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11843 exit(1);
11844 else
11845 exit(0);
11846}
11847
Martin v. Löwis11437992002-04-12 09:54:03 +000011848_ACEOF
11849rm -f conftest$ac_exeext
11850if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11851 (eval $ac_link) 2>&5
11852 ac_status=$?
11853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11854 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11855 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11856 (eval $ac_try) 2>&5
11857 ac_status=$?
11858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11859 (exit $ac_status); }; }; then
11860 echo "$as_me:$LINENO: result: yes" >&5
11861echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011862 ipv6=yes
11863else
Martin v. Löwis11437992002-04-12 09:54:03 +000011864 echo "$as_me: program exited with status $ac_status" >&5
11865echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000011866cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011867( exit $ac_status )
11868echo "$as_me:$LINENO: result: no" >&5
11869echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011870 ipv6=no
11871fi
Martin v. Löwisf3322282003-07-13 09:46:13 +000011872rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011873fi
11874
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011875if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011876 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11877echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11878 cat >conftest.$ac_ext <<_ACEOF
11879#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000011880#include "confdefs.h"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011881#include <sys/types.h>
11882#include <netinet/in.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +000011883#ifdef F77_DUMMY_MAIN
11884# ifdef __cplusplus
11885 extern "C"
11886# endif
11887 int F77_DUMMY_MAIN() { return 1; }
11888#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011889int
11890main ()
11891{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011892struct sockaddr_in6 x;
11893x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011894 ;
11895 return 0;
11896}
11897_ACEOF
11898rm -f conftest.$ac_objext
11899if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11900 (eval $ac_compile) 2>&5
11901 ac_status=$?
11902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11903 (exit $ac_status); } &&
11904 { ac_try='test -s conftest.$ac_objext'
11905 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11906 (eval $ac_try) 2>&5
11907 ac_status=$?
11908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11909 (exit $ac_status); }; }; then
11910 echo "$as_me:$LINENO: result: yes" >&5
11911echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011912 ipv6=yes
11913else
Martin v. Löwis11437992002-04-12 09:54:03 +000011914 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000011915cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011916echo "$as_me:$LINENO: result: no" >&5
11917echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011918 ipv6=no
11919fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011920rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011921fi
11922
11923if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011924 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011925#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011926_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011927
11928fi
11929
Martin v. Löwis11437992002-04-12 09:54:03 +000011930fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011931
11932ipv6type=unknown
11933ipv6lib=none
11934ipv6trylibc=no
11935
11936if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011937 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11938echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011939 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11940 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011941 case $i in
11942 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011943 cat >conftest.$ac_ext <<_ACEOF
11944#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000011945#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011946
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011947#include <netinet/in.h>
11948#ifdef IPV6_INRIA_VERSION
11949yes
11950#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011951_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011952if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Martin v. Löwisf3322282003-07-13 09:46:13 +000011953 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011954 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011955fi
11956rm -f conftest*
11957
11958 ;;
11959 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011960 cat >conftest.$ac_ext <<_ACEOF
11961#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000011962#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011963
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011964#include <netinet/in.h>
11965#ifdef __KAME__
11966yes
11967#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011968_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011969if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Martin v. Löwisf3322282003-07-13 09:46:13 +000011970 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011971 ipv6type=$i;
11972 ipv6lib=inet6
11973 ipv6libdir=/usr/local/v6/lib
11974 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011975fi
11976rm -f conftest*
11977
11978 ;;
11979 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011980 cat >conftest.$ac_ext <<_ACEOF
11981#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000011982#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011983
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011984#include <features.h>
11985#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11986yes
11987#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011988_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011989if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Martin v. Löwisf3322282003-07-13 09:46:13 +000011990 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011991 ipv6type=$i;
11992 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011993fi
11994rm -f conftest*
11995
11996 ;;
11997 linux-inet6)
11998 if test -d /usr/inet6; then
11999 ipv6type=$i
12000 ipv6lib=inet6
12001 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000012002 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012003 fi
12004 ;;
12005 solaris)
12006 if test -f /etc/netconfig; then
12007 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
12008 ipv6type=$i
12009 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012010 fi
12011 fi
12012 ;;
12013 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000012014 cat >conftest.$ac_ext <<_ACEOF
12015#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000012016#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012017
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012018#include <sys/param.h>
12019#ifdef _TOSHIBA_INET6
12020yes
12021#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012022_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012023if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Martin v. Löwisf3322282003-07-13 09:46:13 +000012024 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012025 ipv6type=$i;
12026 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012027 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012028fi
12029rm -f conftest*
12030
12031 ;;
12032 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000012033 cat >conftest.$ac_ext <<_ACEOF
12034#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000012035#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012036
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012037#include </usr/local/v6/include/sys/v6config.h>
12038#ifdef __V6D__
12039yes
12040#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012041_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012042if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Martin v. Löwisf3322282003-07-13 09:46:13 +000012043 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012044 ipv6type=$i;
12045 ipv6lib=v6;
12046 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000012047 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012048fi
12049rm -f conftest*
12050
12051 ;;
12052 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000012053 cat >conftest.$ac_ext <<_ACEOF
12054#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000012055#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012056
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012057#include <sys/param.h>
12058#ifdef _ZETA_MINAMI_INET6
12059yes
12060#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012061_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012062if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Martin v. Löwisf3322282003-07-13 09:46:13 +000012063 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012064 ipv6type=$i;
12065 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012066 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012067fi
12068rm -f conftest*
12069
12070 ;;
12071 esac
12072 if test "$ipv6type" != "unknown"; then
12073 break
12074 fi
12075 done
Martin v. Löwis11437992002-04-12 09:54:03 +000012076 echo "$as_me:$LINENO: result: $ipv6type" >&5
12077echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012078fi
12079
12080if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
12081 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
12082 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
12083 echo "using lib$ipv6lib"
12084 else
12085 if test $ipv6trylibc = "yes"; then
12086 echo "using libc"
12087 else
12088 echo 'Fatal: no $ipv6lib library found. cannot continue.'
12089 echo "You need to fetch lib$ipv6lib.a from appropriate"
12090 echo 'ipv6 kit and compile beforehand.'
12091 exit 1
12092 fi
12093 fi
12094fi
12095
Jack Jansen7b8c7542002-04-14 20:12:41 +000012096# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000012097echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
12098echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000012099
12100# Check whether --with-universal-newlines or --without-universal-newlines was given.
12101if test "${with_universal_newlines+set}" = set; then
12102 withval="$with_universal_newlines"
12103
12104fi;
12105
12106if test -z "$with_universal_newlines"
12107then with_universal_newlines="yes"
12108fi
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000012109if test "$with_universal_newlines" = "no"
Martin v. Löwis03d00d52002-12-19 19:03:31 +000012110then
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000012111 echo --without-universal-newlines is unsupported, see README
12112 exit 1
Martin v. Löwis03d00d52002-12-19 19:03:31 +000012113else
Martin v. Löwise8aea582002-04-16 05:51:02 +000012114
12115cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000012116#define WITH_UNIVERSAL_NEWLINES 1
12117_ACEOF
12118
12119fi
12120echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
12121echo "${ECHO_T}$with_universal_newlines" >&6
12122
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000012123# Check for --with-doc-strings
12124echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
12125echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
12126
12127# Check whether --with-doc-strings or --without-doc-strings was given.
12128if test "${with_doc_strings+set}" = set; then
12129 withval="$with_doc_strings"
12130
12131fi;
12132
12133if test -z "$with_doc_strings"
12134then with_doc_strings="yes"
12135fi
12136if test "$with_doc_strings" != "no"
12137then
12138
12139cat >>confdefs.h <<\_ACEOF
12140#define WITH_DOC_STRINGS 1
12141_ACEOF
12142
12143fi
12144echo "$as_me:$LINENO: result: $with_doc_strings" >&5
12145echo "${ECHO_T}$with_doc_strings" >&6
12146
Neil Schemenauera35c6882001-02-27 04:45:05 +000012147# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000012148echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
12149echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
12150
Neil Schemenauera35c6882001-02-27 04:45:05 +000012151# Check whether --with-pymalloc or --without-pymalloc was given.
12152if test "${with_pymalloc+set}" = set; then
12153 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000012154
Martin v. Löwis11437992002-04-12 09:54:03 +000012155fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000012156
Neil Schemenauer16c22972002-03-22 15:34:49 +000012157if test -z "$with_pymalloc"
12158then with_pymalloc="yes"
12159fi
12160if test "$with_pymalloc" != "no"
12161then
Martin v. Löwis11437992002-04-12 09:54:03 +000012162
12163cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012164#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012165_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012166
12167fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012168echo "$as_me:$LINENO: result: $with_pymalloc" >&5
12169echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000012170
Barry Warsawef82cd72000-06-30 16:21:01 +000012171# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012172echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
12173echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
12174
Barry Warsawef82cd72000-06-30 16:21:01 +000012175# Check whether --with-wctype-functions or --without-wctype-functions was given.
12176if test "${with_wctype_functions+set}" = set; then
12177 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000012178
Barry Warsawef82cd72000-06-30 16:21:01 +000012179if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012180then
12181
12182cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000012183#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012184_ACEOF
12185
12186 echo "$as_me:$LINENO: result: yes" >&5
12187echo "${ECHO_T}yes" >&6
12188else echo "$as_me:$LINENO: result: no" >&5
12189echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000012190fi
12191else
Martin v. Löwis11437992002-04-12 09:54:03 +000012192 echo "$as_me:$LINENO: result: no" >&5
12193echo "${ECHO_T}no" >&6
12194fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000012195
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012196# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000012197
Guido van Rossum98935bf2001-09-05 19:13:16 +000012198DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000012199
Martin v. Löwis11437992002-04-12 09:54:03 +000012200echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
12201echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
12202
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012203# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012204if test "${with_sgi_dl+set}" = set; then
12205 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000012206
12207echo "$as_me:$LINENO: result: $withval" >&5
12208echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000012209echo --with-sgi-dl is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000012210exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012211
12212cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012213#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012214_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000012215
Guido van Rossume97ee181999-12-20 21:27:22 +000012216DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012217dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000012218if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000012219then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000012220else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
12221echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
12222 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012223fi
12224DLINCLDIR=${dldir}
12225LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000012226else
Martin v. Löwis11437992002-04-12 09:54:03 +000012227 echo "$as_me:$LINENO: result: no" >&5
12228echo "${ECHO_T}no" >&6
12229fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000012230
Martin v. Löwis11437992002-04-12 09:54:03 +000012231echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
12232echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000012233
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012234# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012235if test "${with_dl_dld+set}" = set; then
12236 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000012237
12238echo "$as_me:$LINENO: result: $withval" >&5
12239echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000012240echo --with-dl-dld is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000012241exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012242
12243cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012244#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012245_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000012246
Guido van Rossume97ee181999-12-20 21:27:22 +000012247DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012248dldir=`echo "$withval" | sed 's/,.*//'`
12249dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000012250if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000012251then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012252else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&5
12253echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&2;}
12254 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012255fi
12256DLINCLDIR=${dldir}
12257LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000012258else
Martin v. Löwis11437992002-04-12 09:54:03 +000012259 echo "$as_me:$LINENO: result: no" >&5
12260echo "${ECHO_T}no" >&6
12261fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000012262
Guido van Rossume97ee181999-12-20 21:27:22 +000012263# the dlopen() function means we might want to use dynload_shlib.o. some
12264# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012265
Thomas Wouters3a584202000-08-05 23:28:51 +000012266for ac_func in dlopen
12267do
Martin v. Löwis11437992002-04-12 09:54:03 +000012268as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12269echo "$as_me:$LINENO: checking for $ac_func" >&5
12270echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12271if eval "test \"\${$as_ac_var+set}\" = set"; then
12272 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012273else
Martin v. Löwis11437992002-04-12 09:54:03 +000012274 cat >conftest.$ac_ext <<_ACEOF
12275#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000012276#include "confdefs.h"
Guido van Rossume97ee181999-12-20 21:27:22 +000012277/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwisf3322282003-07-13 09:46:13 +000012278 which can conflict with char $ac_func (); below. */
12279#include <assert.h>
Guido van Rossume97ee181999-12-20 21:27:22 +000012280/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012281#ifdef __cplusplus
12282extern "C"
12283#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012284/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012285 builtin and then its argument prototype would still apply. */
12286char $ac_func ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000012287char (*f) ();
12288
12289#ifdef F77_DUMMY_MAIN
12290# ifdef __cplusplus
12291 extern "C"
12292# endif
12293 int F77_DUMMY_MAIN() { return 1; }
12294#endif
12295int
12296main ()
12297{
Guido van Rossume97ee181999-12-20 21:27:22 +000012298/* The GNU C library defines this for functions which it implements
12299 to always fail with ENOSYS. Some functions are actually named
12300 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012301#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000012302choke me
12303#else
Martin v. Löwisf3322282003-07-13 09:46:13 +000012304f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000012305#endif
12306
Martin v. Löwis11437992002-04-12 09:54:03 +000012307 ;
12308 return 0;
12309}
12310_ACEOF
12311rm -f conftest.$ac_objext conftest$ac_exeext
12312if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12313 (eval $ac_link) 2>&5
12314 ac_status=$?
12315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12316 (exit $ac_status); } &&
12317 { ac_try='test -s conftest$ac_exeext'
12318 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12319 (eval $ac_try) 2>&5
12320 ac_status=$?
12321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12322 (exit $ac_status); }; }; then
12323 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012324else
Martin v. Löwis11437992002-04-12 09:54:03 +000012325 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000012326cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012327eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012328fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012329rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012330fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012331echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12332echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12333if test `eval echo '${'$as_ac_var'}'` = yes; then
12334 cat >>confdefs.h <<_ACEOF
12335#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12336_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012337
Guido van Rossume97ee181999-12-20 21:27:22 +000012338fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012339done
Guido van Rossume97ee181999-12-20 21:27:22 +000012340
Michael W. Hudson54241132001-12-07 15:38:26 +000012341
Guido van Rossume97ee181999-12-20 21:27:22 +000012342# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12343# loading of modules.
12344
Martin v. Löwis11437992002-04-12 09:54:03 +000012345echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
12346echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012347if test -z "$DYNLOADFILE"
12348then
12349 case $ac_sys_system/$ac_sys_release in
12350 AIX*) DYNLOADFILE="dynload_aix.o";;
12351 BeOS*) DYNLOADFILE="dynload_beos.o";;
12352 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000012353 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012354 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000012355 *)
12356 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
12357 # out any dynamic loading
12358 if test "$ac_cv_func_dlopen" = yes
12359 then DYNLOADFILE="dynload_shlib.o"
12360 else DYNLOADFILE="dynload_stub.o"
12361 fi
12362 ;;
12363 esac
12364fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012365echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
12366echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012367if test "$DYNLOADFILE" != "dynload_stub.o"
12368then
Martin v. Löwis11437992002-04-12 09:54:03 +000012369
12370cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012371#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012372_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012373
12374fi
12375
Neil Schemenauer4e425612001-06-19 15:44:15 +000012376# MACHDEP_OBJS can be set to platform-specific object files needed by Python
12377
Michael W. Hudson54241132001-12-07 15:38:26 +000012378
Martin v. Löwis11437992002-04-12 09:54:03 +000012379echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
12380echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012381if test -z "$MACHDEP_OBJS"
12382then
Jack Jansene578a632001-08-15 01:27:14 +000012383 MACHDEP_OBJS=$extra_machdep_objs
12384else
12385 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000012386fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012387echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
12388echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012389
Guido van Rossum627b2d71993-12-24 10:39:16 +000012390# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
12459
12460
12461
12462
12463
Martin v. Löwis9c36c292002-12-21 18:34:06 +000012464
Martin v. Löwisd5843682002-11-21 20:41:28 +000012465for ac_func in alarm chown clock confstr ctermid execv \
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012466 fchdir fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012467 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
12468 getpriority getpwent getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000012469 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000012470 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000012471 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000012472 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000012473 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012474 sigaction siginterrupt sigrelse strftime strptime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000012475 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012476 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000012477do
Martin v. Löwis11437992002-04-12 09:54:03 +000012478as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12479echo "$as_me:$LINENO: checking for $ac_func" >&5
12480echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12481if eval "test \"\${$as_ac_var+set}\" = set"; then
12482 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012483else
Martin v. Löwis11437992002-04-12 09:54:03 +000012484 cat >conftest.$ac_ext <<_ACEOF
12485#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000012486#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012487/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwisf3322282003-07-13 09:46:13 +000012488 which can conflict with char $ac_func (); below. */
12489#include <assert.h>
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012490/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012491#ifdef __cplusplus
12492extern "C"
12493#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012494/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012495 builtin and then its argument prototype would still apply. */
12496char $ac_func ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000012497char (*f) ();
12498
12499#ifdef F77_DUMMY_MAIN
12500# ifdef __cplusplus
12501 extern "C"
12502# endif
12503 int F77_DUMMY_MAIN() { return 1; }
12504#endif
12505int
12506main ()
12507{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012508/* The GNU C library defines this for functions which it implements
12509 to always fail with ENOSYS. Some functions are actually named
12510 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012511#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012512choke me
12513#else
Martin v. Löwisf3322282003-07-13 09:46:13 +000012514f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012515#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012516
Martin v. Löwis11437992002-04-12 09:54:03 +000012517 ;
12518 return 0;
12519}
12520_ACEOF
12521rm -f conftest.$ac_objext conftest$ac_exeext
12522if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12523 (eval $ac_link) 2>&5
12524 ac_status=$?
12525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12526 (exit $ac_status); } &&
12527 { ac_try='test -s conftest$ac_exeext'
12528 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12529 (eval $ac_try) 2>&5
12530 ac_status=$?
12531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12532 (exit $ac_status); }; }; then
12533 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012534else
Martin v. Löwis11437992002-04-12 09:54:03 +000012535 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000012536cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012537eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012538fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012539rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012540fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012541echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12542echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12543if test `eval echo '${'$as_ac_var'}'` = yes; then
12544 cat >>confdefs.h <<_ACEOF
12545#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12546_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012547
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012548fi
12549done
12550
Michael W. Hudson54241132001-12-07 15:38:26 +000012551
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012552# For some functions, having a definition is not sufficient, since
12553# we want to take their address.
12554echo "$as_me:$LINENO: checking for chroot" >&5
12555echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12556cat >conftest.$ac_ext <<_ACEOF
12557#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000012558#include "confdefs.h"
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012559#include <unistd.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +000012560#ifdef F77_DUMMY_MAIN
12561# ifdef __cplusplus
12562 extern "C"
12563# endif
12564 int F77_DUMMY_MAIN() { return 1; }
12565#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012566int
12567main ()
12568{
12569void *x=chroot
12570 ;
12571 return 0;
12572}
12573_ACEOF
12574rm -f conftest.$ac_objext
12575if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12576 (eval $ac_compile) 2>&5
12577 ac_status=$?
12578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12579 (exit $ac_status); } &&
12580 { ac_try='test -s conftest.$ac_objext'
12581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12582 (eval $ac_try) 2>&5
12583 ac_status=$?
12584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12585 (exit $ac_status); }; }; then
12586
12587cat >>confdefs.h <<\_ACEOF
12588#define HAVE_CHROOT 1
12589_ACEOF
12590
12591 echo "$as_me:$LINENO: result: yes" >&5
12592echo "${ECHO_T}yes" >&6
12593else
12594 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000012595cat conftest.$ac_ext >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012596echo "$as_me:$LINENO: result: no" >&5
12597echo "${ECHO_T}no" >&6
12598
12599fi
12600rm -f conftest.$ac_objext conftest.$ac_ext
12601echo "$as_me:$LINENO: checking for link" >&5
12602echo $ECHO_N "checking for link... $ECHO_C" >&6
12603cat >conftest.$ac_ext <<_ACEOF
12604#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000012605#include "confdefs.h"
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012606#include <unistd.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +000012607#ifdef F77_DUMMY_MAIN
12608# ifdef __cplusplus
12609 extern "C"
12610# endif
12611 int F77_DUMMY_MAIN() { return 1; }
12612#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012613int
12614main ()
12615{
12616void *x=link
12617 ;
12618 return 0;
12619}
12620_ACEOF
12621rm -f conftest.$ac_objext
12622if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12623 (eval $ac_compile) 2>&5
12624 ac_status=$?
12625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12626 (exit $ac_status); } &&
12627 { ac_try='test -s conftest.$ac_objext'
12628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12629 (eval $ac_try) 2>&5
12630 ac_status=$?
12631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12632 (exit $ac_status); }; }; then
12633
12634cat >>confdefs.h <<\_ACEOF
12635#define HAVE_LINK 1
12636_ACEOF
12637
12638 echo "$as_me:$LINENO: result: yes" >&5
12639echo "${ECHO_T}yes" >&6
12640else
12641 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000012642cat conftest.$ac_ext >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012643echo "$as_me:$LINENO: result: no" >&5
12644echo "${ECHO_T}no" >&6
12645
12646fi
12647rm -f conftest.$ac_objext conftest.$ac_ext
12648echo "$as_me:$LINENO: checking for symlink" >&5
12649echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12650cat >conftest.$ac_ext <<_ACEOF
12651#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000012652#include "confdefs.h"
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012653#include <unistd.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +000012654#ifdef F77_DUMMY_MAIN
12655# ifdef __cplusplus
12656 extern "C"
12657# endif
12658 int F77_DUMMY_MAIN() { return 1; }
12659#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012660int
12661main ()
12662{
12663void *x=symlink
12664 ;
12665 return 0;
12666}
12667_ACEOF
12668rm -f conftest.$ac_objext
12669if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12670 (eval $ac_compile) 2>&5
12671 ac_status=$?
12672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12673 (exit $ac_status); } &&
12674 { ac_try='test -s conftest.$ac_objext'
12675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12676 (eval $ac_try) 2>&5
12677 ac_status=$?
12678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12679 (exit $ac_status); }; }; then
12680
12681cat >>confdefs.h <<\_ACEOF
12682#define HAVE_SYMLINK 1
12683_ACEOF
12684
12685 echo "$as_me:$LINENO: result: yes" >&5
12686echo "${ECHO_T}yes" >&6
12687else
12688 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000012689cat conftest.$ac_ext >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012690echo "$as_me:$LINENO: result: no" >&5
12691echo "${ECHO_T}no" >&6
12692
12693fi
12694rm -f conftest.$ac_objext conftest.$ac_ext
12695
Martin v. Löwisd5843682002-11-21 20:41:28 +000012696# On some systems (eg. FreeBSD 5), we would find a definition of the
12697# functions ctermid_r, setgroups in the library, but no prototype
12698# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12699# address to avoid compiler warnings and potential miscompilations
12700# because of the missing prototypes.
12701
12702echo "$as_me:$LINENO: checking for ctermid_r" >&5
12703echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
12704cat >conftest.$ac_ext <<_ACEOF
12705#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000012706#include "confdefs.h"
Martin v. Löwisd5843682002-11-21 20:41:28 +000012707
12708#include "confdefs.h"
12709#include <stdio.h>
12710
Martin v. Löwisf3322282003-07-13 09:46:13 +000012711#ifdef F77_DUMMY_MAIN
12712# ifdef __cplusplus
12713 extern "C"
12714# endif
12715 int F77_DUMMY_MAIN() { return 1; }
12716#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012717int
12718main ()
12719{
12720void* p = ctermid_r
12721 ;
12722 return 0;
12723}
12724_ACEOF
12725rm -f conftest.$ac_objext
12726if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12727 (eval $ac_compile) 2>&5
12728 ac_status=$?
12729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12730 (exit $ac_status); } &&
12731 { ac_try='test -s conftest.$ac_objext'
12732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12733 (eval $ac_try) 2>&5
12734 ac_status=$?
12735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12736 (exit $ac_status); }; }; then
12737
12738cat >>confdefs.h <<\_ACEOF
12739#define HAVE_CTERMID_R 1
12740_ACEOF
12741
12742 echo "$as_me:$LINENO: result: yes" >&5
12743echo "${ECHO_T}yes" >&6
12744else
12745 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000012746cat conftest.$ac_ext >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000012747echo "$as_me:$LINENO: result: no" >&5
12748echo "${ECHO_T}no" >&6
12749
12750fi
12751rm -f conftest.$ac_objext conftest.$ac_ext
12752
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012753echo "$as_me:$LINENO: checking for flock" >&5
12754echo $ECHO_N "checking for flock... $ECHO_C" >&6
12755cat >conftest.$ac_ext <<_ACEOF
12756#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000012757#include "confdefs.h"
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012758
12759#include "confdefs.h"
12760#include <sys/file.h>
12761
Martin v. Löwisf3322282003-07-13 09:46:13 +000012762#ifdef F77_DUMMY_MAIN
12763# ifdef __cplusplus
12764 extern "C"
12765# endif
12766 int F77_DUMMY_MAIN() { return 1; }
12767#endif
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012768int
12769main ()
12770{
12771void* p = flock
12772 ;
12773 return 0;
12774}
12775_ACEOF
12776rm -f conftest.$ac_objext
12777if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12778 (eval $ac_compile) 2>&5
12779 ac_status=$?
12780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12781 (exit $ac_status); } &&
12782 { ac_try='test -s conftest.$ac_objext'
12783 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12784 (eval $ac_try) 2>&5
12785 ac_status=$?
12786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12787 (exit $ac_status); }; }; then
12788
12789cat >>confdefs.h <<\_ACEOF
12790#define HAVE_FLOCK 1
12791_ACEOF
12792
12793 echo "$as_me:$LINENO: result: yes" >&5
12794echo "${ECHO_T}yes" >&6
12795else
12796 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000012797cat conftest.$ac_ext >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012798echo "$as_me:$LINENO: result: no" >&5
12799echo "${ECHO_T}no" >&6
12800
12801fi
12802rm -f conftest.$ac_objext conftest.$ac_ext
12803
12804echo "$as_me:$LINENO: checking for getpagesize" >&5
12805echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
12806cat >conftest.$ac_ext <<_ACEOF
12807#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000012808#include "confdefs.h"
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012809
12810#include "confdefs.h"
12811#include <unistd.h>
12812
Martin v. Löwisf3322282003-07-13 09:46:13 +000012813#ifdef F77_DUMMY_MAIN
12814# ifdef __cplusplus
12815 extern "C"
12816# endif
12817 int F77_DUMMY_MAIN() { return 1; }
12818#endif
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012819int
12820main ()
12821{
12822void* p = getpagesize
12823 ;
12824 return 0;
12825}
12826_ACEOF
12827rm -f conftest.$ac_objext
12828if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12829 (eval $ac_compile) 2>&5
12830 ac_status=$?
12831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12832 (exit $ac_status); } &&
12833 { ac_try='test -s conftest.$ac_objext'
12834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12835 (eval $ac_try) 2>&5
12836 ac_status=$?
12837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12838 (exit $ac_status); }; }; then
12839
12840cat >>confdefs.h <<\_ACEOF
12841#define HAVE_GETPAGESIZE 1
12842_ACEOF
12843
12844 echo "$as_me:$LINENO: result: yes" >&5
12845echo "${ECHO_T}yes" >&6
12846else
12847 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000012848cat conftest.$ac_ext >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012849echo "$as_me:$LINENO: result: no" >&5
12850echo "${ECHO_T}no" >&6
12851
12852fi
12853rm -f conftest.$ac_objext conftest.$ac_ext
12854
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012855for ac_prog in true
12856do
12857 # Extract the first word of "$ac_prog", so it can be a program name with args.
12858set dummy $ac_prog; ac_word=$2
12859echo "$as_me:$LINENO: checking for $ac_word" >&5
12860echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12861if test "${ac_cv_prog_TRUE+set}" = set; then
12862 echo $ECHO_N "(cached) $ECHO_C" >&6
12863else
12864 if test -n "$TRUE"; then
12865 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12866else
12867as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12868for as_dir in $PATH
12869do
12870 IFS=$as_save_IFS
12871 test -z "$as_dir" && as_dir=.
12872 for ac_exec_ext in '' $ac_executable_extensions; do
12873 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12874 ac_cv_prog_TRUE="$ac_prog"
12875 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12876 break 2
12877 fi
12878done
12879done
12880
12881fi
12882fi
12883TRUE=$ac_cv_prog_TRUE
12884if test -n "$TRUE"; then
12885 echo "$as_me:$LINENO: result: $TRUE" >&5
12886echo "${ECHO_T}$TRUE" >&6
12887else
12888 echo "$as_me:$LINENO: result: no" >&5
12889echo "${ECHO_T}no" >&6
12890fi
12891
12892 test -n "$TRUE" && break
12893done
12894test -n "$TRUE" || TRUE="/bin/true"
12895
12896
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012897echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
12898echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
12899if test "${ac_cv_lib_c_inet_aton+set}" = set; then
12900 echo $ECHO_N "(cached) $ECHO_C" >&6
12901else
12902 ac_check_lib_save_LIBS=$LIBS
12903LIBS="-lc $LIBS"
12904cat >conftest.$ac_ext <<_ACEOF
12905#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000012906#include "confdefs.h"
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012907
12908/* Override any gcc2 internal prototype to avoid an error. */
12909#ifdef __cplusplus
12910extern "C"
12911#endif
12912/* We use char because int might match the return type of a gcc2
12913 builtin and then its argument prototype would still apply. */
12914char inet_aton ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000012915#ifdef F77_DUMMY_MAIN
12916# ifdef __cplusplus
12917 extern "C"
12918# endif
12919 int F77_DUMMY_MAIN() { return 1; }
12920#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012921int
12922main ()
12923{
12924inet_aton ();
12925 ;
12926 return 0;
12927}
12928_ACEOF
12929rm -f conftest.$ac_objext conftest$ac_exeext
12930if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12931 (eval $ac_link) 2>&5
12932 ac_status=$?
12933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12934 (exit $ac_status); } &&
12935 { ac_try='test -s conftest$ac_exeext'
12936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12937 (eval $ac_try) 2>&5
12938 ac_status=$?
12939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12940 (exit $ac_status); }; }; then
12941 ac_cv_lib_c_inet_aton=yes
12942else
12943 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000012944cat conftest.$ac_ext >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012945ac_cv_lib_c_inet_aton=no
12946fi
12947rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12948LIBS=$ac_check_lib_save_LIBS
12949fi
12950echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
12951echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
12952if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012953 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012954else
12955
12956echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
12957echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
12958if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
12959 echo $ECHO_N "(cached) $ECHO_C" >&6
12960else
12961 ac_check_lib_save_LIBS=$LIBS
12962LIBS="-lresolv $LIBS"
12963cat >conftest.$ac_ext <<_ACEOF
12964#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000012965#include "confdefs.h"
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012966
12967/* Override any gcc2 internal prototype to avoid an error. */
12968#ifdef __cplusplus
12969extern "C"
12970#endif
12971/* We use char because int might match the return type of a gcc2
12972 builtin and then its argument prototype would still apply. */
12973char inet_aton ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000012974#ifdef F77_DUMMY_MAIN
12975# ifdef __cplusplus
12976 extern "C"
12977# endif
12978 int F77_DUMMY_MAIN() { return 1; }
12979#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012980int
12981main ()
12982{
12983inet_aton ();
12984 ;
12985 return 0;
12986}
12987_ACEOF
12988rm -f conftest.$ac_objext conftest$ac_exeext
12989if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12990 (eval $ac_link) 2>&5
12991 ac_status=$?
12992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12993 (exit $ac_status); } &&
12994 { ac_try='test -s conftest$ac_exeext'
12995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12996 (eval $ac_try) 2>&5
12997 ac_status=$?
12998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12999 (exit $ac_status); }; }; then
13000 ac_cv_lib_resolv_inet_aton=yes
13001else
13002 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000013003cat conftest.$ac_ext >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013004ac_cv_lib_resolv_inet_aton=no
13005fi
13006rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13007LIBS=$ac_check_lib_save_LIBS
13008fi
13009echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
13010echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
13011if test $ac_cv_lib_resolv_inet_aton = yes; then
13012 cat >>confdefs.h <<_ACEOF
13013#define HAVE_LIBRESOLV 1
13014_ACEOF
13015
13016 LIBS="-lresolv $LIBS"
13017
13018fi
13019
13020
13021fi
13022
13023
Martin v. Löwise9416172003-05-03 10:12:45 +000013024echo "$as_me:$LINENO: checking for hstrerror" >&5
13025echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
13026cat >conftest.$ac_ext <<_ACEOF
13027#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000013028#include "confdefs.h"
Martin v. Löwise9416172003-05-03 10:12:45 +000013029
13030#include "confdefs.h"
13031#include <netdb.h>
13032
Martin v. Löwisf3322282003-07-13 09:46:13 +000013033#ifdef F77_DUMMY_MAIN
13034# ifdef __cplusplus
13035 extern "C"
13036# endif
13037 int F77_DUMMY_MAIN() { return 1; }
13038#endif
Martin v. Löwise9416172003-05-03 10:12:45 +000013039int
13040main ()
13041{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013042void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013043 ;
13044 return 0;
13045}
13046_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013047rm -f conftest.$ac_objext conftest$ac_exeext
13048if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13049 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013050 ac_status=$?
13051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13052 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013053 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13055 (eval $ac_try) 2>&5
13056 ac_status=$?
13057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13058 (exit $ac_status); }; }; then
13059
13060cat >>confdefs.h <<\_ACEOF
13061#define HAVE_HSTRERROR 1
13062_ACEOF
13063
13064 echo "$as_me:$LINENO: result: yes" >&5
13065echo "${ECHO_T}yes" >&6
13066else
13067 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000013068cat conftest.$ac_ext >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013069echo "$as_me:$LINENO: result: no" >&5
13070echo "${ECHO_T}no" >&6
13071
13072fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013073rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013074
13075echo "$as_me:$LINENO: checking for inet_aton" >&5
13076echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
13077cat >conftest.$ac_ext <<_ACEOF
13078#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000013079#include "confdefs.h"
Martin v. Löwise9416172003-05-03 10:12:45 +000013080
13081#include "confdefs.h"
13082#include <sys/socket.h>
13083#include <netinet/in.h>
13084#include <arpa/inet.h>
13085
Martin v. Löwisf3322282003-07-13 09:46:13 +000013086#ifdef F77_DUMMY_MAIN
13087# ifdef __cplusplus
13088 extern "C"
13089# endif
13090 int F77_DUMMY_MAIN() { return 1; }
13091#endif
Martin v. Löwise9416172003-05-03 10:12:45 +000013092int
13093main ()
13094{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013095void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013096 ;
13097 return 0;
13098}
13099_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013100rm -f conftest.$ac_objext conftest$ac_exeext
13101if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13102 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013103 ac_status=$?
13104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13105 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013106 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013107 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13108 (eval $ac_try) 2>&5
13109 ac_status=$?
13110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13111 (exit $ac_status); }; }; then
13112
13113cat >>confdefs.h <<\_ACEOF
13114#define HAVE_INET_ATON 1
13115_ACEOF
13116
13117 echo "$as_me:$LINENO: result: yes" >&5
13118echo "${ECHO_T}yes" >&6
13119else
13120 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000013121cat conftest.$ac_ext >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013122echo "$as_me:$LINENO: result: no" >&5
13123echo "${ECHO_T}no" >&6
13124
13125fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013126rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013127
13128echo "$as_me:$LINENO: checking for inet_pton" >&5
13129echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
13130cat >conftest.$ac_ext <<_ACEOF
13131#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000013132#include "confdefs.h"
Martin v. Löwise9416172003-05-03 10:12:45 +000013133
13134#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013135#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000013136#include <sys/socket.h>
13137#include <netinet/in.h>
13138#include <arpa/inet.h>
13139
Martin v. Löwisf3322282003-07-13 09:46:13 +000013140#ifdef F77_DUMMY_MAIN
13141# ifdef __cplusplus
13142 extern "C"
13143# endif
13144 int F77_DUMMY_MAIN() { return 1; }
13145#endif
Martin v. Löwise9416172003-05-03 10:12:45 +000013146int
13147main ()
13148{
13149void* p = inet_pton
13150 ;
13151 return 0;
13152}
13153_ACEOF
13154rm -f conftest.$ac_objext
13155if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13156 (eval $ac_compile) 2>&5
13157 ac_status=$?
13158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13159 (exit $ac_status); } &&
13160 { ac_try='test -s conftest.$ac_objext'
13161 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13162 (eval $ac_try) 2>&5
13163 ac_status=$?
13164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13165 (exit $ac_status); }; }; then
13166
13167cat >>confdefs.h <<\_ACEOF
13168#define HAVE_INET_PTON 1
13169_ACEOF
13170
13171 echo "$as_me:$LINENO: result: yes" >&5
13172echo "${ECHO_T}yes" >&6
13173else
13174 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000013175cat conftest.$ac_ext >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013176echo "$as_me:$LINENO: result: no" >&5
13177echo "${ECHO_T}no" >&6
13178
13179fi
13180rm -f conftest.$ac_objext conftest.$ac_ext
13181
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013182# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000013183echo "$as_me:$LINENO: checking for setgroups" >&5
13184echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
13185cat >conftest.$ac_ext <<_ACEOF
13186#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000013187#include "confdefs.h"
Martin v. Löwisd5843682002-11-21 20:41:28 +000013188
13189#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013190#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013191#ifdef HAVE_GRP_H
13192#include <grp.h>
13193#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000013194
Martin v. Löwisf3322282003-07-13 09:46:13 +000013195#ifdef F77_DUMMY_MAIN
13196# ifdef __cplusplus
13197 extern "C"
13198# endif
13199 int F77_DUMMY_MAIN() { return 1; }
13200#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000013201int
13202main ()
13203{
13204void* p = setgroups
13205 ;
13206 return 0;
13207}
13208_ACEOF
13209rm -f conftest.$ac_objext
13210if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13211 (eval $ac_compile) 2>&5
13212 ac_status=$?
13213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13214 (exit $ac_status); } &&
13215 { ac_try='test -s conftest.$ac_objext'
13216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13217 (eval $ac_try) 2>&5
13218 ac_status=$?
13219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13220 (exit $ac_status); }; }; then
13221
13222cat >>confdefs.h <<\_ACEOF
13223#define HAVE_SETGROUPS 1
13224_ACEOF
13225
13226 echo "$as_me:$LINENO: result: yes" >&5
13227echo "${ECHO_T}yes" >&6
13228else
13229 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000013230cat conftest.$ac_ext >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000013231echo "$as_me:$LINENO: result: no" >&5
13232echo "${ECHO_T}no" >&6
13233
13234fi
13235rm -f conftest.$ac_objext conftest.$ac_ext
13236
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013237# check for openpty and forkpty
13238
Martin v. Löwis11437992002-04-12 09:54:03 +000013239
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013240for ac_func in openpty
13241do
Martin v. Löwis11437992002-04-12 09:54:03 +000013242as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13243echo "$as_me:$LINENO: checking for $ac_func" >&5
13244echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13245if eval "test \"\${$as_ac_var+set}\" = set"; then
13246 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013247else
Martin v. Löwis11437992002-04-12 09:54:03 +000013248 cat >conftest.$ac_ext <<_ACEOF
13249#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000013250#include "confdefs.h"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013251/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwisf3322282003-07-13 09:46:13 +000013252 which can conflict with char $ac_func (); below. */
13253#include <assert.h>
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013254/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013255#ifdef __cplusplus
13256extern "C"
13257#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013258/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013259 builtin and then its argument prototype would still apply. */
13260char $ac_func ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000013261char (*f) ();
13262
13263#ifdef F77_DUMMY_MAIN
13264# ifdef __cplusplus
13265 extern "C"
13266# endif
13267 int F77_DUMMY_MAIN() { return 1; }
13268#endif
13269int
13270main ()
13271{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013272/* The GNU C library defines this for functions which it implements
13273 to always fail with ENOSYS. Some functions are actually named
13274 something starting with __ and the normal name is an alias. */
13275#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13276choke me
13277#else
Martin v. Löwisf3322282003-07-13 09:46:13 +000013278f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013279#endif
13280
Martin v. Löwis11437992002-04-12 09:54:03 +000013281 ;
13282 return 0;
13283}
13284_ACEOF
13285rm -f conftest.$ac_objext conftest$ac_exeext
13286if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13287 (eval $ac_link) 2>&5
13288 ac_status=$?
13289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13290 (exit $ac_status); } &&
13291 { ac_try='test -s conftest$ac_exeext'
13292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13293 (eval $ac_try) 2>&5
13294 ac_status=$?
13295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13296 (exit $ac_status); }; }; then
13297 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013298else
Martin v. Löwis11437992002-04-12 09:54:03 +000013299 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000013300cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013301eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013302fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013303rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013304fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013305echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13306echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13307if test `eval echo '${'$as_ac_var'}'` = yes; then
13308 cat >>confdefs.h <<_ACEOF
13309#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13310_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013311
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013312else
Martin v. Löwis11437992002-04-12 09:54:03 +000013313 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
13314echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
13315if test "${ac_cv_lib_util_openpty+set}" = set; then
13316 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013317else
Martin v. Löwis11437992002-04-12 09:54:03 +000013318 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013319LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013320cat >conftest.$ac_ext <<_ACEOF
13321#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000013322#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013323
Fred Drake8cef4cf2000-06-28 16:40:38 +000013324/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013325#ifdef __cplusplus
13326extern "C"
13327#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013328/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013329 builtin and then its argument prototype would still apply. */
13330char openpty ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000013331#ifdef F77_DUMMY_MAIN
13332# ifdef __cplusplus
13333 extern "C"
13334# endif
13335 int F77_DUMMY_MAIN() { return 1; }
13336#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013337int
13338main ()
13339{
13340openpty ();
13341 ;
13342 return 0;
13343}
13344_ACEOF
13345rm -f conftest.$ac_objext conftest$ac_exeext
13346if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13347 (eval $ac_link) 2>&5
13348 ac_status=$?
13349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13350 (exit $ac_status); } &&
13351 { ac_try='test -s conftest$ac_exeext'
13352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13353 (eval $ac_try) 2>&5
13354 ac_status=$?
13355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13356 (exit $ac_status); }; }; then
13357 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013358else
Martin v. Löwis11437992002-04-12 09:54:03 +000013359 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000013360cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013361ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013362fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013363rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13364LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013365fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013366echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
13367echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
13368if test $ac_cv_lib_util_openpty = yes; then
13369 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013370#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013371_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013372 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013373fi
13374
13375fi
13376done
13377
Martin v. Löwis11437992002-04-12 09:54:03 +000013378
Fred Drake8cef4cf2000-06-28 16:40:38 +000013379for ac_func in forkpty
13380do
Martin v. Löwis11437992002-04-12 09:54:03 +000013381as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13382echo "$as_me:$LINENO: checking for $ac_func" >&5
13383echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13384if eval "test \"\${$as_ac_var+set}\" = set"; then
13385 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013386else
Martin v. Löwis11437992002-04-12 09:54:03 +000013387 cat >conftest.$ac_ext <<_ACEOF
13388#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000013389#include "confdefs.h"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013390/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwisf3322282003-07-13 09:46:13 +000013391 which can conflict with char $ac_func (); below. */
13392#include <assert.h>
Fred Drake8cef4cf2000-06-28 16:40:38 +000013393/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013394#ifdef __cplusplus
13395extern "C"
13396#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013397/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013398 builtin and then its argument prototype would still apply. */
13399char $ac_func ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000013400char (*f) ();
13401
13402#ifdef F77_DUMMY_MAIN
13403# ifdef __cplusplus
13404 extern "C"
13405# endif
13406 int F77_DUMMY_MAIN() { return 1; }
13407#endif
13408int
13409main ()
13410{
Fred Drake8cef4cf2000-06-28 16:40:38 +000013411/* The GNU C library defines this for functions which it implements
13412 to always fail with ENOSYS. Some functions are actually named
13413 something starting with __ and the normal name is an alias. */
13414#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13415choke me
13416#else
Martin v. Löwisf3322282003-07-13 09:46:13 +000013417f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000013418#endif
13419
Martin v. Löwis11437992002-04-12 09:54:03 +000013420 ;
13421 return 0;
13422}
13423_ACEOF
13424rm -f conftest.$ac_objext conftest$ac_exeext
13425if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13426 (eval $ac_link) 2>&5
13427 ac_status=$?
13428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13429 (exit $ac_status); } &&
13430 { ac_try='test -s conftest$ac_exeext'
13431 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13432 (eval $ac_try) 2>&5
13433 ac_status=$?
13434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13435 (exit $ac_status); }; }; then
13436 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013437else
Martin v. Löwis11437992002-04-12 09:54:03 +000013438 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000013439cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013440eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013441fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013442rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013443fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013444echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13445echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13446if test `eval echo '${'$as_ac_var'}'` = yes; then
13447 cat >>confdefs.h <<_ACEOF
13448#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13449_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013450
Fred Drake8cef4cf2000-06-28 16:40:38 +000013451else
Martin v. Löwis11437992002-04-12 09:54:03 +000013452 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
13453echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
13454if test "${ac_cv_lib_util_forkpty+set}" = set; then
13455 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013456else
Martin v. Löwis11437992002-04-12 09:54:03 +000013457 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013458LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013459cat >conftest.$ac_ext <<_ACEOF
13460#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000013461#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013462
Fred Drake8cef4cf2000-06-28 16:40:38 +000013463/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013464#ifdef __cplusplus
13465extern "C"
13466#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013467/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013468 builtin and then its argument prototype would still apply. */
13469char forkpty ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000013470#ifdef F77_DUMMY_MAIN
13471# ifdef __cplusplus
13472 extern "C"
13473# endif
13474 int F77_DUMMY_MAIN() { return 1; }
13475#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013476int
13477main ()
13478{
13479forkpty ();
13480 ;
13481 return 0;
13482}
13483_ACEOF
13484rm -f conftest.$ac_objext conftest$ac_exeext
13485if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13486 (eval $ac_link) 2>&5
13487 ac_status=$?
13488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13489 (exit $ac_status); } &&
13490 { ac_try='test -s conftest$ac_exeext'
13491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13492 (eval $ac_try) 2>&5
13493 ac_status=$?
13494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13495 (exit $ac_status); }; }; then
13496 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013497else
Martin v. Löwis11437992002-04-12 09:54:03 +000013498 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000013499cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013500ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013501fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013502rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13503LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013504fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013505echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
13506echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
13507if test $ac_cv_lib_util_forkpty = yes; then
13508 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013509#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013510_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013511 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013512fi
13513
13514fi
13515done
13516
Jack Jansendd19cf82001-12-06 22:36:17 +000013517
Michael W. Hudson54241132001-12-07 15:38:26 +000013518# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013519
13520
13521
13522
13523
13524
Fred Drake8cef4cf2000-06-28 16:40:38 +000013525for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
13526do
Martin v. Löwis11437992002-04-12 09:54:03 +000013527as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13528echo "$as_me:$LINENO: checking for $ac_func" >&5
13529echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13530if eval "test \"\${$as_ac_var+set}\" = set"; then
13531 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013532else
Martin v. Löwis11437992002-04-12 09:54:03 +000013533 cat >conftest.$ac_ext <<_ACEOF
13534#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000013535#include "confdefs.h"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013536/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwisf3322282003-07-13 09:46:13 +000013537 which can conflict with char $ac_func (); below. */
13538#include <assert.h>
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013539/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013540#ifdef __cplusplus
13541extern "C"
13542#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013543/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013544 builtin and then its argument prototype would still apply. */
13545char $ac_func ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000013546char (*f) ();
13547
13548#ifdef F77_DUMMY_MAIN
13549# ifdef __cplusplus
13550 extern "C"
13551# endif
13552 int F77_DUMMY_MAIN() { return 1; }
13553#endif
13554int
13555main ()
13556{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013557/* The GNU C library defines this for functions which it implements
13558 to always fail with ENOSYS. Some functions are actually named
13559 something starting with __ and the normal name is an alias. */
13560#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13561choke me
13562#else
Martin v. Löwisf3322282003-07-13 09:46:13 +000013563f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013564#endif
13565
Martin v. Löwis11437992002-04-12 09:54:03 +000013566 ;
13567 return 0;
13568}
13569_ACEOF
13570rm -f conftest.$ac_objext conftest$ac_exeext
13571if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13572 (eval $ac_link) 2>&5
13573 ac_status=$?
13574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13575 (exit $ac_status); } &&
13576 { ac_try='test -s conftest$ac_exeext'
13577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13578 (eval $ac_try) 2>&5
13579 ac_status=$?
13580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13581 (exit $ac_status); }; }; then
13582 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013583else
Martin v. Löwis11437992002-04-12 09:54:03 +000013584 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000013585cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013586eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013587fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013588rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013589fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013590echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13591echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13592if test `eval echo '${'$as_ac_var'}'` = yes; then
13593 cat >>confdefs.h <<_ACEOF
13594#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13595_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000013596
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013597fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000013598done
13599
Michael W. Hudson54241132001-12-07 15:38:26 +000013600
Martin v. Löwis11437992002-04-12 09:54:03 +000013601
13602
13603
13604
13605
Martin v. Löwis1142de32002-03-29 16:28:31 +000013606for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000013607do
Martin v. Löwis11437992002-04-12 09:54:03 +000013608as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13609echo "$as_me:$LINENO: checking for $ac_func" >&5
13610echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13611if eval "test \"\${$as_ac_var+set}\" = set"; then
13612 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013613else
Martin v. Löwis11437992002-04-12 09:54:03 +000013614 cat >conftest.$ac_ext <<_ACEOF
13615#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000013616#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013617/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwisf3322282003-07-13 09:46:13 +000013618 which can conflict with char $ac_func (); below. */
13619#include <assert.h>
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013620/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013621#ifdef __cplusplus
13622extern "C"
13623#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013624/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013625 builtin and then its argument prototype would still apply. */
13626char $ac_func ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000013627char (*f) ();
13628
13629#ifdef F77_DUMMY_MAIN
13630# ifdef __cplusplus
13631 extern "C"
13632# endif
13633 int F77_DUMMY_MAIN() { return 1; }
13634#endif
13635int
13636main ()
13637{
Guido van Rossum627b2d71993-12-24 10:39:16 +000013638/* The GNU C library defines this for functions which it implements
13639 to always fail with ENOSYS. Some functions are actually named
13640 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013641#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013642choke me
13643#else
Martin v. Löwisf3322282003-07-13 09:46:13 +000013644f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013645#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013646
Martin v. Löwis11437992002-04-12 09:54:03 +000013647 ;
13648 return 0;
13649}
13650_ACEOF
13651rm -f conftest.$ac_objext conftest$ac_exeext
13652if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13653 (eval $ac_link) 2>&5
13654 ac_status=$?
13655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13656 (exit $ac_status); } &&
13657 { ac_try='test -s conftest$ac_exeext'
13658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13659 (eval $ac_try) 2>&5
13660 ac_status=$?
13661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13662 (exit $ac_status); }; }; then
13663 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013664else
Martin v. Löwis11437992002-04-12 09:54:03 +000013665 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000013666cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013667eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013668fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013669rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000013670fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013671echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13672echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13673if test `eval echo '${'$as_ac_var'}'` = yes; then
13674 cat >>confdefs.h <<_ACEOF
13675#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13676_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000013677
Martin v. Löwis1142de32002-03-29 16:28:31 +000013678else
Martin v. Löwis11437992002-04-12 09:54:03 +000013679 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013680fi
13681done
13682
13683
Martin v. Löwis11437992002-04-12 09:54:03 +000013684
Martin v. Löwis1142de32002-03-29 16:28:31 +000013685for ac_func in getpgrp
13686do
Martin v. Löwis11437992002-04-12 09:54:03 +000013687as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13688echo "$as_me:$LINENO: checking for $ac_func" >&5
13689echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13690if eval "test \"\${$as_ac_var+set}\" = set"; then
13691 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000013692else
Martin v. Löwis11437992002-04-12 09:54:03 +000013693 cat >conftest.$ac_ext <<_ACEOF
13694#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000013695#include "confdefs.h"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013696/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwisf3322282003-07-13 09:46:13 +000013697 which can conflict with char $ac_func (); below. */
13698#include <assert.h>
Martin v. Löwis1142de32002-03-29 16:28:31 +000013699/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013700#ifdef __cplusplus
13701extern "C"
13702#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013703/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013704 builtin and then its argument prototype would still apply. */
13705char $ac_func ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000013706char (*f) ();
13707
13708#ifdef F77_DUMMY_MAIN
13709# ifdef __cplusplus
13710 extern "C"
13711# endif
13712 int F77_DUMMY_MAIN() { return 1; }
13713#endif
13714int
13715main ()
13716{
Martin v. Löwis1142de32002-03-29 16:28:31 +000013717/* The GNU C library defines this for functions which it implements
13718 to always fail with ENOSYS. Some functions are actually named
13719 something starting with __ and the normal name is an alias. */
13720#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13721choke me
13722#else
Martin v. Löwisf3322282003-07-13 09:46:13 +000013723f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000013724#endif
13725
Martin v. Löwis11437992002-04-12 09:54:03 +000013726 ;
13727 return 0;
13728}
13729_ACEOF
13730rm -f conftest.$ac_objext conftest$ac_exeext
13731if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13732 (eval $ac_link) 2>&5
13733 ac_status=$?
13734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13735 (exit $ac_status); } &&
13736 { ac_try='test -s conftest$ac_exeext'
13737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13738 (eval $ac_try) 2>&5
13739 ac_status=$?
13740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13741 (exit $ac_status); }; }; then
13742 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013743else
Martin v. Löwis11437992002-04-12 09:54:03 +000013744 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000013745cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013746eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013747fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013748rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013749fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013750echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13751echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13752if test `eval echo '${'$as_ac_var'}'` = yes; then
13753 cat >>confdefs.h <<_ACEOF
13754#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13755_ACEOF
13756 cat >conftest.$ac_ext <<_ACEOF
13757#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000013758#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013759#include <unistd.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +000013760#ifdef F77_DUMMY_MAIN
13761# ifdef __cplusplus
13762 extern "C"
13763# endif
13764 int F77_DUMMY_MAIN() { return 1; }
13765#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013766int
13767main ()
13768{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013769getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013770 ;
13771 return 0;
13772}
13773_ACEOF
13774rm -f conftest.$ac_objext
13775if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13776 (eval $ac_compile) 2>&5
13777 ac_status=$?
13778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13779 (exit $ac_status); } &&
13780 { ac_try='test -s conftest.$ac_objext'
13781 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13782 (eval $ac_try) 2>&5
13783 ac_status=$?
13784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13785 (exit $ac_status); }; }; then
13786
13787cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013788#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013789_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013790
Martin v. Löwis11437992002-04-12 09:54:03 +000013791
Guido van Rossumf78abae1997-01-21 22:02:36 +000013792else
Martin v. Löwis11437992002-04-12 09:54:03 +000013793 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000013794cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013795fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013796rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013797
Guido van Rossum627b2d71993-12-24 10:39:16 +000013798fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013799done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013800
Jack Jansen150753c2003-03-29 22:07:47 +000013801
13802for ac_func in setpgrp
13803do
13804as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13805echo "$as_me:$LINENO: checking for $ac_func" >&5
13806echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13807if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013808 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013809else
Martin v. Löwis11437992002-04-12 09:54:03 +000013810 cat >conftest.$ac_ext <<_ACEOF
13811#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000013812#include "confdefs.h"
Jack Jansen150753c2003-03-29 22:07:47 +000013813/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwisf3322282003-07-13 09:46:13 +000013814 which can conflict with char $ac_func (); below. */
13815#include <assert.h>
Jack Jansen150753c2003-03-29 22:07:47 +000013816/* Override any gcc2 internal prototype to avoid an error. */
13817#ifdef __cplusplus
13818extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000013819#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013820/* We use char because int might match the return type of a gcc2
13821 builtin and then its argument prototype would still apply. */
13822char $ac_func ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000013823char (*f) ();
13824
13825#ifdef F77_DUMMY_MAIN
13826# ifdef __cplusplus
13827 extern "C"
13828# endif
13829 int F77_DUMMY_MAIN() { return 1; }
13830#endif
13831int
13832main ()
13833{
Jack Jansen150753c2003-03-29 22:07:47 +000013834/* The GNU C library defines this for functions which it implements
13835 to always fail with ENOSYS. Some functions are actually named
13836 something starting with __ and the normal name is an alias. */
13837#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13838choke me
13839#else
Martin v. Löwisf3322282003-07-13 09:46:13 +000013840f = $ac_func;
Jack Jansen150753c2003-03-29 22:07:47 +000013841#endif
13842
Martin v. Löwis11437992002-04-12 09:54:03 +000013843 ;
13844 return 0;
13845}
13846_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013847rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000013848if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13849 (eval $ac_link) 2>&5
13850 ac_status=$?
13851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013852 (exit $ac_status); } &&
13853 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13855 (eval $ac_try) 2>&5
13856 ac_status=$?
13857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13858 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000013859 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013860else
Jack Jansen150753c2003-03-29 22:07:47 +000013861 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000013862cat conftest.$ac_ext >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013863eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013864fi
Jack Jansen150753c2003-03-29 22:07:47 +000013865rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013866fi
Jack Jansen150753c2003-03-29 22:07:47 +000013867echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13868echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13869if test `eval echo '${'$as_ac_var'}'` = yes; then
13870 cat >>confdefs.h <<_ACEOF
13871#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13872_ACEOF
13873 cat >conftest.$ac_ext <<_ACEOF
13874#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000013875#include "confdefs.h"
Jack Jansen150753c2003-03-29 22:07:47 +000013876#include <unistd.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +000013877#ifdef F77_DUMMY_MAIN
13878# ifdef __cplusplus
13879 extern "C"
13880# endif
13881 int F77_DUMMY_MAIN() { return 1; }
13882#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013883int
13884main ()
13885{
13886setpgrp(0,0);
13887 ;
13888 return 0;
13889}
13890_ACEOF
13891rm -f conftest.$ac_objext
13892if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13893 (eval $ac_compile) 2>&5
13894 ac_status=$?
13895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13896 (exit $ac_status); } &&
13897 { ac_try='test -s conftest.$ac_objext'
13898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13899 (eval $ac_try) 2>&5
13900 ac_status=$?
13901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13902 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013903
13904cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013905#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013906_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013907
Jack Jansen150753c2003-03-29 22:07:47 +000013908
13909else
13910 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000013911cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013912fi
Jack Jansen150753c2003-03-29 22:07:47 +000013913rm -f conftest.$ac_objext conftest.$ac_ext
13914
13915fi
13916done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013917
Martin v. Löwis11437992002-04-12 09:54:03 +000013918
Thomas Wouters3a584202000-08-05 23:28:51 +000013919for ac_func in gettimeofday
13920do
Martin v. Löwis11437992002-04-12 09:54:03 +000013921as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13922echo "$as_me:$LINENO: checking for $ac_func" >&5
13923echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13924if eval "test \"\${$as_ac_var+set}\" = set"; then
13925 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013926else
Martin v. Löwis11437992002-04-12 09:54:03 +000013927 cat >conftest.$ac_ext <<_ACEOF
13928#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000013929#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013930/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwisf3322282003-07-13 09:46:13 +000013931 which can conflict with char $ac_func (); below. */
13932#include <assert.h>
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013933/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013934#ifdef __cplusplus
13935extern "C"
13936#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013937/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013938 builtin and then its argument prototype would still apply. */
13939char $ac_func ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000013940char (*f) ();
13941
13942#ifdef F77_DUMMY_MAIN
13943# ifdef __cplusplus
13944 extern "C"
13945# endif
13946 int F77_DUMMY_MAIN() { return 1; }
13947#endif
13948int
13949main ()
13950{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013951/* The GNU C library defines this for functions which it implements
13952 to always fail with ENOSYS. Some functions are actually named
13953 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013954#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013955choke me
13956#else
Martin v. Löwisf3322282003-07-13 09:46:13 +000013957f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013958#endif
13959
Martin v. Löwis11437992002-04-12 09:54:03 +000013960 ;
13961 return 0;
13962}
13963_ACEOF
13964rm -f conftest.$ac_objext conftest$ac_exeext
13965if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13966 (eval $ac_link) 2>&5
13967 ac_status=$?
13968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13969 (exit $ac_status); } &&
13970 { ac_try='test -s conftest$ac_exeext'
13971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13972 (eval $ac_try) 2>&5
13973 ac_status=$?
13974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13975 (exit $ac_status); }; }; then
13976 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013977else
Martin v. Löwis11437992002-04-12 09:54:03 +000013978 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000013979cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013980eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013981fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013982rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013983fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013984echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13985echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13986if test `eval echo '${'$as_ac_var'}'` = yes; then
13987 cat >>confdefs.h <<_ACEOF
13988#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13989_ACEOF
13990 cat >conftest.$ac_ext <<_ACEOF
13991#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000013992#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013993#include <sys/time.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +000013994#ifdef F77_DUMMY_MAIN
13995# ifdef __cplusplus
13996 extern "C"
13997# endif
13998 int F77_DUMMY_MAIN() { return 1; }
13999#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014000int
14001main ()
14002{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014003gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000014004 ;
14005 return 0;
14006}
14007_ACEOF
14008rm -f conftest.$ac_objext
14009if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14010 (eval $ac_compile) 2>&5
14011 ac_status=$?
14012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14013 (exit $ac_status); } &&
14014 { ac_try='test -s conftest.$ac_objext'
14015 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14016 (eval $ac_try) 2>&5
14017 ac_status=$?
14018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14019 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014020 :
14021else
Martin v. Löwis11437992002-04-12 09:54:03 +000014022 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000014023cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014024
14025cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014026#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014027_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014028
Martin v. Löwis11437992002-04-12 09:54:03 +000014029
Guido van Rossum627b2d71993-12-24 10:39:16 +000014030fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014031rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014032
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014033fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014034done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014035
Michael W. Hudson54241132001-12-07 15:38:26 +000014036
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014037echo "$as_me:$LINENO: checking for major" >&5
14038echo $ECHO_N "checking for major... $ECHO_C" >&6
14039cat >conftest.$ac_ext <<_ACEOF
14040#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000014041#include "confdefs.h"
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014042
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014043#if defined(MAJOR_IN_MKDEV)
14044#include <sys/mkdev.h>
14045#elif defined(MAJOR_IN_SYSMACROS)
14046#include <sys/sysmacros.h>
14047#else
14048#include <sys/types.h>
14049#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014050
Martin v. Löwisf3322282003-07-13 09:46:13 +000014051#ifdef F77_DUMMY_MAIN
14052# ifdef __cplusplus
14053 extern "C"
14054# endif
14055 int F77_DUMMY_MAIN() { return 1; }
14056#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014057int
14058main ()
14059{
14060
14061 makedev(major(0),minor(0));
14062
14063 ;
14064 return 0;
14065}
14066_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000014067rm -f conftest.$ac_objext conftest$ac_exeext
14068if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14069 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014070 ac_status=$?
14071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14072 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000014073 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14075 (eval $ac_try) 2>&5
14076 ac_status=$?
14077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14078 (exit $ac_status); }; }; then
14079
14080
14081cat >>confdefs.h <<\_ACEOF
14082#define HAVE_DEVICE_MACROS 1
14083_ACEOF
14084
14085 echo "$as_me:$LINENO: result: yes" >&5
14086echo "${ECHO_T}yes" >&6
14087
14088else
14089 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000014090cat conftest.$ac_ext >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014091
14092 echo "$as_me:$LINENO: result: no" >&5
14093echo "${ECHO_T}no" >&6
14094
14095fi
Martin v. Löwise3271202002-11-07 07:42:30 +000014096rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014097
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014098# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000014099# for [no]getaddrinfo in netdb.h.
14100echo "$as_me:$LINENO: checking for getaddrinfo" >&5
14101echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
14102cat >conftest.$ac_ext <<_ACEOF
14103#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000014104#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014105
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014106#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014107#include <sys/socket.h>
14108#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014109#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014110
Martin v. Löwisf3322282003-07-13 09:46:13 +000014111#ifdef F77_DUMMY_MAIN
14112# ifdef __cplusplus
14113 extern "C"
14114# endif
14115 int F77_DUMMY_MAIN() { return 1; }
14116#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014117int
14118main ()
14119{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014120
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014121getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014122
Martin v. Löwis11437992002-04-12 09:54:03 +000014123 ;
14124 return 0;
14125}
14126_ACEOF
14127rm -f conftest.$ac_objext conftest$ac_exeext
14128if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14129 (eval $ac_link) 2>&5
14130 ac_status=$?
14131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14132 (exit $ac_status); } &&
14133 { ac_try='test -s conftest$ac_exeext'
14134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14135 (eval $ac_try) 2>&5
14136 ac_status=$?
14137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14138 (exit $ac_status); }; }; then
14139
14140echo "$as_me:$LINENO: result: yes" >&5
14141echo "${ECHO_T}yes" >&6
14142echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
14143echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014144if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014145 echo "$as_me:$LINENO: result: buggy" >&5
14146echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014147buggygetaddrinfo=yes
14148else
Martin v. Löwis11437992002-04-12 09:54:03 +000014149 cat >conftest.$ac_ext <<_ACEOF
14150#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000014151#include "confdefs.h"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014152
14153#include <sys/types.h>
14154#include <netdb.h>
14155#include <string.h>
14156#include <sys/socket.h>
14157#include <netinet/in.h>
14158
14159main()
14160{
14161 int passive, gaierr, inet4 = 0, inet6 = 0;
14162 struct addrinfo hints, *ai, *aitop;
14163 char straddr[INET6_ADDRSTRLEN], strport[16];
14164
14165 for (passive = 0; passive <= 1; passive++) {
14166 memset(&hints, 0, sizeof(hints));
14167 hints.ai_family = AF_UNSPEC;
14168 hints.ai_flags = passive ? AI_PASSIVE : 0;
14169 hints.ai_socktype = SOCK_STREAM;
14170 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
14171 (void)gai_strerror(gaierr);
14172 goto bad;
14173 }
14174 for (ai = aitop; ai; ai = ai->ai_next) {
14175 if (ai->ai_addr == NULL ||
14176 ai->ai_addrlen == 0 ||
14177 getnameinfo(ai->ai_addr, ai->ai_addrlen,
14178 straddr, sizeof(straddr), strport, sizeof(strport),
14179 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
14180 goto bad;
14181 }
14182 switch (ai->ai_family) {
14183 case AF_INET:
14184 if (strcmp(strport, "54321") != 0) {
14185 goto bad;
14186 }
14187 if (passive) {
14188 if (strcmp(straddr, "0.0.0.0") != 0) {
14189 goto bad;
14190 }
14191 } else {
14192 if (strcmp(straddr, "127.0.0.1") != 0) {
14193 goto bad;
14194 }
14195 }
14196 inet4++;
14197 break;
14198 case AF_INET6:
14199 if (strcmp(strport, "54321") != 0) {
14200 goto bad;
14201 }
14202 if (passive) {
14203 if (strcmp(straddr, "::") != 0) {
14204 goto bad;
14205 }
14206 } else {
14207 if (strcmp(straddr, "::1") != 0) {
14208 goto bad;
14209 }
14210 }
14211 inet6++;
14212 break;
14213 case AF_UNSPEC:
14214 goto bad;
14215 break;
14216 default:
14217 /* another family support? */
14218 break;
14219 }
14220 }
14221 }
14222
14223 if (!(inet4 == 0 || inet4 == 2))
14224 goto bad;
14225 if (!(inet6 == 0 || inet6 == 2))
14226 goto bad;
14227
14228 if (aitop)
14229 freeaddrinfo(aitop);
14230 exit(0);
14231
14232 bad:
14233 if (aitop)
14234 freeaddrinfo(aitop);
14235 exit(1);
14236}
14237
Martin v. Löwis11437992002-04-12 09:54:03 +000014238_ACEOF
14239rm -f conftest$ac_exeext
14240if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14241 (eval $ac_link) 2>&5
14242 ac_status=$?
14243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14244 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14245 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14246 (eval $ac_try) 2>&5
14247 ac_status=$?
14248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14249 (exit $ac_status); }; }; then
14250 echo "$as_me:$LINENO: result: good" >&5
14251echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014252buggygetaddrinfo=no
14253else
Martin v. Löwis11437992002-04-12 09:54:03 +000014254 echo "$as_me: program exited with status $ac_status" >&5
14255echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000014256cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014257( exit $ac_status )
14258echo "$as_me:$LINENO: result: buggy" >&5
14259echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014260buggygetaddrinfo=yes
14261fi
Martin v. Löwisf3322282003-07-13 09:46:13 +000014262rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014263fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014264else
Martin v. Löwis11437992002-04-12 09:54:03 +000014265 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000014266cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014267
14268echo "$as_me:$LINENO: result: no" >&5
14269echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014270buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014271
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014272fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014273rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014274
14275if test "$buggygetaddrinfo" = "yes"; then
14276 if test "$ipv6" = "yes"; then
14277 echo 'Fatal: You must get working getaddrinfo() function.'
14278 echo ' or you can specify "--disable-ipv6"'.
14279 exit 1
14280 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014281else
Martin v. Löwis11437992002-04-12 09:54:03 +000014282
14283cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014284#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014285_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014286
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014287fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014288
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014289for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014290do
Martin v. Löwis11437992002-04-12 09:54:03 +000014291as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14292echo "$as_me:$LINENO: checking for $ac_func" >&5
14293echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14294if eval "test \"\${$as_ac_var+set}\" = set"; then
14295 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014296else
Martin v. Löwis11437992002-04-12 09:54:03 +000014297 cat >conftest.$ac_ext <<_ACEOF
14298#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000014299#include "confdefs.h"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014300/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwisf3322282003-07-13 09:46:13 +000014301 which can conflict with char $ac_func (); below. */
14302#include <assert.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014303/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014304#ifdef __cplusplus
14305extern "C"
14306#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014307/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014308 builtin and then its argument prototype would still apply. */
14309char $ac_func ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000014310char (*f) ();
14311
14312#ifdef F77_DUMMY_MAIN
14313# ifdef __cplusplus
14314 extern "C"
14315# endif
14316 int F77_DUMMY_MAIN() { return 1; }
14317#endif
14318int
14319main ()
14320{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014321/* The GNU C library defines this for functions which it implements
14322 to always fail with ENOSYS. Some functions are actually named
14323 something starting with __ and the normal name is an alias. */
14324#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14325choke me
14326#else
Martin v. Löwisf3322282003-07-13 09:46:13 +000014327f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014328#endif
14329
Martin v. Löwis11437992002-04-12 09:54:03 +000014330 ;
14331 return 0;
14332}
14333_ACEOF
14334rm -f conftest.$ac_objext conftest$ac_exeext
14335if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14336 (eval $ac_link) 2>&5
14337 ac_status=$?
14338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14339 (exit $ac_status); } &&
14340 { ac_try='test -s conftest$ac_exeext'
14341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14342 (eval $ac_try) 2>&5
14343 ac_status=$?
14344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14345 (exit $ac_status); }; }; then
14346 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014347else
Martin v. Löwis11437992002-04-12 09:54:03 +000014348 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000014349cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014350eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014351fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014352rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014353fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014354echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14355echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14356if test `eval echo '${'$as_ac_var'}'` = yes; then
14357 cat >>confdefs.h <<_ACEOF
14358#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14359_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014360
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014361fi
14362done
14363
Michael W. Hudson54241132001-12-07 15:38:26 +000014364
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014365# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000014366echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
14367echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14368if test "${ac_cv_header_time+set}" = set; then
14369 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014370else
Martin v. Löwis11437992002-04-12 09:54:03 +000014371 cat >conftest.$ac_ext <<_ACEOF
14372#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000014373#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014374#include <sys/types.h>
14375#include <sys/time.h>
14376#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014377
Martin v. Löwisf3322282003-07-13 09:46:13 +000014378#ifdef F77_DUMMY_MAIN
14379# ifdef __cplusplus
14380 extern "C"
14381# endif
14382 int F77_DUMMY_MAIN() { return 1; }
14383#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014384int
14385main ()
14386{
14387if ((struct tm *) 0)
14388return 0;
14389 ;
14390 return 0;
14391}
14392_ACEOF
14393rm -f conftest.$ac_objext
14394if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14395 (eval $ac_compile) 2>&5
14396 ac_status=$?
14397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14398 (exit $ac_status); } &&
14399 { ac_try='test -s conftest.$ac_objext'
14400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14401 (eval $ac_try) 2>&5
14402 ac_status=$?
14403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14404 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014405 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014406else
Martin v. Löwis11437992002-04-12 09:54:03 +000014407 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000014408cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014409ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014410fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014411rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014412fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014413echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
14414echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014415if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014416
14417cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014418#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014419_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014420
14421fi
14422
Martin v. Löwis11437992002-04-12 09:54:03 +000014423echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
14424echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
14425if test "${ac_cv_struct_tm+set}" = set; then
14426 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014427else
Martin v. Löwis11437992002-04-12 09:54:03 +000014428 cat >conftest.$ac_ext <<_ACEOF
14429#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000014430#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014431#include <sys/types.h>
14432#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014433
Martin v. Löwisf3322282003-07-13 09:46:13 +000014434#ifdef F77_DUMMY_MAIN
14435# ifdef __cplusplus
14436 extern "C"
14437# endif
14438 int F77_DUMMY_MAIN() { return 1; }
14439#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014440int
14441main ()
14442{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014443struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000014444 ;
14445 return 0;
14446}
14447_ACEOF
14448rm -f conftest.$ac_objext
14449if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14450 (eval $ac_compile) 2>&5
14451 ac_status=$?
14452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14453 (exit $ac_status); } &&
14454 { ac_try='test -s conftest.$ac_objext'
14455 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14456 (eval $ac_try) 2>&5
14457 ac_status=$?
14458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14459 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014460 ac_cv_struct_tm=time.h
14461else
Martin v. Löwis11437992002-04-12 09:54:03 +000014462 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000014463cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014464ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014465fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014466rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014467fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014468echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
14469echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014470if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014471
14472cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014473#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014474_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014475
14476fi
14477
Martin v. Löwis11437992002-04-12 09:54:03 +000014478echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
14479echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
14480if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
14481 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014482else
Martin v. Löwis11437992002-04-12 09:54:03 +000014483 cat >conftest.$ac_ext <<_ACEOF
14484#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000014485#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014486#include <sys/types.h>
14487#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000014488
14489
Martin v. Löwisf3322282003-07-13 09:46:13 +000014490#ifdef F77_DUMMY_MAIN
14491# ifdef __cplusplus
14492 extern "C"
14493# endif
14494 int F77_DUMMY_MAIN() { return 1; }
14495#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014496int
14497main ()
14498{
14499static struct tm ac_aggr;
14500if (ac_aggr.tm_zone)
14501return 0;
14502 ;
14503 return 0;
14504}
14505_ACEOF
14506rm -f conftest.$ac_objext
14507if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14508 (eval $ac_compile) 2>&5
14509 ac_status=$?
14510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14511 (exit $ac_status); } &&
14512 { ac_try='test -s conftest.$ac_objext'
14513 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14514 (eval $ac_try) 2>&5
14515 ac_status=$?
14516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14517 (exit $ac_status); }; }; then
14518 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014519else
Martin v. Löwis11437992002-04-12 09:54:03 +000014520 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000014521cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014522ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014523fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014524rm -f conftest.$ac_objext conftest.$ac_ext
14525fi
14526echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
14527echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
14528if test $ac_cv_member_struct_tm_tm_zone = yes; then
14529
14530cat >>confdefs.h <<_ACEOF
14531#define HAVE_STRUCT_TM_TM_ZONE 1
14532_ACEOF
14533
14534
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014535fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014536
Martin v. Löwis11437992002-04-12 09:54:03 +000014537if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14538
14539cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014540#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014541_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014542
14543else
Martin v. Löwis11437992002-04-12 09:54:03 +000014544 echo "$as_me:$LINENO: checking for tzname" >&5
14545echo $ECHO_N "checking for tzname... $ECHO_C" >&6
14546if test "${ac_cv_var_tzname+set}" = set; then
14547 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014548else
Martin v. Löwis11437992002-04-12 09:54:03 +000014549 cat >conftest.$ac_ext <<_ACEOF
14550#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000014551#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014552#include <time.h>
14553#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014554extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014555#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014556
Martin v. Löwisf3322282003-07-13 09:46:13 +000014557#ifdef F77_DUMMY_MAIN
14558# ifdef __cplusplus
14559 extern "C"
14560# endif
14561 int F77_DUMMY_MAIN() { return 1; }
14562#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014563int
14564main ()
14565{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014566atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000014567 ;
14568 return 0;
14569}
14570_ACEOF
14571rm -f conftest.$ac_objext conftest$ac_exeext
14572if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14573 (eval $ac_link) 2>&5
14574 ac_status=$?
14575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14576 (exit $ac_status); } &&
14577 { ac_try='test -s conftest$ac_exeext'
14578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14579 (eval $ac_try) 2>&5
14580 ac_status=$?
14581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14582 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014583 ac_cv_var_tzname=yes
14584else
Martin v. Löwis11437992002-04-12 09:54:03 +000014585 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000014586cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014587ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014588fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014589rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000014590fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014591echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
14592echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014593 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014594
14595cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014596#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014597_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014598
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014599 fi
14600fi
14601
Martin v. Löwis11437992002-04-12 09:54:03 +000014602echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
14603echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
14604if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
14605 echo $ECHO_N "(cached) $ECHO_C" >&6
14606else
14607 cat >conftest.$ac_ext <<_ACEOF
14608#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000014609#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014610$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +000014611#ifdef F77_DUMMY_MAIN
14612# ifdef __cplusplus
14613 extern "C"
14614# endif
14615 int F77_DUMMY_MAIN() { return 1; }
14616#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014617int
14618main ()
14619{
14620static struct stat ac_aggr;
14621if (ac_aggr.st_rdev)
14622return 0;
14623 ;
14624 return 0;
14625}
14626_ACEOF
14627rm -f conftest.$ac_objext
14628if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14629 (eval $ac_compile) 2>&5
14630 ac_status=$?
14631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14632 (exit $ac_status); } &&
14633 { ac_try='test -s conftest.$ac_objext'
14634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14635 (eval $ac_try) 2>&5
14636 ac_status=$?
14637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14638 (exit $ac_status); }; }; then
14639 ac_cv_member_struct_stat_st_rdev=yes
14640else
14641 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000014642cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014643ac_cv_member_struct_stat_st_rdev=no
14644fi
14645rm -f conftest.$ac_objext conftest.$ac_ext
14646fi
14647echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
14648echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
14649if test $ac_cv_member_struct_stat_st_rdev = yes; then
14650
14651cat >>confdefs.h <<_ACEOF
14652#define HAVE_STRUCT_STAT_ST_RDEV 1
14653_ACEOF
14654
14655
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014656fi
14657
Martin v. Löwis11437992002-04-12 09:54:03 +000014658echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
14659echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
14660if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
14661 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014662else
Martin v. Löwis11437992002-04-12 09:54:03 +000014663 cat >conftest.$ac_ext <<_ACEOF
14664#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000014665#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014666$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +000014667#ifdef F77_DUMMY_MAIN
14668# ifdef __cplusplus
14669 extern "C"
14670# endif
14671 int F77_DUMMY_MAIN() { return 1; }
14672#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014673int
14674main ()
14675{
14676static struct stat ac_aggr;
14677if (ac_aggr.st_blksize)
14678return 0;
14679 ;
14680 return 0;
14681}
14682_ACEOF
14683rm -f conftest.$ac_objext
14684if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14685 (eval $ac_compile) 2>&5
14686 ac_status=$?
14687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14688 (exit $ac_status); } &&
14689 { ac_try='test -s conftest.$ac_objext'
14690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14691 (eval $ac_try) 2>&5
14692 ac_status=$?
14693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14694 (exit $ac_status); }; }; then
14695 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014696else
Martin v. Löwis11437992002-04-12 09:54:03 +000014697 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000014698cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014699ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014700fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014701rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014702fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014703echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
14704echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
14705if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014706
Martin v. Löwis11437992002-04-12 09:54:03 +000014707cat >>confdefs.h <<_ACEOF
14708#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
14709_ACEOF
14710
14711
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014712fi
14713
Martin v. Löwis11437992002-04-12 09:54:03 +000014714echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
14715echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
14716if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
14717 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014718else
Martin v. Löwis11437992002-04-12 09:54:03 +000014719 cat >conftest.$ac_ext <<_ACEOF
14720#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000014721#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014722$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +000014723#ifdef F77_DUMMY_MAIN
14724# ifdef __cplusplus
14725 extern "C"
14726# endif
14727 int F77_DUMMY_MAIN() { return 1; }
14728#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014729int
14730main ()
14731{
14732static struct stat ac_aggr;
14733if (ac_aggr.st_blocks)
14734return 0;
14735 ;
14736 return 0;
14737}
14738_ACEOF
14739rm -f conftest.$ac_objext
14740if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14741 (eval $ac_compile) 2>&5
14742 ac_status=$?
14743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14744 (exit $ac_status); } &&
14745 { ac_try='test -s conftest.$ac_objext'
14746 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14747 (eval $ac_try) 2>&5
14748 ac_status=$?
14749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14750 (exit $ac_status); }; }; then
14751 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014752else
Martin v. Löwis11437992002-04-12 09:54:03 +000014753 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000014754cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014755ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014756fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014757rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014758fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014759echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
14760echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
14761if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014762
Martin v. Löwis11437992002-04-12 09:54:03 +000014763cat >>confdefs.h <<_ACEOF
14764#define HAVE_STRUCT_STAT_ST_BLOCKS 1
14765_ACEOF
14766
14767
14768cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014769#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014770_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014771
14772else
Martin v. Löwis11437992002-04-12 09:54:03 +000014773 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014774fi
14775
Michael W. Hudson54241132001-12-07 15:38:26 +000014776
Martin v. Löwis11437992002-04-12 09:54:03 +000014777
14778echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
14779echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
14780if test "${ac_cv_header_time_altzone+set}" = set; then
14781 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014782else
Martin v. Löwis11437992002-04-12 09:54:03 +000014783 cat >conftest.$ac_ext <<_ACEOF
14784#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000014785#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014786#include <time.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +000014787#ifdef F77_DUMMY_MAIN
14788# ifdef __cplusplus
14789 extern "C"
14790# endif
14791 int F77_DUMMY_MAIN() { return 1; }
14792#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014793int
14794main ()
14795{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014796return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000014797 ;
14798 return 0;
14799}
14800_ACEOF
14801rm -f conftest.$ac_objext
14802if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14803 (eval $ac_compile) 2>&5
14804 ac_status=$?
14805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14806 (exit $ac_status); } &&
14807 { ac_try='test -s conftest.$ac_objext'
14808 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14809 (eval $ac_try) 2>&5
14810 ac_status=$?
14811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14812 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014813 ac_cv_header_time_altzone=yes
14814else
Martin v. Löwis11437992002-04-12 09:54:03 +000014815 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000014816cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014817ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000014818fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014819rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014820fi
14821
Martin v. Löwis11437992002-04-12 09:54:03 +000014822echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
14823echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014824if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014825
14826cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014827#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014828_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014829
14830fi
14831
Guido van Rossumda88dad1995-01-26 00:46:29 +000014832was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014833echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
14834echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
14835cat >conftest.$ac_ext <<_ACEOF
14836#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000014837#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014838
14839#include <sys/types.h>
14840#include <sys/select.h>
14841#include <sys/time.h>
14842
Martin v. Löwisf3322282003-07-13 09:46:13 +000014843#ifdef F77_DUMMY_MAIN
14844# ifdef __cplusplus
14845 extern "C"
14846# endif
14847 int F77_DUMMY_MAIN() { return 1; }
14848#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014849int
14850main ()
14851{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014852;
Martin v. Löwis11437992002-04-12 09:54:03 +000014853 ;
14854 return 0;
14855}
14856_ACEOF
14857rm -f conftest.$ac_objext
14858if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14859 (eval $ac_compile) 2>&5
14860 ac_status=$?
14861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14862 (exit $ac_status); } &&
14863 { ac_try='test -s conftest.$ac_objext'
14864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14865 (eval $ac_try) 2>&5
14866 ac_status=$?
14867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14868 (exit $ac_status); }; }; then
14869
14870
14871cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014872#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014873_ACEOF
14874
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014875 was_it_defined=yes
14876
Guido van Rossumf78abae1997-01-21 22:02:36 +000014877else
Martin v. Löwis11437992002-04-12 09:54:03 +000014878 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000014879cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014880fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014881rm -f conftest.$ac_objext conftest.$ac_ext
14882echo "$as_me:$LINENO: result: $was_it_defined" >&5
14883echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000014884
Martin v. Löwis11437992002-04-12 09:54:03 +000014885echo "$as_me:$LINENO: checking for addrinfo" >&5
14886echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
14887if test "${ac_cv_struct_addrinfo+set}" = set; then
14888 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014889else
Martin v. Löwis11437992002-04-12 09:54:03 +000014890 cat >conftest.$ac_ext <<_ACEOF
14891#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000014892#include "confdefs.h"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014893
14894# include <netdb.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +000014895#ifdef F77_DUMMY_MAIN
14896# ifdef __cplusplus
14897 extern "C"
14898# endif
14899 int F77_DUMMY_MAIN() { return 1; }
14900#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014901int
14902main ()
14903{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014904struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000014905 ;
14906 return 0;
14907}
14908_ACEOF
14909rm -f conftest.$ac_objext
14910if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14911 (eval $ac_compile) 2>&5
14912 ac_status=$?
14913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14914 (exit $ac_status); } &&
14915 { ac_try='test -s conftest.$ac_objext'
14916 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14917 (eval $ac_try) 2>&5
14918 ac_status=$?
14919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14920 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014921 ac_cv_struct_addrinfo=yes
14922else
Martin v. Löwis11437992002-04-12 09:54:03 +000014923 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000014924cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014925ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014926fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014927rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014928fi
14929
Martin v. Löwis11437992002-04-12 09:54:03 +000014930echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
14931echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014932if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014933
14934cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014935#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014936_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014937
14938fi
14939
Martin v. Löwis11437992002-04-12 09:54:03 +000014940echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
14941echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
14942if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
14943 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014944else
Martin v. Löwis11437992002-04-12 09:54:03 +000014945 cat >conftest.$ac_ext <<_ACEOF
14946#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000014947#include "confdefs.h"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014948
14949# include <sys/types.h>
14950# include <sys/socket.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +000014951#ifdef F77_DUMMY_MAIN
14952# ifdef __cplusplus
14953 extern "C"
14954# endif
14955 int F77_DUMMY_MAIN() { return 1; }
14956#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014957int
14958main ()
14959{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014960struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000014961 ;
14962 return 0;
14963}
14964_ACEOF
14965rm -f conftest.$ac_objext
14966if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14967 (eval $ac_compile) 2>&5
14968 ac_status=$?
14969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14970 (exit $ac_status); } &&
14971 { ac_try='test -s conftest.$ac_objext'
14972 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14973 (eval $ac_try) 2>&5
14974 ac_status=$?
14975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14976 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014977 ac_cv_struct_sockaddr_storage=yes
14978else
Martin v. Löwis11437992002-04-12 09:54:03 +000014979 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000014980cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014981ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014982fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014983rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014984fi
14985
Martin v. Löwis11437992002-04-12 09:54:03 +000014986echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
14987echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014988if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014989
14990cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014991#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014992_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014993
14994fi
14995
Guido van Rossum627b2d71993-12-24 10:39:16 +000014996# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000014997
Michael W. Hudson54241132001-12-07 15:38:26 +000014998
Martin v. Löwis11437992002-04-12 09:54:03 +000014999echo "$as_me:$LINENO: checking whether char is unsigned" >&5
15000echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
15001if test "${ac_cv_c_char_unsigned+set}" = set; then
15002 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000015003else
Martin v. Löwis11437992002-04-12 09:54:03 +000015004 cat >conftest.$ac_ext <<_ACEOF
15005#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000015006#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015007$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +000015008#ifdef F77_DUMMY_MAIN
15009# ifdef __cplusplus
15010 extern "C"
15011# endif
15012 int F77_DUMMY_MAIN() { return 1; }
15013#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015014int
15015main ()
15016{
15017static int test_array [1 - 2 * !(((char) -1) < 0)];
15018test_array [0] = 0
15019
15020 ;
15021 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000015022}
Martin v. Löwis11437992002-04-12 09:54:03 +000015023_ACEOF
15024rm -f conftest.$ac_objext
15025if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15026 (eval $ac_compile) 2>&5
15027 ac_status=$?
15028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15029 (exit $ac_status); } &&
15030 { ac_try='test -s conftest.$ac_objext'
15031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15032 (eval $ac_try) 2>&5
15033 ac_status=$?
15034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15035 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015036 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015037else
15038 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000015039cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015040ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015041fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015042rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015043fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015044echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
15045echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015046if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015047 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015048#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015049_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015050
15051fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000015052
Martin v. Löwisf3322282003-07-13 09:46:13 +000015053echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
15054echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
15055if test "${ac_cv_prog_cc_stdc+set}" = set; then
15056 echo $ECHO_N "(cached) $ECHO_C" >&6
15057else
15058 ac_cv_prog_cc_stdc=no
15059ac_save_CC=$CC
15060cat >conftest.$ac_ext <<_ACEOF
15061#line $LINENO "configure"
15062#include "confdefs.h"
15063#include <stdarg.h>
15064#include <stdio.h>
15065#include <sys/types.h>
15066#include <sys/stat.h>
15067/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
15068struct buf { int x; };
15069FILE * (*rcsopen) (struct buf *, struct stat *, int);
15070static char *e (p, i)
15071 char **p;
15072 int i;
15073{
15074 return p[i];
15075}
15076static char *f (char * (*g) (char **, int), char **p, ...)
15077{
15078 char *s;
15079 va_list v;
15080 va_start (v,p);
15081 s = g (p, va_arg (v,int));
15082 va_end (v);
15083 return s;
15084}
15085int test (int i, double x);
15086struct s1 {int (*f) (int a);};
15087struct s2 {int (*f) (double a);};
15088int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
15089int argc;
15090char **argv;
15091#ifdef F77_DUMMY_MAIN
15092# ifdef __cplusplus
15093 extern "C"
15094# endif
15095 int F77_DUMMY_MAIN() { return 1; }
15096#endif
15097int
15098main ()
15099{
15100return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
15101 ;
15102 return 0;
15103}
15104_ACEOF
15105# Don't try gcc -ansi; that turns off useful extensions and
15106# breaks some systems' header files.
15107# AIX -qlanglvl=ansi
15108# Ultrix and OSF/1 -std1
15109# HP-UX 10.20 and later -Ae
15110# HP-UX older versions -Aa -D_HPUX_SOURCE
15111# SVR4 -Xc -D__EXTENSIONS__
15112for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
15113do
15114 CC="$ac_save_CC $ac_arg"
15115 rm -f conftest.$ac_objext
15116if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15117 (eval $ac_compile) 2>&5
15118 ac_status=$?
15119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15120 (exit $ac_status); } &&
15121 { ac_try='test -s conftest.$ac_objext'
15122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15123 (eval $ac_try) 2>&5
15124 ac_status=$?
15125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15126 (exit $ac_status); }; }; then
15127 ac_cv_prog_cc_stdc=$ac_arg
15128break
15129else
15130 echo "$as_me: failed program was:" >&5
15131cat conftest.$ac_ext >&5
15132fi
15133rm -f conftest.$ac_objext
15134done
15135rm -f conftest.$ac_ext conftest.$ac_objext
15136CC=$ac_save_CC
15137
15138fi
15139
15140case "x$ac_cv_prog_cc_stdc" in
15141 x|xno)
15142 echo "$as_me:$LINENO: result: none needed" >&5
15143echo "${ECHO_T}none needed" >&6 ;;
15144 *)
15145 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
15146echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
15147 CC="$CC $ac_cv_prog_cc_stdc" ;;
15148esac
15149
Martin v. Löwis11437992002-04-12 09:54:03 +000015150echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
15151echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15152if test "${ac_cv_c_const+set}" = set; then
15153 echo $ECHO_N "(cached) $ECHO_C" >&6
15154else
15155 cat >conftest.$ac_ext <<_ACEOF
15156#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000015157#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015158
Martin v. Löwisf3322282003-07-13 09:46:13 +000015159#ifdef F77_DUMMY_MAIN
15160# ifdef __cplusplus
15161 extern "C"
15162# endif
15163 int F77_DUMMY_MAIN() { return 1; }
15164#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015165int
15166main ()
15167{
15168/* FIXME: Include the comments suggested by Paul. */
15169#ifndef __cplusplus
15170 /* Ultrix mips cc rejects this. */
15171 typedef int charset[2];
15172 const charset x;
15173 /* SunOS 4.1.1 cc rejects this. */
15174 char const *const *ccp;
15175 char **p;
15176 /* NEC SVR4.0.2 mips cc rejects this. */
15177 struct point {int x, y;};
15178 static struct point const zero = {0,0};
15179 /* AIX XL C 1.02.0.0 rejects this.
15180 It does not let you subtract one const X* pointer from another in
15181 an arm of an if-expression whose if-part is not a constant
15182 expression */
15183 const char *g = "string";
15184 ccp = &g + (g ? g-g : 0);
15185 /* HPUX 7.0 cc rejects these. */
15186 ++ccp;
15187 p = (char**) ccp;
15188 ccp = (char const *const *) p;
15189 { /* SCO 3.2v4 cc rejects this. */
15190 char *t;
15191 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015192
Martin v. Löwis11437992002-04-12 09:54:03 +000015193 *t++ = 0;
15194 }
15195 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
15196 int x[] = {25, 17};
15197 const int *foo = &x[0];
15198 ++foo;
15199 }
15200 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15201 typedef const int *iptr;
15202 iptr p = 0;
15203 ++p;
15204 }
15205 { /* AIX XL C 1.02.0.0 rejects this saying
15206 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15207 struct s { int j; const int *ap[3]; };
15208 struct s *b; b->j = 5;
15209 }
15210 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15211 const int foo = 10;
15212 }
15213#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000015214
Martin v. Löwis11437992002-04-12 09:54:03 +000015215 ;
15216 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000015217}
Martin v. Löwis11437992002-04-12 09:54:03 +000015218_ACEOF
15219rm -f conftest.$ac_objext
15220if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15221 (eval $ac_compile) 2>&5
15222 ac_status=$?
15223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15224 (exit $ac_status); } &&
15225 { ac_try='test -s conftest.$ac_objext'
15226 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15227 (eval $ac_try) 2>&5
15228 ac_status=$?
15229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15230 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015231 ac_cv_c_const=yes
15232else
Martin v. Löwis11437992002-04-12 09:54:03 +000015233 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000015234cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015235ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015236fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015237rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015238fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015239echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
15240echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015241if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015242
15243cat >>confdefs.h <<\_ACEOF
15244#define const
15245_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015246
15247fi
15248
Michael W. Hudson54241132001-12-07 15:38:26 +000015249
Guido van Rossumda88dad1995-01-26 00:46:29 +000015250works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015251echo "$as_me:$LINENO: checking for working volatile" >&5
15252echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
15253cat >conftest.$ac_ext <<_ACEOF
15254#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000015255#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015256
Martin v. Löwisf3322282003-07-13 09:46:13 +000015257#ifdef F77_DUMMY_MAIN
15258# ifdef __cplusplus
15259 extern "C"
15260# endif
15261 int F77_DUMMY_MAIN() { return 1; }
15262#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015263int
15264main ()
15265{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015266volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015267 ;
15268 return 0;
15269}
15270_ACEOF
15271rm -f conftest.$ac_objext
15272if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15273 (eval $ac_compile) 2>&5
15274 ac_status=$?
15275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15276 (exit $ac_status); } &&
15277 { ac_try='test -s conftest.$ac_objext'
15278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15279 (eval $ac_try) 2>&5
15280 ac_status=$?
15281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15282 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015283 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015284else
Martin v. Löwis11437992002-04-12 09:54:03 +000015285 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000015286cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015287
15288cat >>confdefs.h <<\_ACEOF
15289#define volatile
15290_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015291
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015292
Guido van Rossum627b2d71993-12-24 10:39:16 +000015293fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015294rm -f conftest.$ac_objext conftest.$ac_ext
15295echo "$as_me:$LINENO: result: $works" >&5
15296echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015297
Guido van Rossumda88dad1995-01-26 00:46:29 +000015298works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015299echo "$as_me:$LINENO: checking for working signed char" >&5
15300echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
15301cat >conftest.$ac_ext <<_ACEOF
15302#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000015303#include "confdefs.h"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015304
Martin v. Löwisf3322282003-07-13 09:46:13 +000015305#ifdef F77_DUMMY_MAIN
15306# ifdef __cplusplus
15307 extern "C"
15308# endif
15309 int F77_DUMMY_MAIN() { return 1; }
15310#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015311int
15312main ()
15313{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015314signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000015315 ;
15316 return 0;
15317}
15318_ACEOF
15319rm -f conftest.$ac_objext
15320if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15321 (eval $ac_compile) 2>&5
15322 ac_status=$?
15323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15324 (exit $ac_status); } &&
15325 { ac_try='test -s conftest.$ac_objext'
15326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15327 (eval $ac_try) 2>&5
15328 ac_status=$?
15329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15330 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015331 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015332else
Martin v. Löwis11437992002-04-12 09:54:03 +000015333 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000015334cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015335
15336cat >>confdefs.h <<\_ACEOF
15337#define signed
15338_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000015339
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015340
Guido van Rossum7f43da71994-08-01 12:15:30 +000015341fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015342rm -f conftest.$ac_objext conftest.$ac_ext
15343echo "$as_me:$LINENO: result: $works" >&5
15344echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015345
Guido van Rossumda88dad1995-01-26 00:46:29 +000015346have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015347echo "$as_me:$LINENO: checking for prototypes" >&5
15348echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
15349cat >conftest.$ac_ext <<_ACEOF
15350#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000015351#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015352int foo(int x) { return 0; }
Martin v. Löwisf3322282003-07-13 09:46:13 +000015353#ifdef F77_DUMMY_MAIN
15354# ifdef __cplusplus
15355 extern "C"
15356# endif
15357 int F77_DUMMY_MAIN() { return 1; }
15358#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015359int
15360main ()
15361{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015362return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000015363 ;
15364 return 0;
15365}
15366_ACEOF
15367rm -f conftest.$ac_objext
15368if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15369 (eval $ac_compile) 2>&5
15370 ac_status=$?
15371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15372 (exit $ac_status); } &&
15373 { ac_try='test -s conftest.$ac_objext'
15374 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15375 (eval $ac_try) 2>&5
15376 ac_status=$?
15377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15378 (exit $ac_status); }; }; then
15379
15380
15381cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015382#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015383_ACEOF
15384
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015385 have_prototypes=yes
15386
Guido van Rossumf78abae1997-01-21 22:02:36 +000015387else
Martin v. Löwis11437992002-04-12 09:54:03 +000015388 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000015389cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000015390fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015391rm -f conftest.$ac_objext conftest.$ac_ext
15392echo "$as_me:$LINENO: result: $have_prototypes" >&5
15393echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015394
Guido van Rossumda88dad1995-01-26 00:46:29 +000015395works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015396echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
15397echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
15398cat >conftest.$ac_ext <<_ACEOF
15399#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000015400#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015401
15402#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000015403int foo(int x, ...) {
15404 va_list va;
15405 va_start(va, x);
15406 va_arg(va, int);
15407 va_arg(va, char *);
15408 va_arg(va, double);
15409 return 0;
15410}
Guido van Rossum7f43da71994-08-01 12:15:30 +000015411
Martin v. Löwisf3322282003-07-13 09:46:13 +000015412#ifdef F77_DUMMY_MAIN
15413# ifdef __cplusplus
15414 extern "C"
15415# endif
15416 int F77_DUMMY_MAIN() { return 1; }
15417#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015418int
15419main ()
15420{
Guido van Rossum90eea071996-08-30 20:58:57 +000015421return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000015422 ;
15423 return 0;
15424}
15425_ACEOF
15426rm -f conftest.$ac_objext
15427if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15428 (eval $ac_compile) 2>&5
15429 ac_status=$?
15430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15431 (exit $ac_status); } &&
15432 { ac_try='test -s conftest.$ac_objext'
15433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15434 (eval $ac_try) 2>&5
15435 ac_status=$?
15436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15437 (exit $ac_status); }; }; then
15438
15439
15440cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015441#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015442_ACEOF
15443
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015444 works=yes
15445
Guido van Rossumf78abae1997-01-21 22:02:36 +000015446else
Martin v. Löwis11437992002-04-12 09:54:03 +000015447 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000015448cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000015449fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015450rm -f conftest.$ac_objext conftest.$ac_ext
15451echo "$as_me:$LINENO: result: $works" >&5
15452echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015453
Guido van Rossumda88dad1995-01-26 00:46:29 +000015454if test "$have_prototypes" = yes; then
15455bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015456echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
15457echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
15458cat >conftest.$ac_ext <<_ACEOF
15459#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000015460#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015461#include <unistd.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +000015462#ifdef F77_DUMMY_MAIN
15463# ifdef __cplusplus
15464 extern "C"
15465# endif
15466 int F77_DUMMY_MAIN() { return 1; }
15467#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015468int
15469main ()
15470{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015471char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000015472 ;
15473 return 0;
15474}
15475_ACEOF
15476rm -f conftest.$ac_objext
15477if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15478 (eval $ac_compile) 2>&5
15479 ac_status=$?
15480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15481 (exit $ac_status); } &&
15482 { ac_try='test -s conftest.$ac_objext'
15483 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15484 (eval $ac_try) 2>&5
15485 ac_status=$?
15486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15487 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000015488 :
15489else
Martin v. Löwis11437992002-04-12 09:54:03 +000015490 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000015491cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015492
15493cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015494#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015495_ACEOF
15496
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015497 bad_prototypes=yes
15498
Guido van Rossum627b2d71993-12-24 10:39:16 +000015499fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015500rm -f conftest.$ac_objext conftest.$ac_ext
15501echo "$as_me:$LINENO: result: $bad_prototypes" >&5
15502echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015503fi
15504
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015505# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000015506echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
15507echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
15508cat >conftest.$ac_ext <<_ACEOF
15509#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000015510#include "confdefs.h"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015511#include <sys/types.h>
15512#include <sys/socket.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +000015513#ifdef F77_DUMMY_MAIN
15514# ifdef __cplusplus
15515 extern "C"
15516# endif
15517 int F77_DUMMY_MAIN() { return 1; }
15518#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015519int
15520main ()
15521{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015522struct sockaddr x;
15523x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015524 ;
15525 return 0;
15526}
15527_ACEOF
15528rm -f conftest.$ac_objext
15529if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15530 (eval $ac_compile) 2>&5
15531 ac_status=$?
15532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15533 (exit $ac_status); } &&
15534 { ac_try='test -s conftest.$ac_objext'
15535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15536 (eval $ac_try) 2>&5
15537 ac_status=$?
15538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15539 (exit $ac_status); }; }; then
15540 echo "$as_me:$LINENO: result: yes" >&5
15541echo "${ECHO_T}yes" >&6
15542
15543cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015544#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015545_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015546
15547else
Martin v. Löwis11437992002-04-12 09:54:03 +000015548 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000015549cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015550echo "$as_me:$LINENO: result: no" >&5
15551echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015552fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015553rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015554
Guido van Rossumda88dad1995-01-26 00:46:29 +000015555va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015556echo "$as_me:$LINENO: checking whether va_list is an array" >&5
15557echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
15558cat >conftest.$ac_ext <<_ACEOF
15559#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000015560#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015561
15562#ifdef HAVE_STDARG_PROTOTYPES
15563#include <stdarg.h>
15564#else
15565#include <varargs.h>
15566#endif
15567
Martin v. Löwisf3322282003-07-13 09:46:13 +000015568#ifdef F77_DUMMY_MAIN
15569# ifdef __cplusplus
15570 extern "C"
15571# endif
15572 int F77_DUMMY_MAIN() { return 1; }
15573#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015574int
15575main ()
15576{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015577va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000015578 ;
15579 return 0;
15580}
15581_ACEOF
15582rm -f conftest.$ac_objext
15583if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15584 (eval $ac_compile) 2>&5
15585 ac_status=$?
15586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15587 (exit $ac_status); } &&
15588 { ac_try='test -s conftest.$ac_objext'
15589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15590 (eval $ac_try) 2>&5
15591 ac_status=$?
15592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15593 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015594 :
15595else
Martin v. Löwis11437992002-04-12 09:54:03 +000015596 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000015597cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015598
15599
15600cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015601#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015602_ACEOF
15603
Guido van Rossumda88dad1995-01-26 00:46:29 +000015604 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015605
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015606fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015607rm -f conftest.$ac_objext conftest.$ac_ext
15608echo "$as_me:$LINENO: result: $va_list_is_array" >&5
15609echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015610
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015611# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000015612
15613
15614
15615echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
15616echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
15617if test "${ac_cv_func_gethostbyname_r+set}" = set; then
15618 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015619else
Martin v. Löwis11437992002-04-12 09:54:03 +000015620 cat >conftest.$ac_ext <<_ACEOF
15621#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000015622#include "confdefs.h"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015623/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwisf3322282003-07-13 09:46:13 +000015624 which can conflict with char gethostbyname_r (); below. */
15625#include <assert.h>
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015626/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015627#ifdef __cplusplus
15628extern "C"
15629#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015630/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015631 builtin and then its argument prototype would still apply. */
15632char gethostbyname_r ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000015633char (*f) ();
15634
15635#ifdef F77_DUMMY_MAIN
15636# ifdef __cplusplus
15637 extern "C"
15638# endif
15639 int F77_DUMMY_MAIN() { return 1; }
15640#endif
15641int
15642main ()
15643{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015644/* The GNU C library defines this for functions which it implements
15645 to always fail with ENOSYS. Some functions are actually named
15646 something starting with __ and the normal name is an alias. */
15647#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
15648choke me
15649#else
Martin v. Löwisf3322282003-07-13 09:46:13 +000015650f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015651#endif
15652
Martin v. Löwis11437992002-04-12 09:54:03 +000015653 ;
15654 return 0;
15655}
15656_ACEOF
15657rm -f conftest.$ac_objext conftest$ac_exeext
15658if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15659 (eval $ac_link) 2>&5
15660 ac_status=$?
15661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15662 (exit $ac_status); } &&
15663 { ac_try='test -s conftest$ac_exeext'
15664 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15665 (eval $ac_try) 2>&5
15666 ac_status=$?
15667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15668 (exit $ac_status); }; }; then
15669 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015670else
Martin v. Löwis11437992002-04-12 09:54:03 +000015671 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000015672cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015673ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015674fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015675rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015676fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015677echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
15678echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
15679if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015680
Martin v. Löwis11437992002-04-12 09:54:03 +000015681 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015682#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015683_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015684
Martin v. Löwis11437992002-04-12 09:54:03 +000015685 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
15686echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015687 OLD_CFLAGS=$CFLAGS
15688 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015689 cat >conftest.$ac_ext <<_ACEOF
15690#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000015691#include "confdefs.h"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015692
15693# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015694
Martin v. Löwisf3322282003-07-13 09:46:13 +000015695#ifdef F77_DUMMY_MAIN
15696# ifdef __cplusplus
15697 extern "C"
15698# endif
15699 int F77_DUMMY_MAIN() { return 1; }
15700#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015701int
15702main ()
15703{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015704
15705 char *name;
15706 struct hostent *he, *res;
15707 char buffer[2048];
15708 int buflen = 2048;
15709 int h_errnop;
15710
15711 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015712
15713 ;
15714 return 0;
15715}
15716_ACEOF
15717rm -f conftest.$ac_objext
15718if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15719 (eval $ac_compile) 2>&5
15720 ac_status=$?
15721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15722 (exit $ac_status); } &&
15723 { ac_try='test -s conftest.$ac_objext'
15724 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15725 (eval $ac_try) 2>&5
15726 ac_status=$?
15727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15728 (exit $ac_status); }; }; then
15729
15730 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015731#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015732_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015733
Martin v. Löwis11437992002-04-12 09:54:03 +000015734
15735cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015736#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015737_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015738
Martin v. Löwis11437992002-04-12 09:54:03 +000015739 echo "$as_me:$LINENO: result: yes" >&5
15740echo "${ECHO_T}yes" >&6
15741
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015742else
Martin v. Löwis11437992002-04-12 09:54:03 +000015743 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000015744cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015745
15746 echo "$as_me:$LINENO: result: no" >&5
15747echo "${ECHO_T}no" >&6
15748 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
15749echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
15750 cat >conftest.$ac_ext <<_ACEOF
15751#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000015752#include "confdefs.h"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015753
15754# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015755
Martin v. Löwisf3322282003-07-13 09:46:13 +000015756#ifdef F77_DUMMY_MAIN
15757# ifdef __cplusplus
15758 extern "C"
15759# endif
15760 int F77_DUMMY_MAIN() { return 1; }
15761#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015762int
15763main ()
15764{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015765
15766 char *name;
15767 struct hostent *he;
15768 char buffer[2048];
15769 int buflen = 2048;
15770 int h_errnop;
15771
15772 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015773
15774 ;
15775 return 0;
15776}
15777_ACEOF
15778rm -f conftest.$ac_objext
15779if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15780 (eval $ac_compile) 2>&5
15781 ac_status=$?
15782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15783 (exit $ac_status); } &&
15784 { ac_try='test -s conftest.$ac_objext'
15785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15786 (eval $ac_try) 2>&5
15787 ac_status=$?
15788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15789 (exit $ac_status); }; }; then
15790
15791 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015792#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015793_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015794
Martin v. Löwis11437992002-04-12 09:54:03 +000015795
15796cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015797#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015798_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015799
Martin v. Löwis11437992002-04-12 09:54:03 +000015800 echo "$as_me:$LINENO: result: yes" >&5
15801echo "${ECHO_T}yes" >&6
15802
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015803else
Martin v. Löwis11437992002-04-12 09:54:03 +000015804 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000015805cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015806
15807 echo "$as_me:$LINENO: result: no" >&5
15808echo "${ECHO_T}no" >&6
15809 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
15810echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
15811 cat >conftest.$ac_ext <<_ACEOF
15812#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000015813#include "confdefs.h"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015814
15815# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015816
Martin v. Löwisf3322282003-07-13 09:46:13 +000015817#ifdef F77_DUMMY_MAIN
15818# ifdef __cplusplus
15819 extern "C"
15820# endif
15821 int F77_DUMMY_MAIN() { return 1; }
15822#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015823int
15824main ()
15825{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015826
15827 char *name;
15828 struct hostent *he;
15829 struct hostent_data data;
15830
15831 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000015832
15833 ;
15834 return 0;
15835}
15836_ACEOF
15837rm -f conftest.$ac_objext
15838if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15839 (eval $ac_compile) 2>&5
15840 ac_status=$?
15841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15842 (exit $ac_status); } &&
15843 { ac_try='test -s conftest.$ac_objext'
15844 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15845 (eval $ac_try) 2>&5
15846 ac_status=$?
15847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15848 (exit $ac_status); }; }; then
15849
15850 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015851#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015852_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015853
Martin v. Löwis11437992002-04-12 09:54:03 +000015854
15855cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015856#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015857_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015858
Martin v. Löwis11437992002-04-12 09:54:03 +000015859 echo "$as_me:$LINENO: result: yes" >&5
15860echo "${ECHO_T}yes" >&6
15861
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015862else
Martin v. Löwis11437992002-04-12 09:54:03 +000015863 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000015864cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015865
15866 echo "$as_me:$LINENO: result: no" >&5
15867echo "${ECHO_T}no" >&6
15868
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015869fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015870rm -f conftest.$ac_objext conftest.$ac_ext
15871
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015872fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015873rm -f conftest.$ac_objext conftest.$ac_ext
15874
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015875fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015876rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015877 CFLAGS=$OLD_CFLAGS
15878
15879else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015880
Martin v. Löwis11437992002-04-12 09:54:03 +000015881
15882for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000015883do
Martin v. Löwis11437992002-04-12 09:54:03 +000015884as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15885echo "$as_me:$LINENO: checking for $ac_func" >&5
15886echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15887if eval "test \"\${$as_ac_var+set}\" = set"; then
15888 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015889else
Martin v. Löwis11437992002-04-12 09:54:03 +000015890 cat >conftest.$ac_ext <<_ACEOF
15891#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000015892#include "confdefs.h"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015893/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwisf3322282003-07-13 09:46:13 +000015894 which can conflict with char $ac_func (); below. */
15895#include <assert.h>
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015896/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015897#ifdef __cplusplus
15898extern "C"
15899#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015900/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015901 builtin and then its argument prototype would still apply. */
15902char $ac_func ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000015903char (*f) ();
15904
15905#ifdef F77_DUMMY_MAIN
15906# ifdef __cplusplus
15907 extern "C"
15908# endif
15909 int F77_DUMMY_MAIN() { return 1; }
15910#endif
15911int
15912main ()
15913{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015914/* The GNU C library defines this for functions which it implements
15915 to always fail with ENOSYS. Some functions are actually named
15916 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015917#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015918choke me
15919#else
Martin v. Löwisf3322282003-07-13 09:46:13 +000015920f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015921#endif
15922
Martin v. Löwis11437992002-04-12 09:54:03 +000015923 ;
15924 return 0;
15925}
15926_ACEOF
15927rm -f conftest.$ac_objext conftest$ac_exeext
15928if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15929 (eval $ac_link) 2>&5
15930 ac_status=$?
15931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15932 (exit $ac_status); } &&
15933 { ac_try='test -s conftest$ac_exeext'
15934 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15935 (eval $ac_try) 2>&5
15936 ac_status=$?
15937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15938 (exit $ac_status); }; }; then
15939 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015940else
Martin v. Löwis11437992002-04-12 09:54:03 +000015941 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000015942cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015943eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015944fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015945rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015946fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015947echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15948echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15949if test `eval echo '${'$as_ac_var'}'` = yes; then
15950 cat >>confdefs.h <<_ACEOF
15951#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15952_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015953
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015954fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015955done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015956
Michael W. Hudson54241132001-12-07 15:38:26 +000015957
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015958fi
15959
Michael W. Hudson54241132001-12-07 15:38:26 +000015960
15961
15962
15963
15964
15965
Guido van Rossum627b2d71993-12-24 10:39:16 +000015966# checks for system services
15967# (none yet)
15968
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015969# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000015970echo "$as_me:$LINENO: checking for __fpu_control" >&5
15971echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
15972if test "${ac_cv_func___fpu_control+set}" = set; then
15973 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015974else
Martin v. Löwis11437992002-04-12 09:54:03 +000015975 cat >conftest.$ac_ext <<_ACEOF
15976#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000015977#include "confdefs.h"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015978/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwisf3322282003-07-13 09:46:13 +000015979 which can conflict with char __fpu_control (); below. */
15980#include <assert.h>
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015981/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015982#ifdef __cplusplus
15983extern "C"
15984#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015985/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015986 builtin and then its argument prototype would still apply. */
15987char __fpu_control ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000015988char (*f) ();
15989
15990#ifdef F77_DUMMY_MAIN
15991# ifdef __cplusplus
15992 extern "C"
15993# endif
15994 int F77_DUMMY_MAIN() { return 1; }
15995#endif
15996int
15997main ()
15998{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015999/* The GNU C library defines this for functions which it implements
16000 to always fail with ENOSYS. Some functions are actually named
16001 something starting with __ and the normal name is an alias. */
16002#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
16003choke me
16004#else
Martin v. Löwisf3322282003-07-13 09:46:13 +000016005f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016006#endif
16007
Martin v. Löwis11437992002-04-12 09:54:03 +000016008 ;
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_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016025else
Martin v. Löwis11437992002-04-12 09:54:03 +000016026 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000016027cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016028ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016029fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016030rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016031fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016032echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
16033echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
16034if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016035 :
16036else
Martin v. Löwis11437992002-04-12 09:54:03 +000016037
16038echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
16039echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
16040if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
16041 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016042else
Martin v. Löwis11437992002-04-12 09:54:03 +000016043 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016044LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016045cat >conftest.$ac_ext <<_ACEOF
16046#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000016047#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016048
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016049/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016050#ifdef __cplusplus
16051extern "C"
16052#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016053/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016054 builtin and then its argument prototype would still apply. */
16055char __fpu_control ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000016056#ifdef F77_DUMMY_MAIN
16057# ifdef __cplusplus
16058 extern "C"
16059# endif
16060 int F77_DUMMY_MAIN() { return 1; }
16061#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016062int
16063main ()
16064{
16065__fpu_control ();
16066 ;
16067 return 0;
16068}
16069_ACEOF
16070rm -f conftest.$ac_objext conftest$ac_exeext
16071if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16072 (eval $ac_link) 2>&5
16073 ac_status=$?
16074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16075 (exit $ac_status); } &&
16076 { ac_try='test -s conftest$ac_exeext'
16077 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16078 (eval $ac_try) 2>&5
16079 ac_status=$?
16080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16081 (exit $ac_status); }; }; then
16082 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000016083else
Martin v. Löwis11437992002-04-12 09:54:03 +000016084 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000016085cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016086ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016087fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016088rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16089LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016090fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016091echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
16092echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
16093if test $ac_cv_lib_ieee___fpu_control = yes; then
16094 cat >>confdefs.h <<_ACEOF
16095#define HAVE_LIBIEEE 1
16096_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016097
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016098 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016099
Guido van Rossum627b2d71993-12-24 10:39:16 +000016100fi
16101
Michael W. Hudson54241132001-12-07 15:38:26 +000016102
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016103fi
16104
Michael W. Hudson54241132001-12-07 15:38:26 +000016105
Guido van Rossum7f253911997-05-09 02:42:48 +000016106# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000016107echo "$as_me:$LINENO: checking for --with-fpectl" >&5
16108echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
16109
Guido van Rossum7f253911997-05-09 02:42:48 +000016110# Check whether --with-fpectl or --without-fpectl was given.
16111if test "${with_fpectl+set}" = set; then
16112 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000016113
Guido van Rossum7f253911997-05-09 02:42:48 +000016114if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016115then
16116
16117cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000016118#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016119_ACEOF
16120
16121 echo "$as_me:$LINENO: result: yes" >&5
16122echo "${ECHO_T}yes" >&6
16123else echo "$as_me:$LINENO: result: no" >&5
16124echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016125fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016126else
Martin v. Löwis11437992002-04-12 09:54:03 +000016127 echo "$as_me:$LINENO: result: no" >&5
16128echo "${ECHO_T}no" >&6
16129fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000016130
Guido van Rossum7f43da71994-08-01 12:15:30 +000016131# check for --with-libm=...
16132
Guido van Rossum563e7081996-09-10 18:20:48 +000016133case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000016134Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016135BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000016136*) LIBM=-lm
16137esac
Martin v. Löwis11437992002-04-12 09:54:03 +000016138echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
16139echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
16140
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016141# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016142if test "${with_libm+set}" = set; then
16143 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000016144
Guido van Rossum7f253911997-05-09 02:42:48 +000016145if test "$withval" = no
16146then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000016147 echo "$as_me:$LINENO: result: force LIBM empty" >&5
16148echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016149elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016150then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000016151 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
16152echo "${ECHO_T}set LIBM=\"$withval\"" >&6
16153else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
16154echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
16155 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016156fi
Guido van Rossum7f253911997-05-09 02:42:48 +000016157else
Martin v. Löwis11437992002-04-12 09:54:03 +000016158 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
16159echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
16160fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016161
16162# check for --with-libc=...
16163
Martin v. Löwis11437992002-04-12 09:54:03 +000016164echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
16165echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
16166
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016167# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016168if test "${with_libc+set}" = set; then
16169 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000016170
Guido van Rossum7f253911997-05-09 02:42:48 +000016171if test "$withval" = no
16172then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000016173 echo "$as_me:$LINENO: result: force LIBC empty" >&5
16174echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016175elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016176then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000016177 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
16178echo "${ECHO_T}set LIBC=\"$withval\"" >&6
16179else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
16180echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
16181 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016182fi
Guido van Rossum7f253911997-05-09 02:42:48 +000016183else
Martin v. Löwis11437992002-04-12 09:54:03 +000016184 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
16185echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
16186fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016187
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016188# check for hypot() in math library
16189LIBS_SAVE=$LIBS
16190LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000016191
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016192for ac_func in hypot
16193do
Martin v. Löwis11437992002-04-12 09:54:03 +000016194as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16195echo "$as_me:$LINENO: checking for $ac_func" >&5
16196echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16197if eval "test \"\${$as_ac_var+set}\" = set"; then
16198 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016199else
Martin v. Löwis11437992002-04-12 09:54:03 +000016200 cat >conftest.$ac_ext <<_ACEOF
16201#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000016202#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016203/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwisf3322282003-07-13 09:46:13 +000016204 which can conflict with char $ac_func (); below. */
16205#include <assert.h>
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016206/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016207#ifdef __cplusplus
16208extern "C"
16209#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016210/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016211 builtin and then its argument prototype would still apply. */
16212char $ac_func ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000016213char (*f) ();
16214
16215#ifdef F77_DUMMY_MAIN
16216# ifdef __cplusplus
16217 extern "C"
16218# endif
16219 int F77_DUMMY_MAIN() { return 1; }
16220#endif
16221int
16222main ()
16223{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016224/* The GNU C library defines this for functions which it implements
16225 to always fail with ENOSYS. Some functions are actually named
16226 something starting with __ and the normal name is an alias. */
16227#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16228choke me
16229#else
Martin v. Löwisf3322282003-07-13 09:46:13 +000016230f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016231#endif
16232
Martin v. Löwis11437992002-04-12 09:54:03 +000016233 ;
16234 return 0;
16235}
16236_ACEOF
16237rm -f conftest.$ac_objext conftest$ac_exeext
16238if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16239 (eval $ac_link) 2>&5
16240 ac_status=$?
16241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16242 (exit $ac_status); } &&
16243 { ac_try='test -s conftest$ac_exeext'
16244 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16245 (eval $ac_try) 2>&5
16246 ac_status=$?
16247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16248 (exit $ac_status); }; }; then
16249 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016250else
Martin v. Löwis11437992002-04-12 09:54:03 +000016251 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000016252cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016253eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016254fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016255rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016256fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016257echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16258echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16259if test `eval echo '${'$as_ac_var'}'` = yes; then
16260 cat >>confdefs.h <<_ACEOF
16261#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16262_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000016263
Michael W. Hudson54241132001-12-07 15:38:26 +000016264else
Martin v. Löwis11437992002-04-12 09:54:03 +000016265 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016266fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016267done
16268
Michael W. Hudson54241132001-12-07 15:38:26 +000016269
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016270LIBS=$LIBS_SAVE
16271
Guido van Rossumef2255b2000-03-10 22:30:29 +000016272# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000016273if test "${ac_cv_header_wchar_h+set}" = set; then
16274 echo "$as_me:$LINENO: checking for wchar.h" >&5
16275echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16276if test "${ac_cv_header_wchar_h+set}" = set; then
16277 echo $ECHO_N "(cached) $ECHO_C" >&6
16278fi
16279echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16280echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000016281else
Martin v. Löwis11437992002-04-12 09:54:03 +000016282 # Is the header compilable?
16283echo "$as_me:$LINENO: checking wchar.h usability" >&5
16284echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
16285cat >conftest.$ac_ext <<_ACEOF
16286#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000016287#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016288$ac_includes_default
16289#include <wchar.h>
16290_ACEOF
16291rm -f conftest.$ac_objext
16292if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16293 (eval $ac_compile) 2>&5
16294 ac_status=$?
16295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16296 (exit $ac_status); } &&
16297 { ac_try='test -s conftest.$ac_objext'
16298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16299 (eval $ac_try) 2>&5
16300 ac_status=$?
16301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16302 (exit $ac_status); }; }; then
16303 ac_header_compiler=yes
16304else
16305 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000016306cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016307ac_header_compiler=no
16308fi
16309rm -f conftest.$ac_objext conftest.$ac_ext
16310echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16311echo "${ECHO_T}$ac_header_compiler" >&6
16312
16313# Is the header present?
16314echo "$as_me:$LINENO: checking wchar.h presence" >&5
16315echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
16316cat >conftest.$ac_ext <<_ACEOF
16317#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000016318#include "confdefs.h"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016319#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016320_ACEOF
16321if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16322 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16323 ac_status=$?
Martin v. Löwisf3322282003-07-13 09:46:13 +000016324 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016325 rm -f conftest.er1
16326 cat conftest.err >&5
16327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16328 (exit $ac_status); } >/dev/null; then
16329 if test -s conftest.err; then
16330 ac_cpp_err=$ac_c_preproc_warn_flag
16331 else
16332 ac_cpp_err=
16333 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016334else
Martin v. Löwis11437992002-04-12 09:54:03 +000016335 ac_cpp_err=yes
16336fi
16337if test -z "$ac_cpp_err"; then
16338 ac_header_preproc=yes
16339else
16340 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000016341 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016342 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016343fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016344rm -f conftest.err conftest.$ac_ext
16345echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16346echo "${ECHO_T}$ac_header_preproc" >&6
16347
16348# So? What about this header?
16349case $ac_header_compiler:$ac_header_preproc in
16350 yes:no )
16351 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
16352echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16353 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000016354echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwis11437992002-04-12 09:54:03 +000016355 no:yes )
16356 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
16357echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
16358 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
16359echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
16360 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000016361echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwis11437992002-04-12 09:54:03 +000016362esac
16363echo "$as_me:$LINENO: checking for wchar.h" >&5
16364echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16365if test "${ac_cv_header_wchar_h+set}" = set; then
16366 echo $ECHO_N "(cached) $ECHO_C" >&6
16367else
16368 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000016369fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016370echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16371echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
16372
16373fi
16374if test $ac_cv_header_wchar_h = yes; then
16375
16376
16377cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016378#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016379_ACEOF
16380
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016381 wchar_h="yes"
16382
Guido van Rossumef2255b2000-03-10 22:30:29 +000016383else
Martin v. Löwis11437992002-04-12 09:54:03 +000016384 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016385
16386fi
16387
Michael W. Hudson54241132001-12-07 15:38:26 +000016388
Martin v. Löwis11437992002-04-12 09:54:03 +000016389
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016390# determine wchar_t size
16391if test "$wchar_h" = yes
16392then
Martin v. Löwis11437992002-04-12 09:54:03 +000016393 echo "$as_me:$LINENO: checking for wchar_t" >&5
16394echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
16395if test "${ac_cv_type_wchar_t+set}" = set; then
16396 echo $ECHO_N "(cached) $ECHO_C" >&6
16397else
16398 cat >conftest.$ac_ext <<_ACEOF
16399#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000016400#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016401#include <wchar.h>
16402
Martin v. Löwisf3322282003-07-13 09:46:13 +000016403#ifdef F77_DUMMY_MAIN
16404# ifdef __cplusplus
16405 extern "C"
16406# endif
16407 int F77_DUMMY_MAIN() { return 1; }
16408#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016409int
16410main ()
16411{
16412if ((wchar_t *) 0)
16413 return 0;
16414if (sizeof (wchar_t))
16415 return 0;
16416 ;
16417 return 0;
16418}
16419_ACEOF
16420rm -f conftest.$ac_objext
16421if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16422 (eval $ac_compile) 2>&5
16423 ac_status=$?
16424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16425 (exit $ac_status); } &&
16426 { ac_try='test -s conftest.$ac_objext'
16427 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16428 (eval $ac_try) 2>&5
16429 ac_status=$?
16430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16431 (exit $ac_status); }; }; then
16432 ac_cv_type_wchar_t=yes
16433else
16434 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000016435cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016436ac_cv_type_wchar_t=no
16437fi
16438rm -f conftest.$ac_objext conftest.$ac_ext
16439fi
16440echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
16441echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
16442
16443echo "$as_me:$LINENO: checking size of wchar_t" >&5
16444echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
16445if test "${ac_cv_sizeof_wchar_t+set}" = set; then
16446 echo $ECHO_N "(cached) $ECHO_C" >&6
16447else
16448 if test "$ac_cv_type_wchar_t" = yes; then
16449 # The cast to unsigned long works around a bug in the HP C Compiler
16450 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16451 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16452 # This bug is HP SR number 8606223364.
16453 if test "$cross_compiling" = yes; then
16454 # Depending upon the size, compute the lo and hi bounds.
16455cat >conftest.$ac_ext <<_ACEOF
16456#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000016457#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016458#include <wchar.h>
16459
Martin v. Löwisf3322282003-07-13 09:46:13 +000016460#ifdef F77_DUMMY_MAIN
16461# ifdef __cplusplus
16462 extern "C"
16463# endif
16464 int F77_DUMMY_MAIN() { return 1; }
16465#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016466int
16467main ()
16468{
16469static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
16470test_array [0] = 0
16471
16472 ;
16473 return 0;
16474}
16475_ACEOF
16476rm -f conftest.$ac_objext
16477if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16478 (eval $ac_compile) 2>&5
16479 ac_status=$?
16480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16481 (exit $ac_status); } &&
16482 { ac_try='test -s conftest.$ac_objext'
16483 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16484 (eval $ac_try) 2>&5
16485 ac_status=$?
16486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16487 (exit $ac_status); }; }; then
16488 ac_lo=0 ac_mid=0
16489 while :; do
16490 cat >conftest.$ac_ext <<_ACEOF
16491#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000016492#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016493#include <wchar.h>
16494
Martin v. Löwisf3322282003-07-13 09:46:13 +000016495#ifdef F77_DUMMY_MAIN
16496# ifdef __cplusplus
16497 extern "C"
16498# endif
16499 int F77_DUMMY_MAIN() { return 1; }
16500#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016501int
16502main ()
16503{
16504static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16505test_array [0] = 0
16506
16507 ;
16508 return 0;
16509}
16510_ACEOF
16511rm -f conftest.$ac_objext
16512if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16513 (eval $ac_compile) 2>&5
16514 ac_status=$?
16515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16516 (exit $ac_status); } &&
16517 { ac_try='test -s conftest.$ac_objext'
16518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16519 (eval $ac_try) 2>&5
16520 ac_status=$?
16521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16522 (exit $ac_status); }; }; then
16523 ac_hi=$ac_mid; break
16524else
16525 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000016526cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016527ac_lo=`expr $ac_mid + 1`
16528 if test $ac_lo -le $ac_mid; then
16529 ac_lo= ac_hi=
16530 break
16531 fi
16532 ac_mid=`expr 2 '*' $ac_mid + 1`
16533fi
16534rm -f conftest.$ac_objext conftest.$ac_ext
16535 done
16536else
16537 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000016538cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016539cat >conftest.$ac_ext <<_ACEOF
16540#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000016541#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016542#include <wchar.h>
16543
Martin v. Löwisf3322282003-07-13 09:46:13 +000016544#ifdef F77_DUMMY_MAIN
16545# ifdef __cplusplus
16546 extern "C"
16547# endif
16548 int F77_DUMMY_MAIN() { return 1; }
16549#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016550int
16551main ()
16552{
16553static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
16554test_array [0] = 0
16555
16556 ;
16557 return 0;
16558}
16559_ACEOF
16560rm -f conftest.$ac_objext
16561if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16562 (eval $ac_compile) 2>&5
16563 ac_status=$?
16564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16565 (exit $ac_status); } &&
16566 { ac_try='test -s conftest.$ac_objext'
16567 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16568 (eval $ac_try) 2>&5
16569 ac_status=$?
16570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16571 (exit $ac_status); }; }; then
16572 ac_hi=-1 ac_mid=-1
16573 while :; do
16574 cat >conftest.$ac_ext <<_ACEOF
16575#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000016576#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016577#include <wchar.h>
16578
Martin v. Löwisf3322282003-07-13 09:46:13 +000016579#ifdef F77_DUMMY_MAIN
16580# ifdef __cplusplus
16581 extern "C"
16582# endif
16583 int F77_DUMMY_MAIN() { return 1; }
16584#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016585int
16586main ()
16587{
16588static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
16589test_array [0] = 0
16590
16591 ;
16592 return 0;
16593}
16594_ACEOF
16595rm -f conftest.$ac_objext
16596if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16597 (eval $ac_compile) 2>&5
16598 ac_status=$?
16599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16600 (exit $ac_status); } &&
16601 { ac_try='test -s conftest.$ac_objext'
16602 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16603 (eval $ac_try) 2>&5
16604 ac_status=$?
16605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16606 (exit $ac_status); }; }; then
16607 ac_lo=$ac_mid; break
16608else
16609 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000016610cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016611ac_hi=`expr '(' $ac_mid ')' - 1`
16612 if test $ac_mid -le $ac_hi; then
16613 ac_lo= ac_hi=
16614 break
16615 fi
16616 ac_mid=`expr 2 '*' $ac_mid`
16617fi
16618rm -f conftest.$ac_objext conftest.$ac_ext
16619 done
16620else
16621 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000016622cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016623ac_lo= ac_hi=
16624fi
16625rm -f conftest.$ac_objext conftest.$ac_ext
16626fi
16627rm -f conftest.$ac_objext conftest.$ac_ext
16628# Binary search between lo and hi bounds.
16629while test "x$ac_lo" != "x$ac_hi"; do
16630 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
16631 cat >conftest.$ac_ext <<_ACEOF
16632#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000016633#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016634#include <wchar.h>
16635
Martin v. Löwisf3322282003-07-13 09:46:13 +000016636#ifdef F77_DUMMY_MAIN
16637# ifdef __cplusplus
16638 extern "C"
16639# endif
16640 int F77_DUMMY_MAIN() { return 1; }
16641#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016642int
16643main ()
16644{
16645static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16646test_array [0] = 0
16647
16648 ;
16649 return 0;
16650}
16651_ACEOF
16652rm -f conftest.$ac_objext
16653if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16654 (eval $ac_compile) 2>&5
16655 ac_status=$?
16656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16657 (exit $ac_status); } &&
16658 { ac_try='test -s conftest.$ac_objext'
16659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16660 (eval $ac_try) 2>&5
16661 ac_status=$?
16662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16663 (exit $ac_status); }; }; then
16664 ac_hi=$ac_mid
16665else
16666 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000016667cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016668ac_lo=`expr '(' $ac_mid ')' + 1`
16669fi
16670rm -f conftest.$ac_objext conftest.$ac_ext
16671done
16672case $ac_lo in
16673?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwisf3322282003-07-13 09:46:13 +000016674'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
16675echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016676 { (exit 1); exit 1; }; } ;;
16677esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016678else
16679 if test "$cross_compiling" = yes; then
Martin v. Löwisf3322282003-07-13 09:46:13 +000016680 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
16681echo "$as_me: error: cannot run test program while cross compiling" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016682 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000016683else
Martin v. Löwis11437992002-04-12 09:54:03 +000016684 cat >conftest.$ac_ext <<_ACEOF
16685#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000016686#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016687#include <wchar.h>
16688
16689long longval () { return (long) (sizeof (wchar_t)); }
16690unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000016691#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016692#include <stdlib.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +000016693#ifdef F77_DUMMY_MAIN
16694# ifdef __cplusplus
16695 extern "C"
16696# endif
16697 int F77_DUMMY_MAIN() { return 1; }
16698#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016699int
16700main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016701{
Martin v. Löwis11437992002-04-12 09:54:03 +000016702
16703 FILE *f = fopen ("conftest.val", "w");
16704 if (! f)
16705 exit (1);
16706 if (((long) (sizeof (wchar_t))) < 0)
16707 {
16708 long i = longval ();
16709 if (i != ((long) (sizeof (wchar_t))))
16710 exit (1);
16711 fprintf (f, "%ld\n", i);
16712 }
16713 else
16714 {
16715 unsigned long i = ulongval ();
16716 if (i != ((long) (sizeof (wchar_t))))
16717 exit (1);
16718 fprintf (f, "%lu\n", i);
16719 }
16720 exit (ferror (f) || fclose (f) != 0);
16721
16722 ;
16723 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000016724}
Martin v. Löwis11437992002-04-12 09:54:03 +000016725_ACEOF
16726rm -f conftest$ac_exeext
16727if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16728 (eval $ac_link) 2>&5
16729 ac_status=$?
16730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16731 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16733 (eval $ac_try) 2>&5
16734 ac_status=$?
16735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16736 (exit $ac_status); }; }; then
16737 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000016738else
Martin v. Löwis11437992002-04-12 09:54:03 +000016739 echo "$as_me: program exited with status $ac_status" >&5
16740echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000016741cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016742( exit $ac_status )
Martin v. Löwisf3322282003-07-13 09:46:13 +000016743{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
16744echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016745 { (exit 1); exit 1; }; }
16746fi
Martin v. Löwisf3322282003-07-13 09:46:13 +000016747rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016748fi
16749fi
16750rm -f conftest.val
16751else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016752 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000016753fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016754fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016755echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
16756echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
16757cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016758#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016759_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016760
Michael W. Hudson54241132001-12-07 15:38:26 +000016761
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016762fi
16763
Martin v. Löwis11437992002-04-12 09:54:03 +000016764echo "$as_me:$LINENO: checking what type to use for unicode" >&5
16765echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016766# Check whether --enable-unicode or --disable-unicode was given.
16767if test "${enable_unicode+set}" = set; then
16768 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000016769
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016770else
16771 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000016772fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016773
16774if test $enable_unicode = yes
16775then
Martin v. Löwisfd917792001-06-27 20:22:04 +000016776 # Without any arguments, Py_UNICODE defaults to two-byte mode
16777 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016778fi
16779
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016780
16781
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016782case "$enable_unicode" in
16783ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000016784 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016785#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000016786_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016787
16788 ;;
16789ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000016790 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016791#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000016792_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016793
16794 ;;
16795esac
16796
Michael W. Hudson54241132001-12-07 15:38:26 +000016797
Martin v. Löwis11437992002-04-12 09:54:03 +000016798
16799
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016800
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016801if test "$enable_unicode" = "no"
16802then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016803 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000016804 echo "$as_me:$LINENO: result: not used" >&5
16805echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016806else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016807 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000016808
16809cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016810#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016811_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016812
16813 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
16814 then
16815 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016816
Martin v. Löwis11437992002-04-12 09:54:03 +000016817cat >>confdefs.h <<\_ACEOF
16818#define HAVE_USABLE_WCHAR_T 1
16819_ACEOF
16820
16821 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016822#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016823_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016824
16825 elif test "$ac_cv_sizeof_short" = "$unicode_size"
16826 then
16827 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000016828 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016829#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000016830_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016831
16832 elif test "$ac_cv_sizeof_long" = "$unicode_size"
16833 then
16834 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000016835 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016836#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000016837_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016838
16839 else
16840 PY_UNICODE_TYPE="no type found"
16841 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016842 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
16843echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016844fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016845
16846# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000016847echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
16848echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
16849if test "${ac_cv_c_bigendian+set}" = set; then
16850 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000016851else
Martin v. Löwis11437992002-04-12 09:54:03 +000016852 # See if sys/param.h defines the BYTE_ORDER macro.
16853cat >conftest.$ac_ext <<_ACEOF
16854#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000016855#include "confdefs.h"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016856#include <sys/types.h>
16857#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000016858
Martin v. Löwisf3322282003-07-13 09:46:13 +000016859#ifdef F77_DUMMY_MAIN
16860# ifdef __cplusplus
16861 extern "C"
16862# endif
16863 int F77_DUMMY_MAIN() { return 1; }
16864#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016865int
16866main ()
16867{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016868#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
16869 bogus endian macros
16870#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016871
16872 ;
16873 return 0;
16874}
16875_ACEOF
16876rm -f conftest.$ac_objext
16877if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16878 (eval $ac_compile) 2>&5
16879 ac_status=$?
16880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16881 (exit $ac_status); } &&
16882 { ac_try='test -s conftest.$ac_objext'
16883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16884 (eval $ac_try) 2>&5
16885 ac_status=$?
16886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16887 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016888 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000016889cat >conftest.$ac_ext <<_ACEOF
16890#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000016891#include "confdefs.h"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016892#include <sys/types.h>
16893#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000016894
Martin v. Löwisf3322282003-07-13 09:46:13 +000016895#ifdef F77_DUMMY_MAIN
16896# ifdef __cplusplus
16897 extern "C"
16898# endif
16899 int F77_DUMMY_MAIN() { return 1; }
16900#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016901int
16902main ()
16903{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016904#if BYTE_ORDER != BIG_ENDIAN
16905 not big endian
16906#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016907
16908 ;
16909 return 0;
16910}
16911_ACEOF
16912rm -f conftest.$ac_objext
16913if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16914 (eval $ac_compile) 2>&5
16915 ac_status=$?
16916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16917 (exit $ac_status); } &&
16918 { ac_try='test -s conftest.$ac_objext'
16919 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16920 (eval $ac_try) 2>&5
16921 ac_status=$?
16922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16923 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016924 ac_cv_c_bigendian=yes
16925else
Martin v. Löwis11437992002-04-12 09:54:03 +000016926 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000016927cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016928ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016929fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016930rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016931else
Martin v. Löwis11437992002-04-12 09:54:03 +000016932 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000016933cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016934# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000016935if test "$cross_compiling" = yes; then
Martin v. Löwisf3322282003-07-13 09:46:13 +000016936 # try to guess the endianess by grep'ing values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000016937 ac_cv_c_bigendian=unknown
16938 cat >conftest.$ac_ext <<_ACEOF
16939#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000016940#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016941short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16942short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16943void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
16944short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16945short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16946void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwisf3322282003-07-13 09:46:13 +000016947#ifdef F77_DUMMY_MAIN
16948# ifdef __cplusplus
16949 extern "C"
16950# endif
16951 int F77_DUMMY_MAIN() { return 1; }
16952#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016953int
16954main ()
16955{
16956 _ascii (); _ebcdic ();
16957 ;
16958 return 0;
16959}
16960_ACEOF
16961rm -f conftest.$ac_objext
16962if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16963 (eval $ac_compile) 2>&5
16964 ac_status=$?
16965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16966 (exit $ac_status); } &&
16967 { ac_try='test -s conftest.$ac_objext'
16968 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16969 (eval $ac_try) 2>&5
16970 ac_status=$?
16971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16972 (exit $ac_status); }; }; then
Martin v. Löwisf3322282003-07-13 09:46:13 +000016973 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016974 ac_cv_c_bigendian=yes
16975fi
Martin v. Löwisf3322282003-07-13 09:46:13 +000016976if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016977 if test "$ac_cv_c_bigendian" = unknown; then
16978 ac_cv_c_bigendian=no
16979 else
16980 # finding both strings is unlikely to happen, but who knows?
16981 ac_cv_c_bigendian=unknown
16982 fi
16983fi
16984else
16985 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000016986cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016987fi
16988rm -f conftest.$ac_objext conftest.$ac_ext
16989else
16990 cat >conftest.$ac_ext <<_ACEOF
16991#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000016992#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016993int
16994main ()
16995{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016996 /* Are we little or big endian? From Harbison&Steele. */
16997 union
16998 {
16999 long l;
17000 char c[sizeof (long)];
17001 } u;
17002 u.l = 1;
17003 exit (u.c[sizeof (long) - 1] == 1);
17004}
Martin v. Löwis11437992002-04-12 09:54:03 +000017005_ACEOF
17006rm -f conftest$ac_exeext
17007if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17008 (eval $ac_link) 2>&5
17009 ac_status=$?
17010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17011 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17012 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17013 (eval $ac_try) 2>&5
17014 ac_status=$?
17015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17016 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017017 ac_cv_c_bigendian=no
17018else
Martin v. Löwis11437992002-04-12 09:54:03 +000017019 echo "$as_me: program exited with status $ac_status" >&5
17020echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000017021cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017022( exit $ac_status )
17023ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000017024fi
Martin v. Löwisf3322282003-07-13 09:46:13 +000017025rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000017026fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017027fi
17028rm -f conftest.$ac_objext conftest.$ac_ext
17029fi
17030echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
17031echo "${ECHO_T}$ac_cv_c_bigendian" >&6
17032case $ac_cv_c_bigendian in
17033 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000017034
Martin v. Löwis11437992002-04-12 09:54:03 +000017035cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000017036#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017037_ACEOF
17038 ;;
17039 no)
17040 ;;
17041 *)
Martin v. Löwisf3322282003-07-13 09:46:13 +000017042 { { echo "$as_me:$LINENO: error: unknown endianess
Martin v. Löwis11437992002-04-12 09:54:03 +000017043presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000017044echo "$as_me: error: unknown endianess
Martin v. Löwis11437992002-04-12 09:54:03 +000017045presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
17046 { (exit 1); exit 1; }; } ;;
17047esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000017048
Michael W. Hudson54241132001-12-07 15:38:26 +000017049
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017050# Check whether right shifting a negative integer extends the sign bit
17051# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000017052echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
17053echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
17054if test "${ac_cv_rshift_extends_sign+set}" = set; then
17055 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000017056else
Martin v. Löwis11437992002-04-12 09:54:03 +000017057
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017058if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017059 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017060else
Martin v. Löwis11437992002-04-12 09:54:03 +000017061 cat >conftest.$ac_ext <<_ACEOF
17062#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000017063#include "confdefs.h"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017064
17065int main()
17066{
Vladimir Marangozova6180282000-07-12 05:05:06 +000017067 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017068}
17069
Martin v. Löwis11437992002-04-12 09:54:03 +000017070_ACEOF
17071rm -f conftest$ac_exeext
17072if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17073 (eval $ac_link) 2>&5
17074 ac_status=$?
17075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17076 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17077 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17078 (eval $ac_try) 2>&5
17079 ac_status=$?
17080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17081 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000017082 ac_cv_rshift_extends_sign=yes
17083else
Martin v. Löwis11437992002-04-12 09:54:03 +000017084 echo "$as_me: program exited with status $ac_status" >&5
17085echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000017086cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017087( exit $ac_status )
17088ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000017089fi
Martin v. Löwisf3322282003-07-13 09:46:13 +000017090rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017091fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000017092fi
17093
Martin v. Löwis11437992002-04-12 09:54:03 +000017094echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
17095echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000017096if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017097then
Martin v. Löwis11437992002-04-12 09:54:03 +000017098
17099cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017100#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017101_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017102
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017103fi
17104
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017105# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017106echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
17107echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
17108if test "${ac_cv_have_getc_unlocked+set}" = set; then
17109 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017110else
Martin v. Löwis11437992002-04-12 09:54:03 +000017111
17112cat >conftest.$ac_ext <<_ACEOF
17113#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000017114#include "confdefs.h"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017115#include <stdio.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +000017116#ifdef F77_DUMMY_MAIN
17117# ifdef __cplusplus
17118 extern "C"
17119# endif
17120 int F77_DUMMY_MAIN() { return 1; }
17121#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017122int
17123main ()
17124{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017125
17126 FILE *f = fopen("/dev/null", "r");
17127 flockfile(f);
17128 getc_unlocked(f);
17129 funlockfile(f);
17130
Martin v. Löwis11437992002-04-12 09:54:03 +000017131 ;
17132 return 0;
17133}
17134_ACEOF
17135rm -f conftest.$ac_objext conftest$ac_exeext
17136if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17137 (eval $ac_link) 2>&5
17138 ac_status=$?
17139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17140 (exit $ac_status); } &&
17141 { ac_try='test -s conftest$ac_exeext'
17142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17143 (eval $ac_try) 2>&5
17144 ac_status=$?
17145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17146 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017147 ac_cv_have_getc_unlocked=yes
17148else
Martin v. Löwis11437992002-04-12 09:54:03 +000017149 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000017150cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017151ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017152fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017153rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017154fi
17155
Martin v. Löwis11437992002-04-12 09:54:03 +000017156echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
17157echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017158if test "$ac_cv_have_getc_unlocked" = yes
17159then
Martin v. Löwis11437992002-04-12 09:54:03 +000017160
17161cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017162#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017163_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017164
17165fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017166
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017167# check for readline 2.2
17168cat >conftest.$ac_ext <<_ACEOF
17169#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000017170#include "confdefs.h"
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017171#include <readline/readline.h>
17172_ACEOF
17173if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17174 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17175 ac_status=$?
Martin v. Löwisf3322282003-07-13 09:46:13 +000017176 egrep -v '^ *\+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017177 rm -f conftest.er1
17178 cat conftest.err >&5
17179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17180 (exit $ac_status); } >/dev/null; then
17181 if test -s conftest.err; then
17182 ac_cpp_err=$ac_c_preproc_warn_flag
17183 else
17184 ac_cpp_err=
17185 fi
17186else
17187 ac_cpp_err=yes
17188fi
17189if test -z "$ac_cpp_err"; then
17190 have_readline=yes
17191else
17192 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000017193 cat conftest.$ac_ext >&5
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017194 have_readline=no
17195fi
17196rm -f conftest.err conftest.$ac_ext
17197if test $have_readline = yes
17198then
17199 cat >conftest.$ac_ext <<_ACEOF
17200#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000017201#include "confdefs.h"
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017202#include <readline/readline.h>
17203
17204_ACEOF
17205if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Martin v. Löwisf3322282003-07-13 09:46:13 +000017206 egrep "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017207
17208cat >>confdefs.h <<\_ACEOF
17209#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
17210_ACEOF
17211
17212fi
17213rm -f conftest*
17214
17215fi
17216
Martin v. Löwis0daad592001-09-30 21:09:59 +000017217# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000017218echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
17219echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
17220if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
17221 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000017222else
Martin v. Löwis11437992002-04-12 09:54:03 +000017223 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000017224LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017225cat >conftest.$ac_ext <<_ACEOF
17226#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000017227#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000017228
Guido van Rossum353ae582001-07-10 16:45:32 +000017229/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017230#ifdef __cplusplus
17231extern "C"
17232#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000017233/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017234 builtin and then its argument prototype would still apply. */
17235char rl_pre_input_hook ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000017236#ifdef F77_DUMMY_MAIN
17237# ifdef __cplusplus
17238 extern "C"
17239# endif
17240 int F77_DUMMY_MAIN() { return 1; }
17241#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017242int
17243main ()
17244{
17245rl_pre_input_hook ();
17246 ;
17247 return 0;
17248}
17249_ACEOF
17250rm -f conftest.$ac_objext conftest$ac_exeext
17251if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17252 (eval $ac_link) 2>&5
17253 ac_status=$?
17254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17255 (exit $ac_status); } &&
17256 { ac_try='test -s conftest$ac_exeext'
17257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17258 (eval $ac_try) 2>&5
17259 ac_status=$?
17260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17261 (exit $ac_status); }; }; then
17262 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000017263else
Martin v. Löwis11437992002-04-12 09:54:03 +000017264 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000017265cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017266ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000017267fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017268rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17269LIBS=$ac_check_lib_save_LIBS
17270fi
17271echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
17272echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
17273if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017274
Martin v. Löwis11437992002-04-12 09:54:03 +000017275cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017276#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017277_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017278
Martin v. Löwis0daad592001-09-30 21:09:59 +000017279fi
17280
Michael W. Hudson54241132001-12-07 15:38:26 +000017281
Martin v. Löwis0daad592001-09-30 21:09:59 +000017282# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000017283echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
17284echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
17285if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
17286 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000017287else
Martin v. Löwis11437992002-04-12 09:54:03 +000017288 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000017289LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017290cat >conftest.$ac_ext <<_ACEOF
17291#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000017292#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000017293
Martin v. Löwis0daad592001-09-30 21:09:59 +000017294/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017295#ifdef __cplusplus
17296extern "C"
17297#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000017298/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017299 builtin and then its argument prototype would still apply. */
17300char rl_completion_matches ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000017301#ifdef F77_DUMMY_MAIN
17302# ifdef __cplusplus
17303 extern "C"
17304# endif
17305 int F77_DUMMY_MAIN() { return 1; }
17306#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017307int
17308main ()
17309{
17310rl_completion_matches ();
17311 ;
17312 return 0;
17313}
17314_ACEOF
17315rm -f conftest.$ac_objext conftest$ac_exeext
17316if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17317 (eval $ac_link) 2>&5
17318 ac_status=$?
17319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17320 (exit $ac_status); } &&
17321 { ac_try='test -s conftest$ac_exeext'
17322 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17323 (eval $ac_try) 2>&5
17324 ac_status=$?
17325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17326 (exit $ac_status); }; }; then
17327 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000017328else
Martin v. Löwis11437992002-04-12 09:54:03 +000017329 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000017330cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017331ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000017332fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017333rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17334LIBS=$ac_check_lib_save_LIBS
17335fi
17336echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
17337echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
17338if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017339
Martin v. Löwis11437992002-04-12 09:54:03 +000017340cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017341#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017342_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017343
Guido van Rossum353ae582001-07-10 16:45:32 +000017344fi
17345
Jack Jansendd19cf82001-12-06 22:36:17 +000017346
Martin v. Löwis11437992002-04-12 09:54:03 +000017347echo "$as_me:$LINENO: checking for broken nice()" >&5
17348echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
17349if test "${ac_cv_broken_nice+set}" = set; then
17350 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017351else
Martin v. Löwis11437992002-04-12 09:54:03 +000017352
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017353if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017354 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017355else
Martin v. Löwis11437992002-04-12 09:54:03 +000017356 cat >conftest.$ac_ext <<_ACEOF
17357#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000017358#include "confdefs.h"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017359
17360int main()
17361{
17362 int val1 = nice(1);
17363 if (val1 != -1 && val1 == nice(2))
17364 exit(0);
17365 exit(1);
17366}
17367
Martin v. Löwis11437992002-04-12 09:54:03 +000017368_ACEOF
17369rm -f conftest$ac_exeext
17370if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17371 (eval $ac_link) 2>&5
17372 ac_status=$?
17373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17374 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17375 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17376 (eval $ac_try) 2>&5
17377 ac_status=$?
17378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17379 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017380 ac_cv_broken_nice=yes
17381else
Martin v. Löwis11437992002-04-12 09:54:03 +000017382 echo "$as_me: program exited with status $ac_status" >&5
17383echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000017384cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017385( exit $ac_status )
17386ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017387fi
Martin v. Löwisf3322282003-07-13 09:46:13 +000017388rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017389fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017390fi
17391
Martin v. Löwis11437992002-04-12 09:54:03 +000017392echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
17393echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017394if test "$ac_cv_broken_nice" = yes
17395then
Martin v. Löwis11437992002-04-12 09:54:03 +000017396
17397cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017398#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017399_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017400
17401fi
17402
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017403# tzset(3) exists and works like we expect it to
17404echo "$as_me:$LINENO: checking for working tzset()" >&5
17405echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
17406if test "${ac_cv_working_tzset+set}" = set; then
17407 echo $ECHO_N "(cached) $ECHO_C" >&6
17408else
17409
17410if test "$cross_compiling" = yes; then
17411 ac_cv_working_tzset=no
17412else
17413 cat >conftest.$ac_ext <<_ACEOF
17414#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000017415#include "confdefs.h"
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017416
17417#include <stdlib.h>
17418#include <time.h>
17419int main()
17420{
17421 int gmt_hour;
17422 int eastern_hour;
17423 time_t now;
17424 now = time((time_t*)NULL);
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017425 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017426 tzset();
17427 gmt_hour = localtime(&now)->tm_hour;
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017428 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017429 tzset();
17430 eastern_hour = localtime(&now)->tm_hour;
17431 if (eastern_hour == gmt_hour)
17432 exit(1);
17433 exit(0);
17434}
17435
17436_ACEOF
17437rm -f conftest$ac_exeext
17438if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17439 (eval $ac_link) 2>&5
17440 ac_status=$?
17441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17442 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17443 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17444 (eval $ac_try) 2>&5
17445 ac_status=$?
17446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17447 (exit $ac_status); }; }; then
17448 ac_cv_working_tzset=yes
17449else
17450 echo "$as_me: program exited with status $ac_status" >&5
17451echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000017452cat conftest.$ac_ext >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017453( exit $ac_status )
17454ac_cv_working_tzset=no
17455fi
Martin v. Löwisf3322282003-07-13 09:46:13 +000017456rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017457fi
17458fi
17459
17460echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
17461echo "${ECHO_T}$ac_cv_working_tzset" >&6
17462if test "$ac_cv_working_tzset" = yes
17463then
17464
17465cat >>confdefs.h <<\_ACEOF
17466#define HAVE_WORKING_TZSET 1
17467_ACEOF
17468
17469fi
17470
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017471# Look for subsecond timestamps in struct stat
17472echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
17473echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
17474if test "${ac_cv_stat_tv_nsec+set}" = set; then
17475 echo $ECHO_N "(cached) $ECHO_C" >&6
17476else
17477 cat >conftest.$ac_ext <<_ACEOF
17478#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000017479#include "confdefs.h"
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017480#include <sys/stat.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +000017481#ifdef F77_DUMMY_MAIN
17482# ifdef __cplusplus
17483 extern "C"
17484# endif
17485 int F77_DUMMY_MAIN() { return 1; }
17486#endif
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017487int
17488main ()
17489{
17490
17491struct stat st;
17492st.st_mtim.tv_nsec = 1;
17493
17494 ;
17495 return 0;
17496}
17497_ACEOF
17498rm -f conftest.$ac_objext
17499if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17500 (eval $ac_compile) 2>&5
17501 ac_status=$?
17502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17503 (exit $ac_status); } &&
17504 { ac_try='test -s conftest.$ac_objext'
17505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17506 (eval $ac_try) 2>&5
17507 ac_status=$?
17508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17509 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000017510 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017511else
17512 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000017513cat conftest.$ac_ext >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017514ac_cv_stat_tv_nsec=no
17515fi
17516rm -f conftest.$ac_objext conftest.$ac_ext
17517fi
17518
17519echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
17520echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
17521if test "$ac_cv_stat_tv_nsec" = yes
17522then
17523
17524cat >>confdefs.h <<\_ACEOF
17525#define HAVE_STAT_TV_NSEC 1
17526_ACEOF
17527
17528fi
17529
Jack Jansen666b1e72001-10-31 12:11:48 +000017530# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000017531echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
17532echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
17533if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
17534 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017535else
Martin v. Löwis11437992002-04-12 09:54:03 +000017536 cat >conftest.$ac_ext <<_ACEOF
17537#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000017538#include "confdefs.h"
Jack Jansen666b1e72001-10-31 12:11:48 +000017539#include <curses.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +000017540#ifdef F77_DUMMY_MAIN
17541# ifdef __cplusplus
17542 extern "C"
17543# endif
17544 int F77_DUMMY_MAIN() { return 1; }
17545#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017546int
17547main ()
17548{
Jack Jansen666b1e72001-10-31 12:11:48 +000017549
17550 int rtn;
17551 rtn = mvwdelch(0,0,0);
17552
Martin v. Löwis11437992002-04-12 09:54:03 +000017553 ;
17554 return 0;
17555}
17556_ACEOF
17557rm -f conftest.$ac_objext
17558if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17559 (eval $ac_compile) 2>&5
17560 ac_status=$?
17561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17562 (exit $ac_status); } &&
17563 { ac_try='test -s conftest.$ac_objext'
17564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17565 (eval $ac_try) 2>&5
17566 ac_status=$?
17567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17568 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017569 ac_cv_mvwdelch_is_expression=yes
17570else
Martin v. Löwis11437992002-04-12 09:54:03 +000017571 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000017572cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017573ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017574fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017575rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017576fi
17577
Martin v. Löwis11437992002-04-12 09:54:03 +000017578echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
17579echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017580
17581if test "$ac_cv_mvwdelch_is_expression" = yes
17582then
Martin v. Löwis11437992002-04-12 09:54:03 +000017583
17584cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017585#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017586_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017587
17588fi
17589
Martin v. Löwis11437992002-04-12 09:54:03 +000017590echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
17591echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
17592if test "${ac_cv_window_has_flags+set}" = set; then
17593 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017594else
Martin v. Löwis11437992002-04-12 09:54:03 +000017595 cat >conftest.$ac_ext <<_ACEOF
17596#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000017597#include "confdefs.h"
Jack Jansen666b1e72001-10-31 12:11:48 +000017598#include <curses.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +000017599#ifdef F77_DUMMY_MAIN
17600# ifdef __cplusplus
17601 extern "C"
17602# endif
17603 int F77_DUMMY_MAIN() { return 1; }
17604#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017605int
17606main ()
17607{
Jack Jansen666b1e72001-10-31 12:11:48 +000017608
17609 WINDOW *w;
17610 w->_flags = 0;
17611
Martin v. Löwis11437992002-04-12 09:54:03 +000017612 ;
17613 return 0;
17614}
17615_ACEOF
17616rm -f conftest.$ac_objext
17617if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17618 (eval $ac_compile) 2>&5
17619 ac_status=$?
17620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17621 (exit $ac_status); } &&
17622 { ac_try='test -s conftest.$ac_objext'
17623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17624 (eval $ac_try) 2>&5
17625 ac_status=$?
17626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17627 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017628 ac_cv_window_has_flags=yes
17629else
Martin v. Löwis11437992002-04-12 09:54:03 +000017630 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000017631cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017632ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017633fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017634rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017635fi
17636
Martin v. Löwis11437992002-04-12 09:54:03 +000017637echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
17638echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017639
Jack Jansen666b1e72001-10-31 12:11:48 +000017640
17641if test "$ac_cv_window_has_flags" = yes
17642then
Martin v. Löwis11437992002-04-12 09:54:03 +000017643
17644cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017645#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017646_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017647
17648fi
17649
Martin v. Löwis24a880b2002-12-31 12:55:15 +000017650echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
17651echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
17652
17653if test -e /dev/ptmx
17654then
17655 echo "$as_me:$LINENO: result: yes" >&5
17656echo "${ECHO_T}yes" >&6
17657
17658cat >>confdefs.h <<\_ACEOF
17659#define HAVE_DEV_PTMX 1
17660_ACEOF
17661
17662else
17663 echo "$as_me:$LINENO: result: no" >&5
17664echo "${ECHO_T}no" >&6
17665fi
17666
Neal Norwitz865400f2003-03-21 01:42:58 +000017667echo "$as_me:$LINENO: checking for /dev/ptc" >&5
17668echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
17669
17670if test -e /dev/ptc
17671then
17672 echo "$as_me:$LINENO: result: yes" >&5
17673echo "${ECHO_T}yes" >&6
17674
17675cat >>confdefs.h <<\_ACEOF
17676#define HAVE_DEV_PTC 1
17677_ACEOF
17678
17679else
17680 echo "$as_me:$LINENO: result: no" >&5
17681echo "${ECHO_T}no" >&6
17682fi
17683
Martin v. Löwis11437992002-04-12 09:54:03 +000017684echo "$as_me:$LINENO: checking for socklen_t" >&5
17685echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
17686if test "${ac_cv_type_socklen_t+set}" = set; then
17687 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000017688else
Martin v. Löwis11437992002-04-12 09:54:03 +000017689 cat >conftest.$ac_ext <<_ACEOF
17690#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000017691#include "confdefs.h"
Martin v. Löwis01c04012002-11-11 14:58:44 +000017692
17693#ifdef HAVE_SYS_TYPES_H
17694#include <sys/types.h>
17695#endif
17696#ifdef HAVE_SYS_SOCKET_H
17697#include <sys/socket.h>
17698#endif
17699
17700
Martin v. Löwisf3322282003-07-13 09:46:13 +000017701#ifdef F77_DUMMY_MAIN
17702# ifdef __cplusplus
17703 extern "C"
17704# endif
17705 int F77_DUMMY_MAIN() { return 1; }
17706#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017707int
17708main ()
17709{
17710if ((socklen_t *) 0)
17711 return 0;
17712if (sizeof (socklen_t))
17713 return 0;
17714 ;
17715 return 0;
17716}
17717_ACEOF
17718rm -f conftest.$ac_objext
17719if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17720 (eval $ac_compile) 2>&5
17721 ac_status=$?
17722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17723 (exit $ac_status); } &&
17724 { ac_try='test -s conftest.$ac_objext'
17725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17726 (eval $ac_try) 2>&5
17727 ac_status=$?
17728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17729 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000017730 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000017731else
Martin v. Löwis11437992002-04-12 09:54:03 +000017732 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000017733cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017734ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000017735fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017736rm -f conftest.$ac_objext conftest.$ac_ext
17737fi
17738echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
17739echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
17740if test $ac_cv_type_socklen_t = yes; then
17741 :
17742else
Guido van Rossum95713eb2000-05-18 20:53:31 +000017743
Martin v. Löwis01c04012002-11-11 14:58:44 +000017744cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017745#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000017746_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017747
17748fi
17749
Michael W. Hudson54241132001-12-07 15:38:26 +000017750
Michael W. Hudson54241132001-12-07 15:38:26 +000017751
17752
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000017753for h in `(cd $srcdir;echo Python/thread_*.h)`
17754do
17755 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
17756done
17757
Michael W. Hudson54241132001-12-07 15:38:26 +000017758
Jack Jansen0b06be72002-06-21 14:48:38 +000017759SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000017760echo "$as_me:$LINENO: checking for build directories" >&5
17761echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017762for dir in $SRCDIRS; do
17763 if test ! -d $dir; then
17764 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000017765 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017766done
Martin v. Löwis11437992002-04-12 09:54:03 +000017767echo "$as_me:$LINENO: result: done" >&5
17768echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000017769
Guido van Rossum627b2d71993-12-24 10:39:16 +000017770# generate output files
Martin v. Löwisf3322282003-07-13 09:46:13 +000017771ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017772
Martin v. Löwis11437992002-04-12 09:54:03 +000017773cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017774# This file is a shell script that caches the results of configure
17775# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017776# scripts and configure runs, see configure's option --config-cache.
17777# It is not useful on other systems. If it contains results you don't
17778# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017779#
Martin v. Löwis11437992002-04-12 09:54:03 +000017780# config.status only pays attention to the cache file if you give it
17781# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017782#
Martin v. Löwisf3322282003-07-13 09:46:13 +000017783# `ac_cv_env_foo' variables (set or unset) will be overriden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017784# loading this file, other *unset* `ac_cv_foo' will be assigned the
17785# following values.
17786
17787_ACEOF
17788
Guido van Rossumf78abae1997-01-21 22:02:36 +000017789# The following way of writing the cache mishandles newlines in values,
17790# but we know of no workaround that is simple, portable, and efficient.
17791# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017792# Ultrix sh set writes to stderr and can't be redirected directly,
17793# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000017794{
17795 (set) 2>&1 |
17796 case `(ac_space=' '; set | grep ac_space) 2>&1` in
17797 *ac_space=\ *)
17798 # `set' does not quote correctly, so add quotes (double-quote
17799 # substitution turns \\\\ into \\, and sed turns \\ into \).
17800 sed -n \
17801 "s/'/'\\\\''/g;
17802 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17803 ;;
17804 *)
17805 # `set' quotes correctly as required by POSIX, so do not add quotes.
17806 sed -n \
17807 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17808 ;;
17809 esac;
17810} |
17811 sed '
17812 t clear
17813 : clear
17814 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17815 t end
17816 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17817 : end' >>confcache
Martin v. Löwisf3322282003-07-13 09:46:13 +000017818if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017819 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017820 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17821 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017822 else
17823 echo "not updating unwritable cache $cache_file"
17824 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017825fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017826rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017827
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017828test "x$prefix" = xNONE && prefix=$ac_default_prefix
17829# Let make expand exec_prefix.
17830test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017831
Martin v. Löwis11437992002-04-12 09:54:03 +000017832# VPATH may cause trouble with some makes, so we remove $(srcdir),
17833# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17834# trailing colons and then remove the whole line if VPATH becomes empty
17835# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000017836if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017837 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17838s/:*\$(srcdir):*/:/;
17839s/:*\${srcdir}:*/:/;
17840s/:*@srcdir@:*/:/;
17841s/^\([^=]*=[ ]*\):*/\1/;
17842s/:*$//;
17843s/^[^=]*=[ ]*$//;
17844}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017845fi
17846
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017847DEFS=-DHAVE_CONFIG_H
17848
Martin v. Löwis11437992002-04-12 09:54:03 +000017849
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017850: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000017851ac_clean_files_save=$ac_clean_files
17852ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17853{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
17854echo "$as_me: creating $CONFIG_STATUS" >&6;}
17855cat >$CONFIG_STATUS <<_ACEOF
17856#! $SHELL
17857# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017858# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017859# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017860# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017861
Martin v. Löwis11437992002-04-12 09:54:03 +000017862debug=false
17863SHELL=\${CONFIG_SHELL-$SHELL}
17864_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000017865
Martin v. Löwis11437992002-04-12 09:54:03 +000017866cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwisf3322282003-07-13 09:46:13 +000017867
Martin v. Löwis11437992002-04-12 09:54:03 +000017868## --------------------- ##
17869## M4sh Initialization. ##
17870## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017871
Martin v. Löwis11437992002-04-12 09:54:03 +000017872# Be Bourne compatible
17873if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17874 emulate sh
17875 NULLCMD=:
17876elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17877 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000017878fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017879
Martin v. Löwisf3322282003-07-13 09:46:13 +000017880# NLS nuisances.
Martin v. Löwis11437992002-04-12 09:54:03 +000017881# Support unset when possible.
17882if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17883 as_unset=unset
17884else
17885 as_unset=false
17886fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017887
Martin v. Löwisf3322282003-07-13 09:46:13 +000017888(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
17889 { $as_unset LANG || test "${LANG+set}" != set; } ||
17890 { LANG=C; export LANG; }
17891(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
17892 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
17893 { LC_ALL=C; export LC_ALL; }
17894(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
17895 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
17896 { LC_TIME=C; export LC_TIME; }
17897(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
17898 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
17899 { LC_CTYPE=C; export LC_CTYPE; }
17900(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
17901 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
17902 { LANGUAGE=C; export LANGUAGE; }
17903(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
17904 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
17905 { LC_COLLATE=C; export LC_COLLATE; }
17906(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
17907 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
17908 { LC_NUMERIC=C; export LC_NUMERIC; }
17909(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
17910 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
17911 { LC_MESSAGES=C; export LC_MESSAGES; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017912
17913
17914# Name of the executable.
Martin v. Löwisf3322282003-07-13 09:46:13 +000017915as_me=`(basename "$0") 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017916$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17917 X"$0" : 'X\(//\)$' \| \
17918 X"$0" : 'X\(/\)$' \| \
17919 . : '\(.\)' 2>/dev/null ||
17920echo X/"$0" |
17921 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
17922 /^X\/\(\/\/\)$/{ s//\1/; q; }
17923 /^X\/\(\/\).*/{ s//\1/; q; }
17924 s/.*/./; q'`
17925
17926# PATH needs CR, and LINENO needs CR and PATH.
17927# Avoid depending upon Character Ranges.
17928as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17929as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17930as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17931as_cr_digits='0123456789'
17932as_cr_alnum=$as_cr_Letters$as_cr_digits
17933
17934# The user is always right.
17935if test "${PATH_SEPARATOR+set}" != set; then
Martin v. Löwisf3322282003-07-13 09:46:13 +000017936 echo "#! /bin/sh" >conftest.sh
17937 echo "exit 0" >>conftest.sh
17938 chmod +x conftest.sh
17939 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017940 PATH_SEPARATOR=';'
17941 else
17942 PATH_SEPARATOR=:
17943 fi
Martin v. Löwisf3322282003-07-13 09:46:13 +000017944 rm -f conftest.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000017945fi
17946
17947
17948 as_lineno_1=$LINENO
17949 as_lineno_2=$LINENO
17950 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17951 test "x$as_lineno_1" != "x$as_lineno_2" &&
17952 test "x$as_lineno_3" = "x$as_lineno_2" || {
17953 # Find who we are. Look in the path if we contain no path at all
17954 # relative or not.
17955 case $0 in
17956 *[\\/]* ) as_myself=$0 ;;
17957 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17958for as_dir in $PATH
17959do
17960 IFS=$as_save_IFS
17961 test -z "$as_dir" && as_dir=.
17962 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17963done
17964
17965 ;;
17966 esac
17967 # We did not find ourselves, most probably we were run as `sh COMMAND'
17968 # in which case we are not to be found in the path.
17969 if test "x$as_myself" = x; then
17970 as_myself=$0
17971 fi
17972 if test ! -f "$as_myself"; then
17973 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
17974echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
17975 { (exit 1); exit 1; }; }
17976 fi
17977 case $CONFIG_SHELL in
17978 '')
17979 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17980for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
17981do
17982 IFS=$as_save_IFS
17983 test -z "$as_dir" && as_dir=.
17984 for as_base in sh bash ksh sh5; do
17985 case $as_dir in
17986 /*)
17987 if ("$as_dir/$as_base" -c '
17988 as_lineno_1=$LINENO
17989 as_lineno_2=$LINENO
17990 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17991 test "x$as_lineno_1" != "x$as_lineno_2" &&
17992 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
17993 CONFIG_SHELL=$as_dir/$as_base
17994 export CONFIG_SHELL
17995 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
17996 fi;;
17997 esac
17998 done
17999done
18000;;
Jack Jansendd19cf82001-12-06 22:36:17 +000018001 esac
18002
Martin v. Löwis11437992002-04-12 09:54:03 +000018003 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
18004 # uniformly replaced by the line number. The first 'sed' inserts a
18005 # line-number line before each line; the second 'sed' does the real
18006 # work. The second script uses 'N' to pair each line-number line
18007 # with the numbered line, and appends trailing '-' during
18008 # substitution so that $LINENO is not a special case at line end.
18009 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
18010 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
18011 sed '=' <$as_myself |
18012 sed '
18013 N
18014 s,$,-,
18015 : loop
18016 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
18017 t loop
18018 s,-$,,
18019 s,^['$as_cr_digits']*\n,,
18020 ' >$as_me.lineno &&
18021 chmod +x $as_me.lineno ||
18022 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
18023echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
18024 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018025
Martin v. Löwis11437992002-04-12 09:54:03 +000018026 # Don't try to exec as it changes $[0], causing all sort of problems
18027 # (the dirname of $[0] is not the place where we might find the
18028 # original and so on. Autoconf is especially sensible to this).
18029 . ./$as_me.lineno
18030 # Exit status is that of the last command.
18031 exit
18032}
18033
18034
18035case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
18036 *c*,-n*) ECHO_N= ECHO_C='
18037' ECHO_T=' ' ;;
18038 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
18039 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
18040esac
18041
18042if expr a : '\(a\)' >/dev/null 2>&1; then
18043 as_expr=expr
18044else
18045 as_expr=false
18046fi
18047
18048rm -f conf$$ conf$$.exe conf$$.file
18049echo >conf$$.file
18050if ln -s conf$$.file conf$$ 2>/dev/null; then
18051 # We could just check for DJGPP; but this test a) works b) is more generic
18052 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18053 if test -f conf$$.exe; then
18054 # Don't use ln at all; we don't have any links
18055 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018056 else
Martin v. Löwis11437992002-04-12 09:54:03 +000018057 as_ln_s='ln -s'
18058 fi
18059elif ln conf$$.file conf$$ 2>/dev/null; then
18060 as_ln_s=ln
18061else
18062 as_ln_s='cp -p'
18063fi
18064rm -f conf$$ conf$$.exe conf$$.file
18065
18066as_executable_p="test -f"
18067
18068# Sed expression to map a string onto a valid CPP name.
18069as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
18070
18071# Sed expression to map a string onto a valid variable name.
18072as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
18073
18074
18075# IFS
18076# We need space, tab and new line, in precisely that order.
18077as_nl='
18078'
18079IFS=" $as_nl"
18080
18081# CDPATH.
Martin v. Löwisf3322282003-07-13 09:46:13 +000018082$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018083
18084exec 6>&1
18085
18086# Open the log real soon, to keep \$[0] and so on meaningful, and to
18087# report actual input values of CONFIG_FILES etc. instead of their
18088# values after options handling. Logging --version etc. is OK.
18089exec 5>>config.log
18090{
18091 echo
18092 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18093## Running $as_me. ##
18094_ASBOX
18095} >&5
18096cat >&5 <<_CSEOF
18097
Martin v. Löwis88afe662002-10-26 13:47:44 +000018098This file was extended by python $as_me 2.3, which was
Martin v. Löwisf3322282003-07-13 09:46:13 +000018099generated by GNU Autoconf 2.53. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018100
18101 CONFIG_FILES = $CONFIG_FILES
18102 CONFIG_HEADERS = $CONFIG_HEADERS
18103 CONFIG_LINKS = $CONFIG_LINKS
18104 CONFIG_COMMANDS = $CONFIG_COMMANDS
18105 $ $0 $@
18106
18107_CSEOF
18108echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
18109echo >&5
18110_ACEOF
18111
18112# Files that config.status was made for.
18113if test -n "$ac_config_files"; then
18114 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18115fi
18116
18117if test -n "$ac_config_headers"; then
18118 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18119fi
18120
18121if test -n "$ac_config_links"; then
18122 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18123fi
18124
18125if test -n "$ac_config_commands"; then
18126 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18127fi
18128
18129cat >>$CONFIG_STATUS <<\_ACEOF
18130
18131ac_cs_usage="\
18132\`$as_me' instantiates files from templates according to the
18133current configuration.
18134
18135Usage: $0 [OPTIONS] [FILE]...
18136
18137 -h, --help print this help, then exit
18138 -V, --version print version number, then exit
18139 -d, --debug don't remove temporary files
18140 --recheck update $as_me by reconfiguring in the same conditions
18141 --file=FILE[:TEMPLATE]
18142 instantiate the configuration file FILE
18143 --header=FILE[:TEMPLATE]
18144 instantiate the configuration header FILE
18145
18146Configuration files:
18147$config_files
18148
18149Configuration headers:
18150$config_headers
18151
18152Report bugs to <bug-autoconf@gnu.org>."
18153_ACEOF
18154
18155cat >>$CONFIG_STATUS <<_ACEOF
18156ac_cs_version="\\
Martin v. Löwis88afe662002-10-26 13:47:44 +000018157python config.status 2.3
Martin v. Löwisf3322282003-07-13 09:46:13 +000018158configured by $0, generated by GNU Autoconf 2.53,
Martin v. Löwis11437992002-04-12 09:54:03 +000018159 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18160
18161Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18162Free Software Foundation, Inc.
18163This config.status script is free software; the Free Software Foundation
18164gives unlimited permission to copy, distribute and modify it."
18165srcdir=$srcdir
18166INSTALL="$INSTALL"
18167_ACEOF
18168
18169cat >>$CONFIG_STATUS <<\_ACEOF
18170# If no file are specified by the user, then we need to provide default
18171# value. By we need to know if files were specified by the user.
18172ac_need_defaults=:
18173while test $# != 0
18174do
18175 case $1 in
18176 --*=*)
18177 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18178 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Martin v. Löwisf3322282003-07-13 09:46:13 +000018179 shift
18180 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18181 shift
Martin v. Löwis11437992002-04-12 09:54:03 +000018182 ;;
Martin v. Löwisf3322282003-07-13 09:46:13 +000018183 -*);;
Martin v. Löwis11437992002-04-12 09:54:03 +000018184 *) # This is not an option, so the user has probably given explicit
18185 # arguments.
18186 ac_need_defaults=false;;
18187 esac
18188
Martin v. Löwisf3322282003-07-13 09:46:13 +000018189 case $1 in
Martin v. Löwis11437992002-04-12 09:54:03 +000018190 # Handling of the options.
18191_ACEOF
Martin v. Löwisf3322282003-07-13 09:46:13 +000018192cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanarod8d39a02003-07-10 20:44:10 +000018193 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Martin v. Löwisf3322282003-07-13 09:46:13 +000018194 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18195 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18196_ACEOF
18197cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018198 --version | --vers* | -V )
18199 echo "$ac_cs_version"; exit 0 ;;
18200 --he | --h)
18201 # Conflict between --help and --header
18202 { { echo "$as_me:$LINENO: error: ambiguous option: $1
18203Try \`$0 --help' for more information." >&5
18204echo "$as_me: error: ambiguous option: $1
18205Try \`$0 --help' for more information." >&2;}
18206 { (exit 1); exit 1; }; };;
18207 --help | --hel | -h )
18208 echo "$ac_cs_usage"; exit 0 ;;
18209 --debug | --d* | -d )
18210 debug=: ;;
18211 --file | --fil | --fi | --f )
Martin v. Löwisf3322282003-07-13 09:46:13 +000018212 shift
18213 CONFIG_FILES="$CONFIG_FILES $1"
Martin v. Löwis11437992002-04-12 09:54:03 +000018214 ac_need_defaults=false;;
18215 --header | --heade | --head | --hea )
Martin v. Löwisf3322282003-07-13 09:46:13 +000018216 shift
18217 CONFIG_HEADERS="$CONFIG_HEADERS $1"
Martin v. Löwis11437992002-04-12 09:54:03 +000018218 ac_need_defaults=false;;
18219
18220 # This is an error.
18221 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
18222Try \`$0 --help' for more information." >&5
18223echo "$as_me: error: unrecognized option: $1
18224Try \`$0 --help' for more information." >&2;}
18225 { (exit 1); exit 1; }; } ;;
18226
18227 *) ac_config_targets="$ac_config_targets $1" ;;
18228
18229 esac
18230 shift
18231done
18232
18233_ACEOF
18234
18235
18236
18237
18238
18239cat >>$CONFIG_STATUS <<\_ACEOF
18240for ac_config_target in $ac_config_targets
18241do
18242 case "$ac_config_target" in
18243 # Handling of arguments.
18244 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
18245 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
18246 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18247 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
18248echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18249 { (exit 1); exit 1; }; };;
18250 esac
18251done
18252
18253# If the user did not use the arguments to specify the items to instantiate,
18254# then the envvar interface is used. Set only those that are not.
18255# We use the long form for the default assignment because of an extremely
18256# bizarre bug on SunOS 4.1.3.
18257if $ac_need_defaults; then
18258 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18259 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18260fi
18261
18262# Create a temporary directory, and hook for its removal unless debugging.
18263$debug ||
18264{
18265 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18266 trap '{ (exit 1); exit 1; }' 1 2 13 15
18267}
18268
18269# Create a (secure) tmp directory for tmp files.
Martin v. Löwisf3322282003-07-13 09:46:13 +000018270: ${TMPDIR=/tmp}
Martin v. Löwis11437992002-04-12 09:54:03 +000018271{
Martin v. Löwisf3322282003-07-13 09:46:13 +000018272 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018273 test -n "$tmp" && test -d "$tmp"
18274} ||
18275{
Martin v. Löwisf3322282003-07-13 09:46:13 +000018276 tmp=$TMPDIR/cs$$-$RANDOM
Martin v. Löwis11437992002-04-12 09:54:03 +000018277 (umask 077 && mkdir $tmp)
18278} ||
18279{
Martin v. Löwisf3322282003-07-13 09:46:13 +000018280 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000018281 { (exit 1); exit 1; }
18282}
18283
18284_ACEOF
18285
18286cat >>$CONFIG_STATUS <<_ACEOF
18287
18288#
18289# CONFIG_FILES section.
18290#
18291
18292# No need to generate the scripts if there are no CONFIG_FILES.
18293# This happens for instance when ./config.status config.h
18294if test -n "\$CONFIG_FILES"; then
18295 # Protect against being on the right side of a sed subst in config.status.
18296 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18297 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18298s,@SHELL@,$SHELL,;t t
18299s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18300s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18301s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18302s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18303s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18304s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18305s,@exec_prefix@,$exec_prefix,;t t
18306s,@prefix@,$prefix,;t t
18307s,@program_transform_name@,$program_transform_name,;t t
18308s,@bindir@,$bindir,;t t
18309s,@sbindir@,$sbindir,;t t
18310s,@libexecdir@,$libexecdir,;t t
18311s,@datadir@,$datadir,;t t
18312s,@sysconfdir@,$sysconfdir,;t t
18313s,@sharedstatedir@,$sharedstatedir,;t t
18314s,@localstatedir@,$localstatedir,;t t
18315s,@libdir@,$libdir,;t t
18316s,@includedir@,$includedir,;t t
18317s,@oldincludedir@,$oldincludedir,;t t
18318s,@infodir@,$infodir,;t t
18319s,@mandir@,$mandir,;t t
18320s,@build_alias@,$build_alias,;t t
18321s,@host_alias@,$host_alias,;t t
18322s,@target_alias@,$target_alias,;t t
18323s,@DEFS@,$DEFS,;t t
18324s,@ECHO_C@,$ECHO_C,;t t
18325s,@ECHO_N@,$ECHO_N,;t t
18326s,@ECHO_T@,$ECHO_T,;t t
18327s,@LIBS@,$LIBS,;t t
18328s,@VERSION@,$VERSION,;t t
18329s,@SOVERSION@,$SOVERSION,;t t
18330s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
18331s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
18332s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
18333s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
18334s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
18335s,@MACHDEP@,$MACHDEP,;t t
18336s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000018337s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000018338s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018339s,@CXX@,$CXX,;t t
18340s,@MAINOBJ@,$MAINOBJ,;t t
18341s,@EXEEXT@,$EXEEXT,;t t
18342s,@CC@,$CC,;t t
18343s,@CFLAGS@,$CFLAGS,;t t
18344s,@LDFLAGS@,$LDFLAGS,;t t
18345s,@CPPFLAGS@,$CPPFLAGS,;t t
18346s,@ac_ct_CC@,$ac_ct_CC,;t t
18347s,@OBJEXT@,$OBJEXT,;t t
18348s,@CPP@,$CPP,;t t
18349s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
18350s,@LIBRARY@,$LIBRARY,;t t
18351s,@LDLIBRARY@,$LDLIBRARY,;t t
18352s,@DLLLIBRARY@,$DLLLIBRARY,;t t
18353s,@BLDLIBRARY@,$BLDLIBRARY,;t t
18354s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
18355s,@INSTSONAME@,$INSTSONAME,;t t
18356s,@RUNSHARED@,$RUNSHARED,;t t
18357s,@LINKCC@,$LINKCC,;t t
18358s,@RANLIB@,$RANLIB,;t t
18359s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18360s,@AR@,$AR,;t t
18361s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18362s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18363s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18364s,@LN@,$LN,;t t
18365s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000018366s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018367s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
18368s,@SO@,$SO,;t t
18369s,@LDSHARED@,$LDSHARED,;t t
18370s,@BLDSHARED@,$BLDSHARED,;t t
18371s,@CCSHARED@,$CCSHARED,;t t
18372s,@LINKFORSHARED@,$LINKFORSHARED,;t t
18373s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018374s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018375s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
18376s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
18377s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
18378s,@LDLAST@,$LDLAST,;t t
18379s,@THREADOBJ@,$THREADOBJ,;t t
18380s,@DLINCLDIR@,$DLINCLDIR,;t t
18381s,@DYNLOADFILE@,$DYNLOADFILE,;t t
18382s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018383s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018384s,@LIBOBJS@,$LIBOBJS,;t t
18385s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
18386s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
18387s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
18388s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
18389s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
18390s,@LIBM@,$LIBM,;t t
18391s,@LIBC@,$LIBC,;t t
18392s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
18393s,@THREADHEADERS@,$THREADHEADERS,;t t
18394s,@SRCDIRS@,$SRCDIRS,;t t
18395CEOF
18396
18397_ACEOF
18398
18399 cat >>$CONFIG_STATUS <<\_ACEOF
18400 # Split the substitutions into bite-sized pieces for seds with
18401 # small command number limits, like on Digital OSF/1 and HP-UX.
18402 ac_max_sed_lines=48
18403 ac_sed_frag=1 # Number of current file.
18404 ac_beg=1 # First line for current file.
18405 ac_end=$ac_max_sed_lines # Line after last line for current file.
18406 ac_more_lines=:
18407 ac_sed_cmds=
18408 while $ac_more_lines; do
18409 if test $ac_beg -gt 1; then
18410 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18411 else
18412 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18413 fi
18414 if test ! -s $tmp/subs.frag; then
18415 ac_more_lines=false
18416 else
18417 # The purpose of the label and of the branching condition is to
18418 # speed up the sed processing (if there are no `@' at all, there
18419 # is no need to browse any of the substitutions).
18420 # These are the two extra sed commands mentioned above.
18421 (echo ':t
18422 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18423 if test -z "$ac_sed_cmds"; then
18424 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18425 else
18426 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18427 fi
18428 ac_sed_frag=`expr $ac_sed_frag + 1`
18429 ac_beg=$ac_end
18430 ac_end=`expr $ac_end + $ac_max_sed_lines`
18431 fi
18432 done
18433 if test -z "$ac_sed_cmds"; then
18434 ac_sed_cmds=cat
18435 fi
18436fi # test -n "$CONFIG_FILES"
18437
18438_ACEOF
18439cat >>$CONFIG_STATUS <<\_ACEOF
18440for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18441 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18442 case $ac_file in
18443 - | *:- | *:-:* ) # input from stdin
18444 cat >$tmp/stdin
18445 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18446 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18447 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18448 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18449 * ) ac_file_in=$ac_file.in ;;
18450 esac
18451
18452 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18453 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18454$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18455 X"$ac_file" : 'X\(//\)[^/]' \| \
18456 X"$ac_file" : 'X\(//\)$' \| \
18457 X"$ac_file" : 'X\(/\)' \| \
18458 . : '\(.\)' 2>/dev/null ||
18459echo X"$ac_file" |
18460 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18461 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18462 /^X\(\/\/\)$/{ s//\1/; q; }
18463 /^X\(\/\).*/{ s//\1/; q; }
18464 s/.*/./; q'`
Martin v. Löwisf3322282003-07-13 09:46:13 +000018465 { case "$ac_dir" in
18466 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18467 *) as_incr_dir=.;;
18468esac
18469as_dummy="$ac_dir"
18470for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18471 case $as_mkdir_dir in
18472 # Skip DOS drivespec
18473 ?:) as_incr_dir=$as_mkdir_dir ;;
18474 *)
18475 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18476 test -d "$as_incr_dir" ||
18477 mkdir "$as_incr_dir" ||
18478 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18479echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18480 { (exit 1); exit 1; }; }
18481 ;;
18482 esac
18483done; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018484
18485 ac_builddir=.
18486
18487if test "$ac_dir" != .; then
18488 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18489 # A "../" for each directory in $ac_dir_suffix.
18490 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18491else
18492 ac_dir_suffix= ac_top_builddir=
18493fi
18494
18495case $srcdir in
18496 .) # No --srcdir option. We are building in place.
18497 ac_srcdir=.
18498 if test -z "$ac_top_builddir"; then
18499 ac_top_srcdir=.
18500 else
18501 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18502 fi ;;
18503 [\\/]* | ?:[\\/]* ) # Absolute path.
18504 ac_srcdir=$srcdir$ac_dir_suffix;
18505 ac_top_srcdir=$srcdir ;;
18506 *) # Relative path.
18507 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18508 ac_top_srcdir=$ac_top_builddir$srcdir ;;
18509esac
18510# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18511# absolute.
18512ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Jason Tishlerfac083d2003-07-22 15:20:49 +000018513ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000018514ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18515ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18516
18517
18518 case $INSTALL in
18519 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18520 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
18521 esac
18522
18523 if test x"$ac_file" != x-; then
18524 { echo "$as_me:$LINENO: creating $ac_file" >&5
18525echo "$as_me: creating $ac_file" >&6;}
18526 rm -f "$ac_file"
18527 fi
18528 # Let's still pretend it is `configure' which instantiates (i.e., don't
18529 # use $as_me), people would be surprised to read:
18530 # /* config.h. Generated by config.status. */
18531 if test x"$ac_file" = x-; then
18532 configure_input=
18533 else
18534 configure_input="$ac_file. "
18535 fi
18536 configure_input=$configure_input"Generated from `echo $ac_file_in |
18537 sed 's,.*/,,'` by configure."
18538
18539 # First look for the input files in the build tree, otherwise in the
18540 # src tree.
18541 ac_file_inputs=`IFS=:
18542 for f in $ac_file_in; do
18543 case $f in
18544 -) echo $tmp/stdin ;;
18545 [\\/$]*)
18546 # Absolute (can't be DOS-style, as IFS=:)
18547 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18548echo "$as_me: error: cannot find input file: $f" >&2;}
18549 { (exit 1); exit 1; }; }
18550 echo $f;;
18551 *) # Relative
18552 if test -f "$f"; then
18553 # Build tree
18554 echo $f
18555 elif test -f "$srcdir/$f"; then
18556 # Source tree
18557 echo $srcdir/$f
18558 else
18559 # /dev/null tree
18560 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18561echo "$as_me: error: cannot find input file: $f" >&2;}
18562 { (exit 1); exit 1; }; }
18563 fi;;
18564 esac
18565 done` || { (exit 1); exit 1; }
18566_ACEOF
18567cat >>$CONFIG_STATUS <<_ACEOF
18568 sed "$ac_vpsub
18569$extrasub
18570_ACEOF
18571cat >>$CONFIG_STATUS <<\_ACEOF
18572:t
18573/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18574s,@configure_input@,$configure_input,;t t
18575s,@srcdir@,$ac_srcdir,;t t
18576s,@abs_srcdir@,$ac_abs_srcdir,;t t
18577s,@top_srcdir@,$ac_top_srcdir,;t t
18578s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18579s,@builddir@,$ac_builddir,;t t
18580s,@abs_builddir@,$ac_abs_builddir,;t t
18581s,@top_builddir@,$ac_top_builddir,;t t
18582s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
18583s,@INSTALL@,$ac_INSTALL,;t t
18584" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18585 rm -f $tmp/stdin
18586 if test x"$ac_file" != x-; then
18587 mv $tmp/out $ac_file
18588 else
18589 cat $tmp/out
18590 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018591 fi
18592
Martin v. Löwis11437992002-04-12 09:54:03 +000018593done
18594_ACEOF
18595cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018596
Martin v. Löwis11437992002-04-12 09:54:03 +000018597#
18598# CONFIG_HEADER section.
18599#
Guido van Rossum627b2d71993-12-24 10:39:16 +000018600
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018601# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18602# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000018603#
18604# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000018605ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18606ac_dB='[ ].*$,\1#\2'
18607ac_dC=' '
18608ac_dD=',;t'
18609# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18610ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18611ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018612ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000018613ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018614
Martin v. Löwis11437992002-04-12 09:54:03 +000018615for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000018616 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000018617 case $ac_file in
18618 - | *:- | *:-:* ) # input from stdin
18619 cat >$tmp/stdin
18620 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18621 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18622 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18623 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18624 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018625 esac
18626
Martin v. Löwis11437992002-04-12 09:54:03 +000018627 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
18628echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000018629
Martin v. Löwis11437992002-04-12 09:54:03 +000018630 # First look for the input files in the build tree, otherwise in the
18631 # src tree.
18632 ac_file_inputs=`IFS=:
18633 for f in $ac_file_in; do
18634 case $f in
18635 -) echo $tmp/stdin ;;
18636 [\\/$]*)
18637 # Absolute (can't be DOS-style, as IFS=:)
18638 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18639echo "$as_me: error: cannot find input file: $f" >&2;}
18640 { (exit 1); exit 1; }; }
18641 echo $f;;
18642 *) # Relative
18643 if test -f "$f"; then
18644 # Build tree
18645 echo $f
18646 elif test -f "$srcdir/$f"; then
18647 # Source tree
18648 echo $srcdir/$f
18649 else
18650 # /dev/null tree
18651 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18652echo "$as_me: error: cannot find input file: $f" >&2;}
18653 { (exit 1); exit 1; }; }
18654 fi;;
18655 esac
18656 done` || { (exit 1); exit 1; }
18657 # Remove the trailing spaces.
18658 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018659
Martin v. Löwis11437992002-04-12 09:54:03 +000018660_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018661
Martin v. Löwis11437992002-04-12 09:54:03 +000018662# Transform confdefs.h into two sed scripts, `conftest.defines' and
18663# `conftest.undefs', that substitutes the proper values into
18664# config.h.in to produce config.h. The first handles `#define'
18665# templates, and the second `#undef' templates.
18666# And first: Protect against being on the right side of a sed subst in
18667# config.status. Protect against being in an unquoted here document
18668# in config.status.
18669rm -f conftest.defines conftest.undefs
18670# Using a here document instead of a string reduces the quoting nightmare.
18671# Putting comments in sed scripts is not portable.
18672#
18673# `end' is used to avoid that the second main sed command (meant for
18674# 0-ary CPP macros) applies to n-ary macro definitions.
18675# See the Autoconf documentation for `clear'.
18676cat >confdef2sed.sed <<\_ACEOF
18677s/[\\&,]/\\&/g
18678s,[\\$`],\\&,g
18679t clear
18680: clear
18681s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
18682t end
18683s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
18684: end
18685_ACEOF
18686# If some macros were called several times there might be several times
18687# the same #defines, which is useless. Nevertheless, we may not want to
18688# sort them, since we want the *last* AC-DEFINE to be honored.
18689uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
18690sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
18691rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018692
18693# This sed command replaces #undef with comments. This is necessary, for
18694# example, in the case of _POSIX_SOURCE, which is predefined and required
18695# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000018696cat >>conftest.undefs <<\_ACEOF
18697s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
18698_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018699
Martin v. Löwis11437992002-04-12 09:54:03 +000018700# Break up conftest.defines because some shells have a limit on the size
18701# of here documents, and old seds have small limits too (100 cmds).
18702echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Martin v. Löwisf3322282003-07-13 09:46:13 +000018703echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018704echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
18705echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018706rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000018707while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000018708do
Martin v. Löwis11437992002-04-12 09:54:03 +000018709 # Write a limited-size here document to $tmp/defines.sed.
18710 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
18711 # Speed up: don't consider the non `#define' lines.
18712 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
18713 # Work around the forget-to-reset-the-flag bug.
18714 echo 't clr' >>$CONFIG_STATUS
18715 echo ': clr' >>$CONFIG_STATUS
18716 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018717 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018718 sed -f $tmp/defines.sed $tmp/in >$tmp/out
18719 rm -f $tmp/in
18720 mv $tmp/out $tmp/in
18721' >>$CONFIG_STATUS
18722 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
18723 rm -f conftest.defines
18724 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000018725done
Martin v. Löwis11437992002-04-12 09:54:03 +000018726rm -f conftest.defines
Martin v. Löwisf3322282003-07-13 09:46:13 +000018727echo ' fi # egrep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018728echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018729
Martin v. Löwis11437992002-04-12 09:54:03 +000018730# Break up conftest.undefs because some shells have a limit on the size
18731# of here documents, and old seds have small limits too (100 cmds).
18732echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
18733rm -f conftest.tail
18734while grep . conftest.undefs >/dev/null
18735do
18736 # Write a limited-size here document to $tmp/undefs.sed.
18737 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
18738 # Speed up: don't consider the non `#undef'
18739 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
18740 # Work around the forget-to-reset-the-flag bug.
18741 echo 't clr' >>$CONFIG_STATUS
18742 echo ': clr' >>$CONFIG_STATUS
18743 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
18744 echo 'CEOF
18745 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
18746 rm -f $tmp/in
18747 mv $tmp/out $tmp/in
18748' >>$CONFIG_STATUS
18749 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
18750 rm -f conftest.undefs
18751 mv conftest.tail conftest.undefs
18752done
18753rm -f conftest.undefs
18754
18755cat >>$CONFIG_STATUS <<\_ACEOF
18756 # Let's still pretend it is `configure' which instantiates (i.e., don't
18757 # use $as_me), people would be surprised to read:
18758 # /* config.h. Generated by config.status. */
18759 if test x"$ac_file" = x-; then
18760 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000018761 else
Martin v. Löwis11437992002-04-12 09:54:03 +000018762 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000018763 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018764 cat $tmp/in >>$tmp/config.h
18765 rm -f $tmp/in
18766 if test x"$ac_file" != x-; then
Martin v. Löwisf3322282003-07-13 09:46:13 +000018767 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018768 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
18769echo "$as_me: $ac_file is unchanged" >&6;}
18770 else
18771 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18772$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18773 X"$ac_file" : 'X\(//\)[^/]' \| \
18774 X"$ac_file" : 'X\(//\)$' \| \
18775 X"$ac_file" : 'X\(/\)' \| \
18776 . : '\(.\)' 2>/dev/null ||
18777echo X"$ac_file" |
18778 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18779 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18780 /^X\(\/\/\)$/{ s//\1/; q; }
18781 /^X\(\/\).*/{ s//\1/; q; }
18782 s/.*/./; q'`
Martin v. Löwisf3322282003-07-13 09:46:13 +000018783 { case "$ac_dir" in
18784 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18785 *) as_incr_dir=.;;
18786esac
18787as_dummy="$ac_dir"
18788for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18789 case $as_mkdir_dir in
18790 # Skip DOS drivespec
18791 ?:) as_incr_dir=$as_mkdir_dir ;;
18792 *)
18793 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18794 test -d "$as_incr_dir" ||
18795 mkdir "$as_incr_dir" ||
18796 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18797echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18798 { (exit 1); exit 1; }; }
18799 ;;
18800 esac
18801done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018802
Martin v. Löwis11437992002-04-12 09:54:03 +000018803 rm -f $ac_file
18804 mv $tmp/config.h $ac_file
18805 fi
18806 else
18807 cat $tmp/config.h
18808 rm -f $tmp/config.h
18809 fi
18810done
18811_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000018812
Martin v. Löwis11437992002-04-12 09:54:03 +000018813cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018814
Martin v. Löwis11437992002-04-12 09:54:03 +000018815{ (exit 0); exit 0; }
18816_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018817chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018818ac_clean_files=$ac_clean_files_save
18819
18820
18821# configure is writing to config.log, and then calls config.status.
18822# config.status does its own redirection, appending to config.log.
18823# Unfortunately, on DOS this fails, as config.log is still kept open
18824# by configure, so config.status won't be able to write to it; its
18825# output is simply discarded. So we exec the FD to /dev/null,
18826# effectively closing config.log, so it can be properly (re)opened and
18827# appended to by config.status. When coming back to configure, we
18828# need to make the FD available again.
18829if test "$no_create" != yes; then
18830 ac_cs_success=:
18831 exec 5>/dev/null
Martin v. Löwisf3322282003-07-13 09:46:13 +000018832 $SHELL $CONFIG_STATUS || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018833 exec 5>>config.log
18834 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18835 # would make configure fail if this is the last instruction.
18836 $ac_cs_success || { (exit 1); exit 1; }
18837fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018838
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018839
18840echo "creating Setup"
18841if test ! -f Modules/Setup
18842then
18843 cp $srcdir/Modules/Setup.dist Modules/Setup
18844fi
18845
18846echo "creating Setup.local"
18847if test ! -f Modules/Setup.local
18848then
18849 echo "# Edit this file for local setup changes" >Modules/Setup.local
18850fi
18851
18852echo "creating Makefile"
18853$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
18854 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000018855 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018856mv config.c Modules