blob: a132a9e206371a518179da10c60a36c1b3f7e924 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwisf3322282003-07-13 09:46:13 +00002# From configure.in Revision: 1.424 .
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`
Martin v. Löwisd6640d42003-07-06 09:29:52 +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 Ward57c9a6632000-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 Ward57c9a6632000-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 Warsawc0d24d8b2000-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 Warsawc0d24d8b2000-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 Warsawc0d24d8b2000-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 Warsawc0d24d8b2000-06-29 16:12:00 +000010435
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010436
Barry Warsawc0d24d8b2000-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
11788
11789fi
11790done
11791
11792fi
11793
11794
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011795# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011796
11797
11798echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11799echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011800# Check whether --enable-ipv6 or --disable-ipv6 was given.
11801if test "${enable_ipv6+set}" = set; then
11802 enableval="$enable_ipv6"
11803 case "$enableval" in
11804 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011805 echo "$as_me:$LINENO: result: no" >&5
11806echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011807 ipv6=no
11808 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011809 *) echo "$as_me:$LINENO: result: yes" >&5
11810echo "${ECHO_T}yes" >&6
11811 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011812#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011813_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011814
11815 ipv6=yes
11816 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011817 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011818else
Martin v. Löwis11437992002-04-12 09:54:03 +000011819
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011820 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011821 echo "$as_me:$LINENO: result: no" >&5
11822echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011823 ipv6=no
11824
11825else
Martin v. Löwis11437992002-04-12 09:54:03 +000011826 cat >conftest.$ac_ext <<_ACEOF
11827#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000011828#include "confdefs.h"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011829 /* AF_INET6 available check */
11830#include <sys/types.h>
11831#include <sys/socket.h>
11832main()
11833{
11834 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11835 exit(1);
11836 else
11837 exit(0);
11838}
11839
Martin v. Löwis11437992002-04-12 09:54:03 +000011840_ACEOF
11841rm -f conftest$ac_exeext
11842if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11843 (eval $ac_link) 2>&5
11844 ac_status=$?
11845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11846 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11848 (eval $ac_try) 2>&5
11849 ac_status=$?
11850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11851 (exit $ac_status); }; }; then
11852 echo "$as_me:$LINENO: result: yes" >&5
11853echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011854 ipv6=yes
11855else
Martin v. Löwis11437992002-04-12 09:54:03 +000011856 echo "$as_me: program exited with status $ac_status" >&5
11857echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000011858cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011859( exit $ac_status )
11860echo "$as_me:$LINENO: result: no" >&5
11861echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011862 ipv6=no
11863fi
Martin v. Löwisf3322282003-07-13 09:46:13 +000011864rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011865fi
11866
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011867if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011868 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11869echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11870 cat >conftest.$ac_ext <<_ACEOF
11871#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000011872#include "confdefs.h"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011873#include <sys/types.h>
11874#include <netinet/in.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +000011875#ifdef F77_DUMMY_MAIN
11876# ifdef __cplusplus
11877 extern "C"
11878# endif
11879 int F77_DUMMY_MAIN() { return 1; }
11880#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011881int
11882main ()
11883{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011884struct sockaddr_in6 x;
11885x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011886 ;
11887 return 0;
11888}
11889_ACEOF
11890rm -f conftest.$ac_objext
11891if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11892 (eval $ac_compile) 2>&5
11893 ac_status=$?
11894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11895 (exit $ac_status); } &&
11896 { ac_try='test -s conftest.$ac_objext'
11897 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11898 (eval $ac_try) 2>&5
11899 ac_status=$?
11900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11901 (exit $ac_status); }; }; then
11902 echo "$as_me:$LINENO: result: yes" >&5
11903echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011904 ipv6=yes
11905else
Martin v. Löwis11437992002-04-12 09:54:03 +000011906 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000011907cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011908echo "$as_me:$LINENO: result: no" >&5
11909echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011910 ipv6=no
11911fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011912rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011913fi
11914
11915if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011916 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011917#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011918_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011919
11920fi
11921
Martin v. Löwis11437992002-04-12 09:54:03 +000011922fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011923
11924ipv6type=unknown
11925ipv6lib=none
11926ipv6trylibc=no
11927
11928if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011929 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11930echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011931 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11932 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011933 case $i in
11934 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011935 cat >conftest.$ac_ext <<_ACEOF
11936#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000011937#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011938
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011939#include <netinet/in.h>
11940#ifdef IPV6_INRIA_VERSION
11941yes
11942#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011943_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011944if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Martin v. Löwisf3322282003-07-13 09:46:13 +000011945 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011946 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011947fi
11948rm -f conftest*
11949
11950 ;;
11951 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011952 cat >conftest.$ac_ext <<_ACEOF
11953#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000011954#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011955
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011956#include <netinet/in.h>
11957#ifdef __KAME__
11958yes
11959#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011960_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011961if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Martin v. Löwisf3322282003-07-13 09:46:13 +000011962 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011963 ipv6type=$i;
11964 ipv6lib=inet6
11965 ipv6libdir=/usr/local/v6/lib
11966 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011967fi
11968rm -f conftest*
11969
11970 ;;
11971 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011972 cat >conftest.$ac_ext <<_ACEOF
11973#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000011974#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011975
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011976#include <features.h>
11977#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11978yes
11979#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011980_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011981if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Martin v. Löwisf3322282003-07-13 09:46:13 +000011982 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011983 ipv6type=$i;
11984 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011985fi
11986rm -f conftest*
11987
11988 ;;
11989 linux-inet6)
11990 if test -d /usr/inet6; then
11991 ipv6type=$i
11992 ipv6lib=inet6
11993 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011994 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011995 fi
11996 ;;
11997 solaris)
11998 if test -f /etc/netconfig; then
11999 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
12000 ipv6type=$i
12001 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012002 fi
12003 fi
12004 ;;
12005 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000012006 cat >conftest.$ac_ext <<_ACEOF
12007#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000012008#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012009
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012010#include <sys/param.h>
12011#ifdef _TOSHIBA_INET6
12012yes
12013#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012014_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012015if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Martin v. Löwisf3322282003-07-13 09:46:13 +000012016 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012017 ipv6type=$i;
12018 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012019 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012020fi
12021rm -f conftest*
12022
12023 ;;
12024 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000012025 cat >conftest.$ac_ext <<_ACEOF
12026#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000012027#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012028
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012029#include </usr/local/v6/include/sys/v6config.h>
12030#ifdef __V6D__
12031yes
12032#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012033_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012034if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Martin v. Löwisf3322282003-07-13 09:46:13 +000012035 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012036 ipv6type=$i;
12037 ipv6lib=v6;
12038 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000012039 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012040fi
12041rm -f conftest*
12042
12043 ;;
12044 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000012045 cat >conftest.$ac_ext <<_ACEOF
12046#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000012047#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012048
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012049#include <sys/param.h>
12050#ifdef _ZETA_MINAMI_INET6
12051yes
12052#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012053_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012054if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Martin v. Löwisf3322282003-07-13 09:46:13 +000012055 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012056 ipv6type=$i;
12057 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012058 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012059fi
12060rm -f conftest*
12061
12062 ;;
12063 esac
12064 if test "$ipv6type" != "unknown"; then
12065 break
12066 fi
12067 done
Martin v. Löwis11437992002-04-12 09:54:03 +000012068 echo "$as_me:$LINENO: result: $ipv6type" >&5
12069echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012070fi
12071
12072if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
12073 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
12074 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
12075 echo "using lib$ipv6lib"
12076 else
12077 if test $ipv6trylibc = "yes"; then
12078 echo "using libc"
12079 else
12080 echo 'Fatal: no $ipv6lib library found. cannot continue.'
12081 echo "You need to fetch lib$ipv6lib.a from appropriate"
12082 echo 'ipv6 kit and compile beforehand.'
12083 exit 1
12084 fi
12085 fi
12086fi
12087
Jack Jansen7b8c7542002-04-14 20:12:41 +000012088# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000012089echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
12090echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000012091
12092# Check whether --with-universal-newlines or --without-universal-newlines was given.
12093if test "${with_universal_newlines+set}" = set; then
12094 withval="$with_universal_newlines"
12095
12096fi;
12097
12098if test -z "$with_universal_newlines"
12099then with_universal_newlines="yes"
12100fi
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000012101if test "$with_universal_newlines" = "no"
Martin v. Löwis03d00d52002-12-19 19:03:31 +000012102then
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000012103 echo --without-universal-newlines is unsupported, see README
12104 exit 1
Martin v. Löwis03d00d52002-12-19 19:03:31 +000012105else
Martin v. Löwise8aea582002-04-16 05:51:02 +000012106
12107cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000012108#define WITH_UNIVERSAL_NEWLINES 1
12109_ACEOF
12110
12111fi
12112echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
12113echo "${ECHO_T}$with_universal_newlines" >&6
12114
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000012115# Check for --with-doc-strings
12116echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
12117echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
12118
12119# Check whether --with-doc-strings or --without-doc-strings was given.
12120if test "${with_doc_strings+set}" = set; then
12121 withval="$with_doc_strings"
12122
12123fi;
12124
12125if test -z "$with_doc_strings"
12126then with_doc_strings="yes"
12127fi
12128if test "$with_doc_strings" != "no"
12129then
12130
12131cat >>confdefs.h <<\_ACEOF
12132#define WITH_DOC_STRINGS 1
12133_ACEOF
12134
12135fi
12136echo "$as_me:$LINENO: result: $with_doc_strings" >&5
12137echo "${ECHO_T}$with_doc_strings" >&6
12138
Neil Schemenauera35c6882001-02-27 04:45:05 +000012139# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000012140echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
12141echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
12142
Neil Schemenauera35c6882001-02-27 04:45:05 +000012143# Check whether --with-pymalloc or --without-pymalloc was given.
12144if test "${with_pymalloc+set}" = set; then
12145 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000012146
Martin v. Löwis11437992002-04-12 09:54:03 +000012147fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000012148
Neil Schemenauer16c22972002-03-22 15:34:49 +000012149if test -z "$with_pymalloc"
12150then with_pymalloc="yes"
12151fi
12152if test "$with_pymalloc" != "no"
12153then
Martin v. Löwis11437992002-04-12 09:54:03 +000012154
12155cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012156#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012157_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012158
12159fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012160echo "$as_me:$LINENO: result: $with_pymalloc" >&5
12161echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000012162
Barry Warsawef82cd72000-06-30 16:21:01 +000012163# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012164echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
12165echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
12166
Barry Warsawef82cd72000-06-30 16:21:01 +000012167# Check whether --with-wctype-functions or --without-wctype-functions was given.
12168if test "${with_wctype_functions+set}" = set; then
12169 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000012170
Barry Warsawef82cd72000-06-30 16:21:01 +000012171if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012172then
12173
12174cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000012175#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012176_ACEOF
12177
12178 echo "$as_me:$LINENO: result: yes" >&5
12179echo "${ECHO_T}yes" >&6
12180else echo "$as_me:$LINENO: result: no" >&5
12181echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000012182fi
12183else
Martin v. Löwis11437992002-04-12 09:54:03 +000012184 echo "$as_me:$LINENO: result: no" >&5
12185echo "${ECHO_T}no" >&6
12186fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000012187
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012188# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000012189
Guido van Rossum98935bf2001-09-05 19:13:16 +000012190DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000012191
Martin v. Löwis11437992002-04-12 09:54:03 +000012192echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
12193echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
12194
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012195# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012196if test "${with_sgi_dl+set}" = set; then
12197 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000012198
12199echo "$as_me:$LINENO: result: $withval" >&5
12200echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000012201echo --with-sgi-dl is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000012202exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012203
12204cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012205#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012206_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000012207
Guido van Rossume97ee181999-12-20 21:27:22 +000012208DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012209dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000012210if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000012211then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000012212else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
12213echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
12214 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012215fi
12216DLINCLDIR=${dldir}
12217LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000012218else
Martin v. Löwis11437992002-04-12 09:54:03 +000012219 echo "$as_me:$LINENO: result: no" >&5
12220echo "${ECHO_T}no" >&6
12221fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000012222
Martin v. Löwis11437992002-04-12 09:54:03 +000012223echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
12224echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000012225
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012226# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012227if test "${with_dl_dld+set}" = set; then
12228 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000012229
12230echo "$as_me:$LINENO: result: $withval" >&5
12231echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000012232echo --with-dl-dld is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000012233exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012234
12235cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012236#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012237_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000012238
Guido van Rossume97ee181999-12-20 21:27:22 +000012239DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012240dldir=`echo "$withval" | sed 's/,.*//'`
12241dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000012242if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000012243then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012244else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&5
12245echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&2;}
12246 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012247fi
12248DLINCLDIR=${dldir}
12249LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000012250else
Martin v. Löwis11437992002-04-12 09:54:03 +000012251 echo "$as_me:$LINENO: result: no" >&5
12252echo "${ECHO_T}no" >&6
12253fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000012254
Guido van Rossume97ee181999-12-20 21:27:22 +000012255# the dlopen() function means we might want to use dynload_shlib.o. some
12256# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012257
Thomas Wouters3a584202000-08-05 23:28:51 +000012258for ac_func in dlopen
12259do
Martin v. Löwis11437992002-04-12 09:54:03 +000012260as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12261echo "$as_me:$LINENO: checking for $ac_func" >&5
12262echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12263if eval "test \"\${$as_ac_var+set}\" = set"; then
12264 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012265else
Martin v. Löwis11437992002-04-12 09:54:03 +000012266 cat >conftest.$ac_ext <<_ACEOF
12267#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000012268#include "confdefs.h"
Guido van Rossume97ee181999-12-20 21:27:22 +000012269/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwisf3322282003-07-13 09:46:13 +000012270 which can conflict with char $ac_func (); below. */
12271#include <assert.h>
Guido van Rossume97ee181999-12-20 21:27:22 +000012272/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012273#ifdef __cplusplus
12274extern "C"
12275#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012276/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012277 builtin and then its argument prototype would still apply. */
12278char $ac_func ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000012279char (*f) ();
12280
12281#ifdef F77_DUMMY_MAIN
12282# ifdef __cplusplus
12283 extern "C"
12284# endif
12285 int F77_DUMMY_MAIN() { return 1; }
12286#endif
12287int
12288main ()
12289{
Guido van Rossume97ee181999-12-20 21:27:22 +000012290/* The GNU C library defines this for functions which it implements
12291 to always fail with ENOSYS. Some functions are actually named
12292 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012293#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000012294choke me
12295#else
Martin v. Löwisf3322282003-07-13 09:46:13 +000012296f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000012297#endif
12298
Martin v. Löwis11437992002-04-12 09:54:03 +000012299 ;
12300 return 0;
12301}
12302_ACEOF
12303rm -f conftest.$ac_objext conftest$ac_exeext
12304if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12305 (eval $ac_link) 2>&5
12306 ac_status=$?
12307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12308 (exit $ac_status); } &&
12309 { ac_try='test -s conftest$ac_exeext'
12310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12311 (eval $ac_try) 2>&5
12312 ac_status=$?
12313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12314 (exit $ac_status); }; }; then
12315 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012316else
Martin v. Löwis11437992002-04-12 09:54:03 +000012317 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000012318cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012319eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012320fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012321rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012322fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012323echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12324echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12325if test `eval echo '${'$as_ac_var'}'` = yes; then
12326 cat >>confdefs.h <<_ACEOF
12327#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12328_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012329
Guido van Rossume97ee181999-12-20 21:27:22 +000012330fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012331done
Guido van Rossume97ee181999-12-20 21:27:22 +000012332
Michael W. Hudson54241132001-12-07 15:38:26 +000012333
Guido van Rossume97ee181999-12-20 21:27:22 +000012334# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12335# loading of modules.
12336
Martin v. Löwis11437992002-04-12 09:54:03 +000012337echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
12338echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012339if test -z "$DYNLOADFILE"
12340then
12341 case $ac_sys_system/$ac_sys_release in
12342 AIX*) DYNLOADFILE="dynload_aix.o";;
12343 BeOS*) DYNLOADFILE="dynload_beos.o";;
12344 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000012345 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012346 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000012347 *)
12348 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
12349 # out any dynamic loading
12350 if test "$ac_cv_func_dlopen" = yes
12351 then DYNLOADFILE="dynload_shlib.o"
12352 else DYNLOADFILE="dynload_stub.o"
12353 fi
12354 ;;
12355 esac
12356fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012357echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
12358echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012359if test "$DYNLOADFILE" != "dynload_stub.o"
12360then
Martin v. Löwis11437992002-04-12 09:54:03 +000012361
12362cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012363#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012364_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012365
12366fi
12367
Neil Schemenauer4e425612001-06-19 15:44:15 +000012368# MACHDEP_OBJS can be set to platform-specific object files needed by Python
12369
Michael W. Hudson54241132001-12-07 15:38:26 +000012370
Martin v. Löwis11437992002-04-12 09:54:03 +000012371echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
12372echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012373if test -z "$MACHDEP_OBJS"
12374then
Jack Jansene578a632001-08-15 01:27:14 +000012375 MACHDEP_OBJS=$extra_machdep_objs
12376else
12377 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000012378fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012379echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
12380echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012381
Guido van Rossum627b2d71993-12-24 10:39:16 +000012382# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012383
12384
12385
12386
12387
12388
12389
12390
12391
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
Martin v. Löwis9c36c292002-12-21 18:34:06 +000012456
Martin v. Löwisd5843682002-11-21 20:41:28 +000012457for ac_func in alarm chown clock confstr ctermid execv \
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012458 fchdir fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012459 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
12460 getpriority getpwent getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000012461 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000012462 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000012463 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000012464 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000012465 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012466 sigaction siginterrupt sigrelse strftime strptime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000012467 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012468 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000012469do
Martin v. Löwis11437992002-04-12 09:54:03 +000012470as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12471echo "$as_me:$LINENO: checking for $ac_func" >&5
12472echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12473if eval "test \"\${$as_ac_var+set}\" = set"; then
12474 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012475else
Martin v. Löwis11437992002-04-12 09:54:03 +000012476 cat >conftest.$ac_ext <<_ACEOF
12477#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000012478#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012479/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwisf3322282003-07-13 09:46:13 +000012480 which can conflict with char $ac_func (); below. */
12481#include <assert.h>
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012482/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012483#ifdef __cplusplus
12484extern "C"
12485#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012486/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012487 builtin and then its argument prototype would still apply. */
12488char $ac_func ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000012489char (*f) ();
12490
12491#ifdef F77_DUMMY_MAIN
12492# ifdef __cplusplus
12493 extern "C"
12494# endif
12495 int F77_DUMMY_MAIN() { return 1; }
12496#endif
12497int
12498main ()
12499{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012500/* The GNU C library defines this for functions which it implements
12501 to always fail with ENOSYS. Some functions are actually named
12502 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012503#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012504choke me
12505#else
Martin v. Löwisf3322282003-07-13 09:46:13 +000012506f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012507#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012508
Martin v. Löwis11437992002-04-12 09:54:03 +000012509 ;
12510 return 0;
12511}
12512_ACEOF
12513rm -f conftest.$ac_objext conftest$ac_exeext
12514if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12515 (eval $ac_link) 2>&5
12516 ac_status=$?
12517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12518 (exit $ac_status); } &&
12519 { ac_try='test -s conftest$ac_exeext'
12520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12521 (eval $ac_try) 2>&5
12522 ac_status=$?
12523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12524 (exit $ac_status); }; }; then
12525 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012526else
Martin v. Löwis11437992002-04-12 09:54:03 +000012527 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000012528cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012529eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012530fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012531rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012532fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012533echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12534echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12535if test `eval echo '${'$as_ac_var'}'` = yes; then
12536 cat >>confdefs.h <<_ACEOF
12537#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12538_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012539
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012540fi
12541done
12542
Michael W. Hudson54241132001-12-07 15:38:26 +000012543
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012544# For some functions, having a definition is not sufficient, since
12545# we want to take their address.
12546echo "$as_me:$LINENO: checking for chroot" >&5
12547echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12548cat >conftest.$ac_ext <<_ACEOF
12549#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000012550#include "confdefs.h"
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012551#include <unistd.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +000012552#ifdef F77_DUMMY_MAIN
12553# ifdef __cplusplus
12554 extern "C"
12555# endif
12556 int F77_DUMMY_MAIN() { return 1; }
12557#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012558int
12559main ()
12560{
12561void *x=chroot
12562 ;
12563 return 0;
12564}
12565_ACEOF
12566rm -f conftest.$ac_objext
12567if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12568 (eval $ac_compile) 2>&5
12569 ac_status=$?
12570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12571 (exit $ac_status); } &&
12572 { ac_try='test -s conftest.$ac_objext'
12573 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12574 (eval $ac_try) 2>&5
12575 ac_status=$?
12576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12577 (exit $ac_status); }; }; then
12578
12579cat >>confdefs.h <<\_ACEOF
12580#define HAVE_CHROOT 1
12581_ACEOF
12582
12583 echo "$as_me:$LINENO: result: yes" >&5
12584echo "${ECHO_T}yes" >&6
12585else
12586 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000012587cat conftest.$ac_ext >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012588echo "$as_me:$LINENO: result: no" >&5
12589echo "${ECHO_T}no" >&6
12590
12591fi
12592rm -f conftest.$ac_objext conftest.$ac_ext
12593echo "$as_me:$LINENO: checking for link" >&5
12594echo $ECHO_N "checking for link... $ECHO_C" >&6
12595cat >conftest.$ac_ext <<_ACEOF
12596#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000012597#include "confdefs.h"
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012598#include <unistd.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +000012599#ifdef F77_DUMMY_MAIN
12600# ifdef __cplusplus
12601 extern "C"
12602# endif
12603 int F77_DUMMY_MAIN() { return 1; }
12604#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012605int
12606main ()
12607{
12608void *x=link
12609 ;
12610 return 0;
12611}
12612_ACEOF
12613rm -f conftest.$ac_objext
12614if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12615 (eval $ac_compile) 2>&5
12616 ac_status=$?
12617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12618 (exit $ac_status); } &&
12619 { ac_try='test -s conftest.$ac_objext'
12620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12621 (eval $ac_try) 2>&5
12622 ac_status=$?
12623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12624 (exit $ac_status); }; }; then
12625
12626cat >>confdefs.h <<\_ACEOF
12627#define HAVE_LINK 1
12628_ACEOF
12629
12630 echo "$as_me:$LINENO: result: yes" >&5
12631echo "${ECHO_T}yes" >&6
12632else
12633 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000012634cat conftest.$ac_ext >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012635echo "$as_me:$LINENO: result: no" >&5
12636echo "${ECHO_T}no" >&6
12637
12638fi
12639rm -f conftest.$ac_objext conftest.$ac_ext
12640echo "$as_me:$LINENO: checking for symlink" >&5
12641echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12642cat >conftest.$ac_ext <<_ACEOF
12643#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000012644#include "confdefs.h"
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012645#include <unistd.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +000012646#ifdef F77_DUMMY_MAIN
12647# ifdef __cplusplus
12648 extern "C"
12649# endif
12650 int F77_DUMMY_MAIN() { return 1; }
12651#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012652int
12653main ()
12654{
12655void *x=symlink
12656 ;
12657 return 0;
12658}
12659_ACEOF
12660rm -f conftest.$ac_objext
12661if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12662 (eval $ac_compile) 2>&5
12663 ac_status=$?
12664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12665 (exit $ac_status); } &&
12666 { ac_try='test -s conftest.$ac_objext'
12667 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12668 (eval $ac_try) 2>&5
12669 ac_status=$?
12670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12671 (exit $ac_status); }; }; then
12672
12673cat >>confdefs.h <<\_ACEOF
12674#define HAVE_SYMLINK 1
12675_ACEOF
12676
12677 echo "$as_me:$LINENO: result: yes" >&5
12678echo "${ECHO_T}yes" >&6
12679else
12680 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000012681cat conftest.$ac_ext >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012682echo "$as_me:$LINENO: result: no" >&5
12683echo "${ECHO_T}no" >&6
12684
12685fi
12686rm -f conftest.$ac_objext conftest.$ac_ext
12687
Martin v. Löwisd5843682002-11-21 20:41:28 +000012688# On some systems (eg. FreeBSD 5), we would find a definition of the
12689# functions ctermid_r, setgroups in the library, but no prototype
12690# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12691# address to avoid compiler warnings and potential miscompilations
12692# because of the missing prototypes.
12693
12694echo "$as_me:$LINENO: checking for ctermid_r" >&5
12695echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
12696cat >conftest.$ac_ext <<_ACEOF
12697#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000012698#include "confdefs.h"
Martin v. Löwisd5843682002-11-21 20:41:28 +000012699
12700#include "confdefs.h"
12701#include <stdio.h>
12702
Martin v. Löwisf3322282003-07-13 09:46:13 +000012703#ifdef F77_DUMMY_MAIN
12704# ifdef __cplusplus
12705 extern "C"
12706# endif
12707 int F77_DUMMY_MAIN() { return 1; }
12708#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012709int
12710main ()
12711{
12712void* p = ctermid_r
12713 ;
12714 return 0;
12715}
12716_ACEOF
12717rm -f conftest.$ac_objext
12718if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12719 (eval $ac_compile) 2>&5
12720 ac_status=$?
12721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12722 (exit $ac_status); } &&
12723 { ac_try='test -s conftest.$ac_objext'
12724 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12725 (eval $ac_try) 2>&5
12726 ac_status=$?
12727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12728 (exit $ac_status); }; }; then
12729
12730cat >>confdefs.h <<\_ACEOF
12731#define HAVE_CTERMID_R 1
12732_ACEOF
12733
12734 echo "$as_me:$LINENO: result: yes" >&5
12735echo "${ECHO_T}yes" >&6
12736else
12737 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000012738cat conftest.$ac_ext >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000012739echo "$as_me:$LINENO: result: no" >&5
12740echo "${ECHO_T}no" >&6
12741
12742fi
12743rm -f conftest.$ac_objext conftest.$ac_ext
12744
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012745echo "$as_me:$LINENO: checking for flock" >&5
12746echo $ECHO_N "checking for flock... $ECHO_C" >&6
12747cat >conftest.$ac_ext <<_ACEOF
12748#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000012749#include "confdefs.h"
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012750
12751#include "confdefs.h"
12752#include <sys/file.h>
12753
Martin v. Löwisf3322282003-07-13 09:46:13 +000012754#ifdef F77_DUMMY_MAIN
12755# ifdef __cplusplus
12756 extern "C"
12757# endif
12758 int F77_DUMMY_MAIN() { return 1; }
12759#endif
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012760int
12761main ()
12762{
12763void* p = flock
12764 ;
12765 return 0;
12766}
12767_ACEOF
12768rm -f conftest.$ac_objext
12769if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12770 (eval $ac_compile) 2>&5
12771 ac_status=$?
12772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12773 (exit $ac_status); } &&
12774 { ac_try='test -s conftest.$ac_objext'
12775 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12776 (eval $ac_try) 2>&5
12777 ac_status=$?
12778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12779 (exit $ac_status); }; }; then
12780
12781cat >>confdefs.h <<\_ACEOF
12782#define HAVE_FLOCK 1
12783_ACEOF
12784
12785 echo "$as_me:$LINENO: result: yes" >&5
12786echo "${ECHO_T}yes" >&6
12787else
12788 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000012789cat conftest.$ac_ext >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012790echo "$as_me:$LINENO: result: no" >&5
12791echo "${ECHO_T}no" >&6
12792
12793fi
12794rm -f conftest.$ac_objext conftest.$ac_ext
12795
12796echo "$as_me:$LINENO: checking for getpagesize" >&5
12797echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
12798cat >conftest.$ac_ext <<_ACEOF
12799#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000012800#include "confdefs.h"
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012801
12802#include "confdefs.h"
12803#include <unistd.h>
12804
Martin v. Löwisf3322282003-07-13 09:46:13 +000012805#ifdef F77_DUMMY_MAIN
12806# ifdef __cplusplus
12807 extern "C"
12808# endif
12809 int F77_DUMMY_MAIN() { return 1; }
12810#endif
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012811int
12812main ()
12813{
12814void* p = getpagesize
12815 ;
12816 return 0;
12817}
12818_ACEOF
12819rm -f conftest.$ac_objext
12820if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12821 (eval $ac_compile) 2>&5
12822 ac_status=$?
12823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12824 (exit $ac_status); } &&
12825 { ac_try='test -s conftest.$ac_objext'
12826 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12827 (eval $ac_try) 2>&5
12828 ac_status=$?
12829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12830 (exit $ac_status); }; }; then
12831
12832cat >>confdefs.h <<\_ACEOF
12833#define HAVE_GETPAGESIZE 1
12834_ACEOF
12835
12836 echo "$as_me:$LINENO: result: yes" >&5
12837echo "${ECHO_T}yes" >&6
12838else
12839 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000012840cat conftest.$ac_ext >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012841echo "$as_me:$LINENO: result: no" >&5
12842echo "${ECHO_T}no" >&6
12843
12844fi
12845rm -f conftest.$ac_objext conftest.$ac_ext
12846
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012847for ac_prog in true
12848do
12849 # Extract the first word of "$ac_prog", so it can be a program name with args.
12850set dummy $ac_prog; ac_word=$2
12851echo "$as_me:$LINENO: checking for $ac_word" >&5
12852echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12853if test "${ac_cv_prog_TRUE+set}" = set; then
12854 echo $ECHO_N "(cached) $ECHO_C" >&6
12855else
12856 if test -n "$TRUE"; then
12857 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12858else
12859as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12860for as_dir in $PATH
12861do
12862 IFS=$as_save_IFS
12863 test -z "$as_dir" && as_dir=.
12864 for ac_exec_ext in '' $ac_executable_extensions; do
12865 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12866 ac_cv_prog_TRUE="$ac_prog"
12867 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12868 break 2
12869 fi
12870done
12871done
12872
12873fi
12874fi
12875TRUE=$ac_cv_prog_TRUE
12876if test -n "$TRUE"; then
12877 echo "$as_me:$LINENO: result: $TRUE" >&5
12878echo "${ECHO_T}$TRUE" >&6
12879else
12880 echo "$as_me:$LINENO: result: no" >&5
12881echo "${ECHO_T}no" >&6
12882fi
12883
12884 test -n "$TRUE" && break
12885done
12886test -n "$TRUE" || TRUE="/bin/true"
12887
12888
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012889echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
12890echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
12891if test "${ac_cv_lib_c_inet_aton+set}" = set; then
12892 echo $ECHO_N "(cached) $ECHO_C" >&6
12893else
12894 ac_check_lib_save_LIBS=$LIBS
12895LIBS="-lc $LIBS"
12896cat >conftest.$ac_ext <<_ACEOF
12897#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000012898#include "confdefs.h"
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012899
12900/* Override any gcc2 internal prototype to avoid an error. */
12901#ifdef __cplusplus
12902extern "C"
12903#endif
12904/* We use char because int might match the return type of a gcc2
12905 builtin and then its argument prototype would still apply. */
12906char inet_aton ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000012907#ifdef F77_DUMMY_MAIN
12908# ifdef __cplusplus
12909 extern "C"
12910# endif
12911 int F77_DUMMY_MAIN() { return 1; }
12912#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012913int
12914main ()
12915{
12916inet_aton ();
12917 ;
12918 return 0;
12919}
12920_ACEOF
12921rm -f conftest.$ac_objext conftest$ac_exeext
12922if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12923 (eval $ac_link) 2>&5
12924 ac_status=$?
12925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12926 (exit $ac_status); } &&
12927 { ac_try='test -s conftest$ac_exeext'
12928 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12929 (eval $ac_try) 2>&5
12930 ac_status=$?
12931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12932 (exit $ac_status); }; }; then
12933 ac_cv_lib_c_inet_aton=yes
12934else
12935 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000012936cat conftest.$ac_ext >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012937ac_cv_lib_c_inet_aton=no
12938fi
12939rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12940LIBS=$ac_check_lib_save_LIBS
12941fi
12942echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
12943echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
12944if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012945 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012946else
12947
12948echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
12949echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
12950if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
12951 echo $ECHO_N "(cached) $ECHO_C" >&6
12952else
12953 ac_check_lib_save_LIBS=$LIBS
12954LIBS="-lresolv $LIBS"
12955cat >conftest.$ac_ext <<_ACEOF
12956#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000012957#include "confdefs.h"
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012958
12959/* Override any gcc2 internal prototype to avoid an error. */
12960#ifdef __cplusplus
12961extern "C"
12962#endif
12963/* We use char because int might match the return type of a gcc2
12964 builtin and then its argument prototype would still apply. */
12965char inet_aton ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000012966#ifdef F77_DUMMY_MAIN
12967# ifdef __cplusplus
12968 extern "C"
12969# endif
12970 int F77_DUMMY_MAIN() { return 1; }
12971#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012972int
12973main ()
12974{
12975inet_aton ();
12976 ;
12977 return 0;
12978}
12979_ACEOF
12980rm -f conftest.$ac_objext conftest$ac_exeext
12981if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12982 (eval $ac_link) 2>&5
12983 ac_status=$?
12984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12985 (exit $ac_status); } &&
12986 { ac_try='test -s conftest$ac_exeext'
12987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12988 (eval $ac_try) 2>&5
12989 ac_status=$?
12990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12991 (exit $ac_status); }; }; then
12992 ac_cv_lib_resolv_inet_aton=yes
12993else
12994 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000012995cat conftest.$ac_ext >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012996ac_cv_lib_resolv_inet_aton=no
12997fi
12998rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12999LIBS=$ac_check_lib_save_LIBS
13000fi
13001echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
13002echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
13003if test $ac_cv_lib_resolv_inet_aton = yes; then
13004 cat >>confdefs.h <<_ACEOF
13005#define HAVE_LIBRESOLV 1
13006_ACEOF
13007
13008 LIBS="-lresolv $LIBS"
13009
13010fi
13011
13012
13013fi
13014
13015
Martin v. Löwise9416172003-05-03 10:12:45 +000013016echo "$as_me:$LINENO: checking for hstrerror" >&5
13017echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
13018cat >conftest.$ac_ext <<_ACEOF
13019#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000013020#include "confdefs.h"
Martin v. Löwise9416172003-05-03 10:12:45 +000013021
13022#include "confdefs.h"
13023#include <netdb.h>
13024
Martin v. Löwisf3322282003-07-13 09:46:13 +000013025#ifdef F77_DUMMY_MAIN
13026# ifdef __cplusplus
13027 extern "C"
13028# endif
13029 int F77_DUMMY_MAIN() { return 1; }
13030#endif
Martin v. Löwise9416172003-05-03 10:12:45 +000013031int
13032main ()
13033{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013034void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013035 ;
13036 return 0;
13037}
13038_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013039rm -f conftest.$ac_objext conftest$ac_exeext
13040if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13041 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013042 ac_status=$?
13043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13044 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013045 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013046 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13047 (eval $ac_try) 2>&5
13048 ac_status=$?
13049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13050 (exit $ac_status); }; }; then
13051
13052cat >>confdefs.h <<\_ACEOF
13053#define HAVE_HSTRERROR 1
13054_ACEOF
13055
13056 echo "$as_me:$LINENO: result: yes" >&5
13057echo "${ECHO_T}yes" >&6
13058else
13059 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000013060cat conftest.$ac_ext >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013061echo "$as_me:$LINENO: result: no" >&5
13062echo "${ECHO_T}no" >&6
13063
13064fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013065rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013066
13067echo "$as_me:$LINENO: checking for inet_aton" >&5
13068echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
13069cat >conftest.$ac_ext <<_ACEOF
13070#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000013071#include "confdefs.h"
Martin v. Löwise9416172003-05-03 10:12:45 +000013072
13073#include "confdefs.h"
13074#include <sys/socket.h>
13075#include <netinet/in.h>
13076#include <arpa/inet.h>
13077
Martin v. Löwisf3322282003-07-13 09:46:13 +000013078#ifdef F77_DUMMY_MAIN
13079# ifdef __cplusplus
13080 extern "C"
13081# endif
13082 int F77_DUMMY_MAIN() { return 1; }
13083#endif
Martin v. Löwise9416172003-05-03 10:12:45 +000013084int
13085main ()
13086{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013087void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013088 ;
13089 return 0;
13090}
13091_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013092rm -f conftest.$ac_objext conftest$ac_exeext
13093if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13094 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013095 ac_status=$?
13096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13097 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013098 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013099 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13100 (eval $ac_try) 2>&5
13101 ac_status=$?
13102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13103 (exit $ac_status); }; }; then
13104
13105cat >>confdefs.h <<\_ACEOF
13106#define HAVE_INET_ATON 1
13107_ACEOF
13108
13109 echo "$as_me:$LINENO: result: yes" >&5
13110echo "${ECHO_T}yes" >&6
13111else
13112 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000013113cat conftest.$ac_ext >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013114echo "$as_me:$LINENO: result: no" >&5
13115echo "${ECHO_T}no" >&6
13116
13117fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013118rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013119
13120echo "$as_me:$LINENO: checking for inet_pton" >&5
13121echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
13122cat >conftest.$ac_ext <<_ACEOF
13123#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000013124#include "confdefs.h"
Martin v. Löwise9416172003-05-03 10:12:45 +000013125
13126#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013127#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000013128#include <sys/socket.h>
13129#include <netinet/in.h>
13130#include <arpa/inet.h>
13131
Martin v. Löwisf3322282003-07-13 09:46:13 +000013132#ifdef F77_DUMMY_MAIN
13133# ifdef __cplusplus
13134 extern "C"
13135# endif
13136 int F77_DUMMY_MAIN() { return 1; }
13137#endif
Martin v. Löwise9416172003-05-03 10:12:45 +000013138int
13139main ()
13140{
13141void* p = inet_pton
13142 ;
13143 return 0;
13144}
13145_ACEOF
13146rm -f conftest.$ac_objext
13147if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13148 (eval $ac_compile) 2>&5
13149 ac_status=$?
13150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13151 (exit $ac_status); } &&
13152 { ac_try='test -s conftest.$ac_objext'
13153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13154 (eval $ac_try) 2>&5
13155 ac_status=$?
13156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13157 (exit $ac_status); }; }; then
13158
13159cat >>confdefs.h <<\_ACEOF
13160#define HAVE_INET_PTON 1
13161_ACEOF
13162
13163 echo "$as_me:$LINENO: result: yes" >&5
13164echo "${ECHO_T}yes" >&6
13165else
13166 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000013167cat conftest.$ac_ext >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013168echo "$as_me:$LINENO: result: no" >&5
13169echo "${ECHO_T}no" >&6
13170
13171fi
13172rm -f conftest.$ac_objext conftest.$ac_ext
13173
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013174# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000013175echo "$as_me:$LINENO: checking for setgroups" >&5
13176echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
13177cat >conftest.$ac_ext <<_ACEOF
13178#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000013179#include "confdefs.h"
Martin v. Löwisd5843682002-11-21 20:41:28 +000013180
13181#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013182#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013183#ifdef HAVE_GRP_H
13184#include <grp.h>
13185#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000013186
Martin v. Löwisf3322282003-07-13 09:46:13 +000013187#ifdef F77_DUMMY_MAIN
13188# ifdef __cplusplus
13189 extern "C"
13190# endif
13191 int F77_DUMMY_MAIN() { return 1; }
13192#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000013193int
13194main ()
13195{
13196void* p = setgroups
13197 ;
13198 return 0;
13199}
13200_ACEOF
13201rm -f conftest.$ac_objext
13202if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13203 (eval $ac_compile) 2>&5
13204 ac_status=$?
13205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13206 (exit $ac_status); } &&
13207 { ac_try='test -s conftest.$ac_objext'
13208 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13209 (eval $ac_try) 2>&5
13210 ac_status=$?
13211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13212 (exit $ac_status); }; }; then
13213
13214cat >>confdefs.h <<\_ACEOF
13215#define HAVE_SETGROUPS 1
13216_ACEOF
13217
13218 echo "$as_me:$LINENO: result: yes" >&5
13219echo "${ECHO_T}yes" >&6
13220else
13221 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000013222cat conftest.$ac_ext >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000013223echo "$as_me:$LINENO: result: no" >&5
13224echo "${ECHO_T}no" >&6
13225
13226fi
13227rm -f conftest.$ac_objext conftest.$ac_ext
13228
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013229# check for openpty and forkpty
13230
Martin v. Löwis11437992002-04-12 09:54:03 +000013231
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013232for ac_func in openpty
13233do
Martin v. Löwis11437992002-04-12 09:54:03 +000013234as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13235echo "$as_me:$LINENO: checking for $ac_func" >&5
13236echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13237if eval "test \"\${$as_ac_var+set}\" = set"; then
13238 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013239else
Martin v. Löwis11437992002-04-12 09:54:03 +000013240 cat >conftest.$ac_ext <<_ACEOF
13241#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000013242#include "confdefs.h"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013243/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwisf3322282003-07-13 09:46:13 +000013244 which can conflict with char $ac_func (); below. */
13245#include <assert.h>
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013246/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013247#ifdef __cplusplus
13248extern "C"
13249#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013250/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013251 builtin and then its argument prototype would still apply. */
13252char $ac_func ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000013253char (*f) ();
13254
13255#ifdef F77_DUMMY_MAIN
13256# ifdef __cplusplus
13257 extern "C"
13258# endif
13259 int F77_DUMMY_MAIN() { return 1; }
13260#endif
13261int
13262main ()
13263{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013264/* The GNU C library defines this for functions which it implements
13265 to always fail with ENOSYS. Some functions are actually named
13266 something starting with __ and the normal name is an alias. */
13267#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13268choke me
13269#else
Martin v. Löwisf3322282003-07-13 09:46:13 +000013270f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013271#endif
13272
Martin v. Löwis11437992002-04-12 09:54:03 +000013273 ;
13274 return 0;
13275}
13276_ACEOF
13277rm -f conftest.$ac_objext conftest$ac_exeext
13278if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13279 (eval $ac_link) 2>&5
13280 ac_status=$?
13281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13282 (exit $ac_status); } &&
13283 { ac_try='test -s conftest$ac_exeext'
13284 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13285 (eval $ac_try) 2>&5
13286 ac_status=$?
13287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13288 (exit $ac_status); }; }; then
13289 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013290else
Martin v. Löwis11437992002-04-12 09:54:03 +000013291 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000013292cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013293eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013294fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013295rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013296fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013297echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13298echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13299if test `eval echo '${'$as_ac_var'}'` = yes; then
13300 cat >>confdefs.h <<_ACEOF
13301#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13302_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013303
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013304else
Martin v. Löwis11437992002-04-12 09:54:03 +000013305 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
13306echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
13307if test "${ac_cv_lib_util_openpty+set}" = set; then
13308 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013309else
Martin v. Löwis11437992002-04-12 09:54:03 +000013310 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013311LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013312cat >conftest.$ac_ext <<_ACEOF
13313#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000013314#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013315
Fred Drake8cef4cf2000-06-28 16:40:38 +000013316/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013317#ifdef __cplusplus
13318extern "C"
13319#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013320/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013321 builtin and then its argument prototype would still apply. */
13322char openpty ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000013323#ifdef F77_DUMMY_MAIN
13324# ifdef __cplusplus
13325 extern "C"
13326# endif
13327 int F77_DUMMY_MAIN() { return 1; }
13328#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013329int
13330main ()
13331{
13332openpty ();
13333 ;
13334 return 0;
13335}
13336_ACEOF
13337rm -f conftest.$ac_objext conftest$ac_exeext
13338if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13339 (eval $ac_link) 2>&5
13340 ac_status=$?
13341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13342 (exit $ac_status); } &&
13343 { ac_try='test -s conftest$ac_exeext'
13344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13345 (eval $ac_try) 2>&5
13346 ac_status=$?
13347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13348 (exit $ac_status); }; }; then
13349 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013350else
Martin v. Löwis11437992002-04-12 09:54:03 +000013351 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000013352cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013353ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013354fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013355rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13356LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013357fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013358echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
13359echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
13360if test $ac_cv_lib_util_openpty = yes; then
13361 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013362#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013363_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013364 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013365fi
13366
13367fi
13368done
13369
Martin v. Löwis11437992002-04-12 09:54:03 +000013370
Fred Drake8cef4cf2000-06-28 16:40:38 +000013371for ac_func in forkpty
13372do
Martin v. Löwis11437992002-04-12 09:54:03 +000013373as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13374echo "$as_me:$LINENO: checking for $ac_func" >&5
13375echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13376if eval "test \"\${$as_ac_var+set}\" = set"; then
13377 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013378else
Martin v. Löwis11437992002-04-12 09:54:03 +000013379 cat >conftest.$ac_ext <<_ACEOF
13380#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000013381#include "confdefs.h"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013382/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwisf3322282003-07-13 09:46:13 +000013383 which can conflict with char $ac_func (); below. */
13384#include <assert.h>
Fred Drake8cef4cf2000-06-28 16:40:38 +000013385/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013386#ifdef __cplusplus
13387extern "C"
13388#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013389/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013390 builtin and then its argument prototype would still apply. */
13391char $ac_func ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000013392char (*f) ();
13393
13394#ifdef F77_DUMMY_MAIN
13395# ifdef __cplusplus
13396 extern "C"
13397# endif
13398 int F77_DUMMY_MAIN() { return 1; }
13399#endif
13400int
13401main ()
13402{
Fred Drake8cef4cf2000-06-28 16:40:38 +000013403/* The GNU C library defines this for functions which it implements
13404 to always fail with ENOSYS. Some functions are actually named
13405 something starting with __ and the normal name is an alias. */
13406#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13407choke me
13408#else
Martin v. Löwisf3322282003-07-13 09:46:13 +000013409f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000013410#endif
13411
Martin v. Löwis11437992002-04-12 09:54:03 +000013412 ;
13413 return 0;
13414}
13415_ACEOF
13416rm -f conftest.$ac_objext conftest$ac_exeext
13417if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13418 (eval $ac_link) 2>&5
13419 ac_status=$?
13420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13421 (exit $ac_status); } &&
13422 { ac_try='test -s conftest$ac_exeext'
13423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13424 (eval $ac_try) 2>&5
13425 ac_status=$?
13426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13427 (exit $ac_status); }; }; then
13428 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013429else
Martin v. Löwis11437992002-04-12 09:54:03 +000013430 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000013431cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013432eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013433fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013434rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013435fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013436echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13437echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13438if test `eval echo '${'$as_ac_var'}'` = yes; then
13439 cat >>confdefs.h <<_ACEOF
13440#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13441_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013442
Fred Drake8cef4cf2000-06-28 16:40:38 +000013443else
Martin v. Löwis11437992002-04-12 09:54:03 +000013444 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
13445echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
13446if test "${ac_cv_lib_util_forkpty+set}" = set; then
13447 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013448else
Martin v. Löwis11437992002-04-12 09:54:03 +000013449 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013450LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013451cat >conftest.$ac_ext <<_ACEOF
13452#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000013453#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013454
Fred Drake8cef4cf2000-06-28 16:40:38 +000013455/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013456#ifdef __cplusplus
13457extern "C"
13458#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013459/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013460 builtin and then its argument prototype would still apply. */
13461char forkpty ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000013462#ifdef F77_DUMMY_MAIN
13463# ifdef __cplusplus
13464 extern "C"
13465# endif
13466 int F77_DUMMY_MAIN() { return 1; }
13467#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013468int
13469main ()
13470{
13471forkpty ();
13472 ;
13473 return 0;
13474}
13475_ACEOF
13476rm -f conftest.$ac_objext conftest$ac_exeext
13477if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13478 (eval $ac_link) 2>&5
13479 ac_status=$?
13480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13481 (exit $ac_status); } &&
13482 { ac_try='test -s conftest$ac_exeext'
13483 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13484 (eval $ac_try) 2>&5
13485 ac_status=$?
13486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13487 (exit $ac_status); }; }; then
13488 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013489else
Martin v. Löwis11437992002-04-12 09:54:03 +000013490 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000013491cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013492ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013493fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013494rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13495LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013496fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013497echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
13498echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
13499if test $ac_cv_lib_util_forkpty = yes; then
13500 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013501#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013502_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013503 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013504fi
13505
13506fi
13507done
13508
Jack Jansendd19cf82001-12-06 22:36:17 +000013509
Michael W. Hudson54241132001-12-07 15:38:26 +000013510# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013511
13512
13513
13514
13515
13516
Fred Drake8cef4cf2000-06-28 16:40:38 +000013517for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
13518do
Martin v. Löwis11437992002-04-12 09:54:03 +000013519as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13520echo "$as_me:$LINENO: checking for $ac_func" >&5
13521echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13522if eval "test \"\${$as_ac_var+set}\" = set"; then
13523 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013524else
Martin v. Löwis11437992002-04-12 09:54:03 +000013525 cat >conftest.$ac_ext <<_ACEOF
13526#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000013527#include "confdefs.h"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013528/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwisf3322282003-07-13 09:46:13 +000013529 which can conflict with char $ac_func (); below. */
13530#include <assert.h>
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013531/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013532#ifdef __cplusplus
13533extern "C"
13534#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013535/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013536 builtin and then its argument prototype would still apply. */
13537char $ac_func ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000013538char (*f) ();
13539
13540#ifdef F77_DUMMY_MAIN
13541# ifdef __cplusplus
13542 extern "C"
13543# endif
13544 int F77_DUMMY_MAIN() { return 1; }
13545#endif
13546int
13547main ()
13548{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013549/* The GNU C library defines this for functions which it implements
13550 to always fail with ENOSYS. Some functions are actually named
13551 something starting with __ and the normal name is an alias. */
13552#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13553choke me
13554#else
Martin v. Löwisf3322282003-07-13 09:46:13 +000013555f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013556#endif
13557
Martin v. Löwis11437992002-04-12 09:54:03 +000013558 ;
13559 return 0;
13560}
13561_ACEOF
13562rm -f conftest.$ac_objext conftest$ac_exeext
13563if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13564 (eval $ac_link) 2>&5
13565 ac_status=$?
13566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13567 (exit $ac_status); } &&
13568 { ac_try='test -s conftest$ac_exeext'
13569 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13570 (eval $ac_try) 2>&5
13571 ac_status=$?
13572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13573 (exit $ac_status); }; }; then
13574 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013575else
Martin v. Löwis11437992002-04-12 09:54:03 +000013576 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000013577cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013578eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013579fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013580rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013581fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013582echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13583echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13584if test `eval echo '${'$as_ac_var'}'` = yes; then
13585 cat >>confdefs.h <<_ACEOF
13586#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13587_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000013588
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013589fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000013590done
13591
Michael W. Hudson54241132001-12-07 15:38:26 +000013592
Martin v. Löwis11437992002-04-12 09:54:03 +000013593
13594
13595
13596
13597
Martin v. Löwis1142de32002-03-29 16:28:31 +000013598for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000013599do
Martin v. Löwis11437992002-04-12 09:54:03 +000013600as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13601echo "$as_me:$LINENO: checking for $ac_func" >&5
13602echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13603if eval "test \"\${$as_ac_var+set}\" = set"; then
13604 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013605else
Martin v. Löwis11437992002-04-12 09:54:03 +000013606 cat >conftest.$ac_ext <<_ACEOF
13607#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000013608#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013609/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwisf3322282003-07-13 09:46:13 +000013610 which can conflict with char $ac_func (); below. */
13611#include <assert.h>
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013612/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013613#ifdef __cplusplus
13614extern "C"
13615#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013616/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013617 builtin and then its argument prototype would still apply. */
13618char $ac_func ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000013619char (*f) ();
13620
13621#ifdef F77_DUMMY_MAIN
13622# ifdef __cplusplus
13623 extern "C"
13624# endif
13625 int F77_DUMMY_MAIN() { return 1; }
13626#endif
13627int
13628main ()
13629{
Guido van Rossum627b2d71993-12-24 10:39:16 +000013630/* The GNU C library defines this for functions which it implements
13631 to always fail with ENOSYS. Some functions are actually named
13632 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013633#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013634choke me
13635#else
Martin v. Löwisf3322282003-07-13 09:46:13 +000013636f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013637#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013638
Martin v. Löwis11437992002-04-12 09:54:03 +000013639 ;
13640 return 0;
13641}
13642_ACEOF
13643rm -f conftest.$ac_objext conftest$ac_exeext
13644if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13645 (eval $ac_link) 2>&5
13646 ac_status=$?
13647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13648 (exit $ac_status); } &&
13649 { ac_try='test -s conftest$ac_exeext'
13650 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13651 (eval $ac_try) 2>&5
13652 ac_status=$?
13653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13654 (exit $ac_status); }; }; then
13655 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013656else
Martin v. Löwis11437992002-04-12 09:54:03 +000013657 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000013658cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013659eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013660fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013661rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000013662fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013663echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13664echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13665if test `eval echo '${'$as_ac_var'}'` = yes; then
13666 cat >>confdefs.h <<_ACEOF
13667#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13668_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000013669
Martin v. Löwis1142de32002-03-29 16:28:31 +000013670else
Martin v. Löwis11437992002-04-12 09:54:03 +000013671 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013672fi
13673done
13674
13675
Martin v. Löwis11437992002-04-12 09:54:03 +000013676
Martin v. Löwis1142de32002-03-29 16:28:31 +000013677for ac_func in getpgrp
13678do
Martin v. Löwis11437992002-04-12 09:54:03 +000013679as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13680echo "$as_me:$LINENO: checking for $ac_func" >&5
13681echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13682if eval "test \"\${$as_ac_var+set}\" = set"; then
13683 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000013684else
Martin v. Löwis11437992002-04-12 09:54:03 +000013685 cat >conftest.$ac_ext <<_ACEOF
13686#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000013687#include "confdefs.h"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013688/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwisf3322282003-07-13 09:46:13 +000013689 which can conflict with char $ac_func (); below. */
13690#include <assert.h>
Martin v. Löwis1142de32002-03-29 16:28:31 +000013691/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013692#ifdef __cplusplus
13693extern "C"
13694#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013695/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013696 builtin and then its argument prototype would still apply. */
13697char $ac_func ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000013698char (*f) ();
13699
13700#ifdef F77_DUMMY_MAIN
13701# ifdef __cplusplus
13702 extern "C"
13703# endif
13704 int F77_DUMMY_MAIN() { return 1; }
13705#endif
13706int
13707main ()
13708{
Martin v. Löwis1142de32002-03-29 16:28:31 +000013709/* The GNU C library defines this for functions which it implements
13710 to always fail with ENOSYS. Some functions are actually named
13711 something starting with __ and the normal name is an alias. */
13712#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13713choke me
13714#else
Martin v. Löwisf3322282003-07-13 09:46:13 +000013715f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000013716#endif
13717
Martin v. Löwis11437992002-04-12 09:54:03 +000013718 ;
13719 return 0;
13720}
13721_ACEOF
13722rm -f conftest.$ac_objext conftest$ac_exeext
13723if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13724 (eval $ac_link) 2>&5
13725 ac_status=$?
13726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13727 (exit $ac_status); } &&
13728 { ac_try='test -s conftest$ac_exeext'
13729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13730 (eval $ac_try) 2>&5
13731 ac_status=$?
13732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13733 (exit $ac_status); }; }; then
13734 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013735else
Martin v. Löwis11437992002-04-12 09:54:03 +000013736 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000013737cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013738eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013739fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013740rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013741fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013742echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13743echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13744if test `eval echo '${'$as_ac_var'}'` = yes; then
13745 cat >>confdefs.h <<_ACEOF
13746#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13747_ACEOF
13748 cat >conftest.$ac_ext <<_ACEOF
13749#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000013750#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013751#include <unistd.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +000013752#ifdef F77_DUMMY_MAIN
13753# ifdef __cplusplus
13754 extern "C"
13755# endif
13756 int F77_DUMMY_MAIN() { return 1; }
13757#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013758int
13759main ()
13760{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013761getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013762 ;
13763 return 0;
13764}
13765_ACEOF
13766rm -f conftest.$ac_objext
13767if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13768 (eval $ac_compile) 2>&5
13769 ac_status=$?
13770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13771 (exit $ac_status); } &&
13772 { ac_try='test -s conftest.$ac_objext'
13773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13774 (eval $ac_try) 2>&5
13775 ac_status=$?
13776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13777 (exit $ac_status); }; }; then
13778
13779cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013780#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013781_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013782
Martin v. Löwis11437992002-04-12 09:54:03 +000013783
Guido van Rossumf78abae1997-01-21 22:02:36 +000013784else
Martin v. Löwis11437992002-04-12 09:54:03 +000013785 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000013786cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013787fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013788rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013789
Guido van Rossum627b2d71993-12-24 10:39:16 +000013790fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013791done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013792
Jack Jansen150753c2003-03-29 22:07:47 +000013793
13794for ac_func in setpgrp
13795do
13796as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13797echo "$as_me:$LINENO: checking for $ac_func" >&5
13798echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13799if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013800 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013801else
Martin v. Löwis11437992002-04-12 09:54:03 +000013802 cat >conftest.$ac_ext <<_ACEOF
13803#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000013804#include "confdefs.h"
Jack Jansen150753c2003-03-29 22:07:47 +000013805/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwisf3322282003-07-13 09:46:13 +000013806 which can conflict with char $ac_func (); below. */
13807#include <assert.h>
Jack Jansen150753c2003-03-29 22:07:47 +000013808/* Override any gcc2 internal prototype to avoid an error. */
13809#ifdef __cplusplus
13810extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000013811#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013812/* We use char because int might match the return type of a gcc2
13813 builtin and then its argument prototype would still apply. */
13814char $ac_func ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000013815char (*f) ();
13816
13817#ifdef F77_DUMMY_MAIN
13818# ifdef __cplusplus
13819 extern "C"
13820# endif
13821 int F77_DUMMY_MAIN() { return 1; }
13822#endif
13823int
13824main ()
13825{
Jack Jansen150753c2003-03-29 22:07:47 +000013826/* The GNU C library defines this for functions which it implements
13827 to always fail with ENOSYS. Some functions are actually named
13828 something starting with __ and the normal name is an alias. */
13829#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13830choke me
13831#else
Martin v. Löwisf3322282003-07-13 09:46:13 +000013832f = $ac_func;
Jack Jansen150753c2003-03-29 22:07:47 +000013833#endif
13834
Martin v. Löwis11437992002-04-12 09:54:03 +000013835 ;
13836 return 0;
13837}
13838_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013839rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000013840if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13841 (eval $ac_link) 2>&5
13842 ac_status=$?
13843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013844 (exit $ac_status); } &&
13845 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13847 (eval $ac_try) 2>&5
13848 ac_status=$?
13849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13850 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000013851 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013852else
Jack Jansen150753c2003-03-29 22:07:47 +000013853 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000013854cat conftest.$ac_ext >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013855eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013856fi
Jack Jansen150753c2003-03-29 22:07:47 +000013857rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013858fi
Jack Jansen150753c2003-03-29 22:07:47 +000013859echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13860echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13861if test `eval echo '${'$as_ac_var'}'` = yes; then
13862 cat >>confdefs.h <<_ACEOF
13863#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13864_ACEOF
13865 cat >conftest.$ac_ext <<_ACEOF
13866#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000013867#include "confdefs.h"
Jack Jansen150753c2003-03-29 22:07:47 +000013868#include <unistd.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +000013869#ifdef F77_DUMMY_MAIN
13870# ifdef __cplusplus
13871 extern "C"
13872# endif
13873 int F77_DUMMY_MAIN() { return 1; }
13874#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013875int
13876main ()
13877{
13878setpgrp(0,0);
13879 ;
13880 return 0;
13881}
13882_ACEOF
13883rm -f conftest.$ac_objext
13884if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13885 (eval $ac_compile) 2>&5
13886 ac_status=$?
13887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13888 (exit $ac_status); } &&
13889 { ac_try='test -s conftest.$ac_objext'
13890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13891 (eval $ac_try) 2>&5
13892 ac_status=$?
13893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13894 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013895
13896cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013897#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013898_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013899
Jack Jansen150753c2003-03-29 22:07:47 +000013900
13901else
13902 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000013903cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013904fi
Jack Jansen150753c2003-03-29 22:07:47 +000013905rm -f conftest.$ac_objext conftest.$ac_ext
13906
13907fi
13908done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013909
Martin v. Löwis11437992002-04-12 09:54:03 +000013910
Thomas Wouters3a584202000-08-05 23:28:51 +000013911for ac_func in gettimeofday
13912do
Martin v. Löwis11437992002-04-12 09:54:03 +000013913as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13914echo "$as_me:$LINENO: checking for $ac_func" >&5
13915echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13916if eval "test \"\${$as_ac_var+set}\" = set"; then
13917 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013918else
Martin v. Löwis11437992002-04-12 09:54:03 +000013919 cat >conftest.$ac_ext <<_ACEOF
13920#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000013921#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013922/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwisf3322282003-07-13 09:46:13 +000013923 which can conflict with char $ac_func (); below. */
13924#include <assert.h>
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013925/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013926#ifdef __cplusplus
13927extern "C"
13928#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013929/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013930 builtin and then its argument prototype would still apply. */
13931char $ac_func ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000013932char (*f) ();
13933
13934#ifdef F77_DUMMY_MAIN
13935# ifdef __cplusplus
13936 extern "C"
13937# endif
13938 int F77_DUMMY_MAIN() { return 1; }
13939#endif
13940int
13941main ()
13942{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013943/* The GNU C library defines this for functions which it implements
13944 to always fail with ENOSYS. Some functions are actually named
13945 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013946#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013947choke me
13948#else
Martin v. Löwisf3322282003-07-13 09:46:13 +000013949f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013950#endif
13951
Martin v. Löwis11437992002-04-12 09:54:03 +000013952 ;
13953 return 0;
13954}
13955_ACEOF
13956rm -f conftest.$ac_objext conftest$ac_exeext
13957if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13958 (eval $ac_link) 2>&5
13959 ac_status=$?
13960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13961 (exit $ac_status); } &&
13962 { ac_try='test -s conftest$ac_exeext'
13963 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13964 (eval $ac_try) 2>&5
13965 ac_status=$?
13966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13967 (exit $ac_status); }; }; then
13968 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013969else
Martin v. Löwis11437992002-04-12 09:54:03 +000013970 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000013971cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013972eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013973fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013974rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013975fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013976echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13977echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13978if test `eval echo '${'$as_ac_var'}'` = yes; then
13979 cat >>confdefs.h <<_ACEOF
13980#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13981_ACEOF
13982 cat >conftest.$ac_ext <<_ACEOF
13983#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000013984#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013985#include <sys/time.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +000013986#ifdef F77_DUMMY_MAIN
13987# ifdef __cplusplus
13988 extern "C"
13989# endif
13990 int F77_DUMMY_MAIN() { return 1; }
13991#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013992int
13993main ()
13994{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013995gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013996 ;
13997 return 0;
13998}
13999_ACEOF
14000rm -f conftest.$ac_objext
14001if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14002 (eval $ac_compile) 2>&5
14003 ac_status=$?
14004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14005 (exit $ac_status); } &&
14006 { ac_try='test -s conftest.$ac_objext'
14007 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14008 (eval $ac_try) 2>&5
14009 ac_status=$?
14010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14011 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014012 :
14013else
Martin v. Löwis11437992002-04-12 09:54:03 +000014014 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000014015cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014016
14017cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014018#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014019_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014020
Martin v. Löwis11437992002-04-12 09:54:03 +000014021
Guido van Rossum627b2d71993-12-24 10:39:16 +000014022fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014023rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014024
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014025fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014026done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014027
Michael W. Hudson54241132001-12-07 15:38:26 +000014028
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014029echo "$as_me:$LINENO: checking for major" >&5
14030echo $ECHO_N "checking for major... $ECHO_C" >&6
14031cat >conftest.$ac_ext <<_ACEOF
14032#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000014033#include "confdefs.h"
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014034
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014035#if defined(MAJOR_IN_MKDEV)
14036#include <sys/mkdev.h>
14037#elif defined(MAJOR_IN_SYSMACROS)
14038#include <sys/sysmacros.h>
14039#else
14040#include <sys/types.h>
14041#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014042
Martin v. Löwisf3322282003-07-13 09:46:13 +000014043#ifdef F77_DUMMY_MAIN
14044# ifdef __cplusplus
14045 extern "C"
14046# endif
14047 int F77_DUMMY_MAIN() { return 1; }
14048#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014049int
14050main ()
14051{
14052
14053 makedev(major(0),minor(0));
14054
14055 ;
14056 return 0;
14057}
14058_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000014059rm -f conftest.$ac_objext conftest$ac_exeext
14060if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14061 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014062 ac_status=$?
14063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14064 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000014065 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14067 (eval $ac_try) 2>&5
14068 ac_status=$?
14069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14070 (exit $ac_status); }; }; then
14071
14072
14073cat >>confdefs.h <<\_ACEOF
14074#define HAVE_DEVICE_MACROS 1
14075_ACEOF
14076
14077 echo "$as_me:$LINENO: result: yes" >&5
14078echo "${ECHO_T}yes" >&6
14079
14080else
14081 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000014082cat conftest.$ac_ext >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014083
14084 echo "$as_me:$LINENO: result: no" >&5
14085echo "${ECHO_T}no" >&6
14086
14087fi
Martin v. Löwise3271202002-11-07 07:42:30 +000014088rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014089
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014090# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000014091# for [no]getaddrinfo in netdb.h.
14092echo "$as_me:$LINENO: checking for getaddrinfo" >&5
14093echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
14094cat >conftest.$ac_ext <<_ACEOF
14095#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000014096#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014097
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014098#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014099#include <sys/socket.h>
14100#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014101#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014102
Martin v. Löwisf3322282003-07-13 09:46:13 +000014103#ifdef F77_DUMMY_MAIN
14104# ifdef __cplusplus
14105 extern "C"
14106# endif
14107 int F77_DUMMY_MAIN() { return 1; }
14108#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014109int
14110main ()
14111{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014112
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014113getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014114
Martin v. Löwis11437992002-04-12 09:54:03 +000014115 ;
14116 return 0;
14117}
14118_ACEOF
14119rm -f conftest.$ac_objext conftest$ac_exeext
14120if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14121 (eval $ac_link) 2>&5
14122 ac_status=$?
14123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14124 (exit $ac_status); } &&
14125 { ac_try='test -s conftest$ac_exeext'
14126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14127 (eval $ac_try) 2>&5
14128 ac_status=$?
14129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14130 (exit $ac_status); }; }; then
14131
14132echo "$as_me:$LINENO: result: yes" >&5
14133echo "${ECHO_T}yes" >&6
14134echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
14135echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014136if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014137 echo "$as_me:$LINENO: result: buggy" >&5
14138echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014139buggygetaddrinfo=yes
14140else
Martin v. Löwis11437992002-04-12 09:54:03 +000014141 cat >conftest.$ac_ext <<_ACEOF
14142#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000014143#include "confdefs.h"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014144
14145#include <sys/types.h>
14146#include <netdb.h>
14147#include <string.h>
14148#include <sys/socket.h>
14149#include <netinet/in.h>
14150
14151main()
14152{
14153 int passive, gaierr, inet4 = 0, inet6 = 0;
14154 struct addrinfo hints, *ai, *aitop;
14155 char straddr[INET6_ADDRSTRLEN], strport[16];
14156
14157 for (passive = 0; passive <= 1; passive++) {
14158 memset(&hints, 0, sizeof(hints));
14159 hints.ai_family = AF_UNSPEC;
14160 hints.ai_flags = passive ? AI_PASSIVE : 0;
14161 hints.ai_socktype = SOCK_STREAM;
14162 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
14163 (void)gai_strerror(gaierr);
14164 goto bad;
14165 }
14166 for (ai = aitop; ai; ai = ai->ai_next) {
14167 if (ai->ai_addr == NULL ||
14168 ai->ai_addrlen == 0 ||
14169 getnameinfo(ai->ai_addr, ai->ai_addrlen,
14170 straddr, sizeof(straddr), strport, sizeof(strport),
14171 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
14172 goto bad;
14173 }
14174 switch (ai->ai_family) {
14175 case AF_INET:
14176 if (strcmp(strport, "54321") != 0) {
14177 goto bad;
14178 }
14179 if (passive) {
14180 if (strcmp(straddr, "0.0.0.0") != 0) {
14181 goto bad;
14182 }
14183 } else {
14184 if (strcmp(straddr, "127.0.0.1") != 0) {
14185 goto bad;
14186 }
14187 }
14188 inet4++;
14189 break;
14190 case AF_INET6:
14191 if (strcmp(strport, "54321") != 0) {
14192 goto bad;
14193 }
14194 if (passive) {
14195 if (strcmp(straddr, "::") != 0) {
14196 goto bad;
14197 }
14198 } else {
14199 if (strcmp(straddr, "::1") != 0) {
14200 goto bad;
14201 }
14202 }
14203 inet6++;
14204 break;
14205 case AF_UNSPEC:
14206 goto bad;
14207 break;
14208 default:
14209 /* another family support? */
14210 break;
14211 }
14212 }
14213 }
14214
14215 if (!(inet4 == 0 || inet4 == 2))
14216 goto bad;
14217 if (!(inet6 == 0 || inet6 == 2))
14218 goto bad;
14219
14220 if (aitop)
14221 freeaddrinfo(aitop);
14222 exit(0);
14223
14224 bad:
14225 if (aitop)
14226 freeaddrinfo(aitop);
14227 exit(1);
14228}
14229
Martin v. Löwis11437992002-04-12 09:54:03 +000014230_ACEOF
14231rm -f conftest$ac_exeext
14232if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14233 (eval $ac_link) 2>&5
14234 ac_status=$?
14235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14236 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14238 (eval $ac_try) 2>&5
14239 ac_status=$?
14240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14241 (exit $ac_status); }; }; then
14242 echo "$as_me:$LINENO: result: good" >&5
14243echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014244buggygetaddrinfo=no
14245else
Martin v. Löwis11437992002-04-12 09:54:03 +000014246 echo "$as_me: program exited with status $ac_status" >&5
14247echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000014248cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014249( exit $ac_status )
14250echo "$as_me:$LINENO: result: buggy" >&5
14251echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014252buggygetaddrinfo=yes
14253fi
Martin v. Löwisf3322282003-07-13 09:46:13 +000014254rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014255fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014256else
Martin v. Löwis11437992002-04-12 09:54:03 +000014257 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000014258cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014259
14260echo "$as_me:$LINENO: result: no" >&5
14261echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014262buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014263
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014264fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014265rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014266
14267if test "$buggygetaddrinfo" = "yes"; then
14268 if test "$ipv6" = "yes"; then
14269 echo 'Fatal: You must get working getaddrinfo() function.'
14270 echo ' or you can specify "--disable-ipv6"'.
14271 exit 1
14272 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014273else
Martin v. Löwis11437992002-04-12 09:54:03 +000014274
14275cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014276#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014277_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014278
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014279fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014280
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014281for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014282do
Martin v. Löwis11437992002-04-12 09:54:03 +000014283as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14284echo "$as_me:$LINENO: checking for $ac_func" >&5
14285echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14286if eval "test \"\${$as_ac_var+set}\" = set"; then
14287 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014288else
Martin v. Löwis11437992002-04-12 09:54:03 +000014289 cat >conftest.$ac_ext <<_ACEOF
14290#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000014291#include "confdefs.h"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014292/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwisf3322282003-07-13 09:46:13 +000014293 which can conflict with char $ac_func (); below. */
14294#include <assert.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014295/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014296#ifdef __cplusplus
14297extern "C"
14298#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014299/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014300 builtin and then its argument prototype would still apply. */
14301char $ac_func ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000014302char (*f) ();
14303
14304#ifdef F77_DUMMY_MAIN
14305# ifdef __cplusplus
14306 extern "C"
14307# endif
14308 int F77_DUMMY_MAIN() { return 1; }
14309#endif
14310int
14311main ()
14312{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014313/* The GNU C library defines this for functions which it implements
14314 to always fail with ENOSYS. Some functions are actually named
14315 something starting with __ and the normal name is an alias. */
14316#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14317choke me
14318#else
Martin v. Löwisf3322282003-07-13 09:46:13 +000014319f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014320#endif
14321
Martin v. Löwis11437992002-04-12 09:54:03 +000014322 ;
14323 return 0;
14324}
14325_ACEOF
14326rm -f conftest.$ac_objext conftest$ac_exeext
14327if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14328 (eval $ac_link) 2>&5
14329 ac_status=$?
14330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14331 (exit $ac_status); } &&
14332 { ac_try='test -s conftest$ac_exeext'
14333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14334 (eval $ac_try) 2>&5
14335 ac_status=$?
14336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14337 (exit $ac_status); }; }; then
14338 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014339else
Martin v. Löwis11437992002-04-12 09:54:03 +000014340 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000014341cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014342eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014343fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014344rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014345fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014346echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14347echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14348if test `eval echo '${'$as_ac_var'}'` = yes; then
14349 cat >>confdefs.h <<_ACEOF
14350#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14351_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014352
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014353fi
14354done
14355
Michael W. Hudson54241132001-12-07 15:38:26 +000014356
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014357# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000014358echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
14359echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14360if test "${ac_cv_header_time+set}" = set; then
14361 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014362else
Martin v. Löwis11437992002-04-12 09:54:03 +000014363 cat >conftest.$ac_ext <<_ACEOF
14364#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000014365#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014366#include <sys/types.h>
14367#include <sys/time.h>
14368#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014369
Martin v. Löwisf3322282003-07-13 09:46:13 +000014370#ifdef F77_DUMMY_MAIN
14371# ifdef __cplusplus
14372 extern "C"
14373# endif
14374 int F77_DUMMY_MAIN() { return 1; }
14375#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014376int
14377main ()
14378{
14379if ((struct tm *) 0)
14380return 0;
14381 ;
14382 return 0;
14383}
14384_ACEOF
14385rm -f conftest.$ac_objext
14386if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14387 (eval $ac_compile) 2>&5
14388 ac_status=$?
14389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14390 (exit $ac_status); } &&
14391 { ac_try='test -s conftest.$ac_objext'
14392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14393 (eval $ac_try) 2>&5
14394 ac_status=$?
14395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14396 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014397 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014398else
Martin v. Löwis11437992002-04-12 09:54:03 +000014399 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000014400cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014401ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014402fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014403rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014404fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014405echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
14406echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014407if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014408
14409cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014410#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014411_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014412
14413fi
14414
Martin v. Löwis11437992002-04-12 09:54:03 +000014415echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
14416echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
14417if test "${ac_cv_struct_tm+set}" = set; then
14418 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014419else
Martin v. Löwis11437992002-04-12 09:54:03 +000014420 cat >conftest.$ac_ext <<_ACEOF
14421#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000014422#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014423#include <sys/types.h>
14424#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014425
Martin v. Löwisf3322282003-07-13 09:46:13 +000014426#ifdef F77_DUMMY_MAIN
14427# ifdef __cplusplus
14428 extern "C"
14429# endif
14430 int F77_DUMMY_MAIN() { return 1; }
14431#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014432int
14433main ()
14434{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014435struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000014436 ;
14437 return 0;
14438}
14439_ACEOF
14440rm -f conftest.$ac_objext
14441if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14442 (eval $ac_compile) 2>&5
14443 ac_status=$?
14444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14445 (exit $ac_status); } &&
14446 { ac_try='test -s conftest.$ac_objext'
14447 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14448 (eval $ac_try) 2>&5
14449 ac_status=$?
14450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14451 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014452 ac_cv_struct_tm=time.h
14453else
Martin v. Löwis11437992002-04-12 09:54:03 +000014454 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000014455cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014456ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014457fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014458rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014459fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014460echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
14461echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014462if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014463
14464cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014465#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014466_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014467
14468fi
14469
Martin v. Löwis11437992002-04-12 09:54:03 +000014470echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
14471echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
14472if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
14473 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014474else
Martin v. Löwis11437992002-04-12 09:54:03 +000014475 cat >conftest.$ac_ext <<_ACEOF
14476#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000014477#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014478#include <sys/types.h>
14479#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000014480
14481
Martin v. Löwisf3322282003-07-13 09:46:13 +000014482#ifdef F77_DUMMY_MAIN
14483# ifdef __cplusplus
14484 extern "C"
14485# endif
14486 int F77_DUMMY_MAIN() { return 1; }
14487#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014488int
14489main ()
14490{
14491static struct tm ac_aggr;
14492if (ac_aggr.tm_zone)
14493return 0;
14494 ;
14495 return 0;
14496}
14497_ACEOF
14498rm -f conftest.$ac_objext
14499if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14500 (eval $ac_compile) 2>&5
14501 ac_status=$?
14502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14503 (exit $ac_status); } &&
14504 { ac_try='test -s conftest.$ac_objext'
14505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14506 (eval $ac_try) 2>&5
14507 ac_status=$?
14508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14509 (exit $ac_status); }; }; then
14510 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014511else
Martin v. Löwis11437992002-04-12 09:54:03 +000014512 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000014513cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014514ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014515fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014516rm -f conftest.$ac_objext conftest.$ac_ext
14517fi
14518echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
14519echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
14520if test $ac_cv_member_struct_tm_tm_zone = yes; then
14521
14522cat >>confdefs.h <<_ACEOF
14523#define HAVE_STRUCT_TM_TM_ZONE 1
14524_ACEOF
14525
14526
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014527fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014528
Martin v. Löwis11437992002-04-12 09:54:03 +000014529if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14530
14531cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014532#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014533_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014534
14535else
Martin v. Löwis11437992002-04-12 09:54:03 +000014536 echo "$as_me:$LINENO: checking for tzname" >&5
14537echo $ECHO_N "checking for tzname... $ECHO_C" >&6
14538if test "${ac_cv_var_tzname+set}" = set; then
14539 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014540else
Martin v. Löwis11437992002-04-12 09:54:03 +000014541 cat >conftest.$ac_ext <<_ACEOF
14542#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000014543#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014544#include <time.h>
14545#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014546extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014547#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014548
Martin v. Löwisf3322282003-07-13 09:46:13 +000014549#ifdef F77_DUMMY_MAIN
14550# ifdef __cplusplus
14551 extern "C"
14552# endif
14553 int F77_DUMMY_MAIN() { return 1; }
14554#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014555int
14556main ()
14557{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014558atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000014559 ;
14560 return 0;
14561}
14562_ACEOF
14563rm -f conftest.$ac_objext conftest$ac_exeext
14564if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14565 (eval $ac_link) 2>&5
14566 ac_status=$?
14567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14568 (exit $ac_status); } &&
14569 { ac_try='test -s conftest$ac_exeext'
14570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14571 (eval $ac_try) 2>&5
14572 ac_status=$?
14573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14574 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014575 ac_cv_var_tzname=yes
14576else
Martin v. Löwis11437992002-04-12 09:54:03 +000014577 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000014578cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014579ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014580fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014581rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000014582fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014583echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
14584echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014585 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014586
14587cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014588#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014589_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014590
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014591 fi
14592fi
14593
Martin v. Löwis11437992002-04-12 09:54:03 +000014594echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
14595echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
14596if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
14597 echo $ECHO_N "(cached) $ECHO_C" >&6
14598else
14599 cat >conftest.$ac_ext <<_ACEOF
14600#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000014601#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014602$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +000014603#ifdef F77_DUMMY_MAIN
14604# ifdef __cplusplus
14605 extern "C"
14606# endif
14607 int F77_DUMMY_MAIN() { return 1; }
14608#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014609int
14610main ()
14611{
14612static struct stat ac_aggr;
14613if (ac_aggr.st_rdev)
14614return 0;
14615 ;
14616 return 0;
14617}
14618_ACEOF
14619rm -f conftest.$ac_objext
14620if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14621 (eval $ac_compile) 2>&5
14622 ac_status=$?
14623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14624 (exit $ac_status); } &&
14625 { ac_try='test -s conftest.$ac_objext'
14626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14627 (eval $ac_try) 2>&5
14628 ac_status=$?
14629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14630 (exit $ac_status); }; }; then
14631 ac_cv_member_struct_stat_st_rdev=yes
14632else
14633 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000014634cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014635ac_cv_member_struct_stat_st_rdev=no
14636fi
14637rm -f conftest.$ac_objext conftest.$ac_ext
14638fi
14639echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
14640echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
14641if test $ac_cv_member_struct_stat_st_rdev = yes; then
14642
14643cat >>confdefs.h <<_ACEOF
14644#define HAVE_STRUCT_STAT_ST_RDEV 1
14645_ACEOF
14646
14647
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014648fi
14649
Martin v. Löwis11437992002-04-12 09:54:03 +000014650echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
14651echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
14652if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
14653 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014654else
Martin v. Löwis11437992002-04-12 09:54:03 +000014655 cat >conftest.$ac_ext <<_ACEOF
14656#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000014657#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014658$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +000014659#ifdef F77_DUMMY_MAIN
14660# ifdef __cplusplus
14661 extern "C"
14662# endif
14663 int F77_DUMMY_MAIN() { return 1; }
14664#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014665int
14666main ()
14667{
14668static struct stat ac_aggr;
14669if (ac_aggr.st_blksize)
14670return 0;
14671 ;
14672 return 0;
14673}
14674_ACEOF
14675rm -f conftest.$ac_objext
14676if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14677 (eval $ac_compile) 2>&5
14678 ac_status=$?
14679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14680 (exit $ac_status); } &&
14681 { ac_try='test -s conftest.$ac_objext'
14682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14683 (eval $ac_try) 2>&5
14684 ac_status=$?
14685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14686 (exit $ac_status); }; }; then
14687 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014688else
Martin v. Löwis11437992002-04-12 09:54:03 +000014689 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000014690cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014691ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014692fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014693rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014694fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014695echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
14696echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
14697if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014698
Martin v. Löwis11437992002-04-12 09:54:03 +000014699cat >>confdefs.h <<_ACEOF
14700#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
14701_ACEOF
14702
14703
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014704fi
14705
Martin v. Löwis11437992002-04-12 09:54:03 +000014706echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
14707echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
14708if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
14709 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014710else
Martin v. Löwis11437992002-04-12 09:54:03 +000014711 cat >conftest.$ac_ext <<_ACEOF
14712#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000014713#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014714$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +000014715#ifdef F77_DUMMY_MAIN
14716# ifdef __cplusplus
14717 extern "C"
14718# endif
14719 int F77_DUMMY_MAIN() { return 1; }
14720#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014721int
14722main ()
14723{
14724static struct stat ac_aggr;
14725if (ac_aggr.st_blocks)
14726return 0;
14727 ;
14728 return 0;
14729}
14730_ACEOF
14731rm -f conftest.$ac_objext
14732if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14733 (eval $ac_compile) 2>&5
14734 ac_status=$?
14735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14736 (exit $ac_status); } &&
14737 { ac_try='test -s conftest.$ac_objext'
14738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14739 (eval $ac_try) 2>&5
14740 ac_status=$?
14741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14742 (exit $ac_status); }; }; then
14743 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014744else
Martin v. Löwis11437992002-04-12 09:54:03 +000014745 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000014746cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014747ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014748fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014749rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014750fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014751echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
14752echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
14753if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014754
Martin v. Löwis11437992002-04-12 09:54:03 +000014755cat >>confdefs.h <<_ACEOF
14756#define HAVE_STRUCT_STAT_ST_BLOCKS 1
14757_ACEOF
14758
14759
14760cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014761#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014762_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014763
14764else
Martin v. Löwis11437992002-04-12 09:54:03 +000014765 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014766fi
14767
Michael W. Hudson54241132001-12-07 15:38:26 +000014768
Martin v. Löwis11437992002-04-12 09:54:03 +000014769
14770echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
14771echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
14772if test "${ac_cv_header_time_altzone+set}" = set; then
14773 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014774else
Martin v. Löwis11437992002-04-12 09:54:03 +000014775 cat >conftest.$ac_ext <<_ACEOF
14776#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000014777#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014778#include <time.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +000014779#ifdef F77_DUMMY_MAIN
14780# ifdef __cplusplus
14781 extern "C"
14782# endif
14783 int F77_DUMMY_MAIN() { return 1; }
14784#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014785int
14786main ()
14787{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014788return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000014789 ;
14790 return 0;
14791}
14792_ACEOF
14793rm -f conftest.$ac_objext
14794if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14795 (eval $ac_compile) 2>&5
14796 ac_status=$?
14797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14798 (exit $ac_status); } &&
14799 { ac_try='test -s conftest.$ac_objext'
14800 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14801 (eval $ac_try) 2>&5
14802 ac_status=$?
14803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14804 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014805 ac_cv_header_time_altzone=yes
14806else
Martin v. Löwis11437992002-04-12 09:54:03 +000014807 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000014808cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014809ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000014810fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014811rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014812fi
14813
Martin v. Löwis11437992002-04-12 09:54:03 +000014814echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
14815echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014816if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014817
14818cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014819#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014820_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014821
14822fi
14823
Guido van Rossumda88dad1995-01-26 00:46:29 +000014824was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014825echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
14826echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
14827cat >conftest.$ac_ext <<_ACEOF
14828#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000014829#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014830
14831#include <sys/types.h>
14832#include <sys/select.h>
14833#include <sys/time.h>
14834
Martin v. Löwisf3322282003-07-13 09:46:13 +000014835#ifdef F77_DUMMY_MAIN
14836# ifdef __cplusplus
14837 extern "C"
14838# endif
14839 int F77_DUMMY_MAIN() { return 1; }
14840#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014841int
14842main ()
14843{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014844;
Martin v. Löwis11437992002-04-12 09:54:03 +000014845 ;
14846 return 0;
14847}
14848_ACEOF
14849rm -f conftest.$ac_objext
14850if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14851 (eval $ac_compile) 2>&5
14852 ac_status=$?
14853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14854 (exit $ac_status); } &&
14855 { ac_try='test -s conftest.$ac_objext'
14856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14857 (eval $ac_try) 2>&5
14858 ac_status=$?
14859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14860 (exit $ac_status); }; }; then
14861
14862
14863cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014864#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014865_ACEOF
14866
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014867 was_it_defined=yes
14868
Guido van Rossumf78abae1997-01-21 22:02:36 +000014869else
Martin v. Löwis11437992002-04-12 09:54:03 +000014870 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000014871cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014872fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014873rm -f conftest.$ac_objext conftest.$ac_ext
14874echo "$as_me:$LINENO: result: $was_it_defined" >&5
14875echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000014876
Martin v. Löwis11437992002-04-12 09:54:03 +000014877echo "$as_me:$LINENO: checking for addrinfo" >&5
14878echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
14879if test "${ac_cv_struct_addrinfo+set}" = set; then
14880 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014881else
Martin v. Löwis11437992002-04-12 09:54:03 +000014882 cat >conftest.$ac_ext <<_ACEOF
14883#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000014884#include "confdefs.h"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014885
14886# include <netdb.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +000014887#ifdef F77_DUMMY_MAIN
14888# ifdef __cplusplus
14889 extern "C"
14890# endif
14891 int F77_DUMMY_MAIN() { return 1; }
14892#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014893int
14894main ()
14895{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014896struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000014897 ;
14898 return 0;
14899}
14900_ACEOF
14901rm -f conftest.$ac_objext
14902if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14903 (eval $ac_compile) 2>&5
14904 ac_status=$?
14905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14906 (exit $ac_status); } &&
14907 { ac_try='test -s conftest.$ac_objext'
14908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14909 (eval $ac_try) 2>&5
14910 ac_status=$?
14911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14912 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014913 ac_cv_struct_addrinfo=yes
14914else
Martin v. Löwis11437992002-04-12 09:54:03 +000014915 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000014916cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014917ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014918fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014919rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014920fi
14921
Martin v. Löwis11437992002-04-12 09:54:03 +000014922echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
14923echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014924if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014925
14926cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014927#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014928_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014929
14930fi
14931
Martin v. Löwis11437992002-04-12 09:54:03 +000014932echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
14933echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
14934if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
14935 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014936else
Martin v. Löwis11437992002-04-12 09:54:03 +000014937 cat >conftest.$ac_ext <<_ACEOF
14938#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000014939#include "confdefs.h"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014940
14941# include <sys/types.h>
14942# include <sys/socket.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +000014943#ifdef F77_DUMMY_MAIN
14944# ifdef __cplusplus
14945 extern "C"
14946# endif
14947 int F77_DUMMY_MAIN() { return 1; }
14948#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014949int
14950main ()
14951{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014952struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000014953 ;
14954 return 0;
14955}
14956_ACEOF
14957rm -f conftest.$ac_objext
14958if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14959 (eval $ac_compile) 2>&5
14960 ac_status=$?
14961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14962 (exit $ac_status); } &&
14963 { ac_try='test -s conftest.$ac_objext'
14964 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14965 (eval $ac_try) 2>&5
14966 ac_status=$?
14967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14968 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014969 ac_cv_struct_sockaddr_storage=yes
14970else
Martin v. Löwis11437992002-04-12 09:54:03 +000014971 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000014972cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014973ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014974fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014975rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014976fi
14977
Martin v. Löwis11437992002-04-12 09:54:03 +000014978echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
14979echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014980if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014981
14982cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014983#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014984_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014985
14986fi
14987
Guido van Rossum627b2d71993-12-24 10:39:16 +000014988# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000014989
Michael W. Hudson54241132001-12-07 15:38:26 +000014990
Martin v. Löwis11437992002-04-12 09:54:03 +000014991echo "$as_me:$LINENO: checking whether char is unsigned" >&5
14992echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
14993if test "${ac_cv_c_char_unsigned+set}" = set; then
14994 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000014995else
Martin v. Löwis11437992002-04-12 09:54:03 +000014996 cat >conftest.$ac_ext <<_ACEOF
14997#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000014998#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014999$ac_includes_default
Martin v. Löwisf3322282003-07-13 09:46:13 +000015000#ifdef F77_DUMMY_MAIN
15001# ifdef __cplusplus
15002 extern "C"
15003# endif
15004 int F77_DUMMY_MAIN() { return 1; }
15005#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015006int
15007main ()
15008{
15009static int test_array [1 - 2 * !(((char) -1) < 0)];
15010test_array [0] = 0
15011
15012 ;
15013 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000015014}
Martin v. Löwis11437992002-04-12 09:54:03 +000015015_ACEOF
15016rm -f conftest.$ac_objext
15017if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15018 (eval $ac_compile) 2>&5
15019 ac_status=$?
15020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15021 (exit $ac_status); } &&
15022 { ac_try='test -s conftest.$ac_objext'
15023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15024 (eval $ac_try) 2>&5
15025 ac_status=$?
15026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15027 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015028 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015029else
15030 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000015031cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015032ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015033fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015034rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015035fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015036echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
15037echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015038if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015039 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015040#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015041_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015042
15043fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000015044
Martin v. Löwisf3322282003-07-13 09:46:13 +000015045echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
15046echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
15047if test "${ac_cv_prog_cc_stdc+set}" = set; then
15048 echo $ECHO_N "(cached) $ECHO_C" >&6
15049else
15050 ac_cv_prog_cc_stdc=no
15051ac_save_CC=$CC
15052cat >conftest.$ac_ext <<_ACEOF
15053#line $LINENO "configure"
15054#include "confdefs.h"
15055#include <stdarg.h>
15056#include <stdio.h>
15057#include <sys/types.h>
15058#include <sys/stat.h>
15059/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
15060struct buf { int x; };
15061FILE * (*rcsopen) (struct buf *, struct stat *, int);
15062static char *e (p, i)
15063 char **p;
15064 int i;
15065{
15066 return p[i];
15067}
15068static char *f (char * (*g) (char **, int), char **p, ...)
15069{
15070 char *s;
15071 va_list v;
15072 va_start (v,p);
15073 s = g (p, va_arg (v,int));
15074 va_end (v);
15075 return s;
15076}
15077int test (int i, double x);
15078struct s1 {int (*f) (int a);};
15079struct s2 {int (*f) (double a);};
15080int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
15081int argc;
15082char **argv;
15083#ifdef F77_DUMMY_MAIN
15084# ifdef __cplusplus
15085 extern "C"
15086# endif
15087 int F77_DUMMY_MAIN() { return 1; }
15088#endif
15089int
15090main ()
15091{
15092return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
15093 ;
15094 return 0;
15095}
15096_ACEOF
15097# Don't try gcc -ansi; that turns off useful extensions and
15098# breaks some systems' header files.
15099# AIX -qlanglvl=ansi
15100# Ultrix and OSF/1 -std1
15101# HP-UX 10.20 and later -Ae
15102# HP-UX older versions -Aa -D_HPUX_SOURCE
15103# SVR4 -Xc -D__EXTENSIONS__
15104for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
15105do
15106 CC="$ac_save_CC $ac_arg"
15107 rm -f conftest.$ac_objext
15108if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15109 (eval $ac_compile) 2>&5
15110 ac_status=$?
15111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15112 (exit $ac_status); } &&
15113 { ac_try='test -s conftest.$ac_objext'
15114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15115 (eval $ac_try) 2>&5
15116 ac_status=$?
15117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15118 (exit $ac_status); }; }; then
15119 ac_cv_prog_cc_stdc=$ac_arg
15120break
15121else
15122 echo "$as_me: failed program was:" >&5
15123cat conftest.$ac_ext >&5
15124fi
15125rm -f conftest.$ac_objext
15126done
15127rm -f conftest.$ac_ext conftest.$ac_objext
15128CC=$ac_save_CC
15129
15130fi
15131
15132case "x$ac_cv_prog_cc_stdc" in
15133 x|xno)
15134 echo "$as_me:$LINENO: result: none needed" >&5
15135echo "${ECHO_T}none needed" >&6 ;;
15136 *)
15137 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
15138echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
15139 CC="$CC $ac_cv_prog_cc_stdc" ;;
15140esac
15141
Martin v. Löwis11437992002-04-12 09:54:03 +000015142echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
15143echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15144if test "${ac_cv_c_const+set}" = set; then
15145 echo $ECHO_N "(cached) $ECHO_C" >&6
15146else
15147 cat >conftest.$ac_ext <<_ACEOF
15148#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000015149#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015150
Martin v. Löwisf3322282003-07-13 09:46:13 +000015151#ifdef F77_DUMMY_MAIN
15152# ifdef __cplusplus
15153 extern "C"
15154# endif
15155 int F77_DUMMY_MAIN() { return 1; }
15156#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015157int
15158main ()
15159{
15160/* FIXME: Include the comments suggested by Paul. */
15161#ifndef __cplusplus
15162 /* Ultrix mips cc rejects this. */
15163 typedef int charset[2];
15164 const charset x;
15165 /* SunOS 4.1.1 cc rejects this. */
15166 char const *const *ccp;
15167 char **p;
15168 /* NEC SVR4.0.2 mips cc rejects this. */
15169 struct point {int x, y;};
15170 static struct point const zero = {0,0};
15171 /* AIX XL C 1.02.0.0 rejects this.
15172 It does not let you subtract one const X* pointer from another in
15173 an arm of an if-expression whose if-part is not a constant
15174 expression */
15175 const char *g = "string";
15176 ccp = &g + (g ? g-g : 0);
15177 /* HPUX 7.0 cc rejects these. */
15178 ++ccp;
15179 p = (char**) ccp;
15180 ccp = (char const *const *) p;
15181 { /* SCO 3.2v4 cc rejects this. */
15182 char *t;
15183 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015184
Martin v. Löwis11437992002-04-12 09:54:03 +000015185 *t++ = 0;
15186 }
15187 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
15188 int x[] = {25, 17};
15189 const int *foo = &x[0];
15190 ++foo;
15191 }
15192 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15193 typedef const int *iptr;
15194 iptr p = 0;
15195 ++p;
15196 }
15197 { /* AIX XL C 1.02.0.0 rejects this saying
15198 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15199 struct s { int j; const int *ap[3]; };
15200 struct s *b; b->j = 5;
15201 }
15202 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15203 const int foo = 10;
15204 }
15205#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000015206
Martin v. Löwis11437992002-04-12 09:54:03 +000015207 ;
15208 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000015209}
Martin v. Löwis11437992002-04-12 09:54:03 +000015210_ACEOF
15211rm -f conftest.$ac_objext
15212if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15213 (eval $ac_compile) 2>&5
15214 ac_status=$?
15215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15216 (exit $ac_status); } &&
15217 { ac_try='test -s conftest.$ac_objext'
15218 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15219 (eval $ac_try) 2>&5
15220 ac_status=$?
15221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15222 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015223 ac_cv_c_const=yes
15224else
Martin v. Löwis11437992002-04-12 09:54:03 +000015225 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000015226cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015227ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015228fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015229rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015230fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015231echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
15232echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015233if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015234
15235cat >>confdefs.h <<\_ACEOF
15236#define const
15237_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015238
15239fi
15240
Michael W. Hudson54241132001-12-07 15:38:26 +000015241
Guido van Rossumda88dad1995-01-26 00:46:29 +000015242works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015243echo "$as_me:$LINENO: checking for working volatile" >&5
15244echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
15245cat >conftest.$ac_ext <<_ACEOF
15246#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000015247#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015248
Martin v. Löwisf3322282003-07-13 09:46:13 +000015249#ifdef F77_DUMMY_MAIN
15250# ifdef __cplusplus
15251 extern "C"
15252# endif
15253 int F77_DUMMY_MAIN() { return 1; }
15254#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015255int
15256main ()
15257{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015258volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015259 ;
15260 return 0;
15261}
15262_ACEOF
15263rm -f conftest.$ac_objext
15264if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15265 (eval $ac_compile) 2>&5
15266 ac_status=$?
15267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15268 (exit $ac_status); } &&
15269 { ac_try='test -s conftest.$ac_objext'
15270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15271 (eval $ac_try) 2>&5
15272 ac_status=$?
15273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15274 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015275 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015276else
Martin v. Löwis11437992002-04-12 09:54:03 +000015277 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000015278cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015279
15280cat >>confdefs.h <<\_ACEOF
15281#define volatile
15282_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015283
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015284
Guido van Rossum627b2d71993-12-24 10:39:16 +000015285fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015286rm -f conftest.$ac_objext conftest.$ac_ext
15287echo "$as_me:$LINENO: result: $works" >&5
15288echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015289
Guido van Rossumda88dad1995-01-26 00:46:29 +000015290works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015291echo "$as_me:$LINENO: checking for working signed char" >&5
15292echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
15293cat >conftest.$ac_ext <<_ACEOF
15294#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000015295#include "confdefs.h"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015296
Martin v. Löwisf3322282003-07-13 09:46:13 +000015297#ifdef F77_DUMMY_MAIN
15298# ifdef __cplusplus
15299 extern "C"
15300# endif
15301 int F77_DUMMY_MAIN() { return 1; }
15302#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015303int
15304main ()
15305{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015306signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000015307 ;
15308 return 0;
15309}
15310_ACEOF
15311rm -f conftest.$ac_objext
15312if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15313 (eval $ac_compile) 2>&5
15314 ac_status=$?
15315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15316 (exit $ac_status); } &&
15317 { ac_try='test -s conftest.$ac_objext'
15318 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15319 (eval $ac_try) 2>&5
15320 ac_status=$?
15321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15322 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015323 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015324else
Martin v. Löwis11437992002-04-12 09:54:03 +000015325 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000015326cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015327
15328cat >>confdefs.h <<\_ACEOF
15329#define signed
15330_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000015331
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015332
Guido van Rossum7f43da71994-08-01 12:15:30 +000015333fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015334rm -f conftest.$ac_objext conftest.$ac_ext
15335echo "$as_me:$LINENO: result: $works" >&5
15336echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015337
Guido van Rossumda88dad1995-01-26 00:46:29 +000015338have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015339echo "$as_me:$LINENO: checking for prototypes" >&5
15340echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
15341cat >conftest.$ac_ext <<_ACEOF
15342#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000015343#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015344int foo(int x) { return 0; }
Martin v. Löwisf3322282003-07-13 09:46:13 +000015345#ifdef F77_DUMMY_MAIN
15346# ifdef __cplusplus
15347 extern "C"
15348# endif
15349 int F77_DUMMY_MAIN() { return 1; }
15350#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015351int
15352main ()
15353{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015354return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000015355 ;
15356 return 0;
15357}
15358_ACEOF
15359rm -f conftest.$ac_objext
15360if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15361 (eval $ac_compile) 2>&5
15362 ac_status=$?
15363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15364 (exit $ac_status); } &&
15365 { ac_try='test -s conftest.$ac_objext'
15366 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15367 (eval $ac_try) 2>&5
15368 ac_status=$?
15369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15370 (exit $ac_status); }; }; then
15371
15372
15373cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015374#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015375_ACEOF
15376
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015377 have_prototypes=yes
15378
Guido van Rossumf78abae1997-01-21 22:02:36 +000015379else
Martin v. Löwis11437992002-04-12 09:54:03 +000015380 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000015381cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000015382fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015383rm -f conftest.$ac_objext conftest.$ac_ext
15384echo "$as_me:$LINENO: result: $have_prototypes" >&5
15385echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015386
Guido van Rossumda88dad1995-01-26 00:46:29 +000015387works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015388echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
15389echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
15390cat >conftest.$ac_ext <<_ACEOF
15391#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000015392#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015393
15394#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000015395int foo(int x, ...) {
15396 va_list va;
15397 va_start(va, x);
15398 va_arg(va, int);
15399 va_arg(va, char *);
15400 va_arg(va, double);
15401 return 0;
15402}
Guido van Rossum7f43da71994-08-01 12:15:30 +000015403
Martin v. Löwisf3322282003-07-13 09:46:13 +000015404#ifdef F77_DUMMY_MAIN
15405# ifdef __cplusplus
15406 extern "C"
15407# endif
15408 int F77_DUMMY_MAIN() { return 1; }
15409#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015410int
15411main ()
15412{
Guido van Rossum90eea071996-08-30 20:58:57 +000015413return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000015414 ;
15415 return 0;
15416}
15417_ACEOF
15418rm -f conftest.$ac_objext
15419if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15420 (eval $ac_compile) 2>&5
15421 ac_status=$?
15422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15423 (exit $ac_status); } &&
15424 { ac_try='test -s conftest.$ac_objext'
15425 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15426 (eval $ac_try) 2>&5
15427 ac_status=$?
15428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15429 (exit $ac_status); }; }; then
15430
15431
15432cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015433#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015434_ACEOF
15435
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015436 works=yes
15437
Guido van Rossumf78abae1997-01-21 22:02:36 +000015438else
Martin v. Löwis11437992002-04-12 09:54:03 +000015439 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000015440cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000015441fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015442rm -f conftest.$ac_objext conftest.$ac_ext
15443echo "$as_me:$LINENO: result: $works" >&5
15444echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015445
Guido van Rossumda88dad1995-01-26 00:46:29 +000015446if test "$have_prototypes" = yes; then
15447bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015448echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
15449echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
15450cat >conftest.$ac_ext <<_ACEOF
15451#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000015452#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015453#include <unistd.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +000015454#ifdef F77_DUMMY_MAIN
15455# ifdef __cplusplus
15456 extern "C"
15457# endif
15458 int F77_DUMMY_MAIN() { return 1; }
15459#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015460int
15461main ()
15462{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015463char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000015464 ;
15465 return 0;
15466}
15467_ACEOF
15468rm -f conftest.$ac_objext
15469if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15470 (eval $ac_compile) 2>&5
15471 ac_status=$?
15472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15473 (exit $ac_status); } &&
15474 { ac_try='test -s conftest.$ac_objext'
15475 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15476 (eval $ac_try) 2>&5
15477 ac_status=$?
15478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15479 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000015480 :
15481else
Martin v. Löwis11437992002-04-12 09:54:03 +000015482 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000015483cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015484
15485cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015486#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015487_ACEOF
15488
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015489 bad_prototypes=yes
15490
Guido van Rossum627b2d71993-12-24 10:39:16 +000015491fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015492rm -f conftest.$ac_objext conftest.$ac_ext
15493echo "$as_me:$LINENO: result: $bad_prototypes" >&5
15494echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015495fi
15496
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015497# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000015498echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
15499echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
15500cat >conftest.$ac_ext <<_ACEOF
15501#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000015502#include "confdefs.h"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015503#include <sys/types.h>
15504#include <sys/socket.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +000015505#ifdef F77_DUMMY_MAIN
15506# ifdef __cplusplus
15507 extern "C"
15508# endif
15509 int F77_DUMMY_MAIN() { return 1; }
15510#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015511int
15512main ()
15513{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015514struct sockaddr x;
15515x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015516 ;
15517 return 0;
15518}
15519_ACEOF
15520rm -f conftest.$ac_objext
15521if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15522 (eval $ac_compile) 2>&5
15523 ac_status=$?
15524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15525 (exit $ac_status); } &&
15526 { ac_try='test -s conftest.$ac_objext'
15527 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15528 (eval $ac_try) 2>&5
15529 ac_status=$?
15530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15531 (exit $ac_status); }; }; then
15532 echo "$as_me:$LINENO: result: yes" >&5
15533echo "${ECHO_T}yes" >&6
15534
15535cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015536#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015537_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015538
15539else
Martin v. Löwis11437992002-04-12 09:54:03 +000015540 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000015541cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015542echo "$as_me:$LINENO: result: no" >&5
15543echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015544fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015545rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015546
Guido van Rossumda88dad1995-01-26 00:46:29 +000015547va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015548echo "$as_me:$LINENO: checking whether va_list is an array" >&5
15549echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
15550cat >conftest.$ac_ext <<_ACEOF
15551#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000015552#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015553
15554#ifdef HAVE_STDARG_PROTOTYPES
15555#include <stdarg.h>
15556#else
15557#include <varargs.h>
15558#endif
15559
Martin v. Löwisf3322282003-07-13 09:46:13 +000015560#ifdef F77_DUMMY_MAIN
15561# ifdef __cplusplus
15562 extern "C"
15563# endif
15564 int F77_DUMMY_MAIN() { return 1; }
15565#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015566int
15567main ()
15568{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015569va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000015570 ;
15571 return 0;
15572}
15573_ACEOF
15574rm -f conftest.$ac_objext
15575if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15576 (eval $ac_compile) 2>&5
15577 ac_status=$?
15578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15579 (exit $ac_status); } &&
15580 { ac_try='test -s conftest.$ac_objext'
15581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15582 (eval $ac_try) 2>&5
15583 ac_status=$?
15584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15585 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015586 :
15587else
Martin v. Löwis11437992002-04-12 09:54:03 +000015588 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000015589cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015590
15591
15592cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015593#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015594_ACEOF
15595
Guido van Rossumda88dad1995-01-26 00:46:29 +000015596 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015597
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015598fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015599rm -f conftest.$ac_objext conftest.$ac_ext
15600echo "$as_me:$LINENO: result: $va_list_is_array" >&5
15601echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015602
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015603# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000015604
15605
15606
15607echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
15608echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
15609if test "${ac_cv_func_gethostbyname_r+set}" = set; then
15610 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015611else
Martin v. Löwis11437992002-04-12 09:54:03 +000015612 cat >conftest.$ac_ext <<_ACEOF
15613#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000015614#include "confdefs.h"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015615/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwisf3322282003-07-13 09:46:13 +000015616 which can conflict with char gethostbyname_r (); below. */
15617#include <assert.h>
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015618/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015619#ifdef __cplusplus
15620extern "C"
15621#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015622/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015623 builtin and then its argument prototype would still apply. */
15624char gethostbyname_r ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000015625char (*f) ();
15626
15627#ifdef F77_DUMMY_MAIN
15628# ifdef __cplusplus
15629 extern "C"
15630# endif
15631 int F77_DUMMY_MAIN() { return 1; }
15632#endif
15633int
15634main ()
15635{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015636/* The GNU C library defines this for functions which it implements
15637 to always fail with ENOSYS. Some functions are actually named
15638 something starting with __ and the normal name is an alias. */
15639#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
15640choke me
15641#else
Martin v. Löwisf3322282003-07-13 09:46:13 +000015642f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015643#endif
15644
Martin v. Löwis11437992002-04-12 09:54:03 +000015645 ;
15646 return 0;
15647}
15648_ACEOF
15649rm -f conftest.$ac_objext conftest$ac_exeext
15650if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15651 (eval $ac_link) 2>&5
15652 ac_status=$?
15653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15654 (exit $ac_status); } &&
15655 { ac_try='test -s conftest$ac_exeext'
15656 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15657 (eval $ac_try) 2>&5
15658 ac_status=$?
15659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15660 (exit $ac_status); }; }; then
15661 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015662else
Martin v. Löwis11437992002-04-12 09:54:03 +000015663 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000015664cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015665ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015666fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015667rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015668fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015669echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
15670echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
15671if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015672
Martin v. Löwis11437992002-04-12 09:54:03 +000015673 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015674#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015675_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015676
Martin v. Löwis11437992002-04-12 09:54:03 +000015677 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
15678echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015679 OLD_CFLAGS=$CFLAGS
15680 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015681 cat >conftest.$ac_ext <<_ACEOF
15682#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000015683#include "confdefs.h"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015684
15685# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015686
Martin v. Löwisf3322282003-07-13 09:46:13 +000015687#ifdef F77_DUMMY_MAIN
15688# ifdef __cplusplus
15689 extern "C"
15690# endif
15691 int F77_DUMMY_MAIN() { return 1; }
15692#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015693int
15694main ()
15695{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015696
15697 char *name;
15698 struct hostent *he, *res;
15699 char buffer[2048];
15700 int buflen = 2048;
15701 int h_errnop;
15702
15703 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015704
15705 ;
15706 return 0;
15707}
15708_ACEOF
15709rm -f conftest.$ac_objext
15710if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15711 (eval $ac_compile) 2>&5
15712 ac_status=$?
15713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15714 (exit $ac_status); } &&
15715 { ac_try='test -s conftest.$ac_objext'
15716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15717 (eval $ac_try) 2>&5
15718 ac_status=$?
15719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15720 (exit $ac_status); }; }; then
15721
15722 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015723#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015724_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015725
Martin v. Löwis11437992002-04-12 09:54:03 +000015726
15727cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015728#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015729_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015730
Martin v. Löwis11437992002-04-12 09:54:03 +000015731 echo "$as_me:$LINENO: result: yes" >&5
15732echo "${ECHO_T}yes" >&6
15733
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015734else
Martin v. Löwis11437992002-04-12 09:54:03 +000015735 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000015736cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015737
15738 echo "$as_me:$LINENO: result: no" >&5
15739echo "${ECHO_T}no" >&6
15740 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
15741echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
15742 cat >conftest.$ac_ext <<_ACEOF
15743#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000015744#include "confdefs.h"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015745
15746# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015747
Martin v. Löwisf3322282003-07-13 09:46:13 +000015748#ifdef F77_DUMMY_MAIN
15749# ifdef __cplusplus
15750 extern "C"
15751# endif
15752 int F77_DUMMY_MAIN() { return 1; }
15753#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015754int
15755main ()
15756{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015757
15758 char *name;
15759 struct hostent *he;
15760 char buffer[2048];
15761 int buflen = 2048;
15762 int h_errnop;
15763
15764 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015765
15766 ;
15767 return 0;
15768}
15769_ACEOF
15770rm -f conftest.$ac_objext
15771if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15772 (eval $ac_compile) 2>&5
15773 ac_status=$?
15774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15775 (exit $ac_status); } &&
15776 { ac_try='test -s conftest.$ac_objext'
15777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15778 (eval $ac_try) 2>&5
15779 ac_status=$?
15780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15781 (exit $ac_status); }; }; then
15782
15783 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015784#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015785_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015786
Martin v. Löwis11437992002-04-12 09:54:03 +000015787
15788cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015789#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015790_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015791
Martin v. Löwis11437992002-04-12 09:54:03 +000015792 echo "$as_me:$LINENO: result: yes" >&5
15793echo "${ECHO_T}yes" >&6
15794
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015795else
Martin v. Löwis11437992002-04-12 09:54:03 +000015796 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000015797cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015798
15799 echo "$as_me:$LINENO: result: no" >&5
15800echo "${ECHO_T}no" >&6
15801 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
15802echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
15803 cat >conftest.$ac_ext <<_ACEOF
15804#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000015805#include "confdefs.h"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015806
15807# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015808
Martin v. Löwisf3322282003-07-13 09:46:13 +000015809#ifdef F77_DUMMY_MAIN
15810# ifdef __cplusplus
15811 extern "C"
15812# endif
15813 int F77_DUMMY_MAIN() { return 1; }
15814#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015815int
15816main ()
15817{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015818
15819 char *name;
15820 struct hostent *he;
15821 struct hostent_data data;
15822
15823 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000015824
15825 ;
15826 return 0;
15827}
15828_ACEOF
15829rm -f conftest.$ac_objext
15830if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15831 (eval $ac_compile) 2>&5
15832 ac_status=$?
15833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15834 (exit $ac_status); } &&
15835 { ac_try='test -s conftest.$ac_objext'
15836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15837 (eval $ac_try) 2>&5
15838 ac_status=$?
15839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15840 (exit $ac_status); }; }; then
15841
15842 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015843#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015844_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015845
Martin v. Löwis11437992002-04-12 09:54:03 +000015846
15847cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015848#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015849_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015850
Martin v. Löwis11437992002-04-12 09:54:03 +000015851 echo "$as_me:$LINENO: result: yes" >&5
15852echo "${ECHO_T}yes" >&6
15853
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015854else
Martin v. Löwis11437992002-04-12 09:54:03 +000015855 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000015856cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015857
15858 echo "$as_me:$LINENO: result: no" >&5
15859echo "${ECHO_T}no" >&6
15860
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015861fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015862rm -f conftest.$ac_objext conftest.$ac_ext
15863
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015864fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015865rm -f conftest.$ac_objext conftest.$ac_ext
15866
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015867fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015868rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015869 CFLAGS=$OLD_CFLAGS
15870
15871else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015872
Martin v. Löwis11437992002-04-12 09:54:03 +000015873
15874for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000015875do
Martin v. Löwis11437992002-04-12 09:54:03 +000015876as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15877echo "$as_me:$LINENO: checking for $ac_func" >&5
15878echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15879if eval "test \"\${$as_ac_var+set}\" = set"; then
15880 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015881else
Martin v. Löwis11437992002-04-12 09:54:03 +000015882 cat >conftest.$ac_ext <<_ACEOF
15883#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000015884#include "confdefs.h"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015885/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwisf3322282003-07-13 09:46:13 +000015886 which can conflict with char $ac_func (); below. */
15887#include <assert.h>
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015888/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015889#ifdef __cplusplus
15890extern "C"
15891#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015892/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015893 builtin and then its argument prototype would still apply. */
15894char $ac_func ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000015895char (*f) ();
15896
15897#ifdef F77_DUMMY_MAIN
15898# ifdef __cplusplus
15899 extern "C"
15900# endif
15901 int F77_DUMMY_MAIN() { return 1; }
15902#endif
15903int
15904main ()
15905{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015906/* The GNU C library defines this for functions which it implements
15907 to always fail with ENOSYS. Some functions are actually named
15908 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015909#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015910choke me
15911#else
Martin v. Löwisf3322282003-07-13 09:46:13 +000015912f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015913#endif
15914
Martin v. Löwis11437992002-04-12 09:54:03 +000015915 ;
15916 return 0;
15917}
15918_ACEOF
15919rm -f conftest.$ac_objext conftest$ac_exeext
15920if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15921 (eval $ac_link) 2>&5
15922 ac_status=$?
15923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15924 (exit $ac_status); } &&
15925 { ac_try='test -s conftest$ac_exeext'
15926 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15927 (eval $ac_try) 2>&5
15928 ac_status=$?
15929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15930 (exit $ac_status); }; }; then
15931 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015932else
Martin v. Löwis11437992002-04-12 09:54:03 +000015933 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000015934cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015935eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015936fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015937rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015938fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015939echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15940echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15941if test `eval echo '${'$as_ac_var'}'` = yes; then
15942 cat >>confdefs.h <<_ACEOF
15943#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15944_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015945
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015946fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015947done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015948
Michael W. Hudson54241132001-12-07 15:38:26 +000015949
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015950fi
15951
Michael W. Hudson54241132001-12-07 15:38:26 +000015952
15953
15954
15955
15956
15957
Guido van Rossum627b2d71993-12-24 10:39:16 +000015958# checks for system services
15959# (none yet)
15960
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015961# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000015962echo "$as_me:$LINENO: checking for __fpu_control" >&5
15963echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
15964if test "${ac_cv_func___fpu_control+set}" = set; then
15965 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015966else
Martin v. Löwis11437992002-04-12 09:54:03 +000015967 cat >conftest.$ac_ext <<_ACEOF
15968#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000015969#include "confdefs.h"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015970/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwisf3322282003-07-13 09:46:13 +000015971 which can conflict with char __fpu_control (); below. */
15972#include <assert.h>
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015973/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015974#ifdef __cplusplus
15975extern "C"
15976#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015977/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015978 builtin and then its argument prototype would still apply. */
15979char __fpu_control ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000015980char (*f) ();
15981
15982#ifdef F77_DUMMY_MAIN
15983# ifdef __cplusplus
15984 extern "C"
15985# endif
15986 int F77_DUMMY_MAIN() { return 1; }
15987#endif
15988int
15989main ()
15990{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015991/* The GNU C library defines this for functions which it implements
15992 to always fail with ENOSYS. Some functions are actually named
15993 something starting with __ and the normal name is an alias. */
15994#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
15995choke me
15996#else
Martin v. Löwisf3322282003-07-13 09:46:13 +000015997f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015998#endif
15999
Martin v. Löwis11437992002-04-12 09:54:03 +000016000 ;
16001 return 0;
16002}
16003_ACEOF
16004rm -f conftest.$ac_objext conftest$ac_exeext
16005if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16006 (eval $ac_link) 2>&5
16007 ac_status=$?
16008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16009 (exit $ac_status); } &&
16010 { ac_try='test -s conftest$ac_exeext'
16011 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16012 (eval $ac_try) 2>&5
16013 ac_status=$?
16014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16015 (exit $ac_status); }; }; then
16016 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016017else
Martin v. Löwis11437992002-04-12 09:54:03 +000016018 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000016019cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016020ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016021fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016022rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016023fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016024echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
16025echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
16026if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016027 :
16028else
Martin v. Löwis11437992002-04-12 09:54:03 +000016029
16030echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
16031echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
16032if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
16033 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016034else
Martin v. Löwis11437992002-04-12 09:54:03 +000016035 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016036LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016037cat >conftest.$ac_ext <<_ACEOF
16038#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000016039#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016040
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016041/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016042#ifdef __cplusplus
16043extern "C"
16044#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016045/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016046 builtin and then its argument prototype would still apply. */
16047char __fpu_control ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000016048#ifdef F77_DUMMY_MAIN
16049# ifdef __cplusplus
16050 extern "C"
16051# endif
16052 int F77_DUMMY_MAIN() { return 1; }
16053#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016054int
16055main ()
16056{
16057__fpu_control ();
16058 ;
16059 return 0;
16060}
16061_ACEOF
16062rm -f conftest.$ac_objext conftest$ac_exeext
16063if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16064 (eval $ac_link) 2>&5
16065 ac_status=$?
16066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16067 (exit $ac_status); } &&
16068 { ac_try='test -s conftest$ac_exeext'
16069 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16070 (eval $ac_try) 2>&5
16071 ac_status=$?
16072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16073 (exit $ac_status); }; }; then
16074 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000016075else
Martin v. Löwis11437992002-04-12 09:54:03 +000016076 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000016077cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016078ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016079fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016080rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16081LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016082fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016083echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
16084echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
16085if test $ac_cv_lib_ieee___fpu_control = yes; then
16086 cat >>confdefs.h <<_ACEOF
16087#define HAVE_LIBIEEE 1
16088_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016089
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016090 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016091
Guido van Rossum627b2d71993-12-24 10:39:16 +000016092fi
16093
Michael W. Hudson54241132001-12-07 15:38:26 +000016094
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016095fi
16096
Michael W. Hudson54241132001-12-07 15:38:26 +000016097
Guido van Rossum7f253911997-05-09 02:42:48 +000016098# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000016099echo "$as_me:$LINENO: checking for --with-fpectl" >&5
16100echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
16101
Guido van Rossum7f253911997-05-09 02:42:48 +000016102# Check whether --with-fpectl or --without-fpectl was given.
16103if test "${with_fpectl+set}" = set; then
16104 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000016105
Guido van Rossum7f253911997-05-09 02:42:48 +000016106if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016107then
16108
16109cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000016110#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016111_ACEOF
16112
16113 echo "$as_me:$LINENO: result: yes" >&5
16114echo "${ECHO_T}yes" >&6
16115else echo "$as_me:$LINENO: result: no" >&5
16116echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016117fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016118else
Martin v. Löwis11437992002-04-12 09:54:03 +000016119 echo "$as_me:$LINENO: result: no" >&5
16120echo "${ECHO_T}no" >&6
16121fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000016122
Guido van Rossum7f43da71994-08-01 12:15:30 +000016123# check for --with-libm=...
16124
Guido van Rossum563e7081996-09-10 18:20:48 +000016125case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000016126Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016127BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000016128*) LIBM=-lm
16129esac
Martin v. Löwis11437992002-04-12 09:54:03 +000016130echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
16131echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
16132
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016133# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016134if test "${with_libm+set}" = set; then
16135 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000016136
Guido van Rossum7f253911997-05-09 02:42:48 +000016137if test "$withval" = no
16138then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000016139 echo "$as_me:$LINENO: result: force LIBM empty" >&5
16140echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016141elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016142then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000016143 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
16144echo "${ECHO_T}set LIBM=\"$withval\"" >&6
16145else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
16146echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
16147 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016148fi
Guido van Rossum7f253911997-05-09 02:42:48 +000016149else
Martin v. Löwis11437992002-04-12 09:54:03 +000016150 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
16151echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
16152fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016153
16154# check for --with-libc=...
16155
Martin v. Löwis11437992002-04-12 09:54:03 +000016156echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
16157echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
16158
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016159# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016160if test "${with_libc+set}" = set; then
16161 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000016162
Guido van Rossum7f253911997-05-09 02:42:48 +000016163if test "$withval" = no
16164then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000016165 echo "$as_me:$LINENO: result: force LIBC empty" >&5
16166echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016167elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016168then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000016169 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
16170echo "${ECHO_T}set LIBC=\"$withval\"" >&6
16171else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
16172echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
16173 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016174fi
Guido van Rossum7f253911997-05-09 02:42:48 +000016175else
Martin v. Löwis11437992002-04-12 09:54:03 +000016176 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
16177echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
16178fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016179
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016180# check for hypot() in math library
16181LIBS_SAVE=$LIBS
16182LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000016183
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016184for ac_func in hypot
16185do
Martin v. Löwis11437992002-04-12 09:54:03 +000016186as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16187echo "$as_me:$LINENO: checking for $ac_func" >&5
16188echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16189if eval "test \"\${$as_ac_var+set}\" = set"; then
16190 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016191else
Martin v. Löwis11437992002-04-12 09:54:03 +000016192 cat >conftest.$ac_ext <<_ACEOF
16193#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000016194#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016195/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwisf3322282003-07-13 09:46:13 +000016196 which can conflict with char $ac_func (); below. */
16197#include <assert.h>
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016198/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016199#ifdef __cplusplus
16200extern "C"
16201#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016202/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016203 builtin and then its argument prototype would still apply. */
16204char $ac_func ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000016205char (*f) ();
16206
16207#ifdef F77_DUMMY_MAIN
16208# ifdef __cplusplus
16209 extern "C"
16210# endif
16211 int F77_DUMMY_MAIN() { return 1; }
16212#endif
16213int
16214main ()
16215{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016216/* The GNU C library defines this for functions which it implements
16217 to always fail with ENOSYS. Some functions are actually named
16218 something starting with __ and the normal name is an alias. */
16219#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16220choke me
16221#else
Martin v. Löwisf3322282003-07-13 09:46:13 +000016222f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016223#endif
16224
Martin v. Löwis11437992002-04-12 09:54:03 +000016225 ;
16226 return 0;
16227}
16228_ACEOF
16229rm -f conftest.$ac_objext conftest$ac_exeext
16230if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16231 (eval $ac_link) 2>&5
16232 ac_status=$?
16233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16234 (exit $ac_status); } &&
16235 { ac_try='test -s conftest$ac_exeext'
16236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16237 (eval $ac_try) 2>&5
16238 ac_status=$?
16239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16240 (exit $ac_status); }; }; then
16241 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016242else
Martin v. Löwis11437992002-04-12 09:54:03 +000016243 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000016244cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016245eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016246fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016247rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016248fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016249echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16250echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16251if test `eval echo '${'$as_ac_var'}'` = yes; then
16252 cat >>confdefs.h <<_ACEOF
16253#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16254_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000016255
Michael W. Hudson54241132001-12-07 15:38:26 +000016256else
Martin v. Löwis11437992002-04-12 09:54:03 +000016257 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016258fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016259done
16260
Michael W. Hudson54241132001-12-07 15:38:26 +000016261
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016262LIBS=$LIBS_SAVE
16263
Guido van Rossumef2255b2000-03-10 22:30:29 +000016264# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000016265if test "${ac_cv_header_wchar_h+set}" = set; then
16266 echo "$as_me:$LINENO: checking for wchar.h" >&5
16267echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16268if test "${ac_cv_header_wchar_h+set}" = set; then
16269 echo $ECHO_N "(cached) $ECHO_C" >&6
16270fi
16271echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16272echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000016273else
Martin v. Löwis11437992002-04-12 09:54:03 +000016274 # Is the header compilable?
16275echo "$as_me:$LINENO: checking wchar.h usability" >&5
16276echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
16277cat >conftest.$ac_ext <<_ACEOF
16278#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000016279#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016280$ac_includes_default
16281#include <wchar.h>
16282_ACEOF
16283rm -f conftest.$ac_objext
16284if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16285 (eval $ac_compile) 2>&5
16286 ac_status=$?
16287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16288 (exit $ac_status); } &&
16289 { ac_try='test -s conftest.$ac_objext'
16290 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16291 (eval $ac_try) 2>&5
16292 ac_status=$?
16293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16294 (exit $ac_status); }; }; then
16295 ac_header_compiler=yes
16296else
16297 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000016298cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016299ac_header_compiler=no
16300fi
16301rm -f conftest.$ac_objext conftest.$ac_ext
16302echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16303echo "${ECHO_T}$ac_header_compiler" >&6
16304
16305# Is the header present?
16306echo "$as_me:$LINENO: checking wchar.h presence" >&5
16307echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
16308cat >conftest.$ac_ext <<_ACEOF
16309#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000016310#include "confdefs.h"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016311#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016312_ACEOF
16313if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16314 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16315 ac_status=$?
Martin v. Löwisf3322282003-07-13 09:46:13 +000016316 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016317 rm -f conftest.er1
16318 cat conftest.err >&5
16319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16320 (exit $ac_status); } >/dev/null; then
16321 if test -s conftest.err; then
16322 ac_cpp_err=$ac_c_preproc_warn_flag
16323 else
16324 ac_cpp_err=
16325 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016326else
Martin v. Löwis11437992002-04-12 09:54:03 +000016327 ac_cpp_err=yes
16328fi
16329if test -z "$ac_cpp_err"; then
16330 ac_header_preproc=yes
16331else
16332 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000016333 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016334 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016335fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016336rm -f conftest.err conftest.$ac_ext
16337echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16338echo "${ECHO_T}$ac_header_preproc" >&6
16339
16340# So? What about this header?
16341case $ac_header_compiler:$ac_header_preproc in
16342 yes:no )
16343 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
16344echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16345 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000016346echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwis11437992002-04-12 09:54:03 +000016347 no:yes )
16348 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
16349echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
16350 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
16351echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
16352 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000016353echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwis11437992002-04-12 09:54:03 +000016354esac
16355echo "$as_me:$LINENO: checking for wchar.h" >&5
16356echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16357if test "${ac_cv_header_wchar_h+set}" = set; then
16358 echo $ECHO_N "(cached) $ECHO_C" >&6
16359else
16360 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000016361fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016362echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16363echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
16364
16365fi
16366if test $ac_cv_header_wchar_h = yes; then
16367
16368
16369cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016370#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016371_ACEOF
16372
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016373 wchar_h="yes"
16374
Guido van Rossumef2255b2000-03-10 22:30:29 +000016375else
Martin v. Löwis11437992002-04-12 09:54:03 +000016376 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016377
16378fi
16379
Michael W. Hudson54241132001-12-07 15:38:26 +000016380
Martin v. Löwis11437992002-04-12 09:54:03 +000016381
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016382# determine wchar_t size
16383if test "$wchar_h" = yes
16384then
Martin v. Löwis11437992002-04-12 09:54:03 +000016385 echo "$as_me:$LINENO: checking for wchar_t" >&5
16386echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
16387if test "${ac_cv_type_wchar_t+set}" = set; then
16388 echo $ECHO_N "(cached) $ECHO_C" >&6
16389else
16390 cat >conftest.$ac_ext <<_ACEOF
16391#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000016392#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016393#include <wchar.h>
16394
Martin v. Löwisf3322282003-07-13 09:46:13 +000016395#ifdef F77_DUMMY_MAIN
16396# ifdef __cplusplus
16397 extern "C"
16398# endif
16399 int F77_DUMMY_MAIN() { return 1; }
16400#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016401int
16402main ()
16403{
16404if ((wchar_t *) 0)
16405 return 0;
16406if (sizeof (wchar_t))
16407 return 0;
16408 ;
16409 return 0;
16410}
16411_ACEOF
16412rm -f conftest.$ac_objext
16413if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16414 (eval $ac_compile) 2>&5
16415 ac_status=$?
16416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16417 (exit $ac_status); } &&
16418 { ac_try='test -s conftest.$ac_objext'
16419 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16420 (eval $ac_try) 2>&5
16421 ac_status=$?
16422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16423 (exit $ac_status); }; }; then
16424 ac_cv_type_wchar_t=yes
16425else
16426 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000016427cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016428ac_cv_type_wchar_t=no
16429fi
16430rm -f conftest.$ac_objext conftest.$ac_ext
16431fi
16432echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
16433echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
16434
16435echo "$as_me:$LINENO: checking size of wchar_t" >&5
16436echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
16437if test "${ac_cv_sizeof_wchar_t+set}" = set; then
16438 echo $ECHO_N "(cached) $ECHO_C" >&6
16439else
16440 if test "$ac_cv_type_wchar_t" = yes; then
16441 # The cast to unsigned long works around a bug in the HP C Compiler
16442 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16443 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16444 # This bug is HP SR number 8606223364.
16445 if test "$cross_compiling" = yes; then
16446 # Depending upon the size, compute the lo and hi bounds.
16447cat >conftest.$ac_ext <<_ACEOF
16448#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000016449#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016450#include <wchar.h>
16451
Martin v. Löwisf3322282003-07-13 09:46:13 +000016452#ifdef F77_DUMMY_MAIN
16453# ifdef __cplusplus
16454 extern "C"
16455# endif
16456 int F77_DUMMY_MAIN() { return 1; }
16457#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016458int
16459main ()
16460{
16461static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
16462test_array [0] = 0
16463
16464 ;
16465 return 0;
16466}
16467_ACEOF
16468rm -f conftest.$ac_objext
16469if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16470 (eval $ac_compile) 2>&5
16471 ac_status=$?
16472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16473 (exit $ac_status); } &&
16474 { ac_try='test -s conftest.$ac_objext'
16475 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16476 (eval $ac_try) 2>&5
16477 ac_status=$?
16478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16479 (exit $ac_status); }; }; then
16480 ac_lo=0 ac_mid=0
16481 while :; do
16482 cat >conftest.$ac_ext <<_ACEOF
16483#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000016484#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016485#include <wchar.h>
16486
Martin v. Löwisf3322282003-07-13 09:46:13 +000016487#ifdef F77_DUMMY_MAIN
16488# ifdef __cplusplus
16489 extern "C"
16490# endif
16491 int F77_DUMMY_MAIN() { return 1; }
16492#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016493int
16494main ()
16495{
16496static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16497test_array [0] = 0
16498
16499 ;
16500 return 0;
16501}
16502_ACEOF
16503rm -f conftest.$ac_objext
16504if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16505 (eval $ac_compile) 2>&5
16506 ac_status=$?
16507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16508 (exit $ac_status); } &&
16509 { ac_try='test -s conftest.$ac_objext'
16510 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16511 (eval $ac_try) 2>&5
16512 ac_status=$?
16513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16514 (exit $ac_status); }; }; then
16515 ac_hi=$ac_mid; break
16516else
16517 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000016518cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016519ac_lo=`expr $ac_mid + 1`
16520 if test $ac_lo -le $ac_mid; then
16521 ac_lo= ac_hi=
16522 break
16523 fi
16524 ac_mid=`expr 2 '*' $ac_mid + 1`
16525fi
16526rm -f conftest.$ac_objext conftest.$ac_ext
16527 done
16528else
16529 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000016530cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016531cat >conftest.$ac_ext <<_ACEOF
16532#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000016533#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016534#include <wchar.h>
16535
Martin v. Löwisf3322282003-07-13 09:46:13 +000016536#ifdef F77_DUMMY_MAIN
16537# ifdef __cplusplus
16538 extern "C"
16539# endif
16540 int F77_DUMMY_MAIN() { return 1; }
16541#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016542int
16543main ()
16544{
16545static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
16546test_array [0] = 0
16547
16548 ;
16549 return 0;
16550}
16551_ACEOF
16552rm -f conftest.$ac_objext
16553if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16554 (eval $ac_compile) 2>&5
16555 ac_status=$?
16556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16557 (exit $ac_status); } &&
16558 { ac_try='test -s conftest.$ac_objext'
16559 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16560 (eval $ac_try) 2>&5
16561 ac_status=$?
16562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16563 (exit $ac_status); }; }; then
16564 ac_hi=-1 ac_mid=-1
16565 while :; do
16566 cat >conftest.$ac_ext <<_ACEOF
16567#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000016568#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016569#include <wchar.h>
16570
Martin v. Löwisf3322282003-07-13 09:46:13 +000016571#ifdef F77_DUMMY_MAIN
16572# ifdef __cplusplus
16573 extern "C"
16574# endif
16575 int F77_DUMMY_MAIN() { return 1; }
16576#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016577int
16578main ()
16579{
16580static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
16581test_array [0] = 0
16582
16583 ;
16584 return 0;
16585}
16586_ACEOF
16587rm -f conftest.$ac_objext
16588if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16589 (eval $ac_compile) 2>&5
16590 ac_status=$?
16591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16592 (exit $ac_status); } &&
16593 { ac_try='test -s conftest.$ac_objext'
16594 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16595 (eval $ac_try) 2>&5
16596 ac_status=$?
16597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16598 (exit $ac_status); }; }; then
16599 ac_lo=$ac_mid; break
16600else
16601 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000016602cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016603ac_hi=`expr '(' $ac_mid ')' - 1`
16604 if test $ac_mid -le $ac_hi; then
16605 ac_lo= ac_hi=
16606 break
16607 fi
16608 ac_mid=`expr 2 '*' $ac_mid`
16609fi
16610rm -f conftest.$ac_objext conftest.$ac_ext
16611 done
16612else
16613 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000016614cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016615ac_lo= ac_hi=
16616fi
16617rm -f conftest.$ac_objext conftest.$ac_ext
16618fi
16619rm -f conftest.$ac_objext conftest.$ac_ext
16620# Binary search between lo and hi bounds.
16621while test "x$ac_lo" != "x$ac_hi"; do
16622 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
16623 cat >conftest.$ac_ext <<_ACEOF
16624#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000016625#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016626#include <wchar.h>
16627
Martin v. Löwisf3322282003-07-13 09:46:13 +000016628#ifdef F77_DUMMY_MAIN
16629# ifdef __cplusplus
16630 extern "C"
16631# endif
16632 int F77_DUMMY_MAIN() { return 1; }
16633#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016634int
16635main ()
16636{
16637static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16638test_array [0] = 0
16639
16640 ;
16641 return 0;
16642}
16643_ACEOF
16644rm -f conftest.$ac_objext
16645if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16646 (eval $ac_compile) 2>&5
16647 ac_status=$?
16648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16649 (exit $ac_status); } &&
16650 { ac_try='test -s conftest.$ac_objext'
16651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16652 (eval $ac_try) 2>&5
16653 ac_status=$?
16654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16655 (exit $ac_status); }; }; then
16656 ac_hi=$ac_mid
16657else
16658 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000016659cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016660ac_lo=`expr '(' $ac_mid ')' + 1`
16661fi
16662rm -f conftest.$ac_objext conftest.$ac_ext
16663done
16664case $ac_lo in
16665?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwisf3322282003-07-13 09:46:13 +000016666'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
16667echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016668 { (exit 1); exit 1; }; } ;;
16669esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016670else
16671 if test "$cross_compiling" = yes; then
Martin v. Löwisf3322282003-07-13 09:46:13 +000016672 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
16673echo "$as_me: error: cannot run test program while cross compiling" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016674 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000016675else
Martin v. Löwis11437992002-04-12 09:54:03 +000016676 cat >conftest.$ac_ext <<_ACEOF
16677#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000016678#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016679#include <wchar.h>
16680
16681long longval () { return (long) (sizeof (wchar_t)); }
16682unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000016683#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016684#include <stdlib.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +000016685#ifdef F77_DUMMY_MAIN
16686# ifdef __cplusplus
16687 extern "C"
16688# endif
16689 int F77_DUMMY_MAIN() { return 1; }
16690#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016691int
16692main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016693{
Martin v. Löwis11437992002-04-12 09:54:03 +000016694
16695 FILE *f = fopen ("conftest.val", "w");
16696 if (! f)
16697 exit (1);
16698 if (((long) (sizeof (wchar_t))) < 0)
16699 {
16700 long i = longval ();
16701 if (i != ((long) (sizeof (wchar_t))))
16702 exit (1);
16703 fprintf (f, "%ld\n", i);
16704 }
16705 else
16706 {
16707 unsigned long i = ulongval ();
16708 if (i != ((long) (sizeof (wchar_t))))
16709 exit (1);
16710 fprintf (f, "%lu\n", i);
16711 }
16712 exit (ferror (f) || fclose (f) != 0);
16713
16714 ;
16715 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000016716}
Martin v. Löwis11437992002-04-12 09:54:03 +000016717_ACEOF
16718rm -f conftest$ac_exeext
16719if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16720 (eval $ac_link) 2>&5
16721 ac_status=$?
16722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16723 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16724 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16725 (eval $ac_try) 2>&5
16726 ac_status=$?
16727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16728 (exit $ac_status); }; }; then
16729 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000016730else
Martin v. Löwis11437992002-04-12 09:54:03 +000016731 echo "$as_me: program exited with status $ac_status" >&5
16732echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000016733cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016734( exit $ac_status )
Martin v. Löwisf3322282003-07-13 09:46:13 +000016735{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
16736echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016737 { (exit 1); exit 1; }; }
16738fi
Martin v. Löwisf3322282003-07-13 09:46:13 +000016739rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016740fi
16741fi
16742rm -f conftest.val
16743else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016744 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000016745fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016746fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016747echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
16748echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
16749cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016750#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016751_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016752
Michael W. Hudson54241132001-12-07 15:38:26 +000016753
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016754fi
16755
Martin v. Löwis11437992002-04-12 09:54:03 +000016756echo "$as_me:$LINENO: checking what type to use for unicode" >&5
16757echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016758# Check whether --enable-unicode or --disable-unicode was given.
16759if test "${enable_unicode+set}" = set; then
16760 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000016761
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016762else
16763 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000016764fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016765
16766if test $enable_unicode = yes
16767then
Martin v. Löwisfd917792001-06-27 20:22:04 +000016768 # Without any arguments, Py_UNICODE defaults to two-byte mode
16769 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016770fi
16771
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016772
16773
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016774case "$enable_unicode" in
16775ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000016776 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016777#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000016778_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016779
16780 ;;
16781ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000016782 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016783#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000016784_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016785
16786 ;;
16787esac
16788
Michael W. Hudson54241132001-12-07 15:38:26 +000016789
Martin v. Löwis11437992002-04-12 09:54:03 +000016790
16791
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016792
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016793if test "$enable_unicode" = "no"
16794then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016795 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000016796 echo "$as_me:$LINENO: result: not used" >&5
16797echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016798else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016799 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000016800
16801cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016802#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016803_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016804
16805 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
16806 then
16807 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016808
Martin v. Löwis11437992002-04-12 09:54:03 +000016809cat >>confdefs.h <<\_ACEOF
16810#define HAVE_USABLE_WCHAR_T 1
16811_ACEOF
16812
16813 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016814#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016815_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016816
16817 elif test "$ac_cv_sizeof_short" = "$unicode_size"
16818 then
16819 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000016820 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016821#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000016822_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016823
16824 elif test "$ac_cv_sizeof_long" = "$unicode_size"
16825 then
16826 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000016827 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016828#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000016829_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016830
16831 else
16832 PY_UNICODE_TYPE="no type found"
16833 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016834 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
16835echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016836fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016837
16838# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000016839echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
16840echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
16841if test "${ac_cv_c_bigendian+set}" = set; then
16842 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000016843else
Martin v. Löwis11437992002-04-12 09:54:03 +000016844 # See if sys/param.h defines the BYTE_ORDER macro.
16845cat >conftest.$ac_ext <<_ACEOF
16846#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000016847#include "confdefs.h"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016848#include <sys/types.h>
16849#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000016850
Martin v. Löwisf3322282003-07-13 09:46:13 +000016851#ifdef F77_DUMMY_MAIN
16852# ifdef __cplusplus
16853 extern "C"
16854# endif
16855 int F77_DUMMY_MAIN() { return 1; }
16856#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016857int
16858main ()
16859{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016860#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
16861 bogus endian macros
16862#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016863
16864 ;
16865 return 0;
16866}
16867_ACEOF
16868rm -f conftest.$ac_objext
16869if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16870 (eval $ac_compile) 2>&5
16871 ac_status=$?
16872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16873 (exit $ac_status); } &&
16874 { ac_try='test -s conftest.$ac_objext'
16875 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16876 (eval $ac_try) 2>&5
16877 ac_status=$?
16878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16879 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016880 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000016881cat >conftest.$ac_ext <<_ACEOF
16882#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000016883#include "confdefs.h"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016884#include <sys/types.h>
16885#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000016886
Martin v. Löwisf3322282003-07-13 09:46:13 +000016887#ifdef F77_DUMMY_MAIN
16888# ifdef __cplusplus
16889 extern "C"
16890# endif
16891 int F77_DUMMY_MAIN() { return 1; }
16892#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016893int
16894main ()
16895{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016896#if BYTE_ORDER != BIG_ENDIAN
16897 not big endian
16898#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016899
16900 ;
16901 return 0;
16902}
16903_ACEOF
16904rm -f conftest.$ac_objext
16905if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16906 (eval $ac_compile) 2>&5
16907 ac_status=$?
16908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16909 (exit $ac_status); } &&
16910 { ac_try='test -s conftest.$ac_objext'
16911 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16912 (eval $ac_try) 2>&5
16913 ac_status=$?
16914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16915 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016916 ac_cv_c_bigendian=yes
16917else
Martin v. Löwis11437992002-04-12 09:54:03 +000016918 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000016919cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016920ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016921fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016922rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016923else
Martin v. Löwis11437992002-04-12 09:54:03 +000016924 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000016925cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016926# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000016927if test "$cross_compiling" = yes; then
Martin v. Löwisf3322282003-07-13 09:46:13 +000016928 # try to guess the endianess by grep'ing values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000016929 ac_cv_c_bigendian=unknown
16930 cat >conftest.$ac_ext <<_ACEOF
16931#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000016932#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016933short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16934short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16935void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
16936short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16937short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16938void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwisf3322282003-07-13 09:46:13 +000016939#ifdef F77_DUMMY_MAIN
16940# ifdef __cplusplus
16941 extern "C"
16942# endif
16943 int F77_DUMMY_MAIN() { return 1; }
16944#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016945int
16946main ()
16947{
16948 _ascii (); _ebcdic ();
16949 ;
16950 return 0;
16951}
16952_ACEOF
16953rm -f conftest.$ac_objext
16954if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16955 (eval $ac_compile) 2>&5
16956 ac_status=$?
16957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16958 (exit $ac_status); } &&
16959 { ac_try='test -s conftest.$ac_objext'
16960 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16961 (eval $ac_try) 2>&5
16962 ac_status=$?
16963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16964 (exit $ac_status); }; }; then
Martin v. Löwisf3322282003-07-13 09:46:13 +000016965 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016966 ac_cv_c_bigendian=yes
16967fi
Martin v. Löwisf3322282003-07-13 09:46:13 +000016968if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016969 if test "$ac_cv_c_bigendian" = unknown; then
16970 ac_cv_c_bigendian=no
16971 else
16972 # finding both strings is unlikely to happen, but who knows?
16973 ac_cv_c_bigendian=unknown
16974 fi
16975fi
16976else
16977 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000016978cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016979fi
16980rm -f conftest.$ac_objext conftest.$ac_ext
16981else
16982 cat >conftest.$ac_ext <<_ACEOF
16983#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000016984#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016985int
16986main ()
16987{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016988 /* Are we little or big endian? From Harbison&Steele. */
16989 union
16990 {
16991 long l;
16992 char c[sizeof (long)];
16993 } u;
16994 u.l = 1;
16995 exit (u.c[sizeof (long) - 1] == 1);
16996}
Martin v. Löwis11437992002-04-12 09:54:03 +000016997_ACEOF
16998rm -f conftest$ac_exeext
16999if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17000 (eval $ac_link) 2>&5
17001 ac_status=$?
17002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17003 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17004 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17005 (eval $ac_try) 2>&5
17006 ac_status=$?
17007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17008 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017009 ac_cv_c_bigendian=no
17010else
Martin v. Löwis11437992002-04-12 09:54:03 +000017011 echo "$as_me: program exited with status $ac_status" >&5
17012echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000017013cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017014( exit $ac_status )
17015ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000017016fi
Martin v. Löwisf3322282003-07-13 09:46:13 +000017017rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000017018fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017019fi
17020rm -f conftest.$ac_objext conftest.$ac_ext
17021fi
17022echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
17023echo "${ECHO_T}$ac_cv_c_bigendian" >&6
17024case $ac_cv_c_bigendian in
17025 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000017026
Martin v. Löwis11437992002-04-12 09:54:03 +000017027cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000017028#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017029_ACEOF
17030 ;;
17031 no)
17032 ;;
17033 *)
Martin v. Löwisf3322282003-07-13 09:46:13 +000017034 { { echo "$as_me:$LINENO: error: unknown endianess
Martin v. Löwis11437992002-04-12 09:54:03 +000017035presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000017036echo "$as_me: error: unknown endianess
Martin v. Löwis11437992002-04-12 09:54:03 +000017037presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
17038 { (exit 1); exit 1; }; } ;;
17039esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000017040
Michael W. Hudson54241132001-12-07 15:38:26 +000017041
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017042# Check whether right shifting a negative integer extends the sign bit
17043# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000017044echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
17045echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
17046if test "${ac_cv_rshift_extends_sign+set}" = set; then
17047 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000017048else
Martin v. Löwis11437992002-04-12 09:54:03 +000017049
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017050if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017051 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017052else
Martin v. Löwis11437992002-04-12 09:54:03 +000017053 cat >conftest.$ac_ext <<_ACEOF
17054#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000017055#include "confdefs.h"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017056
17057int main()
17058{
Vladimir Marangozova6180282000-07-12 05:05:06 +000017059 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017060}
17061
Martin v. Löwis11437992002-04-12 09:54:03 +000017062_ACEOF
17063rm -f conftest$ac_exeext
17064if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17065 (eval $ac_link) 2>&5
17066 ac_status=$?
17067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17068 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17069 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17070 (eval $ac_try) 2>&5
17071 ac_status=$?
17072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17073 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000017074 ac_cv_rshift_extends_sign=yes
17075else
Martin v. Löwis11437992002-04-12 09:54:03 +000017076 echo "$as_me: program exited with status $ac_status" >&5
17077echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000017078cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017079( exit $ac_status )
17080ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000017081fi
Martin v. Löwisf3322282003-07-13 09:46:13 +000017082rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017083fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000017084fi
17085
Martin v. Löwis11437992002-04-12 09:54:03 +000017086echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
17087echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000017088if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017089then
Martin v. Löwis11437992002-04-12 09:54:03 +000017090
17091cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017092#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017093_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017094
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017095fi
17096
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017097# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017098echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
17099echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
17100if test "${ac_cv_have_getc_unlocked+set}" = set; then
17101 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017102else
Martin v. Löwis11437992002-04-12 09:54:03 +000017103
17104cat >conftest.$ac_ext <<_ACEOF
17105#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000017106#include "confdefs.h"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017107#include <stdio.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +000017108#ifdef F77_DUMMY_MAIN
17109# ifdef __cplusplus
17110 extern "C"
17111# endif
17112 int F77_DUMMY_MAIN() { return 1; }
17113#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017114int
17115main ()
17116{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017117
17118 FILE *f = fopen("/dev/null", "r");
17119 flockfile(f);
17120 getc_unlocked(f);
17121 funlockfile(f);
17122
Martin v. Löwis11437992002-04-12 09:54:03 +000017123 ;
17124 return 0;
17125}
17126_ACEOF
17127rm -f conftest.$ac_objext conftest$ac_exeext
17128if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17129 (eval $ac_link) 2>&5
17130 ac_status=$?
17131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17132 (exit $ac_status); } &&
17133 { ac_try='test -s conftest$ac_exeext'
17134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17135 (eval $ac_try) 2>&5
17136 ac_status=$?
17137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17138 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017139 ac_cv_have_getc_unlocked=yes
17140else
Martin v. Löwis11437992002-04-12 09:54:03 +000017141 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000017142cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017143ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017144fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017145rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017146fi
17147
Martin v. Löwis11437992002-04-12 09:54:03 +000017148echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
17149echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017150if test "$ac_cv_have_getc_unlocked" = yes
17151then
Martin v. Löwis11437992002-04-12 09:54:03 +000017152
17153cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017154#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017155_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017156
17157fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017158
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017159# check for readline 2.2
17160cat >conftest.$ac_ext <<_ACEOF
17161#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000017162#include "confdefs.h"
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017163#include <readline/readline.h>
17164_ACEOF
17165if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17166 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17167 ac_status=$?
Martin v. Löwisf3322282003-07-13 09:46:13 +000017168 egrep -v '^ *\+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017169 rm -f conftest.er1
17170 cat conftest.err >&5
17171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17172 (exit $ac_status); } >/dev/null; then
17173 if test -s conftest.err; then
17174 ac_cpp_err=$ac_c_preproc_warn_flag
17175 else
17176 ac_cpp_err=
17177 fi
17178else
17179 ac_cpp_err=yes
17180fi
17181if test -z "$ac_cpp_err"; then
17182 have_readline=yes
17183else
17184 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000017185 cat conftest.$ac_ext >&5
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017186 have_readline=no
17187fi
17188rm -f conftest.err conftest.$ac_ext
17189if test $have_readline = yes
17190then
17191 cat >conftest.$ac_ext <<_ACEOF
17192#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000017193#include "confdefs.h"
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017194#include <readline/readline.h>
17195
17196_ACEOF
17197if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Martin v. Löwisf3322282003-07-13 09:46:13 +000017198 egrep "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017199
17200cat >>confdefs.h <<\_ACEOF
17201#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
17202_ACEOF
17203
17204fi
17205rm -f conftest*
17206
17207fi
17208
Martin v. Löwis0daad592001-09-30 21:09:59 +000017209# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000017210echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
17211echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
17212if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
17213 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000017214else
Martin v. Löwis11437992002-04-12 09:54:03 +000017215 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000017216LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017217cat >conftest.$ac_ext <<_ACEOF
17218#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000017219#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000017220
Guido van Rossum353ae582001-07-10 16:45:32 +000017221/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017222#ifdef __cplusplus
17223extern "C"
17224#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000017225/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017226 builtin and then its argument prototype would still apply. */
17227char rl_pre_input_hook ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000017228#ifdef F77_DUMMY_MAIN
17229# ifdef __cplusplus
17230 extern "C"
17231# endif
17232 int F77_DUMMY_MAIN() { return 1; }
17233#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017234int
17235main ()
17236{
17237rl_pre_input_hook ();
17238 ;
17239 return 0;
17240}
17241_ACEOF
17242rm -f conftest.$ac_objext conftest$ac_exeext
17243if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17244 (eval $ac_link) 2>&5
17245 ac_status=$?
17246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17247 (exit $ac_status); } &&
17248 { ac_try='test -s conftest$ac_exeext'
17249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17250 (eval $ac_try) 2>&5
17251 ac_status=$?
17252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17253 (exit $ac_status); }; }; then
17254 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000017255else
Martin v. Löwis11437992002-04-12 09:54:03 +000017256 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000017257cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017258ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000017259fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017260rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17261LIBS=$ac_check_lib_save_LIBS
17262fi
17263echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
17264echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
17265if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017266
Martin v. Löwis11437992002-04-12 09:54:03 +000017267cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017268#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017269_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017270
Martin v. Löwis0daad592001-09-30 21:09:59 +000017271fi
17272
Michael W. Hudson54241132001-12-07 15:38:26 +000017273
Martin v. Löwis0daad592001-09-30 21:09:59 +000017274# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000017275echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
17276echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
17277if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
17278 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000017279else
Martin v. Löwis11437992002-04-12 09:54:03 +000017280 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000017281LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017282cat >conftest.$ac_ext <<_ACEOF
17283#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000017284#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000017285
Martin v. Löwis0daad592001-09-30 21:09:59 +000017286/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017287#ifdef __cplusplus
17288extern "C"
17289#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000017290/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017291 builtin and then its argument prototype would still apply. */
17292char rl_completion_matches ();
Martin v. Löwisf3322282003-07-13 09:46:13 +000017293#ifdef F77_DUMMY_MAIN
17294# ifdef __cplusplus
17295 extern "C"
17296# endif
17297 int F77_DUMMY_MAIN() { return 1; }
17298#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017299int
17300main ()
17301{
17302rl_completion_matches ();
17303 ;
17304 return 0;
17305}
17306_ACEOF
17307rm -f conftest.$ac_objext conftest$ac_exeext
17308if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17309 (eval $ac_link) 2>&5
17310 ac_status=$?
17311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17312 (exit $ac_status); } &&
17313 { ac_try='test -s conftest$ac_exeext'
17314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17315 (eval $ac_try) 2>&5
17316 ac_status=$?
17317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17318 (exit $ac_status); }; }; then
17319 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000017320else
Martin v. Löwis11437992002-04-12 09:54:03 +000017321 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000017322cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017323ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000017324fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017325rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17326LIBS=$ac_check_lib_save_LIBS
17327fi
17328echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
17329echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
17330if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017331
Martin v. Löwis11437992002-04-12 09:54:03 +000017332cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017333#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017334_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017335
Guido van Rossum353ae582001-07-10 16:45:32 +000017336fi
17337
Jack Jansendd19cf82001-12-06 22:36:17 +000017338
Martin v. Löwis11437992002-04-12 09:54:03 +000017339echo "$as_me:$LINENO: checking for broken nice()" >&5
17340echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
17341if test "${ac_cv_broken_nice+set}" = set; then
17342 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017343else
Martin v. Löwis11437992002-04-12 09:54:03 +000017344
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017345if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017346 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017347else
Martin v. Löwis11437992002-04-12 09:54:03 +000017348 cat >conftest.$ac_ext <<_ACEOF
17349#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000017350#include "confdefs.h"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017351
17352int main()
17353{
17354 int val1 = nice(1);
17355 if (val1 != -1 && val1 == nice(2))
17356 exit(0);
17357 exit(1);
17358}
17359
Martin v. Löwis11437992002-04-12 09:54:03 +000017360_ACEOF
17361rm -f conftest$ac_exeext
17362if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17363 (eval $ac_link) 2>&5
17364 ac_status=$?
17365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17366 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17367 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17368 (eval $ac_try) 2>&5
17369 ac_status=$?
17370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17371 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017372 ac_cv_broken_nice=yes
17373else
Martin v. Löwis11437992002-04-12 09:54:03 +000017374 echo "$as_me: program exited with status $ac_status" >&5
17375echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000017376cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017377( exit $ac_status )
17378ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017379fi
Martin v. Löwisf3322282003-07-13 09:46:13 +000017380rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017381fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017382fi
17383
Martin v. Löwis11437992002-04-12 09:54:03 +000017384echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
17385echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017386if test "$ac_cv_broken_nice" = yes
17387then
Martin v. Löwis11437992002-04-12 09:54:03 +000017388
17389cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017390#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017391_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017392
17393fi
17394
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017395# tzset(3) exists and works like we expect it to
17396echo "$as_me:$LINENO: checking for working tzset()" >&5
17397echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
17398if test "${ac_cv_working_tzset+set}" = set; then
17399 echo $ECHO_N "(cached) $ECHO_C" >&6
17400else
17401
17402if test "$cross_compiling" = yes; then
17403 ac_cv_working_tzset=no
17404else
17405 cat >conftest.$ac_ext <<_ACEOF
17406#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000017407#include "confdefs.h"
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017408
17409#include <stdlib.h>
17410#include <time.h>
17411int main()
17412{
17413 int gmt_hour;
17414 int eastern_hour;
17415 time_t now;
17416 now = time((time_t*)NULL);
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017417 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017418 tzset();
17419 gmt_hour = localtime(&now)->tm_hour;
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017420 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017421 tzset();
17422 eastern_hour = localtime(&now)->tm_hour;
17423 if (eastern_hour == gmt_hour)
17424 exit(1);
17425 exit(0);
17426}
17427
17428_ACEOF
17429rm -f conftest$ac_exeext
17430if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17431 (eval $ac_link) 2>&5
17432 ac_status=$?
17433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17434 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17435 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17436 (eval $ac_try) 2>&5
17437 ac_status=$?
17438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17439 (exit $ac_status); }; }; then
17440 ac_cv_working_tzset=yes
17441else
17442 echo "$as_me: program exited with status $ac_status" >&5
17443echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000017444cat conftest.$ac_ext >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017445( exit $ac_status )
17446ac_cv_working_tzset=no
17447fi
Martin v. Löwisf3322282003-07-13 09:46:13 +000017448rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017449fi
17450fi
17451
17452echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
17453echo "${ECHO_T}$ac_cv_working_tzset" >&6
17454if test "$ac_cv_working_tzset" = yes
17455then
17456
17457cat >>confdefs.h <<\_ACEOF
17458#define HAVE_WORKING_TZSET 1
17459_ACEOF
17460
17461fi
17462
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017463# Look for subsecond timestamps in struct stat
17464echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
17465echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
17466if test "${ac_cv_stat_tv_nsec+set}" = set; then
17467 echo $ECHO_N "(cached) $ECHO_C" >&6
17468else
17469 cat >conftest.$ac_ext <<_ACEOF
17470#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000017471#include "confdefs.h"
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017472#include <sys/stat.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +000017473#ifdef F77_DUMMY_MAIN
17474# ifdef __cplusplus
17475 extern "C"
17476# endif
17477 int F77_DUMMY_MAIN() { return 1; }
17478#endif
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017479int
17480main ()
17481{
17482
17483struct stat st;
17484st.st_mtim.tv_nsec = 1;
17485
17486 ;
17487 return 0;
17488}
17489_ACEOF
17490rm -f conftest.$ac_objext
17491if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17492 (eval $ac_compile) 2>&5
17493 ac_status=$?
17494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17495 (exit $ac_status); } &&
17496 { ac_try='test -s conftest.$ac_objext'
17497 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17498 (eval $ac_try) 2>&5
17499 ac_status=$?
17500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17501 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000017502 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017503else
17504 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000017505cat conftest.$ac_ext >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017506ac_cv_stat_tv_nsec=no
17507fi
17508rm -f conftest.$ac_objext conftest.$ac_ext
17509fi
17510
17511echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
17512echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
17513if test "$ac_cv_stat_tv_nsec" = yes
17514then
17515
17516cat >>confdefs.h <<\_ACEOF
17517#define HAVE_STAT_TV_NSEC 1
17518_ACEOF
17519
17520fi
17521
Jack Jansen666b1e72001-10-31 12:11:48 +000017522# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000017523echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
17524echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
17525if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
17526 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017527else
Martin v. Löwis11437992002-04-12 09:54:03 +000017528 cat >conftest.$ac_ext <<_ACEOF
17529#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000017530#include "confdefs.h"
Jack Jansen666b1e72001-10-31 12:11:48 +000017531#include <curses.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +000017532#ifdef F77_DUMMY_MAIN
17533# ifdef __cplusplus
17534 extern "C"
17535# endif
17536 int F77_DUMMY_MAIN() { return 1; }
17537#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017538int
17539main ()
17540{
Jack Jansen666b1e72001-10-31 12:11:48 +000017541
17542 int rtn;
17543 rtn = mvwdelch(0,0,0);
17544
Martin v. Löwis11437992002-04-12 09:54:03 +000017545 ;
17546 return 0;
17547}
17548_ACEOF
17549rm -f conftest.$ac_objext
17550if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17551 (eval $ac_compile) 2>&5
17552 ac_status=$?
17553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17554 (exit $ac_status); } &&
17555 { ac_try='test -s conftest.$ac_objext'
17556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17557 (eval $ac_try) 2>&5
17558 ac_status=$?
17559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17560 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017561 ac_cv_mvwdelch_is_expression=yes
17562else
Martin v. Löwis11437992002-04-12 09:54:03 +000017563 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000017564cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017565ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017566fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017567rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017568fi
17569
Martin v. Löwis11437992002-04-12 09:54:03 +000017570echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
17571echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017572
17573if test "$ac_cv_mvwdelch_is_expression" = yes
17574then
Martin v. Löwis11437992002-04-12 09:54:03 +000017575
17576cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017577#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017578_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017579
17580fi
17581
Martin v. Löwis11437992002-04-12 09:54:03 +000017582echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
17583echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
17584if test "${ac_cv_window_has_flags+set}" = set; then
17585 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017586else
Martin v. Löwis11437992002-04-12 09:54:03 +000017587 cat >conftest.$ac_ext <<_ACEOF
17588#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000017589#include "confdefs.h"
Jack Jansen666b1e72001-10-31 12:11:48 +000017590#include <curses.h>
Martin v. Löwisf3322282003-07-13 09:46:13 +000017591#ifdef F77_DUMMY_MAIN
17592# ifdef __cplusplus
17593 extern "C"
17594# endif
17595 int F77_DUMMY_MAIN() { return 1; }
17596#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017597int
17598main ()
17599{
Jack Jansen666b1e72001-10-31 12:11:48 +000017600
17601 WINDOW *w;
17602 w->_flags = 0;
17603
Martin v. Löwis11437992002-04-12 09:54:03 +000017604 ;
17605 return 0;
17606}
17607_ACEOF
17608rm -f conftest.$ac_objext
17609if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17610 (eval $ac_compile) 2>&5
17611 ac_status=$?
17612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17613 (exit $ac_status); } &&
17614 { ac_try='test -s conftest.$ac_objext'
17615 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17616 (eval $ac_try) 2>&5
17617 ac_status=$?
17618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17619 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017620 ac_cv_window_has_flags=yes
17621else
Martin v. Löwis11437992002-04-12 09:54:03 +000017622 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000017623cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017624ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017625fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017626rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017627fi
17628
Martin v. Löwis11437992002-04-12 09:54:03 +000017629echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
17630echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017631
Jack Jansen666b1e72001-10-31 12:11:48 +000017632
17633if test "$ac_cv_window_has_flags" = yes
17634then
Martin v. Löwis11437992002-04-12 09:54:03 +000017635
17636cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017637#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017638_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017639
17640fi
17641
Martin v. Löwis24a880b2002-12-31 12:55:15 +000017642echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
17643echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
17644
17645if test -e /dev/ptmx
17646then
17647 echo "$as_me:$LINENO: result: yes" >&5
17648echo "${ECHO_T}yes" >&6
17649
17650cat >>confdefs.h <<\_ACEOF
17651#define HAVE_DEV_PTMX 1
17652_ACEOF
17653
17654else
17655 echo "$as_me:$LINENO: result: no" >&5
17656echo "${ECHO_T}no" >&6
17657fi
17658
Neal Norwitz865400f2003-03-21 01:42:58 +000017659echo "$as_me:$LINENO: checking for /dev/ptc" >&5
17660echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
17661
17662if test -e /dev/ptc
17663then
17664 echo "$as_me:$LINENO: result: yes" >&5
17665echo "${ECHO_T}yes" >&6
17666
17667cat >>confdefs.h <<\_ACEOF
17668#define HAVE_DEV_PTC 1
17669_ACEOF
17670
17671else
17672 echo "$as_me:$LINENO: result: no" >&5
17673echo "${ECHO_T}no" >&6
17674fi
17675
Martin v. Löwis11437992002-04-12 09:54:03 +000017676echo "$as_me:$LINENO: checking for socklen_t" >&5
17677echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
17678if test "${ac_cv_type_socklen_t+set}" = set; then
17679 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000017680else
Martin v. Löwis11437992002-04-12 09:54:03 +000017681 cat >conftest.$ac_ext <<_ACEOF
17682#line $LINENO "configure"
Martin v. Löwisf3322282003-07-13 09:46:13 +000017683#include "confdefs.h"
Martin v. Löwis01c04012002-11-11 14:58:44 +000017684
17685#ifdef HAVE_SYS_TYPES_H
17686#include <sys/types.h>
17687#endif
17688#ifdef HAVE_SYS_SOCKET_H
17689#include <sys/socket.h>
17690#endif
17691
17692
Martin v. Löwisf3322282003-07-13 09:46:13 +000017693#ifdef F77_DUMMY_MAIN
17694# ifdef __cplusplus
17695 extern "C"
17696# endif
17697 int F77_DUMMY_MAIN() { return 1; }
17698#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017699int
17700main ()
17701{
17702if ((socklen_t *) 0)
17703 return 0;
17704if (sizeof (socklen_t))
17705 return 0;
17706 ;
17707 return 0;
17708}
17709_ACEOF
17710rm -f conftest.$ac_objext
17711if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17712 (eval $ac_compile) 2>&5
17713 ac_status=$?
17714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17715 (exit $ac_status); } &&
17716 { ac_try='test -s conftest.$ac_objext'
17717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17718 (eval $ac_try) 2>&5
17719 ac_status=$?
17720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17721 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000017722 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000017723else
Martin v. Löwis11437992002-04-12 09:54:03 +000017724 echo "$as_me: failed program was:" >&5
Martin v. Löwisf3322282003-07-13 09:46:13 +000017725cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017726ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000017727fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017728rm -f conftest.$ac_objext conftest.$ac_ext
17729fi
17730echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
17731echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
17732if test $ac_cv_type_socklen_t = yes; then
17733 :
17734else
Guido van Rossum95713eb2000-05-18 20:53:31 +000017735
Martin v. Löwis01c04012002-11-11 14:58:44 +000017736cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017737#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000017738_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017739
17740fi
17741
Michael W. Hudson54241132001-12-07 15:38:26 +000017742
Michael W. Hudson54241132001-12-07 15:38:26 +000017743
17744
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000017745for h in `(cd $srcdir;echo Python/thread_*.h)`
17746do
17747 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
17748done
17749
Michael W. Hudson54241132001-12-07 15:38:26 +000017750
Jack Jansen0b06be72002-06-21 14:48:38 +000017751SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000017752echo "$as_me:$LINENO: checking for build directories" >&5
17753echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017754for dir in $SRCDIRS; do
17755 if test ! -d $dir; then
17756 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000017757 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017758done
Martin v. Löwis11437992002-04-12 09:54:03 +000017759echo "$as_me:$LINENO: result: done" >&5
17760echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000017761
Guido van Rossum627b2d71993-12-24 10:39:16 +000017762# generate output files
Martin v. Löwisf3322282003-07-13 09:46:13 +000017763ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017764
Martin v. Löwis11437992002-04-12 09:54:03 +000017765cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017766# This file is a shell script that caches the results of configure
17767# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017768# scripts and configure runs, see configure's option --config-cache.
17769# It is not useful on other systems. If it contains results you don't
17770# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017771#
Martin v. Löwis11437992002-04-12 09:54:03 +000017772# config.status only pays attention to the cache file if you give it
17773# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017774#
Martin v. Löwisf3322282003-07-13 09:46:13 +000017775# `ac_cv_env_foo' variables (set or unset) will be overriden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017776# loading this file, other *unset* `ac_cv_foo' will be assigned the
17777# following values.
17778
17779_ACEOF
17780
Guido van Rossumf78abae1997-01-21 22:02:36 +000017781# The following way of writing the cache mishandles newlines in values,
17782# but we know of no workaround that is simple, portable, and efficient.
17783# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017784# Ultrix sh set writes to stderr and can't be redirected directly,
17785# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000017786{
17787 (set) 2>&1 |
17788 case `(ac_space=' '; set | grep ac_space) 2>&1` in
17789 *ac_space=\ *)
17790 # `set' does not quote correctly, so add quotes (double-quote
17791 # substitution turns \\\\ into \\, and sed turns \\ into \).
17792 sed -n \
17793 "s/'/'\\\\''/g;
17794 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17795 ;;
17796 *)
17797 # `set' quotes correctly as required by POSIX, so do not add quotes.
17798 sed -n \
17799 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17800 ;;
17801 esac;
17802} |
17803 sed '
17804 t clear
17805 : clear
17806 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17807 t end
17808 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17809 : end' >>confcache
Martin v. Löwisf3322282003-07-13 09:46:13 +000017810if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017811 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017812 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17813 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017814 else
17815 echo "not updating unwritable cache $cache_file"
17816 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017817fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017818rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017819
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017820test "x$prefix" = xNONE && prefix=$ac_default_prefix
17821# Let make expand exec_prefix.
17822test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017823
Martin v. Löwis11437992002-04-12 09:54:03 +000017824# VPATH may cause trouble with some makes, so we remove $(srcdir),
17825# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17826# trailing colons and then remove the whole line if VPATH becomes empty
17827# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000017828if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017829 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17830s/:*\$(srcdir):*/:/;
17831s/:*\${srcdir}:*/:/;
17832s/:*@srcdir@:*/:/;
17833s/^\([^=]*=[ ]*\):*/\1/;
17834s/:*$//;
17835s/^[^=]*=[ ]*$//;
17836}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017837fi
17838
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017839DEFS=-DHAVE_CONFIG_H
17840
Martin v. Löwis11437992002-04-12 09:54:03 +000017841
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017842: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000017843ac_clean_files_save=$ac_clean_files
17844ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17845{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
17846echo "$as_me: creating $CONFIG_STATUS" >&6;}
17847cat >$CONFIG_STATUS <<_ACEOF
17848#! $SHELL
17849# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017850# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017851# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017852# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017853
Martin v. Löwis11437992002-04-12 09:54:03 +000017854debug=false
17855SHELL=\${CONFIG_SHELL-$SHELL}
17856_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000017857
Martin v. Löwis11437992002-04-12 09:54:03 +000017858cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwisf3322282003-07-13 09:46:13 +000017859
Martin v. Löwis11437992002-04-12 09:54:03 +000017860## --------------------- ##
17861## M4sh Initialization. ##
17862## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017863
Martin v. Löwis11437992002-04-12 09:54:03 +000017864# Be Bourne compatible
17865if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17866 emulate sh
17867 NULLCMD=:
17868elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17869 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000017870fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017871
Martin v. Löwisf3322282003-07-13 09:46:13 +000017872# NLS nuisances.
Martin v. Löwis11437992002-04-12 09:54:03 +000017873# Support unset when possible.
17874if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17875 as_unset=unset
17876else
17877 as_unset=false
17878fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017879
Martin v. Löwisf3322282003-07-13 09:46:13 +000017880(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
17881 { $as_unset LANG || test "${LANG+set}" != set; } ||
17882 { LANG=C; export LANG; }
17883(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
17884 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
17885 { LC_ALL=C; export LC_ALL; }
17886(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
17887 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
17888 { LC_TIME=C; export LC_TIME; }
17889(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
17890 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
17891 { LC_CTYPE=C; export LC_CTYPE; }
17892(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
17893 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
17894 { LANGUAGE=C; export LANGUAGE; }
17895(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
17896 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
17897 { LC_COLLATE=C; export LC_COLLATE; }
17898(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
17899 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
17900 { LC_NUMERIC=C; export LC_NUMERIC; }
17901(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
17902 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
17903 { LC_MESSAGES=C; export LC_MESSAGES; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017904
17905
17906# Name of the executable.
Martin v. Löwisf3322282003-07-13 09:46:13 +000017907as_me=`(basename "$0") 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017908$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17909 X"$0" : 'X\(//\)$' \| \
17910 X"$0" : 'X\(/\)$' \| \
17911 . : '\(.\)' 2>/dev/null ||
17912echo X/"$0" |
17913 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
17914 /^X\/\(\/\/\)$/{ s//\1/; q; }
17915 /^X\/\(\/\).*/{ s//\1/; q; }
17916 s/.*/./; q'`
17917
17918# PATH needs CR, and LINENO needs CR and PATH.
17919# Avoid depending upon Character Ranges.
17920as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17921as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17922as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17923as_cr_digits='0123456789'
17924as_cr_alnum=$as_cr_Letters$as_cr_digits
17925
17926# The user is always right.
17927if test "${PATH_SEPARATOR+set}" != set; then
Martin v. Löwisf3322282003-07-13 09:46:13 +000017928 echo "#! /bin/sh" >conftest.sh
17929 echo "exit 0" >>conftest.sh
17930 chmod +x conftest.sh
17931 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017932 PATH_SEPARATOR=';'
17933 else
17934 PATH_SEPARATOR=:
17935 fi
Martin v. Löwisf3322282003-07-13 09:46:13 +000017936 rm -f conftest.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000017937fi
17938
17939
17940 as_lineno_1=$LINENO
17941 as_lineno_2=$LINENO
17942 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17943 test "x$as_lineno_1" != "x$as_lineno_2" &&
17944 test "x$as_lineno_3" = "x$as_lineno_2" || {
17945 # Find who we are. Look in the path if we contain no path at all
17946 # relative or not.
17947 case $0 in
17948 *[\\/]* ) as_myself=$0 ;;
17949 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17950for as_dir in $PATH
17951do
17952 IFS=$as_save_IFS
17953 test -z "$as_dir" && as_dir=.
17954 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17955done
17956
17957 ;;
17958 esac
17959 # We did not find ourselves, most probably we were run as `sh COMMAND'
17960 # in which case we are not to be found in the path.
17961 if test "x$as_myself" = x; then
17962 as_myself=$0
17963 fi
17964 if test ! -f "$as_myself"; then
17965 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
17966echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
17967 { (exit 1); exit 1; }; }
17968 fi
17969 case $CONFIG_SHELL in
17970 '')
17971 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17972for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
17973do
17974 IFS=$as_save_IFS
17975 test -z "$as_dir" && as_dir=.
17976 for as_base in sh bash ksh sh5; do
17977 case $as_dir in
17978 /*)
17979 if ("$as_dir/$as_base" -c '
17980 as_lineno_1=$LINENO
17981 as_lineno_2=$LINENO
17982 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17983 test "x$as_lineno_1" != "x$as_lineno_2" &&
17984 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
17985 CONFIG_SHELL=$as_dir/$as_base
17986 export CONFIG_SHELL
17987 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
17988 fi;;
17989 esac
17990 done
17991done
17992;;
Jack Jansendd19cf82001-12-06 22:36:17 +000017993 esac
17994
Martin v. Löwis11437992002-04-12 09:54:03 +000017995 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
17996 # uniformly replaced by the line number. The first 'sed' inserts a
17997 # line-number line before each line; the second 'sed' does the real
17998 # work. The second script uses 'N' to pair each line-number line
17999 # with the numbered line, and appends trailing '-' during
18000 # substitution so that $LINENO is not a special case at line end.
18001 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
18002 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
18003 sed '=' <$as_myself |
18004 sed '
18005 N
18006 s,$,-,
18007 : loop
18008 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
18009 t loop
18010 s,-$,,
18011 s,^['$as_cr_digits']*\n,,
18012 ' >$as_me.lineno &&
18013 chmod +x $as_me.lineno ||
18014 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
18015echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
18016 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018017
Martin v. Löwis11437992002-04-12 09:54:03 +000018018 # Don't try to exec as it changes $[0], causing all sort of problems
18019 # (the dirname of $[0] is not the place where we might find the
18020 # original and so on. Autoconf is especially sensible to this).
18021 . ./$as_me.lineno
18022 # Exit status is that of the last command.
18023 exit
18024}
18025
18026
18027case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
18028 *c*,-n*) ECHO_N= ECHO_C='
18029' ECHO_T=' ' ;;
18030 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
18031 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
18032esac
18033
18034if expr a : '\(a\)' >/dev/null 2>&1; then
18035 as_expr=expr
18036else
18037 as_expr=false
18038fi
18039
18040rm -f conf$$ conf$$.exe conf$$.file
18041echo >conf$$.file
18042if ln -s conf$$.file conf$$ 2>/dev/null; then
18043 # We could just check for DJGPP; but this test a) works b) is more generic
18044 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18045 if test -f conf$$.exe; then
18046 # Don't use ln at all; we don't have any links
18047 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018048 else
Martin v. Löwis11437992002-04-12 09:54:03 +000018049 as_ln_s='ln -s'
18050 fi
18051elif ln conf$$.file conf$$ 2>/dev/null; then
18052 as_ln_s=ln
18053else
18054 as_ln_s='cp -p'
18055fi
18056rm -f conf$$ conf$$.exe conf$$.file
18057
18058as_executable_p="test -f"
18059
18060# Sed expression to map a string onto a valid CPP name.
18061as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
18062
18063# Sed expression to map a string onto a valid variable name.
18064as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
18065
18066
18067# IFS
18068# We need space, tab and new line, in precisely that order.
18069as_nl='
18070'
18071IFS=" $as_nl"
18072
18073# CDPATH.
Martin v. Löwisf3322282003-07-13 09:46:13 +000018074$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018075
18076exec 6>&1
18077
18078# Open the log real soon, to keep \$[0] and so on meaningful, and to
18079# report actual input values of CONFIG_FILES etc. instead of their
18080# values after options handling. Logging --version etc. is OK.
18081exec 5>>config.log
18082{
18083 echo
18084 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18085## Running $as_me. ##
18086_ASBOX
18087} >&5
18088cat >&5 <<_CSEOF
18089
Martin v. Löwis88afe662002-10-26 13:47:44 +000018090This file was extended by python $as_me 2.3, which was
Martin v. Löwisf3322282003-07-13 09:46:13 +000018091generated by GNU Autoconf 2.53. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018092
18093 CONFIG_FILES = $CONFIG_FILES
18094 CONFIG_HEADERS = $CONFIG_HEADERS
18095 CONFIG_LINKS = $CONFIG_LINKS
18096 CONFIG_COMMANDS = $CONFIG_COMMANDS
18097 $ $0 $@
18098
18099_CSEOF
18100echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
18101echo >&5
18102_ACEOF
18103
18104# Files that config.status was made for.
18105if test -n "$ac_config_files"; then
18106 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18107fi
18108
18109if test -n "$ac_config_headers"; then
18110 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18111fi
18112
18113if test -n "$ac_config_links"; then
18114 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18115fi
18116
18117if test -n "$ac_config_commands"; then
18118 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18119fi
18120
18121cat >>$CONFIG_STATUS <<\_ACEOF
18122
18123ac_cs_usage="\
18124\`$as_me' instantiates files from templates according to the
18125current configuration.
18126
18127Usage: $0 [OPTIONS] [FILE]...
18128
18129 -h, --help print this help, then exit
18130 -V, --version print version number, then exit
18131 -d, --debug don't remove temporary files
18132 --recheck update $as_me by reconfiguring in the same conditions
18133 --file=FILE[:TEMPLATE]
18134 instantiate the configuration file FILE
18135 --header=FILE[:TEMPLATE]
18136 instantiate the configuration header FILE
18137
18138Configuration files:
18139$config_files
18140
18141Configuration headers:
18142$config_headers
18143
18144Report bugs to <bug-autoconf@gnu.org>."
18145_ACEOF
18146
18147cat >>$CONFIG_STATUS <<_ACEOF
18148ac_cs_version="\\
Martin v. Löwis88afe662002-10-26 13:47:44 +000018149python config.status 2.3
Martin v. Löwisf3322282003-07-13 09:46:13 +000018150configured by $0, generated by GNU Autoconf 2.53,
Martin v. Löwis11437992002-04-12 09:54:03 +000018151 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18152
18153Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18154Free Software Foundation, Inc.
18155This config.status script is free software; the Free Software Foundation
18156gives unlimited permission to copy, distribute and modify it."
18157srcdir=$srcdir
18158INSTALL="$INSTALL"
18159_ACEOF
18160
18161cat >>$CONFIG_STATUS <<\_ACEOF
18162# If no file are specified by the user, then we need to provide default
18163# value. By we need to know if files were specified by the user.
18164ac_need_defaults=:
18165while test $# != 0
18166do
18167 case $1 in
18168 --*=*)
18169 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18170 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Martin v. Löwisf3322282003-07-13 09:46:13 +000018171 shift
18172 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18173 shift
Martin v. Löwis11437992002-04-12 09:54:03 +000018174 ;;
Martin v. Löwisf3322282003-07-13 09:46:13 +000018175 -*);;
Martin v. Löwis11437992002-04-12 09:54:03 +000018176 *) # This is not an option, so the user has probably given explicit
18177 # arguments.
18178 ac_need_defaults=false;;
18179 esac
18180
Martin v. Löwisf3322282003-07-13 09:46:13 +000018181 case $1 in
Martin v. Löwis11437992002-04-12 09:54:03 +000018182 # Handling of the options.
18183_ACEOF
Martin v. Löwisf3322282003-07-13 09:46:13 +000018184cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanarod8d39a02003-07-10 20:44:10 +000018185 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Martin v. Löwisf3322282003-07-13 09:46:13 +000018186 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18187 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18188_ACEOF
18189cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018190 --version | --vers* | -V )
18191 echo "$ac_cs_version"; exit 0 ;;
18192 --he | --h)
18193 # Conflict between --help and --header
18194 { { echo "$as_me:$LINENO: error: ambiguous option: $1
18195Try \`$0 --help' for more information." >&5
18196echo "$as_me: error: ambiguous option: $1
18197Try \`$0 --help' for more information." >&2;}
18198 { (exit 1); exit 1; }; };;
18199 --help | --hel | -h )
18200 echo "$ac_cs_usage"; exit 0 ;;
18201 --debug | --d* | -d )
18202 debug=: ;;
18203 --file | --fil | --fi | --f )
Martin v. Löwisf3322282003-07-13 09:46:13 +000018204 shift
18205 CONFIG_FILES="$CONFIG_FILES $1"
Martin v. Löwis11437992002-04-12 09:54:03 +000018206 ac_need_defaults=false;;
18207 --header | --heade | --head | --hea )
Martin v. Löwisf3322282003-07-13 09:46:13 +000018208 shift
18209 CONFIG_HEADERS="$CONFIG_HEADERS $1"
Martin v. Löwis11437992002-04-12 09:54:03 +000018210 ac_need_defaults=false;;
18211
18212 # This is an error.
18213 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
18214Try \`$0 --help' for more information." >&5
18215echo "$as_me: error: unrecognized option: $1
18216Try \`$0 --help' for more information." >&2;}
18217 { (exit 1); exit 1; }; } ;;
18218
18219 *) ac_config_targets="$ac_config_targets $1" ;;
18220
18221 esac
18222 shift
18223done
18224
18225_ACEOF
18226
18227
18228
18229
18230
18231cat >>$CONFIG_STATUS <<\_ACEOF
18232for ac_config_target in $ac_config_targets
18233do
18234 case "$ac_config_target" in
18235 # Handling of arguments.
18236 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
18237 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
18238 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18239 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
18240echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18241 { (exit 1); exit 1; }; };;
18242 esac
18243done
18244
18245# If the user did not use the arguments to specify the items to instantiate,
18246# then the envvar interface is used. Set only those that are not.
18247# We use the long form for the default assignment because of an extremely
18248# bizarre bug on SunOS 4.1.3.
18249if $ac_need_defaults; then
18250 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18251 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18252fi
18253
18254# Create a temporary directory, and hook for its removal unless debugging.
18255$debug ||
18256{
18257 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18258 trap '{ (exit 1); exit 1; }' 1 2 13 15
18259}
18260
18261# Create a (secure) tmp directory for tmp files.
Martin v. Löwisf3322282003-07-13 09:46:13 +000018262: ${TMPDIR=/tmp}
Martin v. Löwis11437992002-04-12 09:54:03 +000018263{
Martin v. Löwisf3322282003-07-13 09:46:13 +000018264 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018265 test -n "$tmp" && test -d "$tmp"
18266} ||
18267{
Martin v. Löwisf3322282003-07-13 09:46:13 +000018268 tmp=$TMPDIR/cs$$-$RANDOM
Martin v. Löwis11437992002-04-12 09:54:03 +000018269 (umask 077 && mkdir $tmp)
18270} ||
18271{
Martin v. Löwisf3322282003-07-13 09:46:13 +000018272 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000018273 { (exit 1); exit 1; }
18274}
18275
18276_ACEOF
18277
18278cat >>$CONFIG_STATUS <<_ACEOF
18279
18280#
18281# CONFIG_FILES section.
18282#
18283
18284# No need to generate the scripts if there are no CONFIG_FILES.
18285# This happens for instance when ./config.status config.h
18286if test -n "\$CONFIG_FILES"; then
18287 # Protect against being on the right side of a sed subst in config.status.
18288 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18289 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18290s,@SHELL@,$SHELL,;t t
18291s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18292s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18293s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18294s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18295s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18296s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18297s,@exec_prefix@,$exec_prefix,;t t
18298s,@prefix@,$prefix,;t t
18299s,@program_transform_name@,$program_transform_name,;t t
18300s,@bindir@,$bindir,;t t
18301s,@sbindir@,$sbindir,;t t
18302s,@libexecdir@,$libexecdir,;t t
18303s,@datadir@,$datadir,;t t
18304s,@sysconfdir@,$sysconfdir,;t t
18305s,@sharedstatedir@,$sharedstatedir,;t t
18306s,@localstatedir@,$localstatedir,;t t
18307s,@libdir@,$libdir,;t t
18308s,@includedir@,$includedir,;t t
18309s,@oldincludedir@,$oldincludedir,;t t
18310s,@infodir@,$infodir,;t t
18311s,@mandir@,$mandir,;t t
18312s,@build_alias@,$build_alias,;t t
18313s,@host_alias@,$host_alias,;t t
18314s,@target_alias@,$target_alias,;t t
18315s,@DEFS@,$DEFS,;t t
18316s,@ECHO_C@,$ECHO_C,;t t
18317s,@ECHO_N@,$ECHO_N,;t t
18318s,@ECHO_T@,$ECHO_T,;t t
18319s,@LIBS@,$LIBS,;t t
18320s,@VERSION@,$VERSION,;t t
18321s,@SOVERSION@,$SOVERSION,;t t
18322s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
18323s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
18324s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
18325s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
18326s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
18327s,@MACHDEP@,$MACHDEP,;t t
18328s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000018329s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000018330s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018331s,@CXX@,$CXX,;t t
18332s,@MAINOBJ@,$MAINOBJ,;t t
18333s,@EXEEXT@,$EXEEXT,;t t
18334s,@CC@,$CC,;t t
18335s,@CFLAGS@,$CFLAGS,;t t
18336s,@LDFLAGS@,$LDFLAGS,;t t
18337s,@CPPFLAGS@,$CPPFLAGS,;t t
18338s,@ac_ct_CC@,$ac_ct_CC,;t t
18339s,@OBJEXT@,$OBJEXT,;t t
18340s,@CPP@,$CPP,;t t
18341s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
18342s,@LIBRARY@,$LIBRARY,;t t
18343s,@LDLIBRARY@,$LDLIBRARY,;t t
18344s,@DLLLIBRARY@,$DLLLIBRARY,;t t
18345s,@BLDLIBRARY@,$BLDLIBRARY,;t t
18346s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
18347s,@INSTSONAME@,$INSTSONAME,;t t
18348s,@RUNSHARED@,$RUNSHARED,;t t
18349s,@LINKCC@,$LINKCC,;t t
18350s,@RANLIB@,$RANLIB,;t t
18351s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18352s,@AR@,$AR,;t t
18353s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18354s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18355s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18356s,@LN@,$LN,;t t
18357s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000018358s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018359s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
18360s,@SO@,$SO,;t t
18361s,@LDSHARED@,$LDSHARED,;t t
18362s,@BLDSHARED@,$BLDSHARED,;t t
18363s,@CCSHARED@,$CCSHARED,;t t
18364s,@LINKFORSHARED@,$LINKFORSHARED,;t t
18365s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018366s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018367s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
18368s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
18369s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
18370s,@LDLAST@,$LDLAST,;t t
18371s,@THREADOBJ@,$THREADOBJ,;t t
18372s,@DLINCLDIR@,$DLINCLDIR,;t t
18373s,@DYNLOADFILE@,$DYNLOADFILE,;t t
18374s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018375s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018376s,@LIBOBJS@,$LIBOBJS,;t t
18377s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
18378s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
18379s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
18380s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
18381s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
18382s,@LIBM@,$LIBM,;t t
18383s,@LIBC@,$LIBC,;t t
18384s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
18385s,@THREADHEADERS@,$THREADHEADERS,;t t
18386s,@SRCDIRS@,$SRCDIRS,;t t
18387CEOF
18388
18389_ACEOF
18390
18391 cat >>$CONFIG_STATUS <<\_ACEOF
18392 # Split the substitutions into bite-sized pieces for seds with
18393 # small command number limits, like on Digital OSF/1 and HP-UX.
18394 ac_max_sed_lines=48
18395 ac_sed_frag=1 # Number of current file.
18396 ac_beg=1 # First line for current file.
18397 ac_end=$ac_max_sed_lines # Line after last line for current file.
18398 ac_more_lines=:
18399 ac_sed_cmds=
18400 while $ac_more_lines; do
18401 if test $ac_beg -gt 1; then
18402 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18403 else
18404 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18405 fi
18406 if test ! -s $tmp/subs.frag; then
18407 ac_more_lines=false
18408 else
18409 # The purpose of the label and of the branching condition is to
18410 # speed up the sed processing (if there are no `@' at all, there
18411 # is no need to browse any of the substitutions).
18412 # These are the two extra sed commands mentioned above.
18413 (echo ':t
18414 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18415 if test -z "$ac_sed_cmds"; then
18416 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18417 else
18418 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18419 fi
18420 ac_sed_frag=`expr $ac_sed_frag + 1`
18421 ac_beg=$ac_end
18422 ac_end=`expr $ac_end + $ac_max_sed_lines`
18423 fi
18424 done
18425 if test -z "$ac_sed_cmds"; then
18426 ac_sed_cmds=cat
18427 fi
18428fi # test -n "$CONFIG_FILES"
18429
18430_ACEOF
18431cat >>$CONFIG_STATUS <<\_ACEOF
18432for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18433 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18434 case $ac_file in
18435 - | *:- | *:-:* ) # input from stdin
18436 cat >$tmp/stdin
18437 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18438 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18439 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18440 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18441 * ) ac_file_in=$ac_file.in ;;
18442 esac
18443
18444 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18445 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18446$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18447 X"$ac_file" : 'X\(//\)[^/]' \| \
18448 X"$ac_file" : 'X\(//\)$' \| \
18449 X"$ac_file" : 'X\(/\)' \| \
18450 . : '\(.\)' 2>/dev/null ||
18451echo X"$ac_file" |
18452 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18453 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18454 /^X\(\/\/\)$/{ s//\1/; q; }
18455 /^X\(\/\).*/{ s//\1/; q; }
18456 s/.*/./; q'`
Martin v. Löwisf3322282003-07-13 09:46:13 +000018457 { case "$ac_dir" in
18458 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18459 *) as_incr_dir=.;;
18460esac
18461as_dummy="$ac_dir"
18462for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18463 case $as_mkdir_dir in
18464 # Skip DOS drivespec
18465 ?:) as_incr_dir=$as_mkdir_dir ;;
18466 *)
18467 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18468 test -d "$as_incr_dir" ||
18469 mkdir "$as_incr_dir" ||
18470 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18471echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18472 { (exit 1); exit 1; }; }
18473 ;;
18474 esac
18475done; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018476
18477 ac_builddir=.
18478
18479if test "$ac_dir" != .; then
18480 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18481 # A "../" for each directory in $ac_dir_suffix.
18482 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18483else
18484 ac_dir_suffix= ac_top_builddir=
18485fi
18486
18487case $srcdir in
18488 .) # No --srcdir option. We are building in place.
18489 ac_srcdir=.
18490 if test -z "$ac_top_builddir"; then
18491 ac_top_srcdir=.
18492 else
18493 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18494 fi ;;
18495 [\\/]* | ?:[\\/]* ) # Absolute path.
18496 ac_srcdir=$srcdir$ac_dir_suffix;
18497 ac_top_srcdir=$srcdir ;;
18498 *) # Relative path.
18499 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18500 ac_top_srcdir=$ac_top_builddir$srcdir ;;
18501esac
18502# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18503# absolute.
18504ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwisd6640d42003-07-06 09:29:52 +000018505ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000018506ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18507ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18508
18509
18510 case $INSTALL in
18511 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18512 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
18513 esac
18514
18515 if test x"$ac_file" != x-; then
18516 { echo "$as_me:$LINENO: creating $ac_file" >&5
18517echo "$as_me: creating $ac_file" >&6;}
18518 rm -f "$ac_file"
18519 fi
18520 # Let's still pretend it is `configure' which instantiates (i.e., don't
18521 # use $as_me), people would be surprised to read:
18522 # /* config.h. Generated by config.status. */
18523 if test x"$ac_file" = x-; then
18524 configure_input=
18525 else
18526 configure_input="$ac_file. "
18527 fi
18528 configure_input=$configure_input"Generated from `echo $ac_file_in |
18529 sed 's,.*/,,'` by configure."
18530
18531 # First look for the input files in the build tree, otherwise in the
18532 # src tree.
18533 ac_file_inputs=`IFS=:
18534 for f in $ac_file_in; do
18535 case $f in
18536 -) echo $tmp/stdin ;;
18537 [\\/$]*)
18538 # Absolute (can't be DOS-style, as IFS=:)
18539 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18540echo "$as_me: error: cannot find input file: $f" >&2;}
18541 { (exit 1); exit 1; }; }
18542 echo $f;;
18543 *) # Relative
18544 if test -f "$f"; then
18545 # Build tree
18546 echo $f
18547 elif test -f "$srcdir/$f"; then
18548 # Source tree
18549 echo $srcdir/$f
18550 else
18551 # /dev/null tree
18552 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18553echo "$as_me: error: cannot find input file: $f" >&2;}
18554 { (exit 1); exit 1; }; }
18555 fi;;
18556 esac
18557 done` || { (exit 1); exit 1; }
18558_ACEOF
18559cat >>$CONFIG_STATUS <<_ACEOF
18560 sed "$ac_vpsub
18561$extrasub
18562_ACEOF
18563cat >>$CONFIG_STATUS <<\_ACEOF
18564:t
18565/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18566s,@configure_input@,$configure_input,;t t
18567s,@srcdir@,$ac_srcdir,;t t
18568s,@abs_srcdir@,$ac_abs_srcdir,;t t
18569s,@top_srcdir@,$ac_top_srcdir,;t t
18570s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18571s,@builddir@,$ac_builddir,;t t
18572s,@abs_builddir@,$ac_abs_builddir,;t t
18573s,@top_builddir@,$ac_top_builddir,;t t
18574s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
18575s,@INSTALL@,$ac_INSTALL,;t t
18576" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18577 rm -f $tmp/stdin
18578 if test x"$ac_file" != x-; then
18579 mv $tmp/out $ac_file
18580 else
18581 cat $tmp/out
18582 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018583 fi
18584
Martin v. Löwis11437992002-04-12 09:54:03 +000018585done
18586_ACEOF
18587cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018588
Martin v. Löwis11437992002-04-12 09:54:03 +000018589#
18590# CONFIG_HEADER section.
18591#
Guido van Rossum627b2d71993-12-24 10:39:16 +000018592
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018593# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18594# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000018595#
18596# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000018597ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18598ac_dB='[ ].*$,\1#\2'
18599ac_dC=' '
18600ac_dD=',;t'
18601# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18602ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18603ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018604ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000018605ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018606
Martin v. Löwis11437992002-04-12 09:54:03 +000018607for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000018608 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000018609 case $ac_file in
18610 - | *:- | *:-:* ) # input from stdin
18611 cat >$tmp/stdin
18612 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18613 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18614 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18615 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18616 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018617 esac
18618
Martin v. Löwis11437992002-04-12 09:54:03 +000018619 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
18620echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000018621
Martin v. Löwis11437992002-04-12 09:54:03 +000018622 # First look for the input files in the build tree, otherwise in the
18623 # src tree.
18624 ac_file_inputs=`IFS=:
18625 for f in $ac_file_in; do
18626 case $f in
18627 -) echo $tmp/stdin ;;
18628 [\\/$]*)
18629 # Absolute (can't be DOS-style, as IFS=:)
18630 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18631echo "$as_me: error: cannot find input file: $f" >&2;}
18632 { (exit 1); exit 1; }; }
18633 echo $f;;
18634 *) # Relative
18635 if test -f "$f"; then
18636 # Build tree
18637 echo $f
18638 elif test -f "$srcdir/$f"; then
18639 # Source tree
18640 echo $srcdir/$f
18641 else
18642 # /dev/null tree
18643 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18644echo "$as_me: error: cannot find input file: $f" >&2;}
18645 { (exit 1); exit 1; }; }
18646 fi;;
18647 esac
18648 done` || { (exit 1); exit 1; }
18649 # Remove the trailing spaces.
18650 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018651
Martin v. Löwis11437992002-04-12 09:54:03 +000018652_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018653
Martin v. Löwis11437992002-04-12 09:54:03 +000018654# Transform confdefs.h into two sed scripts, `conftest.defines' and
18655# `conftest.undefs', that substitutes the proper values into
18656# config.h.in to produce config.h. The first handles `#define'
18657# templates, and the second `#undef' templates.
18658# And first: Protect against being on the right side of a sed subst in
18659# config.status. Protect against being in an unquoted here document
18660# in config.status.
18661rm -f conftest.defines conftest.undefs
18662# Using a here document instead of a string reduces the quoting nightmare.
18663# Putting comments in sed scripts is not portable.
18664#
18665# `end' is used to avoid that the second main sed command (meant for
18666# 0-ary CPP macros) applies to n-ary macro definitions.
18667# See the Autoconf documentation for `clear'.
18668cat >confdef2sed.sed <<\_ACEOF
18669s/[\\&,]/\\&/g
18670s,[\\$`],\\&,g
18671t clear
18672: clear
18673s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
18674t end
18675s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
18676: end
18677_ACEOF
18678# If some macros were called several times there might be several times
18679# the same #defines, which is useless. Nevertheless, we may not want to
18680# sort them, since we want the *last* AC-DEFINE to be honored.
18681uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
18682sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
18683rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018684
18685# This sed command replaces #undef with comments. This is necessary, for
18686# example, in the case of _POSIX_SOURCE, which is predefined and required
18687# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000018688cat >>conftest.undefs <<\_ACEOF
18689s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
18690_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018691
Martin v. Löwis11437992002-04-12 09:54:03 +000018692# Break up conftest.defines because some shells have a limit on the size
18693# of here documents, and old seds have small limits too (100 cmds).
18694echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Martin v. Löwisf3322282003-07-13 09:46:13 +000018695echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018696echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
18697echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018698rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000018699while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000018700do
Martin v. Löwis11437992002-04-12 09:54:03 +000018701 # Write a limited-size here document to $tmp/defines.sed.
18702 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
18703 # Speed up: don't consider the non `#define' lines.
18704 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
18705 # Work around the forget-to-reset-the-flag bug.
18706 echo 't clr' >>$CONFIG_STATUS
18707 echo ': clr' >>$CONFIG_STATUS
18708 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018709 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018710 sed -f $tmp/defines.sed $tmp/in >$tmp/out
18711 rm -f $tmp/in
18712 mv $tmp/out $tmp/in
18713' >>$CONFIG_STATUS
18714 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
18715 rm -f conftest.defines
18716 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000018717done
Martin v. Löwis11437992002-04-12 09:54:03 +000018718rm -f conftest.defines
Martin v. Löwisf3322282003-07-13 09:46:13 +000018719echo ' fi # egrep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018720echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018721
Martin v. Löwis11437992002-04-12 09:54:03 +000018722# Break up conftest.undefs because some shells have a limit on the size
18723# of here documents, and old seds have small limits too (100 cmds).
18724echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
18725rm -f conftest.tail
18726while grep . conftest.undefs >/dev/null
18727do
18728 # Write a limited-size here document to $tmp/undefs.sed.
18729 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
18730 # Speed up: don't consider the non `#undef'
18731 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
18732 # Work around the forget-to-reset-the-flag bug.
18733 echo 't clr' >>$CONFIG_STATUS
18734 echo ': clr' >>$CONFIG_STATUS
18735 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
18736 echo 'CEOF
18737 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
18738 rm -f $tmp/in
18739 mv $tmp/out $tmp/in
18740' >>$CONFIG_STATUS
18741 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
18742 rm -f conftest.undefs
18743 mv conftest.tail conftest.undefs
18744done
18745rm -f conftest.undefs
18746
18747cat >>$CONFIG_STATUS <<\_ACEOF
18748 # Let's still pretend it is `configure' which instantiates (i.e., don't
18749 # use $as_me), people would be surprised to read:
18750 # /* config.h. Generated by config.status. */
18751 if test x"$ac_file" = x-; then
18752 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000018753 else
Martin v. Löwis11437992002-04-12 09:54:03 +000018754 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000018755 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018756 cat $tmp/in >>$tmp/config.h
18757 rm -f $tmp/in
18758 if test x"$ac_file" != x-; then
Martin v. Löwisf3322282003-07-13 09:46:13 +000018759 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018760 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
18761echo "$as_me: $ac_file is unchanged" >&6;}
18762 else
18763 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18764$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18765 X"$ac_file" : 'X\(//\)[^/]' \| \
18766 X"$ac_file" : 'X\(//\)$' \| \
18767 X"$ac_file" : 'X\(/\)' \| \
18768 . : '\(.\)' 2>/dev/null ||
18769echo X"$ac_file" |
18770 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18771 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18772 /^X\(\/\/\)$/{ s//\1/; q; }
18773 /^X\(\/\).*/{ s//\1/; q; }
18774 s/.*/./; q'`
Martin v. Löwisf3322282003-07-13 09:46:13 +000018775 { case "$ac_dir" in
18776 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18777 *) as_incr_dir=.;;
18778esac
18779as_dummy="$ac_dir"
18780for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18781 case $as_mkdir_dir in
18782 # Skip DOS drivespec
18783 ?:) as_incr_dir=$as_mkdir_dir ;;
18784 *)
18785 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18786 test -d "$as_incr_dir" ||
18787 mkdir "$as_incr_dir" ||
18788 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18789echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18790 { (exit 1); exit 1; }; }
18791 ;;
18792 esac
18793done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018794
Martin v. Löwis11437992002-04-12 09:54:03 +000018795 rm -f $ac_file
18796 mv $tmp/config.h $ac_file
18797 fi
18798 else
18799 cat $tmp/config.h
18800 rm -f $tmp/config.h
18801 fi
18802done
18803_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000018804
Martin v. Löwis11437992002-04-12 09:54:03 +000018805cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018806
Martin v. Löwis11437992002-04-12 09:54:03 +000018807{ (exit 0); exit 0; }
18808_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018809chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018810ac_clean_files=$ac_clean_files_save
18811
18812
18813# configure is writing to config.log, and then calls config.status.
18814# config.status does its own redirection, appending to config.log.
18815# Unfortunately, on DOS this fails, as config.log is still kept open
18816# by configure, so config.status won't be able to write to it; its
18817# output is simply discarded. So we exec the FD to /dev/null,
18818# effectively closing config.log, so it can be properly (re)opened and
18819# appended to by config.status. When coming back to configure, we
18820# need to make the FD available again.
18821if test "$no_create" != yes; then
18822 ac_cs_success=:
18823 exec 5>/dev/null
Martin v. Löwisf3322282003-07-13 09:46:13 +000018824 $SHELL $CONFIG_STATUS || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018825 exec 5>>config.log
18826 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18827 # would make configure fail if this is the last instruction.
18828 $ac_cs_success || { (exit 1); exit 1; }
18829fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018830
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018831
18832echo "creating Setup"
18833if test ! -f Modules/Setup
18834then
18835 cp $srcdir/Modules/Setup.dist Modules/Setup
18836fi
18837
18838echo "creating Setup.local"
18839if test ! -f Modules/Setup.local
18840then
18841 echo "# Edit this file for local setup changes" >Modules/Setup.local
18842fi
18843
18844echo "creating Makefile"
18845$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
18846 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000018847 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018848mv config.c Modules