blob: 1c678bc3020b58fd827fd0cf0534baae108fde58 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwis95c419b2003-05-03 12:10:48 +00002# From configure.in Revision: 1.404 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Barry Warsawfe33b792003-01-07 22:42:49 +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.
Barry Warsawfe33b792003-01-07 22:42:49 +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
Barry Warsawfe33b792003-01-07 22:42:49 +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
Barry Warsawfe33b792003-01-07 22:42:49 +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.
Barry Warsawfe33b792003-01-07 22:42:49 +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
86 echo "#! /bin/sh" >conftest.sh
87 echo "exit 0" >>conftest.sh
88 chmod +x conftest.sh
Barry Warsawfe33b792003-01-07 22:42:49 +000089 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
94 rm -f conftest.sh
95fi
96
97
98 as_lineno_1=$LINENO
99 as_lineno_2=$LINENO
100 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
101 test "x$as_lineno_1" != "x$as_lineno_2" &&
102 test "x$as_lineno_3" = "x$as_lineno_2" || {
103 # Find who we are. Look in the path if we contain no path at all
104 # relative or not.
105 case $0 in
106 *[\\/]* ) as_myself=$0 ;;
107 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
108for as_dir in $PATH
109do
110 IFS=$as_save_IFS
111 test -z "$as_dir" && as_dir=.
112 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
113done
114
115 ;;
116 esac
117 # We did not find ourselves, most probably we were run as `sh COMMAND'
118 # in which case we are not to be found in the path.
119 if test "x$as_myself" = x; then
120 as_myself=$0
121 fi
122 if test ! -f "$as_myself"; then
123 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
124 { (exit 1); exit 1; }; }
125 fi
126 case $CONFIG_SHELL in
127 '')
128 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
129for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
130do
131 IFS=$as_save_IFS
132 test -z "$as_dir" && as_dir=.
133 for as_base in sh bash ksh sh5; do
134 case $as_dir in
135 /*)
136 if ("$as_dir/$as_base" -c '
137 as_lineno_1=$LINENO
138 as_lineno_2=$LINENO
139 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
140 test "x$as_lineno_1" != "x$as_lineno_2" &&
141 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
142 CONFIG_SHELL=$as_dir/$as_base
143 export CONFIG_SHELL
144 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
145 fi;;
146 esac
147 done
148done
149;;
150 esac
151
152 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
153 # uniformly replaced by the line number. The first 'sed' inserts a
154 # line-number line before each line; the second 'sed' does the real
155 # work. The second script uses 'N' to pair each line-number line
156 # with the numbered line, and appends trailing '-' during
157 # substitution so that $LINENO is not a special case at line end.
158 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
159 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
160 sed '=' <$as_myself |
161 sed '
162 N
163 s,$,-,
164 : loop
165 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
166 t loop
167 s,-$,,
168 s,^['$as_cr_digits']*\n,,
169 ' >$as_me.lineno &&
170 chmod +x $as_me.lineno ||
171 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
172 { (exit 1); exit 1; }; }
173
174 # Don't try to exec as it changes $[0], causing all sort of problems
175 # (the dirname of $[0] is not the place where we might find the
176 # original and so on. Autoconf is especially sensible to this).
177 . ./$as_me.lineno
178 # Exit status is that of the last command.
179 exit
180}
181
182
183case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
184 *c*,-n*) ECHO_N= ECHO_C='
185' ECHO_T=' ' ;;
186 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
187 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
188esac
189
190if expr a : '\(a\)' >/dev/null 2>&1; then
191 as_expr=expr
192else
193 as_expr=false
194fi
195
196rm -f conf$$ conf$$.exe conf$$.file
197echo >conf$$.file
198if ln -s conf$$.file conf$$ 2>/dev/null; then
199 # We could just check for DJGPP; but this test a) works b) is more generic
200 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
201 if test -f conf$$.exe; then
202 # Don't use ln at all; we don't have any links
203 as_ln_s='cp -p'
204 else
205 as_ln_s='ln -s'
206 fi
207elif ln conf$$.file conf$$ 2>/dev/null; then
208 as_ln_s=ln
209else
210 as_ln_s='cp -p'
211fi
212rm -f conf$$ conf$$.exe conf$$.file
213
214as_executable_p="test -f"
215
216# Sed expression to map a string onto a valid CPP name.
217as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
218
219# Sed expression to map a string onto a valid variable name.
220as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
221
222
223# IFS
224# We need space, tab and new line, in precisely that order.
225as_nl='
226'
227IFS=" $as_nl"
228
229# CDPATH.
Barry Warsawfe33b792003-01-07 22:42:49 +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öwise9416172003-05-03 10:12:45 +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
Barry Warsawfe33b792003-01-07 22:42:49 +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
Barry Warsawfe33b792003-01-07 22:42:49 +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=
1008for ac_arg
1009do
1010 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
Barry Warsawfe33b792003-01-07 22:42:49 +00001019 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
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 # Get rid of the leading space.
1025done
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
Barry Warsawfe33b792003-01-07 22:42:49 +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
Barry Warsawfe33b792003-01-07 22:42:49 +00001231ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001232
1233
1234# This is for stuff that absolutely must end up in pyconfig.h.
1235# Please use pyport.h instead, if possible.
1236
1237
1238
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001239
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001240
1241
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00001242VERSION=2.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001243
Martin v. Löwis1142de32002-03-29 16:28:31 +00001244
1245SOVERSION=1.0
1246
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001247# The later defininition of _XOPEN_SOURCE disables certain features
1248# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1249
1250cat >>confdefs.h <<\_ACEOF
1251#define _GNU_SOURCE 1
1252_ACEOF
1253
1254
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001255# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1256# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1257# them.
1258
1259cat >>confdefs.h <<\_ACEOF
1260#define _NETBSD_SOURCE 1
1261_ACEOF
1262
1263
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001264define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001265
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001266# Arguments passed to configure.
1267
1268CONFIG_ARGS="$ac_configure_args"
1269
Jack Jansene578a632001-08-15 01:27:14 +00001270# Check whether --enable-framework or --disable-framework was given.
1271if test "${enable_framework+set}" = set; then
1272 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001273
Jack Jansene578a632001-08-15 01:27:14 +00001274 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001275 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001276 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001277 esac
1278 case $enableval in
1279 no)
1280 PYTHONFRAMEWORK=
1281 PYTHONFRAMEWORKDIR=no-framework
1282 PYTHONFRAMEWORKPREFIX=
1283 PYTHONFRAMEWORKINSTALLDIR=
1284 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001285 ;;
1286 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001287 PYTHONFRAMEWORK=Python
1288 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001289 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001290 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1291 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001292 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001293
Guido van Rossum563e7081996-09-10 18:20:48 +00001294else
Martin v. Löwis11437992002-04-12 09:54:03 +00001295
Jack Jansene578a632001-08-15 01:27:14 +00001296 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001297 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001298 PYTHONFRAMEWORKPREFIX=
1299 PYTHONFRAMEWORKINSTALLDIR=
1300 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001301
Martin v. Löwis11437992002-04-12 09:54:03 +00001302fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001303
1304
1305
1306
Jack Jansene578a632001-08-15 01:27:14 +00001307
1308##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001309## AC_HELP_STRING(--with-dyld,
1310## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001311##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001312# Set name for machine-dependent library files
1313
Martin v. Löwis11437992002-04-12 09:54:03 +00001314echo "$as_me:$LINENO: checking MACHDEP" >&5
1315echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001316if test -z "$MACHDEP"
1317then
Guido van Rossum563e7081996-09-10 18:20:48 +00001318 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001319 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1320 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001321 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001322 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001323 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001324 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001325 ac_md_system=`echo $ac_sys_system |
1326 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1327 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001328 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001329 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001330
Guido van Rossum07397971997-04-29 21:49:50 +00001331 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001332 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001333 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001334 atheos*) MACHDEP="atheos";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001335 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001336 esac
1337fi
Guido van Rossum91922671997-10-09 20:24:13 +00001338
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001339# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1340# disable features if it is defined, without any means to access these
1341# features as extensions. For these systems, we skip the definition of
1342# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1343# some feature, make sure there is no alternative way to access this
1344# feature. Also, when using wildcards, make sure you have verified the
1345# need for not defining _XOPEN_SOURCE on all systems matching the
1346# wildcard, and that the wildcard does not include future systems
1347# (which may remove their limitations).
1348case $ac_sys_system/$ac_sys_release in
1349 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1350 # even though select is a POSIX function. Reported by J. Ribbens.
1351 OpenBSD/2.* | OpenBSD/3.[012])
1352 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00001353 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
1354 # of union __?sigval. Reported by Stuart Bishop.
1355 SunOS/5.6)
1356 define_xopen_source=no;;
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001357esac
1358
1359if test $define_xopen_source = yes
1360then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001361
1362cat >>confdefs.h <<\_ACEOF
1363#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001364_ACEOF
1365
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001366
1367 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1368 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1369 # several APIs are not declared. Since this is also needed in some
1370 # cases for HP-UX, we define it globally.
1371
1372
1373cat >>confdefs.h <<\_ACEOF
1374#define _XOPEN_SOURCE_EXTENDED 1
1375_ACEOF
1376
1377
1378cat >>confdefs.h <<\_ACEOF
1379#define _POSIX_C_SOURCE 200112L
1380_ACEOF
1381
1382
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001383fi
1384
Guido van Rossum91922671997-10-09 20:24:13 +00001385#
1386# SGI compilers allow the specification of the both the ABI and the
1387# ISA on the command line. Depending on the values of these switches,
1388# different and often incompatable code will be generated.
1389#
1390# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1391# thus supply support for various ABI/ISA combinations. The MACHDEP
1392# variable is also adjusted.
1393#
1394
1395if test ! -z "$SGI_ABI"
1396then
1397 CC="cc $SGI_ABI"
1398 LDFLAGS="$SGI_ABI $LDFLAGS"
1399 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1400fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001401echo "$as_me:$LINENO: result: $MACHDEP" >&5
1402echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001403
Jack Jansen83f898c2002-12-30 22:23:40 +00001404# And add extra plat-mac for darwin
1405
Jack Jansen7b59b422003-03-17 15:44:10 +00001406
Jack Jansen83f898c2002-12-30 22:23:40 +00001407echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1408echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1409if test -z "$EXTRAPLATDIR"
1410then
1411 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001412 darwin)
1413 EXTRAPLATDIR="\$(PLATMACDIRS)"
1414 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1415 ;;
1416 *)
1417 EXTRAPLATDIR=""
1418 EXTRAMACHDEPPATH=""
1419 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001420 esac
1421fi
1422echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1423echo "${ECHO_T}$EXTRAPLATDIR" >&6
1424
Guido van Rossum627b2d71993-12-24 10:39:16 +00001425# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001426
1427# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1428# for debug/optimization stuff. BASECFLAGS is for flags that are required
1429# just to get things to compile and link. Users are free to override OPT
1430# when running configure or make. The build should not break if they do.
1431# BASECFLAGS should generally not be messed with, however.
1432
1433# XXX shouldn't some/most/all of this code be merged with the stuff later
1434# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001435echo "$as_me:$LINENO: checking for --without-gcc" >&5
1436echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1437
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001438# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001439if test "${with_gcc+set}" = set; then
1440 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001441
Guido van Rossum7f43da71994-08-01 12:15:30 +00001442 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001443 no) CC=cc
1444 without_gcc=yes;;
1445 yes) CC=gcc
1446 without_gcc=no;;
1447 *) CC=$withval
1448 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001449 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001450else
Martin v. Löwis11437992002-04-12 09:54:03 +00001451
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001452 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001453 AIX*) CC=cc_r
1454 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001455 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001456 case $BE_HOST_CPU in
1457 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001458 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001459 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001460 BASECFLAGS="$BASECFLAGS -export pragma"
1461 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001462 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001463 ;;
1464 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001465 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001466 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001467 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001468 ;;
1469 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001470 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1471echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1472 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001473 ;;
1474 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001475 AR="\$(srcdir)/Modules/ar_beos"
1476 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001477 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001478 Monterey*)
1479 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001480 without_gcc=;;
1481 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001482 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001483fi;
1484echo "$as_me:$LINENO: result: $without_gcc" >&5
1485echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001486
1487
Guido van Rossum95012191999-12-16 17:50:52 +00001488
Fred Drakea1a84e72001-03-06 05:52:16 +00001489MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001490echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1491echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1492
Guido van Rossum95012191999-12-16 17:50:52 +00001493# Check whether --with-cxx or --without-cxx was given.
1494if test "${with_cxx+set}" = set; then
1495 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001496
Martin v. Löwis22352952000-12-13 17:37:02 +00001497 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001498 case $withval in
1499 no) CXX=
1500 with_cxx=no;;
1501 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001502 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001503 with_cxx=$withval;;
1504 esac
1505else
Martin v. Löwis11437992002-04-12 09:54:03 +00001506
Guido van Rossum95012191999-12-16 17:50:52 +00001507 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001508 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001509
Martin v. Löwis11437992002-04-12 09:54:03 +00001510fi;
1511echo "$as_me:$LINENO: result: $with_cxx" >&5
1512echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001513
1514if test "$with_cxx" = "yes"
1515then
Martin v. Löwis11437992002-04-12 09:54:03 +00001516 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1517echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1518 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001519fi
1520
1521
1522
1523
Martin v. Löwis11437992002-04-12 09:54:03 +00001524if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001525then
1526 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1527do
Martin v. Löwis11437992002-04-12 09:54:03 +00001528 # 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 +00001529set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001530echo "$as_me:$LINENO: checking for $ac_word" >&5
1531echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1532if test "${ac_cv_prog_CXX+set}" = set; then
1533 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001534else
1535 if test -n "$CXX"; then
1536 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1537else
Martin v. Löwis11437992002-04-12 09:54:03 +00001538as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1539for as_dir in $PATH
1540do
1541 IFS=$as_save_IFS
1542 test -z "$as_dir" && as_dir=.
1543 for ac_exec_ext in '' $ac_executable_extensions; do
1544 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1545 ac_cv_prog_CXX="$ac_prog"
1546 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1547 break 2
1548 fi
1549done
1550done
1551
Martin v. Löwis22352952000-12-13 17:37:02 +00001552fi
1553fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001554CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001555if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001556 echo "$as_me:$LINENO: result: $CXX" >&5
1557echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001558else
Martin v. Löwis11437992002-04-12 09:54:03 +00001559 echo "$as_me:$LINENO: result: no" >&5
1560echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001561fi
1562
Martin v. Löwis11437992002-04-12 09:54:03 +00001563 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001564done
1565test -n "$CXX" || CXX="notfound"
1566
1567 if test "$CXX" = "notfound"
1568 then
1569 CXX=
1570 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001571 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001572ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001573ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1574ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1575ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1576 cat >conftest.$ac_ext <<_ACEOF
1577#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001578#include "confdefs.h"
1579
Barry Warsawfe33b792003-01-07 22:42:49 +00001580#ifdef F77_DUMMY_MAIN
1581# ifdef __cplusplus
1582 extern "C"
1583# endif
1584 int F77_DUMMY_MAIN() { return 1; }
1585#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00001586int
1587main ()
1588{
Michael W. Hudson54241132001-12-07 15:38:26 +00001589
Martin v. Löwis11437992002-04-12 09:54:03 +00001590 ;
1591 return 0;
1592}
1593_ACEOF
1594ac_clean_files_save=$ac_clean_files
1595ac_clean_files="$ac_clean_files a.out a.exe"
1596# Try to create an executable without -o first, disregard a.out.
1597# It will help us diagnose broken compilers, and finding out an intuition
1598# of exeext.
1599echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1600echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1601ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1602if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1603 (eval $ac_link_default) 2>&5
1604 ac_status=$?
1605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1606 (exit $ac_status); }; then
1607 # Find the output, starting from the most likely. This scheme is
1608# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1609# resort.
1610
1611# Be careful to initialize this variable, since it used to be cached.
1612# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1613ac_cv_exeext=
Barry Warsawfe33b792003-01-07 22:42:49 +00001614for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1615 ls a.out conftest 2>/dev/null;
1616 ls a.* conftest.* 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001617 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00001618 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001619 a.out ) # We found the default executable, but exeext='' is most
1620 # certainly right.
1621 break;;
1622 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1623 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1624 export ac_cv_exeext
1625 break;;
1626 * ) break;;
1627 esac
1628done
1629else
1630 echo "$as_me: failed program was:" >&5
1631cat conftest.$ac_ext >&5
Barry Warsawfe33b792003-01-07 22:42:49 +00001632{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1633echo "$as_me: error: C++ compiler cannot create executables" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001634 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001635fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001636
1637ac_exeext=$ac_cv_exeext
1638echo "$as_me:$LINENO: result: $ac_file" >&5
1639echo "${ECHO_T}$ac_file" >&6
1640
1641# Check the compiler produces executables we can run. If not, either
1642# the compiler is broken, or we cross compile.
1643echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1644echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1645# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1646# If not cross compiling, check that we can run a simple program.
1647if test "$cross_compiling" != yes; then
1648 if { ac_try='./$ac_file'
1649 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1650 (eval $ac_try) 2>&5
1651 ac_status=$?
1652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1653 (exit $ac_status); }; }; then
1654 cross_compiling=no
1655 else
1656 if test "$cross_compiling" = maybe; then
1657 cross_compiling=yes
1658 else
1659 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1660If you meant to cross compile, use \`--host'." >&5
1661echo "$as_me: error: cannot run C++ compiled programs.
1662If you meant to cross compile, use \`--host'." >&2;}
1663 { (exit 1); exit 1; }; }
1664 fi
1665 fi
1666fi
1667echo "$as_me:$LINENO: result: yes" >&5
1668echo "${ECHO_T}yes" >&6
1669
1670rm -f a.out a.exe conftest$ac_cv_exeext
1671ac_clean_files=$ac_clean_files_save
1672# Check the compiler produces executables we can run. If not, either
1673# the compiler is broken, or we cross compile.
1674echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1675echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1676echo "$as_me:$LINENO: result: $cross_compiling" >&5
1677echo "${ECHO_T}$cross_compiling" >&6
1678
1679echo "$as_me:$LINENO: checking for suffix of executables" >&5
1680echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1681if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1682 (eval $ac_link) 2>&5
1683 ac_status=$?
1684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1685 (exit $ac_status); }; then
1686 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1687# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1688# work properly (i.e., refer to `conftest.exe'), while it won't with
1689# `rm'.
Barry Warsawfe33b792003-01-07 22:42:49 +00001690for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001691 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00001692 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001693 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1694 export ac_cv_exeext
1695 break;;
1696 * ) break;;
1697 esac
1698done
1699else
1700 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1701echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1702 { (exit 1); exit 1; }; }
1703fi
1704
1705rm -f conftest$ac_cv_exeext
1706echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1707echo "${ECHO_T}$ac_cv_exeext" >&6
1708
1709rm -f conftest.$ac_ext
1710EXEEXT=$ac_cv_exeext
1711ac_exeext=$EXEEXT
1712
1713 ac_ext=c
1714ac_cpp='$CPP $CPPFLAGS'
1715ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1716ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1717ac_compiler_gnu=$ac_cv_c_compiler_gnu
1718
1719
Martin v. Löwis22352952000-12-13 17:37:02 +00001720
1721 fi
1722fi
1723
Guido van Rossum8b131c51995-03-09 14:10:13 +00001724# If the user switches compilers, we can't believe the cache
1725if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1726then
Martin v. Löwis11437992002-04-12 09:54:03 +00001727 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1728(it is also a good idea to do 'make clean' before compiling)" >&5
1729echo "$as_me: error: cached CC is different -- throw away $cache_file
1730(it is also a good idea to do 'make clean' before compiling)" >&2;}
1731 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001732fi
1733
Martin v. Löwis11437992002-04-12 09:54:03 +00001734ac_ext=c
1735ac_cpp='$CPP $CPPFLAGS'
1736ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1737ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1738ac_compiler_gnu=$ac_cv_c_compiler_gnu
1739if test -n "$ac_tool_prefix"; then
1740 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1741set dummy ${ac_tool_prefix}gcc; ac_word=$2
1742echo "$as_me:$LINENO: checking for $ac_word" >&5
1743echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1744if test "${ac_cv_prog_CC+set}" = set; then
1745 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001746else
1747 if test -n "$CC"; then
1748 ac_cv_prog_CC="$CC" # Let the user override the test.
1749else
Martin v. Löwis11437992002-04-12 09:54:03 +00001750as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1751for as_dir in $PATH
1752do
1753 IFS=$as_save_IFS
1754 test -z "$as_dir" && as_dir=.
1755 for ac_exec_ext in '' $ac_executable_extensions; do
1756 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1757 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1758 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1759 break 2
1760 fi
1761done
1762done
1763
Jack Jansendd19cf82001-12-06 22:36:17 +00001764fi
1765fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001766CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001767if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001768 echo "$as_me:$LINENO: result: $CC" >&5
1769echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001770else
Martin v. Löwis11437992002-04-12 09:54:03 +00001771 echo "$as_me:$LINENO: result: no" >&5
1772echo "${ECHO_T}no" >&6
1773fi
1774
1775fi
1776if test -z "$ac_cv_prog_CC"; then
1777 ac_ct_CC=$CC
1778 # Extract the first word of "gcc", so it can be a program name with args.
1779set dummy gcc; ac_word=$2
1780echo "$as_me:$LINENO: checking for $ac_word" >&5
1781echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1782if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1783 echo $ECHO_N "(cached) $ECHO_C" >&6
1784else
1785 if test -n "$ac_ct_CC"; then
1786 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1787else
1788as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1789for as_dir in $PATH
1790do
1791 IFS=$as_save_IFS
1792 test -z "$as_dir" && as_dir=.
1793 for ac_exec_ext in '' $ac_executable_extensions; do
1794 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1795 ac_cv_prog_ac_ct_CC="gcc"
1796 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1797 break 2
1798 fi
1799done
1800done
1801
1802fi
1803fi
1804ac_ct_CC=$ac_cv_prog_ac_ct_CC
1805if test -n "$ac_ct_CC"; then
1806 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1807echo "${ECHO_T}$ac_ct_CC" >&6
1808else
1809 echo "$as_me:$LINENO: result: no" >&5
1810echo "${ECHO_T}no" >&6
1811fi
1812
1813 CC=$ac_ct_CC
1814else
1815 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001816fi
1817
Jack Jansendd19cf82001-12-06 22:36:17 +00001818if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001819 if test -n "$ac_tool_prefix"; then
1820 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1821set dummy ${ac_tool_prefix}cc; ac_word=$2
1822echo "$as_me:$LINENO: checking for $ac_word" >&5
1823echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1824if test "${ac_cv_prog_CC+set}" = set; then
1825 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001826else
1827 if test -n "$CC"; then
1828 ac_cv_prog_CC="$CC" # Let the user override the test.
1829else
Martin v. Löwis11437992002-04-12 09:54:03 +00001830as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1831for as_dir in $PATH
1832do
1833 IFS=$as_save_IFS
1834 test -z "$as_dir" && as_dir=.
1835 for ac_exec_ext in '' $ac_executable_extensions; do
1836 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1837 ac_cv_prog_CC="${ac_tool_prefix}cc"
1838 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1839 break 2
1840 fi
1841done
1842done
1843
1844fi
1845fi
1846CC=$ac_cv_prog_CC
1847if test -n "$CC"; then
1848 echo "$as_me:$LINENO: result: $CC" >&5
1849echo "${ECHO_T}$CC" >&6
1850else
1851 echo "$as_me:$LINENO: result: no" >&5
1852echo "${ECHO_T}no" >&6
1853fi
1854
1855fi
1856if test -z "$ac_cv_prog_CC"; then
1857 ac_ct_CC=$CC
1858 # Extract the first word of "cc", so it can be a program name with args.
1859set dummy cc; ac_word=$2
1860echo "$as_me:$LINENO: checking for $ac_word" >&5
1861echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1862if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1863 echo $ECHO_N "(cached) $ECHO_C" >&6
1864else
1865 if test -n "$ac_ct_CC"; then
1866 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1867else
1868as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1869for as_dir in $PATH
1870do
1871 IFS=$as_save_IFS
1872 test -z "$as_dir" && as_dir=.
1873 for ac_exec_ext in '' $ac_executable_extensions; do
1874 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1875 ac_cv_prog_ac_ct_CC="cc"
1876 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1877 break 2
1878 fi
1879done
1880done
1881
1882fi
1883fi
1884ac_ct_CC=$ac_cv_prog_ac_ct_CC
1885if test -n "$ac_ct_CC"; then
1886 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1887echo "${ECHO_T}$ac_ct_CC" >&6
1888else
1889 echo "$as_me:$LINENO: result: no" >&5
1890echo "${ECHO_T}no" >&6
1891fi
1892
1893 CC=$ac_ct_CC
1894else
1895 CC="$ac_cv_prog_CC"
1896fi
1897
1898fi
1899if test -z "$CC"; then
1900 # Extract the first word of "cc", so it can be a program name with args.
1901set dummy cc; ac_word=$2
1902echo "$as_me:$LINENO: checking for $ac_word" >&5
1903echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1904if test "${ac_cv_prog_CC+set}" = set; then
1905 echo $ECHO_N "(cached) $ECHO_C" >&6
1906else
1907 if test -n "$CC"; then
1908 ac_cv_prog_CC="$CC" # Let the user override the test.
1909else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001910 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001911as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1912for as_dir in $PATH
1913do
1914 IFS=$as_save_IFS
1915 test -z "$as_dir" && as_dir=.
1916 for ac_exec_ext in '' $ac_executable_extensions; do
1917 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1918 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1919 ac_prog_rejected=yes
1920 continue
1921 fi
1922 ac_cv_prog_CC="cc"
1923 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1924 break 2
1925 fi
1926done
1927done
1928
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001929if test $ac_prog_rejected = yes; then
1930 # We found a bogon in the path, so make sure we never use it.
1931 set dummy $ac_cv_prog_CC
1932 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001933 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001934 # We chose a different compiler from the bogus one.
1935 # However, it has the same basename, so the bogon will be chosen
1936 # first if we set CC to just the basename; use the full file name.
1937 shift
Barry Warsawfe33b792003-01-07 22:42:49 +00001938 set dummy "$as_dir/$ac_word" ${1+"$@"}
1939 shift
1940 ac_cv_prog_CC="$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001941 fi
1942fi
1943fi
1944fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001945CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001946if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001947 echo "$as_me:$LINENO: result: $CC" >&5
1948echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001949else
Martin v. Löwis11437992002-04-12 09:54:03 +00001950 echo "$as_me:$LINENO: result: no" >&5
1951echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001952fi
1953
Martin v. Löwis11437992002-04-12 09:54:03 +00001954fi
1955if test -z "$CC"; then
1956 if test -n "$ac_tool_prefix"; then
1957 for ac_prog in cl
1958 do
1959 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1960set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1961echo "$as_me:$LINENO: checking for $ac_word" >&5
1962echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1963if test "${ac_cv_prog_CC+set}" = set; then
1964 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001965else
1966 if test -n "$CC"; then
1967 ac_cv_prog_CC="$CC" # Let the user override the test.
1968else
Martin v. Löwis11437992002-04-12 09:54:03 +00001969as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1970for as_dir in $PATH
1971do
1972 IFS=$as_save_IFS
1973 test -z "$as_dir" && as_dir=.
1974 for ac_exec_ext in '' $ac_executable_extensions; do
1975 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1976 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1977 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1978 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001979 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001980done
1981done
1982
1983fi
1984fi
1985CC=$ac_cv_prog_CC
1986if test -n "$CC"; then
1987 echo "$as_me:$LINENO: result: $CC" >&5
1988echo "${ECHO_T}$CC" >&6
1989else
1990 echo "$as_me:$LINENO: result: no" >&5
1991echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001992fi
1993
Martin v. Löwis11437992002-04-12 09:54:03 +00001994 test -n "$CC" && break
1995 done
1996fi
1997if test -z "$CC"; then
1998 ac_ct_CC=$CC
1999 for ac_prog in cl
2000do
2001 # Extract the first word of "$ac_prog", so it can be a program name with args.
2002set dummy $ac_prog; ac_word=$2
2003echo "$as_me:$LINENO: checking for $ac_word" >&5
2004echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2005if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2006 echo $ECHO_N "(cached) $ECHO_C" >&6
2007else
2008 if test -n "$ac_ct_CC"; then
2009 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2010else
2011as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2012for as_dir in $PATH
2013do
2014 IFS=$as_save_IFS
2015 test -z "$as_dir" && as_dir=.
2016 for ac_exec_ext in '' $ac_executable_extensions; do
2017 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2018 ac_cv_prog_ac_ct_CC="$ac_prog"
2019 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2020 break 2
2021 fi
2022done
2023done
Jack Jansendd19cf82001-12-06 22:36:17 +00002024
Martin v. Löwis11437992002-04-12 09:54:03 +00002025fi
2026fi
2027ac_ct_CC=$ac_cv_prog_ac_ct_CC
2028if test -n "$ac_ct_CC"; then
2029 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2030echo "${ECHO_T}$ac_ct_CC" >&6
2031else
2032 echo "$as_me:$LINENO: result: no" >&5
2033echo "${ECHO_T}no" >&6
2034fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002035
Martin v. Löwis11437992002-04-12 09:54:03 +00002036 test -n "$ac_ct_CC" && break
2037done
Michael W. Hudson54241132001-12-07 15:38:26 +00002038
Martin v. Löwis11437992002-04-12 09:54:03 +00002039 CC=$ac_ct_CC
2040fi
2041
2042fi
2043
2044
2045test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
2046echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
2047 { (exit 1); exit 1; }; }
2048
2049# Provide some information about the compiler.
2050echo "$as_me:$LINENO:" \
2051 "checking for C compiler version" >&5
2052ac_compiler=`set X $ac_compile; echo $2`
2053{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2054 (eval $ac_compiler --version </dev/null >&5) 2>&5
2055 ac_status=$?
2056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2057 (exit $ac_status); }
2058{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2059 (eval $ac_compiler -v </dev/null >&5) 2>&5
2060 ac_status=$?
2061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2062 (exit $ac_status); }
2063{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2064 (eval $ac_compiler -V </dev/null >&5) 2>&5
2065 ac_status=$?
2066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2067 (exit $ac_status); }
2068
2069cat >conftest.$ac_ext <<_ACEOF
2070#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00002071#include "confdefs.h"
2072
Barry Warsawfe33b792003-01-07 22:42:49 +00002073#ifdef F77_DUMMY_MAIN
2074# ifdef __cplusplus
2075 extern "C"
2076# endif
2077 int F77_DUMMY_MAIN() { return 1; }
2078#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002079int
2080main ()
2081{
2082
2083 ;
2084 return 0;
2085}
2086_ACEOF
2087ac_clean_files_save=$ac_clean_files
2088ac_clean_files="$ac_clean_files a.out a.exe"
2089# Try to create an executable without -o first, disregard a.out.
2090# It will help us diagnose broken compilers, and finding out an intuition
2091# of exeext.
2092echo "$as_me:$LINENO: checking for C compiler default output" >&5
2093echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2094ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2095if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2096 (eval $ac_link_default) 2>&5
2097 ac_status=$?
2098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2099 (exit $ac_status); }; then
2100 # Find the output, starting from the most likely. This scheme is
2101# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2102# resort.
2103
2104# Be careful to initialize this variable, since it used to be cached.
2105# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2106ac_cv_exeext=
Barry Warsawfe33b792003-01-07 22:42:49 +00002107for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
2108 ls a.out conftest 2>/dev/null;
2109 ls a.* conftest.* 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002110 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00002111 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002112 a.out ) # We found the default executable, but exeext='' is most
2113 # certainly right.
2114 break;;
2115 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2116 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2117 export ac_cv_exeext
2118 break;;
2119 * ) break;;
2120 esac
2121done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002122else
Martin v. Löwis11437992002-04-12 09:54:03 +00002123 echo "$as_me: failed program was:" >&5
2124cat conftest.$ac_ext >&5
Barry Warsawfe33b792003-01-07 22:42:49 +00002125{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2126echo "$as_me: error: C compiler cannot create executables" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002127 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002128fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002129
Martin v. Löwis11437992002-04-12 09:54:03 +00002130ac_exeext=$ac_cv_exeext
2131echo "$as_me:$LINENO: result: $ac_file" >&5
2132echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002133
Martin v. Löwis11437992002-04-12 09:54:03 +00002134# Check the compiler produces executables we can run. If not, either
2135# the compiler is broken, or we cross compile.
2136echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2137echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2138# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2139# If not cross compiling, check that we can run a simple program.
2140if test "$cross_compiling" != yes; then
2141 if { ac_try='./$ac_file'
2142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2143 (eval $ac_try) 2>&5
2144 ac_status=$?
2145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2146 (exit $ac_status); }; }; then
2147 cross_compiling=no
2148 else
2149 if test "$cross_compiling" = maybe; then
2150 cross_compiling=yes
2151 else
2152 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2153If you meant to cross compile, use \`--host'." >&5
2154echo "$as_me: error: cannot run C compiled programs.
2155If you meant to cross compile, use \`--host'." >&2;}
2156 { (exit 1); exit 1; }; }
2157 fi
2158 fi
2159fi
2160echo "$as_me:$LINENO: result: yes" >&5
2161echo "${ECHO_T}yes" >&6
2162
2163rm -f a.out a.exe conftest$ac_cv_exeext
2164ac_clean_files=$ac_clean_files_save
2165# Check the compiler produces executables we can run. If not, either
2166# the compiler is broken, or we cross compile.
2167echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2168echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2169echo "$as_me:$LINENO: result: $cross_compiling" >&5
2170echo "${ECHO_T}$cross_compiling" >&6
2171
2172echo "$as_me:$LINENO: checking for suffix of executables" >&5
2173echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2174if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2175 (eval $ac_link) 2>&5
2176 ac_status=$?
2177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2178 (exit $ac_status); }; then
2179 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2180# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2181# work properly (i.e., refer to `conftest.exe'), while it won't with
2182# `rm'.
Barry Warsawfe33b792003-01-07 22:42:49 +00002183for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002184 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00002185 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002186 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2187 export ac_cv_exeext
2188 break;;
2189 * ) break;;
2190 esac
2191done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002192else
Martin v. Löwis11437992002-04-12 09:54:03 +00002193 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2194echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2195 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002196fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002197
Martin v. Löwis11437992002-04-12 09:54:03 +00002198rm -f conftest$ac_cv_exeext
2199echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2200echo "${ECHO_T}$ac_cv_exeext" >&6
2201
2202rm -f conftest.$ac_ext
2203EXEEXT=$ac_cv_exeext
2204ac_exeext=$EXEEXT
2205echo "$as_me:$LINENO: checking for suffix of object files" >&5
2206echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2207if test "${ac_cv_objext+set}" = set; then
2208 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002209else
Martin v. Löwis11437992002-04-12 09:54:03 +00002210 cat >conftest.$ac_ext <<_ACEOF
2211#line $LINENO "configure"
2212#include "confdefs.h"
2213
Barry Warsawfe33b792003-01-07 22:42:49 +00002214#ifdef F77_DUMMY_MAIN
2215# ifdef __cplusplus
2216 extern "C"
2217# endif
2218 int F77_DUMMY_MAIN() { return 1; }
2219#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002220int
2221main ()
2222{
2223
2224 ;
2225 return 0;
2226}
2227_ACEOF
2228rm -f conftest.o conftest.obj
2229if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2230 (eval $ac_compile) 2>&5
2231 ac_status=$?
2232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2233 (exit $ac_status); }; then
2234 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2235 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00002236 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002237 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2238 break;;
2239 esac
2240done
2241else
2242 echo "$as_me: failed program was:" >&5
2243cat conftest.$ac_ext >&5
2244{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2245echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2246 { (exit 1); exit 1; }; }
2247fi
2248
2249rm -f conftest.$ac_cv_objext conftest.$ac_ext
2250fi
2251echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2252echo "${ECHO_T}$ac_cv_objext" >&6
2253OBJEXT=$ac_cv_objext
2254ac_objext=$OBJEXT
2255echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2256echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2257if test "${ac_cv_c_compiler_gnu+set}" = set; then
2258 echo $ECHO_N "(cached) $ECHO_C" >&6
2259else
2260 cat >conftest.$ac_ext <<_ACEOF
2261#line $LINENO "configure"
2262#include "confdefs.h"
2263
Barry Warsawfe33b792003-01-07 22:42:49 +00002264#ifdef F77_DUMMY_MAIN
2265# ifdef __cplusplus
2266 extern "C"
2267# endif
2268 int F77_DUMMY_MAIN() { return 1; }
2269#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002270int
2271main ()
2272{
2273#ifndef __GNUC__
2274 choke me
2275#endif
2276
2277 ;
2278 return 0;
2279}
2280_ACEOF
2281rm -f conftest.$ac_objext
2282if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2283 (eval $ac_compile) 2>&5
2284 ac_status=$?
2285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2286 (exit $ac_status); } &&
2287 { ac_try='test -s conftest.$ac_objext'
2288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2289 (eval $ac_try) 2>&5
2290 ac_status=$?
2291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2292 (exit $ac_status); }; }; then
2293 ac_compiler_gnu=yes
2294else
2295 echo "$as_me: failed program was:" >&5
2296cat conftest.$ac_ext >&5
2297ac_compiler_gnu=no
2298fi
2299rm -f conftest.$ac_objext conftest.$ac_ext
2300ac_cv_c_compiler_gnu=$ac_compiler_gnu
2301
2302fi
2303echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2304echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2305GCC=`test $ac_compiler_gnu = yes && echo yes`
2306ac_test_CFLAGS=${CFLAGS+set}
2307ac_save_CFLAGS=$CFLAGS
2308CFLAGS="-g"
2309echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2310echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2311if test "${ac_cv_prog_cc_g+set}" = set; then
2312 echo $ECHO_N "(cached) $ECHO_C" >&6
2313else
2314 cat >conftest.$ac_ext <<_ACEOF
2315#line $LINENO "configure"
2316#include "confdefs.h"
2317
Barry Warsawfe33b792003-01-07 22:42:49 +00002318#ifdef F77_DUMMY_MAIN
2319# ifdef __cplusplus
2320 extern "C"
2321# endif
2322 int F77_DUMMY_MAIN() { return 1; }
2323#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002324int
2325main ()
2326{
2327
2328 ;
2329 return 0;
2330}
2331_ACEOF
2332rm -f conftest.$ac_objext
2333if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2334 (eval $ac_compile) 2>&5
2335 ac_status=$?
2336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2337 (exit $ac_status); } &&
2338 { ac_try='test -s conftest.$ac_objext'
2339 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2340 (eval $ac_try) 2>&5
2341 ac_status=$?
2342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2343 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002344 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002345else
Martin v. Löwis11437992002-04-12 09:54:03 +00002346 echo "$as_me: failed program was:" >&5
2347cat conftest.$ac_ext >&5
2348ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002349fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002350rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002351fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002352echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2353echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002354if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002355 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002356elif test $ac_cv_prog_cc_g = yes; then
2357 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002358 CFLAGS="-g -O2"
2359 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002360 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002361 fi
2362else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002363 if test "$GCC" = yes; then
2364 CFLAGS="-O2"
2365 else
2366 CFLAGS=
2367 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002368fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002369# Some people use a C++ compiler to compile C. Since we use `exit',
2370# in C++ we need to declare it. In case someone uses the same compiler
2371# for both compiling C and C++ we need to have the C++ compiler decide
2372# the declaration of exit, since it's the most demanding environment.
2373cat >conftest.$ac_ext <<_ACEOF
2374#ifndef __cplusplus
2375 choke me
2376#endif
2377_ACEOF
2378rm -f conftest.$ac_objext
2379if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2380 (eval $ac_compile) 2>&5
2381 ac_status=$?
2382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2383 (exit $ac_status); } &&
2384 { ac_try='test -s conftest.$ac_objext'
2385 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2386 (eval $ac_try) 2>&5
2387 ac_status=$?
2388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2389 (exit $ac_status); }; }; then
2390 for ac_declaration in \
2391 ''\
2392 '#include <stdlib.h>' \
2393 'extern "C" void std::exit (int) throw (); using std::exit;' \
2394 'extern "C" void std::exit (int); using std::exit;' \
2395 'extern "C" void exit (int) throw ();' \
2396 'extern "C" void exit (int);' \
2397 'void exit (int);'
2398do
2399 cat >conftest.$ac_ext <<_ACEOF
2400#line $LINENO "configure"
2401#include "confdefs.h"
2402#include <stdlib.h>
2403$ac_declaration
Barry Warsawfe33b792003-01-07 22:42:49 +00002404#ifdef F77_DUMMY_MAIN
2405# ifdef __cplusplus
2406 extern "C"
2407# endif
2408 int F77_DUMMY_MAIN() { return 1; }
2409#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002410int
2411main ()
2412{
2413exit (42);
2414 ;
2415 return 0;
2416}
2417_ACEOF
2418rm -f conftest.$ac_objext
2419if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2420 (eval $ac_compile) 2>&5
2421 ac_status=$?
2422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2423 (exit $ac_status); } &&
2424 { ac_try='test -s conftest.$ac_objext'
2425 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2426 (eval $ac_try) 2>&5
2427 ac_status=$?
2428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2429 (exit $ac_status); }; }; then
2430 :
2431else
2432 echo "$as_me: failed program was:" >&5
2433cat conftest.$ac_ext >&5
2434continue
2435fi
2436rm -f conftest.$ac_objext conftest.$ac_ext
2437 cat >conftest.$ac_ext <<_ACEOF
2438#line $LINENO "configure"
2439#include "confdefs.h"
2440$ac_declaration
Barry Warsawfe33b792003-01-07 22:42:49 +00002441#ifdef F77_DUMMY_MAIN
2442# ifdef __cplusplus
2443 extern "C"
2444# endif
2445 int F77_DUMMY_MAIN() { return 1; }
2446#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002447int
2448main ()
2449{
2450exit (42);
2451 ;
2452 return 0;
2453}
2454_ACEOF
2455rm -f conftest.$ac_objext
2456if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2457 (eval $ac_compile) 2>&5
2458 ac_status=$?
2459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2460 (exit $ac_status); } &&
2461 { ac_try='test -s conftest.$ac_objext'
2462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2463 (eval $ac_try) 2>&5
2464 ac_status=$?
2465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2466 (exit $ac_status); }; }; then
2467 break
2468else
2469 echo "$as_me: failed program was:" >&5
2470cat conftest.$ac_ext >&5
2471fi
2472rm -f conftest.$ac_objext conftest.$ac_ext
2473done
2474rm -f conftest*
2475if test -n "$ac_declaration"; then
2476 echo '#ifdef __cplusplus' >>confdefs.h
2477 echo $ac_declaration >>confdefs.h
2478 echo '#endif' >>confdefs.h
2479fi
2480
2481else
2482 echo "$as_me: failed program was:" >&5
2483cat conftest.$ac_ext >&5
2484fi
2485rm -f conftest.$ac_objext conftest.$ac_ext
2486ac_ext=c
2487ac_cpp='$CPP $CPPFLAGS'
2488ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2489ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2490ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002491
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002492
2493# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002494
2495ac_ext=c
2496ac_cpp='$CPP $CPPFLAGS'
2497ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2498ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2499ac_compiler_gnu=$ac_cv_c_compiler_gnu
2500echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2501echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002502# On Suns, sometimes $CPP names a directory.
2503if test -n "$CPP" && test -d "$CPP"; then
2504 CPP=
2505fi
2506if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002507 if test "${ac_cv_prog_CPP+set}" = set; then
2508 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002509else
Martin v. Löwis11437992002-04-12 09:54:03 +00002510 # Double quotes because CPP needs to be expanded
2511 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2512 do
2513 ac_preproc_ok=false
2514for ac_c_preproc_warn_flag in '' yes
2515do
2516 # Use a header file that comes with gcc, so configuring glibc
2517 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002518 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002519 # not just through cpp. "Syntax error" is here to catch this case.
2520 cat >conftest.$ac_ext <<_ACEOF
2521#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002522#include "confdefs.h"
2523#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002524 Syntax error
2525_ACEOF
2526if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2527 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2528 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002529 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 rm -f conftest.er1
2531 cat conftest.err >&5
2532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2533 (exit $ac_status); } >/dev/null; then
2534 if test -s conftest.err; then
2535 ac_cpp_err=$ac_c_preproc_warn_flag
2536 else
2537 ac_cpp_err=
2538 fi
2539else
2540 ac_cpp_err=yes
2541fi
2542if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002543 :
2544else
Martin v. Löwis11437992002-04-12 09:54:03 +00002545 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002546 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002547 # Broken: fails on valid input.
2548continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002549fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002550rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002551
Martin v. Löwis11437992002-04-12 09:54:03 +00002552 # OK, works on sane cases. Now check whether non-existent headers
2553 # can be detected and how.
2554 cat >conftest.$ac_ext <<_ACEOF
2555#line $LINENO "configure"
2556#include "confdefs.h"
2557#include <ac_nonexistent.h>
2558_ACEOF
2559if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2560 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2561 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002562 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002563 rm -f conftest.er1
2564 cat conftest.err >&5
2565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2566 (exit $ac_status); } >/dev/null; then
2567 if test -s conftest.err; then
2568 ac_cpp_err=$ac_c_preproc_warn_flag
2569 else
2570 ac_cpp_err=
2571 fi
2572else
2573 ac_cpp_err=yes
2574fi
2575if test -z "$ac_cpp_err"; then
2576 # Broken: success on invalid input.
2577continue
2578else
2579 echo "$as_me: failed program was:" >&5
2580 cat conftest.$ac_ext >&5
2581 # Passes both tests.
2582ac_preproc_ok=:
2583break
2584fi
2585rm -f conftest.err conftest.$ac_ext
2586
2587done
2588# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2589rm -f conftest.err conftest.$ac_ext
2590if $ac_preproc_ok; then
2591 break
2592fi
2593
2594 done
2595 ac_cv_prog_CPP=$CPP
2596
2597fi
2598 CPP=$ac_cv_prog_CPP
2599else
2600 ac_cv_prog_CPP=$CPP
2601fi
2602echo "$as_me:$LINENO: result: $CPP" >&5
2603echo "${ECHO_T}$CPP" >&6
2604ac_preproc_ok=false
2605for ac_c_preproc_warn_flag in '' yes
2606do
2607 # Use a header file that comes with gcc, so configuring glibc
2608 # with a fresh cross-compiler works.
2609 # On the NeXT, cc -E runs the code through the compiler's parser,
2610 # not just through cpp. "Syntax error" is here to catch this case.
2611 cat >conftest.$ac_ext <<_ACEOF
2612#line $LINENO "configure"
2613#include "confdefs.h"
2614#include <assert.h>
2615 Syntax error
2616_ACEOF
2617if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2618 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2619 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002620 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 rm -f conftest.er1
2622 cat conftest.err >&5
2623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2624 (exit $ac_status); } >/dev/null; then
2625 if test -s conftest.err; then
2626 ac_cpp_err=$ac_c_preproc_warn_flag
2627 else
2628 ac_cpp_err=
2629 fi
2630else
2631 ac_cpp_err=yes
2632fi
2633if test -z "$ac_cpp_err"; then
2634 :
2635else
2636 echo "$as_me: failed program was:" >&5
2637 cat conftest.$ac_ext >&5
2638 # Broken: fails on valid input.
2639continue
2640fi
2641rm -f conftest.err conftest.$ac_ext
2642
2643 # OK, works on sane cases. Now check whether non-existent headers
2644 # can be detected and how.
2645 cat >conftest.$ac_ext <<_ACEOF
2646#line $LINENO "configure"
2647#include "confdefs.h"
2648#include <ac_nonexistent.h>
2649_ACEOF
2650if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2651 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2652 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002653 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002654 rm -f conftest.er1
2655 cat conftest.err >&5
2656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2657 (exit $ac_status); } >/dev/null; then
2658 if test -s conftest.err; then
2659 ac_cpp_err=$ac_c_preproc_warn_flag
2660 else
2661 ac_cpp_err=
2662 fi
2663else
2664 ac_cpp_err=yes
2665fi
2666if test -z "$ac_cpp_err"; then
2667 # Broken: success on invalid input.
2668continue
2669else
2670 echo "$as_me: failed program was:" >&5
2671 cat conftest.$ac_ext >&5
2672 # Passes both tests.
2673ac_preproc_ok=:
2674break
2675fi
2676rm -f conftest.err conftest.$ac_ext
2677
2678done
2679# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2680rm -f conftest.err conftest.$ac_ext
2681if $ac_preproc_ok; then
2682 :
2683else
2684 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2685echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2686 { (exit 1); exit 1; }; }
2687fi
2688
2689ac_ext=c
2690ac_cpp='$CPP $CPPFLAGS'
2691ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2692ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2693ac_compiler_gnu=$ac_cv_c_compiler_gnu
2694
2695
2696
2697echo "$as_me:$LINENO: checking for AIX" >&5
2698echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2699cat >conftest.$ac_ext <<_ACEOF
2700#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002701#include "confdefs.h"
2702#ifdef _AIX
2703 yes
2704#endif
2705
Martin v. Löwis11437992002-04-12 09:54:03 +00002706_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002707if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00002708 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002709 echo "$as_me:$LINENO: result: yes" >&5
2710echo "${ECHO_T}yes" >&6
2711cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002712#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002713_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002714
2715else
Martin v. Löwis11437992002-04-12 09:54:03 +00002716 echo "$as_me:$LINENO: result: no" >&5
2717echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002718fi
2719rm -f conftest*
2720
Michael W. Hudson54241132001-12-07 15:38:26 +00002721
Martin v. Löwis11437992002-04-12 09:54:03 +00002722echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2723echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2724if test "${ac_cv_header_stdc+set}" = set; then
2725 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002726else
Martin v. Löwis11437992002-04-12 09:54:03 +00002727 cat >conftest.$ac_ext <<_ACEOF
2728#line $LINENO "configure"
2729#include "confdefs.h"
2730#include <stdlib.h>
2731#include <stdarg.h>
2732#include <string.h>
2733#include <float.h>
2734
2735_ACEOF
2736if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2737 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2738 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002739 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002740 rm -f conftest.er1
2741 cat conftest.err >&5
2742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2743 (exit $ac_status); } >/dev/null; then
2744 if test -s conftest.err; then
2745 ac_cpp_err=$ac_c_preproc_warn_flag
2746 else
2747 ac_cpp_err=
2748 fi
2749else
2750 ac_cpp_err=yes
2751fi
2752if test -z "$ac_cpp_err"; then
2753 ac_cv_header_stdc=yes
2754else
2755 echo "$as_me: failed program was:" >&5
2756 cat conftest.$ac_ext >&5
2757 ac_cv_header_stdc=no
2758fi
2759rm -f conftest.err conftest.$ac_ext
2760
2761if test $ac_cv_header_stdc = yes; then
2762 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2763 cat >conftest.$ac_ext <<_ACEOF
2764#line $LINENO "configure"
2765#include "confdefs.h"
2766#include <string.h>
2767
2768_ACEOF
2769if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00002770 egrep "memchr" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002771 :
2772else
2773 ac_cv_header_stdc=no
2774fi
2775rm -f conftest*
2776
2777fi
2778
2779if test $ac_cv_header_stdc = yes; then
2780 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2781 cat >conftest.$ac_ext <<_ACEOF
2782#line $LINENO "configure"
2783#include "confdefs.h"
2784#include <stdlib.h>
2785
2786_ACEOF
2787if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00002788 egrep "free" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002789 :
2790else
2791 ac_cv_header_stdc=no
2792fi
2793rm -f conftest*
2794
2795fi
2796
2797if test $ac_cv_header_stdc = yes; then
2798 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2799 if test "$cross_compiling" = yes; then
2800 :
2801else
2802 cat >conftest.$ac_ext <<_ACEOF
2803#line $LINENO "configure"
2804#include "confdefs.h"
2805#include <ctype.h>
2806#if ((' ' & 0x0FF) == 0x020)
2807# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2808# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2809#else
2810# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2811 || ('j' <= (c) && (c) <= 'r') \
2812 || ('s' <= (c) && (c) <= 'z'))
2813# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2814#endif
2815
2816#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2817int
2818main ()
2819{
2820 int i;
2821 for (i = 0; i < 256; i++)
2822 if (XOR (islower (i), ISLOWER (i))
2823 || toupper (i) != TOUPPER (i))
2824 exit(2);
2825 exit (0);
2826}
2827_ACEOF
2828rm -f conftest$ac_exeext
2829if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2830 (eval $ac_link) 2>&5
2831 ac_status=$?
2832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2833 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2835 (eval $ac_try) 2>&5
2836 ac_status=$?
2837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2838 (exit $ac_status); }; }; then
2839 :
2840else
2841 echo "$as_me: program exited with status $ac_status" >&5
2842echo "$as_me: failed program was:" >&5
2843cat conftest.$ac_ext >&5
2844( exit $ac_status )
2845ac_cv_header_stdc=no
2846fi
Barry Warsawfe33b792003-01-07 22:42:49 +00002847rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002848fi
2849fi
2850fi
2851echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2852echo "${ECHO_T}$ac_cv_header_stdc" >&6
2853if test $ac_cv_header_stdc = yes; then
2854
2855cat >>confdefs.h <<\_ACEOF
2856#define STDC_HEADERS 1
2857_ACEOF
2858
2859fi
2860
2861# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2872 inttypes.h stdint.h unistd.h
2873do
2874as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2875echo "$as_me:$LINENO: checking for $ac_header" >&5
2876echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2877if eval "test \"\${$as_ac_Header+set}\" = set"; then
2878 echo $ECHO_N "(cached) $ECHO_C" >&6
2879else
2880 cat >conftest.$ac_ext <<_ACEOF
2881#line $LINENO "configure"
2882#include "confdefs.h"
2883$ac_includes_default
2884
2885#include <$ac_header>
2886_ACEOF
2887rm -f conftest.$ac_objext
2888if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2889 (eval $ac_compile) 2>&5
2890 ac_status=$?
2891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2892 (exit $ac_status); } &&
2893 { ac_try='test -s conftest.$ac_objext'
2894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2895 (eval $ac_try) 2>&5
2896 ac_status=$?
2897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2898 (exit $ac_status); }; }; then
2899 eval "$as_ac_Header=yes"
2900else
2901 echo "$as_me: failed program was:" >&5
2902cat conftest.$ac_ext >&5
2903eval "$as_ac_Header=no"
2904fi
2905rm -f conftest.$ac_objext conftest.$ac_ext
2906fi
2907echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2908echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2909if test `eval echo '${'$as_ac_Header'}'` = yes; then
2910 cat >>confdefs.h <<_ACEOF
2911#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2912_ACEOF
2913
2914fi
2915
2916done
2917
2918
2919if test "${ac_cv_header_minix_config_h+set}" = set; then
2920 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2921echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2922if test "${ac_cv_header_minix_config_h+set}" = set; then
2923 echo $ECHO_N "(cached) $ECHO_C" >&6
2924fi
2925echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2926echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2927else
2928 # Is the header compilable?
2929echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2930echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2931cat >conftest.$ac_ext <<_ACEOF
2932#line $LINENO "configure"
2933#include "confdefs.h"
2934$ac_includes_default
2935#include <minix/config.h>
2936_ACEOF
2937rm -f conftest.$ac_objext
2938if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2939 (eval $ac_compile) 2>&5
2940 ac_status=$?
2941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2942 (exit $ac_status); } &&
2943 { ac_try='test -s conftest.$ac_objext'
2944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2945 (eval $ac_try) 2>&5
2946 ac_status=$?
2947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2948 (exit $ac_status); }; }; then
2949 ac_header_compiler=yes
2950else
2951 echo "$as_me: failed program was:" >&5
2952cat conftest.$ac_ext >&5
2953ac_header_compiler=no
2954fi
2955rm -f conftest.$ac_objext conftest.$ac_ext
2956echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2957echo "${ECHO_T}$ac_header_compiler" >&6
2958
2959# Is the header present?
2960echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2961echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2962cat >conftest.$ac_ext <<_ACEOF
2963#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002964#include "confdefs.h"
2965#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002966_ACEOF
2967if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2968 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2969 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002970 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002971 rm -f conftest.er1
2972 cat conftest.err >&5
2973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2974 (exit $ac_status); } >/dev/null; then
2975 if test -s conftest.err; then
2976 ac_cpp_err=$ac_c_preproc_warn_flag
2977 else
2978 ac_cpp_err=
2979 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002980else
Martin v. Löwis11437992002-04-12 09:54:03 +00002981 ac_cpp_err=yes
2982fi
2983if test -z "$ac_cpp_err"; then
2984 ac_header_preproc=yes
2985else
2986 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002987 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002988 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002989fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002990rm -f conftest.err conftest.$ac_ext
2991echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
2992echo "${ECHO_T}$ac_header_preproc" >&6
2993
2994# So? What about this header?
2995case $ac_header_compiler:$ac_header_preproc in
2996 yes:no )
2997 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
2998echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
2999 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
3000echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
3001 no:yes )
3002 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
3003echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
3004 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
3005echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
3006 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
3007echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
3008esac
3009echo "$as_me:$LINENO: checking for minix/config.h" >&5
3010echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3011if test "${ac_cv_header_minix_config_h+set}" = set; then
3012 echo $ECHO_N "(cached) $ECHO_C" >&6
3013else
3014 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003015fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003016echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3017echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3018
3019fi
3020if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003021 MINIX=yes
3022else
Martin v. Löwis11437992002-04-12 09:54:03 +00003023 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003024fi
3025
Martin v. Löwis11437992002-04-12 09:54:03 +00003026
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003027if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003028
3029cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003030#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003031_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003032
Martin v. Löwis11437992002-04-12 09:54:03 +00003033
3034cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003035#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00003036_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003037
Martin v. Löwis11437992002-04-12 09:54:03 +00003038
3039cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003040#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003041_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003042
3043fi
3044
3045
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003046# Check for unsupported systems
3047case $ac_sys_system/$ac_sys_release in
3048SunOS/4*|DYNIX/*|dgux*/*|IRIX/4*|Linux*/1*)
3049 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3050 echo See README for details.
3051 exit 1;;
3052esac
3053
3054if test "$MINIX" = yes; then
3055 echo This system \(MINIX\) is no longer supported.
3056 echo Read README for details.
3057 exit 1
3058fi
3059
Michael W. Hudson54241132001-12-07 15:38:26 +00003060
Martin v. Löwis11437992002-04-12 09:54:03 +00003061echo "$as_me:$LINENO: checking for --with-suffix" >&5
3062echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003063
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003064# Check whether --with-suffix or --without-suffix was given.
3065if test "${with_suffix+set}" = set; then
3066 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003067
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003068 case $withval in
3069 no) EXEEXT=;;
3070 yes) EXEEXT=.exe;;
3071 *) EXEEXT=$withval;;
3072 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003073fi;
3074echo "$as_me:$LINENO: result: $EXEEXT" >&5
3075echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003076
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003077# Test whether we're running on a non-case-sensitive system, in which
3078# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003079
Martin v. Löwis11437992002-04-12 09:54:03 +00003080echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3081echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003082if test ! -d CaseSensitiveTestDir; then
3083mkdir CaseSensitiveTestDir
3084fi
3085
3086if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003087then
Martin v. Löwis11437992002-04-12 09:54:03 +00003088 echo "$as_me:$LINENO: result: yes" >&5
3089echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003090 BUILDEXEEXT=.exe
3091else
Martin v. Löwis11437992002-04-12 09:54:03 +00003092 echo "$as_me:$LINENO: result: no" >&5
3093echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003094 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003095fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003096rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003097
Guido van Rossumdd997f71998-10-07 19:58:26 +00003098case $MACHDEP in
3099bsdos*)
3100 case $CC in
3101 gcc) CC="$CC -D_HAVE_BSDI";;
3102 esac;;
3103esac
3104
Guido van Rossum24b1e751997-08-21 02:29:16 +00003105case $ac_sys_system in
3106hp*|HP*)
3107 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003108 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003109 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003110Monterey*)
3111 case $CC in
3112 cc) CC="$CC -Wl,-Bexport";;
3113 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003114SunOS*)
3115 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003116
3117cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003118#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003119_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003120
3121 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003122esac
3123
Michael W. Hudson54241132001-12-07 15:38:26 +00003124
3125
Martin v. Löwis11437992002-04-12 09:54:03 +00003126echo "$as_me:$LINENO: checking LIBRARY" >&5
3127echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003128if test -z "$LIBRARY"
3129then
3130 LIBRARY='libpython$(VERSION).a'
3131fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003132echo "$as_me:$LINENO: result: $LIBRARY" >&5
3133echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003134
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003135# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003136# name of the library into which to insert object files). BLDLIBRARY is also
3137# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3138# is blank as the main program is not linked directly against LDLIBRARY.
3139# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3140# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3141# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3142# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003143#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003144# RUNSHARED is used to run shared python without installed libraries
3145#
3146# INSTSONAME is the name of the shared library that will be use to install
3147# on the system - some systems like version suffix, others don't
3148
3149
Michael W. Hudson54241132001-12-07 15:38:26 +00003150
3151
3152
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003153
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003154LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003155BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003156INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003157DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003158LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003159RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003160
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003161# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003162# If CXX is set, and if it is needed to link a main function that was
3163# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3164# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003165# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003166# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003167
Martin v. Löwis11437992002-04-12 09:54:03 +00003168echo "$as_me:$LINENO: checking LINKCC" >&5
3169echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003170if test -z "$LINKCC"
3171then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003172 if test -z "$CXX"; then
3173 LINKCC="\$(PURIFY) \$(CC)"
3174 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003175 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003176 $CXX -c conftest.$ac_ext 2>&5
3177 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3178 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3179 then
3180 LINKCC="\$(PURIFY) \$(CC)"
3181 else
3182 LINKCC="\$(PURIFY) \$(CXX)"
3183 fi
3184 rm -fr conftest*
3185 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003186 case $ac_sys_system in
3187 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003188 exp_extra="\"\""
3189 if test $ac_sys_release -ge 5 -o \
3190 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3191 exp_extra="."
3192 fi
3193 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003194 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003195 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003196 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003197 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003198 esac
3199fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003200echo "$as_me:$LINENO: result: $LINKCC" >&5
3201echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003202
Martin v. Löwis11437992002-04-12 09:54:03 +00003203echo "$as_me:$LINENO: checking for --enable-shared" >&5
3204echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003205# Check whether --enable-shared or --disable-shared was given.
3206if test "${enable_shared+set}" = set; then
3207 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003208
Martin v. Löwis11437992002-04-12 09:54:03 +00003209fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003210
3211if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003212then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003213 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003214 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003215 enable_shared="yes";;
3216 *)
3217 enable_shared="no";;
3218 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003219fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003220echo "$as_me:$LINENO: result: $enable_shared" >&5
3221echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003222
3223
Martin v. Löwis11437992002-04-12 09:54:03 +00003224echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3225echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003226
Guido van Rossumb8552162001-09-05 14:58:11 +00003227# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3228# library that we build, but we do not want to link against it (we
3229# will find it with a -framework option). For this reason there is an
3230# extra variable BLDLIBRARY against which Python and the extension
3231# modules are linked, BLDLIBRARY. This is normally the same as
3232# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003233if test "$enable_framework"
3234then
3235 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3236 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3237 BLDLIBRARY=''
3238else
3239 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003240fi
Jack Jansene578a632001-08-15 01:27:14 +00003241
Martin v. Löwis1142de32002-03-29 16:28:31 +00003242# Other platforms follow
3243if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003244
3245cat >>confdefs.h <<\_ACEOF
3246#define Py_ENABLE_SHARED 1
3247_ACEOF
3248
Martin v. Löwis1142de32002-03-29 16:28:31 +00003249 case $ac_sys_system in
3250 BeOS*)
3251 LDLIBRARY='libpython$(VERSION).so'
3252 ;;
3253 CYGWIN*)
3254 LDLIBRARY='libpython$(VERSION).dll.a'
3255 DLLLIBRARY='libpython$(VERSION).dll'
3256 ;;
3257 SunOS*)
3258 LDLIBRARY='libpython$(VERSION).so'
3259 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3260 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3261 ;;
Martin v. Löwis1bc894b2002-07-30 20:19:58 +00003262 Linux*|GNU*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003263 LDLIBRARY='libpython$(VERSION).so'
3264 BLDLIBRARY='-L. -lpython$(VERSION)'
3265 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3266 INSTSONAME="$LDLIBRARY".$SOVERSION
3267 ;;
3268 hp*|HP*)
3269 LDLIBRARY='libpython$(VERSION).sl'
3270 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3271 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3272 ;;
3273 OSF*)
3274 LDLIBRARY='libpython$(VERSION).so'
3275 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3276 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3277 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003278 atheos*)
3279 LDLIBRARY='libpython$(VERSION).so'
3280 BLDLIBRARY='-L. -lpython$(VERSION)'
3281 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3282 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003283 esac
3284 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3285 case $MACHDEP in
3286 dguxR4)
3287 LDLIBRARY='libpython$(VERSION).so'
Skip Montanarodecc6a42003-01-01 20:07:49 +00003288 BASECFLAGS="$BASECFLAGS -pic"
Martin v. Löwis1142de32002-03-29 16:28:31 +00003289 ;;
3290 esac
3291fi
3292
Martin v. Löwis11437992002-04-12 09:54:03 +00003293echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3294echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003295
Martin v. Löwis11437992002-04-12 09:54:03 +00003296if test -n "$ac_tool_prefix"; then
3297 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3298set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3299echo "$as_me:$LINENO: checking for $ac_word" >&5
3300echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3301if test "${ac_cv_prog_RANLIB+set}" = set; then
3302 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003303else
3304 if test -n "$RANLIB"; then
3305 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3306else
Martin v. Löwis11437992002-04-12 09:54:03 +00003307as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3308for as_dir in $PATH
3309do
3310 IFS=$as_save_IFS
3311 test -z "$as_dir" && as_dir=.
3312 for ac_exec_ext in '' $ac_executable_extensions; do
3313 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3314 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3315 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3316 break 2
3317 fi
3318done
3319done
3320
Guido van Rossum627b2d71993-12-24 10:39:16 +00003321fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003322fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003323RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003324if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003325 echo "$as_me:$LINENO: result: $RANLIB" >&5
3326echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003327else
Martin v. Löwis11437992002-04-12 09:54:03 +00003328 echo "$as_me:$LINENO: result: no" >&5
3329echo "${ECHO_T}no" >&6
3330fi
3331
3332fi
3333if test -z "$ac_cv_prog_RANLIB"; then
3334 ac_ct_RANLIB=$RANLIB
3335 # Extract the first word of "ranlib", so it can be a program name with args.
3336set dummy ranlib; ac_word=$2
3337echo "$as_me:$LINENO: checking for $ac_word" >&5
3338echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3339if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3340 echo $ECHO_N "(cached) $ECHO_C" >&6
3341else
3342 if test -n "$ac_ct_RANLIB"; then
3343 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3344else
3345as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3346for as_dir in $PATH
3347do
3348 IFS=$as_save_IFS
3349 test -z "$as_dir" && as_dir=.
3350 for ac_exec_ext in '' $ac_executable_extensions; do
3351 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3352 ac_cv_prog_ac_ct_RANLIB="ranlib"
3353 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3354 break 2
3355 fi
3356done
3357done
3358
3359 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3360fi
3361fi
3362ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3363if test -n "$ac_ct_RANLIB"; then
3364 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3365echo "${ECHO_T}$ac_ct_RANLIB" >&6
3366else
3367 echo "$as_me:$LINENO: result: no" >&5
3368echo "${ECHO_T}no" >&6
3369fi
3370
3371 RANLIB=$ac_ct_RANLIB
3372else
3373 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003374fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003375
3376
Guido van Rossum7f43da71994-08-01 12:15:30 +00003377for ac_prog in ar aal
3378do
Martin v. Löwis11437992002-04-12 09:54:03 +00003379 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003380set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003381echo "$as_me:$LINENO: checking for $ac_word" >&5
3382echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3383if test "${ac_cv_prog_AR+set}" = set; then
3384 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003385else
3386 if test -n "$AR"; then
3387 ac_cv_prog_AR="$AR" # Let the user override the test.
3388else
Martin v. Löwis11437992002-04-12 09:54:03 +00003389as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3390for as_dir in $PATH
3391do
3392 IFS=$as_save_IFS
3393 test -z "$as_dir" && as_dir=.
3394 for ac_exec_ext in '' $ac_executable_extensions; do
3395 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3396 ac_cv_prog_AR="$ac_prog"
3397 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3398 break 2
3399 fi
3400done
3401done
3402
Guido van Rossum7f43da71994-08-01 12:15:30 +00003403fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003404fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003405AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003406if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003407 echo "$as_me:$LINENO: result: $AR" >&5
3408echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003409else
Martin v. Löwis11437992002-04-12 09:54:03 +00003410 echo "$as_me:$LINENO: result: no" >&5
3411echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003412fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003413
Martin v. Löwis11437992002-04-12 09:54:03 +00003414 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003415done
3416test -n "$AR" || AR="ar"
3417
Michael W. Hudson54241132001-12-07 15:38:26 +00003418
Neil Schemenauera42c8272001-03-31 00:01:55 +00003419case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003420bsdos*|hp*|HP*)
3421 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003422 if test -z "$INSTALL"
3423 then
3424 INSTALL="${srcdir}/install-sh -c"
3425 fi
3426esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003427ac_aux_dir=
3428for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3429 if test -f $ac_dir/install-sh; then
3430 ac_aux_dir=$ac_dir
3431 ac_install_sh="$ac_aux_dir/install-sh -c"
3432 break
3433 elif test -f $ac_dir/install.sh; then
3434 ac_aux_dir=$ac_dir
3435 ac_install_sh="$ac_aux_dir/install.sh -c"
3436 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003437 elif test -f $ac_dir/shtool; then
3438 ac_aux_dir=$ac_dir
3439 ac_install_sh="$ac_aux_dir/shtool install -c"
3440 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003441 fi
3442done
3443if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003444 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3445echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3446 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003447fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003448ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3449ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3450ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003451
3452# Find a good install program. We prefer a C program (faster),
3453# so one script is as good as another. But avoid the broken or
3454# incompatible versions:
3455# SysV /etc/install, /usr/sbin/install
3456# SunOS /usr/etc/install
3457# IRIX /sbin/install
3458# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003459# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003460# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3461# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3462# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3463# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003464echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3465echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003466if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003467if test "${ac_cv_path_install+set}" = set; then
3468 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003469else
Martin v. Löwis11437992002-04-12 09:54:03 +00003470 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3471for as_dir in $PATH
3472do
3473 IFS=$as_save_IFS
3474 test -z "$as_dir" && as_dir=.
3475 # Account for people who put trailing slashes in PATH elements.
3476case $as_dir/ in
3477 ./ | .// | /cC/* | \
3478 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3479 /usr/ucb/* ) ;;
3480 *)
3481 # OSF1 and SCO ODT 3.0 have their own names for install.
3482 # Don't use installbsd from OSF since it installs stuff as root
3483 # by default.
3484 for ac_prog in ginstall scoinst install; do
3485 for ac_exec_ext in '' $ac_executable_extensions; do
3486 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3487 if test $ac_prog = install &&
3488 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3489 # AIX install. It has an incompatible calling convention.
3490 :
3491 elif test $ac_prog = install &&
3492 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3493 # program-specific install script used by HP pwplus--don't use.
3494 :
3495 else
3496 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3497 break 3
3498 fi
3499 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003500 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003501 done
3502 ;;
3503esac
3504done
3505
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003506
3507fi
3508 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003509 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003510 else
3511 # As a last resort, use the slow shell script. We don't cache a
3512 # path for INSTALL within a source directory, because that will
3513 # break other packages using the cache if that directory is
3514 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003515 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003516 fi
3517fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003518echo "$as_me:$LINENO: result: $INSTALL" >&5
3519echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003520
3521# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3522# It thinks the first close brace ends the variable substitution.
3523test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3524
Martin v. Löwis11437992002-04-12 09:54:03 +00003525test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003526
3527test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3528
Michael W. Hudson54241132001-12-07 15:38:26 +00003529
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003530# Not every filesystem supports hard links
3531
3532if test -z "$LN" ; then
3533 case $ac_sys_system in
3534 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003535 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003536 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003537 *) LN=ln;;
3538 esac
3539fi
3540
Fred Drake109d9862001-07-11 06:27:56 +00003541# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003542echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3543echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3544
Fred Drake109d9862001-07-11 06:27:56 +00003545# Check whether --with-pydebug or --without-pydebug was given.
3546if test "${with_pydebug+set}" = set; then
3547 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003548
Fred Drake109d9862001-07-11 06:27:56 +00003549if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003550then
3551
3552cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003553#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003554_ACEOF
3555
3556 echo "$as_me:$LINENO: result: yes" >&5
3557echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003558 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003559else echo "$as_me:$LINENO: result: no" >&5
3560echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003561fi
3562else
Martin v. Löwis11437992002-04-12 09:54:03 +00003563 echo "$as_me:$LINENO: result: no" >&5
3564echo "${ECHO_T}no" >&6
3565fi;
Fred Drake109d9862001-07-11 06:27:56 +00003566
Skip Montanarodecc6a42003-01-01 20:07:49 +00003567# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3568# merged with this chunk of code?
3569
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003570# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003571# ------------------------
3572# (The following bit of code is complicated enough - please keep things
3573# indented properly. Just pretend you're editing Python code. ;-)
3574
3575# There are two parallel sets of case statements below, one that checks to
3576# see if OPT was set and one that does BASECFLAGS setting based upon
3577# compiler and platform. BASECFLAGS tweaks need to be made even if the
3578# user set OPT.
3579
3580# tweak OPT based on compiler and platform, only if the user didn't set
3581# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003582
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003583if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003584then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003585 case $GCC in
3586 yes)
3587 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003588 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003589 if test "$Py_DEBUG" = 'true' ; then
3590 # Optimization messes up debuggers, so turn it off for
3591 # debug builds.
3592 OPT="-g -Wall -Wstrict-prototypes"
3593 else
3594 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003595 fi
3596 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003597 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003598 OPT="-O3 -Wall -Wstrict-prototypes"
3599 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003600 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003601 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003602 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3603 ;;
3604 esac
Fred Drake109d9862001-07-11 06:27:56 +00003605 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003606
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003607 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003608 OPT="-O"
3609 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003610 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003611
3612 # The current (beta) Monterey compiler dies with optimizations
3613 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003614 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003615 Monterey*)
3616 OPT=""
3617 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003618 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003619
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003620fi
3621
Skip Montanarodecc6a42003-01-01 20:07:49 +00003622
3623# tweak BASECFLAGS based on compiler and platform
3624case $GCC in
3625yes)
3626 case $ac_sys_system in
3627 SCO_SV*)
3628 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3629 ;;
3630 # is there any other compiler on Darwin besides gcc?
3631 Darwin*)
3632 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp"
3633 ;;
3634 esac
3635 ;;
3636
3637*)
3638 case $ac_sys_system in
3639 OpenUNIX*|UnixWare*)
3640 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3641 ;;
3642 SCO_SV*)
3643 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3644 ;;
3645 esac
3646 ;;
3647esac
3648
Fred Drakee1ceaa02001-12-04 20:55:47 +00003649if test "$Py_DEBUG" = 'true'; then
3650 :
3651else
3652 OPT="-DNDEBUG $OPT"
3653fi
3654
Guido van Rossum563e7081996-09-10 18:20:48 +00003655if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003656then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003657 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003658fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003659
Martin v. Löwis11437992002-04-12 09:54:03 +00003660echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3661echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3662if test "${ac_cv_opt_olimit_ok+set}" = set; then
3663 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003664else
3665 ac_save_cc="$CC"
3666CC="$CC -OPT:Olimit=0"
3667if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003668 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003669else
Martin v. Löwis11437992002-04-12 09:54:03 +00003670 cat >conftest.$ac_ext <<_ACEOF
3671#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003672#include "confdefs.h"
3673int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003674_ACEOF
3675rm -f conftest$ac_exeext
3676if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3677 (eval $ac_link) 2>&5
3678 ac_status=$?
3679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3680 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3682 (eval $ac_try) 2>&5
3683 ac_status=$?
3684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3685 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003686 ac_cv_opt_olimit_ok=yes
3687else
Martin v. Löwis11437992002-04-12 09:54:03 +00003688 echo "$as_me: program exited with status $ac_status" >&5
3689echo "$as_me: failed program was:" >&5
3690cat conftest.$ac_ext >&5
3691( exit $ac_status )
3692ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003693fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003694rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003695fi
Guido van Rossum91922671997-10-09 20:24:13 +00003696CC="$ac_save_cc"
3697fi
3698
Martin v. Löwis11437992002-04-12 09:54:03 +00003699echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3700echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003701if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003702 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003703 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3704 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3705 # environment?
3706 Darwin*)
3707 ;;
3708 *)
3709 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3710 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003711 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003712else
Martin v. Löwis11437992002-04-12 09:54:03 +00003713 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3714echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3715 if test "${ac_cv_olimit_ok+set}" = set; then
3716 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003717else
3718 ac_save_cc="$CC"
3719 CC="$CC -Olimit 1500"
3720 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003721 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003722else
Martin v. Löwis11437992002-04-12 09:54:03 +00003723 cat >conftest.$ac_ext <<_ACEOF
3724#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003725#include "confdefs.h"
3726int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003727_ACEOF
3728rm -f conftest$ac_exeext
3729if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3730 (eval $ac_link) 2>&5
3731 ac_status=$?
3732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3733 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3735 (eval $ac_try) 2>&5
3736 ac_status=$?
3737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3738 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003739 ac_cv_olimit_ok=yes
3740else
Martin v. Löwis11437992002-04-12 09:54:03 +00003741 echo "$as_me: program exited with status $ac_status" >&5
3742echo "$as_me: failed program was:" >&5
3743cat conftest.$ac_ext >&5
3744( exit $ac_status )
3745ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003746fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003747rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003748fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003749 CC="$ac_save_cc"
3750fi
3751
Martin v. Löwis11437992002-04-12 09:54:03 +00003752 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3753echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003754 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003755 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003756 fi
3757fi
3758
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003759# On some compilers, pthreads are available without further options
3760# (e.g. MacOS X). On some of these systems, the compiler will not
3761# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3762# So we have to see first whether pthreads are available without
3763# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003764echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3765echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3766if test "${ac_cv_pthread_is_default+set}" = set; then
3767 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003768else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003769 if test "$cross_compiling" = yes; then
3770 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003771else
Martin v. Löwis11437992002-04-12 09:54:03 +00003772 cat >conftest.$ac_ext <<_ACEOF
3773#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003774#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003775
Martin v. Löwis130fb172001-07-19 11:00:41 +00003776#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003777
3778void* routine(void* p){return NULL;}
3779
3780int main(){
3781 pthread_t p;
3782 if(pthread_create(&p,NULL,routine,NULL)!=0)
3783 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003784 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003785 return 0;
3786}
3787
Martin v. Löwis11437992002-04-12 09:54:03 +00003788_ACEOF
3789rm -f conftest$ac_exeext
3790if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3791 (eval $ac_link) 2>&5
3792 ac_status=$?
3793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3794 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3795 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3796 (eval $ac_try) 2>&5
3797 ac_status=$?
3798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3799 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003800 ac_cv_pthread_is_default=yes
3801else
Martin v. Löwis11437992002-04-12 09:54:03 +00003802 echo "$as_me: program exited with status $ac_status" >&5
3803echo "$as_me: failed program was:" >&5
3804cat conftest.$ac_ext >&5
3805( exit $ac_status )
3806ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003807fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003808rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003809fi
3810
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003811fi
3812
Martin v. Löwis11437992002-04-12 09:54:03 +00003813echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3814echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003815
Michael W. Hudson54241132001-12-07 15:38:26 +00003816
Martin v. Löwis11437992002-04-12 09:54:03 +00003817if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003818then
3819 ac_cv_kpthread=no
3820else
3821# -Kpthread, if available, provides the right #defines
3822# and linker options to make pthread_create available
3823# Some compilers won't report that they do not support -Kpthread,
3824# so we need to run a program to see whether it really made the
3825# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003826echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3827echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3828if test "${ac_cv_kpthread+set}" = set; then
3829 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003830else
3831 ac_save_cc="$CC"
3832CC="$CC -Kpthread"
3833if test "$cross_compiling" = yes; then
3834 ac_cv_kpthread=no
3835else
Martin v. Löwis11437992002-04-12 09:54:03 +00003836 cat >conftest.$ac_ext <<_ACEOF
3837#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003838#include "confdefs.h"
3839
3840#include <pthread.h>
3841
3842void* routine(void* p){return NULL;}
3843
3844int main(){
3845 pthread_t p;
3846 if(pthread_create(&p,NULL,routine,NULL)!=0)
3847 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003848 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003849 return 0;
3850}
3851
Martin v. Löwis11437992002-04-12 09:54:03 +00003852_ACEOF
3853rm -f conftest$ac_exeext
3854if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3855 (eval $ac_link) 2>&5
3856 ac_status=$?
3857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3858 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3860 (eval $ac_try) 2>&5
3861 ac_status=$?
3862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3863 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003864 ac_cv_kpthread=yes
3865else
Martin v. Löwis11437992002-04-12 09:54:03 +00003866 echo "$as_me: program exited with status $ac_status" >&5
3867echo "$as_me: failed program was:" >&5
3868cat conftest.$ac_ext >&5
3869( exit $ac_status )
3870ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003871fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003872rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003873fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003874CC="$ac_save_cc"
3875fi
3876
Martin v. Löwis11437992002-04-12 09:54:03 +00003877echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3878echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003879fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003880
Michael W. Hudson54241132001-12-07 15:38:26 +00003881
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003882# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003883echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3884echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3885if test "${ac_cv_header_stdc+set}" = set; then
3886 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003887else
Martin v. Löwis11437992002-04-12 09:54:03 +00003888 cat >conftest.$ac_ext <<_ACEOF
3889#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003890#include "confdefs.h"
3891#include <stdlib.h>
3892#include <stdarg.h>
3893#include <string.h>
3894#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003895
3896_ACEOF
3897if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3898 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3899 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00003900 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003901 rm -f conftest.er1
3902 cat conftest.err >&5
3903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3904 (exit $ac_status); } >/dev/null; then
3905 if test -s conftest.err; then
3906 ac_cpp_err=$ac_c_preproc_warn_flag
3907 else
3908 ac_cpp_err=
3909 fi
3910else
3911 ac_cpp_err=yes
3912fi
3913if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003914 ac_cv_header_stdc=yes
3915else
Martin v. Löwis11437992002-04-12 09:54:03 +00003916 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003917 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003918 ac_cv_header_stdc=no
3919fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003920rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003921
3922if test $ac_cv_header_stdc = yes; then
3923 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003924 cat >conftest.$ac_ext <<_ACEOF
3925#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003926#include "confdefs.h"
3927#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003928
3929_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003930if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00003931 egrep "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003932 :
3933else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003934 ac_cv_header_stdc=no
3935fi
3936rm -f conftest*
3937
3938fi
3939
3940if test $ac_cv_header_stdc = yes; then
3941 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003942 cat >conftest.$ac_ext <<_ACEOF
3943#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003944#include "confdefs.h"
3945#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003946
3947_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003948if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00003949 egrep "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003950 :
3951else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003952 ac_cv_header_stdc=no
3953fi
3954rm -f conftest*
3955
3956fi
3957
3958if test $ac_cv_header_stdc = yes; then
3959 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00003960 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003961 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003962else
Martin v. Löwis11437992002-04-12 09:54:03 +00003963 cat >conftest.$ac_ext <<_ACEOF
3964#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003965#include "confdefs.h"
3966#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003967#if ((' ' & 0x0FF) == 0x020)
3968# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3969# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3970#else
3971# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3972 || ('j' <= (c) && (c) <= 'r') \
3973 || ('s' <= (c) && (c) <= 'z'))
3974# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3975#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003976
Martin v. Löwis11437992002-04-12 09:54:03 +00003977#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3978int
3979main ()
3980{
3981 int i;
3982 for (i = 0; i < 256; i++)
3983 if (XOR (islower (i), ISLOWER (i))
3984 || toupper (i) != TOUPPER (i))
3985 exit(2);
3986 exit (0);
3987}
3988_ACEOF
3989rm -f conftest$ac_exeext
3990if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3991 (eval $ac_link) 2>&5
3992 ac_status=$?
3993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3994 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3996 (eval $ac_try) 2>&5
3997 ac_status=$?
3998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3999 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004000 :
4001else
Martin v. Löwis11437992002-04-12 09:54:03 +00004002 echo "$as_me: program exited with status $ac_status" >&5
4003echo "$as_me: failed program was:" >&5
4004cat conftest.$ac_ext >&5
4005( exit $ac_status )
4006ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004007fi
Barry Warsawfe33b792003-01-07 22:42:49 +00004008rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004009fi
4010fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004011fi
4012echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4013echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004014if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004015
4016cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004017#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004018_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004019
4020fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004021
Martin v. Löwis11437992002-04-12 09:54:03 +00004022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004059
Barry Warsawfe33b792003-01-07 22:42:49 +00004060
Martin v. Löwis11437992002-04-12 09:54:03 +00004061for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004062libintl.h locale.h ncurses.h poll.h pthread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004063signal.h stdarg.h stddef.h stdlib.h stropts.h termios.h thread.h \
4064unistd.h utime.h \
Skip Montanaro57454e52002-06-14 20:30:31 +00004065sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004066sys/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 +00004067sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Barry Warsawfe33b792003-01-07 22:42:49 +00004068sys/resource.h netpacket/packet.h sysexits.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004069do
Martin v. Löwis11437992002-04-12 09:54:03 +00004070as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4071if eval "test \"\${$as_ac_Header+set}\" = set"; then
4072 echo "$as_me:$LINENO: checking for $ac_header" >&5
4073echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4074if eval "test \"\${$as_ac_Header+set}\" = set"; then
4075 echo $ECHO_N "(cached) $ECHO_C" >&6
4076fi
4077echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4078echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004079else
Martin v. Löwis11437992002-04-12 09:54:03 +00004080 # Is the header compilable?
4081echo "$as_me:$LINENO: checking $ac_header usability" >&5
4082echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4083cat >conftest.$ac_ext <<_ACEOF
4084#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004085#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004086$ac_includes_default
4087#include <$ac_header>
4088_ACEOF
4089rm -f conftest.$ac_objext
4090if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4091 (eval $ac_compile) 2>&5
4092 ac_status=$?
4093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4094 (exit $ac_status); } &&
4095 { ac_try='test -s conftest.$ac_objext'
4096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4097 (eval $ac_try) 2>&5
4098 ac_status=$?
4099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4100 (exit $ac_status); }; }; then
4101 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004102else
Martin v. Löwis11437992002-04-12 09:54:03 +00004103 echo "$as_me: failed program was:" >&5
4104cat conftest.$ac_ext >&5
4105ac_header_compiler=no
4106fi
4107rm -f conftest.$ac_objext conftest.$ac_ext
4108echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4109echo "${ECHO_T}$ac_header_compiler" >&6
4110
4111# Is the header present?
4112echo "$as_me:$LINENO: checking $ac_header presence" >&5
4113echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4114cat >conftest.$ac_ext <<_ACEOF
4115#line $LINENO "configure"
4116#include "confdefs.h"
4117#include <$ac_header>
4118_ACEOF
4119if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4120 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4121 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004122 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004123 rm -f conftest.er1
4124 cat conftest.err >&5
4125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4126 (exit $ac_status); } >/dev/null; then
4127 if test -s conftest.err; then
4128 ac_cpp_err=$ac_c_preproc_warn_flag
4129 else
4130 ac_cpp_err=
4131 fi
4132else
4133 ac_cpp_err=yes
4134fi
4135if test -z "$ac_cpp_err"; then
4136 ac_header_preproc=yes
4137else
4138 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004139 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004140 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004141fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004142rm -f conftest.err conftest.$ac_ext
4143echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4144echo "${ECHO_T}$ac_header_preproc" >&6
4145
4146# So? What about this header?
4147case $ac_header_compiler:$ac_header_preproc in
4148 yes:no )
4149 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4150echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4151 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4152echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4153 no:yes )
4154 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4155echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4156 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4157echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4158 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4159echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4160esac
4161echo "$as_me:$LINENO: checking for $ac_header" >&5
4162echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4163if eval "test \"\${$as_ac_Header+set}\" = set"; then
4164 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004165else
Martin v. Löwis11437992002-04-12 09:54:03 +00004166 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004167fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004168echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4169echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4170
4171fi
4172if test `eval echo '${'$as_ac_Header'}'` = yes; then
4173 cat >>confdefs.h <<_ACEOF
4174#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4175_ACEOF
4176
4177fi
4178
Guido van Rossum627b2d71993-12-24 10:39:16 +00004179done
4180
Martin v. Löwis11437992002-04-12 09:54:03 +00004181
4182
4183
4184
4185
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004186ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004187for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4188 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4189echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4190echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4191if eval "test \"\${$as_ac_Header+set}\" = set"; then
4192 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004193else
Martin v. Löwis11437992002-04-12 09:54:03 +00004194 cat >conftest.$ac_ext <<_ACEOF
4195#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004196#include "confdefs.h"
4197#include <sys/types.h>
4198#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004199
Barry Warsawfe33b792003-01-07 22:42:49 +00004200#ifdef F77_DUMMY_MAIN
4201# ifdef __cplusplus
4202 extern "C"
4203# endif
4204 int F77_DUMMY_MAIN() { return 1; }
4205#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004206int
4207main ()
4208{
4209if ((DIR *) 0)
4210return 0;
4211 ;
4212 return 0;
4213}
4214_ACEOF
4215rm -f conftest.$ac_objext
4216if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4217 (eval $ac_compile) 2>&5
4218 ac_status=$?
4219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4220 (exit $ac_status); } &&
4221 { ac_try='test -s conftest.$ac_objext'
4222 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4223 (eval $ac_try) 2>&5
4224 ac_status=$?
4225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4226 (exit $ac_status); }; }; then
4227 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004228else
Martin v. Löwis11437992002-04-12 09:54:03 +00004229 echo "$as_me: failed program was:" >&5
4230cat conftest.$ac_ext >&5
4231eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004232fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004233rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004234fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004235echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4236echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4237if test `eval echo '${'$as_ac_Header'}'` = yes; then
4238 cat >>confdefs.h <<_ACEOF
4239#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4240_ACEOF
4241
4242ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004243fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004244
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004245done
4246# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4247if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004248 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4249echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4250if test "${ac_cv_search_opendir+set}" = set; then
4251 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004252else
Martin v. Löwis11437992002-04-12 09:54:03 +00004253 ac_func_search_save_LIBS=$LIBS
4254ac_cv_search_opendir=no
4255cat >conftest.$ac_ext <<_ACEOF
4256#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004257#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004258
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004259/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004260#ifdef __cplusplus
4261extern "C"
4262#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004263/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004264 builtin and then its argument prototype would still apply. */
4265char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004266#ifdef F77_DUMMY_MAIN
4267# ifdef __cplusplus
4268 extern "C"
4269# endif
4270 int F77_DUMMY_MAIN() { return 1; }
4271#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004272int
4273main ()
4274{
4275opendir ();
4276 ;
4277 return 0;
4278}
4279_ACEOF
4280rm -f conftest.$ac_objext conftest$ac_exeext
4281if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4282 (eval $ac_link) 2>&5
4283 ac_status=$?
4284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4285 (exit $ac_status); } &&
4286 { ac_try='test -s conftest$ac_exeext'
4287 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4288 (eval $ac_try) 2>&5
4289 ac_status=$?
4290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4291 (exit $ac_status); }; }; then
4292 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004293else
Martin v. Löwis11437992002-04-12 09:54:03 +00004294 echo "$as_me: failed program was:" >&5
4295cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004296fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004297rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4298if test "$ac_cv_search_opendir" = no; then
4299 for ac_lib in dir; do
4300 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4301 cat >conftest.$ac_ext <<_ACEOF
4302#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004303#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004304
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004305/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004306#ifdef __cplusplus
4307extern "C"
4308#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004309/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004310 builtin and then its argument prototype would still apply. */
4311char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004312#ifdef F77_DUMMY_MAIN
4313# ifdef __cplusplus
4314 extern "C"
4315# endif
4316 int F77_DUMMY_MAIN() { return 1; }
4317#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004318int
4319main ()
4320{
4321opendir ();
4322 ;
4323 return 0;
4324}
4325_ACEOF
4326rm -f conftest.$ac_objext conftest$ac_exeext
4327if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4328 (eval $ac_link) 2>&5
4329 ac_status=$?
4330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4331 (exit $ac_status); } &&
4332 { ac_try='test -s conftest$ac_exeext'
4333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4334 (eval $ac_try) 2>&5
4335 ac_status=$?
4336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4337 (exit $ac_status); }; }; then
4338 ac_cv_search_opendir="-l$ac_lib"
4339break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004340else
Martin v. Löwis11437992002-04-12 09:54:03 +00004341 echo "$as_me: failed program was:" >&5
4342cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004343fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004344rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4345 done
4346fi
4347LIBS=$ac_func_search_save_LIBS
4348fi
4349echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4350echo "${ECHO_T}$ac_cv_search_opendir" >&6
4351if test "$ac_cv_search_opendir" != no; then
4352 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004353
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004354fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004355
Michael W. Hudson54241132001-12-07 15:38:26 +00004356else
Martin v. Löwis11437992002-04-12 09:54:03 +00004357 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4358echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4359if test "${ac_cv_search_opendir+set}" = set; then
4360 echo $ECHO_N "(cached) $ECHO_C" >&6
4361else
4362 ac_func_search_save_LIBS=$LIBS
4363ac_cv_search_opendir=no
4364cat >conftest.$ac_ext <<_ACEOF
4365#line $LINENO "configure"
4366#include "confdefs.h"
4367
4368/* Override any gcc2 internal prototype to avoid an error. */
4369#ifdef __cplusplus
4370extern "C"
4371#endif
4372/* We use char because int might match the return type of a gcc2
4373 builtin and then its argument prototype would still apply. */
4374char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004375#ifdef F77_DUMMY_MAIN
4376# ifdef __cplusplus
4377 extern "C"
4378# endif
4379 int F77_DUMMY_MAIN() { return 1; }
4380#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004381int
4382main ()
4383{
4384opendir ();
4385 ;
4386 return 0;
4387}
4388_ACEOF
4389rm -f conftest.$ac_objext conftest$ac_exeext
4390if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4391 (eval $ac_link) 2>&5
4392 ac_status=$?
4393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4394 (exit $ac_status); } &&
4395 { ac_try='test -s conftest$ac_exeext'
4396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4397 (eval $ac_try) 2>&5
4398 ac_status=$?
4399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4400 (exit $ac_status); }; }; then
4401 ac_cv_search_opendir="none required"
4402else
4403 echo "$as_me: failed program was:" >&5
4404cat conftest.$ac_ext >&5
4405fi
4406rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4407if test "$ac_cv_search_opendir" = no; then
4408 for ac_lib in x; do
4409 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4410 cat >conftest.$ac_ext <<_ACEOF
4411#line $LINENO "configure"
4412#include "confdefs.h"
4413
4414/* Override any gcc2 internal prototype to avoid an error. */
4415#ifdef __cplusplus
4416extern "C"
4417#endif
4418/* We use char because int might match the return type of a gcc2
4419 builtin and then its argument prototype would still apply. */
4420char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004421#ifdef F77_DUMMY_MAIN
4422# ifdef __cplusplus
4423 extern "C"
4424# endif
4425 int F77_DUMMY_MAIN() { return 1; }
4426#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004427int
4428main ()
4429{
4430opendir ();
4431 ;
4432 return 0;
4433}
4434_ACEOF
4435rm -f conftest.$ac_objext conftest$ac_exeext
4436if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4437 (eval $ac_link) 2>&5
4438 ac_status=$?
4439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4440 (exit $ac_status); } &&
4441 { ac_try='test -s conftest$ac_exeext'
4442 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4443 (eval $ac_try) 2>&5
4444 ac_status=$?
4445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4446 (exit $ac_status); }; }; then
4447 ac_cv_search_opendir="-l$ac_lib"
4448break
4449else
4450 echo "$as_me: failed program was:" >&5
4451cat conftest.$ac_ext >&5
4452fi
4453rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4454 done
4455fi
4456LIBS=$ac_func_search_save_LIBS
4457fi
4458echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4459echo "${ECHO_T}$ac_cv_search_opendir" >&6
4460if test "$ac_cv_search_opendir" != no; then
4461 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4462
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004463fi
4464
4465fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004466
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004467echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4468echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4469if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4470 echo $ECHO_N "(cached) $ECHO_C" >&6
4471else
4472 cat >conftest.$ac_ext <<_ACEOF
4473#line $LINENO "configure"
4474#include "confdefs.h"
4475#include <sys/types.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00004476#ifdef F77_DUMMY_MAIN
4477# ifdef __cplusplus
4478 extern "C"
4479# endif
4480 int F77_DUMMY_MAIN() { return 1; }
4481#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004482int
4483main ()
4484{
4485return makedev(0, 0);
4486 ;
4487 return 0;
4488}
4489_ACEOF
4490rm -f conftest.$ac_objext conftest$ac_exeext
4491if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4492 (eval $ac_link) 2>&5
4493 ac_status=$?
4494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4495 (exit $ac_status); } &&
4496 { ac_try='test -s conftest$ac_exeext'
4497 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4498 (eval $ac_try) 2>&5
4499 ac_status=$?
4500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4501 (exit $ac_status); }; }; then
4502 ac_cv_header_sys_types_h_makedev=yes
4503else
4504 echo "$as_me: failed program was:" >&5
4505cat conftest.$ac_ext >&5
4506ac_cv_header_sys_types_h_makedev=no
4507fi
4508rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4509
4510fi
4511echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4512echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4513
4514if test $ac_cv_header_sys_types_h_makedev = no; then
4515if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4516 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4517echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4518if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4519 echo $ECHO_N "(cached) $ECHO_C" >&6
4520fi
4521echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4522echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4523else
4524 # Is the header compilable?
4525echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4526echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4527cat >conftest.$ac_ext <<_ACEOF
4528#line $LINENO "configure"
4529#include "confdefs.h"
4530$ac_includes_default
4531#include <sys/mkdev.h>
4532_ACEOF
4533rm -f conftest.$ac_objext
4534if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4535 (eval $ac_compile) 2>&5
4536 ac_status=$?
4537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4538 (exit $ac_status); } &&
4539 { ac_try='test -s conftest.$ac_objext'
4540 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4541 (eval $ac_try) 2>&5
4542 ac_status=$?
4543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4544 (exit $ac_status); }; }; then
4545 ac_header_compiler=yes
4546else
4547 echo "$as_me: failed program was:" >&5
4548cat conftest.$ac_ext >&5
4549ac_header_compiler=no
4550fi
4551rm -f conftest.$ac_objext conftest.$ac_ext
4552echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4553echo "${ECHO_T}$ac_header_compiler" >&6
4554
4555# Is the header present?
4556echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4557echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4558cat >conftest.$ac_ext <<_ACEOF
4559#line $LINENO "configure"
4560#include "confdefs.h"
4561#include <sys/mkdev.h>
4562_ACEOF
4563if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4564 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4565 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004566 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004567 rm -f conftest.er1
4568 cat conftest.err >&5
4569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4570 (exit $ac_status); } >/dev/null; then
4571 if test -s conftest.err; then
4572 ac_cpp_err=$ac_c_preproc_warn_flag
4573 else
4574 ac_cpp_err=
4575 fi
4576else
4577 ac_cpp_err=yes
4578fi
4579if test -z "$ac_cpp_err"; then
4580 ac_header_preproc=yes
4581else
4582 echo "$as_me: failed program was:" >&5
4583 cat conftest.$ac_ext >&5
4584 ac_header_preproc=no
4585fi
4586rm -f conftest.err conftest.$ac_ext
4587echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4588echo "${ECHO_T}$ac_header_preproc" >&6
4589
4590# So? What about this header?
4591case $ac_header_compiler:$ac_header_preproc in
4592 yes:no )
4593 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4594echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4595 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4596echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4597 no:yes )
4598 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4599echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4600 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4601echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4602 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4603echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4604esac
4605echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4606echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4607if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4608 echo $ECHO_N "(cached) $ECHO_C" >&6
4609else
4610 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4611fi
4612echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4613echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4614
4615fi
4616if test $ac_cv_header_sys_mkdev_h = yes; then
4617
4618cat >>confdefs.h <<\_ACEOF
4619#define MAJOR_IN_MKDEV 1
4620_ACEOF
4621
4622fi
4623
4624
4625
4626 if test $ac_cv_header_sys_mkdev_h = no; then
4627 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4628 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4629echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4630if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4631 echo $ECHO_N "(cached) $ECHO_C" >&6
4632fi
4633echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4634echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4635else
4636 # Is the header compilable?
4637echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4638echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4639cat >conftest.$ac_ext <<_ACEOF
4640#line $LINENO "configure"
4641#include "confdefs.h"
4642$ac_includes_default
4643#include <sys/sysmacros.h>
4644_ACEOF
4645rm -f conftest.$ac_objext
4646if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4647 (eval $ac_compile) 2>&5
4648 ac_status=$?
4649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4650 (exit $ac_status); } &&
4651 { ac_try='test -s conftest.$ac_objext'
4652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4653 (eval $ac_try) 2>&5
4654 ac_status=$?
4655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4656 (exit $ac_status); }; }; then
4657 ac_header_compiler=yes
4658else
4659 echo "$as_me: failed program was:" >&5
4660cat conftest.$ac_ext >&5
4661ac_header_compiler=no
4662fi
4663rm -f conftest.$ac_objext conftest.$ac_ext
4664echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4665echo "${ECHO_T}$ac_header_compiler" >&6
4666
4667# Is the header present?
4668echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
4669echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
4670cat >conftest.$ac_ext <<_ACEOF
4671#line $LINENO "configure"
4672#include "confdefs.h"
4673#include <sys/sysmacros.h>
4674_ACEOF
4675if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4676 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4677 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004678 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004679 rm -f conftest.er1
4680 cat conftest.err >&5
4681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4682 (exit $ac_status); } >/dev/null; then
4683 if test -s conftest.err; then
4684 ac_cpp_err=$ac_c_preproc_warn_flag
4685 else
4686 ac_cpp_err=
4687 fi
4688else
4689 ac_cpp_err=yes
4690fi
4691if test -z "$ac_cpp_err"; then
4692 ac_header_preproc=yes
4693else
4694 echo "$as_me: failed program was:" >&5
4695 cat conftest.$ac_ext >&5
4696 ac_header_preproc=no
4697fi
4698rm -f conftest.err conftest.$ac_ext
4699echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4700echo "${ECHO_T}$ac_header_preproc" >&6
4701
4702# So? What about this header?
4703case $ac_header_compiler:$ac_header_preproc in
4704 yes:no )
4705 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
4706echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4707 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4708echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4709 no:yes )
4710 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
4711echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
4712 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
4713echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
4714 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4715echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4716esac
4717echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4718echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4719if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4720 echo $ECHO_N "(cached) $ECHO_C" >&6
4721else
4722 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
4723fi
4724echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4725echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4726
4727fi
4728if test $ac_cv_header_sys_sysmacros_h = yes; then
4729
4730cat >>confdefs.h <<\_ACEOF
4731#define MAJOR_IN_SYSMACROS 1
4732_ACEOF
4733
4734fi
4735
4736
4737 fi
4738fi
4739
Michael W. Hudson54241132001-12-07 15:38:26 +00004740
Guido van Rossum627b2d71993-12-24 10:39:16 +00004741# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004742was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004743echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4744echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4745cat >conftest.$ac_ext <<_ACEOF
4746#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004747#include "confdefs.h"
4748#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004749
4750_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004751if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00004752 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004753 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004754else
Martin v. Löwis11437992002-04-12 09:54:03 +00004755
4756
4757cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004758#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004759_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004760
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004761
Guido van Rossum627b2d71993-12-24 10:39:16 +00004762fi
4763rm -f conftest*
4764
Martin v. Löwis11437992002-04-12 09:54:03 +00004765echo "$as_me:$LINENO: result: $was_it_defined" >&5
4766echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004767
Neal Norwitz11690112002-07-30 01:08:28 +00004768# Check whether using makedev requires defining _OSF_SOURCE
4769echo "$as_me:$LINENO: checking for makedev" >&5
4770echo $ECHO_N "checking for makedev... $ECHO_C" >&6
4771cat >conftest.$ac_ext <<_ACEOF
4772#line $LINENO "configure"
4773#include "confdefs.h"
Neal Norwitz6eb37f02003-02-23 23:28:15 +00004774#include <sys/types.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00004775#ifdef F77_DUMMY_MAIN
4776# ifdef __cplusplus
4777 extern "C"
4778# endif
4779 int F77_DUMMY_MAIN() { return 1; }
4780#endif
Neal Norwitz11690112002-07-30 01:08:28 +00004781int
4782main ()
4783{
4784 makedev(0, 0)
4785 ;
4786 return 0;
4787}
4788_ACEOF
4789rm -f conftest.$ac_objext conftest$ac_exeext
4790if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4791 (eval $ac_link) 2>&5
4792 ac_status=$?
4793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4794 (exit $ac_status); } &&
4795 { ac_try='test -s conftest$ac_exeext'
4796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4797 (eval $ac_try) 2>&5
4798 ac_status=$?
4799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4800 (exit $ac_status); }; }; then
4801 ac_cv_has_makedev=yes
4802else
4803 echo "$as_me: failed program was:" >&5
4804cat conftest.$ac_ext >&5
4805ac_cv_has_makedev=no
4806fi
4807rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4808if test "$ac_cv_has_makedev" = "no"; then
4809 # we didn't link, try if _OSF_SOURCE will allow us to link
4810 cat >conftest.$ac_ext <<_ACEOF
4811#line $LINENO "configure"
4812#include "confdefs.h"
4813
Neal Norwitz6eb37f02003-02-23 23:28:15 +00004814#define _OSF_SOURCE 1
4815#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00004816
Barry Warsawfe33b792003-01-07 22:42:49 +00004817#ifdef F77_DUMMY_MAIN
4818# ifdef __cplusplus
4819 extern "C"
4820# endif
4821 int F77_DUMMY_MAIN() { return 1; }
4822#endif
Neal Norwitz11690112002-07-30 01:08:28 +00004823int
4824main ()
4825{
4826 makedev(0, 0)
4827 ;
4828 return 0;
4829}
4830_ACEOF
4831rm -f conftest.$ac_objext conftest$ac_exeext
4832if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4833 (eval $ac_link) 2>&5
4834 ac_status=$?
4835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4836 (exit $ac_status); } &&
4837 { ac_try='test -s conftest$ac_exeext'
4838 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4839 (eval $ac_try) 2>&5
4840 ac_status=$?
4841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4842 (exit $ac_status); }; }; then
4843 ac_cv_has_makedev=yes
4844else
4845 echo "$as_me: failed program was:" >&5
4846cat conftest.$ac_ext >&5
4847ac_cv_has_makedev=no
4848fi
4849rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4850 if test "$ac_cv_has_makedev" = "yes"; then
4851
4852cat >>confdefs.h <<\_ACEOF
4853#define _OSF_SOURCE 1
4854_ACEOF
4855
4856 fi
4857fi
4858echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
4859echo "${ECHO_T}$ac_cv_has_makedev" >&6
4860if test "$ac_cv_has_makedev" = "yes"; then
4861
4862cat >>confdefs.h <<\_ACEOF
4863#define HAVE_MAKEDEV 1
4864_ACEOF
4865
4866fi
4867
Martin v. Löwis399a6892002-10-04 10:22:02 +00004868# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
4869# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
4870# defined, but the compiler does not support pragma redefine_extname,
4871# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
4872# structures (such as rlimit64) without declaring them. As a
4873# work-around, disable LFS on such configurations
4874
4875use_lfs=yes
4876echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
4877echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
4878cat >conftest.$ac_ext <<_ACEOF
4879#line $LINENO "configure"
4880#include "confdefs.h"
4881
4882#define _LARGEFILE_SOURCE 1
4883#define _FILE_OFFSET_BITS 64
4884#include <sys/resource.h>
4885
Barry Warsawfe33b792003-01-07 22:42:49 +00004886#ifdef F77_DUMMY_MAIN
4887# ifdef __cplusplus
4888 extern "C"
4889# endif
4890 int F77_DUMMY_MAIN() { return 1; }
4891#endif
Martin v. Löwis399a6892002-10-04 10:22:02 +00004892int
4893main ()
4894{
4895struct rlimit foo;
4896 ;
4897 return 0;
4898}
4899_ACEOF
4900rm -f conftest.$ac_objext
4901if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4902 (eval $ac_compile) 2>&5
4903 ac_status=$?
4904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4905 (exit $ac_status); } &&
4906 { ac_try='test -s conftest.$ac_objext'
4907 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4908 (eval $ac_try) 2>&5
4909 ac_status=$?
4910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4911 (exit $ac_status); }; }; then
4912 sol_lfs_bug=no
4913else
4914 echo "$as_me: failed program was:" >&5
4915cat conftest.$ac_ext >&5
4916sol_lfs_bug=yes
4917fi
4918rm -f conftest.$ac_objext conftest.$ac_ext
4919echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
4920echo "${ECHO_T}$sol_lfs_bug" >&6
4921if test "$sol_lfs_bug" = "yes"; then
4922 use_lfs=no
4923fi
4924
4925if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00004926# Two defines needed to enable largefile support on various platforms
4927# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004928
Martin v. Löwis11437992002-04-12 09:54:03 +00004929cat >>confdefs.h <<\_ACEOF
4930#define _LARGEFILE_SOURCE 1
4931_ACEOF
4932
4933
4934cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004935#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004936_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004937
Martin v. Löwis399a6892002-10-04 10:22:02 +00004938fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004939
Guido van Rossum84e7b241996-08-19 21:59:00 +00004940# Add some code to confdefs.h so that the test for off_t works on SCO
4941cat >> confdefs.h <<\EOF
4942#if defined(SCO_DS)
4943#undef _OFF_T
4944#endif
4945EOF
4946
Guido van Rossumef2255b2000-03-10 22:30:29 +00004947# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004948echo "$as_me:$LINENO: checking for mode_t" >&5
4949echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4950if test "${ac_cv_type_mode_t+set}" = set; then
4951 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004952else
Martin v. Löwis11437992002-04-12 09:54:03 +00004953 cat >conftest.$ac_ext <<_ACEOF
4954#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004955#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004956$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00004957#ifdef F77_DUMMY_MAIN
4958# ifdef __cplusplus
4959 extern "C"
4960# endif
4961 int F77_DUMMY_MAIN() { return 1; }
4962#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004963int
4964main ()
4965{
4966if ((mode_t *) 0)
4967 return 0;
4968if (sizeof (mode_t))
4969 return 0;
4970 ;
4971 return 0;
4972}
4973_ACEOF
4974rm -f conftest.$ac_objext
4975if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4976 (eval $ac_compile) 2>&5
4977 ac_status=$?
4978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4979 (exit $ac_status); } &&
4980 { ac_try='test -s conftest.$ac_objext'
4981 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4982 (eval $ac_try) 2>&5
4983 ac_status=$?
4984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4985 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00004986 ac_cv_type_mode_t=yes
4987else
Martin v. Löwis11437992002-04-12 09:54:03 +00004988 echo "$as_me: failed program was:" >&5
4989cat conftest.$ac_ext >&5
4990ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00004991fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004992rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004993fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004994echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4995echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4996if test $ac_cv_type_mode_t = yes; then
4997 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004998else
Martin v. Löwis11437992002-04-12 09:54:03 +00004999
5000cat >>confdefs.h <<_ACEOF
5001#define mode_t int
5002_ACEOF
5003
5004fi
5005
5006echo "$as_me:$LINENO: checking for off_t" >&5
5007echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5008if test "${ac_cv_type_off_t+set}" = set; then
5009 echo $ECHO_N "(cached) $ECHO_C" >&6
5010else
5011 cat >conftest.$ac_ext <<_ACEOF
5012#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005013#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005014$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005015#ifdef F77_DUMMY_MAIN
5016# ifdef __cplusplus
5017 extern "C"
5018# endif
5019 int F77_DUMMY_MAIN() { return 1; }
5020#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005021int
5022main ()
5023{
5024if ((off_t *) 0)
5025 return 0;
5026if (sizeof (off_t))
5027 return 0;
5028 ;
5029 return 0;
5030}
5031_ACEOF
5032rm -f conftest.$ac_objext
5033if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5034 (eval $ac_compile) 2>&5
5035 ac_status=$?
5036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5037 (exit $ac_status); } &&
5038 { ac_try='test -s conftest.$ac_objext'
5039 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5040 (eval $ac_try) 2>&5
5041 ac_status=$?
5042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5043 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005044 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005045else
Martin v. Löwis11437992002-04-12 09:54:03 +00005046 echo "$as_me: failed program was:" >&5
5047cat conftest.$ac_ext >&5
5048ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005049fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005050rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005051fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005052echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5053echo "${ECHO_T}$ac_cv_type_off_t" >&6
5054if test $ac_cv_type_off_t = yes; then
5055 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005056else
Martin v. Löwis11437992002-04-12 09:54:03 +00005057
5058cat >>confdefs.h <<_ACEOF
5059#define off_t long
5060_ACEOF
5061
5062fi
5063
5064echo "$as_me:$LINENO: checking for pid_t" >&5
5065echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5066if test "${ac_cv_type_pid_t+set}" = set; then
5067 echo $ECHO_N "(cached) $ECHO_C" >&6
5068else
5069 cat >conftest.$ac_ext <<_ACEOF
5070#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005071#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005072$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005073#ifdef F77_DUMMY_MAIN
5074# ifdef __cplusplus
5075 extern "C"
5076# endif
5077 int F77_DUMMY_MAIN() { return 1; }
5078#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005079int
5080main ()
5081{
5082if ((pid_t *) 0)
5083 return 0;
5084if (sizeof (pid_t))
5085 return 0;
5086 ;
5087 return 0;
5088}
5089_ACEOF
5090rm -f conftest.$ac_objext
5091if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5092 (eval $ac_compile) 2>&5
5093 ac_status=$?
5094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5095 (exit $ac_status); } &&
5096 { ac_try='test -s conftest.$ac_objext'
5097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5098 (eval $ac_try) 2>&5
5099 ac_status=$?
5100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5101 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005102 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005103else
Martin v. Löwis11437992002-04-12 09:54:03 +00005104 echo "$as_me: failed program was:" >&5
5105cat conftest.$ac_ext >&5
5106ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005107fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005108rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005109fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005110echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5111echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5112if test $ac_cv_type_pid_t = yes; then
5113 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005114else
Martin v. Löwis11437992002-04-12 09:54:03 +00005115
5116cat >>confdefs.h <<_ACEOF
5117#define pid_t int
5118_ACEOF
5119
5120fi
5121
5122echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5123echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5124if test "${ac_cv_type_signal+set}" = set; then
5125 echo $ECHO_N "(cached) $ECHO_C" >&6
5126else
5127 cat >conftest.$ac_ext <<_ACEOF
5128#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005129#include "confdefs.h"
5130#include <sys/types.h>
5131#include <signal.h>
5132#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005133# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005134#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005135#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005136extern "C" void (*signal (int, void (*)(int)))(int);
5137#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005138void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005139#endif
5140
Barry Warsawfe33b792003-01-07 22:42:49 +00005141#ifdef F77_DUMMY_MAIN
5142# ifdef __cplusplus
5143 extern "C"
5144# endif
5145 int F77_DUMMY_MAIN() { return 1; }
5146#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005147int
5148main ()
5149{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005150int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005151 ;
5152 return 0;
5153}
5154_ACEOF
5155rm -f conftest.$ac_objext
5156if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5157 (eval $ac_compile) 2>&5
5158 ac_status=$?
5159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5160 (exit $ac_status); } &&
5161 { ac_try='test -s conftest.$ac_objext'
5162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5163 (eval $ac_try) 2>&5
5164 ac_status=$?
5165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5166 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005167 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005168else
Martin v. Löwis11437992002-04-12 09:54:03 +00005169 echo "$as_me: failed program was:" >&5
5170cat conftest.$ac_ext >&5
5171ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005172fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005173rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005174fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005175echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5176echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005177
Martin v. Löwis11437992002-04-12 09:54:03 +00005178cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005179#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005180_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005181
Michael W. Hudson54241132001-12-07 15:38:26 +00005182
Martin v. Löwis11437992002-04-12 09:54:03 +00005183echo "$as_me:$LINENO: checking for size_t" >&5
5184echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5185if test "${ac_cv_type_size_t+set}" = set; then
5186 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005187else
Martin v. Löwis11437992002-04-12 09:54:03 +00005188 cat >conftest.$ac_ext <<_ACEOF
5189#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005190#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005191$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005192#ifdef F77_DUMMY_MAIN
5193# ifdef __cplusplus
5194 extern "C"
5195# endif
5196 int F77_DUMMY_MAIN() { return 1; }
5197#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005198int
5199main ()
5200{
5201if ((size_t *) 0)
5202 return 0;
5203if (sizeof (size_t))
5204 return 0;
5205 ;
5206 return 0;
5207}
5208_ACEOF
5209rm -f conftest.$ac_objext
5210if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5211 (eval $ac_compile) 2>&5
5212 ac_status=$?
5213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5214 (exit $ac_status); } &&
5215 { ac_try='test -s conftest.$ac_objext'
5216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5217 (eval $ac_try) 2>&5
5218 ac_status=$?
5219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5220 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005221 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005222else
Martin v. Löwis11437992002-04-12 09:54:03 +00005223 echo "$as_me: failed program was:" >&5
5224cat conftest.$ac_ext >&5
5225ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005226fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005227rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005228fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005229echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5230echo "${ECHO_T}$ac_cv_type_size_t" >&6
5231if test $ac_cv_type_size_t = yes; then
5232 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005233else
Martin v. Löwis11437992002-04-12 09:54:03 +00005234
5235cat >>confdefs.h <<_ACEOF
5236#define size_t unsigned
5237_ACEOF
5238
5239fi
5240
5241echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5242echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5243if test "${ac_cv_type_uid_t+set}" = set; then
5244 echo $ECHO_N "(cached) $ECHO_C" >&6
5245else
5246 cat >conftest.$ac_ext <<_ACEOF
5247#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005248#include "confdefs.h"
5249#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005250
5251_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005252if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00005253 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005254 ac_cv_type_uid_t=yes
5255else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005256 ac_cv_type_uid_t=no
5257fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005258rm -f conftest*
5259
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005260fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005261echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5262echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005263if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005264
Martin v. Löwis11437992002-04-12 09:54:03 +00005265cat >>confdefs.h <<\_ACEOF
5266#define uid_t int
5267_ACEOF
5268
5269
5270cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005271#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005272_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005273
5274fi
5275
Jack Jansendd19cf82001-12-06 22:36:17 +00005276
Michael W. Hudson54241132001-12-07 15:38:26 +00005277# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00005278echo "$as_me:$LINENO: checking for int" >&5
5279echo $ECHO_N "checking for int... $ECHO_C" >&6
5280if test "${ac_cv_type_int+set}" = set; then
5281 echo $ECHO_N "(cached) $ECHO_C" >&6
5282else
5283 cat >conftest.$ac_ext <<_ACEOF
5284#line $LINENO "configure"
5285#include "confdefs.h"
5286$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005287#ifdef F77_DUMMY_MAIN
5288# ifdef __cplusplus
5289 extern "C"
5290# endif
5291 int F77_DUMMY_MAIN() { return 1; }
5292#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005293int
5294main ()
5295{
5296if ((int *) 0)
5297 return 0;
5298if (sizeof (int))
5299 return 0;
5300 ;
5301 return 0;
5302}
5303_ACEOF
5304rm -f conftest.$ac_objext
5305if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5306 (eval $ac_compile) 2>&5
5307 ac_status=$?
5308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5309 (exit $ac_status); } &&
5310 { ac_try='test -s conftest.$ac_objext'
5311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5312 (eval $ac_try) 2>&5
5313 ac_status=$?
5314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5315 (exit $ac_status); }; }; then
5316 ac_cv_type_int=yes
5317else
5318 echo "$as_me: failed program was:" >&5
5319cat conftest.$ac_ext >&5
5320ac_cv_type_int=no
5321fi
5322rm -f conftest.$ac_objext conftest.$ac_ext
5323fi
5324echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5325echo "${ECHO_T}$ac_cv_type_int" >&6
5326
5327echo "$as_me:$LINENO: checking size of int" >&5
5328echo $ECHO_N "checking size of int... $ECHO_C" >&6
5329if test "${ac_cv_sizeof_int+set}" = set; then
5330 echo $ECHO_N "(cached) $ECHO_C" >&6
5331else
5332 if test "$ac_cv_type_int" = yes; then
5333 # The cast to unsigned long works around a bug in the HP C Compiler
5334 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5335 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5336 # This bug is HP SR number 8606223364.
5337 if test "$cross_compiling" = yes; then
5338 # Depending upon the size, compute the lo and hi bounds.
5339cat >conftest.$ac_ext <<_ACEOF
5340#line $LINENO "configure"
5341#include "confdefs.h"
5342$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005343#ifdef F77_DUMMY_MAIN
5344# ifdef __cplusplus
5345 extern "C"
5346# endif
5347 int F77_DUMMY_MAIN() { return 1; }
5348#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005349int
5350main ()
5351{
5352static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5353test_array [0] = 0
5354
5355 ;
5356 return 0;
5357}
5358_ACEOF
5359rm -f conftest.$ac_objext
5360if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5361 (eval $ac_compile) 2>&5
5362 ac_status=$?
5363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5364 (exit $ac_status); } &&
5365 { ac_try='test -s conftest.$ac_objext'
5366 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5367 (eval $ac_try) 2>&5
5368 ac_status=$?
5369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5370 (exit $ac_status); }; }; then
5371 ac_lo=0 ac_mid=0
5372 while :; do
5373 cat >conftest.$ac_ext <<_ACEOF
5374#line $LINENO "configure"
5375#include "confdefs.h"
5376$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005377#ifdef F77_DUMMY_MAIN
5378# ifdef __cplusplus
5379 extern "C"
5380# endif
5381 int F77_DUMMY_MAIN() { return 1; }
5382#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005383int
5384main ()
5385{
5386static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5387test_array [0] = 0
5388
5389 ;
5390 return 0;
5391}
5392_ACEOF
5393rm -f conftest.$ac_objext
5394if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5395 (eval $ac_compile) 2>&5
5396 ac_status=$?
5397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5398 (exit $ac_status); } &&
5399 { ac_try='test -s conftest.$ac_objext'
5400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5401 (eval $ac_try) 2>&5
5402 ac_status=$?
5403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5404 (exit $ac_status); }; }; then
5405 ac_hi=$ac_mid; break
5406else
5407 echo "$as_me: failed program was:" >&5
5408cat conftest.$ac_ext >&5
5409ac_lo=`expr $ac_mid + 1`
5410 if test $ac_lo -le $ac_mid; then
5411 ac_lo= ac_hi=
5412 break
5413 fi
5414 ac_mid=`expr 2 '*' $ac_mid + 1`
5415fi
5416rm -f conftest.$ac_objext conftest.$ac_ext
5417 done
5418else
5419 echo "$as_me: failed program was:" >&5
5420cat conftest.$ac_ext >&5
5421cat >conftest.$ac_ext <<_ACEOF
5422#line $LINENO "configure"
5423#include "confdefs.h"
5424$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005425#ifdef F77_DUMMY_MAIN
5426# ifdef __cplusplus
5427 extern "C"
5428# endif
5429 int F77_DUMMY_MAIN() { return 1; }
5430#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005431int
5432main ()
5433{
5434static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5435test_array [0] = 0
5436
5437 ;
5438 return 0;
5439}
5440_ACEOF
5441rm -f conftest.$ac_objext
5442if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5443 (eval $ac_compile) 2>&5
5444 ac_status=$?
5445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5446 (exit $ac_status); } &&
5447 { ac_try='test -s conftest.$ac_objext'
5448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5449 (eval $ac_try) 2>&5
5450 ac_status=$?
5451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5452 (exit $ac_status); }; }; then
5453 ac_hi=-1 ac_mid=-1
5454 while :; do
5455 cat >conftest.$ac_ext <<_ACEOF
5456#line $LINENO "configure"
5457#include "confdefs.h"
5458$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005459#ifdef F77_DUMMY_MAIN
5460# ifdef __cplusplus
5461 extern "C"
5462# endif
5463 int F77_DUMMY_MAIN() { return 1; }
5464#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005465int
5466main ()
5467{
5468static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5469test_array [0] = 0
5470
5471 ;
5472 return 0;
5473}
5474_ACEOF
5475rm -f conftest.$ac_objext
5476if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5477 (eval $ac_compile) 2>&5
5478 ac_status=$?
5479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5480 (exit $ac_status); } &&
5481 { ac_try='test -s conftest.$ac_objext'
5482 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5483 (eval $ac_try) 2>&5
5484 ac_status=$?
5485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5486 (exit $ac_status); }; }; then
5487 ac_lo=$ac_mid; break
5488else
5489 echo "$as_me: failed program was:" >&5
5490cat conftest.$ac_ext >&5
5491ac_hi=`expr '(' $ac_mid ')' - 1`
5492 if test $ac_mid -le $ac_hi; then
5493 ac_lo= ac_hi=
5494 break
5495 fi
5496 ac_mid=`expr 2 '*' $ac_mid`
5497fi
5498rm -f conftest.$ac_objext conftest.$ac_ext
5499 done
5500else
5501 echo "$as_me: failed program was:" >&5
5502cat conftest.$ac_ext >&5
5503ac_lo= ac_hi=
5504fi
5505rm -f conftest.$ac_objext conftest.$ac_ext
5506fi
5507rm -f conftest.$ac_objext conftest.$ac_ext
5508# Binary search between lo and hi bounds.
5509while test "x$ac_lo" != "x$ac_hi"; do
5510 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5511 cat >conftest.$ac_ext <<_ACEOF
5512#line $LINENO "configure"
5513#include "confdefs.h"
5514$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005515#ifdef F77_DUMMY_MAIN
5516# ifdef __cplusplus
5517 extern "C"
5518# endif
5519 int F77_DUMMY_MAIN() { return 1; }
5520#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005521int
5522main ()
5523{
5524static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5525test_array [0] = 0
5526
5527 ;
5528 return 0;
5529}
5530_ACEOF
5531rm -f conftest.$ac_objext
5532if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5533 (eval $ac_compile) 2>&5
5534 ac_status=$?
5535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5536 (exit $ac_status); } &&
5537 { ac_try='test -s conftest.$ac_objext'
5538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5539 (eval $ac_try) 2>&5
5540 ac_status=$?
5541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5542 (exit $ac_status); }; }; then
5543 ac_hi=$ac_mid
5544else
5545 echo "$as_me: failed program was:" >&5
5546cat conftest.$ac_ext >&5
5547ac_lo=`expr '(' $ac_mid ')' + 1`
5548fi
5549rm -f conftest.$ac_objext conftest.$ac_ext
5550done
5551case $ac_lo in
5552?*) ac_cv_sizeof_int=$ac_lo;;
5553'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5554echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5555 { (exit 1); exit 1; }; } ;;
5556esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005557else
5558 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005559 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5560echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5561 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005562else
Martin v. Löwis11437992002-04-12 09:54:03 +00005563 cat >conftest.$ac_ext <<_ACEOF
5564#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005565#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005566$ac_includes_default
5567long longval () { return (long) (sizeof (int)); }
5568unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005569#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005570#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00005571#ifdef F77_DUMMY_MAIN
5572# ifdef __cplusplus
5573 extern "C"
5574# endif
5575 int F77_DUMMY_MAIN() { return 1; }
5576#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005577int
5578main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005579{
Martin v. Löwis11437992002-04-12 09:54:03 +00005580
5581 FILE *f = fopen ("conftest.val", "w");
5582 if (! f)
5583 exit (1);
5584 if (((long) (sizeof (int))) < 0)
5585 {
5586 long i = longval ();
5587 if (i != ((long) (sizeof (int))))
5588 exit (1);
5589 fprintf (f, "%ld\n", i);
5590 }
5591 else
5592 {
5593 unsigned long i = ulongval ();
5594 if (i != ((long) (sizeof (int))))
5595 exit (1);
5596 fprintf (f, "%lu\n", i);
5597 }
5598 exit (ferror (f) || fclose (f) != 0);
5599
5600 ;
5601 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005602}
Martin v. Löwis11437992002-04-12 09:54:03 +00005603_ACEOF
5604rm -f conftest$ac_exeext
5605if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5606 (eval $ac_link) 2>&5
5607 ac_status=$?
5608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5609 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5611 (eval $ac_try) 2>&5
5612 ac_status=$?
5613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5614 (exit $ac_status); }; }; then
5615 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005616else
Martin v. Löwis11437992002-04-12 09:54:03 +00005617 echo "$as_me: program exited with status $ac_status" >&5
5618echo "$as_me: failed program was:" >&5
5619cat conftest.$ac_ext >&5
5620( exit $ac_status )
5621{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5622echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5623 { (exit 1); exit 1; }; }
5624fi
Barry Warsawfe33b792003-01-07 22:42:49 +00005625rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005626fi
5627fi
5628rm -f conftest.val
5629else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005630 ac_cv_sizeof_int=0
5631fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005632fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005633echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5634echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5635cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005636#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005637_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005638
5639
Martin v. Löwis11437992002-04-12 09:54:03 +00005640echo "$as_me:$LINENO: checking for long" >&5
5641echo $ECHO_N "checking for long... $ECHO_C" >&6
5642if test "${ac_cv_type_long+set}" = set; then
5643 echo $ECHO_N "(cached) $ECHO_C" >&6
5644else
5645 cat >conftest.$ac_ext <<_ACEOF
5646#line $LINENO "configure"
5647#include "confdefs.h"
5648$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005649#ifdef F77_DUMMY_MAIN
5650# ifdef __cplusplus
5651 extern "C"
5652# endif
5653 int F77_DUMMY_MAIN() { return 1; }
5654#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005655int
5656main ()
5657{
5658if ((long *) 0)
5659 return 0;
5660if (sizeof (long))
5661 return 0;
5662 ;
5663 return 0;
5664}
5665_ACEOF
5666rm -f conftest.$ac_objext
5667if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5668 (eval $ac_compile) 2>&5
5669 ac_status=$?
5670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5671 (exit $ac_status); } &&
5672 { ac_try='test -s conftest.$ac_objext'
5673 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5674 (eval $ac_try) 2>&5
5675 ac_status=$?
5676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5677 (exit $ac_status); }; }; then
5678 ac_cv_type_long=yes
5679else
5680 echo "$as_me: failed program was:" >&5
5681cat conftest.$ac_ext >&5
5682ac_cv_type_long=no
5683fi
5684rm -f conftest.$ac_objext conftest.$ac_ext
5685fi
5686echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5687echo "${ECHO_T}$ac_cv_type_long" >&6
5688
5689echo "$as_me:$LINENO: checking size of long" >&5
5690echo $ECHO_N "checking size of long... $ECHO_C" >&6
5691if test "${ac_cv_sizeof_long+set}" = set; then
5692 echo $ECHO_N "(cached) $ECHO_C" >&6
5693else
5694 if test "$ac_cv_type_long" = yes; then
5695 # The cast to unsigned long works around a bug in the HP C Compiler
5696 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5697 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5698 # This bug is HP SR number 8606223364.
5699 if test "$cross_compiling" = yes; then
5700 # Depending upon the size, compute the lo and hi bounds.
5701cat >conftest.$ac_ext <<_ACEOF
5702#line $LINENO "configure"
5703#include "confdefs.h"
5704$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005705#ifdef F77_DUMMY_MAIN
5706# ifdef __cplusplus
5707 extern "C"
5708# endif
5709 int F77_DUMMY_MAIN() { return 1; }
5710#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005711int
5712main ()
5713{
5714static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5715test_array [0] = 0
5716
5717 ;
5718 return 0;
5719}
5720_ACEOF
5721rm -f conftest.$ac_objext
5722if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5723 (eval $ac_compile) 2>&5
5724 ac_status=$?
5725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5726 (exit $ac_status); } &&
5727 { ac_try='test -s conftest.$ac_objext'
5728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5729 (eval $ac_try) 2>&5
5730 ac_status=$?
5731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5732 (exit $ac_status); }; }; then
5733 ac_lo=0 ac_mid=0
5734 while :; do
5735 cat >conftest.$ac_ext <<_ACEOF
5736#line $LINENO "configure"
5737#include "confdefs.h"
5738$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005739#ifdef F77_DUMMY_MAIN
5740# ifdef __cplusplus
5741 extern "C"
5742# endif
5743 int F77_DUMMY_MAIN() { return 1; }
5744#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005745int
5746main ()
5747{
5748static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5749test_array [0] = 0
5750
5751 ;
5752 return 0;
5753}
5754_ACEOF
5755rm -f conftest.$ac_objext
5756if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5757 (eval $ac_compile) 2>&5
5758 ac_status=$?
5759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5760 (exit $ac_status); } &&
5761 { ac_try='test -s conftest.$ac_objext'
5762 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5763 (eval $ac_try) 2>&5
5764 ac_status=$?
5765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5766 (exit $ac_status); }; }; then
5767 ac_hi=$ac_mid; break
5768else
5769 echo "$as_me: failed program was:" >&5
5770cat conftest.$ac_ext >&5
5771ac_lo=`expr $ac_mid + 1`
5772 if test $ac_lo -le $ac_mid; then
5773 ac_lo= ac_hi=
5774 break
5775 fi
5776 ac_mid=`expr 2 '*' $ac_mid + 1`
5777fi
5778rm -f conftest.$ac_objext conftest.$ac_ext
5779 done
5780else
5781 echo "$as_me: failed program was:" >&5
5782cat conftest.$ac_ext >&5
5783cat >conftest.$ac_ext <<_ACEOF
5784#line $LINENO "configure"
5785#include "confdefs.h"
5786$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005787#ifdef F77_DUMMY_MAIN
5788# ifdef __cplusplus
5789 extern "C"
5790# endif
5791 int F77_DUMMY_MAIN() { return 1; }
5792#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005793int
5794main ()
5795{
5796static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5797test_array [0] = 0
5798
5799 ;
5800 return 0;
5801}
5802_ACEOF
5803rm -f conftest.$ac_objext
5804if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5805 (eval $ac_compile) 2>&5
5806 ac_status=$?
5807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5808 (exit $ac_status); } &&
5809 { ac_try='test -s conftest.$ac_objext'
5810 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5811 (eval $ac_try) 2>&5
5812 ac_status=$?
5813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5814 (exit $ac_status); }; }; then
5815 ac_hi=-1 ac_mid=-1
5816 while :; do
5817 cat >conftest.$ac_ext <<_ACEOF
5818#line $LINENO "configure"
5819#include "confdefs.h"
5820$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005821#ifdef F77_DUMMY_MAIN
5822# ifdef __cplusplus
5823 extern "C"
5824# endif
5825 int F77_DUMMY_MAIN() { return 1; }
5826#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005827int
5828main ()
5829{
5830static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5831test_array [0] = 0
5832
5833 ;
5834 return 0;
5835}
5836_ACEOF
5837rm -f conftest.$ac_objext
5838if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5839 (eval $ac_compile) 2>&5
5840 ac_status=$?
5841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5842 (exit $ac_status); } &&
5843 { ac_try='test -s conftest.$ac_objext'
5844 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5845 (eval $ac_try) 2>&5
5846 ac_status=$?
5847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5848 (exit $ac_status); }; }; then
5849 ac_lo=$ac_mid; break
5850else
5851 echo "$as_me: failed program was:" >&5
5852cat conftest.$ac_ext >&5
5853ac_hi=`expr '(' $ac_mid ')' - 1`
5854 if test $ac_mid -le $ac_hi; then
5855 ac_lo= ac_hi=
5856 break
5857 fi
5858 ac_mid=`expr 2 '*' $ac_mid`
5859fi
5860rm -f conftest.$ac_objext conftest.$ac_ext
5861 done
5862else
5863 echo "$as_me: failed program was:" >&5
5864cat conftest.$ac_ext >&5
5865ac_lo= ac_hi=
5866fi
5867rm -f conftest.$ac_objext conftest.$ac_ext
5868fi
5869rm -f conftest.$ac_objext conftest.$ac_ext
5870# Binary search between lo and hi bounds.
5871while test "x$ac_lo" != "x$ac_hi"; do
5872 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5873 cat >conftest.$ac_ext <<_ACEOF
5874#line $LINENO "configure"
5875#include "confdefs.h"
5876$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005877#ifdef F77_DUMMY_MAIN
5878# ifdef __cplusplus
5879 extern "C"
5880# endif
5881 int F77_DUMMY_MAIN() { return 1; }
5882#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005883int
5884main ()
5885{
5886static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5887test_array [0] = 0
5888
5889 ;
5890 return 0;
5891}
5892_ACEOF
5893rm -f conftest.$ac_objext
5894if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5895 (eval $ac_compile) 2>&5
5896 ac_status=$?
5897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5898 (exit $ac_status); } &&
5899 { ac_try='test -s conftest.$ac_objext'
5900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5901 (eval $ac_try) 2>&5
5902 ac_status=$?
5903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5904 (exit $ac_status); }; }; then
5905 ac_hi=$ac_mid
5906else
5907 echo "$as_me: failed program was:" >&5
5908cat conftest.$ac_ext >&5
5909ac_lo=`expr '(' $ac_mid ')' + 1`
5910fi
5911rm -f conftest.$ac_objext conftest.$ac_ext
5912done
5913case $ac_lo in
5914?*) ac_cv_sizeof_long=$ac_lo;;
5915'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5916echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5917 { (exit 1); exit 1; }; } ;;
5918esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005919else
5920 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005921 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5922echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5923 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005924else
Martin v. Löwis11437992002-04-12 09:54:03 +00005925 cat >conftest.$ac_ext <<_ACEOF
5926#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005927#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005928$ac_includes_default
5929long longval () { return (long) (sizeof (long)); }
5930unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005931#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005932#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00005933#ifdef F77_DUMMY_MAIN
5934# ifdef __cplusplus
5935 extern "C"
5936# endif
5937 int F77_DUMMY_MAIN() { return 1; }
5938#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005939int
5940main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005941{
Martin v. Löwis11437992002-04-12 09:54:03 +00005942
5943 FILE *f = fopen ("conftest.val", "w");
5944 if (! f)
5945 exit (1);
5946 if (((long) (sizeof (long))) < 0)
5947 {
5948 long i = longval ();
5949 if (i != ((long) (sizeof (long))))
5950 exit (1);
5951 fprintf (f, "%ld\n", i);
5952 }
5953 else
5954 {
5955 unsigned long i = ulongval ();
5956 if (i != ((long) (sizeof (long))))
5957 exit (1);
5958 fprintf (f, "%lu\n", i);
5959 }
5960 exit (ferror (f) || fclose (f) != 0);
5961
5962 ;
5963 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005964}
Martin v. Löwis11437992002-04-12 09:54:03 +00005965_ACEOF
5966rm -f conftest$ac_exeext
5967if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5968 (eval $ac_link) 2>&5
5969 ac_status=$?
5970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5971 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5972 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5973 (eval $ac_try) 2>&5
5974 ac_status=$?
5975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5976 (exit $ac_status); }; }; then
5977 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005978else
Martin v. Löwis11437992002-04-12 09:54:03 +00005979 echo "$as_me: program exited with status $ac_status" >&5
5980echo "$as_me: failed program was:" >&5
5981cat conftest.$ac_ext >&5
5982( exit $ac_status )
5983{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5984echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5985 { (exit 1); exit 1; }; }
5986fi
Barry Warsawfe33b792003-01-07 22:42:49 +00005987rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005988fi
5989fi
5990rm -f conftest.val
5991else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005992 ac_cv_sizeof_long=0
5993fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005994fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005995echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5996echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5997cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005998#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00005999_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006000
6001
Martin v. Löwis11437992002-04-12 09:54:03 +00006002echo "$as_me:$LINENO: checking for void *" >&5
6003echo $ECHO_N "checking for void *... $ECHO_C" >&6
6004if test "${ac_cv_type_void_p+set}" = set; then
6005 echo $ECHO_N "(cached) $ECHO_C" >&6
6006else
6007 cat >conftest.$ac_ext <<_ACEOF
6008#line $LINENO "configure"
6009#include "confdefs.h"
6010$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006011#ifdef F77_DUMMY_MAIN
6012# ifdef __cplusplus
6013 extern "C"
6014# endif
6015 int F77_DUMMY_MAIN() { return 1; }
6016#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006017int
6018main ()
6019{
6020if ((void * *) 0)
6021 return 0;
6022if (sizeof (void *))
6023 return 0;
6024 ;
6025 return 0;
6026}
6027_ACEOF
6028rm -f conftest.$ac_objext
6029if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6030 (eval $ac_compile) 2>&5
6031 ac_status=$?
6032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6033 (exit $ac_status); } &&
6034 { ac_try='test -s conftest.$ac_objext'
6035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6036 (eval $ac_try) 2>&5
6037 ac_status=$?
6038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6039 (exit $ac_status); }; }; then
6040 ac_cv_type_void_p=yes
6041else
6042 echo "$as_me: failed program was:" >&5
6043cat conftest.$ac_ext >&5
6044ac_cv_type_void_p=no
6045fi
6046rm -f conftest.$ac_objext conftest.$ac_ext
6047fi
6048echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
6049echo "${ECHO_T}$ac_cv_type_void_p" >&6
6050
6051echo "$as_me:$LINENO: checking size of void *" >&5
6052echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6053if test "${ac_cv_sizeof_void_p+set}" = set; then
6054 echo $ECHO_N "(cached) $ECHO_C" >&6
6055else
6056 if test "$ac_cv_type_void_p" = yes; then
6057 # The cast to unsigned long works around a bug in the HP C Compiler
6058 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6059 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6060 # This bug is HP SR number 8606223364.
6061 if test "$cross_compiling" = yes; then
6062 # Depending upon the size, compute the lo and hi bounds.
6063cat >conftest.$ac_ext <<_ACEOF
6064#line $LINENO "configure"
6065#include "confdefs.h"
6066$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006067#ifdef F77_DUMMY_MAIN
6068# ifdef __cplusplus
6069 extern "C"
6070# endif
6071 int F77_DUMMY_MAIN() { return 1; }
6072#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006073int
6074main ()
6075{
6076static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
6077test_array [0] = 0
6078
6079 ;
6080 return 0;
6081}
6082_ACEOF
6083rm -f conftest.$ac_objext
6084if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6085 (eval $ac_compile) 2>&5
6086 ac_status=$?
6087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6088 (exit $ac_status); } &&
6089 { ac_try='test -s conftest.$ac_objext'
6090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6091 (eval $ac_try) 2>&5
6092 ac_status=$?
6093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6094 (exit $ac_status); }; }; then
6095 ac_lo=0 ac_mid=0
6096 while :; do
6097 cat >conftest.$ac_ext <<_ACEOF
6098#line $LINENO "configure"
6099#include "confdefs.h"
6100$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006101#ifdef F77_DUMMY_MAIN
6102# ifdef __cplusplus
6103 extern "C"
6104# endif
6105 int F77_DUMMY_MAIN() { return 1; }
6106#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006107int
6108main ()
6109{
6110static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6111test_array [0] = 0
6112
6113 ;
6114 return 0;
6115}
6116_ACEOF
6117rm -f conftest.$ac_objext
6118if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6119 (eval $ac_compile) 2>&5
6120 ac_status=$?
6121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6122 (exit $ac_status); } &&
6123 { ac_try='test -s conftest.$ac_objext'
6124 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6125 (eval $ac_try) 2>&5
6126 ac_status=$?
6127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6128 (exit $ac_status); }; }; then
6129 ac_hi=$ac_mid; break
6130else
6131 echo "$as_me: failed program was:" >&5
6132cat conftest.$ac_ext >&5
6133ac_lo=`expr $ac_mid + 1`
6134 if test $ac_lo -le $ac_mid; then
6135 ac_lo= ac_hi=
6136 break
6137 fi
6138 ac_mid=`expr 2 '*' $ac_mid + 1`
6139fi
6140rm -f conftest.$ac_objext conftest.$ac_ext
6141 done
6142else
6143 echo "$as_me: failed program was:" >&5
6144cat conftest.$ac_ext >&5
6145cat >conftest.$ac_ext <<_ACEOF
6146#line $LINENO "configure"
6147#include "confdefs.h"
6148$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006149#ifdef F77_DUMMY_MAIN
6150# ifdef __cplusplus
6151 extern "C"
6152# endif
6153 int F77_DUMMY_MAIN() { return 1; }
6154#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006155int
6156main ()
6157{
6158static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6159test_array [0] = 0
6160
6161 ;
6162 return 0;
6163}
6164_ACEOF
6165rm -f conftest.$ac_objext
6166if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6167 (eval $ac_compile) 2>&5
6168 ac_status=$?
6169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6170 (exit $ac_status); } &&
6171 { ac_try='test -s conftest.$ac_objext'
6172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6173 (eval $ac_try) 2>&5
6174 ac_status=$?
6175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6176 (exit $ac_status); }; }; then
6177 ac_hi=-1 ac_mid=-1
6178 while :; do
6179 cat >conftest.$ac_ext <<_ACEOF
6180#line $LINENO "configure"
6181#include "confdefs.h"
6182$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006183#ifdef F77_DUMMY_MAIN
6184# ifdef __cplusplus
6185 extern "C"
6186# endif
6187 int F77_DUMMY_MAIN() { return 1; }
6188#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006189int
6190main ()
6191{
6192static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6193test_array [0] = 0
6194
6195 ;
6196 return 0;
6197}
6198_ACEOF
6199rm -f conftest.$ac_objext
6200if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6201 (eval $ac_compile) 2>&5
6202 ac_status=$?
6203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6204 (exit $ac_status); } &&
6205 { ac_try='test -s conftest.$ac_objext'
6206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6207 (eval $ac_try) 2>&5
6208 ac_status=$?
6209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6210 (exit $ac_status); }; }; then
6211 ac_lo=$ac_mid; break
6212else
6213 echo "$as_me: failed program was:" >&5
6214cat conftest.$ac_ext >&5
6215ac_hi=`expr '(' $ac_mid ')' - 1`
6216 if test $ac_mid -le $ac_hi; then
6217 ac_lo= ac_hi=
6218 break
6219 fi
6220 ac_mid=`expr 2 '*' $ac_mid`
6221fi
6222rm -f conftest.$ac_objext conftest.$ac_ext
6223 done
6224else
6225 echo "$as_me: failed program was:" >&5
6226cat conftest.$ac_ext >&5
6227ac_lo= ac_hi=
6228fi
6229rm -f conftest.$ac_objext conftest.$ac_ext
6230fi
6231rm -f conftest.$ac_objext conftest.$ac_ext
6232# Binary search between lo and hi bounds.
6233while test "x$ac_lo" != "x$ac_hi"; do
6234 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6235 cat >conftest.$ac_ext <<_ACEOF
6236#line $LINENO "configure"
6237#include "confdefs.h"
6238$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006239#ifdef F77_DUMMY_MAIN
6240# ifdef __cplusplus
6241 extern "C"
6242# endif
6243 int F77_DUMMY_MAIN() { return 1; }
6244#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006245int
6246main ()
6247{
6248static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6249test_array [0] = 0
6250
6251 ;
6252 return 0;
6253}
6254_ACEOF
6255rm -f conftest.$ac_objext
6256if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6257 (eval $ac_compile) 2>&5
6258 ac_status=$?
6259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6260 (exit $ac_status); } &&
6261 { ac_try='test -s conftest.$ac_objext'
6262 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6263 (eval $ac_try) 2>&5
6264 ac_status=$?
6265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6266 (exit $ac_status); }; }; then
6267 ac_hi=$ac_mid
6268else
6269 echo "$as_me: failed program was:" >&5
6270cat conftest.$ac_ext >&5
6271ac_lo=`expr '(' $ac_mid ')' + 1`
6272fi
6273rm -f conftest.$ac_objext conftest.$ac_ext
6274done
6275case $ac_lo in
6276?*) ac_cv_sizeof_void_p=$ac_lo;;
6277'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6278echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6279 { (exit 1); exit 1; }; } ;;
6280esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006281else
6282 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006283 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6284echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6285 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006286else
Martin v. Löwis11437992002-04-12 09:54:03 +00006287 cat >conftest.$ac_ext <<_ACEOF
6288#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00006289#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006290$ac_includes_default
6291long longval () { return (long) (sizeof (void *)); }
6292unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006293#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006294#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00006295#ifdef F77_DUMMY_MAIN
6296# ifdef __cplusplus
6297 extern "C"
6298# endif
6299 int F77_DUMMY_MAIN() { return 1; }
6300#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006301int
6302main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006303{
Martin v. Löwis11437992002-04-12 09:54:03 +00006304
6305 FILE *f = fopen ("conftest.val", "w");
6306 if (! f)
6307 exit (1);
6308 if (((long) (sizeof (void *))) < 0)
6309 {
6310 long i = longval ();
6311 if (i != ((long) (sizeof (void *))))
6312 exit (1);
6313 fprintf (f, "%ld\n", i);
6314 }
6315 else
6316 {
6317 unsigned long i = ulongval ();
6318 if (i != ((long) (sizeof (void *))))
6319 exit (1);
6320 fprintf (f, "%lu\n", i);
6321 }
6322 exit (ferror (f) || fclose (f) != 0);
6323
6324 ;
6325 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006326}
Martin v. Löwis11437992002-04-12 09:54:03 +00006327_ACEOF
6328rm -f conftest$ac_exeext
6329if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6330 (eval $ac_link) 2>&5
6331 ac_status=$?
6332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6333 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6334 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6335 (eval $ac_try) 2>&5
6336 ac_status=$?
6337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6338 (exit $ac_status); }; }; then
6339 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006340else
Martin v. Löwis11437992002-04-12 09:54:03 +00006341 echo "$as_me: program exited with status $ac_status" >&5
6342echo "$as_me: failed program was:" >&5
6343cat conftest.$ac_ext >&5
6344( exit $ac_status )
6345{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6346echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6347 { (exit 1); exit 1; }; }
6348fi
Barry Warsawfe33b792003-01-07 22:42:49 +00006349rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006350fi
6351fi
6352rm -f conftest.val
6353else
Guido van Rossumad678af1998-10-02 14:42:15 +00006354 ac_cv_sizeof_void_p=0
6355fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006356fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006357echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6358echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6359cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006360#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006361_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006362
6363
Martin v. Löwis11437992002-04-12 09:54:03 +00006364echo "$as_me:$LINENO: checking for char" >&5
6365echo $ECHO_N "checking for char... $ECHO_C" >&6
6366if test "${ac_cv_type_char+set}" = set; then
6367 echo $ECHO_N "(cached) $ECHO_C" >&6
6368else
6369 cat >conftest.$ac_ext <<_ACEOF
6370#line $LINENO "configure"
6371#include "confdefs.h"
6372$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006373#ifdef F77_DUMMY_MAIN
6374# ifdef __cplusplus
6375 extern "C"
6376# endif
6377 int F77_DUMMY_MAIN() { return 1; }
6378#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006379int
6380main ()
6381{
6382if ((char *) 0)
6383 return 0;
6384if (sizeof (char))
6385 return 0;
6386 ;
6387 return 0;
6388}
6389_ACEOF
6390rm -f conftest.$ac_objext
6391if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6392 (eval $ac_compile) 2>&5
6393 ac_status=$?
6394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6395 (exit $ac_status); } &&
6396 { ac_try='test -s conftest.$ac_objext'
6397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6398 (eval $ac_try) 2>&5
6399 ac_status=$?
6400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6401 (exit $ac_status); }; }; then
6402 ac_cv_type_char=yes
6403else
6404 echo "$as_me: failed program was:" >&5
6405cat conftest.$ac_ext >&5
6406ac_cv_type_char=no
6407fi
6408rm -f conftest.$ac_objext conftest.$ac_ext
6409fi
6410echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
6411echo "${ECHO_T}$ac_cv_type_char" >&6
6412
6413echo "$as_me:$LINENO: checking size of char" >&5
6414echo $ECHO_N "checking size of char... $ECHO_C" >&6
6415if test "${ac_cv_sizeof_char+set}" = set; then
6416 echo $ECHO_N "(cached) $ECHO_C" >&6
6417else
6418 if test "$ac_cv_type_char" = yes; then
6419 # The cast to unsigned long works around a bug in the HP C Compiler
6420 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6421 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6422 # This bug is HP SR number 8606223364.
6423 if test "$cross_compiling" = yes; then
6424 # Depending upon the size, compute the lo and hi bounds.
6425cat >conftest.$ac_ext <<_ACEOF
6426#line $LINENO "configure"
6427#include "confdefs.h"
6428$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006429#ifdef F77_DUMMY_MAIN
6430# ifdef __cplusplus
6431 extern "C"
6432# endif
6433 int F77_DUMMY_MAIN() { return 1; }
6434#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006435int
6436main ()
6437{
6438static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
6439test_array [0] = 0
6440
6441 ;
6442 return 0;
6443}
6444_ACEOF
6445rm -f conftest.$ac_objext
6446if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6447 (eval $ac_compile) 2>&5
6448 ac_status=$?
6449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6450 (exit $ac_status); } &&
6451 { ac_try='test -s conftest.$ac_objext'
6452 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6453 (eval $ac_try) 2>&5
6454 ac_status=$?
6455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6456 (exit $ac_status); }; }; then
6457 ac_lo=0 ac_mid=0
6458 while :; do
6459 cat >conftest.$ac_ext <<_ACEOF
6460#line $LINENO "configure"
6461#include "confdefs.h"
6462$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006463#ifdef F77_DUMMY_MAIN
6464# ifdef __cplusplus
6465 extern "C"
6466# endif
6467 int F77_DUMMY_MAIN() { return 1; }
6468#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006469int
6470main ()
6471{
6472static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6473test_array [0] = 0
6474
6475 ;
6476 return 0;
6477}
6478_ACEOF
6479rm -f conftest.$ac_objext
6480if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6481 (eval $ac_compile) 2>&5
6482 ac_status=$?
6483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6484 (exit $ac_status); } &&
6485 { ac_try='test -s conftest.$ac_objext'
6486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6487 (eval $ac_try) 2>&5
6488 ac_status=$?
6489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6490 (exit $ac_status); }; }; then
6491 ac_hi=$ac_mid; break
6492else
6493 echo "$as_me: failed program was:" >&5
6494cat conftest.$ac_ext >&5
6495ac_lo=`expr $ac_mid + 1`
6496 if test $ac_lo -le $ac_mid; then
6497 ac_lo= ac_hi=
6498 break
6499 fi
6500 ac_mid=`expr 2 '*' $ac_mid + 1`
6501fi
6502rm -f conftest.$ac_objext conftest.$ac_ext
6503 done
6504else
6505 echo "$as_me: failed program was:" >&5
6506cat conftest.$ac_ext >&5
6507cat >conftest.$ac_ext <<_ACEOF
6508#line $LINENO "configure"
6509#include "confdefs.h"
6510$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006511#ifdef F77_DUMMY_MAIN
6512# ifdef __cplusplus
6513 extern "C"
6514# endif
6515 int F77_DUMMY_MAIN() { return 1; }
6516#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006517int
6518main ()
6519{
6520static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
6521test_array [0] = 0
6522
6523 ;
6524 return 0;
6525}
6526_ACEOF
6527rm -f conftest.$ac_objext
6528if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6529 (eval $ac_compile) 2>&5
6530 ac_status=$?
6531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6532 (exit $ac_status); } &&
6533 { ac_try='test -s conftest.$ac_objext'
6534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6535 (eval $ac_try) 2>&5
6536 ac_status=$?
6537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6538 (exit $ac_status); }; }; then
6539 ac_hi=-1 ac_mid=-1
6540 while :; do
6541 cat >conftest.$ac_ext <<_ACEOF
6542#line $LINENO "configure"
6543#include "confdefs.h"
6544$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006545#ifdef F77_DUMMY_MAIN
6546# ifdef __cplusplus
6547 extern "C"
6548# endif
6549 int F77_DUMMY_MAIN() { return 1; }
6550#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006551int
6552main ()
6553{
6554static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
6555test_array [0] = 0
6556
6557 ;
6558 return 0;
6559}
6560_ACEOF
6561rm -f conftest.$ac_objext
6562if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6563 (eval $ac_compile) 2>&5
6564 ac_status=$?
6565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6566 (exit $ac_status); } &&
6567 { ac_try='test -s conftest.$ac_objext'
6568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6569 (eval $ac_try) 2>&5
6570 ac_status=$?
6571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6572 (exit $ac_status); }; }; then
6573 ac_lo=$ac_mid; break
6574else
6575 echo "$as_me: failed program was:" >&5
6576cat conftest.$ac_ext >&5
6577ac_hi=`expr '(' $ac_mid ')' - 1`
6578 if test $ac_mid -le $ac_hi; then
6579 ac_lo= ac_hi=
6580 break
6581 fi
6582 ac_mid=`expr 2 '*' $ac_mid`
6583fi
6584rm -f conftest.$ac_objext conftest.$ac_ext
6585 done
6586else
6587 echo "$as_me: failed program was:" >&5
6588cat conftest.$ac_ext >&5
6589ac_lo= ac_hi=
6590fi
6591rm -f conftest.$ac_objext conftest.$ac_ext
6592fi
6593rm -f conftest.$ac_objext conftest.$ac_ext
6594# Binary search between lo and hi bounds.
6595while test "x$ac_lo" != "x$ac_hi"; do
6596 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6597 cat >conftest.$ac_ext <<_ACEOF
6598#line $LINENO "configure"
6599#include "confdefs.h"
6600$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006601#ifdef F77_DUMMY_MAIN
6602# ifdef __cplusplus
6603 extern "C"
6604# endif
6605 int F77_DUMMY_MAIN() { return 1; }
6606#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006607int
6608main ()
6609{
6610static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6611test_array [0] = 0
6612
6613 ;
6614 return 0;
6615}
6616_ACEOF
6617rm -f conftest.$ac_objext
6618if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6619 (eval $ac_compile) 2>&5
6620 ac_status=$?
6621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6622 (exit $ac_status); } &&
6623 { ac_try='test -s conftest.$ac_objext'
6624 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6625 (eval $ac_try) 2>&5
6626 ac_status=$?
6627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6628 (exit $ac_status); }; }; then
6629 ac_hi=$ac_mid
6630else
6631 echo "$as_me: failed program was:" >&5
6632cat conftest.$ac_ext >&5
6633ac_lo=`expr '(' $ac_mid ')' + 1`
6634fi
6635rm -f conftest.$ac_objext conftest.$ac_ext
6636done
6637case $ac_lo in
6638?*) ac_cv_sizeof_char=$ac_lo;;
6639'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6640echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6641 { (exit 1); exit 1; }; } ;;
6642esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006643else
6644 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006645 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6646echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6647 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006648else
Martin v. Löwis11437992002-04-12 09:54:03 +00006649 cat >conftest.$ac_ext <<_ACEOF
6650#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006651#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006652$ac_includes_default
6653long longval () { return (long) (sizeof (char)); }
6654unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006655#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006656#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00006657#ifdef F77_DUMMY_MAIN
6658# ifdef __cplusplus
6659 extern "C"
6660# endif
6661 int F77_DUMMY_MAIN() { return 1; }
6662#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006663int
6664main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006665{
Martin v. Löwis11437992002-04-12 09:54:03 +00006666
6667 FILE *f = fopen ("conftest.val", "w");
6668 if (! f)
6669 exit (1);
6670 if (((long) (sizeof (char))) < 0)
6671 {
6672 long i = longval ();
6673 if (i != ((long) (sizeof (char))))
6674 exit (1);
6675 fprintf (f, "%ld\n", i);
6676 }
6677 else
6678 {
6679 unsigned long i = ulongval ();
6680 if (i != ((long) (sizeof (char))))
6681 exit (1);
6682 fprintf (f, "%lu\n", i);
6683 }
6684 exit (ferror (f) || fclose (f) != 0);
6685
6686 ;
6687 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006688}
Martin v. Löwis11437992002-04-12 09:54:03 +00006689_ACEOF
6690rm -f conftest$ac_exeext
6691if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6692 (eval $ac_link) 2>&5
6693 ac_status=$?
6694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6695 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6696 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6697 (eval $ac_try) 2>&5
6698 ac_status=$?
6699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6700 (exit $ac_status); }; }; then
6701 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006702else
Martin v. Löwis11437992002-04-12 09:54:03 +00006703 echo "$as_me: program exited with status $ac_status" >&5
6704echo "$as_me: failed program was:" >&5
6705cat conftest.$ac_ext >&5
6706( exit $ac_status )
6707{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6708echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6709 { (exit 1); exit 1; }; }
6710fi
Barry Warsawfe33b792003-01-07 22:42:49 +00006711rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006712fi
6713fi
6714rm -f conftest.val
6715else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006716 ac_cv_sizeof_char=0
6717fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006718fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006719echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6720echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6721cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006722#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006723_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006724
6725
Martin v. Löwis11437992002-04-12 09:54:03 +00006726echo "$as_me:$LINENO: checking for short" >&5
6727echo $ECHO_N "checking for short... $ECHO_C" >&6
6728if test "${ac_cv_type_short+set}" = set; then
6729 echo $ECHO_N "(cached) $ECHO_C" >&6
6730else
6731 cat >conftest.$ac_ext <<_ACEOF
6732#line $LINENO "configure"
6733#include "confdefs.h"
6734$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006735#ifdef F77_DUMMY_MAIN
6736# ifdef __cplusplus
6737 extern "C"
6738# endif
6739 int F77_DUMMY_MAIN() { return 1; }
6740#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006741int
6742main ()
6743{
6744if ((short *) 0)
6745 return 0;
6746if (sizeof (short))
6747 return 0;
6748 ;
6749 return 0;
6750}
6751_ACEOF
6752rm -f conftest.$ac_objext
6753if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6754 (eval $ac_compile) 2>&5
6755 ac_status=$?
6756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6757 (exit $ac_status); } &&
6758 { ac_try='test -s conftest.$ac_objext'
6759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6760 (eval $ac_try) 2>&5
6761 ac_status=$?
6762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6763 (exit $ac_status); }; }; then
6764 ac_cv_type_short=yes
6765else
6766 echo "$as_me: failed program was:" >&5
6767cat conftest.$ac_ext >&5
6768ac_cv_type_short=no
6769fi
6770rm -f conftest.$ac_objext conftest.$ac_ext
6771fi
6772echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6773echo "${ECHO_T}$ac_cv_type_short" >&6
6774
6775echo "$as_me:$LINENO: checking size of short" >&5
6776echo $ECHO_N "checking size of short... $ECHO_C" >&6
6777if test "${ac_cv_sizeof_short+set}" = set; then
6778 echo $ECHO_N "(cached) $ECHO_C" >&6
6779else
6780 if test "$ac_cv_type_short" = yes; then
6781 # The cast to unsigned long works around a bug in the HP C Compiler
6782 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6783 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6784 # This bug is HP SR number 8606223364.
6785 if test "$cross_compiling" = yes; then
6786 # Depending upon the size, compute the lo and hi bounds.
6787cat >conftest.$ac_ext <<_ACEOF
6788#line $LINENO "configure"
6789#include "confdefs.h"
6790$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006791#ifdef F77_DUMMY_MAIN
6792# ifdef __cplusplus
6793 extern "C"
6794# endif
6795 int F77_DUMMY_MAIN() { return 1; }
6796#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006797int
6798main ()
6799{
6800static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6801test_array [0] = 0
6802
6803 ;
6804 return 0;
6805}
6806_ACEOF
6807rm -f conftest.$ac_objext
6808if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6809 (eval $ac_compile) 2>&5
6810 ac_status=$?
6811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6812 (exit $ac_status); } &&
6813 { ac_try='test -s conftest.$ac_objext'
6814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6815 (eval $ac_try) 2>&5
6816 ac_status=$?
6817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6818 (exit $ac_status); }; }; then
6819 ac_lo=0 ac_mid=0
6820 while :; do
6821 cat >conftest.$ac_ext <<_ACEOF
6822#line $LINENO "configure"
6823#include "confdefs.h"
6824$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006825#ifdef F77_DUMMY_MAIN
6826# ifdef __cplusplus
6827 extern "C"
6828# endif
6829 int F77_DUMMY_MAIN() { return 1; }
6830#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006831int
6832main ()
6833{
6834static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6835test_array [0] = 0
6836
6837 ;
6838 return 0;
6839}
6840_ACEOF
6841rm -f conftest.$ac_objext
6842if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6843 (eval $ac_compile) 2>&5
6844 ac_status=$?
6845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6846 (exit $ac_status); } &&
6847 { ac_try='test -s conftest.$ac_objext'
6848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6849 (eval $ac_try) 2>&5
6850 ac_status=$?
6851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6852 (exit $ac_status); }; }; then
6853 ac_hi=$ac_mid; break
6854else
6855 echo "$as_me: failed program was:" >&5
6856cat conftest.$ac_ext >&5
6857ac_lo=`expr $ac_mid + 1`
6858 if test $ac_lo -le $ac_mid; then
6859 ac_lo= ac_hi=
6860 break
6861 fi
6862 ac_mid=`expr 2 '*' $ac_mid + 1`
6863fi
6864rm -f conftest.$ac_objext conftest.$ac_ext
6865 done
6866else
6867 echo "$as_me: failed program was:" >&5
6868cat conftest.$ac_ext >&5
6869cat >conftest.$ac_ext <<_ACEOF
6870#line $LINENO "configure"
6871#include "confdefs.h"
6872$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006873#ifdef F77_DUMMY_MAIN
6874# ifdef __cplusplus
6875 extern "C"
6876# endif
6877 int F77_DUMMY_MAIN() { return 1; }
6878#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006879int
6880main ()
6881{
6882static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6883test_array [0] = 0
6884
6885 ;
6886 return 0;
6887}
6888_ACEOF
6889rm -f conftest.$ac_objext
6890if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6891 (eval $ac_compile) 2>&5
6892 ac_status=$?
6893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6894 (exit $ac_status); } &&
6895 { ac_try='test -s conftest.$ac_objext'
6896 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6897 (eval $ac_try) 2>&5
6898 ac_status=$?
6899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6900 (exit $ac_status); }; }; then
6901 ac_hi=-1 ac_mid=-1
6902 while :; do
6903 cat >conftest.$ac_ext <<_ACEOF
6904#line $LINENO "configure"
6905#include "confdefs.h"
6906$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006907#ifdef F77_DUMMY_MAIN
6908# ifdef __cplusplus
6909 extern "C"
6910# endif
6911 int F77_DUMMY_MAIN() { return 1; }
6912#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006913int
6914main ()
6915{
6916static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6917test_array [0] = 0
6918
6919 ;
6920 return 0;
6921}
6922_ACEOF
6923rm -f conftest.$ac_objext
6924if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6925 (eval $ac_compile) 2>&5
6926 ac_status=$?
6927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6928 (exit $ac_status); } &&
6929 { ac_try='test -s conftest.$ac_objext'
6930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6931 (eval $ac_try) 2>&5
6932 ac_status=$?
6933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6934 (exit $ac_status); }; }; then
6935 ac_lo=$ac_mid; break
6936else
6937 echo "$as_me: failed program was:" >&5
6938cat conftest.$ac_ext >&5
6939ac_hi=`expr '(' $ac_mid ')' - 1`
6940 if test $ac_mid -le $ac_hi; then
6941 ac_lo= ac_hi=
6942 break
6943 fi
6944 ac_mid=`expr 2 '*' $ac_mid`
6945fi
6946rm -f conftest.$ac_objext conftest.$ac_ext
6947 done
6948else
6949 echo "$as_me: failed program was:" >&5
6950cat conftest.$ac_ext >&5
6951ac_lo= ac_hi=
6952fi
6953rm -f conftest.$ac_objext conftest.$ac_ext
6954fi
6955rm -f conftest.$ac_objext conftest.$ac_ext
6956# Binary search between lo and hi bounds.
6957while test "x$ac_lo" != "x$ac_hi"; do
6958 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6959 cat >conftest.$ac_ext <<_ACEOF
6960#line $LINENO "configure"
6961#include "confdefs.h"
6962$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006963#ifdef F77_DUMMY_MAIN
6964# ifdef __cplusplus
6965 extern "C"
6966# endif
6967 int F77_DUMMY_MAIN() { return 1; }
6968#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006969int
6970main ()
6971{
6972static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6973test_array [0] = 0
6974
6975 ;
6976 return 0;
6977}
6978_ACEOF
6979rm -f conftest.$ac_objext
6980if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6981 (eval $ac_compile) 2>&5
6982 ac_status=$?
6983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6984 (exit $ac_status); } &&
6985 { ac_try='test -s conftest.$ac_objext'
6986 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6987 (eval $ac_try) 2>&5
6988 ac_status=$?
6989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6990 (exit $ac_status); }; }; then
6991 ac_hi=$ac_mid
6992else
6993 echo "$as_me: failed program was:" >&5
6994cat conftest.$ac_ext >&5
6995ac_lo=`expr '(' $ac_mid ')' + 1`
6996fi
6997rm -f conftest.$ac_objext conftest.$ac_ext
6998done
6999case $ac_lo in
7000?*) ac_cv_sizeof_short=$ac_lo;;
7001'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
7002echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
7003 { (exit 1); exit 1; }; } ;;
7004esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007005else
7006 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007007 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7008echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7009 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007010else
Martin v. Löwis11437992002-04-12 09:54:03 +00007011 cat >conftest.$ac_ext <<_ACEOF
7012#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007013#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007014$ac_includes_default
7015long longval () { return (long) (sizeof (short)); }
7016unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007017#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007018#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00007019#ifdef F77_DUMMY_MAIN
7020# ifdef __cplusplus
7021 extern "C"
7022# endif
7023 int F77_DUMMY_MAIN() { return 1; }
7024#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007025int
7026main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007027{
Martin v. Löwis11437992002-04-12 09:54:03 +00007028
7029 FILE *f = fopen ("conftest.val", "w");
7030 if (! f)
7031 exit (1);
7032 if (((long) (sizeof (short))) < 0)
7033 {
7034 long i = longval ();
7035 if (i != ((long) (sizeof (short))))
7036 exit (1);
7037 fprintf (f, "%ld\n", i);
7038 }
7039 else
7040 {
7041 unsigned long i = ulongval ();
7042 if (i != ((long) (sizeof (short))))
7043 exit (1);
7044 fprintf (f, "%lu\n", i);
7045 }
7046 exit (ferror (f) || fclose (f) != 0);
7047
7048 ;
7049 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007050}
Martin v. Löwis11437992002-04-12 09:54:03 +00007051_ACEOF
7052rm -f conftest$ac_exeext
7053if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7054 (eval $ac_link) 2>&5
7055 ac_status=$?
7056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7057 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7058 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7059 (eval $ac_try) 2>&5
7060 ac_status=$?
7061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7062 (exit $ac_status); }; }; then
7063 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007064else
Martin v. Löwis11437992002-04-12 09:54:03 +00007065 echo "$as_me: program exited with status $ac_status" >&5
7066echo "$as_me: failed program was:" >&5
7067cat conftest.$ac_ext >&5
7068( exit $ac_status )
7069{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
7070echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
7071 { (exit 1); exit 1; }; }
7072fi
Barry Warsawfe33b792003-01-07 22:42:49 +00007073rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007074fi
7075fi
7076rm -f conftest.val
7077else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007078 ac_cv_sizeof_short=0
7079fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007080fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007081echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7082echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7083cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007084#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007085_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007086
7087
Martin v. Löwis11437992002-04-12 09:54:03 +00007088echo "$as_me:$LINENO: checking for float" >&5
7089echo $ECHO_N "checking for float... $ECHO_C" >&6
7090if test "${ac_cv_type_float+set}" = set; then
7091 echo $ECHO_N "(cached) $ECHO_C" >&6
7092else
7093 cat >conftest.$ac_ext <<_ACEOF
7094#line $LINENO "configure"
7095#include "confdefs.h"
7096$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007097#ifdef F77_DUMMY_MAIN
7098# ifdef __cplusplus
7099 extern "C"
7100# endif
7101 int F77_DUMMY_MAIN() { return 1; }
7102#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007103int
7104main ()
7105{
7106if ((float *) 0)
7107 return 0;
7108if (sizeof (float))
7109 return 0;
7110 ;
7111 return 0;
7112}
7113_ACEOF
7114rm -f conftest.$ac_objext
7115if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7116 (eval $ac_compile) 2>&5
7117 ac_status=$?
7118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7119 (exit $ac_status); } &&
7120 { ac_try='test -s conftest.$ac_objext'
7121 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7122 (eval $ac_try) 2>&5
7123 ac_status=$?
7124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7125 (exit $ac_status); }; }; then
7126 ac_cv_type_float=yes
7127else
7128 echo "$as_me: failed program was:" >&5
7129cat conftest.$ac_ext >&5
7130ac_cv_type_float=no
7131fi
7132rm -f conftest.$ac_objext conftest.$ac_ext
7133fi
7134echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7135echo "${ECHO_T}$ac_cv_type_float" >&6
7136
7137echo "$as_me:$LINENO: checking size of float" >&5
7138echo $ECHO_N "checking size of float... $ECHO_C" >&6
7139if test "${ac_cv_sizeof_float+set}" = set; then
7140 echo $ECHO_N "(cached) $ECHO_C" >&6
7141else
7142 if test "$ac_cv_type_float" = yes; then
7143 # The cast to unsigned long works around a bug in the HP C Compiler
7144 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7145 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7146 # This bug is HP SR number 8606223364.
7147 if test "$cross_compiling" = yes; then
7148 # Depending upon the size, compute the lo and hi bounds.
7149cat >conftest.$ac_ext <<_ACEOF
7150#line $LINENO "configure"
7151#include "confdefs.h"
7152$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007153#ifdef F77_DUMMY_MAIN
7154# ifdef __cplusplus
7155 extern "C"
7156# endif
7157 int F77_DUMMY_MAIN() { return 1; }
7158#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007159int
7160main ()
7161{
7162static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7163test_array [0] = 0
7164
7165 ;
7166 return 0;
7167}
7168_ACEOF
7169rm -f conftest.$ac_objext
7170if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7171 (eval $ac_compile) 2>&5
7172 ac_status=$?
7173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7174 (exit $ac_status); } &&
7175 { ac_try='test -s conftest.$ac_objext'
7176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7177 (eval $ac_try) 2>&5
7178 ac_status=$?
7179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7180 (exit $ac_status); }; }; then
7181 ac_lo=0 ac_mid=0
7182 while :; do
7183 cat >conftest.$ac_ext <<_ACEOF
7184#line $LINENO "configure"
7185#include "confdefs.h"
7186$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007187#ifdef F77_DUMMY_MAIN
7188# ifdef __cplusplus
7189 extern "C"
7190# endif
7191 int F77_DUMMY_MAIN() { return 1; }
7192#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007193int
7194main ()
7195{
7196static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7197test_array [0] = 0
7198
7199 ;
7200 return 0;
7201}
7202_ACEOF
7203rm -f conftest.$ac_objext
7204if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7205 (eval $ac_compile) 2>&5
7206 ac_status=$?
7207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7208 (exit $ac_status); } &&
7209 { ac_try='test -s conftest.$ac_objext'
7210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7211 (eval $ac_try) 2>&5
7212 ac_status=$?
7213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7214 (exit $ac_status); }; }; then
7215 ac_hi=$ac_mid; break
7216else
7217 echo "$as_me: failed program was:" >&5
7218cat conftest.$ac_ext >&5
7219ac_lo=`expr $ac_mid + 1`
7220 if test $ac_lo -le $ac_mid; then
7221 ac_lo= ac_hi=
7222 break
7223 fi
7224 ac_mid=`expr 2 '*' $ac_mid + 1`
7225fi
7226rm -f conftest.$ac_objext conftest.$ac_ext
7227 done
7228else
7229 echo "$as_me: failed program was:" >&5
7230cat conftest.$ac_ext >&5
7231cat >conftest.$ac_ext <<_ACEOF
7232#line $LINENO "configure"
7233#include "confdefs.h"
7234$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007235#ifdef F77_DUMMY_MAIN
7236# ifdef __cplusplus
7237 extern "C"
7238# endif
7239 int F77_DUMMY_MAIN() { return 1; }
7240#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007241int
7242main ()
7243{
7244static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7245test_array [0] = 0
7246
7247 ;
7248 return 0;
7249}
7250_ACEOF
7251rm -f conftest.$ac_objext
7252if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7253 (eval $ac_compile) 2>&5
7254 ac_status=$?
7255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7256 (exit $ac_status); } &&
7257 { ac_try='test -s conftest.$ac_objext'
7258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7259 (eval $ac_try) 2>&5
7260 ac_status=$?
7261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7262 (exit $ac_status); }; }; then
7263 ac_hi=-1 ac_mid=-1
7264 while :; do
7265 cat >conftest.$ac_ext <<_ACEOF
7266#line $LINENO "configure"
7267#include "confdefs.h"
7268$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007269#ifdef F77_DUMMY_MAIN
7270# ifdef __cplusplus
7271 extern "C"
7272# endif
7273 int F77_DUMMY_MAIN() { return 1; }
7274#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007275int
7276main ()
7277{
7278static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7279test_array [0] = 0
7280
7281 ;
7282 return 0;
7283}
7284_ACEOF
7285rm -f conftest.$ac_objext
7286if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7287 (eval $ac_compile) 2>&5
7288 ac_status=$?
7289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7290 (exit $ac_status); } &&
7291 { ac_try='test -s conftest.$ac_objext'
7292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7293 (eval $ac_try) 2>&5
7294 ac_status=$?
7295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7296 (exit $ac_status); }; }; then
7297 ac_lo=$ac_mid; break
7298else
7299 echo "$as_me: failed program was:" >&5
7300cat conftest.$ac_ext >&5
7301ac_hi=`expr '(' $ac_mid ')' - 1`
7302 if test $ac_mid -le $ac_hi; then
7303 ac_lo= ac_hi=
7304 break
7305 fi
7306 ac_mid=`expr 2 '*' $ac_mid`
7307fi
7308rm -f conftest.$ac_objext conftest.$ac_ext
7309 done
7310else
7311 echo "$as_me: failed program was:" >&5
7312cat conftest.$ac_ext >&5
7313ac_lo= ac_hi=
7314fi
7315rm -f conftest.$ac_objext conftest.$ac_ext
7316fi
7317rm -f conftest.$ac_objext conftest.$ac_ext
7318# Binary search between lo and hi bounds.
7319while test "x$ac_lo" != "x$ac_hi"; do
7320 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7321 cat >conftest.$ac_ext <<_ACEOF
7322#line $LINENO "configure"
7323#include "confdefs.h"
7324$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007325#ifdef F77_DUMMY_MAIN
7326# ifdef __cplusplus
7327 extern "C"
7328# endif
7329 int F77_DUMMY_MAIN() { return 1; }
7330#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007331int
7332main ()
7333{
7334static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7335test_array [0] = 0
7336
7337 ;
7338 return 0;
7339}
7340_ACEOF
7341rm -f conftest.$ac_objext
7342if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7343 (eval $ac_compile) 2>&5
7344 ac_status=$?
7345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7346 (exit $ac_status); } &&
7347 { ac_try='test -s conftest.$ac_objext'
7348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7349 (eval $ac_try) 2>&5
7350 ac_status=$?
7351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7352 (exit $ac_status); }; }; then
7353 ac_hi=$ac_mid
7354else
7355 echo "$as_me: failed program was:" >&5
7356cat conftest.$ac_ext >&5
7357ac_lo=`expr '(' $ac_mid ')' + 1`
7358fi
7359rm -f conftest.$ac_objext conftest.$ac_ext
7360done
7361case $ac_lo in
7362?*) ac_cv_sizeof_float=$ac_lo;;
7363'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7364echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7365 { (exit 1); exit 1; }; } ;;
7366esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007367else
7368 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007369 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7370echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7371 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007372else
Martin v. Löwis11437992002-04-12 09:54:03 +00007373 cat >conftest.$ac_ext <<_ACEOF
7374#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007375#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007376$ac_includes_default
7377long longval () { return (long) (sizeof (float)); }
7378unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007379#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007380#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00007381#ifdef F77_DUMMY_MAIN
7382# ifdef __cplusplus
7383 extern "C"
7384# endif
7385 int F77_DUMMY_MAIN() { return 1; }
7386#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007387int
7388main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007389{
Martin v. Löwis11437992002-04-12 09:54:03 +00007390
7391 FILE *f = fopen ("conftest.val", "w");
7392 if (! f)
7393 exit (1);
7394 if (((long) (sizeof (float))) < 0)
7395 {
7396 long i = longval ();
7397 if (i != ((long) (sizeof (float))))
7398 exit (1);
7399 fprintf (f, "%ld\n", i);
7400 }
7401 else
7402 {
7403 unsigned long i = ulongval ();
7404 if (i != ((long) (sizeof (float))))
7405 exit (1);
7406 fprintf (f, "%lu\n", i);
7407 }
7408 exit (ferror (f) || fclose (f) != 0);
7409
7410 ;
7411 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007412}
Martin v. Löwis11437992002-04-12 09:54:03 +00007413_ACEOF
7414rm -f conftest$ac_exeext
7415if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7416 (eval $ac_link) 2>&5
7417 ac_status=$?
7418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7419 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7421 (eval $ac_try) 2>&5
7422 ac_status=$?
7423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7424 (exit $ac_status); }; }; then
7425 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007426else
Martin v. Löwis11437992002-04-12 09:54:03 +00007427 echo "$as_me: program exited with status $ac_status" >&5
7428echo "$as_me: failed program was:" >&5
7429cat conftest.$ac_ext >&5
7430( exit $ac_status )
7431{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7432echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7433 { (exit 1); exit 1; }; }
7434fi
Barry Warsawfe33b792003-01-07 22:42:49 +00007435rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007436fi
7437fi
7438rm -f conftest.val
7439else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007440 ac_cv_sizeof_float=0
7441fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007442fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007443echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7444echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7445cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007446#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007447_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007448
7449
Martin v. Löwis11437992002-04-12 09:54:03 +00007450echo "$as_me:$LINENO: checking for double" >&5
7451echo $ECHO_N "checking for double... $ECHO_C" >&6
7452if test "${ac_cv_type_double+set}" = set; then
7453 echo $ECHO_N "(cached) $ECHO_C" >&6
7454else
7455 cat >conftest.$ac_ext <<_ACEOF
7456#line $LINENO "configure"
7457#include "confdefs.h"
7458$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007459#ifdef F77_DUMMY_MAIN
7460# ifdef __cplusplus
7461 extern "C"
7462# endif
7463 int F77_DUMMY_MAIN() { return 1; }
7464#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007465int
7466main ()
7467{
7468if ((double *) 0)
7469 return 0;
7470if (sizeof (double))
7471 return 0;
7472 ;
7473 return 0;
7474}
7475_ACEOF
7476rm -f conftest.$ac_objext
7477if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7478 (eval $ac_compile) 2>&5
7479 ac_status=$?
7480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7481 (exit $ac_status); } &&
7482 { ac_try='test -s conftest.$ac_objext'
7483 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7484 (eval $ac_try) 2>&5
7485 ac_status=$?
7486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7487 (exit $ac_status); }; }; then
7488 ac_cv_type_double=yes
7489else
7490 echo "$as_me: failed program was:" >&5
7491cat conftest.$ac_ext >&5
7492ac_cv_type_double=no
7493fi
7494rm -f conftest.$ac_objext conftest.$ac_ext
7495fi
7496echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7497echo "${ECHO_T}$ac_cv_type_double" >&6
7498
7499echo "$as_me:$LINENO: checking size of double" >&5
7500echo $ECHO_N "checking size of double... $ECHO_C" >&6
7501if test "${ac_cv_sizeof_double+set}" = set; then
7502 echo $ECHO_N "(cached) $ECHO_C" >&6
7503else
7504 if test "$ac_cv_type_double" = yes; then
7505 # The cast to unsigned long works around a bug in the HP C Compiler
7506 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7507 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7508 # This bug is HP SR number 8606223364.
7509 if test "$cross_compiling" = yes; then
7510 # Depending upon the size, compute the lo and hi bounds.
7511cat >conftest.$ac_ext <<_ACEOF
7512#line $LINENO "configure"
7513#include "confdefs.h"
7514$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007515#ifdef F77_DUMMY_MAIN
7516# ifdef __cplusplus
7517 extern "C"
7518# endif
7519 int F77_DUMMY_MAIN() { return 1; }
7520#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007521int
7522main ()
7523{
7524static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7525test_array [0] = 0
7526
7527 ;
7528 return 0;
7529}
7530_ACEOF
7531rm -f conftest.$ac_objext
7532if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7533 (eval $ac_compile) 2>&5
7534 ac_status=$?
7535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7536 (exit $ac_status); } &&
7537 { ac_try='test -s conftest.$ac_objext'
7538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7539 (eval $ac_try) 2>&5
7540 ac_status=$?
7541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7542 (exit $ac_status); }; }; then
7543 ac_lo=0 ac_mid=0
7544 while :; do
7545 cat >conftest.$ac_ext <<_ACEOF
7546#line $LINENO "configure"
7547#include "confdefs.h"
7548$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007549#ifdef F77_DUMMY_MAIN
7550# ifdef __cplusplus
7551 extern "C"
7552# endif
7553 int F77_DUMMY_MAIN() { return 1; }
7554#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007555int
7556main ()
7557{
7558static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7559test_array [0] = 0
7560
7561 ;
7562 return 0;
7563}
7564_ACEOF
7565rm -f conftest.$ac_objext
7566if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7567 (eval $ac_compile) 2>&5
7568 ac_status=$?
7569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7570 (exit $ac_status); } &&
7571 { ac_try='test -s conftest.$ac_objext'
7572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7573 (eval $ac_try) 2>&5
7574 ac_status=$?
7575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7576 (exit $ac_status); }; }; then
7577 ac_hi=$ac_mid; break
7578else
7579 echo "$as_me: failed program was:" >&5
7580cat conftest.$ac_ext >&5
7581ac_lo=`expr $ac_mid + 1`
7582 if test $ac_lo -le $ac_mid; then
7583 ac_lo= ac_hi=
7584 break
7585 fi
7586 ac_mid=`expr 2 '*' $ac_mid + 1`
7587fi
7588rm -f conftest.$ac_objext conftest.$ac_ext
7589 done
7590else
7591 echo "$as_me: failed program was:" >&5
7592cat conftest.$ac_ext >&5
7593cat >conftest.$ac_ext <<_ACEOF
7594#line $LINENO "configure"
7595#include "confdefs.h"
7596$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007597#ifdef F77_DUMMY_MAIN
7598# ifdef __cplusplus
7599 extern "C"
7600# endif
7601 int F77_DUMMY_MAIN() { return 1; }
7602#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007603int
7604main ()
7605{
7606static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7607test_array [0] = 0
7608
7609 ;
7610 return 0;
7611}
7612_ACEOF
7613rm -f conftest.$ac_objext
7614if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7615 (eval $ac_compile) 2>&5
7616 ac_status=$?
7617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7618 (exit $ac_status); } &&
7619 { ac_try='test -s conftest.$ac_objext'
7620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7621 (eval $ac_try) 2>&5
7622 ac_status=$?
7623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7624 (exit $ac_status); }; }; then
7625 ac_hi=-1 ac_mid=-1
7626 while :; do
7627 cat >conftest.$ac_ext <<_ACEOF
7628#line $LINENO "configure"
7629#include "confdefs.h"
7630$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007631#ifdef F77_DUMMY_MAIN
7632# ifdef __cplusplus
7633 extern "C"
7634# endif
7635 int F77_DUMMY_MAIN() { return 1; }
7636#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007637int
7638main ()
7639{
7640static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7641test_array [0] = 0
7642
7643 ;
7644 return 0;
7645}
7646_ACEOF
7647rm -f conftest.$ac_objext
7648if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7649 (eval $ac_compile) 2>&5
7650 ac_status=$?
7651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7652 (exit $ac_status); } &&
7653 { ac_try='test -s conftest.$ac_objext'
7654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7655 (eval $ac_try) 2>&5
7656 ac_status=$?
7657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7658 (exit $ac_status); }; }; then
7659 ac_lo=$ac_mid; break
7660else
7661 echo "$as_me: failed program was:" >&5
7662cat conftest.$ac_ext >&5
7663ac_hi=`expr '(' $ac_mid ')' - 1`
7664 if test $ac_mid -le $ac_hi; then
7665 ac_lo= ac_hi=
7666 break
7667 fi
7668 ac_mid=`expr 2 '*' $ac_mid`
7669fi
7670rm -f conftest.$ac_objext conftest.$ac_ext
7671 done
7672else
7673 echo "$as_me: failed program was:" >&5
7674cat conftest.$ac_ext >&5
7675ac_lo= ac_hi=
7676fi
7677rm -f conftest.$ac_objext conftest.$ac_ext
7678fi
7679rm -f conftest.$ac_objext conftest.$ac_ext
7680# Binary search between lo and hi bounds.
7681while test "x$ac_lo" != "x$ac_hi"; do
7682 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7683 cat >conftest.$ac_ext <<_ACEOF
7684#line $LINENO "configure"
7685#include "confdefs.h"
7686$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007687#ifdef F77_DUMMY_MAIN
7688# ifdef __cplusplus
7689 extern "C"
7690# endif
7691 int F77_DUMMY_MAIN() { return 1; }
7692#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007693int
7694main ()
7695{
7696static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7697test_array [0] = 0
7698
7699 ;
7700 return 0;
7701}
7702_ACEOF
7703rm -f conftest.$ac_objext
7704if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7705 (eval $ac_compile) 2>&5
7706 ac_status=$?
7707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7708 (exit $ac_status); } &&
7709 { ac_try='test -s conftest.$ac_objext'
7710 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7711 (eval $ac_try) 2>&5
7712 ac_status=$?
7713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7714 (exit $ac_status); }; }; then
7715 ac_hi=$ac_mid
7716else
7717 echo "$as_me: failed program was:" >&5
7718cat conftest.$ac_ext >&5
7719ac_lo=`expr '(' $ac_mid ')' + 1`
7720fi
7721rm -f conftest.$ac_objext conftest.$ac_ext
7722done
7723case $ac_lo in
7724?*) ac_cv_sizeof_double=$ac_lo;;
7725'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7726echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7727 { (exit 1); exit 1; }; } ;;
7728esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007729else
7730 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007731 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7732echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7733 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007734else
Martin v. Löwis11437992002-04-12 09:54:03 +00007735 cat >conftest.$ac_ext <<_ACEOF
7736#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007737#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007738$ac_includes_default
7739long longval () { return (long) (sizeof (double)); }
7740unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007741#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007742#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00007743#ifdef F77_DUMMY_MAIN
7744# ifdef __cplusplus
7745 extern "C"
7746# endif
7747 int F77_DUMMY_MAIN() { return 1; }
7748#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007749int
7750main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007751{
Martin v. Löwis11437992002-04-12 09:54:03 +00007752
7753 FILE *f = fopen ("conftest.val", "w");
7754 if (! f)
7755 exit (1);
7756 if (((long) (sizeof (double))) < 0)
7757 {
7758 long i = longval ();
7759 if (i != ((long) (sizeof (double))))
7760 exit (1);
7761 fprintf (f, "%ld\n", i);
7762 }
7763 else
7764 {
7765 unsigned long i = ulongval ();
7766 if (i != ((long) (sizeof (double))))
7767 exit (1);
7768 fprintf (f, "%lu\n", i);
7769 }
7770 exit (ferror (f) || fclose (f) != 0);
7771
7772 ;
7773 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007774}
Martin v. Löwis11437992002-04-12 09:54:03 +00007775_ACEOF
7776rm -f conftest$ac_exeext
7777if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7778 (eval $ac_link) 2>&5
7779 ac_status=$?
7780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7781 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7783 (eval $ac_try) 2>&5
7784 ac_status=$?
7785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7786 (exit $ac_status); }; }; then
7787 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007788else
Martin v. Löwis11437992002-04-12 09:54:03 +00007789 echo "$as_me: program exited with status $ac_status" >&5
7790echo "$as_me: failed program was:" >&5
7791cat conftest.$ac_ext >&5
7792( exit $ac_status )
7793{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7794echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7795 { (exit 1); exit 1; }; }
7796fi
Barry Warsawfe33b792003-01-07 22:42:49 +00007797rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007798fi
7799fi
7800rm -f conftest.val
7801else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007802 ac_cv_sizeof_double=0
7803fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007804fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007805echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7806echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7807cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007808#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007809_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007810
7811
Martin v. Löwis11437992002-04-12 09:54:03 +00007812echo "$as_me:$LINENO: checking for fpos_t" >&5
7813echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7814if test "${ac_cv_type_fpos_t+set}" = set; then
7815 echo $ECHO_N "(cached) $ECHO_C" >&6
7816else
7817 cat >conftest.$ac_ext <<_ACEOF
7818#line $LINENO "configure"
7819#include "confdefs.h"
7820$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007821#ifdef F77_DUMMY_MAIN
7822# ifdef __cplusplus
7823 extern "C"
7824# endif
7825 int F77_DUMMY_MAIN() { return 1; }
7826#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007827int
7828main ()
7829{
7830if ((fpos_t *) 0)
7831 return 0;
7832if (sizeof (fpos_t))
7833 return 0;
7834 ;
7835 return 0;
7836}
7837_ACEOF
7838rm -f conftest.$ac_objext
7839if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7840 (eval $ac_compile) 2>&5
7841 ac_status=$?
7842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7843 (exit $ac_status); } &&
7844 { ac_try='test -s conftest.$ac_objext'
7845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7846 (eval $ac_try) 2>&5
7847 ac_status=$?
7848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7849 (exit $ac_status); }; }; then
7850 ac_cv_type_fpos_t=yes
7851else
7852 echo "$as_me: failed program was:" >&5
7853cat conftest.$ac_ext >&5
7854ac_cv_type_fpos_t=no
7855fi
7856rm -f conftest.$ac_objext conftest.$ac_ext
7857fi
7858echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7859echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7860
7861echo "$as_me:$LINENO: checking size of fpos_t" >&5
7862echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7863if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7864 echo $ECHO_N "(cached) $ECHO_C" >&6
7865else
7866 if test "$ac_cv_type_fpos_t" = yes; then
7867 # The cast to unsigned long works around a bug in the HP C Compiler
7868 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7869 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7870 # This bug is HP SR number 8606223364.
7871 if test "$cross_compiling" = yes; then
7872 # Depending upon the size, compute the lo and hi bounds.
7873cat >conftest.$ac_ext <<_ACEOF
7874#line $LINENO "configure"
7875#include "confdefs.h"
7876$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007877#ifdef F77_DUMMY_MAIN
7878# ifdef __cplusplus
7879 extern "C"
7880# endif
7881 int F77_DUMMY_MAIN() { return 1; }
7882#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007883int
7884main ()
7885{
7886static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7887test_array [0] = 0
7888
7889 ;
7890 return 0;
7891}
7892_ACEOF
7893rm -f conftest.$ac_objext
7894if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7895 (eval $ac_compile) 2>&5
7896 ac_status=$?
7897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7898 (exit $ac_status); } &&
7899 { ac_try='test -s conftest.$ac_objext'
7900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7901 (eval $ac_try) 2>&5
7902 ac_status=$?
7903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7904 (exit $ac_status); }; }; then
7905 ac_lo=0 ac_mid=0
7906 while :; do
7907 cat >conftest.$ac_ext <<_ACEOF
7908#line $LINENO "configure"
7909#include "confdefs.h"
7910$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007911#ifdef F77_DUMMY_MAIN
7912# ifdef __cplusplus
7913 extern "C"
7914# endif
7915 int F77_DUMMY_MAIN() { return 1; }
7916#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007917int
7918main ()
7919{
7920static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7921test_array [0] = 0
7922
7923 ;
7924 return 0;
7925}
7926_ACEOF
7927rm -f conftest.$ac_objext
7928if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7929 (eval $ac_compile) 2>&5
7930 ac_status=$?
7931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7932 (exit $ac_status); } &&
7933 { ac_try='test -s conftest.$ac_objext'
7934 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7935 (eval $ac_try) 2>&5
7936 ac_status=$?
7937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7938 (exit $ac_status); }; }; then
7939 ac_hi=$ac_mid; break
7940else
7941 echo "$as_me: failed program was:" >&5
7942cat conftest.$ac_ext >&5
7943ac_lo=`expr $ac_mid + 1`
7944 if test $ac_lo -le $ac_mid; then
7945 ac_lo= ac_hi=
7946 break
7947 fi
7948 ac_mid=`expr 2 '*' $ac_mid + 1`
7949fi
7950rm -f conftest.$ac_objext conftest.$ac_ext
7951 done
7952else
7953 echo "$as_me: failed program was:" >&5
7954cat conftest.$ac_ext >&5
7955cat >conftest.$ac_ext <<_ACEOF
7956#line $LINENO "configure"
7957#include "confdefs.h"
7958$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007959#ifdef F77_DUMMY_MAIN
7960# ifdef __cplusplus
7961 extern "C"
7962# endif
7963 int F77_DUMMY_MAIN() { return 1; }
7964#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007965int
7966main ()
7967{
7968static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7969test_array [0] = 0
7970
7971 ;
7972 return 0;
7973}
7974_ACEOF
7975rm -f conftest.$ac_objext
7976if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7977 (eval $ac_compile) 2>&5
7978 ac_status=$?
7979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7980 (exit $ac_status); } &&
7981 { ac_try='test -s conftest.$ac_objext'
7982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7983 (eval $ac_try) 2>&5
7984 ac_status=$?
7985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7986 (exit $ac_status); }; }; then
7987 ac_hi=-1 ac_mid=-1
7988 while :; do
7989 cat >conftest.$ac_ext <<_ACEOF
7990#line $LINENO "configure"
7991#include "confdefs.h"
7992$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007993#ifdef F77_DUMMY_MAIN
7994# ifdef __cplusplus
7995 extern "C"
7996# endif
7997 int F77_DUMMY_MAIN() { return 1; }
7998#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007999int
8000main ()
8001{
8002static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8003test_array [0] = 0
8004
8005 ;
8006 return 0;
8007}
8008_ACEOF
8009rm -f conftest.$ac_objext
8010if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8011 (eval $ac_compile) 2>&5
8012 ac_status=$?
8013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8014 (exit $ac_status); } &&
8015 { ac_try='test -s conftest.$ac_objext'
8016 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8017 (eval $ac_try) 2>&5
8018 ac_status=$?
8019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8020 (exit $ac_status); }; }; then
8021 ac_lo=$ac_mid; break
8022else
8023 echo "$as_me: failed program was:" >&5
8024cat conftest.$ac_ext >&5
8025ac_hi=`expr '(' $ac_mid ')' - 1`
8026 if test $ac_mid -le $ac_hi; then
8027 ac_lo= ac_hi=
8028 break
8029 fi
8030 ac_mid=`expr 2 '*' $ac_mid`
8031fi
8032rm -f conftest.$ac_objext conftest.$ac_ext
8033 done
8034else
8035 echo "$as_me: failed program was:" >&5
8036cat conftest.$ac_ext >&5
8037ac_lo= ac_hi=
8038fi
8039rm -f conftest.$ac_objext conftest.$ac_ext
8040fi
8041rm -f conftest.$ac_objext conftest.$ac_ext
8042# Binary search between lo and hi bounds.
8043while test "x$ac_lo" != "x$ac_hi"; do
8044 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8045 cat >conftest.$ac_ext <<_ACEOF
8046#line $LINENO "configure"
8047#include "confdefs.h"
8048$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008049#ifdef F77_DUMMY_MAIN
8050# ifdef __cplusplus
8051 extern "C"
8052# endif
8053 int F77_DUMMY_MAIN() { return 1; }
8054#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008055int
8056main ()
8057{
8058static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8059test_array [0] = 0
8060
8061 ;
8062 return 0;
8063}
8064_ACEOF
8065rm -f conftest.$ac_objext
8066if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8067 (eval $ac_compile) 2>&5
8068 ac_status=$?
8069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8070 (exit $ac_status); } &&
8071 { ac_try='test -s conftest.$ac_objext'
8072 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8073 (eval $ac_try) 2>&5
8074 ac_status=$?
8075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8076 (exit $ac_status); }; }; then
8077 ac_hi=$ac_mid
8078else
8079 echo "$as_me: failed program was:" >&5
8080cat conftest.$ac_ext >&5
8081ac_lo=`expr '(' $ac_mid ')' + 1`
8082fi
8083rm -f conftest.$ac_objext conftest.$ac_ext
8084done
8085case $ac_lo in
8086?*) ac_cv_sizeof_fpos_t=$ac_lo;;
8087'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8088echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
8089 { (exit 1); exit 1; }; } ;;
8090esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008091else
8092 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008093 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8094echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8095 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008096else
Martin v. Löwis11437992002-04-12 09:54:03 +00008097 cat >conftest.$ac_ext <<_ACEOF
8098#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008099#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008100$ac_includes_default
8101long longval () { return (long) (sizeof (fpos_t)); }
8102unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008103#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008104#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00008105#ifdef F77_DUMMY_MAIN
8106# ifdef __cplusplus
8107 extern "C"
8108# endif
8109 int F77_DUMMY_MAIN() { return 1; }
8110#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008111int
8112main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008113{
Martin v. Löwis11437992002-04-12 09:54:03 +00008114
8115 FILE *f = fopen ("conftest.val", "w");
8116 if (! f)
8117 exit (1);
8118 if (((long) (sizeof (fpos_t))) < 0)
8119 {
8120 long i = longval ();
8121 if (i != ((long) (sizeof (fpos_t))))
8122 exit (1);
8123 fprintf (f, "%ld\n", i);
8124 }
8125 else
8126 {
8127 unsigned long i = ulongval ();
8128 if (i != ((long) (sizeof (fpos_t))))
8129 exit (1);
8130 fprintf (f, "%lu\n", i);
8131 }
8132 exit (ferror (f) || fclose (f) != 0);
8133
8134 ;
8135 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008136}
Martin v. Löwis11437992002-04-12 09:54:03 +00008137_ACEOF
8138rm -f conftest$ac_exeext
8139if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8140 (eval $ac_link) 2>&5
8141 ac_status=$?
8142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8143 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8144 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8145 (eval $ac_try) 2>&5
8146 ac_status=$?
8147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8148 (exit $ac_status); }; }; then
8149 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008150else
Martin v. Löwis11437992002-04-12 09:54:03 +00008151 echo "$as_me: program exited with status $ac_status" >&5
8152echo "$as_me: failed program was:" >&5
8153cat conftest.$ac_ext >&5
8154( exit $ac_status )
8155{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8156echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
8157 { (exit 1); exit 1; }; }
8158fi
Barry Warsawfe33b792003-01-07 22:42:49 +00008159rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008160fi
8161fi
8162rm -f conftest.val
8163else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008164 ac_cv_sizeof_fpos_t=0
8165fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008166fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008167echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8168echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8169cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008170#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008171_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008172
Michael W. Hudson54241132001-12-07 15:38:26 +00008173
8174
Martin v. Löwis11437992002-04-12 09:54:03 +00008175echo "$as_me:$LINENO: checking for long long support" >&5
8176echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008177have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008178cat >conftest.$ac_ext <<_ACEOF
8179#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008180#include "confdefs.h"
8181
Barry Warsawfe33b792003-01-07 22:42:49 +00008182#ifdef F77_DUMMY_MAIN
8183# ifdef __cplusplus
8184 extern "C"
8185# endif
8186 int F77_DUMMY_MAIN() { return 1; }
8187#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008188int
8189main ()
8190{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008191long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008192 ;
8193 return 0;
8194}
8195_ACEOF
8196rm -f conftest.$ac_objext
8197if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8198 (eval $ac_compile) 2>&5
8199 ac_status=$?
8200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8201 (exit $ac_status); } &&
8202 { ac_try='test -s conftest.$ac_objext'
8203 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8204 (eval $ac_try) 2>&5
8205 ac_status=$?
8206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8207 (exit $ac_status); }; }; then
8208
8209
8210cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008211#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008212_ACEOF
8213
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008214 have_long_long=yes
8215
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008216else
Martin v. Löwis11437992002-04-12 09:54:03 +00008217 echo "$as_me: failed program was:" >&5
8218cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008219fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008220rm -f conftest.$ac_objext conftest.$ac_ext
8221echo "$as_me:$LINENO: result: $have_long_long" >&5
8222echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008223if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008224echo "$as_me:$LINENO: checking for long long" >&5
8225echo $ECHO_N "checking for long long... $ECHO_C" >&6
8226if test "${ac_cv_type_long_long+set}" = set; then
8227 echo $ECHO_N "(cached) $ECHO_C" >&6
8228else
8229 cat >conftest.$ac_ext <<_ACEOF
8230#line $LINENO "configure"
8231#include "confdefs.h"
8232$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008233#ifdef F77_DUMMY_MAIN
8234# ifdef __cplusplus
8235 extern "C"
8236# endif
8237 int F77_DUMMY_MAIN() { return 1; }
8238#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008239int
8240main ()
8241{
8242if ((long long *) 0)
8243 return 0;
8244if (sizeof (long long))
8245 return 0;
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_cv_type_long_long=yes
8263else
8264 echo "$as_me: failed program was:" >&5
8265cat conftest.$ac_ext >&5
8266ac_cv_type_long_long=no
8267fi
8268rm -f conftest.$ac_objext conftest.$ac_ext
8269fi
8270echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8271echo "${ECHO_T}$ac_cv_type_long_long" >&6
8272
8273echo "$as_me:$LINENO: checking size of long long" >&5
8274echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8275if test "${ac_cv_sizeof_long_long+set}" = set; then
8276 echo $ECHO_N "(cached) $ECHO_C" >&6
8277else
8278 if test "$ac_cv_type_long_long" = yes; then
8279 # The cast to unsigned long works around a bug in the HP C Compiler
8280 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8281 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8282 # This bug is HP SR number 8606223364.
8283 if test "$cross_compiling" = yes; then
8284 # Depending upon the size, compute the lo and hi bounds.
8285cat >conftest.$ac_ext <<_ACEOF
8286#line $LINENO "configure"
8287#include "confdefs.h"
8288$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008289#ifdef F77_DUMMY_MAIN
8290# ifdef __cplusplus
8291 extern "C"
8292# endif
8293 int F77_DUMMY_MAIN() { return 1; }
8294#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008295int
8296main ()
8297{
8298static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8299test_array [0] = 0
8300
8301 ;
8302 return 0;
8303}
8304_ACEOF
8305rm -f conftest.$ac_objext
8306if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8307 (eval $ac_compile) 2>&5
8308 ac_status=$?
8309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8310 (exit $ac_status); } &&
8311 { ac_try='test -s conftest.$ac_objext'
8312 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8313 (eval $ac_try) 2>&5
8314 ac_status=$?
8315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8316 (exit $ac_status); }; }; then
8317 ac_lo=0 ac_mid=0
8318 while :; do
8319 cat >conftest.$ac_ext <<_ACEOF
8320#line $LINENO "configure"
8321#include "confdefs.h"
8322$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008323#ifdef F77_DUMMY_MAIN
8324# ifdef __cplusplus
8325 extern "C"
8326# endif
8327 int F77_DUMMY_MAIN() { return 1; }
8328#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008329int
8330main ()
8331{
8332static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8333test_array [0] = 0
8334
8335 ;
8336 return 0;
8337}
8338_ACEOF
8339rm -f conftest.$ac_objext
8340if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8341 (eval $ac_compile) 2>&5
8342 ac_status=$?
8343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8344 (exit $ac_status); } &&
8345 { ac_try='test -s conftest.$ac_objext'
8346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8347 (eval $ac_try) 2>&5
8348 ac_status=$?
8349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8350 (exit $ac_status); }; }; then
8351 ac_hi=$ac_mid; break
8352else
8353 echo "$as_me: failed program was:" >&5
8354cat conftest.$ac_ext >&5
8355ac_lo=`expr $ac_mid + 1`
8356 if test $ac_lo -le $ac_mid; then
8357 ac_lo= ac_hi=
8358 break
8359 fi
8360 ac_mid=`expr 2 '*' $ac_mid + 1`
8361fi
8362rm -f conftest.$ac_objext conftest.$ac_ext
8363 done
8364else
8365 echo "$as_me: failed program was:" >&5
8366cat conftest.$ac_ext >&5
8367cat >conftest.$ac_ext <<_ACEOF
8368#line $LINENO "configure"
8369#include "confdefs.h"
8370$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008371#ifdef F77_DUMMY_MAIN
8372# ifdef __cplusplus
8373 extern "C"
8374# endif
8375 int F77_DUMMY_MAIN() { return 1; }
8376#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008377int
8378main ()
8379{
8380static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8381test_array [0] = 0
8382
8383 ;
8384 return 0;
8385}
8386_ACEOF
8387rm -f conftest.$ac_objext
8388if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8389 (eval $ac_compile) 2>&5
8390 ac_status=$?
8391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8392 (exit $ac_status); } &&
8393 { ac_try='test -s conftest.$ac_objext'
8394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8395 (eval $ac_try) 2>&5
8396 ac_status=$?
8397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8398 (exit $ac_status); }; }; then
8399 ac_hi=-1 ac_mid=-1
8400 while :; do
8401 cat >conftest.$ac_ext <<_ACEOF
8402#line $LINENO "configure"
8403#include "confdefs.h"
8404$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008405#ifdef F77_DUMMY_MAIN
8406# ifdef __cplusplus
8407 extern "C"
8408# endif
8409 int F77_DUMMY_MAIN() { return 1; }
8410#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008411int
8412main ()
8413{
8414static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8415test_array [0] = 0
8416
8417 ;
8418 return 0;
8419}
8420_ACEOF
8421rm -f conftest.$ac_objext
8422if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8423 (eval $ac_compile) 2>&5
8424 ac_status=$?
8425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8426 (exit $ac_status); } &&
8427 { ac_try='test -s conftest.$ac_objext'
8428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8429 (eval $ac_try) 2>&5
8430 ac_status=$?
8431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8432 (exit $ac_status); }; }; then
8433 ac_lo=$ac_mid; break
8434else
8435 echo "$as_me: failed program was:" >&5
8436cat conftest.$ac_ext >&5
8437ac_hi=`expr '(' $ac_mid ')' - 1`
8438 if test $ac_mid -le $ac_hi; then
8439 ac_lo= ac_hi=
8440 break
8441 fi
8442 ac_mid=`expr 2 '*' $ac_mid`
8443fi
8444rm -f conftest.$ac_objext conftest.$ac_ext
8445 done
8446else
8447 echo "$as_me: failed program was:" >&5
8448cat conftest.$ac_ext >&5
8449ac_lo= ac_hi=
8450fi
8451rm -f conftest.$ac_objext conftest.$ac_ext
8452fi
8453rm -f conftest.$ac_objext conftest.$ac_ext
8454# Binary search between lo and hi bounds.
8455while test "x$ac_lo" != "x$ac_hi"; do
8456 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8457 cat >conftest.$ac_ext <<_ACEOF
8458#line $LINENO "configure"
8459#include "confdefs.h"
8460$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008461#ifdef F77_DUMMY_MAIN
8462# ifdef __cplusplus
8463 extern "C"
8464# endif
8465 int F77_DUMMY_MAIN() { return 1; }
8466#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008467int
8468main ()
8469{
8470static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8471test_array [0] = 0
8472
8473 ;
8474 return 0;
8475}
8476_ACEOF
8477rm -f conftest.$ac_objext
8478if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8479 (eval $ac_compile) 2>&5
8480 ac_status=$?
8481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8482 (exit $ac_status); } &&
8483 { ac_try='test -s conftest.$ac_objext'
8484 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8485 (eval $ac_try) 2>&5
8486 ac_status=$?
8487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8488 (exit $ac_status); }; }; then
8489 ac_hi=$ac_mid
8490else
8491 echo "$as_me: failed program was:" >&5
8492cat conftest.$ac_ext >&5
8493ac_lo=`expr '(' $ac_mid ')' + 1`
8494fi
8495rm -f conftest.$ac_objext conftest.$ac_ext
8496done
8497case $ac_lo in
8498?*) ac_cv_sizeof_long_long=$ac_lo;;
8499'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8500echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8501 { (exit 1); exit 1; }; } ;;
8502esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008503else
8504 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008505 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8506echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8507 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008508else
Martin v. Löwis11437992002-04-12 09:54:03 +00008509 cat >conftest.$ac_ext <<_ACEOF
8510#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008511#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008512$ac_includes_default
8513long longval () { return (long) (sizeof (long long)); }
8514unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008515#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008516#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00008517#ifdef F77_DUMMY_MAIN
8518# ifdef __cplusplus
8519 extern "C"
8520# endif
8521 int F77_DUMMY_MAIN() { return 1; }
8522#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008523int
8524main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008525{
Martin v. Löwis11437992002-04-12 09:54:03 +00008526
8527 FILE *f = fopen ("conftest.val", "w");
8528 if (! f)
8529 exit (1);
8530 if (((long) (sizeof (long long))) < 0)
8531 {
8532 long i = longval ();
8533 if (i != ((long) (sizeof (long long))))
8534 exit (1);
8535 fprintf (f, "%ld\n", i);
8536 }
8537 else
8538 {
8539 unsigned long i = ulongval ();
8540 if (i != ((long) (sizeof (long long))))
8541 exit (1);
8542 fprintf (f, "%lu\n", i);
8543 }
8544 exit (ferror (f) || fclose (f) != 0);
8545
8546 ;
8547 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008548}
Martin v. Löwis11437992002-04-12 09:54:03 +00008549_ACEOF
8550rm -f conftest$ac_exeext
8551if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8552 (eval $ac_link) 2>&5
8553 ac_status=$?
8554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8555 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8557 (eval $ac_try) 2>&5
8558 ac_status=$?
8559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8560 (exit $ac_status); }; }; then
8561 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008562else
Martin v. Löwis11437992002-04-12 09:54:03 +00008563 echo "$as_me: program exited with status $ac_status" >&5
8564echo "$as_me: failed program was:" >&5
8565cat conftest.$ac_ext >&5
8566( exit $ac_status )
8567{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8568echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8569 { (exit 1); exit 1; }; }
8570fi
Barry Warsawfe33b792003-01-07 22:42:49 +00008571rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008572fi
8573fi
8574rm -f conftest.val
8575else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008576 ac_cv_sizeof_long_long=0
8577fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008578fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008579echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8580echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8581cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008582#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008583_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008584
Michael W. Hudson54241132001-12-07 15:38:26 +00008585
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008586fi
8587
Martin v. Löwis11437992002-04-12 09:54:03 +00008588echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8589echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008590have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008591cat >conftest.$ac_ext <<_ACEOF
8592#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008593#include "confdefs.h"
8594
Barry Warsawfe33b792003-01-07 22:42:49 +00008595#ifdef F77_DUMMY_MAIN
8596# ifdef __cplusplus
8597 extern "C"
8598# endif
8599 int F77_DUMMY_MAIN() { return 1; }
8600#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008601int
8602main ()
8603{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008604uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008605 ;
8606 return 0;
8607}
8608_ACEOF
8609rm -f conftest.$ac_objext
8610if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8611 (eval $ac_compile) 2>&5
8612 ac_status=$?
8613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8614 (exit $ac_status); } &&
8615 { ac_try='test -s conftest.$ac_objext'
8616 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8617 (eval $ac_try) 2>&5
8618 ac_status=$?
8619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8620 (exit $ac_status); }; }; then
8621
8622
8623cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008624#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008625_ACEOF
8626
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008627 have_uintptr_t=yes
8628
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008629else
Martin v. Löwis11437992002-04-12 09:54:03 +00008630 echo "$as_me: failed program was:" >&5
8631cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008632fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008633rm -f conftest.$ac_objext conftest.$ac_ext
8634echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8635echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008636if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008637echo "$as_me:$LINENO: checking for uintptr_t" >&5
8638echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8639if test "${ac_cv_type_uintptr_t+set}" = set; then
8640 echo $ECHO_N "(cached) $ECHO_C" >&6
8641else
8642 cat >conftest.$ac_ext <<_ACEOF
8643#line $LINENO "configure"
8644#include "confdefs.h"
8645$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +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{
8655if ((uintptr_t *) 0)
8656 return 0;
8657if (sizeof (uintptr_t))
8658 return 0;
8659 ;
8660 return 0;
8661}
8662_ACEOF
8663rm -f conftest.$ac_objext
8664if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8665 (eval $ac_compile) 2>&5
8666 ac_status=$?
8667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8668 (exit $ac_status); } &&
8669 { ac_try='test -s conftest.$ac_objext'
8670 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8671 (eval $ac_try) 2>&5
8672 ac_status=$?
8673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8674 (exit $ac_status); }; }; then
8675 ac_cv_type_uintptr_t=yes
8676else
8677 echo "$as_me: failed program was:" >&5
8678cat conftest.$ac_ext >&5
8679ac_cv_type_uintptr_t=no
8680fi
8681rm -f conftest.$ac_objext conftest.$ac_ext
8682fi
8683echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8684echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8685
8686echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8687echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8688if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8689 echo $ECHO_N "(cached) $ECHO_C" >&6
8690else
8691 if test "$ac_cv_type_uintptr_t" = yes; then
8692 # The cast to unsigned long works around a bug in the HP C Compiler
8693 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8694 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8695 # This bug is HP SR number 8606223364.
8696 if test "$cross_compiling" = yes; then
8697 # Depending upon the size, compute the lo and hi bounds.
8698cat >conftest.$ac_ext <<_ACEOF
8699#line $LINENO "configure"
8700#include "confdefs.h"
8701$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +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 (uintptr_t))) >= 0)];
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_lo=0 ac_mid=0
8731 while :; do
8732 cat >conftest.$ac_ext <<_ACEOF
8733#line $LINENO "configure"
8734#include "confdefs.h"
8735$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008736#ifdef F77_DUMMY_MAIN
8737# ifdef __cplusplus
8738 extern "C"
8739# endif
8740 int F77_DUMMY_MAIN() { return 1; }
8741#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008742int
8743main ()
8744{
8745static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8746test_array [0] = 0
8747
8748 ;
8749 return 0;
8750}
8751_ACEOF
8752rm -f conftest.$ac_objext
8753if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8754 (eval $ac_compile) 2>&5
8755 ac_status=$?
8756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8757 (exit $ac_status); } &&
8758 { ac_try='test -s conftest.$ac_objext'
8759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8760 (eval $ac_try) 2>&5
8761 ac_status=$?
8762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8763 (exit $ac_status); }; }; then
8764 ac_hi=$ac_mid; break
8765else
8766 echo "$as_me: failed program was:" >&5
8767cat conftest.$ac_ext >&5
8768ac_lo=`expr $ac_mid + 1`
8769 if test $ac_lo -le $ac_mid; then
8770 ac_lo= ac_hi=
8771 break
8772 fi
8773 ac_mid=`expr 2 '*' $ac_mid + 1`
8774fi
8775rm -f conftest.$ac_objext conftest.$ac_ext
8776 done
8777else
8778 echo "$as_me: failed program was:" >&5
8779cat conftest.$ac_ext >&5
8780cat >conftest.$ac_ext <<_ACEOF
8781#line $LINENO "configure"
8782#include "confdefs.h"
8783$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008784#ifdef F77_DUMMY_MAIN
8785# ifdef __cplusplus
8786 extern "C"
8787# endif
8788 int F77_DUMMY_MAIN() { return 1; }
8789#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008790int
8791main ()
8792{
8793static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8794test_array [0] = 0
8795
8796 ;
8797 return 0;
8798}
8799_ACEOF
8800rm -f conftest.$ac_objext
8801if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8802 (eval $ac_compile) 2>&5
8803 ac_status=$?
8804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8805 (exit $ac_status); } &&
8806 { ac_try='test -s conftest.$ac_objext'
8807 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8808 (eval $ac_try) 2>&5
8809 ac_status=$?
8810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8811 (exit $ac_status); }; }; then
8812 ac_hi=-1 ac_mid=-1
8813 while :; do
8814 cat >conftest.$ac_ext <<_ACEOF
8815#line $LINENO "configure"
8816#include "confdefs.h"
8817$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008818#ifdef F77_DUMMY_MAIN
8819# ifdef __cplusplus
8820 extern "C"
8821# endif
8822 int F77_DUMMY_MAIN() { return 1; }
8823#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008824int
8825main ()
8826{
8827static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8828test_array [0] = 0
8829
8830 ;
8831 return 0;
8832}
8833_ACEOF
8834rm -f conftest.$ac_objext
8835if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8836 (eval $ac_compile) 2>&5
8837 ac_status=$?
8838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8839 (exit $ac_status); } &&
8840 { ac_try='test -s conftest.$ac_objext'
8841 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8842 (eval $ac_try) 2>&5
8843 ac_status=$?
8844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8845 (exit $ac_status); }; }; then
8846 ac_lo=$ac_mid; break
8847else
8848 echo "$as_me: failed program was:" >&5
8849cat conftest.$ac_ext >&5
8850ac_hi=`expr '(' $ac_mid ')' - 1`
8851 if test $ac_mid -le $ac_hi; then
8852 ac_lo= ac_hi=
8853 break
8854 fi
8855 ac_mid=`expr 2 '*' $ac_mid`
8856fi
8857rm -f conftest.$ac_objext conftest.$ac_ext
8858 done
8859else
8860 echo "$as_me: failed program was:" >&5
8861cat conftest.$ac_ext >&5
8862ac_lo= ac_hi=
8863fi
8864rm -f conftest.$ac_objext conftest.$ac_ext
8865fi
8866rm -f conftest.$ac_objext conftest.$ac_ext
8867# Binary search between lo and hi bounds.
8868while test "x$ac_lo" != "x$ac_hi"; do
8869 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8870 cat >conftest.$ac_ext <<_ACEOF
8871#line $LINENO "configure"
8872#include "confdefs.h"
8873$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008874#ifdef F77_DUMMY_MAIN
8875# ifdef __cplusplus
8876 extern "C"
8877# endif
8878 int F77_DUMMY_MAIN() { return 1; }
8879#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008880int
8881main ()
8882{
8883static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8884test_array [0] = 0
8885
8886 ;
8887 return 0;
8888}
8889_ACEOF
8890rm -f conftest.$ac_objext
8891if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8892 (eval $ac_compile) 2>&5
8893 ac_status=$?
8894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8895 (exit $ac_status); } &&
8896 { ac_try='test -s conftest.$ac_objext'
8897 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8898 (eval $ac_try) 2>&5
8899 ac_status=$?
8900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8901 (exit $ac_status); }; }; then
8902 ac_hi=$ac_mid
8903else
8904 echo "$as_me: failed program was:" >&5
8905cat conftest.$ac_ext >&5
8906ac_lo=`expr '(' $ac_mid ')' + 1`
8907fi
8908rm -f conftest.$ac_objext conftest.$ac_ext
8909done
8910case $ac_lo in
8911?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8912'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8913echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8914 { (exit 1); exit 1; }; } ;;
8915esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008916else
8917 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008918 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8919echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8920 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008921else
Martin v. Löwis11437992002-04-12 09:54:03 +00008922 cat >conftest.$ac_ext <<_ACEOF
8923#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008924#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008925$ac_includes_default
8926long longval () { return (long) (sizeof (uintptr_t)); }
8927unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008928#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008929#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00008930#ifdef F77_DUMMY_MAIN
8931# ifdef __cplusplus
8932 extern "C"
8933# endif
8934 int F77_DUMMY_MAIN() { return 1; }
8935#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008936int
8937main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008938{
Martin v. Löwis11437992002-04-12 09:54:03 +00008939
8940 FILE *f = fopen ("conftest.val", "w");
8941 if (! f)
8942 exit (1);
8943 if (((long) (sizeof (uintptr_t))) < 0)
8944 {
8945 long i = longval ();
8946 if (i != ((long) (sizeof (uintptr_t))))
8947 exit (1);
8948 fprintf (f, "%ld\n", i);
8949 }
8950 else
8951 {
8952 unsigned long i = ulongval ();
8953 if (i != ((long) (sizeof (uintptr_t))))
8954 exit (1);
8955 fprintf (f, "%lu\n", i);
8956 }
8957 exit (ferror (f) || fclose (f) != 0);
8958
8959 ;
8960 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008961}
Martin v. Löwis11437992002-04-12 09:54:03 +00008962_ACEOF
8963rm -f conftest$ac_exeext
8964if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8965 (eval $ac_link) 2>&5
8966 ac_status=$?
8967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8968 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8969 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8970 (eval $ac_try) 2>&5
8971 ac_status=$?
8972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8973 (exit $ac_status); }; }; then
8974 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008975else
Martin v. Löwis11437992002-04-12 09:54:03 +00008976 echo "$as_me: program exited with status $ac_status" >&5
8977echo "$as_me: failed program was:" >&5
8978cat conftest.$ac_ext >&5
8979( exit $ac_status )
8980{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8981echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8982 { (exit 1); exit 1; }; }
8983fi
Barry Warsawfe33b792003-01-07 22:42:49 +00008984rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008985fi
8986fi
8987rm -f conftest.val
8988else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008989 ac_cv_sizeof_uintptr_t=0
8990fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008991fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008992echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8993echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8994cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008995#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008996_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008997
Michael W. Hudson54241132001-12-07 15:38:26 +00008998
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008999fi
9000
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009001# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009002echo "$as_me:$LINENO: checking size of off_t" >&5
9003echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
9004if test "${ac_cv_sizeof_off_t+set}" = set; then
9005 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009006else
9007 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009008 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009009else
Martin v. Löwis11437992002-04-12 09:54:03 +00009010 cat >conftest.$ac_ext <<_ACEOF
9011#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009012#include "confdefs.h"
9013#include <stdio.h>
9014#include <sys/types.h>
9015main()
9016{
9017 FILE *f=fopen("conftestval", "w");
9018 if (!f) exit(1);
9019 fprintf(f, "%d\n", sizeof(off_t));
9020 exit(0);
9021}
Martin v. Löwis11437992002-04-12 09:54:03 +00009022_ACEOF
9023rm -f conftest$ac_exeext
9024if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9025 (eval $ac_link) 2>&5
9026 ac_status=$?
9027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9028 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9030 (eval $ac_try) 2>&5
9031 ac_status=$?
9032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9033 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009034 ac_cv_sizeof_off_t=`cat conftestval`
9035else
Martin v. Löwis11437992002-04-12 09:54:03 +00009036 echo "$as_me: program exited with status $ac_status" >&5
9037echo "$as_me: failed program was:" >&5
9038cat conftest.$ac_ext >&5
9039( exit $ac_status )
9040ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009041fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009042rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009043fi
9044
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009045fi
9046
Martin v. Löwis11437992002-04-12 09:54:03 +00009047echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
9048echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
9049
9050cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009051#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009052_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009053
Michael W. Hudson54241132001-12-07 15:38:26 +00009054
Martin v. Löwis11437992002-04-12 09:54:03 +00009055echo "$as_me:$LINENO: checking whether to enable large file support" >&5
9056echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009057if test "$have_long_long" = yes -a \
9058 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
9059 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009060
Martin v. Löwis11437992002-04-12 09:54:03 +00009061cat >>confdefs.h <<\_ACEOF
9062#define HAVE_LARGEFILE_SUPPORT 1
9063_ACEOF
9064
9065 echo "$as_me:$LINENO: result: yes" >&5
9066echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009067else
Martin v. Löwis11437992002-04-12 09:54:03 +00009068 echo "$as_me:$LINENO: result: no" >&5
9069echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009070fi
9071
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009072# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009073echo "$as_me:$LINENO: checking size of time_t" >&5
9074echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
9075if test "${ac_cv_sizeof_time_t+set}" = set; then
9076 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009077else
9078 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009079 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009080else
Martin v. Löwis11437992002-04-12 09:54:03 +00009081 cat >conftest.$ac_ext <<_ACEOF
9082#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009083#include "confdefs.h"
9084#include <stdio.h>
9085#include <time.h>
9086main()
9087{
9088 FILE *f=fopen("conftestval", "w");
9089 if (!f) exit(1);
9090 fprintf(f, "%d\n", sizeof(time_t));
9091 exit(0);
9092}
Martin v. Löwis11437992002-04-12 09:54:03 +00009093_ACEOF
9094rm -f conftest$ac_exeext
9095if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9096 (eval $ac_link) 2>&5
9097 ac_status=$?
9098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9099 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9100 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9101 (eval $ac_try) 2>&5
9102 ac_status=$?
9103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9104 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009105 ac_cv_sizeof_time_t=`cat conftestval`
9106else
Martin v. Löwis11437992002-04-12 09:54:03 +00009107 echo "$as_me: program exited with status $ac_status" >&5
9108echo "$as_me: failed program was:" >&5
9109cat conftest.$ac_ext >&5
9110( exit $ac_status )
9111ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009112fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009113rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009114fi
9115
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009116fi
9117
Martin v. Löwis11437992002-04-12 09:54:03 +00009118echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9119echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9120
9121cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009122#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009123_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009124
Michael W. Hudson54241132001-12-07 15:38:26 +00009125
9126
Trent Mick635f6fb2000-08-23 21:33:05 +00009127# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009128ac_save_cc="$CC"
9129if test "$ac_cv_kpthread" = "yes"
9130then CC="$CC -Kpthread"
9131fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009132echo "$as_me:$LINENO: checking for pthread_t" >&5
9133echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009134have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009135cat >conftest.$ac_ext <<_ACEOF
9136#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009137#include "confdefs.h"
9138#include <pthread.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00009139#ifdef F77_DUMMY_MAIN
9140# ifdef __cplusplus
9141 extern "C"
9142# endif
9143 int F77_DUMMY_MAIN() { return 1; }
9144#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009145int
9146main ()
9147{
Guido van Rossum12580492000-09-24 16:47:19 +00009148pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009149 ;
9150 return 0;
9151}
9152_ACEOF
9153rm -f conftest.$ac_objext
9154if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9155 (eval $ac_compile) 2>&5
9156 ac_status=$?
9157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9158 (exit $ac_status); } &&
9159 { ac_try='test -s conftest.$ac_objext'
9160 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9161 (eval $ac_try) 2>&5
9162 ac_status=$?
9163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9164 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009165 have_pthread_t=yes
9166else
Martin v. Löwis11437992002-04-12 09:54:03 +00009167 echo "$as_me: failed program was:" >&5
9168cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00009169fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009170rm -f conftest.$ac_objext conftest.$ac_ext
9171echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9172echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009173if test "$have_pthread_t" = yes ; then
9174 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009175 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9176echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9177 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9178 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009179else
9180 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009181 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009182else
Martin v. Löwis11437992002-04-12 09:54:03 +00009183 cat >conftest.$ac_ext <<_ACEOF
9184#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009185#include "confdefs.h"
9186#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009187#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +00009188 main()
9189 {
9190 FILE *f=fopen("conftestval", "w");
9191 if (!f) exit(1);
9192 fprintf(f, "%d\n", sizeof(pthread_t));
9193 exit(0);
9194 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009195_ACEOF
9196rm -f conftest$ac_exeext
9197if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9198 (eval $ac_link) 2>&5
9199 ac_status=$?
9200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9201 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9203 (eval $ac_try) 2>&5
9204 ac_status=$?
9205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9206 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009207 ac_cv_sizeof_pthread_t=`cat conftestval`
9208else
Martin v. Löwis11437992002-04-12 09:54:03 +00009209 echo "$as_me: program exited with status $ac_status" >&5
9210echo "$as_me: failed program was:" >&5
9211cat conftest.$ac_ext >&5
9212( exit $ac_status )
9213ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009214fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009215rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009216fi
9217
Trent Mick635f6fb2000-08-23 21:33:05 +00009218fi
9219
Martin v. Löwis11437992002-04-12 09:54:03 +00009220 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9221echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9222
9223cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009224#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009225_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009226
9227fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009228CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009229
Martin v. Löwis11437992002-04-12 09:54:03 +00009230echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9231echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009232# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9233if test "${enable_toolbox_glue+set}" = set; then
9234 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009235
Martin v. Löwis11437992002-04-12 09:54:03 +00009236fi;
Jack Jansene578a632001-08-15 01:27:14 +00009237
9238if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009239then
Jack Jansene578a632001-08-15 01:27:14 +00009240 case $ac_sys_system/$ac_sys_release in
9241 Darwin/*)
9242 enable_toolbox_glue="yes";;
9243 *)
9244 enable_toolbox_glue="no";;
9245 esac
9246fi
9247case "$enable_toolbox_glue" in
9248yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009249 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009250 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009251 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009252
9253cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009254#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009255_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009256
9257 ;;
9258*)
9259 extra_frameworks=""
9260 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009261 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009262 ;;
9263esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009264echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9265echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009266
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009267
9268case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009269 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009270 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009271 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00009272 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9273 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009274 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009275 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009276 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00009277 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9278 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009279esac
9280
Martin v. Löwis11437992002-04-12 09:54:03 +00009281echo "$as_me:$LINENO: checking for --enable-framework" >&5
9282echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009283if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009284then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009285 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009286 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009287 # in the build location.
Jack Jansenea0c3822002-08-01 21:57:49 +00009288 LDFLAGS="$LDFLAGS -Wl,-F."
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009289
Martin v. Löwis11437992002-04-12 09:54:03 +00009290cat >>confdefs.h <<\_ACEOF
9291#define WITH_NEXT_FRAMEWORK 1
9292_ACEOF
9293
9294 echo "$as_me:$LINENO: result: yes" >&5
9295echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009296else
Martin v. Löwis11437992002-04-12 09:54:03 +00009297 echo "$as_me:$LINENO: result: no" >&5
9298echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009299fi
9300
Martin v. Löwis11437992002-04-12 09:54:03 +00009301echo "$as_me:$LINENO: checking for dyld" >&5
9302echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009303case $ac_sys_system/$ac_sys_release in
9304 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009305
Martin v. Löwis11437992002-04-12 09:54:03 +00009306cat >>confdefs.h <<\_ACEOF
9307#define WITH_DYLD 1
9308_ACEOF
9309
9310 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9311echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009312 ;;
9313 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009314 echo "$as_me:$LINENO: result: no" >&5
9315echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009316 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009317esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009318
Guido van Rossum0a516c91994-09-12 10:58:40 +00009319# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009320
Michael W. Hudson54241132001-12-07 15:38:26 +00009321
9322
9323
9324
Guido van Rossum0a516c91994-09-12 10:58:40 +00009325# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009326# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009327echo "$as_me:$LINENO: checking SO" >&5
9328echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009329if test -z "$SO"
9330then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009331 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009332 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009333 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009334 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009335 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009336fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009337echo "$as_me:$LINENO: result: $SO" >&5
9338echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009339# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00009340# -- "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 +00009341# (Shared libraries in this instance are shared modules to be loaded into
9342# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009343echo "$as_me:$LINENO: checking LDSHARED" >&5
9344echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009345if test -z "$LDSHARED"
9346then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009347 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009348 AIX*)
9349 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009350 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009351 ;;
9352 BeOS*)
9353 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009354 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009355 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009356 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009357 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009358 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009359 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +00009360 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009361 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009362 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +00009363 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009364 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009365 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
9366 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009367 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009368 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9369 if test "$enable_framework" ; then
9370 # Link against the framework. All externals should be defined.
9371 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9372 else
9373 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009374 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009375 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009376 Darwin/*)
9377 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9378 if test "$enable_framework" ; then
9379 # Link against the framework. All externals should be defined.
9380 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9381 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009382 # No framework, use the Python app as bundle-loader
9383 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009384 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009385 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009386 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00009387 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009388 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009389 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009390 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009391 then
9392 LDSHARED="cc -shared ${LDFLAGS}"
9393 else
9394 LDSHARED="ld -Bshareable ${LDFLAGS}"
9395 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009396 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009397 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009398 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009399 then LDSHARED='$(CC) -shared'
9400 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009401 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009402 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +00009403 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009404 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009405 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009406 *) LDSHARED="ld";;
9407 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009408fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009409echo "$as_me:$LINENO: result: $LDSHARED" >&5
9410echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009411BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009412# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009413# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009414echo "$as_me:$LINENO: checking CCSHARED" >&5
9415echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009416if test -z "$CCSHARED"
9417then
Guido van Rossum07397971997-04-29 21:49:50 +00009418 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009419 SunOS*) if test "$GCC" = yes;
9420 then CCSHARED="-fPIC";
9421 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009422 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009423 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009424 else CCSHARED="+z";
9425 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009426 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009427 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009428 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009429 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009430 if test "$GCC" = "yes"
9431 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009432 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009433 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009434 SCO_SV*)
9435 if test "$GCC" = "yes"
9436 then CCSHARED="-fPIC"
9437 else CCSHARED="-Kpic -belf"
9438 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009439 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009440 IRIX*/6*) case $CC in
9441 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009442 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009443 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009444 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009445 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009446fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009447echo "$as_me:$LINENO: result: $CCSHARED" >&5
9448echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009449# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009450# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009451echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9452echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009453if test -z "$LINKFORSHARED"
9454then
Guido van Rossum07397971997-04-29 21:49:50 +00009455 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009456 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009457 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009458 LINKFORSHARED="-Wl,-E -Wl,+s";;
9459# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009460 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009461 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009462 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009463 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009464 # -u __dummy makes the linker aware of the objc runtime
9465 # in System.framework; otherwise, __objcInit (referenced in
9466 # crt1.o) gets erroneously defined as common, which breaks dynamic
9467 # loading of any modules which reference it in System.framework.
9468 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9469 # not used by the core itself but which needs to be in the core so
9470 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00009471 # -prebind is no longer used, because it actually seems to give a
9472 # slowdown in stead of a speedup, maybe due to the large number of
9473 # dynamic loads Python does.
9474 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009475 if test "$enable_framework"
9476 then
9477 LINKFORSHARED="$LINKFORSHARED -framework Python"
9478 fi
9479 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009480 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009481 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009482 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009483 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009484 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9485 then
9486 LINKFORSHARED="-Wl,--export-dynamic"
9487 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009488 SunOS/5*) case $CC in
9489 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009490 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009491 then
9492 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009493 fi;;
9494 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009495 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009496fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009497echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9498echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009499
Michael W. Hudson54241132001-12-07 15:38:26 +00009500
Martin v. Löwis11437992002-04-12 09:54:03 +00009501echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9502echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009503if test ! "$LIBRARY" = "$LDLIBRARY"
9504then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009505 case $ac_sys_system in
9506 CYGWIN*)
9507 # Cygwin needs CCSHARED when building extension DLLs
9508 # but not when building the interpreter DLL.
9509 CFLAGSFORSHARED='';;
9510 *)
9511 CFLAGSFORSHARED='$(CCSHARED)'
9512 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009513fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009514echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9515echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009516
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009517# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9518# library (with --enable-shared).
9519# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009520# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9521# if it is not required, since it creates a dependency of the shared library
9522# to LIBS. This, in turn, means that applications linking the shared libpython
9523# don't need to link LIBS explicitly. The default should be only changed
9524# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009525
9526echo "$as_me:$LINENO: checking SHLIBS" >&5
9527echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9528case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009529 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009530 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009531esac
9532echo "$as_me:$LINENO: result: $SHLIBS" >&5
9533echo "${ECHO_T}$SHLIBS" >&6
9534
9535
Guido van Rossum627b2d71993-12-24 10:39:16 +00009536# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009537
9538echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9539echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9540if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9541 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009542else
Martin v. Löwis11437992002-04-12 09:54:03 +00009543 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009544LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009545cat >conftest.$ac_ext <<_ACEOF
9546#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009547#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009548
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009549/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009550#ifdef __cplusplus
9551extern "C"
9552#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009553/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009554 builtin and then its argument prototype would still apply. */
9555char dlopen ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009556#ifdef F77_DUMMY_MAIN
9557# ifdef __cplusplus
9558 extern "C"
9559# endif
9560 int F77_DUMMY_MAIN() { return 1; }
9561#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009562int
9563main ()
9564{
9565dlopen ();
9566 ;
9567 return 0;
9568}
9569_ACEOF
9570rm -f conftest.$ac_objext conftest$ac_exeext
9571if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9572 (eval $ac_link) 2>&5
9573 ac_status=$?
9574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9575 (exit $ac_status); } &&
9576 { ac_try='test -s conftest$ac_exeext'
9577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9578 (eval $ac_try) 2>&5
9579 ac_status=$?
9580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9581 (exit $ac_status); }; }; then
9582 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009583else
Martin v. Löwis11437992002-04-12 09:54:03 +00009584 echo "$as_me: failed program was:" >&5
9585cat conftest.$ac_ext >&5
9586ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009587fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009588rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9589LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009590fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009591echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9592echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9593if test $ac_cv_lib_dl_dlopen = yes; then
9594 cat >>confdefs.h <<_ACEOF
9595#define HAVE_LIBDL 1
9596_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009597
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009598 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009599
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009600fi
9601 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009602
9603echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9604echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9605if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9606 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009607else
Martin v. Löwis11437992002-04-12 09:54:03 +00009608 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009609LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009610cat >conftest.$ac_ext <<_ACEOF
9611#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009612#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009613
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009614/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009615#ifdef __cplusplus
9616extern "C"
9617#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009618/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009619 builtin and then its argument prototype would still apply. */
9620char shl_load ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009621#ifdef F77_DUMMY_MAIN
9622# ifdef __cplusplus
9623 extern "C"
9624# endif
9625 int F77_DUMMY_MAIN() { return 1; }
9626#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009627int
9628main ()
9629{
9630shl_load ();
9631 ;
9632 return 0;
9633}
9634_ACEOF
9635rm -f conftest.$ac_objext conftest$ac_exeext
9636if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9637 (eval $ac_link) 2>&5
9638 ac_status=$?
9639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9640 (exit $ac_status); } &&
9641 { ac_try='test -s conftest$ac_exeext'
9642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9643 (eval $ac_try) 2>&5
9644 ac_status=$?
9645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9646 (exit $ac_status); }; }; then
9647 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009648else
Martin v. Löwis11437992002-04-12 09:54:03 +00009649 echo "$as_me: failed program was:" >&5
9650cat conftest.$ac_ext >&5
9651ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009652fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009653rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9654LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009655fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009656echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9657echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9658if test $ac_cv_lib_dld_shl_load = yes; then
9659 cat >>confdefs.h <<_ACEOF
9660#define HAVE_LIBDLD 1
9661_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009662
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009663 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009664
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009665fi
9666 # Dynamic linking for HP-UX
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009667echo "$as_me:$LINENO: checking for library containing sem_init" >&5
9668echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9669if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009670 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009671else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009672 ac_func_search_save_LIBS=$LIBS
9673ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009674cat >conftest.$ac_ext <<_ACEOF
9675#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009676#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009677
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009678/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009679#ifdef __cplusplus
9680extern "C"
9681#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009682/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009683 builtin and then its argument prototype would still apply. */
9684char sem_init ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009685#ifdef F77_DUMMY_MAIN
9686# ifdef __cplusplus
9687 extern "C"
9688# endif
9689 int F77_DUMMY_MAIN() { return 1; }
9690#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009691int
9692main ()
9693{
9694sem_init ();
9695 ;
9696 return 0;
9697}
9698_ACEOF
9699rm -f conftest.$ac_objext conftest$ac_exeext
9700if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9701 (eval $ac_link) 2>&5
9702 ac_status=$?
9703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9704 (exit $ac_status); } &&
9705 { ac_try='test -s conftest$ac_exeext'
9706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9707 (eval $ac_try) 2>&5
9708 ac_status=$?
9709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9710 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009711 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009712else
Martin v. Löwis11437992002-04-12 09:54:03 +00009713 echo "$as_me: failed program was:" >&5
9714cat conftest.$ac_ext >&5
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009715fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009716rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009717if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009718 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009719 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9720 cat >conftest.$ac_ext <<_ACEOF
9721#line $LINENO "configure"
9722#include "confdefs.h"
9723
9724/* Override any gcc2 internal prototype to avoid an error. */
9725#ifdef __cplusplus
9726extern "C"
9727#endif
9728/* We use char because int might match the return type of a gcc2
9729 builtin and then its argument prototype would still apply. */
9730char sem_init ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009731#ifdef F77_DUMMY_MAIN
9732# ifdef __cplusplus
9733 extern "C"
9734# endif
9735 int F77_DUMMY_MAIN() { return 1; }
9736#endif
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009737int
9738main ()
9739{
9740sem_init ();
9741 ;
9742 return 0;
9743}
Martin v. Löwis11437992002-04-12 09:54:03 +00009744_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009745rm -f conftest.$ac_objext conftest$ac_exeext
9746if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9747 (eval $ac_link) 2>&5
9748 ac_status=$?
9749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9750 (exit $ac_status); } &&
9751 { ac_try='test -s conftest$ac_exeext'
9752 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9753 (eval $ac_try) 2>&5
9754 ac_status=$?
9755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9756 (exit $ac_status); }; }; then
9757 ac_cv_search_sem_init="-l$ac_lib"
9758break
9759else
9760 echo "$as_me: failed program was:" >&5
9761cat conftest.$ac_ext >&5
9762fi
9763rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9764 done
9765fi
9766LIBS=$ac_func_search_save_LIBS
9767fi
9768echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9769echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9770if test "$ac_cv_search_sem_init" != no; then
9771 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009772
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009773fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009774 # 'Real Time' functions on Solaris
9775 # posix4 on Solaris 2.6
9776 # pthread (first!) on Linux
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009777
9778# checks for system dependent C++ extensions support
9779case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009780 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9781echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9782 cat >conftest.$ac_ext <<_ACEOF
9783#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009784#include "confdefs.h"
9785#include "/usr/lpp/xlC/include/load.h"
Barry Warsawfe33b792003-01-07 22:42:49 +00009786#ifdef F77_DUMMY_MAIN
9787# ifdef __cplusplus
9788 extern "C"
9789# endif
9790 int F77_DUMMY_MAIN() { return 1; }
9791#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009792int
9793main ()
9794{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009795loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009796 ;
9797 return 0;
9798}
9799_ACEOF
9800rm -f conftest.$ac_objext conftest$ac_exeext
9801if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9802 (eval $ac_link) 2>&5
9803 ac_status=$?
9804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9805 (exit $ac_status); } &&
9806 { ac_try='test -s conftest$ac_exeext'
9807 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9808 (eval $ac_try) 2>&5
9809 ac_status=$?
9810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9811 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009812
Martin v. Löwis11437992002-04-12 09:54:03 +00009813cat >>confdefs.h <<\_ACEOF
9814#define AIX_GENUINE_CPLUSPLUS 1
9815_ACEOF
9816
9817 echo "$as_me:$LINENO: result: yes" >&5
9818echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009819else
Martin v. Löwis11437992002-04-12 09:54:03 +00009820 echo "$as_me: failed program was:" >&5
9821cat conftest.$ac_ext >&5
9822echo "$as_me:$LINENO: result: no" >&5
9823echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009824fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009825rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009826 *) ;;
9827esac
9828
Guido van Rossum70c7f481998-03-26 18:44:10 +00009829# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Martin v. Löwise1172582002-11-13 08:51:19 +00009830# However on SGI IRIX 4, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009831# BeOS' sockets are stashed in libnet.
9832case "$ac_sys_system" in
9833IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009834*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009835echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9836echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9837if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9838 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009839else
Martin v. Löwis11437992002-04-12 09:54:03 +00009840 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009841LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009842cat >conftest.$ac_ext <<_ACEOF
9843#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009844#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009845
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009846/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009847#ifdef __cplusplus
9848extern "C"
9849#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009850/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009851 builtin and then its argument prototype would still apply. */
9852char t_open ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009853#ifdef F77_DUMMY_MAIN
9854# ifdef __cplusplus
9855 extern "C"
9856# endif
9857 int F77_DUMMY_MAIN() { return 1; }
9858#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009859int
9860main ()
9861{
9862t_open ();
9863 ;
9864 return 0;
9865}
9866_ACEOF
9867rm -f conftest.$ac_objext conftest$ac_exeext
9868if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9869 (eval $ac_link) 2>&5
9870 ac_status=$?
9871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9872 (exit $ac_status); } &&
9873 { ac_try='test -s conftest$ac_exeext'
9874 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9875 (eval $ac_try) 2>&5
9876 ac_status=$?
9877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9878 (exit $ac_status); }; }; then
9879 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009880else
Martin v. Löwis11437992002-04-12 09:54:03 +00009881 echo "$as_me: failed program was:" >&5
9882cat conftest.$ac_ext >&5
9883ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009884fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009885rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9886LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009887fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009888echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9889echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9890if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009891 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009892fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009893 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009894echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9895echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9896if test "${ac_cv_lib_socket_socket+set}" = set; then
9897 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009898else
Martin v. Löwis11437992002-04-12 09:54:03 +00009899 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009900LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009901cat >conftest.$ac_ext <<_ACEOF
9902#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009903#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009904
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009905/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009906#ifdef __cplusplus
9907extern "C"
9908#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009909/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009910 builtin and then its argument prototype would still apply. */
9911char socket ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009912#ifdef F77_DUMMY_MAIN
9913# ifdef __cplusplus
9914 extern "C"
9915# endif
9916 int F77_DUMMY_MAIN() { return 1; }
9917#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009918int
9919main ()
9920{
9921socket ();
9922 ;
9923 return 0;
9924}
9925_ACEOF
9926rm -f conftest.$ac_objext conftest$ac_exeext
9927if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9928 (eval $ac_link) 2>&5
9929 ac_status=$?
9930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9931 (exit $ac_status); } &&
9932 { ac_try='test -s conftest$ac_exeext'
9933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9934 (eval $ac_try) 2>&5
9935 ac_status=$?
9936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9937 (exit $ac_status); }; }; then
9938 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009939else
Martin v. Löwis11437992002-04-12 09:54:03 +00009940 echo "$as_me: failed program was:" >&5
9941cat conftest.$ac_ext >&5
9942ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009943fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009944rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9945LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009946fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009947echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9948echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9949if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009950 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009951fi
9952 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009953;;
9954esac
9955case "$ac_sys_system" in
9956BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009957echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9958echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9959if test "${ac_cv_lib_net_socket+set}" = set; then
9960 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009961else
Martin v. Löwis11437992002-04-12 09:54:03 +00009962 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009963LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009964cat >conftest.$ac_ext <<_ACEOF
9965#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009966#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009967
Guido van Rossumad678af1998-10-02 14:42:15 +00009968/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009969#ifdef __cplusplus
9970extern "C"
9971#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009972/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009973 builtin and then its argument prototype would still apply. */
9974char socket ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009975#ifdef F77_DUMMY_MAIN
9976# ifdef __cplusplus
9977 extern "C"
9978# endif
9979 int F77_DUMMY_MAIN() { return 1; }
9980#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009981int
9982main ()
9983{
9984socket ();
9985 ;
9986 return 0;
9987}
9988_ACEOF
9989rm -f conftest.$ac_objext conftest$ac_exeext
9990if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9991 (eval $ac_link) 2>&5
9992 ac_status=$?
9993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9994 (exit $ac_status); } &&
9995 { ac_try='test -s conftest$ac_exeext'
9996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9997 (eval $ac_try) 2>&5
9998 ac_status=$?
9999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10000 (exit $ac_status); }; }; then
10001 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010002else
Martin v. Löwis11437992002-04-12 09:54:03 +000010003 echo "$as_me: failed program was:" >&5
10004cat conftest.$ac_ext >&5
10005ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010006fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010007rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10008LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010009fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010010echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
10011echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
10012if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010013 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010014fi
10015 # BeOS
10016;;
10017esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000010018
Martin v. Löwis11437992002-04-12 09:54:03 +000010019echo "$as_me:$LINENO: checking for --with-libs" >&5
10020echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
10021
Guido van Rossuma68acba1996-07-31 17:36:39 +000010022# Check whether --with-libs or --without-libs was given.
10023if test "${with_libs+set}" = set; then
10024 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000010025
10026echo "$as_me:$LINENO: result: $withval" >&5
10027echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000010028LIBS="$withval $LIBS"
10029
10030else
Martin v. Löwis11437992002-04-12 09:54:03 +000010031 echo "$as_me:$LINENO: result: no" >&5
10032echo "${ECHO_T}no" >&6
10033fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000010034
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010035# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010036
10037
Martin v. Löwis11437992002-04-12 09:54:03 +000010038echo "$as_me:$LINENO: checking for --with-signal-module" >&5
10039echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
10040
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010041# Check whether --with-signal-module or --without-signal-module was given.
10042if test "${with_signal_module+set}" = set; then
10043 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010044
Martin v. Löwis11437992002-04-12 09:54:03 +000010045fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010046
10047if test -z "$with_signal_module"
10048then with_signal_module="yes"
10049fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010050echo "$as_me:$LINENO: result: $with_signal_module" >&5
10051echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010052
10053if test "${with_signal_module}" = "yes"; then
10054 USE_SIGNAL_MODULE=""
10055 SIGNAL_OBJS=""
10056else
10057 USE_SIGNAL_MODULE="#"
10058 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10059fi
10060
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010061# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010062
Barry Warsawc0d24d82000-06-29 16:12:00 +000010063USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010064
Martin v. Löwis11437992002-04-12 09:54:03 +000010065echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
10066echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
10067
Guido van Rossumec2f0731997-01-22 20:54:01 +000010068
10069# Check whether --with-dec-threads or --without-dec-threads was given.
10070if test "${with_dec_threads+set}" = set; then
10071 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000010072
10073echo "$as_me:$LINENO: result: $withval" >&5
10074echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000010075LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000010076if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000010077 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000010078fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010079else
Martin v. Löwis11437992002-04-12 09:54:03 +000010080 echo "$as_me:$LINENO: result: no" >&5
10081echo "${ECHO_T}no" >&6
10082fi;
10083
10084# Templates for things AC_DEFINEd more than once.
10085# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010086
10087
Martin v. Löwis11437992002-04-12 09:54:03 +000010088
10089
10090
10091
10092
10093echo "$as_me:$LINENO: checking for --with-threads" >&5
10094echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
10095
Guido van Rossumec2f0731997-01-22 20:54:01 +000010096# Check whether --with-threads or --without-threads was given.
10097if test "${with_threads+set}" = set; then
10098 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000010099
Martin v. Löwis11437992002-04-12 09:54:03 +000010100fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000010101
Barry Warsawc0d24d82000-06-29 16:12:00 +000010102# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010103
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010104# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010105if test "${with_thread+set}" = set; then
10106 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010107 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000010108fi;
Barry Warsawc0d24d82000-06-29 16:12:00 +000010109
10110if test -z "$with_threads"
10111then with_threads="yes"
10112fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010113echo "$as_me:$LINENO: result: $with_threads" >&5
10114echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d82000-06-29 16:12:00 +000010115
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010116
Barry Warsawc0d24d82000-06-29 16:12:00 +000010117if test "$with_threads" = "no"
10118then
10119 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010120elif test "$ac_cv_pthread_is_default" = yes
10121then
Martin v. Löwis11437992002-04-12 09:54:03 +000010122 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010123#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010124_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010125
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010126 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010127 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010128#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010129_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010130
10131 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010132 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010133elif test "$ac_cv_kpthread" = "yes"
10134then
10135 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010136 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010137#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010138_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010139
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010140 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010141 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010142else
10143 if test ! -z "$with_threads" -a -d "$with_threads"
10144 then LDFLAGS="$LDFLAGS -L$with_threads"
10145 fi
10146 if test ! -z "$withval" -a -d "$withval"
10147 then LDFLAGS="$LDFLAGS -L$withval"
10148 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010149
10150 # According to the POSIX spec, a pthreads implementation must
10151 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010152 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10153echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10154 cat >conftest.$ac_ext <<_ACEOF
10155#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010156#include "confdefs.h"
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010157
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010158#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010159#ifdef _POSIX_THREADS
10160yes
10161#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010162
10163_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010164if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000010165 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010166 unistd_defines_pthreads=yes
10167else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010168 unistd_defines_pthreads=no
10169fi
10170rm -f conftest*
10171
Martin v. Löwis11437992002-04-12 09:54:03 +000010172 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10173echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010174
Martin v. Löwis11437992002-04-12 09:54:03 +000010175 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010176#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010177_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010178
Martin v. Löwis11437992002-04-12 09:54:03 +000010179 if test "${ac_cv_header_cthreads_h+set}" = set; then
10180 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10181echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10182if test "${ac_cv_header_cthreads_h+set}" = set; then
10183 echo $ECHO_N "(cached) $ECHO_C" >&6
10184fi
10185echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10186echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010187else
Martin v. Löwis11437992002-04-12 09:54:03 +000010188 # Is the header compilable?
10189echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10190echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10191cat >conftest.$ac_ext <<_ACEOF
10192#line $LINENO "configure"
10193#include "confdefs.h"
10194$ac_includes_default
10195#include <cthreads.h>
10196_ACEOF
10197rm -f conftest.$ac_objext
10198if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10199 (eval $ac_compile) 2>&5
10200 ac_status=$?
10201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10202 (exit $ac_status); } &&
10203 { ac_try='test -s conftest.$ac_objext'
10204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10205 (eval $ac_try) 2>&5
10206 ac_status=$?
10207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10208 (exit $ac_status); }; }; then
10209 ac_header_compiler=yes
10210else
10211 echo "$as_me: failed program was:" >&5
10212cat conftest.$ac_ext >&5
10213ac_header_compiler=no
10214fi
10215rm -f conftest.$ac_objext conftest.$ac_ext
10216echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10217echo "${ECHO_T}$ac_header_compiler" >&6
10218
10219# Is the header present?
10220echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10221echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10222cat >conftest.$ac_ext <<_ACEOF
10223#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010224#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010225#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010226_ACEOF
10227if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10228 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10229 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010230 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010231 rm -f conftest.er1
10232 cat conftest.err >&5
10233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10234 (exit $ac_status); } >/dev/null; then
10235 if test -s conftest.err; then
10236 ac_cpp_err=$ac_c_preproc_warn_flag
10237 else
10238 ac_cpp_err=
10239 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010240else
Martin v. Löwis11437992002-04-12 09:54:03 +000010241 ac_cpp_err=yes
10242fi
10243if test -z "$ac_cpp_err"; then
10244 ac_header_preproc=yes
10245else
10246 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +000010247 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010248 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010249fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010250rm -f conftest.err conftest.$ac_ext
10251echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10252echo "${ECHO_T}$ac_header_preproc" >&6
10253
10254# So? What about this header?
10255case $ac_header_compiler:$ac_header_preproc in
10256 yes:no )
10257 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10258echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10259 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10260echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10261 no:yes )
10262 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10263echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10264 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10265echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10266 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10267echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10268esac
10269echo "$as_me:$LINENO: checking for cthreads.h" >&5
10270echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10271if test "${ac_cv_header_cthreads_h+set}" = set; then
10272 echo $ECHO_N "(cached) $ECHO_C" >&6
10273else
10274 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010275fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010276echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10277echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10278
10279fi
10280if test $ac_cv_header_cthreads_h = yes; then
10281 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010282#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010283_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010284
Martin v. Löwis11437992002-04-12 09:54:03 +000010285 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010286#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010287_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010288
Martin v. Löwis11437992002-04-12 09:54:03 +000010289
10290cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010291#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010292_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010293
10294 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010295 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010296else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010297
Martin v. Löwis11437992002-04-12 09:54:03 +000010298 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10299 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10300echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10301if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10302 echo $ECHO_N "(cached) $ECHO_C" >&6
10303fi
10304echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10305echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010306else
Martin v. Löwis11437992002-04-12 09:54:03 +000010307 # Is the header compilable?
10308echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10309echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10310cat >conftest.$ac_ext <<_ACEOF
10311#line $LINENO "configure"
10312#include "confdefs.h"
10313$ac_includes_default
10314#include <mach/cthreads.h>
10315_ACEOF
10316rm -f conftest.$ac_objext
10317if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10318 (eval $ac_compile) 2>&5
10319 ac_status=$?
10320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10321 (exit $ac_status); } &&
10322 { ac_try='test -s conftest.$ac_objext'
10323 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10324 (eval $ac_try) 2>&5
10325 ac_status=$?
10326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10327 (exit $ac_status); }; }; then
10328 ac_header_compiler=yes
10329else
10330 echo "$as_me: failed program was:" >&5
10331cat conftest.$ac_ext >&5
10332ac_header_compiler=no
10333fi
10334rm -f conftest.$ac_objext conftest.$ac_ext
10335echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10336echo "${ECHO_T}$ac_header_compiler" >&6
10337
10338# Is the header present?
10339echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10340echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10341cat >conftest.$ac_ext <<_ACEOF
10342#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010343#include "confdefs.h"
10344#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010345_ACEOF
10346if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10347 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10348 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010349 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010350 rm -f conftest.er1
10351 cat conftest.err >&5
10352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10353 (exit $ac_status); } >/dev/null; then
10354 if test -s conftest.err; then
10355 ac_cpp_err=$ac_c_preproc_warn_flag
10356 else
10357 ac_cpp_err=
10358 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010359else
Martin v. Löwis11437992002-04-12 09:54:03 +000010360 ac_cpp_err=yes
10361fi
10362if test -z "$ac_cpp_err"; then
10363 ac_header_preproc=yes
10364else
10365 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010366 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010367 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010368fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010369rm -f conftest.err conftest.$ac_ext
10370echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10371echo "${ECHO_T}$ac_header_preproc" >&6
10372
10373# So? What about this header?
10374case $ac_header_compiler:$ac_header_preproc in
10375 yes:no )
10376 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10377echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10378 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10379echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10380 no:yes )
10381 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10382echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10383 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10384echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10385 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10386echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10387esac
10388echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10389echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10390if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10391 echo $ECHO_N "(cached) $ECHO_C" >&6
10392else
10393 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010394fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010395echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10396echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10397
10398fi
10399if test $ac_cv_header_mach_cthreads_h = yes; then
10400 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010401#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010402_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010403
Martin v. Löwis11437992002-04-12 09:54:03 +000010404 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010405#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010406_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010407
Martin v. Löwis11437992002-04-12 09:54:03 +000010408
10409cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010410#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010411_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010412
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010413 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010414else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010415
Martin v. Löwis11437992002-04-12 09:54:03 +000010416 echo "$as_me:$LINENO: checking for --with-pth" >&5
10417echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10418
10419# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010420if test "${with_pth+set}" = set; then
10421 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010422 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010423echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010424 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010425#define WITH_THREAD 1
10426_ACEOF
10427
10428
10429cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010430#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010431_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010432
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010433 LIBS="-lpth $LIBS"
10434 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010435else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010436 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010437echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010438
10439 # Just looking for pthread_create in libpthread is not enough:
10440 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10441 # So we really have to include pthread.h, and then link.
10442 _libs=$LIBS
10443 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010444 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10445echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10446 cat >conftest.$ac_ext <<_ACEOF
10447#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010448#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010449#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010450
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010451void * start_routine (void *arg) { exit (0); }
Barry Warsawfe33b792003-01-07 22:42:49 +000010452#ifdef F77_DUMMY_MAIN
10453# ifdef __cplusplus
10454 extern "C"
10455# endif
10456 int F77_DUMMY_MAIN() { return 1; }
10457#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010458int
10459main ()
10460{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010461
10462pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010463 ;
10464 return 0;
10465}
10466_ACEOF
10467rm -f conftest.$ac_objext conftest$ac_exeext
10468if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10469 (eval $ac_link) 2>&5
10470 ac_status=$?
10471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10472 (exit $ac_status); } &&
10473 { ac_try='test -s conftest$ac_exeext'
10474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10475 (eval $ac_try) 2>&5
10476 ac_status=$?
10477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10478 (exit $ac_status); }; }; then
10479
10480 echo "$as_me:$LINENO: result: yes" >&5
10481echo "${ECHO_T}yes" >&6
10482 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010483#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010484_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010485
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010486 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010487 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010488else
Martin v. Löwis11437992002-04-12 09:54:03 +000010489 echo "$as_me: failed program was:" >&5
10490cat conftest.$ac_ext >&5
10491
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010492 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010493 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10494echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10495if test "${ac_cv_func_pthread_detach+set}" = set; then
10496 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010497else
Martin v. Löwis11437992002-04-12 09:54:03 +000010498 cat >conftest.$ac_ext <<_ACEOF
10499#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010500#include "confdefs.h"
10501/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010502 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010503#include <assert.h>
10504/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010505#ifdef __cplusplus
10506extern "C"
10507#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010508/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010509 builtin and then its argument prototype would still apply. */
10510char pthread_detach ();
10511char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010512
Barry Warsawfe33b792003-01-07 22:42:49 +000010513#ifdef F77_DUMMY_MAIN
10514# ifdef __cplusplus
10515 extern "C"
10516# endif
10517 int F77_DUMMY_MAIN() { return 1; }
10518#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010519int
10520main ()
10521{
Guido van Rossumad678af1998-10-02 14:42:15 +000010522/* The GNU C library defines this for functions which it implements
10523 to always fail with ENOSYS. Some functions are actually named
10524 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010525#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010526choke me
10527#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010528f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +000010529#endif
10530
Martin v. Löwis11437992002-04-12 09:54:03 +000010531 ;
10532 return 0;
10533}
10534_ACEOF
10535rm -f conftest.$ac_objext conftest$ac_exeext
10536if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10537 (eval $ac_link) 2>&5
10538 ac_status=$?
10539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10540 (exit $ac_status); } &&
10541 { ac_try='test -s conftest$ac_exeext'
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_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010548else
Martin v. Löwis11437992002-04-12 09:54:03 +000010549 echo "$as_me: failed program was:" >&5
10550cat conftest.$ac_ext >&5
10551ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010552fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010553rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010554fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010555echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10556echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10557if test $ac_cv_func_pthread_detach = yes; then
10558 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010559#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010560_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010561
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010562 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010563 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010564else
Guido van Rossumad678af1998-10-02 14:42:15 +000010565
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010566 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10567 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10568echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10569if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10570 echo $ECHO_N "(cached) $ECHO_C" >&6
10571fi
10572echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10573echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10574else
10575 # Is the header compilable?
10576echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10577echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10578cat >conftest.$ac_ext <<_ACEOF
10579#line $LINENO "configure"
10580#include "confdefs.h"
10581$ac_includes_default
10582#include <atheos/threads.h>
10583_ACEOF
10584rm -f conftest.$ac_objext
10585if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10586 (eval $ac_compile) 2>&5
10587 ac_status=$?
10588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10589 (exit $ac_status); } &&
10590 { ac_try='test -s conftest.$ac_objext'
10591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10592 (eval $ac_try) 2>&5
10593 ac_status=$?
10594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10595 (exit $ac_status); }; }; then
10596 ac_header_compiler=yes
10597else
10598 echo "$as_me: failed program was:" >&5
10599cat conftest.$ac_ext >&5
10600ac_header_compiler=no
10601fi
10602rm -f conftest.$ac_objext conftest.$ac_ext
10603echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10604echo "${ECHO_T}$ac_header_compiler" >&6
10605
10606# Is the header present?
10607echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10608echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10609cat >conftest.$ac_ext <<_ACEOF
10610#line $LINENO "configure"
10611#include "confdefs.h"
10612#include <atheos/threads.h>
10613_ACEOF
10614if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10615 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10616 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010617 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010618 rm -f conftest.er1
10619 cat conftest.err >&5
10620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10621 (exit $ac_status); } >/dev/null; then
10622 if test -s conftest.err; then
10623 ac_cpp_err=$ac_c_preproc_warn_flag
10624 else
10625 ac_cpp_err=
10626 fi
10627else
10628 ac_cpp_err=yes
10629fi
10630if test -z "$ac_cpp_err"; then
10631 ac_header_preproc=yes
10632else
10633 echo "$as_me: failed program was:" >&5
10634 cat conftest.$ac_ext >&5
10635 ac_header_preproc=no
10636fi
10637rm -f conftest.err conftest.$ac_ext
10638echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10639echo "${ECHO_T}$ac_header_preproc" >&6
10640
10641# So? What about this header?
10642case $ac_header_compiler:$ac_header_preproc in
10643 yes:no )
10644 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10645echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10646 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10647echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10648 no:yes )
10649 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10650echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10651 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10652echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10653 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10654echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10655esac
10656echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10657echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10658if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10659 echo $ECHO_N "(cached) $ECHO_C" >&6
10660else
10661 ac_cv_header_atheos_threads_h=$ac_header_preproc
10662fi
10663echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10664echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10665
10666fi
10667if test $ac_cv_header_atheos_threads_h = yes; then
10668 cat >>confdefs.h <<\_ACEOF
10669#define WITH_THREAD 1
10670_ACEOF
10671
10672
10673cat >>confdefs.h <<\_ACEOF
10674#define ATHEOS_THREADS 1
10675_ACEOF
10676
10677 THREADOBJ="Python/thread.o"
10678else
10679
Martin v. Löwis11437992002-04-12 09:54:03 +000010680 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10681 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10682echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10683if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10684 echo $ECHO_N "(cached) $ECHO_C" >&6
10685fi
10686echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10687echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010688else
Martin v. Löwis11437992002-04-12 09:54:03 +000010689 # Is the header compilable?
10690echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10691echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10692cat >conftest.$ac_ext <<_ACEOF
10693#line $LINENO "configure"
10694#include "confdefs.h"
10695$ac_includes_default
10696#include <kernel/OS.h>
10697_ACEOF
10698rm -f conftest.$ac_objext
10699if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10700 (eval $ac_compile) 2>&5
10701 ac_status=$?
10702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10703 (exit $ac_status); } &&
10704 { ac_try='test -s conftest.$ac_objext'
10705 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10706 (eval $ac_try) 2>&5
10707 ac_status=$?
10708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10709 (exit $ac_status); }; }; then
10710 ac_header_compiler=yes
10711else
10712 echo "$as_me: failed program was:" >&5
10713cat conftest.$ac_ext >&5
10714ac_header_compiler=no
10715fi
10716rm -f conftest.$ac_objext conftest.$ac_ext
10717echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10718echo "${ECHO_T}$ac_header_compiler" >&6
10719
10720# Is the header present?
10721echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10722echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10723cat >conftest.$ac_ext <<_ACEOF
10724#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010725#include "confdefs.h"
10726#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010727_ACEOF
10728if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10729 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10730 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010731 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010732 rm -f conftest.er1
10733 cat conftest.err >&5
10734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10735 (exit $ac_status); } >/dev/null; then
10736 if test -s conftest.err; then
10737 ac_cpp_err=$ac_c_preproc_warn_flag
10738 else
10739 ac_cpp_err=
10740 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010741else
Martin v. Löwis11437992002-04-12 09:54:03 +000010742 ac_cpp_err=yes
10743fi
10744if test -z "$ac_cpp_err"; then
10745 ac_header_preproc=yes
10746else
10747 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010748 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010749 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010750fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010751rm -f conftest.err conftest.$ac_ext
10752echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10753echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010754
Martin v. Löwis11437992002-04-12 09:54:03 +000010755# So? What about this header?
10756case $ac_header_compiler:$ac_header_preproc in
10757 yes:no )
10758 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10759echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10760 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10761echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10762 no:yes )
10763 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10764echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10765 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10766echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10767 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10768echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10769esac
10770echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10771echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10772if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10773 echo $ECHO_N "(cached) $ECHO_C" >&6
10774else
10775 ac_cv_header_kernel_OS_h=$ac_header_preproc
10776fi
10777echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10778echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10779
10780fi
10781if test $ac_cv_header_kernel_OS_h = yes; then
10782 cat >>confdefs.h <<\_ACEOF
10783#define WITH_THREAD 1
10784_ACEOF
10785
10786
10787cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010788#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010789_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010790
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010791 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010792else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010793
Martin v. Löwis11437992002-04-12 09:54:03 +000010794 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10795echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10796if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10797 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010798else
Martin v. Löwis11437992002-04-12 09:54:03 +000010799 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010800LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010801cat >conftest.$ac_ext <<_ACEOF
10802#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010803#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010804
Greg Steinadf63d62000-07-05 10:38:09 +000010805/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010806#ifdef __cplusplus
10807extern "C"
10808#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010809/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010810 builtin and then its argument prototype would still apply. */
10811char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010812#ifdef F77_DUMMY_MAIN
10813# ifdef __cplusplus
10814 extern "C"
10815# endif
10816 int F77_DUMMY_MAIN() { return 1; }
10817#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010818int
10819main ()
10820{
10821pthread_create ();
10822 ;
10823 return 0;
10824}
10825_ACEOF
10826rm -f conftest.$ac_objext conftest$ac_exeext
10827if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10828 (eval $ac_link) 2>&5
10829 ac_status=$?
10830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10831 (exit $ac_status); } &&
10832 { ac_try='test -s conftest$ac_exeext'
10833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10834 (eval $ac_try) 2>&5
10835 ac_status=$?
10836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10837 (exit $ac_status); }; }; then
10838 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010839else
Martin v. Löwis11437992002-04-12 09:54:03 +000010840 echo "$as_me: failed program was:" >&5
10841cat conftest.$ac_ext >&5
10842ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010843fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010844rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10845LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010846fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010847echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10848echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10849if test $ac_cv_lib_pthreads_pthread_create = yes; then
10850 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010851#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010852_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010853
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010854 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010855 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010856 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010857else
Greg Steinadf63d62000-07-05 10:38:09 +000010858
Martin v. Löwis11437992002-04-12 09:54:03 +000010859 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10860echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10861if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10862 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010863else
Martin v. Löwis11437992002-04-12 09:54:03 +000010864 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010865LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010866cat >conftest.$ac_ext <<_ACEOF
10867#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010868#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010869
Guido van Rossum49545951997-12-02 19:28:29 +000010870/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010871#ifdef __cplusplus
10872extern "C"
10873#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010874/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010875 builtin and then its argument prototype would still apply. */
10876char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010877#ifdef F77_DUMMY_MAIN
10878# ifdef __cplusplus
10879 extern "C"
10880# endif
10881 int F77_DUMMY_MAIN() { return 1; }
10882#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010883int
10884main ()
10885{
10886pthread_create ();
10887 ;
10888 return 0;
10889}
10890_ACEOF
10891rm -f conftest.$ac_objext conftest$ac_exeext
10892if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10893 (eval $ac_link) 2>&5
10894 ac_status=$?
10895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10896 (exit $ac_status); } &&
10897 { ac_try='test -s conftest$ac_exeext'
10898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10899 (eval $ac_try) 2>&5
10900 ac_status=$?
10901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10902 (exit $ac_status); }; }; then
10903 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010904else
Martin v. Löwis11437992002-04-12 09:54:03 +000010905 echo "$as_me: failed program was:" >&5
10906cat conftest.$ac_ext >&5
10907ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010908fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010909rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10910LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010911fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010912echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10913echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10914if test $ac_cv_lib_c_r_pthread_create = yes; then
10915 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010916#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010917_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010918
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010919 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010920 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010921 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010922else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010923
Martin v. Löwis11437992002-04-12 09:54:03 +000010924 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10925echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10926if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10927 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010928else
Martin v. Löwis11437992002-04-12 09:54:03 +000010929 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010930LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010931cat >conftest.$ac_ext <<_ACEOF
10932#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010933#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010934
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010935/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010936#ifdef __cplusplus
10937extern "C"
10938#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010939/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010940 builtin and then its argument prototype would still apply. */
10941char __d6_pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010942#ifdef F77_DUMMY_MAIN
10943# ifdef __cplusplus
10944 extern "C"
10945# endif
10946 int F77_DUMMY_MAIN() { return 1; }
10947#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010948int
10949main ()
10950{
10951__d6_pthread_create ();
10952 ;
10953 return 0;
10954}
10955_ACEOF
10956rm -f conftest.$ac_objext conftest$ac_exeext
10957if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10958 (eval $ac_link) 2>&5
10959 ac_status=$?
10960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10961 (exit $ac_status); } &&
10962 { ac_try='test -s conftest$ac_exeext'
10963 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10964 (eval $ac_try) 2>&5
10965 ac_status=$?
10966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10967 (exit $ac_status); }; }; then
10968 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010969else
Martin v. Löwis11437992002-04-12 09:54:03 +000010970 echo "$as_me: failed program was:" >&5
10971cat conftest.$ac_ext >&5
10972ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010973fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010974rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10975LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010976fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010977echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10978echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10979if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10980 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010981#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010982_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010983
Martin v. Löwis779ffc02002-12-02 22:17:01 +000010984 echo Systems with __d6_pthread_create are not supported anymore.
10985 echo See README
10986 exit 1
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010987 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010988 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010989 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010990else
Guido van Rossum49545951997-12-02 19:28:29 +000010991
Martin v. Löwis11437992002-04-12 09:54:03 +000010992 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10993echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10994if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10995 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010996else
Martin v. Löwis11437992002-04-12 09:54:03 +000010997 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010998LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010999cat >conftest.$ac_ext <<_ACEOF
11000#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011001#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011002
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011003/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011004#ifdef __cplusplus
11005extern "C"
11006#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011007/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011008 builtin and then its argument prototype would still apply. */
11009char __pthread_create_system ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011010#ifdef F77_DUMMY_MAIN
11011# ifdef __cplusplus
11012 extern "C"
11013# endif
11014 int F77_DUMMY_MAIN() { return 1; }
11015#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011016int
11017main ()
11018{
11019__pthread_create_system ();
11020 ;
11021 return 0;
11022}
11023_ACEOF
11024rm -f conftest.$ac_objext conftest$ac_exeext
11025if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11026 (eval $ac_link) 2>&5
11027 ac_status=$?
11028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11029 (exit $ac_status); } &&
11030 { ac_try='test -s conftest$ac_exeext'
11031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11032 (eval $ac_try) 2>&5
11033 ac_status=$?
11034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11035 (exit $ac_status); }; }; then
11036 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011037else
Martin v. Löwis11437992002-04-12 09:54:03 +000011038 echo "$as_me: failed program was:" >&5
11039cat conftest.$ac_ext >&5
11040ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011041fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011042rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11043LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011044fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011045echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11046echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
11047if test $ac_cv_lib_pthread___pthread_create_system = yes; then
11048 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011049#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011050_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011051
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011052 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011053 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011054 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011055else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011056
Martin v. Löwis11437992002-04-12 09:54:03 +000011057 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
11058echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
11059if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
11060 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000011061else
Martin v. Löwis11437992002-04-12 09:54:03 +000011062 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011063LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011064cat >conftest.$ac_ext <<_ACEOF
11065#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011066#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011067
Guido van Rossumb93a8621998-05-07 13:27:32 +000011068/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011069#ifdef __cplusplus
11070extern "C"
11071#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000011072/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011073 builtin and then its argument prototype would still apply. */
11074char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011075#ifdef F77_DUMMY_MAIN
11076# ifdef __cplusplus
11077 extern "C"
11078# endif
11079 int F77_DUMMY_MAIN() { return 1; }
11080#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011081int
11082main ()
11083{
11084pthread_create ();
11085 ;
11086 return 0;
11087}
11088_ACEOF
11089rm -f conftest.$ac_objext conftest$ac_exeext
11090if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11091 (eval $ac_link) 2>&5
11092 ac_status=$?
11093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11094 (exit $ac_status); } &&
11095 { ac_try='test -s conftest$ac_exeext'
11096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11097 (eval $ac_try) 2>&5
11098 ac_status=$?
11099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11100 (exit $ac_status); }; }; then
11101 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000011102else
Martin v. Löwis11437992002-04-12 09:54:03 +000011103 echo "$as_me: failed program was:" >&5
11104cat conftest.$ac_ext >&5
11105ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011106fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011107rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11108LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011109fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011110echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
11111echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
11112if test $ac_cv_lib_cma_pthread_create = yes; then
11113 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011114#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011115_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011116
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011117 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011118 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011119 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011120else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011121
Martin v. Löwis130fb172001-07-19 11:00:41 +000011122 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000011123fi
11124
Guido van Rossum627b2d71993-12-24 10:39:16 +000011125
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011126fi
11127
Guido van Rossum0be3e491997-05-22 20:33:33 +000011128fi
11129
Guido van Rossum49545951997-12-02 19:28:29 +000011130fi
11131
Guido van Rossumb93a8621998-05-07 13:27:32 +000011132fi
11133
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011134fi
11135
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011136
Michael W. Hudson54241132001-12-07 15:38:26 +000011137fi
11138
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011139
11140fi
11141
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011142fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011143rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11144fi;
11145fi
11146
11147
11148fi
11149
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011150
Michael W. Hudson54241132001-12-07 15:38:26 +000011151
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011152 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011153 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011154
11155cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011156#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011157_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011158
11159 fi
11160
Martin v. Löwisdfc33fd2003-01-21 10:14:41 +000011161 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11162 case $ac_sys_system/$ac_sys_release in
11163 SunOS/5.8)
11164cat >>confdefs.h <<\_ACEOF
11165#define HAVE_BROKEN_POSIX_SEMAPHORES 1
11166_ACEOF
11167;;
11168 esac
11169
Martin v. Löwis11437992002-04-12 09:54:03 +000011170 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11171echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11172 if test "${ac_cv_pthread_system_supported+set}" = set; then
11173 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011174else
11175 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011176 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011177else
Martin v. Löwis11437992002-04-12 09:54:03 +000011178 cat >conftest.$ac_ext <<_ACEOF
11179#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011180#include "confdefs.h"
11181#include <pthread.h>
11182 void *foo(void *parm) {
11183 return NULL;
11184 }
11185 main() {
11186 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011187 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011188 if (pthread_attr_init(&attr)) exit(-1);
11189 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011190 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011191 exit(0);
11192 }
Martin v. Löwis11437992002-04-12 09:54:03 +000011193_ACEOF
11194rm -f conftest$ac_exeext
11195if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11196 (eval $ac_link) 2>&5
11197 ac_status=$?
11198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11199 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11201 (eval $ac_try) 2>&5
11202 ac_status=$?
11203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11204 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011205 ac_cv_pthread_system_supported=yes
11206else
Martin v. Löwis11437992002-04-12 09:54:03 +000011207 echo "$as_me: program exited with status $ac_status" >&5
11208echo "$as_me: failed program was:" >&5
11209cat conftest.$ac_ext >&5
11210( exit $ac_status )
11211ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011212fi
Barry Warsawfe33b792003-01-07 22:42:49 +000011213rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011214fi
11215
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011216fi
11217
Martin v. Löwis11437992002-04-12 09:54:03 +000011218 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11219echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011220 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011221
11222cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011223#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011224_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011225
11226 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011227
11228for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011229do
Martin v. Löwis11437992002-04-12 09:54:03 +000011230as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11231echo "$as_me:$LINENO: checking for $ac_func" >&5
11232echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11233if eval "test \"\${$as_ac_var+set}\" = set"; then
11234 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011235else
Martin v. Löwis11437992002-04-12 09:54:03 +000011236 cat >conftest.$ac_ext <<_ACEOF
11237#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011238#include "confdefs.h"
11239/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011240 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011241#include <assert.h>
11242/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011243#ifdef __cplusplus
11244extern "C"
11245#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011246/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011247 builtin and then its argument prototype would still apply. */
11248char $ac_func ();
11249char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011250
Barry Warsawfe33b792003-01-07 22:42:49 +000011251#ifdef F77_DUMMY_MAIN
11252# ifdef __cplusplus
11253 extern "C"
11254# endif
11255 int F77_DUMMY_MAIN() { return 1; }
11256#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011257int
11258main ()
11259{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011260/* The GNU C library defines this for functions which it implements
11261 to always fail with ENOSYS. Some functions are actually named
11262 something starting with __ and the normal name is an alias. */
11263#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11264choke me
11265#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011266f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011267#endif
11268
Martin v. Löwis11437992002-04-12 09:54:03 +000011269 ;
11270 return 0;
11271}
11272_ACEOF
11273rm -f conftest.$ac_objext conftest$ac_exeext
11274if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11275 (eval $ac_link) 2>&5
11276 ac_status=$?
11277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11278 (exit $ac_status); } &&
11279 { ac_try='test -s conftest$ac_exeext'
11280 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11281 (eval $ac_try) 2>&5
11282 ac_status=$?
11283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11284 (exit $ac_status); }; }; then
11285 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011286else
Martin v. Löwis11437992002-04-12 09:54:03 +000011287 echo "$as_me: failed program was:" >&5
11288cat conftest.$ac_ext >&5
11289eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011290fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011291rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011292fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011293echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11294echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11295if test `eval echo '${'$as_ac_var'}'` = yes; then
11296 cat >>confdefs.h <<_ACEOF
11297#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11298_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011299
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011300fi
11301done
11302
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011303 fi
11304
Martin v. Löwis11437992002-04-12 09:54:03 +000011305 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11306echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11307if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11308 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011309else
Martin v. Löwis11437992002-04-12 09:54:03 +000011310 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011311LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011312cat >conftest.$ac_ext <<_ACEOF
11313#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011314#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011315
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011316/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011317#ifdef __cplusplus
11318extern "C"
11319#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011320/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011321 builtin and then its argument prototype would still apply. */
11322char usconfig ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011323#ifdef F77_DUMMY_MAIN
11324# ifdef __cplusplus
11325 extern "C"
11326# endif
11327 int F77_DUMMY_MAIN() { return 1; }
11328#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011329int
11330main ()
11331{
11332usconfig ();
11333 ;
11334 return 0;
11335}
11336_ACEOF
11337rm -f conftest.$ac_objext conftest$ac_exeext
11338if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11339 (eval $ac_link) 2>&5
11340 ac_status=$?
11341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11342 (exit $ac_status); } &&
11343 { ac_try='test -s conftest$ac_exeext'
11344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11345 (eval $ac_try) 2>&5
11346 ac_status=$?
11347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11348 (exit $ac_status); }; }; then
11349 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011350else
Martin v. Löwis11437992002-04-12 09:54:03 +000011351 echo "$as_me: failed program was:" >&5
11352cat conftest.$ac_ext >&5
11353ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011354fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011355rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11356LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011357fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011358echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11359echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11360if test $ac_cv_lib_mpc_usconfig = yes; then
11361 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011362#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011363_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011364
Martin v. Löwis130fb172001-07-19 11:00:41 +000011365 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011366 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011367 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011368fi
11369
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011370
Neal Norwitza978ab02002-11-02 16:58:05 +000011371 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011372 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11373echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11374if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11375 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011376else
Martin v. Löwis11437992002-04-12 09:54:03 +000011377 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011378LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011379cat >conftest.$ac_ext <<_ACEOF
11380#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011381#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011382
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011383/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011384#ifdef __cplusplus
11385extern "C"
11386#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011387/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011388 builtin and then its argument prototype would still apply. */
11389char thr_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011390#ifdef F77_DUMMY_MAIN
11391# ifdef __cplusplus
11392 extern "C"
11393# endif
11394 int F77_DUMMY_MAIN() { return 1; }
11395#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011396int
11397main ()
11398{
11399thr_create ();
11400 ;
11401 return 0;
11402}
11403_ACEOF
11404rm -f conftest.$ac_objext conftest$ac_exeext
11405if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11406 (eval $ac_link) 2>&5
11407 ac_status=$?
11408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11409 (exit $ac_status); } &&
11410 { ac_try='test -s conftest$ac_exeext'
11411 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11412 (eval $ac_try) 2>&5
11413 ac_status=$?
11414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11415 (exit $ac_status); }; }; then
11416 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011417else
Martin v. Löwis11437992002-04-12 09:54:03 +000011418 echo "$as_me: failed program was:" >&5
11419cat conftest.$ac_ext >&5
11420ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011421fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011422rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11423LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011424fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011425echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11426echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11427if test $ac_cv_lib_thread_thr_create = yes; then
11428 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011429#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011430_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011431
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011432 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011433 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011434 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011435fi
11436
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011437 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011438
Martin v. Löwis130fb172001-07-19 11:00:41 +000011439 if test "$USE_THREAD_MODULE" != "#"
11440 then
11441 # If the above checks didn't disable threads, (at least) OSF1
11442 # needs this '-threads' argument during linking.
11443 case $ac_sys_system in
11444 OSF1) LDLAST=-threads;;
11445 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011446 fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011447
11448 if test "$posix_threads" = yes -a \
11449 "$ac_sys_system" = "SunOS" -a \
11450 "$ac_sys_release" = "5.6"; then
11451
11452cat >>confdefs.h <<\_ACEOF
11453#define HAVE_PTHREAD_DESTRUCTOR 1
11454_ACEOF
11455
11456 fi
11457
Guido van Rossum627b2d71993-12-24 10:39:16 +000011458fi
11459
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011460# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011461
11462
11463echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11464echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011465# Check whether --enable-ipv6 or --disable-ipv6 was given.
11466if test "${enable_ipv6+set}" = set; then
11467 enableval="$enable_ipv6"
11468 case "$enableval" in
11469 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011470 echo "$as_me:$LINENO: result: no" >&5
11471echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011472 ipv6=no
11473 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011474 *) echo "$as_me:$LINENO: result: yes" >&5
11475echo "${ECHO_T}yes" >&6
11476 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011477#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011478_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011479
11480 ipv6=yes
11481 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011482 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011483else
Martin v. Löwis11437992002-04-12 09:54:03 +000011484
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011485 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011486 echo "$as_me:$LINENO: result: no" >&5
11487echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011488 ipv6=no
11489
11490else
Martin v. Löwis11437992002-04-12 09:54:03 +000011491 cat >conftest.$ac_ext <<_ACEOF
11492#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011493#include "confdefs.h"
11494 /* AF_INET6 available check */
11495#include <sys/types.h>
11496#include <sys/socket.h>
11497main()
11498{
11499 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11500 exit(1);
11501 else
11502 exit(0);
11503}
11504
Martin v. Löwis11437992002-04-12 09:54:03 +000011505_ACEOF
11506rm -f conftest$ac_exeext
11507if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11508 (eval $ac_link) 2>&5
11509 ac_status=$?
11510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11511 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11512 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11513 (eval $ac_try) 2>&5
11514 ac_status=$?
11515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11516 (exit $ac_status); }; }; then
11517 echo "$as_me:$LINENO: result: yes" >&5
11518echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011519 ipv6=yes
11520else
Martin v. Löwis11437992002-04-12 09:54:03 +000011521 echo "$as_me: program exited with status $ac_status" >&5
11522echo "$as_me: failed program was:" >&5
11523cat conftest.$ac_ext >&5
11524( exit $ac_status )
11525echo "$as_me:$LINENO: result: no" >&5
11526echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011527 ipv6=no
11528fi
Barry Warsawfe33b792003-01-07 22:42:49 +000011529rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011530fi
11531
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011532if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011533 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11534echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11535 cat >conftest.$ac_ext <<_ACEOF
11536#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011537#include "confdefs.h"
11538#include <sys/types.h>
11539#include <netinet/in.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000011540#ifdef F77_DUMMY_MAIN
11541# ifdef __cplusplus
11542 extern "C"
11543# endif
11544 int F77_DUMMY_MAIN() { return 1; }
11545#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011546int
11547main ()
11548{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011549struct sockaddr_in6 x;
11550x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011551 ;
11552 return 0;
11553}
11554_ACEOF
11555rm -f conftest.$ac_objext
11556if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11557 (eval $ac_compile) 2>&5
11558 ac_status=$?
11559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11560 (exit $ac_status); } &&
11561 { ac_try='test -s conftest.$ac_objext'
11562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11563 (eval $ac_try) 2>&5
11564 ac_status=$?
11565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11566 (exit $ac_status); }; }; then
11567 echo "$as_me:$LINENO: result: yes" >&5
11568echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011569 ipv6=yes
11570else
Martin v. Löwis11437992002-04-12 09:54:03 +000011571 echo "$as_me: failed program was:" >&5
11572cat conftest.$ac_ext >&5
11573echo "$as_me:$LINENO: result: no" >&5
11574echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011575 ipv6=no
11576fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011577rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011578fi
11579
11580if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011581 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011582#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011583_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011584
11585fi
11586
Martin v. Löwis11437992002-04-12 09:54:03 +000011587fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011588
11589ipv6type=unknown
11590ipv6lib=none
11591ipv6trylibc=no
11592
11593if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011594 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11595echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011596 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11597 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011598 case $i in
11599 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011600 cat >conftest.$ac_ext <<_ACEOF
11601#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011602#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011603
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011604#include <netinet/in.h>
11605#ifdef IPV6_INRIA_VERSION
11606yes
11607#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011608_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011609if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011610 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011611 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011612fi
11613rm -f conftest*
11614
11615 ;;
11616 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011617 cat >conftest.$ac_ext <<_ACEOF
11618#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011619#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011620
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011621#include <netinet/in.h>
11622#ifdef __KAME__
11623yes
11624#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011625_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011626if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011627 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011628 ipv6type=$i;
11629 ipv6lib=inet6
11630 ipv6libdir=/usr/local/v6/lib
11631 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011632fi
11633rm -f conftest*
11634
11635 ;;
11636 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011637 cat >conftest.$ac_ext <<_ACEOF
11638#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011639#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011640
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011641#include <features.h>
11642#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11643yes
11644#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011645_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011646if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011647 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011648 ipv6type=$i;
11649 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011650fi
11651rm -f conftest*
11652
11653 ;;
11654 linux-inet6)
11655 if test -d /usr/inet6; then
11656 ipv6type=$i
11657 ipv6lib=inet6
11658 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011659 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011660 fi
11661 ;;
11662 solaris)
11663 if test -f /etc/netconfig; then
11664 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11665 ipv6type=$i
11666 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011667 fi
11668 fi
11669 ;;
11670 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011671 cat >conftest.$ac_ext <<_ACEOF
11672#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011673#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011674
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011675#include <sys/param.h>
11676#ifdef _TOSHIBA_INET6
11677yes
11678#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011679_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011680if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011681 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011682 ipv6type=$i;
11683 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011684 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011685fi
11686rm -f conftest*
11687
11688 ;;
11689 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011690 cat >conftest.$ac_ext <<_ACEOF
11691#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011692#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011693
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011694#include </usr/local/v6/include/sys/v6config.h>
11695#ifdef __V6D__
11696yes
11697#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011698_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011699if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011700 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011701 ipv6type=$i;
11702 ipv6lib=v6;
11703 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011704 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011705fi
11706rm -f conftest*
11707
11708 ;;
11709 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011710 cat >conftest.$ac_ext <<_ACEOF
11711#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011712#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011713
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011714#include <sys/param.h>
11715#ifdef _ZETA_MINAMI_INET6
11716yes
11717#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011718_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011719if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011720 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011721 ipv6type=$i;
11722 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011723 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011724fi
11725rm -f conftest*
11726
11727 ;;
11728 esac
11729 if test "$ipv6type" != "unknown"; then
11730 break
11731 fi
11732 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011733 echo "$as_me:$LINENO: result: $ipv6type" >&5
11734echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011735fi
11736
11737if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11738 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11739 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11740 echo "using lib$ipv6lib"
11741 else
11742 if test $ipv6trylibc = "yes"; then
11743 echo "using libc"
11744 else
11745 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11746 echo "You need to fetch lib$ipv6lib.a from appropriate"
11747 echo 'ipv6 kit and compile beforehand.'
11748 exit 1
11749 fi
11750 fi
11751fi
11752
Jack Jansen7b8c7542002-04-14 20:12:41 +000011753# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000011754echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
11755echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000011756
11757# Check whether --with-universal-newlines or --without-universal-newlines was given.
11758if test "${with_universal_newlines+set}" = set; then
11759 withval="$with_universal_newlines"
11760
11761fi;
11762
11763if test -z "$with_universal_newlines"
11764then with_universal_newlines="yes"
11765fi
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011766if test "$with_universal_newlines" = "no"
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011767then
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011768 echo --without-universal-newlines is unsupported, see README
11769 exit 1
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011770else
Martin v. Löwise8aea582002-04-16 05:51:02 +000011771
11772cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011773#define WITH_UNIVERSAL_NEWLINES 1
11774_ACEOF
11775
11776fi
11777echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11778echo "${ECHO_T}$with_universal_newlines" >&6
11779
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011780# Check for --with-doc-strings
11781echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11782echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11783
11784# Check whether --with-doc-strings or --without-doc-strings was given.
11785if test "${with_doc_strings+set}" = set; then
11786 withval="$with_doc_strings"
11787
11788fi;
11789
11790if test -z "$with_doc_strings"
11791then with_doc_strings="yes"
11792fi
11793if test "$with_doc_strings" != "no"
11794then
11795
11796cat >>confdefs.h <<\_ACEOF
11797#define WITH_DOC_STRINGS 1
11798_ACEOF
11799
11800fi
11801echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11802echo "${ECHO_T}$with_doc_strings" >&6
11803
Neil Schemenauera35c6882001-02-27 04:45:05 +000011804# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011805echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11806echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11807
Neil Schemenauera35c6882001-02-27 04:45:05 +000011808# Check whether --with-pymalloc or --without-pymalloc was given.
11809if test "${with_pymalloc+set}" = set; then
11810 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011811
Martin v. Löwis11437992002-04-12 09:54:03 +000011812fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011813
Neil Schemenauer16c22972002-03-22 15:34:49 +000011814if test -z "$with_pymalloc"
11815then with_pymalloc="yes"
11816fi
11817if test "$with_pymalloc" != "no"
11818then
Martin v. Löwis11437992002-04-12 09:54:03 +000011819
11820cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011821#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011822_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011823
11824fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011825echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11826echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011827
Barry Warsawef82cd72000-06-30 16:21:01 +000011828# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011829echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11830echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11831
Barry Warsawef82cd72000-06-30 16:21:01 +000011832# Check whether --with-wctype-functions or --without-wctype-functions was given.
11833if test "${with_wctype_functions+set}" = set; then
11834 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011835
Barry Warsawef82cd72000-06-30 16:21:01 +000011836if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011837then
11838
11839cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011840#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011841_ACEOF
11842
11843 echo "$as_me:$LINENO: result: yes" >&5
11844echo "${ECHO_T}yes" >&6
11845else echo "$as_me:$LINENO: result: no" >&5
11846echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011847fi
11848else
Martin v. Löwis11437992002-04-12 09:54:03 +000011849 echo "$as_me:$LINENO: result: no" >&5
11850echo "${ECHO_T}no" >&6
11851fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011852
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011853# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011854
Guido van Rossum98935bf2001-09-05 19:13:16 +000011855DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011856
Martin v. Löwis11437992002-04-12 09:54:03 +000011857echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11858echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11859
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011860# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011861if test "${with_sgi_dl+set}" = set; then
11862 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011863
11864echo "$as_me:$LINENO: result: $withval" >&5
11865echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000011866echo --with-sgi-dl is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011867exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011868
11869cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011870#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011871_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011872
Guido van Rossume97ee181999-12-20 21:27:22 +000011873DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011874dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011875if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011876then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011877else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11878echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11879 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011880fi
11881DLINCLDIR=${dldir}
11882LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011883else
Martin v. Löwis11437992002-04-12 09:54:03 +000011884 echo "$as_me:$LINENO: result: no" >&5
11885echo "${ECHO_T}no" >&6
11886fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011887
Martin v. Löwis11437992002-04-12 09:54:03 +000011888echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11889echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011890
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011891# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011892if test "${with_dl_dld+set}" = set; then
11893 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011894
11895echo "$as_me:$LINENO: result: $withval" >&5
11896echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000011897echo --with-dl-dld is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011898exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011899
11900cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011901#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011902_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011903
Guido van Rossume97ee181999-12-20 21:27:22 +000011904DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011905dldir=`echo "$withval" | sed 's/,.*//'`
11906dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011907if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011908then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011909else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&5
11910echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&2;}
11911 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011912fi
11913DLINCLDIR=${dldir}
11914LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011915else
Martin v. Löwis11437992002-04-12 09:54:03 +000011916 echo "$as_me:$LINENO: result: no" >&5
11917echo "${ECHO_T}no" >&6
11918fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011919
Guido van Rossume97ee181999-12-20 21:27:22 +000011920# the dlopen() function means we might want to use dynload_shlib.o. some
11921# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011922
Thomas Wouters3a584202000-08-05 23:28:51 +000011923for ac_func in dlopen
11924do
Martin v. Löwis11437992002-04-12 09:54:03 +000011925as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11926echo "$as_me:$LINENO: checking for $ac_func" >&5
11927echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11928if eval "test \"\${$as_ac_var+set}\" = set"; then
11929 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011930else
Martin v. Löwis11437992002-04-12 09:54:03 +000011931 cat >conftest.$ac_ext <<_ACEOF
11932#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011933#include "confdefs.h"
11934/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011935 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011936#include <assert.h>
11937/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011938#ifdef __cplusplus
11939extern "C"
11940#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011941/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011942 builtin and then its argument prototype would still apply. */
11943char $ac_func ();
11944char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011945
Barry Warsawfe33b792003-01-07 22:42:49 +000011946#ifdef F77_DUMMY_MAIN
11947# ifdef __cplusplus
11948 extern "C"
11949# endif
11950 int F77_DUMMY_MAIN() { return 1; }
11951#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011952int
11953main ()
11954{
Guido van Rossume97ee181999-12-20 21:27:22 +000011955/* The GNU C library defines this for functions which it implements
11956 to always fail with ENOSYS. Some functions are actually named
11957 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011958#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011959choke me
11960#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011961f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011962#endif
11963
Martin v. Löwis11437992002-04-12 09:54:03 +000011964 ;
11965 return 0;
11966}
11967_ACEOF
11968rm -f conftest.$ac_objext conftest$ac_exeext
11969if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11970 (eval $ac_link) 2>&5
11971 ac_status=$?
11972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11973 (exit $ac_status); } &&
11974 { ac_try='test -s conftest$ac_exeext'
11975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11976 (eval $ac_try) 2>&5
11977 ac_status=$?
11978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11979 (exit $ac_status); }; }; then
11980 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011981else
Martin v. Löwis11437992002-04-12 09:54:03 +000011982 echo "$as_me: failed program was:" >&5
11983cat conftest.$ac_ext >&5
11984eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011985fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011986rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011987fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011988echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11989echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11990if test `eval echo '${'$as_ac_var'}'` = yes; then
11991 cat >>confdefs.h <<_ACEOF
11992#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11993_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011994
Guido van Rossume97ee181999-12-20 21:27:22 +000011995fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011996done
Guido van Rossume97ee181999-12-20 21:27:22 +000011997
Michael W. Hudson54241132001-12-07 15:38:26 +000011998
Guido van Rossume97ee181999-12-20 21:27:22 +000011999# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12000# loading of modules.
12001
Martin v. Löwis11437992002-04-12 09:54:03 +000012002echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
12003echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012004if test -z "$DYNLOADFILE"
12005then
12006 case $ac_sys_system/$ac_sys_release in
12007 AIX*) DYNLOADFILE="dynload_aix.o";;
12008 BeOS*) DYNLOADFILE="dynload_beos.o";;
12009 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000012010 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012011 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000012012 *)
12013 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
12014 # out any dynamic loading
12015 if test "$ac_cv_func_dlopen" = yes
12016 then DYNLOADFILE="dynload_shlib.o"
12017 else DYNLOADFILE="dynload_stub.o"
12018 fi
12019 ;;
12020 esac
12021fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012022echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
12023echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012024if test "$DYNLOADFILE" != "dynload_stub.o"
12025then
Martin v. Löwis11437992002-04-12 09:54:03 +000012026
12027cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012028#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012029_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012030
12031fi
12032
Neil Schemenauer4e425612001-06-19 15:44:15 +000012033# MACHDEP_OBJS can be set to platform-specific object files needed by Python
12034
Michael W. Hudson54241132001-12-07 15:38:26 +000012035
Martin v. Löwis11437992002-04-12 09:54:03 +000012036echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
12037echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012038if test -z "$MACHDEP_OBJS"
12039then
Jack Jansene578a632001-08-15 01:27:14 +000012040 MACHDEP_OBJS=$extra_machdep_objs
12041else
12042 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000012043fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012044echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
12045echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012046
Guido van Rossum627b2d71993-12-24 10:39:16 +000012047# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
Martin v. Löwis9c36c292002-12-21 18:34:06 +000012121
Martin v. Löwisd5843682002-11-21 20:41:28 +000012122for ac_func in alarm chown clock confstr ctermid execv \
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012123 fchdir fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012124 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
12125 getpriority getpwent getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000012126 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000012127 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000012128 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000012129 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000012130 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012131 sigaction siginterrupt sigrelse strftime strptime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000012132 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012133 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000012134do
Martin v. Löwis11437992002-04-12 09:54:03 +000012135as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12136echo "$as_me:$LINENO: checking for $ac_func" >&5
12137echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12138if eval "test \"\${$as_ac_var+set}\" = set"; then
12139 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012140else
Martin v. Löwis11437992002-04-12 09:54:03 +000012141 cat >conftest.$ac_ext <<_ACEOF
12142#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012143#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012144/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012145 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012146#include <assert.h>
12147/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012148#ifdef __cplusplus
12149extern "C"
12150#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012151/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012152 builtin and then its argument prototype would still apply. */
12153char $ac_func ();
12154char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012155
Barry Warsawfe33b792003-01-07 22:42:49 +000012156#ifdef F77_DUMMY_MAIN
12157# ifdef __cplusplus
12158 extern "C"
12159# endif
12160 int F77_DUMMY_MAIN() { return 1; }
12161#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012162int
12163main ()
12164{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012165/* The GNU C library defines this for functions which it implements
12166 to always fail with ENOSYS. Some functions are actually named
12167 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012168#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012169choke me
12170#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012171f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012172#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012173
Martin v. Löwis11437992002-04-12 09:54:03 +000012174 ;
12175 return 0;
12176}
12177_ACEOF
12178rm -f conftest.$ac_objext conftest$ac_exeext
12179if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12180 (eval $ac_link) 2>&5
12181 ac_status=$?
12182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12183 (exit $ac_status); } &&
12184 { ac_try='test -s conftest$ac_exeext'
12185 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12186 (eval $ac_try) 2>&5
12187 ac_status=$?
12188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12189 (exit $ac_status); }; }; then
12190 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012191else
Martin v. Löwis11437992002-04-12 09:54:03 +000012192 echo "$as_me: failed program was:" >&5
12193cat conftest.$ac_ext >&5
12194eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012195fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012196rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012197fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012198echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12199echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12200if test `eval echo '${'$as_ac_var'}'` = yes; then
12201 cat >>confdefs.h <<_ACEOF
12202#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12203_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012204
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012205fi
12206done
12207
Michael W. Hudson54241132001-12-07 15:38:26 +000012208
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012209# For some functions, having a definition is not sufficient, since
12210# we want to take their address.
12211echo "$as_me:$LINENO: checking for chroot" >&5
12212echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12213cat >conftest.$ac_ext <<_ACEOF
12214#line $LINENO "configure"
12215#include "confdefs.h"
12216#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012217#ifdef F77_DUMMY_MAIN
12218# ifdef __cplusplus
12219 extern "C"
12220# endif
12221 int F77_DUMMY_MAIN() { return 1; }
12222#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012223int
12224main ()
12225{
12226void *x=chroot
12227 ;
12228 return 0;
12229}
12230_ACEOF
12231rm -f conftest.$ac_objext
12232if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12233 (eval $ac_compile) 2>&5
12234 ac_status=$?
12235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12236 (exit $ac_status); } &&
12237 { ac_try='test -s conftest.$ac_objext'
12238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12239 (eval $ac_try) 2>&5
12240 ac_status=$?
12241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12242 (exit $ac_status); }; }; then
12243
12244cat >>confdefs.h <<\_ACEOF
12245#define HAVE_CHROOT 1
12246_ACEOF
12247
12248 echo "$as_me:$LINENO: result: yes" >&5
12249echo "${ECHO_T}yes" >&6
12250else
12251 echo "$as_me: failed program was:" >&5
12252cat conftest.$ac_ext >&5
12253echo "$as_me:$LINENO: result: no" >&5
12254echo "${ECHO_T}no" >&6
12255
12256fi
12257rm -f conftest.$ac_objext conftest.$ac_ext
12258echo "$as_me:$LINENO: checking for link" >&5
12259echo $ECHO_N "checking for link... $ECHO_C" >&6
12260cat >conftest.$ac_ext <<_ACEOF
12261#line $LINENO "configure"
12262#include "confdefs.h"
12263#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012264#ifdef F77_DUMMY_MAIN
12265# ifdef __cplusplus
12266 extern "C"
12267# endif
12268 int F77_DUMMY_MAIN() { return 1; }
12269#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012270int
12271main ()
12272{
12273void *x=link
12274 ;
12275 return 0;
12276}
12277_ACEOF
12278rm -f conftest.$ac_objext
12279if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12280 (eval $ac_compile) 2>&5
12281 ac_status=$?
12282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12283 (exit $ac_status); } &&
12284 { ac_try='test -s conftest.$ac_objext'
12285 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12286 (eval $ac_try) 2>&5
12287 ac_status=$?
12288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12289 (exit $ac_status); }; }; then
12290
12291cat >>confdefs.h <<\_ACEOF
12292#define HAVE_LINK 1
12293_ACEOF
12294
12295 echo "$as_me:$LINENO: result: yes" >&5
12296echo "${ECHO_T}yes" >&6
12297else
12298 echo "$as_me: failed program was:" >&5
12299cat conftest.$ac_ext >&5
12300echo "$as_me:$LINENO: result: no" >&5
12301echo "${ECHO_T}no" >&6
12302
12303fi
12304rm -f conftest.$ac_objext conftest.$ac_ext
12305echo "$as_me:$LINENO: checking for symlink" >&5
12306echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12307cat >conftest.$ac_ext <<_ACEOF
12308#line $LINENO "configure"
12309#include "confdefs.h"
12310#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012311#ifdef F77_DUMMY_MAIN
12312# ifdef __cplusplus
12313 extern "C"
12314# endif
12315 int F77_DUMMY_MAIN() { return 1; }
12316#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012317int
12318main ()
12319{
12320void *x=symlink
12321 ;
12322 return 0;
12323}
12324_ACEOF
12325rm -f conftest.$ac_objext
12326if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12327 (eval $ac_compile) 2>&5
12328 ac_status=$?
12329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12330 (exit $ac_status); } &&
12331 { ac_try='test -s conftest.$ac_objext'
12332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12333 (eval $ac_try) 2>&5
12334 ac_status=$?
12335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12336 (exit $ac_status); }; }; then
12337
12338cat >>confdefs.h <<\_ACEOF
12339#define HAVE_SYMLINK 1
12340_ACEOF
12341
12342 echo "$as_me:$LINENO: result: yes" >&5
12343echo "${ECHO_T}yes" >&6
12344else
12345 echo "$as_me: failed program was:" >&5
12346cat conftest.$ac_ext >&5
12347echo "$as_me:$LINENO: result: no" >&5
12348echo "${ECHO_T}no" >&6
12349
12350fi
12351rm -f conftest.$ac_objext conftest.$ac_ext
12352
Martin v. Löwisd5843682002-11-21 20:41:28 +000012353# On some systems (eg. FreeBSD 5), we would find a definition of the
12354# functions ctermid_r, setgroups in the library, but no prototype
12355# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12356# address to avoid compiler warnings and potential miscompilations
12357# because of the missing prototypes.
12358
12359echo "$as_me:$LINENO: checking for ctermid_r" >&5
12360echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
12361cat >conftest.$ac_ext <<_ACEOF
12362#line $LINENO "configure"
12363#include "confdefs.h"
12364
12365#include "confdefs.h"
12366#include <stdio.h>
12367
Barry Warsawfe33b792003-01-07 22:42:49 +000012368#ifdef F77_DUMMY_MAIN
12369# ifdef __cplusplus
12370 extern "C"
12371# endif
12372 int F77_DUMMY_MAIN() { return 1; }
12373#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012374int
12375main ()
12376{
12377void* p = ctermid_r
12378 ;
12379 return 0;
12380}
12381_ACEOF
12382rm -f conftest.$ac_objext
12383if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12384 (eval $ac_compile) 2>&5
12385 ac_status=$?
12386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12387 (exit $ac_status); } &&
12388 { ac_try='test -s conftest.$ac_objext'
12389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12390 (eval $ac_try) 2>&5
12391 ac_status=$?
12392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12393 (exit $ac_status); }; }; then
12394
12395cat >>confdefs.h <<\_ACEOF
12396#define HAVE_CTERMID_R 1
12397_ACEOF
12398
12399 echo "$as_me:$LINENO: result: yes" >&5
12400echo "${ECHO_T}yes" >&6
12401else
12402 echo "$as_me: failed program was:" >&5
12403cat conftest.$ac_ext >&5
12404echo "$as_me:$LINENO: result: no" >&5
12405echo "${ECHO_T}no" >&6
12406
12407fi
12408rm -f conftest.$ac_objext conftest.$ac_ext
12409
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012410echo "$as_me:$LINENO: checking for flock" >&5
12411echo $ECHO_N "checking for flock... $ECHO_C" >&6
12412cat >conftest.$ac_ext <<_ACEOF
12413#line $LINENO "configure"
12414#include "confdefs.h"
12415
12416#include "confdefs.h"
12417#include <sys/file.h>
12418
12419#ifdef F77_DUMMY_MAIN
12420# ifdef __cplusplus
12421 extern "C"
12422# endif
12423 int F77_DUMMY_MAIN() { return 1; }
12424#endif
12425int
12426main ()
12427{
12428void* p = flock
12429 ;
12430 return 0;
12431}
12432_ACEOF
12433rm -f conftest.$ac_objext
12434if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12435 (eval $ac_compile) 2>&5
12436 ac_status=$?
12437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12438 (exit $ac_status); } &&
12439 { ac_try='test -s conftest.$ac_objext'
12440 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12441 (eval $ac_try) 2>&5
12442 ac_status=$?
12443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12444 (exit $ac_status); }; }; then
12445
12446cat >>confdefs.h <<\_ACEOF
12447#define HAVE_FLOCK 1
12448_ACEOF
12449
12450 echo "$as_me:$LINENO: result: yes" >&5
12451echo "${ECHO_T}yes" >&6
12452else
12453 echo "$as_me: failed program was:" >&5
12454cat conftest.$ac_ext >&5
12455echo "$as_me:$LINENO: result: no" >&5
12456echo "${ECHO_T}no" >&6
12457
12458fi
12459rm -f conftest.$ac_objext conftest.$ac_ext
12460
12461echo "$as_me:$LINENO: checking for getpagesize" >&5
12462echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
12463cat >conftest.$ac_ext <<_ACEOF
12464#line $LINENO "configure"
12465#include "confdefs.h"
12466
12467#include "confdefs.h"
12468#include <unistd.h>
12469
12470#ifdef F77_DUMMY_MAIN
12471# ifdef __cplusplus
12472 extern "C"
12473# endif
12474 int F77_DUMMY_MAIN() { return 1; }
12475#endif
12476int
12477main ()
12478{
12479void* p = getpagesize
12480 ;
12481 return 0;
12482}
12483_ACEOF
12484rm -f conftest.$ac_objext
12485if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12486 (eval $ac_compile) 2>&5
12487 ac_status=$?
12488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12489 (exit $ac_status); } &&
12490 { ac_try='test -s conftest.$ac_objext'
12491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12492 (eval $ac_try) 2>&5
12493 ac_status=$?
12494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12495 (exit $ac_status); }; }; then
12496
12497cat >>confdefs.h <<\_ACEOF
12498#define HAVE_GETPAGESIZE 1
12499_ACEOF
12500
12501 echo "$as_me:$LINENO: result: yes" >&5
12502echo "${ECHO_T}yes" >&6
12503else
12504 echo "$as_me: failed program was:" >&5
12505cat conftest.$ac_ext >&5
12506echo "$as_me:$LINENO: result: no" >&5
12507echo "${ECHO_T}no" >&6
12508
12509fi
12510rm -f conftest.$ac_objext conftest.$ac_ext
12511
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012512echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
12513echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
12514if test "${ac_cv_lib_c_inet_aton+set}" = set; then
12515 echo $ECHO_N "(cached) $ECHO_C" >&6
12516else
12517 ac_check_lib_save_LIBS=$LIBS
12518LIBS="-lc $LIBS"
12519cat >conftest.$ac_ext <<_ACEOF
12520#line $LINENO "configure"
12521#include "confdefs.h"
12522
12523/* Override any gcc2 internal prototype to avoid an error. */
12524#ifdef __cplusplus
12525extern "C"
12526#endif
12527/* We use char because int might match the return type of a gcc2
12528 builtin and then its argument prototype would still apply. */
12529char inet_aton ();
12530#ifdef F77_DUMMY_MAIN
12531# ifdef __cplusplus
12532 extern "C"
12533# endif
12534 int F77_DUMMY_MAIN() { return 1; }
12535#endif
12536int
12537main ()
12538{
12539inet_aton ();
12540 ;
12541 return 0;
12542}
12543_ACEOF
12544rm -f conftest.$ac_objext conftest$ac_exeext
12545if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12546 (eval $ac_link) 2>&5
12547 ac_status=$?
12548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12549 (exit $ac_status); } &&
12550 { ac_try='test -s conftest$ac_exeext'
12551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12552 (eval $ac_try) 2>&5
12553 ac_status=$?
12554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12555 (exit $ac_status); }; }; then
12556 ac_cv_lib_c_inet_aton=yes
12557else
12558 echo "$as_me: failed program was:" >&5
12559cat conftest.$ac_ext >&5
12560ac_cv_lib_c_inet_aton=no
12561fi
12562rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12563LIBS=$ac_check_lib_save_LIBS
12564fi
12565echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
12566echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
12567if test $ac_cv_lib_c_inet_aton = yes; then
12568 /bin/true
12569else
12570
12571echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
12572echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
12573if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
12574 echo $ECHO_N "(cached) $ECHO_C" >&6
12575else
12576 ac_check_lib_save_LIBS=$LIBS
12577LIBS="-lresolv $LIBS"
12578cat >conftest.$ac_ext <<_ACEOF
12579#line $LINENO "configure"
12580#include "confdefs.h"
12581
12582/* Override any gcc2 internal prototype to avoid an error. */
12583#ifdef __cplusplus
12584extern "C"
12585#endif
12586/* We use char because int might match the return type of a gcc2
12587 builtin and then its argument prototype would still apply. */
12588char inet_aton ();
12589#ifdef F77_DUMMY_MAIN
12590# ifdef __cplusplus
12591 extern "C"
12592# endif
12593 int F77_DUMMY_MAIN() { return 1; }
12594#endif
12595int
12596main ()
12597{
12598inet_aton ();
12599 ;
12600 return 0;
12601}
12602_ACEOF
12603rm -f conftest.$ac_objext conftest$ac_exeext
12604if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12605 (eval $ac_link) 2>&5
12606 ac_status=$?
12607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12608 (exit $ac_status); } &&
12609 { ac_try='test -s conftest$ac_exeext'
12610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12611 (eval $ac_try) 2>&5
12612 ac_status=$?
12613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12614 (exit $ac_status); }; }; then
12615 ac_cv_lib_resolv_inet_aton=yes
12616else
12617 echo "$as_me: failed program was:" >&5
12618cat conftest.$ac_ext >&5
12619ac_cv_lib_resolv_inet_aton=no
12620fi
12621rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12622LIBS=$ac_check_lib_save_LIBS
12623fi
12624echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
12625echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
12626if test $ac_cv_lib_resolv_inet_aton = yes; then
12627 cat >>confdefs.h <<_ACEOF
12628#define HAVE_LIBRESOLV 1
12629_ACEOF
12630
12631 LIBS="-lresolv $LIBS"
12632
12633fi
12634
12635
12636fi
12637
12638
Martin v. Löwise9416172003-05-03 10:12:45 +000012639echo "$as_me:$LINENO: checking for hstrerror" >&5
12640echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
12641cat >conftest.$ac_ext <<_ACEOF
12642#line $LINENO "configure"
12643#include "confdefs.h"
12644
12645#include "confdefs.h"
12646#include <netdb.h>
12647
12648#ifdef F77_DUMMY_MAIN
12649# ifdef __cplusplus
12650 extern "C"
12651# endif
12652 int F77_DUMMY_MAIN() { return 1; }
12653#endif
12654int
12655main ()
12656{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012657void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012658 ;
12659 return 0;
12660}
12661_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012662rm -f conftest.$ac_objext conftest$ac_exeext
12663if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12664 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000012665 ac_status=$?
12666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12667 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012668 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000012669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12670 (eval $ac_try) 2>&5
12671 ac_status=$?
12672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12673 (exit $ac_status); }; }; then
12674
12675cat >>confdefs.h <<\_ACEOF
12676#define HAVE_HSTRERROR 1
12677_ACEOF
12678
12679 echo "$as_me:$LINENO: result: yes" >&5
12680echo "${ECHO_T}yes" >&6
12681else
12682 echo "$as_me: failed program was:" >&5
12683cat conftest.$ac_ext >&5
12684echo "$as_me:$LINENO: result: no" >&5
12685echo "${ECHO_T}no" >&6
12686
12687fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012688rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012689
12690echo "$as_me:$LINENO: checking for inet_aton" >&5
12691echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
12692cat >conftest.$ac_ext <<_ACEOF
12693#line $LINENO "configure"
12694#include "confdefs.h"
12695
12696#include "confdefs.h"
12697#include <sys/socket.h>
12698#include <netinet/in.h>
12699#include <arpa/inet.h>
12700
12701#ifdef F77_DUMMY_MAIN
12702# ifdef __cplusplus
12703 extern "C"
12704# endif
12705 int F77_DUMMY_MAIN() { return 1; }
12706#endif
12707int
12708main ()
12709{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012710void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012711 ;
12712 return 0;
12713}
12714_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012715rm -f conftest.$ac_objext conftest$ac_exeext
12716if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12717 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000012718 ac_status=$?
12719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12720 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012721 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000012722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12723 (eval $ac_try) 2>&5
12724 ac_status=$?
12725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12726 (exit $ac_status); }; }; then
12727
12728cat >>confdefs.h <<\_ACEOF
12729#define HAVE_INET_ATON 1
12730_ACEOF
12731
12732 echo "$as_me:$LINENO: result: yes" >&5
12733echo "${ECHO_T}yes" >&6
12734else
12735 echo "$as_me: failed program was:" >&5
12736cat conftest.$ac_ext >&5
12737echo "$as_me:$LINENO: result: no" >&5
12738echo "${ECHO_T}no" >&6
12739
12740fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012741rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012742
12743echo "$as_me:$LINENO: checking for inet_pton" >&5
12744echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
12745cat >conftest.$ac_ext <<_ACEOF
12746#line $LINENO "configure"
12747#include "confdefs.h"
12748
12749#include "confdefs.h"
12750#include <sys/socket.h>
12751#include <netinet/in.h>
12752#include <arpa/inet.h>
12753
12754#ifdef F77_DUMMY_MAIN
12755# ifdef __cplusplus
12756 extern "C"
12757# endif
12758 int F77_DUMMY_MAIN() { return 1; }
12759#endif
12760int
12761main ()
12762{
12763void* p = inet_pton
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_INET_PTON 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
12789cat conftest.$ac_ext >&5
12790echo "$as_me:$LINENO: result: no" >&5
12791echo "${ECHO_T}no" >&6
12792
12793fi
12794rm -f conftest.$ac_objext conftest.$ac_ext
12795
Martin v. Löwisd5843682002-11-21 20:41:28 +000012796echo "$as_me:$LINENO: checking for setgroups" >&5
12797echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
12798cat >conftest.$ac_ext <<_ACEOF
12799#line $LINENO "configure"
12800#include "confdefs.h"
12801
12802#include "confdefs.h"
12803#include <unistd.h.h>
12804
Barry Warsawfe33b792003-01-07 22:42:49 +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öwisd5843682002-11-21 20:41:28 +000012811int
12812main ()
12813{
12814void* p = setgroups
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_SETGROUPS 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
12840cat conftest.$ac_ext >&5
12841echo "$as_me:$LINENO: result: no" >&5
12842echo "${ECHO_T}no" >&6
12843
12844fi
12845rm -f conftest.$ac_objext conftest.$ac_ext
12846
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012847# check for openpty and forkpty
12848
Martin v. Löwis11437992002-04-12 09:54:03 +000012849
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012850for ac_func in openpty
12851do
Martin v. Löwis11437992002-04-12 09:54:03 +000012852as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12853echo "$as_me:$LINENO: checking for $ac_func" >&5
12854echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12855if eval "test \"\${$as_ac_var+set}\" = set"; then
12856 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012857else
Martin v. Löwis11437992002-04-12 09:54:03 +000012858 cat >conftest.$ac_ext <<_ACEOF
12859#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012860#include "confdefs.h"
12861/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012862 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012863#include <assert.h>
12864/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012865#ifdef __cplusplus
12866extern "C"
12867#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012868/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012869 builtin and then its argument prototype would still apply. */
12870char $ac_func ();
12871char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012872
Barry Warsawfe33b792003-01-07 22:42:49 +000012873#ifdef F77_DUMMY_MAIN
12874# ifdef __cplusplus
12875 extern "C"
12876# endif
12877 int F77_DUMMY_MAIN() { return 1; }
12878#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012879int
12880main ()
12881{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012882/* The GNU C library defines this for functions which it implements
12883 to always fail with ENOSYS. Some functions are actually named
12884 something starting with __ and the normal name is an alias. */
12885#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12886choke me
12887#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012888f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012889#endif
12890
Martin v. Löwis11437992002-04-12 09:54:03 +000012891 ;
12892 return 0;
12893}
12894_ACEOF
12895rm -f conftest.$ac_objext conftest$ac_exeext
12896if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12897 (eval $ac_link) 2>&5
12898 ac_status=$?
12899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12900 (exit $ac_status); } &&
12901 { ac_try='test -s conftest$ac_exeext'
12902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12903 (eval $ac_try) 2>&5
12904 ac_status=$?
12905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12906 (exit $ac_status); }; }; then
12907 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012908else
Martin v. Löwis11437992002-04-12 09:54:03 +000012909 echo "$as_me: failed program was:" >&5
12910cat conftest.$ac_ext >&5
12911eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012912fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012913rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012914fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012915echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12916echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12917if test `eval echo '${'$as_ac_var'}'` = yes; then
12918 cat >>confdefs.h <<_ACEOF
12919#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12920_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012921
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012922else
Martin v. Löwis11437992002-04-12 09:54:03 +000012923 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
12924echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
12925if test "${ac_cv_lib_util_openpty+set}" = set; then
12926 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012927else
Martin v. Löwis11437992002-04-12 09:54:03 +000012928 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012929LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012930cat >conftest.$ac_ext <<_ACEOF
12931#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012932#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012933
Fred Drake8cef4cf2000-06-28 16:40:38 +000012934/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012935#ifdef __cplusplus
12936extern "C"
12937#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012938/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012939 builtin and then its argument prototype would still apply. */
12940char openpty ();
Barry Warsawfe33b792003-01-07 22:42:49 +000012941#ifdef F77_DUMMY_MAIN
12942# ifdef __cplusplus
12943 extern "C"
12944# endif
12945 int F77_DUMMY_MAIN() { return 1; }
12946#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012947int
12948main ()
12949{
12950openpty ();
12951 ;
12952 return 0;
12953}
12954_ACEOF
12955rm -f conftest.$ac_objext conftest$ac_exeext
12956if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12957 (eval $ac_link) 2>&5
12958 ac_status=$?
12959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12960 (exit $ac_status); } &&
12961 { ac_try='test -s conftest$ac_exeext'
12962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12963 (eval $ac_try) 2>&5
12964 ac_status=$?
12965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12966 (exit $ac_status); }; }; then
12967 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012968else
Martin v. Löwis11437992002-04-12 09:54:03 +000012969 echo "$as_me: failed program was:" >&5
12970cat conftest.$ac_ext >&5
12971ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012972fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012973rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12974LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012975fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012976echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
12977echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
12978if test $ac_cv_lib_util_openpty = yes; then
12979 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012980#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012981_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012982 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012983fi
12984
12985fi
12986done
12987
Martin v. Löwis11437992002-04-12 09:54:03 +000012988
Fred Drake8cef4cf2000-06-28 16:40:38 +000012989for ac_func in forkpty
12990do
Martin v. Löwis11437992002-04-12 09:54:03 +000012991as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12992echo "$as_me:$LINENO: checking for $ac_func" >&5
12993echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12994if eval "test \"\${$as_ac_var+set}\" = set"; then
12995 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012996else
Martin v. Löwis11437992002-04-12 09:54:03 +000012997 cat >conftest.$ac_ext <<_ACEOF
12998#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012999#include "confdefs.h"
13000/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013001 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000013002#include <assert.h>
13003/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013004#ifdef __cplusplus
13005extern "C"
13006#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013007/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013008 builtin and then its argument prototype would still apply. */
13009char $ac_func ();
13010char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000013011
Barry Warsawfe33b792003-01-07 22:42:49 +000013012#ifdef F77_DUMMY_MAIN
13013# ifdef __cplusplus
13014 extern "C"
13015# endif
13016 int F77_DUMMY_MAIN() { return 1; }
13017#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013018int
13019main ()
13020{
Fred Drake8cef4cf2000-06-28 16:40:38 +000013021/* The GNU C library defines this for functions which it implements
13022 to always fail with ENOSYS. Some functions are actually named
13023 something starting with __ and the normal name is an alias. */
13024#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13025choke me
13026#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013027f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000013028#endif
13029
Martin v. Löwis11437992002-04-12 09:54:03 +000013030 ;
13031 return 0;
13032}
13033_ACEOF
13034rm -f conftest.$ac_objext conftest$ac_exeext
13035if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13036 (eval $ac_link) 2>&5
13037 ac_status=$?
13038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13039 (exit $ac_status); } &&
13040 { ac_try='test -s conftest$ac_exeext'
13041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13042 (eval $ac_try) 2>&5
13043 ac_status=$?
13044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13045 (exit $ac_status); }; }; then
13046 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013047else
Martin v. Löwis11437992002-04-12 09:54:03 +000013048 echo "$as_me: failed program was:" >&5
13049cat conftest.$ac_ext >&5
13050eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013051fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013052rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013053fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013054echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13055echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13056if test `eval echo '${'$as_ac_var'}'` = yes; then
13057 cat >>confdefs.h <<_ACEOF
13058#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13059_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013060
Fred Drake8cef4cf2000-06-28 16:40:38 +000013061else
Martin v. Löwis11437992002-04-12 09:54:03 +000013062 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
13063echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
13064if test "${ac_cv_lib_util_forkpty+set}" = set; then
13065 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013066else
Martin v. Löwis11437992002-04-12 09:54:03 +000013067 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013068LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013069cat >conftest.$ac_ext <<_ACEOF
13070#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013071#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013072
Fred Drake8cef4cf2000-06-28 16:40:38 +000013073/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013074#ifdef __cplusplus
13075extern "C"
13076#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013077/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013078 builtin and then its argument prototype would still apply. */
13079char forkpty ();
Barry Warsawfe33b792003-01-07 22:42:49 +000013080#ifdef F77_DUMMY_MAIN
13081# ifdef __cplusplus
13082 extern "C"
13083# endif
13084 int F77_DUMMY_MAIN() { return 1; }
13085#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013086int
13087main ()
13088{
13089forkpty ();
13090 ;
13091 return 0;
13092}
13093_ACEOF
13094rm -f conftest.$ac_objext conftest$ac_exeext
13095if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13096 (eval $ac_link) 2>&5
13097 ac_status=$?
13098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13099 (exit $ac_status); } &&
13100 { ac_try='test -s conftest$ac_exeext'
13101 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13102 (eval $ac_try) 2>&5
13103 ac_status=$?
13104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13105 (exit $ac_status); }; }; then
13106 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013107else
Martin v. Löwis11437992002-04-12 09:54:03 +000013108 echo "$as_me: failed program was:" >&5
13109cat conftest.$ac_ext >&5
13110ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013111fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013112rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13113LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013114fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013115echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
13116echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
13117if test $ac_cv_lib_util_forkpty = yes; then
13118 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013119#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013120_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013121 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013122fi
13123
13124fi
13125done
13126
Jack Jansendd19cf82001-12-06 22:36:17 +000013127
Michael W. Hudson54241132001-12-07 15:38:26 +000013128# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013129
13130
13131
13132
13133
13134
Fred Drake8cef4cf2000-06-28 16:40:38 +000013135for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
13136do
Martin v. Löwis11437992002-04-12 09:54:03 +000013137as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13138echo "$as_me:$LINENO: checking for $ac_func" >&5
13139echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13140if eval "test \"\${$as_ac_var+set}\" = set"; then
13141 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013142else
Martin v. Löwis11437992002-04-12 09:54:03 +000013143 cat >conftest.$ac_ext <<_ACEOF
13144#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013145#include "confdefs.h"
13146/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013147 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013148#include <assert.h>
13149/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013150#ifdef __cplusplus
13151extern "C"
13152#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013153/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013154 builtin and then its argument prototype would still apply. */
13155char $ac_func ();
13156char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013157
Barry Warsawfe33b792003-01-07 22:42:49 +000013158#ifdef F77_DUMMY_MAIN
13159# ifdef __cplusplus
13160 extern "C"
13161# endif
13162 int F77_DUMMY_MAIN() { return 1; }
13163#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013164int
13165main ()
13166{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013167/* The GNU C library defines this for functions which it implements
13168 to always fail with ENOSYS. Some functions are actually named
13169 something starting with __ and the normal name is an alias. */
13170#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13171choke me
13172#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013173f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013174#endif
13175
Martin v. Löwis11437992002-04-12 09:54:03 +000013176 ;
13177 return 0;
13178}
13179_ACEOF
13180rm -f conftest.$ac_objext conftest$ac_exeext
13181if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13182 (eval $ac_link) 2>&5
13183 ac_status=$?
13184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13185 (exit $ac_status); } &&
13186 { ac_try='test -s conftest$ac_exeext'
13187 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13188 (eval $ac_try) 2>&5
13189 ac_status=$?
13190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13191 (exit $ac_status); }; }; then
13192 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013193else
Martin v. Löwis11437992002-04-12 09:54:03 +000013194 echo "$as_me: failed program was:" >&5
13195cat conftest.$ac_ext >&5
13196eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013197fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013198rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013199fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013200echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13201echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13202if test `eval echo '${'$as_ac_var'}'` = yes; then
13203 cat >>confdefs.h <<_ACEOF
13204#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13205_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000013206
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013207fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000013208done
13209
Michael W. Hudson54241132001-12-07 15:38:26 +000013210
Martin v. Löwis11437992002-04-12 09:54:03 +000013211
13212
13213
13214
13215
Martin v. Löwis1142de32002-03-29 16:28:31 +000013216for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000013217do
Martin v. Löwis11437992002-04-12 09:54:03 +000013218as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13219echo "$as_me:$LINENO: checking for $ac_func" >&5
13220echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13221if eval "test \"\${$as_ac_var+set}\" = set"; then
13222 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013223else
Martin v. Löwis11437992002-04-12 09:54:03 +000013224 cat >conftest.$ac_ext <<_ACEOF
13225#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013226#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013227/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013228 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013229#include <assert.h>
13230/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013231#ifdef __cplusplus
13232extern "C"
13233#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013234/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013235 builtin and then its argument prototype would still apply. */
13236char $ac_func ();
13237char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013238
Barry Warsawfe33b792003-01-07 22:42:49 +000013239#ifdef F77_DUMMY_MAIN
13240# ifdef __cplusplus
13241 extern "C"
13242# endif
13243 int F77_DUMMY_MAIN() { return 1; }
13244#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013245int
13246main ()
13247{
Guido van Rossum627b2d71993-12-24 10:39:16 +000013248/* The GNU C library defines this for functions which it implements
13249 to always fail with ENOSYS. Some functions are actually named
13250 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013251#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013252choke me
13253#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013254f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013255#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013256
Martin v. Löwis11437992002-04-12 09:54:03 +000013257 ;
13258 return 0;
13259}
13260_ACEOF
13261rm -f conftest.$ac_objext conftest$ac_exeext
13262if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13263 (eval $ac_link) 2>&5
13264 ac_status=$?
13265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13266 (exit $ac_status); } &&
13267 { ac_try='test -s conftest$ac_exeext'
13268 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13269 (eval $ac_try) 2>&5
13270 ac_status=$?
13271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13272 (exit $ac_status); }; }; then
13273 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013274else
Martin v. Löwis11437992002-04-12 09:54:03 +000013275 echo "$as_me: failed program was:" >&5
13276cat conftest.$ac_ext >&5
13277eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013278fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013279rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000013280fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013281echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13282echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13283if test `eval echo '${'$as_ac_var'}'` = yes; then
13284 cat >>confdefs.h <<_ACEOF
13285#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13286_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000013287
Martin v. Löwis1142de32002-03-29 16:28:31 +000013288else
Martin v. Löwis11437992002-04-12 09:54:03 +000013289 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013290fi
13291done
13292
13293
Martin v. Löwis11437992002-04-12 09:54:03 +000013294
Martin v. Löwis1142de32002-03-29 16:28:31 +000013295for ac_func in getpgrp
13296do
Martin v. Löwis11437992002-04-12 09:54:03 +000013297as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13298echo "$as_me:$LINENO: checking for $ac_func" >&5
13299echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13300if eval "test \"\${$as_ac_var+set}\" = set"; then
13301 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000013302else
Martin v. Löwis11437992002-04-12 09:54:03 +000013303 cat >conftest.$ac_ext <<_ACEOF
13304#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013305#include "confdefs.h"
13306/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013307 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000013308#include <assert.h>
13309/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013310#ifdef __cplusplus
13311extern "C"
13312#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013313/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013314 builtin and then its argument prototype would still apply. */
13315char $ac_func ();
13316char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000013317
Barry Warsawfe33b792003-01-07 22:42:49 +000013318#ifdef F77_DUMMY_MAIN
13319# ifdef __cplusplus
13320 extern "C"
13321# endif
13322 int F77_DUMMY_MAIN() { return 1; }
13323#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013324int
13325main ()
13326{
Martin v. Löwis1142de32002-03-29 16:28:31 +000013327/* The GNU C library defines this for functions which it implements
13328 to always fail with ENOSYS. Some functions are actually named
13329 something starting with __ and the normal name is an alias. */
13330#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13331choke me
13332#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013333f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000013334#endif
13335
Martin v. Löwis11437992002-04-12 09:54:03 +000013336 ;
13337 return 0;
13338}
13339_ACEOF
13340rm -f conftest.$ac_objext conftest$ac_exeext
13341if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13342 (eval $ac_link) 2>&5
13343 ac_status=$?
13344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13345 (exit $ac_status); } &&
13346 { ac_try='test -s conftest$ac_exeext'
13347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13348 (eval $ac_try) 2>&5
13349 ac_status=$?
13350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13351 (exit $ac_status); }; }; then
13352 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013353else
Martin v. Löwis11437992002-04-12 09:54:03 +000013354 echo "$as_me: failed program was:" >&5
13355cat conftest.$ac_ext >&5
13356eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013357fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013358rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013359fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013360echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13361echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13362if test `eval echo '${'$as_ac_var'}'` = yes; then
13363 cat >>confdefs.h <<_ACEOF
13364#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13365_ACEOF
13366 cat >conftest.$ac_ext <<_ACEOF
13367#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013368#include "confdefs.h"
13369#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000013370#ifdef F77_DUMMY_MAIN
13371# ifdef __cplusplus
13372 extern "C"
13373# endif
13374 int F77_DUMMY_MAIN() { return 1; }
13375#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013376int
13377main ()
13378{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013379getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013380 ;
13381 return 0;
13382}
13383_ACEOF
13384rm -f conftest.$ac_objext
13385if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13386 (eval $ac_compile) 2>&5
13387 ac_status=$?
13388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13389 (exit $ac_status); } &&
13390 { ac_try='test -s conftest.$ac_objext'
13391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13392 (eval $ac_try) 2>&5
13393 ac_status=$?
13394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13395 (exit $ac_status); }; }; then
13396
13397cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013398#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013399_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013400
Martin v. Löwis11437992002-04-12 09:54:03 +000013401
Guido van Rossumf78abae1997-01-21 22:02:36 +000013402else
Martin v. Löwis11437992002-04-12 09:54:03 +000013403 echo "$as_me: failed program was:" >&5
13404cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013405fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013406rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013407
Guido van Rossum627b2d71993-12-24 10:39:16 +000013408fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013409done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013410
Jack Jansen150753c2003-03-29 22:07:47 +000013411
13412for ac_func in setpgrp
13413do
13414as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13415echo "$as_me:$LINENO: checking for $ac_func" >&5
13416echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13417if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013418 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013419else
Martin v. Löwis11437992002-04-12 09:54:03 +000013420 cat >conftest.$ac_ext <<_ACEOF
13421#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013422#include "confdefs.h"
Jack Jansen150753c2003-03-29 22:07:47 +000013423/* System header to define __stub macros and hopefully few prototypes,
13424 which can conflict with char $ac_func (); below. */
13425#include <assert.h>
13426/* Override any gcc2 internal prototype to avoid an error. */
13427#ifdef __cplusplus
13428extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000013429#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013430/* We use char because int might match the return type of a gcc2
13431 builtin and then its argument prototype would still apply. */
13432char $ac_func ();
13433char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013434
Barry Warsawfe33b792003-01-07 22:42:49 +000013435#ifdef F77_DUMMY_MAIN
13436# ifdef __cplusplus
13437 extern "C"
13438# endif
13439 int F77_DUMMY_MAIN() { return 1; }
13440#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013441int
13442main ()
13443{
Jack Jansen150753c2003-03-29 22:07:47 +000013444/* The GNU C library defines this for functions which it implements
13445 to always fail with ENOSYS. Some functions are actually named
13446 something starting with __ and the normal name is an alias. */
13447#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13448choke me
13449#else
13450f = $ac_func;
13451#endif
13452
Martin v. Löwis11437992002-04-12 09:54:03 +000013453 ;
13454 return 0;
13455}
13456_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013457rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000013458if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13459 (eval $ac_link) 2>&5
13460 ac_status=$?
13461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013462 (exit $ac_status); } &&
13463 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13465 (eval $ac_try) 2>&5
13466 ac_status=$?
13467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13468 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000013469 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013470else
Jack Jansen150753c2003-03-29 22:07:47 +000013471 echo "$as_me: failed program was:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013472cat conftest.$ac_ext >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013473eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013474fi
Jack Jansen150753c2003-03-29 22:07:47 +000013475rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013476fi
Jack Jansen150753c2003-03-29 22:07:47 +000013477echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13478echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13479if test `eval echo '${'$as_ac_var'}'` = yes; then
13480 cat >>confdefs.h <<_ACEOF
13481#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13482_ACEOF
13483 cat >conftest.$ac_ext <<_ACEOF
13484#line $LINENO "configure"
13485#include "confdefs.h"
13486#include <unistd.h>
13487#ifdef F77_DUMMY_MAIN
13488# ifdef __cplusplus
13489 extern "C"
13490# endif
13491 int F77_DUMMY_MAIN() { return 1; }
13492#endif
13493int
13494main ()
13495{
13496setpgrp(0,0);
13497 ;
13498 return 0;
13499}
13500_ACEOF
13501rm -f conftest.$ac_objext
13502if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13503 (eval $ac_compile) 2>&5
13504 ac_status=$?
13505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13506 (exit $ac_status); } &&
13507 { ac_try='test -s conftest.$ac_objext'
13508 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13509 (eval $ac_try) 2>&5
13510 ac_status=$?
13511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13512 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013513
13514cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013515#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013516_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013517
Jack Jansen150753c2003-03-29 22:07:47 +000013518
13519else
13520 echo "$as_me: failed program was:" >&5
13521cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013522fi
Jack Jansen150753c2003-03-29 22:07:47 +000013523rm -f conftest.$ac_objext conftest.$ac_ext
13524
13525fi
13526done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013527
Martin v. Löwis11437992002-04-12 09:54:03 +000013528
Thomas Wouters3a584202000-08-05 23:28:51 +000013529for ac_func in gettimeofday
13530do
Martin v. Löwis11437992002-04-12 09:54:03 +000013531as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13532echo "$as_me:$LINENO: checking for $ac_func" >&5
13533echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13534if eval "test \"\${$as_ac_var+set}\" = set"; then
13535 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013536else
Martin v. Löwis11437992002-04-12 09:54:03 +000013537 cat >conftest.$ac_ext <<_ACEOF
13538#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013539#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013540/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013541 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013542#include <assert.h>
13543/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013544#ifdef __cplusplus
13545extern "C"
13546#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013547/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013548 builtin and then its argument prototype would still apply. */
13549char $ac_func ();
13550char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013551
Barry Warsawfe33b792003-01-07 22:42:49 +000013552#ifdef F77_DUMMY_MAIN
13553# ifdef __cplusplus
13554 extern "C"
13555# endif
13556 int F77_DUMMY_MAIN() { return 1; }
13557#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013558int
13559main ()
13560{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013561/* The GNU C library defines this for functions which it implements
13562 to always fail with ENOSYS. Some functions are actually named
13563 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013564#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013565choke me
13566#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013567f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013568#endif
13569
Martin v. Löwis11437992002-04-12 09:54:03 +000013570 ;
13571 return 0;
13572}
13573_ACEOF
13574rm -f conftest.$ac_objext conftest$ac_exeext
13575if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13576 (eval $ac_link) 2>&5
13577 ac_status=$?
13578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13579 (exit $ac_status); } &&
13580 { ac_try='test -s conftest$ac_exeext'
13581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13582 (eval $ac_try) 2>&5
13583 ac_status=$?
13584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13585 (exit $ac_status); }; }; then
13586 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013587else
Martin v. Löwis11437992002-04-12 09:54:03 +000013588 echo "$as_me: failed program was:" >&5
13589cat conftest.$ac_ext >&5
13590eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013591fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013592rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013593fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013594echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13595echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13596if test `eval echo '${'$as_ac_var'}'` = yes; then
13597 cat >>confdefs.h <<_ACEOF
13598#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13599_ACEOF
13600 cat >conftest.$ac_ext <<_ACEOF
13601#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013602#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013603#include <sys/time.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000013604#ifdef F77_DUMMY_MAIN
13605# ifdef __cplusplus
13606 extern "C"
13607# endif
13608 int F77_DUMMY_MAIN() { return 1; }
13609#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013610int
13611main ()
13612{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013613gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013614 ;
13615 return 0;
13616}
13617_ACEOF
13618rm -f conftest.$ac_objext
13619if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13620 (eval $ac_compile) 2>&5
13621 ac_status=$?
13622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13623 (exit $ac_status); } &&
13624 { ac_try='test -s conftest.$ac_objext'
13625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13626 (eval $ac_try) 2>&5
13627 ac_status=$?
13628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13629 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013630 :
13631else
Martin v. Löwis11437992002-04-12 09:54:03 +000013632 echo "$as_me: failed program was:" >&5
13633cat conftest.$ac_ext >&5
13634
13635cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013636#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013637_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013638
Martin v. Löwis11437992002-04-12 09:54:03 +000013639
Guido van Rossum627b2d71993-12-24 10:39:16 +000013640fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013641rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013642
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013643fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013644done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013645
Michael W. Hudson54241132001-12-07 15:38:26 +000013646
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013647echo "$as_me:$LINENO: checking for major" >&5
13648echo $ECHO_N "checking for major... $ECHO_C" >&6
13649cat >conftest.$ac_ext <<_ACEOF
13650#line $LINENO "configure"
13651#include "confdefs.h"
13652
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013653#if defined(MAJOR_IN_MKDEV)
13654#include <sys/mkdev.h>
13655#elif defined(MAJOR_IN_SYSMACROS)
13656#include <sys/sysmacros.h>
13657#else
13658#include <sys/types.h>
13659#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013660
Barry Warsawfe33b792003-01-07 22:42:49 +000013661#ifdef F77_DUMMY_MAIN
13662# ifdef __cplusplus
13663 extern "C"
13664# endif
13665 int F77_DUMMY_MAIN() { return 1; }
13666#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013667int
13668main ()
13669{
13670
13671 makedev(major(0),minor(0));
13672
13673 ;
13674 return 0;
13675}
13676_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000013677rm -f conftest.$ac_objext conftest$ac_exeext
13678if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13679 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013680 ac_status=$?
13681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13682 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000013683 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13685 (eval $ac_try) 2>&5
13686 ac_status=$?
13687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13688 (exit $ac_status); }; }; then
13689
13690
13691cat >>confdefs.h <<\_ACEOF
13692#define HAVE_DEVICE_MACROS 1
13693_ACEOF
13694
13695 echo "$as_me:$LINENO: result: yes" >&5
13696echo "${ECHO_T}yes" >&6
13697
13698else
13699 echo "$as_me: failed program was:" >&5
13700cat conftest.$ac_ext >&5
13701
13702 echo "$as_me:$LINENO: result: no" >&5
13703echo "${ECHO_T}no" >&6
13704
13705fi
Martin v. Löwise3271202002-11-07 07:42:30 +000013706rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013707
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013708# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013709# for [no]getaddrinfo in netdb.h.
13710echo "$as_me:$LINENO: checking for getaddrinfo" >&5
13711echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
13712cat >conftest.$ac_ext <<_ACEOF
13713#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013714#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013715
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013716#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013717#include <sys/socket.h>
13718#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013719#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013720
Barry Warsawfe33b792003-01-07 22:42:49 +000013721#ifdef F77_DUMMY_MAIN
13722# ifdef __cplusplus
13723 extern "C"
13724# endif
13725 int F77_DUMMY_MAIN() { return 1; }
13726#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013727int
13728main ()
13729{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013730
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013731getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013732
Martin v. Löwis11437992002-04-12 09:54:03 +000013733 ;
13734 return 0;
13735}
13736_ACEOF
13737rm -f conftest.$ac_objext conftest$ac_exeext
13738if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13739 (eval $ac_link) 2>&5
13740 ac_status=$?
13741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13742 (exit $ac_status); } &&
13743 { ac_try='test -s conftest$ac_exeext'
13744 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13745 (eval $ac_try) 2>&5
13746 ac_status=$?
13747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13748 (exit $ac_status); }; }; then
13749
13750echo "$as_me:$LINENO: result: yes" >&5
13751echo "${ECHO_T}yes" >&6
13752echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
13753echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013754if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013755 echo "$as_me:$LINENO: result: buggy" >&5
13756echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013757buggygetaddrinfo=yes
13758else
Martin v. Löwis11437992002-04-12 09:54:03 +000013759 cat >conftest.$ac_ext <<_ACEOF
13760#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013761#include "confdefs.h"
13762
13763#include <sys/types.h>
13764#include <netdb.h>
13765#include <string.h>
13766#include <sys/socket.h>
13767#include <netinet/in.h>
13768
13769main()
13770{
13771 int passive, gaierr, inet4 = 0, inet6 = 0;
13772 struct addrinfo hints, *ai, *aitop;
13773 char straddr[INET6_ADDRSTRLEN], strport[16];
13774
13775 for (passive = 0; passive <= 1; passive++) {
13776 memset(&hints, 0, sizeof(hints));
13777 hints.ai_family = AF_UNSPEC;
13778 hints.ai_flags = passive ? AI_PASSIVE : 0;
13779 hints.ai_socktype = SOCK_STREAM;
13780 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13781 (void)gai_strerror(gaierr);
13782 goto bad;
13783 }
13784 for (ai = aitop; ai; ai = ai->ai_next) {
13785 if (ai->ai_addr == NULL ||
13786 ai->ai_addrlen == 0 ||
13787 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13788 straddr, sizeof(straddr), strport, sizeof(strport),
13789 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13790 goto bad;
13791 }
13792 switch (ai->ai_family) {
13793 case AF_INET:
13794 if (strcmp(strport, "54321") != 0) {
13795 goto bad;
13796 }
13797 if (passive) {
13798 if (strcmp(straddr, "0.0.0.0") != 0) {
13799 goto bad;
13800 }
13801 } else {
13802 if (strcmp(straddr, "127.0.0.1") != 0) {
13803 goto bad;
13804 }
13805 }
13806 inet4++;
13807 break;
13808 case AF_INET6:
13809 if (strcmp(strport, "54321") != 0) {
13810 goto bad;
13811 }
13812 if (passive) {
13813 if (strcmp(straddr, "::") != 0) {
13814 goto bad;
13815 }
13816 } else {
13817 if (strcmp(straddr, "::1") != 0) {
13818 goto bad;
13819 }
13820 }
13821 inet6++;
13822 break;
13823 case AF_UNSPEC:
13824 goto bad;
13825 break;
13826 default:
13827 /* another family support? */
13828 break;
13829 }
13830 }
13831 }
13832
13833 if (!(inet4 == 0 || inet4 == 2))
13834 goto bad;
13835 if (!(inet6 == 0 || inet6 == 2))
13836 goto bad;
13837
13838 if (aitop)
13839 freeaddrinfo(aitop);
13840 exit(0);
13841
13842 bad:
13843 if (aitop)
13844 freeaddrinfo(aitop);
13845 exit(1);
13846}
13847
Martin v. Löwis11437992002-04-12 09:54:03 +000013848_ACEOF
13849rm -f conftest$ac_exeext
13850if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13851 (eval $ac_link) 2>&5
13852 ac_status=$?
13853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13854 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13855 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13856 (eval $ac_try) 2>&5
13857 ac_status=$?
13858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13859 (exit $ac_status); }; }; then
13860 echo "$as_me:$LINENO: result: good" >&5
13861echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013862buggygetaddrinfo=no
13863else
Martin v. Löwis11437992002-04-12 09:54:03 +000013864 echo "$as_me: program exited with status $ac_status" >&5
13865echo "$as_me: failed program was:" >&5
13866cat conftest.$ac_ext >&5
13867( exit $ac_status )
13868echo "$as_me:$LINENO: result: buggy" >&5
13869echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013870buggygetaddrinfo=yes
13871fi
Barry Warsawfe33b792003-01-07 22:42:49 +000013872rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013873fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013874else
Martin v. Löwis11437992002-04-12 09:54:03 +000013875 echo "$as_me: failed program was:" >&5
13876cat conftest.$ac_ext >&5
13877
13878echo "$as_me:$LINENO: result: no" >&5
13879echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013880buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013881
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013882fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013883rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013884
13885if test "$buggygetaddrinfo" = "yes"; then
13886 if test "$ipv6" = "yes"; then
13887 echo 'Fatal: You must get working getaddrinfo() function.'
13888 echo ' or you can specify "--disable-ipv6"'.
13889 exit 1
13890 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013891else
Martin v. Löwis11437992002-04-12 09:54:03 +000013892
13893cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013894#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013895_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013896
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013897fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013898
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013899for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013900do
Martin v. Löwis11437992002-04-12 09:54:03 +000013901as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13902echo "$as_me:$LINENO: checking for $ac_func" >&5
13903echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13904if eval "test \"\${$as_ac_var+set}\" = set"; then
13905 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013906else
Martin v. Löwis11437992002-04-12 09:54:03 +000013907 cat >conftest.$ac_ext <<_ACEOF
13908#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013909#include "confdefs.h"
13910/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013911 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013912#include <assert.h>
13913/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013914#ifdef __cplusplus
13915extern "C"
13916#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013917/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013918 builtin and then its argument prototype would still apply. */
13919char $ac_func ();
13920char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013921
Barry Warsawfe33b792003-01-07 22:42:49 +000013922#ifdef F77_DUMMY_MAIN
13923# ifdef __cplusplus
13924 extern "C"
13925# endif
13926 int F77_DUMMY_MAIN() { return 1; }
13927#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013928int
13929main ()
13930{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013931/* The GNU C library defines this for functions which it implements
13932 to always fail with ENOSYS. Some functions are actually named
13933 something starting with __ and the normal name is an alias. */
13934#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13935choke me
13936#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013937f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013938#endif
13939
Martin v. Löwis11437992002-04-12 09:54:03 +000013940 ;
13941 return 0;
13942}
13943_ACEOF
13944rm -f conftest.$ac_objext conftest$ac_exeext
13945if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13946 (eval $ac_link) 2>&5
13947 ac_status=$?
13948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13949 (exit $ac_status); } &&
13950 { ac_try='test -s conftest$ac_exeext'
13951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13952 (eval $ac_try) 2>&5
13953 ac_status=$?
13954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13955 (exit $ac_status); }; }; then
13956 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013957else
Martin v. Löwis11437992002-04-12 09:54:03 +000013958 echo "$as_me: failed program was:" >&5
13959cat conftest.$ac_ext >&5
13960eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013961fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013962rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013963fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013964echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13965echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13966if test `eval echo '${'$as_ac_var'}'` = yes; then
13967 cat >>confdefs.h <<_ACEOF
13968#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13969_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013970
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013971fi
13972done
13973
Michael W. Hudson54241132001-12-07 15:38:26 +000013974
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013975# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000013976echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
13977echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13978if test "${ac_cv_header_time+set}" = set; then
13979 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013980else
Martin v. Löwis11437992002-04-12 09:54:03 +000013981 cat >conftest.$ac_ext <<_ACEOF
13982#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013983#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013984#include <sys/types.h>
13985#include <sys/time.h>
13986#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013987
Barry Warsawfe33b792003-01-07 22:42:49 +000013988#ifdef F77_DUMMY_MAIN
13989# ifdef __cplusplus
13990 extern "C"
13991# endif
13992 int F77_DUMMY_MAIN() { return 1; }
13993#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013994int
13995main ()
13996{
13997if ((struct tm *) 0)
13998return 0;
13999 ;
14000 return 0;
14001}
14002_ACEOF
14003rm -f conftest.$ac_objext
14004if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14005 (eval $ac_compile) 2>&5
14006 ac_status=$?
14007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14008 (exit $ac_status); } &&
14009 { ac_try='test -s conftest.$ac_objext'
14010 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14011 (eval $ac_try) 2>&5
14012 ac_status=$?
14013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14014 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014015 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014016else
Martin v. Löwis11437992002-04-12 09:54:03 +000014017 echo "$as_me: failed program was:" >&5
14018cat conftest.$ac_ext >&5
14019ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014020fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014021rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014022fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014023echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
14024echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014025if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014026
14027cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014028#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014029_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014030
14031fi
14032
Martin v. Löwis11437992002-04-12 09:54:03 +000014033echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
14034echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
14035if test "${ac_cv_struct_tm+set}" = set; then
14036 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014037else
Martin v. Löwis11437992002-04-12 09:54:03 +000014038 cat >conftest.$ac_ext <<_ACEOF
14039#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014040#include "confdefs.h"
14041#include <sys/types.h>
14042#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014043
Barry Warsawfe33b792003-01-07 22:42:49 +000014044#ifdef F77_DUMMY_MAIN
14045# ifdef __cplusplus
14046 extern "C"
14047# endif
14048 int F77_DUMMY_MAIN() { return 1; }
14049#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014050int
14051main ()
14052{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014053struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000014054 ;
14055 return 0;
14056}
14057_ACEOF
14058rm -f conftest.$ac_objext
14059if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14060 (eval $ac_compile) 2>&5
14061 ac_status=$?
14062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14063 (exit $ac_status); } &&
14064 { ac_try='test -s conftest.$ac_objext'
14065 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14066 (eval $ac_try) 2>&5
14067 ac_status=$?
14068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14069 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014070 ac_cv_struct_tm=time.h
14071else
Martin v. Löwis11437992002-04-12 09:54:03 +000014072 echo "$as_me: failed program was:" >&5
14073cat conftest.$ac_ext >&5
14074ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014075fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014076rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014077fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014078echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
14079echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014080if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014081
14082cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014083#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014084_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014085
14086fi
14087
Martin v. Löwis11437992002-04-12 09:54:03 +000014088echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
14089echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
14090if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
14091 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014092else
Martin v. Löwis11437992002-04-12 09:54:03 +000014093 cat >conftest.$ac_ext <<_ACEOF
14094#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014095#include "confdefs.h"
14096#include <sys/types.h>
14097#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000014098
14099
Barry Warsawfe33b792003-01-07 22:42:49 +000014100#ifdef F77_DUMMY_MAIN
14101# ifdef __cplusplus
14102 extern "C"
14103# endif
14104 int F77_DUMMY_MAIN() { return 1; }
14105#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014106int
14107main ()
14108{
14109static struct tm ac_aggr;
14110if (ac_aggr.tm_zone)
14111return 0;
14112 ;
14113 return 0;
14114}
14115_ACEOF
14116rm -f conftest.$ac_objext
14117if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14118 (eval $ac_compile) 2>&5
14119 ac_status=$?
14120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14121 (exit $ac_status); } &&
14122 { ac_try='test -s conftest.$ac_objext'
14123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14124 (eval $ac_try) 2>&5
14125 ac_status=$?
14126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14127 (exit $ac_status); }; }; then
14128 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014129else
Martin v. Löwis11437992002-04-12 09:54:03 +000014130 echo "$as_me: failed program was:" >&5
14131cat conftest.$ac_ext >&5
14132ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014133fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014134rm -f conftest.$ac_objext conftest.$ac_ext
14135fi
14136echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
14137echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
14138if test $ac_cv_member_struct_tm_tm_zone = yes; then
14139
14140cat >>confdefs.h <<_ACEOF
14141#define HAVE_STRUCT_TM_TM_ZONE 1
14142_ACEOF
14143
14144
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014145fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014146
Martin v. Löwis11437992002-04-12 09:54:03 +000014147if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14148
14149cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014150#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014151_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014152
14153else
Martin v. Löwis11437992002-04-12 09:54:03 +000014154 echo "$as_me:$LINENO: checking for tzname" >&5
14155echo $ECHO_N "checking for tzname... $ECHO_C" >&6
14156if test "${ac_cv_var_tzname+set}" = set; then
14157 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014158else
Martin v. Löwis11437992002-04-12 09:54:03 +000014159 cat >conftest.$ac_ext <<_ACEOF
14160#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014161#include "confdefs.h"
14162#include <time.h>
14163#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014164extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014165#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014166
Barry Warsawfe33b792003-01-07 22:42:49 +000014167#ifdef F77_DUMMY_MAIN
14168# ifdef __cplusplus
14169 extern "C"
14170# endif
14171 int F77_DUMMY_MAIN() { return 1; }
14172#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014173int
14174main ()
14175{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014176atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000014177 ;
14178 return 0;
14179}
14180_ACEOF
14181rm -f conftest.$ac_objext conftest$ac_exeext
14182if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14183 (eval $ac_link) 2>&5
14184 ac_status=$?
14185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14186 (exit $ac_status); } &&
14187 { ac_try='test -s conftest$ac_exeext'
14188 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14189 (eval $ac_try) 2>&5
14190 ac_status=$?
14191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14192 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014193 ac_cv_var_tzname=yes
14194else
Martin v. Löwis11437992002-04-12 09:54:03 +000014195 echo "$as_me: failed program was:" >&5
14196cat conftest.$ac_ext >&5
14197ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014198fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014199rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000014200fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014201echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
14202echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014203 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014204
14205cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014206#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014207_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014208
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014209 fi
14210fi
14211
Martin v. Löwis11437992002-04-12 09:54:03 +000014212echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
14213echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
14214if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
14215 echo $ECHO_N "(cached) $ECHO_C" >&6
14216else
14217 cat >conftest.$ac_ext <<_ACEOF
14218#line $LINENO "configure"
14219#include "confdefs.h"
14220$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014221#ifdef F77_DUMMY_MAIN
14222# ifdef __cplusplus
14223 extern "C"
14224# endif
14225 int F77_DUMMY_MAIN() { return 1; }
14226#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014227int
14228main ()
14229{
14230static struct stat ac_aggr;
14231if (ac_aggr.st_rdev)
14232return 0;
14233 ;
14234 return 0;
14235}
14236_ACEOF
14237rm -f conftest.$ac_objext
14238if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14239 (eval $ac_compile) 2>&5
14240 ac_status=$?
14241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14242 (exit $ac_status); } &&
14243 { ac_try='test -s conftest.$ac_objext'
14244 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14245 (eval $ac_try) 2>&5
14246 ac_status=$?
14247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14248 (exit $ac_status); }; }; then
14249 ac_cv_member_struct_stat_st_rdev=yes
14250else
14251 echo "$as_me: failed program was:" >&5
14252cat conftest.$ac_ext >&5
14253ac_cv_member_struct_stat_st_rdev=no
14254fi
14255rm -f conftest.$ac_objext conftest.$ac_ext
14256fi
14257echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
14258echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
14259if test $ac_cv_member_struct_stat_st_rdev = yes; then
14260
14261cat >>confdefs.h <<_ACEOF
14262#define HAVE_STRUCT_STAT_ST_RDEV 1
14263_ACEOF
14264
14265
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014266fi
14267
Martin v. Löwis11437992002-04-12 09:54:03 +000014268echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
14269echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
14270if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
14271 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014272else
Martin v. Löwis11437992002-04-12 09:54:03 +000014273 cat >conftest.$ac_ext <<_ACEOF
14274#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014275#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014276$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014277#ifdef F77_DUMMY_MAIN
14278# ifdef __cplusplus
14279 extern "C"
14280# endif
14281 int F77_DUMMY_MAIN() { return 1; }
14282#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014283int
14284main ()
14285{
14286static struct stat ac_aggr;
14287if (ac_aggr.st_blksize)
14288return 0;
14289 ;
14290 return 0;
14291}
14292_ACEOF
14293rm -f conftest.$ac_objext
14294if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14295 (eval $ac_compile) 2>&5
14296 ac_status=$?
14297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14298 (exit $ac_status); } &&
14299 { ac_try='test -s conftest.$ac_objext'
14300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14301 (eval $ac_try) 2>&5
14302 ac_status=$?
14303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14304 (exit $ac_status); }; }; then
14305 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014306else
Martin v. Löwis11437992002-04-12 09:54:03 +000014307 echo "$as_me: failed program was:" >&5
14308cat conftest.$ac_ext >&5
14309ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014310fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014311rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014312fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014313echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
14314echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
14315if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014316
Martin v. Löwis11437992002-04-12 09:54:03 +000014317cat >>confdefs.h <<_ACEOF
14318#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
14319_ACEOF
14320
14321
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014322fi
14323
Martin v. Löwis11437992002-04-12 09:54:03 +000014324echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
14325echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
14326if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
14327 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014328else
Martin v. Löwis11437992002-04-12 09:54:03 +000014329 cat >conftest.$ac_ext <<_ACEOF
14330#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014331#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014332$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014333#ifdef F77_DUMMY_MAIN
14334# ifdef __cplusplus
14335 extern "C"
14336# endif
14337 int F77_DUMMY_MAIN() { return 1; }
14338#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014339int
14340main ()
14341{
14342static struct stat ac_aggr;
14343if (ac_aggr.st_blocks)
14344return 0;
14345 ;
14346 return 0;
14347}
14348_ACEOF
14349rm -f conftest.$ac_objext
14350if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14351 (eval $ac_compile) 2>&5
14352 ac_status=$?
14353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14354 (exit $ac_status); } &&
14355 { ac_try='test -s conftest.$ac_objext'
14356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14357 (eval $ac_try) 2>&5
14358 ac_status=$?
14359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14360 (exit $ac_status); }; }; then
14361 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014362else
Martin v. Löwis11437992002-04-12 09:54:03 +000014363 echo "$as_me: failed program was:" >&5
14364cat conftest.$ac_ext >&5
14365ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014366fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014367rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014368fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014369echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
14370echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
14371if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014372
Martin v. Löwis11437992002-04-12 09:54:03 +000014373cat >>confdefs.h <<_ACEOF
14374#define HAVE_STRUCT_STAT_ST_BLOCKS 1
14375_ACEOF
14376
14377
14378cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014379#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014380_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014381
14382else
Martin v. Löwis11437992002-04-12 09:54:03 +000014383 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014384fi
14385
Michael W. Hudson54241132001-12-07 15:38:26 +000014386
Martin v. Löwis11437992002-04-12 09:54:03 +000014387
14388echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
14389echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
14390if test "${ac_cv_header_time_altzone+set}" = set; then
14391 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014392else
Martin v. Löwis11437992002-04-12 09:54:03 +000014393 cat >conftest.$ac_ext <<_ACEOF
14394#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014395#include "confdefs.h"
14396#include <time.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014397#ifdef F77_DUMMY_MAIN
14398# ifdef __cplusplus
14399 extern "C"
14400# endif
14401 int F77_DUMMY_MAIN() { return 1; }
14402#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014403int
14404main ()
14405{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014406return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000014407 ;
14408 return 0;
14409}
14410_ACEOF
14411rm -f conftest.$ac_objext
14412if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14413 (eval $ac_compile) 2>&5
14414 ac_status=$?
14415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14416 (exit $ac_status); } &&
14417 { ac_try='test -s conftest.$ac_objext'
14418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14419 (eval $ac_try) 2>&5
14420 ac_status=$?
14421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14422 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014423 ac_cv_header_time_altzone=yes
14424else
Martin v. Löwis11437992002-04-12 09:54:03 +000014425 echo "$as_me: failed program was:" >&5
14426cat conftest.$ac_ext >&5
14427ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000014428fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014429rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014430fi
14431
Martin v. Löwis11437992002-04-12 09:54:03 +000014432echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
14433echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014434if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014435
14436cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014437#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014438_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014439
14440fi
14441
Guido van Rossumda88dad1995-01-26 00:46:29 +000014442was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014443echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
14444echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
14445cat >conftest.$ac_ext <<_ACEOF
14446#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014447#include "confdefs.h"
14448
14449#include <sys/types.h>
14450#include <sys/select.h>
14451#include <sys/time.h>
14452
Barry Warsawfe33b792003-01-07 22:42:49 +000014453#ifdef F77_DUMMY_MAIN
14454# ifdef __cplusplus
14455 extern "C"
14456# endif
14457 int F77_DUMMY_MAIN() { return 1; }
14458#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014459int
14460main ()
14461{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014462;
Martin v. Löwis11437992002-04-12 09:54:03 +000014463 ;
14464 return 0;
14465}
14466_ACEOF
14467rm -f conftest.$ac_objext
14468if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14469 (eval $ac_compile) 2>&5
14470 ac_status=$?
14471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14472 (exit $ac_status); } &&
14473 { ac_try='test -s conftest.$ac_objext'
14474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14475 (eval $ac_try) 2>&5
14476 ac_status=$?
14477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14478 (exit $ac_status); }; }; then
14479
14480
14481cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014482#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014483_ACEOF
14484
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014485 was_it_defined=yes
14486
Guido van Rossumf78abae1997-01-21 22:02:36 +000014487else
Martin v. Löwis11437992002-04-12 09:54:03 +000014488 echo "$as_me: failed program was:" >&5
14489cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014490fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014491rm -f conftest.$ac_objext conftest.$ac_ext
14492echo "$as_me:$LINENO: result: $was_it_defined" >&5
14493echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000014494
Martin v. Löwis11437992002-04-12 09:54:03 +000014495echo "$as_me:$LINENO: checking for addrinfo" >&5
14496echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
14497if test "${ac_cv_struct_addrinfo+set}" = set; then
14498 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014499else
Martin v. Löwis11437992002-04-12 09:54:03 +000014500 cat >conftest.$ac_ext <<_ACEOF
14501#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014502#include "confdefs.h"
14503
14504# include <netdb.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014505#ifdef F77_DUMMY_MAIN
14506# ifdef __cplusplus
14507 extern "C"
14508# endif
14509 int F77_DUMMY_MAIN() { return 1; }
14510#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014511int
14512main ()
14513{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014514struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000014515 ;
14516 return 0;
14517}
14518_ACEOF
14519rm -f conftest.$ac_objext
14520if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14521 (eval $ac_compile) 2>&5
14522 ac_status=$?
14523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14524 (exit $ac_status); } &&
14525 { ac_try='test -s conftest.$ac_objext'
14526 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14527 (eval $ac_try) 2>&5
14528 ac_status=$?
14529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14530 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014531 ac_cv_struct_addrinfo=yes
14532else
Martin v. Löwis11437992002-04-12 09:54:03 +000014533 echo "$as_me: failed program was:" >&5
14534cat conftest.$ac_ext >&5
14535ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014536fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014537rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014538fi
14539
Martin v. Löwis11437992002-04-12 09:54:03 +000014540echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
14541echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014542if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014543
14544cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014545#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014546_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014547
14548fi
14549
Martin v. Löwis11437992002-04-12 09:54:03 +000014550echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
14551echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
14552if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
14553 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014554else
Martin v. Löwis11437992002-04-12 09:54:03 +000014555 cat >conftest.$ac_ext <<_ACEOF
14556#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014557#include "confdefs.h"
14558
14559# include <sys/types.h>
14560# include <sys/socket.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014561#ifdef F77_DUMMY_MAIN
14562# ifdef __cplusplus
14563 extern "C"
14564# endif
14565 int F77_DUMMY_MAIN() { return 1; }
14566#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014567int
14568main ()
14569{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014570struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000014571 ;
14572 return 0;
14573}
14574_ACEOF
14575rm -f conftest.$ac_objext
14576if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14577 (eval $ac_compile) 2>&5
14578 ac_status=$?
14579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14580 (exit $ac_status); } &&
14581 { ac_try='test -s conftest.$ac_objext'
14582 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14583 (eval $ac_try) 2>&5
14584 ac_status=$?
14585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14586 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014587 ac_cv_struct_sockaddr_storage=yes
14588else
Martin v. Löwis11437992002-04-12 09:54:03 +000014589 echo "$as_me: failed program was:" >&5
14590cat conftest.$ac_ext >&5
14591ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014592fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014593rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014594fi
14595
Martin v. Löwis11437992002-04-12 09:54:03 +000014596echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
14597echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014598if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014599
14600cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014601#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014602_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014603
14604fi
14605
Guido van Rossum627b2d71993-12-24 10:39:16 +000014606# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000014607
Michael W. Hudson54241132001-12-07 15:38:26 +000014608
Martin v. Löwis11437992002-04-12 09:54:03 +000014609echo "$as_me:$LINENO: checking whether char is unsigned" >&5
14610echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
14611if test "${ac_cv_c_char_unsigned+set}" = set; then
14612 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000014613else
Martin v. Löwis11437992002-04-12 09:54:03 +000014614 cat >conftest.$ac_ext <<_ACEOF
14615#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000014616#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014617$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014618#ifdef F77_DUMMY_MAIN
14619# ifdef __cplusplus
14620 extern "C"
14621# endif
14622 int F77_DUMMY_MAIN() { return 1; }
14623#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014624int
14625main ()
14626{
14627static int test_array [1 - 2 * !(((char) -1) < 0)];
14628test_array [0] = 0
14629
14630 ;
14631 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000014632}
Martin v. Löwis11437992002-04-12 09:54:03 +000014633_ACEOF
14634rm -f conftest.$ac_objext
14635if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14636 (eval $ac_compile) 2>&5
14637 ac_status=$?
14638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14639 (exit $ac_status); } &&
14640 { ac_try='test -s conftest.$ac_objext'
14641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14642 (eval $ac_try) 2>&5
14643 ac_status=$?
14644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14645 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000014646 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014647else
14648 echo "$as_me: failed program was:" >&5
14649cat conftest.$ac_ext >&5
14650ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014651fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014652rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014653fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014654echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
14655echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014656if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014657 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014658#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014659_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014660
14661fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000014662
Barry Warsawfe33b792003-01-07 22:42:49 +000014663echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
14664echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
14665if test "${ac_cv_prog_cc_stdc+set}" = set; then
14666 echo $ECHO_N "(cached) $ECHO_C" >&6
14667else
14668 ac_cv_prog_cc_stdc=no
14669ac_save_CC=$CC
14670cat >conftest.$ac_ext <<_ACEOF
14671#line $LINENO "configure"
14672#include "confdefs.h"
14673#include <stdarg.h>
14674#include <stdio.h>
14675#include <sys/types.h>
14676#include <sys/stat.h>
14677/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
14678struct buf { int x; };
14679FILE * (*rcsopen) (struct buf *, struct stat *, int);
14680static char *e (p, i)
14681 char **p;
14682 int i;
14683{
14684 return p[i];
14685}
14686static char *f (char * (*g) (char **, int), char **p, ...)
14687{
14688 char *s;
14689 va_list v;
14690 va_start (v,p);
14691 s = g (p, va_arg (v,int));
14692 va_end (v);
14693 return s;
14694}
14695int test (int i, double x);
14696struct s1 {int (*f) (int a);};
14697struct s2 {int (*f) (double a);};
14698int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
14699int argc;
14700char **argv;
14701#ifdef F77_DUMMY_MAIN
14702# ifdef __cplusplus
14703 extern "C"
14704# endif
14705 int F77_DUMMY_MAIN() { return 1; }
14706#endif
14707int
14708main ()
14709{
14710return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
14711 ;
14712 return 0;
14713}
14714_ACEOF
14715# Don't try gcc -ansi; that turns off useful extensions and
14716# breaks some systems' header files.
14717# AIX -qlanglvl=ansi
14718# Ultrix and OSF/1 -std1
14719# HP-UX 10.20 and later -Ae
14720# HP-UX older versions -Aa -D_HPUX_SOURCE
14721# SVR4 -Xc -D__EXTENSIONS__
14722for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
14723do
14724 CC="$ac_save_CC $ac_arg"
14725 rm -f conftest.$ac_objext
14726if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14727 (eval $ac_compile) 2>&5
14728 ac_status=$?
14729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14730 (exit $ac_status); } &&
14731 { ac_try='test -s conftest.$ac_objext'
14732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14733 (eval $ac_try) 2>&5
14734 ac_status=$?
14735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14736 (exit $ac_status); }; }; then
14737 ac_cv_prog_cc_stdc=$ac_arg
14738break
14739else
14740 echo "$as_me: failed program was:" >&5
14741cat conftest.$ac_ext >&5
14742fi
14743rm -f conftest.$ac_objext
14744done
14745rm -f conftest.$ac_ext conftest.$ac_objext
14746CC=$ac_save_CC
14747
14748fi
14749
14750case "x$ac_cv_prog_cc_stdc" in
14751 x|xno)
14752 echo "$as_me:$LINENO: result: none needed" >&5
14753echo "${ECHO_T}none needed" >&6 ;;
14754 *)
14755 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
14756echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
14757 CC="$CC $ac_cv_prog_cc_stdc" ;;
14758esac
14759
Martin v. Löwis11437992002-04-12 09:54:03 +000014760echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
14761echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14762if test "${ac_cv_c_const+set}" = set; then
14763 echo $ECHO_N "(cached) $ECHO_C" >&6
14764else
14765 cat >conftest.$ac_ext <<_ACEOF
14766#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014767#include "confdefs.h"
14768
Barry Warsawfe33b792003-01-07 22:42:49 +000014769#ifdef F77_DUMMY_MAIN
14770# ifdef __cplusplus
14771 extern "C"
14772# endif
14773 int F77_DUMMY_MAIN() { return 1; }
14774#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014775int
14776main ()
14777{
14778/* FIXME: Include the comments suggested by Paul. */
14779#ifndef __cplusplus
14780 /* Ultrix mips cc rejects this. */
14781 typedef int charset[2];
14782 const charset x;
14783 /* SunOS 4.1.1 cc rejects this. */
14784 char const *const *ccp;
14785 char **p;
14786 /* NEC SVR4.0.2 mips cc rejects this. */
14787 struct point {int x, y;};
14788 static struct point const zero = {0,0};
14789 /* AIX XL C 1.02.0.0 rejects this.
14790 It does not let you subtract one const X* pointer from another in
14791 an arm of an if-expression whose if-part is not a constant
14792 expression */
14793 const char *g = "string";
14794 ccp = &g + (g ? g-g : 0);
14795 /* HPUX 7.0 cc rejects these. */
14796 ++ccp;
14797 p = (char**) ccp;
14798 ccp = (char const *const *) p;
14799 { /* SCO 3.2v4 cc rejects this. */
14800 char *t;
14801 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014802
Martin v. Löwis11437992002-04-12 09:54:03 +000014803 *t++ = 0;
14804 }
14805 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
14806 int x[] = {25, 17};
14807 const int *foo = &x[0];
14808 ++foo;
14809 }
14810 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14811 typedef const int *iptr;
14812 iptr p = 0;
14813 ++p;
14814 }
14815 { /* AIX XL C 1.02.0.0 rejects this saying
14816 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14817 struct s { int j; const int *ap[3]; };
14818 struct s *b; b->j = 5;
14819 }
14820 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14821 const int foo = 10;
14822 }
14823#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000014824
Martin v. Löwis11437992002-04-12 09:54:03 +000014825 ;
14826 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000014827}
Martin v. Löwis11437992002-04-12 09:54:03 +000014828_ACEOF
14829rm -f conftest.$ac_objext
14830if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14831 (eval $ac_compile) 2>&5
14832 ac_status=$?
14833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14834 (exit $ac_status); } &&
14835 { ac_try='test -s conftest.$ac_objext'
14836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14837 (eval $ac_try) 2>&5
14838 ac_status=$?
14839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14840 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014841 ac_cv_c_const=yes
14842else
Martin v. Löwis11437992002-04-12 09:54:03 +000014843 echo "$as_me: failed program was:" >&5
14844cat conftest.$ac_ext >&5
14845ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014846fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014847rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014848fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014849echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
14850echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014851if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014852
14853cat >>confdefs.h <<\_ACEOF
14854#define const
14855_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014856
14857fi
14858
Michael W. Hudson54241132001-12-07 15:38:26 +000014859
Guido van Rossumda88dad1995-01-26 00:46:29 +000014860works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014861echo "$as_me:$LINENO: checking for working volatile" >&5
14862echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
14863cat >conftest.$ac_ext <<_ACEOF
14864#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014865#include "confdefs.h"
14866
Barry Warsawfe33b792003-01-07 22:42:49 +000014867#ifdef F77_DUMMY_MAIN
14868# ifdef __cplusplus
14869 extern "C"
14870# endif
14871 int F77_DUMMY_MAIN() { return 1; }
14872#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014873int
14874main ()
14875{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014876volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014877 ;
14878 return 0;
14879}
14880_ACEOF
14881rm -f conftest.$ac_objext
14882if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14883 (eval $ac_compile) 2>&5
14884 ac_status=$?
14885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14886 (exit $ac_status); } &&
14887 { ac_try='test -s conftest.$ac_objext'
14888 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14889 (eval $ac_try) 2>&5
14890 ac_status=$?
14891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14892 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014893 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014894else
Martin v. Löwis11437992002-04-12 09:54:03 +000014895 echo "$as_me: failed program was:" >&5
14896cat conftest.$ac_ext >&5
14897
14898cat >>confdefs.h <<\_ACEOF
14899#define volatile
14900_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014901
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014902
Guido van Rossum627b2d71993-12-24 10:39:16 +000014903fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014904rm -f conftest.$ac_objext conftest.$ac_ext
14905echo "$as_me:$LINENO: result: $works" >&5
14906echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014907
Guido van Rossumda88dad1995-01-26 00:46:29 +000014908works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014909echo "$as_me:$LINENO: checking for working signed char" >&5
14910echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
14911cat >conftest.$ac_ext <<_ACEOF
14912#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014913#include "confdefs.h"
14914
Barry Warsawfe33b792003-01-07 22:42:49 +000014915#ifdef F77_DUMMY_MAIN
14916# ifdef __cplusplus
14917 extern "C"
14918# endif
14919 int F77_DUMMY_MAIN() { return 1; }
14920#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014921int
14922main ()
14923{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014924signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000014925 ;
14926 return 0;
14927}
14928_ACEOF
14929rm -f conftest.$ac_objext
14930if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14931 (eval $ac_compile) 2>&5
14932 ac_status=$?
14933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14934 (exit $ac_status); } &&
14935 { ac_try='test -s conftest.$ac_objext'
14936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14937 (eval $ac_try) 2>&5
14938 ac_status=$?
14939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14940 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014941 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014942else
Martin v. Löwis11437992002-04-12 09:54:03 +000014943 echo "$as_me: failed program was:" >&5
14944cat conftest.$ac_ext >&5
14945
14946cat >>confdefs.h <<\_ACEOF
14947#define signed
14948_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000014949
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014950
Guido van Rossum7f43da71994-08-01 12:15:30 +000014951fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014952rm -f conftest.$ac_objext conftest.$ac_ext
14953echo "$as_me:$LINENO: result: $works" >&5
14954echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014955
Guido van Rossumda88dad1995-01-26 00:46:29 +000014956have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014957echo "$as_me:$LINENO: checking for prototypes" >&5
14958echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
14959cat >conftest.$ac_ext <<_ACEOF
14960#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014961#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014962int foo(int x) { return 0; }
Barry Warsawfe33b792003-01-07 22:42:49 +000014963#ifdef F77_DUMMY_MAIN
14964# ifdef __cplusplus
14965 extern "C"
14966# endif
14967 int F77_DUMMY_MAIN() { return 1; }
14968#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014969int
14970main ()
14971{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014972return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000014973 ;
14974 return 0;
14975}
14976_ACEOF
14977rm -f conftest.$ac_objext
14978if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14979 (eval $ac_compile) 2>&5
14980 ac_status=$?
14981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14982 (exit $ac_status); } &&
14983 { ac_try='test -s conftest.$ac_objext'
14984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14985 (eval $ac_try) 2>&5
14986 ac_status=$?
14987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14988 (exit $ac_status); }; }; then
14989
14990
14991cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014992#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014993_ACEOF
14994
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014995 have_prototypes=yes
14996
Guido van Rossumf78abae1997-01-21 22:02:36 +000014997else
Martin v. Löwis11437992002-04-12 09:54:03 +000014998 echo "$as_me: failed program was:" >&5
14999cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000015000fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015001rm -f conftest.$ac_objext conftest.$ac_ext
15002echo "$as_me:$LINENO: result: $have_prototypes" >&5
15003echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015004
Guido van Rossumda88dad1995-01-26 00:46:29 +000015005works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015006echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
15007echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
15008cat >conftest.$ac_ext <<_ACEOF
15009#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015010#include "confdefs.h"
15011
15012#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000015013int foo(int x, ...) {
15014 va_list va;
15015 va_start(va, x);
15016 va_arg(va, int);
15017 va_arg(va, char *);
15018 va_arg(va, double);
15019 return 0;
15020}
Guido van Rossum7f43da71994-08-01 12:15:30 +000015021
Barry Warsawfe33b792003-01-07 22:42:49 +000015022#ifdef F77_DUMMY_MAIN
15023# ifdef __cplusplus
15024 extern "C"
15025# endif
15026 int F77_DUMMY_MAIN() { return 1; }
15027#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015028int
15029main ()
15030{
Guido van Rossum90eea071996-08-30 20:58:57 +000015031return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000015032 ;
15033 return 0;
15034}
15035_ACEOF
15036rm -f conftest.$ac_objext
15037if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15038 (eval $ac_compile) 2>&5
15039 ac_status=$?
15040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15041 (exit $ac_status); } &&
15042 { ac_try='test -s conftest.$ac_objext'
15043 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15044 (eval $ac_try) 2>&5
15045 ac_status=$?
15046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15047 (exit $ac_status); }; }; then
15048
15049
15050cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015051#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015052_ACEOF
15053
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015054 works=yes
15055
Guido van Rossumf78abae1997-01-21 22:02:36 +000015056else
Martin v. Löwis11437992002-04-12 09:54:03 +000015057 echo "$as_me: failed program was:" >&5
15058cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000015059fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015060rm -f conftest.$ac_objext conftest.$ac_ext
15061echo "$as_me:$LINENO: result: $works" >&5
15062echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015063
Guido van Rossumda88dad1995-01-26 00:46:29 +000015064if test "$have_prototypes" = yes; then
15065bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015066echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
15067echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
15068cat >conftest.$ac_ext <<_ACEOF
15069#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015070#include "confdefs.h"
15071#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000015072#ifdef F77_DUMMY_MAIN
15073# ifdef __cplusplus
15074 extern "C"
15075# endif
15076 int F77_DUMMY_MAIN() { return 1; }
15077#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015078int
15079main ()
15080{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015081char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000015082 ;
15083 return 0;
15084}
15085_ACEOF
15086rm -f conftest.$ac_objext
15087if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15088 (eval $ac_compile) 2>&5
15089 ac_status=$?
15090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15091 (exit $ac_status); } &&
15092 { ac_try='test -s conftest.$ac_objext'
15093 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15094 (eval $ac_try) 2>&5
15095 ac_status=$?
15096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15097 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000015098 :
15099else
Martin v. Löwis11437992002-04-12 09:54:03 +000015100 echo "$as_me: failed program was:" >&5
15101cat conftest.$ac_ext >&5
15102
15103cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015104#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015105_ACEOF
15106
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015107 bad_prototypes=yes
15108
Guido van Rossum627b2d71993-12-24 10:39:16 +000015109fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015110rm -f conftest.$ac_objext conftest.$ac_ext
15111echo "$as_me:$LINENO: result: $bad_prototypes" >&5
15112echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015113fi
15114
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015115# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000015116echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
15117echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
15118cat >conftest.$ac_ext <<_ACEOF
15119#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015120#include "confdefs.h"
15121#include <sys/types.h>
15122#include <sys/socket.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000015123#ifdef F77_DUMMY_MAIN
15124# ifdef __cplusplus
15125 extern "C"
15126# endif
15127 int F77_DUMMY_MAIN() { return 1; }
15128#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015129int
15130main ()
15131{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015132struct sockaddr x;
15133x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015134 ;
15135 return 0;
15136}
15137_ACEOF
15138rm -f conftest.$ac_objext
15139if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15140 (eval $ac_compile) 2>&5
15141 ac_status=$?
15142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15143 (exit $ac_status); } &&
15144 { ac_try='test -s conftest.$ac_objext'
15145 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15146 (eval $ac_try) 2>&5
15147 ac_status=$?
15148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15149 (exit $ac_status); }; }; then
15150 echo "$as_me:$LINENO: result: yes" >&5
15151echo "${ECHO_T}yes" >&6
15152
15153cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015154#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015155_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015156
15157else
Martin v. Löwis11437992002-04-12 09:54:03 +000015158 echo "$as_me: failed program was:" >&5
15159cat conftest.$ac_ext >&5
15160echo "$as_me:$LINENO: result: no" >&5
15161echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015162fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015163rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015164
Guido van Rossumda88dad1995-01-26 00:46:29 +000015165va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015166echo "$as_me:$LINENO: checking whether va_list is an array" >&5
15167echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
15168cat >conftest.$ac_ext <<_ACEOF
15169#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015170#include "confdefs.h"
15171
15172#ifdef HAVE_STDARG_PROTOTYPES
15173#include <stdarg.h>
15174#else
15175#include <varargs.h>
15176#endif
15177
Barry Warsawfe33b792003-01-07 22:42:49 +000015178#ifdef F77_DUMMY_MAIN
15179# ifdef __cplusplus
15180 extern "C"
15181# endif
15182 int F77_DUMMY_MAIN() { return 1; }
15183#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015184int
15185main ()
15186{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015187va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000015188 ;
15189 return 0;
15190}
15191_ACEOF
15192rm -f conftest.$ac_objext
15193if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15194 (eval $ac_compile) 2>&5
15195 ac_status=$?
15196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15197 (exit $ac_status); } &&
15198 { ac_try='test -s conftest.$ac_objext'
15199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15200 (eval $ac_try) 2>&5
15201 ac_status=$?
15202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15203 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015204 :
15205else
Martin v. Löwis11437992002-04-12 09:54:03 +000015206 echo "$as_me: failed program was:" >&5
15207cat conftest.$ac_ext >&5
15208
15209
15210cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015211#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015212_ACEOF
15213
Guido van Rossumda88dad1995-01-26 00:46:29 +000015214 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015215
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015216fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015217rm -f conftest.$ac_objext conftest.$ac_ext
15218echo "$as_me:$LINENO: result: $va_list_is_array" >&5
15219echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015220
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015221# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000015222
15223
15224
15225echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
15226echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
15227if test "${ac_cv_func_gethostbyname_r+set}" = set; then
15228 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015229else
Martin v. Löwis11437992002-04-12 09:54:03 +000015230 cat >conftest.$ac_ext <<_ACEOF
15231#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015232#include "confdefs.h"
15233/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015234 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015235#include <assert.h>
15236/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015237#ifdef __cplusplus
15238extern "C"
15239#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015240/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015241 builtin and then its argument prototype would still apply. */
15242char gethostbyname_r ();
15243char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015244
Barry Warsawfe33b792003-01-07 22:42:49 +000015245#ifdef F77_DUMMY_MAIN
15246# ifdef __cplusplus
15247 extern "C"
15248# endif
15249 int F77_DUMMY_MAIN() { return 1; }
15250#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015251int
15252main ()
15253{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015254/* The GNU C library defines this for functions which it implements
15255 to always fail with ENOSYS. Some functions are actually named
15256 something starting with __ and the normal name is an alias. */
15257#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
15258choke me
15259#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015260f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015261#endif
15262
Martin v. Löwis11437992002-04-12 09:54:03 +000015263 ;
15264 return 0;
15265}
15266_ACEOF
15267rm -f conftest.$ac_objext conftest$ac_exeext
15268if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15269 (eval $ac_link) 2>&5
15270 ac_status=$?
15271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15272 (exit $ac_status); } &&
15273 { ac_try='test -s conftest$ac_exeext'
15274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15275 (eval $ac_try) 2>&5
15276 ac_status=$?
15277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15278 (exit $ac_status); }; }; then
15279 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015280else
Martin v. Löwis11437992002-04-12 09:54:03 +000015281 echo "$as_me: failed program was:" >&5
15282cat conftest.$ac_ext >&5
15283ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015284fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015285rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015286fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015287echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
15288echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
15289if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015290
Martin v. Löwis11437992002-04-12 09:54:03 +000015291 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015292#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015293_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015294
Martin v. Löwis11437992002-04-12 09:54:03 +000015295 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
15296echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015297 OLD_CFLAGS=$CFLAGS
15298 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015299 cat >conftest.$ac_ext <<_ACEOF
15300#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015301#include "confdefs.h"
15302
15303# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015304
Barry Warsawfe33b792003-01-07 22:42:49 +000015305#ifdef F77_DUMMY_MAIN
15306# ifdef __cplusplus
15307 extern "C"
15308# endif
15309 int F77_DUMMY_MAIN() { return 1; }
15310#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015311int
15312main ()
15313{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015314
15315 char *name;
15316 struct hostent *he, *res;
15317 char buffer[2048];
15318 int buflen = 2048;
15319 int h_errnop;
15320
15321 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015322
15323 ;
15324 return 0;
15325}
15326_ACEOF
15327rm -f conftest.$ac_objext
15328if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15329 (eval $ac_compile) 2>&5
15330 ac_status=$?
15331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15332 (exit $ac_status); } &&
15333 { ac_try='test -s conftest.$ac_objext'
15334 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15335 (eval $ac_try) 2>&5
15336 ac_status=$?
15337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15338 (exit $ac_status); }; }; then
15339
15340 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015341#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015342_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015343
Martin v. Löwis11437992002-04-12 09:54:03 +000015344
15345cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015346#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015347_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015348
Martin v. Löwis11437992002-04-12 09:54:03 +000015349 echo "$as_me:$LINENO: result: yes" >&5
15350echo "${ECHO_T}yes" >&6
15351
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015352else
Martin v. Löwis11437992002-04-12 09:54:03 +000015353 echo "$as_me: failed program was:" >&5
15354cat conftest.$ac_ext >&5
15355
15356 echo "$as_me:$LINENO: result: no" >&5
15357echo "${ECHO_T}no" >&6
15358 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
15359echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
15360 cat >conftest.$ac_ext <<_ACEOF
15361#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015362#include "confdefs.h"
15363
15364# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015365
Barry Warsawfe33b792003-01-07 22:42:49 +000015366#ifdef F77_DUMMY_MAIN
15367# ifdef __cplusplus
15368 extern "C"
15369# endif
15370 int F77_DUMMY_MAIN() { return 1; }
15371#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015372int
15373main ()
15374{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015375
15376 char *name;
15377 struct hostent *he;
15378 char buffer[2048];
15379 int buflen = 2048;
15380 int h_errnop;
15381
15382 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015383
15384 ;
15385 return 0;
15386}
15387_ACEOF
15388rm -f conftest.$ac_objext
15389if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15390 (eval $ac_compile) 2>&5
15391 ac_status=$?
15392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15393 (exit $ac_status); } &&
15394 { ac_try='test -s conftest.$ac_objext'
15395 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15396 (eval $ac_try) 2>&5
15397 ac_status=$?
15398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15399 (exit $ac_status); }; }; then
15400
15401 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015402#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015403_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015404
Martin v. Löwis11437992002-04-12 09:54:03 +000015405
15406cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015407#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015408_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015409
Martin v. Löwis11437992002-04-12 09:54:03 +000015410 echo "$as_me:$LINENO: result: yes" >&5
15411echo "${ECHO_T}yes" >&6
15412
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015413else
Martin v. Löwis11437992002-04-12 09:54:03 +000015414 echo "$as_me: failed program was:" >&5
15415cat conftest.$ac_ext >&5
15416
15417 echo "$as_me:$LINENO: result: no" >&5
15418echo "${ECHO_T}no" >&6
15419 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
15420echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
15421 cat >conftest.$ac_ext <<_ACEOF
15422#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015423#include "confdefs.h"
15424
15425# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015426
Barry Warsawfe33b792003-01-07 22:42:49 +000015427#ifdef F77_DUMMY_MAIN
15428# ifdef __cplusplus
15429 extern "C"
15430# endif
15431 int F77_DUMMY_MAIN() { return 1; }
15432#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015433int
15434main ()
15435{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015436
15437 char *name;
15438 struct hostent *he;
15439 struct hostent_data data;
15440
15441 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000015442
15443 ;
15444 return 0;
15445}
15446_ACEOF
15447rm -f conftest.$ac_objext
15448if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15449 (eval $ac_compile) 2>&5
15450 ac_status=$?
15451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15452 (exit $ac_status); } &&
15453 { ac_try='test -s conftest.$ac_objext'
15454 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15455 (eval $ac_try) 2>&5
15456 ac_status=$?
15457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15458 (exit $ac_status); }; }; then
15459
15460 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015461#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015462_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015463
Martin v. Löwis11437992002-04-12 09:54:03 +000015464
15465cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015466#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015467_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015468
Martin v. Löwis11437992002-04-12 09:54:03 +000015469 echo "$as_me:$LINENO: result: yes" >&5
15470echo "${ECHO_T}yes" >&6
15471
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015472else
Martin v. Löwis11437992002-04-12 09:54:03 +000015473 echo "$as_me: failed program was:" >&5
15474cat conftest.$ac_ext >&5
15475
15476 echo "$as_me:$LINENO: result: no" >&5
15477echo "${ECHO_T}no" >&6
15478
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015479fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015480rm -f conftest.$ac_objext conftest.$ac_ext
15481
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015482fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015483rm -f conftest.$ac_objext conftest.$ac_ext
15484
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015485fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015486rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015487 CFLAGS=$OLD_CFLAGS
15488
15489else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015490
Martin v. Löwis11437992002-04-12 09:54:03 +000015491
15492for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000015493do
Martin v. Löwis11437992002-04-12 09:54:03 +000015494as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15495echo "$as_me:$LINENO: checking for $ac_func" >&5
15496echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15497if eval "test \"\${$as_ac_var+set}\" = set"; then
15498 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015499else
Martin v. Löwis11437992002-04-12 09:54:03 +000015500 cat >conftest.$ac_ext <<_ACEOF
15501#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015502#include "confdefs.h"
15503/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015504 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015505#include <assert.h>
15506/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015507#ifdef __cplusplus
15508extern "C"
15509#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015510/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015511 builtin and then its argument prototype would still apply. */
15512char $ac_func ();
15513char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015514
Barry Warsawfe33b792003-01-07 22:42:49 +000015515#ifdef F77_DUMMY_MAIN
15516# ifdef __cplusplus
15517 extern "C"
15518# endif
15519 int F77_DUMMY_MAIN() { return 1; }
15520#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015521int
15522main ()
15523{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015524/* The GNU C library defines this for functions which it implements
15525 to always fail with ENOSYS. Some functions are actually named
15526 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015527#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015528choke me
15529#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015530f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015531#endif
15532
Martin v. Löwis11437992002-04-12 09:54:03 +000015533 ;
15534 return 0;
15535}
15536_ACEOF
15537rm -f conftest.$ac_objext conftest$ac_exeext
15538if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15539 (eval $ac_link) 2>&5
15540 ac_status=$?
15541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15542 (exit $ac_status); } &&
15543 { ac_try='test -s conftest$ac_exeext'
15544 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15545 (eval $ac_try) 2>&5
15546 ac_status=$?
15547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15548 (exit $ac_status); }; }; then
15549 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015550else
Martin v. Löwis11437992002-04-12 09:54:03 +000015551 echo "$as_me: failed program was:" >&5
15552cat conftest.$ac_ext >&5
15553eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015554fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015555rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015556fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015557echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15558echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15559if test `eval echo '${'$as_ac_var'}'` = yes; then
15560 cat >>confdefs.h <<_ACEOF
15561#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15562_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015563
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015564fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015565done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015566
Michael W. Hudson54241132001-12-07 15:38:26 +000015567
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015568fi
15569
Michael W. Hudson54241132001-12-07 15:38:26 +000015570
15571
15572
15573
15574
15575
Guido van Rossum627b2d71993-12-24 10:39:16 +000015576# checks for system services
15577# (none yet)
15578
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015579# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000015580echo "$as_me:$LINENO: checking for __fpu_control" >&5
15581echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
15582if test "${ac_cv_func___fpu_control+set}" = set; then
15583 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015584else
Martin v. Löwis11437992002-04-12 09:54:03 +000015585 cat >conftest.$ac_ext <<_ACEOF
15586#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015587#include "confdefs.h"
15588/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015589 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015590#include <assert.h>
15591/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015592#ifdef __cplusplus
15593extern "C"
15594#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015595/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015596 builtin and then its argument prototype would still apply. */
15597char __fpu_control ();
15598char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015599
Barry Warsawfe33b792003-01-07 22:42:49 +000015600#ifdef F77_DUMMY_MAIN
15601# ifdef __cplusplus
15602 extern "C"
15603# endif
15604 int F77_DUMMY_MAIN() { return 1; }
15605#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015606int
15607main ()
15608{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015609/* The GNU C library defines this for functions which it implements
15610 to always fail with ENOSYS. Some functions are actually named
15611 something starting with __ and the normal name is an alias. */
15612#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
15613choke me
15614#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015615f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015616#endif
15617
Martin v. Löwis11437992002-04-12 09:54:03 +000015618 ;
15619 return 0;
15620}
15621_ACEOF
15622rm -f conftest.$ac_objext conftest$ac_exeext
15623if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15624 (eval $ac_link) 2>&5
15625 ac_status=$?
15626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15627 (exit $ac_status); } &&
15628 { ac_try='test -s conftest$ac_exeext'
15629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15630 (eval $ac_try) 2>&5
15631 ac_status=$?
15632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15633 (exit $ac_status); }; }; then
15634 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015635else
Martin v. Löwis11437992002-04-12 09:54:03 +000015636 echo "$as_me: failed program was:" >&5
15637cat conftest.$ac_ext >&5
15638ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015639fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015640rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015641fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015642echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
15643echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
15644if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015645 :
15646else
Martin v. Löwis11437992002-04-12 09:54:03 +000015647
15648echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
15649echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
15650if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
15651 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015652else
Martin v. Löwis11437992002-04-12 09:54:03 +000015653 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015654LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015655cat >conftest.$ac_ext <<_ACEOF
15656#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015657#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015658
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015659/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015660#ifdef __cplusplus
15661extern "C"
15662#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015663/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015664 builtin and then its argument prototype would still apply. */
15665char __fpu_control ();
Barry Warsawfe33b792003-01-07 22:42:49 +000015666#ifdef F77_DUMMY_MAIN
15667# ifdef __cplusplus
15668 extern "C"
15669# endif
15670 int F77_DUMMY_MAIN() { return 1; }
15671#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015672int
15673main ()
15674{
15675__fpu_control ();
15676 ;
15677 return 0;
15678}
15679_ACEOF
15680rm -f conftest.$ac_objext conftest$ac_exeext
15681if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15682 (eval $ac_link) 2>&5
15683 ac_status=$?
15684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15685 (exit $ac_status); } &&
15686 { ac_try='test -s conftest$ac_exeext'
15687 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15688 (eval $ac_try) 2>&5
15689 ac_status=$?
15690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15691 (exit $ac_status); }; }; then
15692 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015693else
Martin v. Löwis11437992002-04-12 09:54:03 +000015694 echo "$as_me: failed program was:" >&5
15695cat conftest.$ac_ext >&5
15696ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015697fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015698rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15699LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015700fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015701echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
15702echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
15703if test $ac_cv_lib_ieee___fpu_control = yes; then
15704 cat >>confdefs.h <<_ACEOF
15705#define HAVE_LIBIEEE 1
15706_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015707
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015708 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015709
Guido van Rossum627b2d71993-12-24 10:39:16 +000015710fi
15711
Michael W. Hudson54241132001-12-07 15:38:26 +000015712
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015713fi
15714
Michael W. Hudson54241132001-12-07 15:38:26 +000015715
Guido van Rossum7f253911997-05-09 02:42:48 +000015716# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000015717echo "$as_me:$LINENO: checking for --with-fpectl" >&5
15718echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
15719
Guido van Rossum7f253911997-05-09 02:42:48 +000015720# Check whether --with-fpectl or --without-fpectl was given.
15721if test "${with_fpectl+set}" = set; then
15722 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000015723
Guido van Rossum7f253911997-05-09 02:42:48 +000015724if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015725then
15726
15727cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000015728#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015729_ACEOF
15730
15731 echo "$as_me:$LINENO: result: yes" >&5
15732echo "${ECHO_T}yes" >&6
15733else echo "$as_me:$LINENO: result: no" >&5
15734echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015735fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015736else
Martin v. Löwis11437992002-04-12 09:54:03 +000015737 echo "$as_me:$LINENO: result: no" >&5
15738echo "${ECHO_T}no" >&6
15739fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000015740
Guido van Rossum7f43da71994-08-01 12:15:30 +000015741# check for --with-libm=...
15742
Guido van Rossum563e7081996-09-10 18:20:48 +000015743case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000015744Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015745BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000015746*) LIBM=-lm
15747esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015748echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
15749echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
15750
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015751# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015752if test "${with_libm+set}" = set; then
15753 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000015754
Guido van Rossum7f253911997-05-09 02:42:48 +000015755if test "$withval" = no
15756then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000015757 echo "$as_me:$LINENO: result: force LIBM empty" >&5
15758echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015759elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015760then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015761 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
15762echo "${ECHO_T}set LIBM=\"$withval\"" >&6
15763else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
15764echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
15765 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015766fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015767else
Martin v. Löwis11437992002-04-12 09:54:03 +000015768 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
15769echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
15770fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015771
15772# check for --with-libc=...
15773
Martin v. Löwis11437992002-04-12 09:54:03 +000015774echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
15775echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
15776
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015777# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015778if test "${with_libc+set}" = set; then
15779 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000015780
Guido van Rossum7f253911997-05-09 02:42:48 +000015781if test "$withval" = no
15782then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000015783 echo "$as_me:$LINENO: result: force LIBC empty" >&5
15784echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015785elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015786then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015787 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
15788echo "${ECHO_T}set LIBC=\"$withval\"" >&6
15789else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
15790echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
15791 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015792fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015793else
Martin v. Löwis11437992002-04-12 09:54:03 +000015794 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
15795echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
15796fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015797
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015798# check for hypot() in math library
15799LIBS_SAVE=$LIBS
15800LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000015801
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015802for ac_func in hypot
15803do
Martin v. Löwis11437992002-04-12 09:54:03 +000015804as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15805echo "$as_me:$LINENO: checking for $ac_func" >&5
15806echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15807if eval "test \"\${$as_ac_var+set}\" = set"; then
15808 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015809else
Martin v. Löwis11437992002-04-12 09:54:03 +000015810 cat >conftest.$ac_ext <<_ACEOF
15811#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015812#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015813/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015814 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015815#include <assert.h>
15816/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015817#ifdef __cplusplus
15818extern "C"
15819#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015820/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015821 builtin and then its argument prototype would still apply. */
15822char $ac_func ();
15823char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015824
Barry Warsawfe33b792003-01-07 22:42:49 +000015825#ifdef F77_DUMMY_MAIN
15826# ifdef __cplusplus
15827 extern "C"
15828# endif
15829 int F77_DUMMY_MAIN() { return 1; }
15830#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015831int
15832main ()
15833{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015834/* The GNU C library defines this for functions which it implements
15835 to always fail with ENOSYS. Some functions are actually named
15836 something starting with __ and the normal name is an alias. */
15837#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15838choke me
15839#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015840f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015841#endif
15842
Martin v. Löwis11437992002-04-12 09:54:03 +000015843 ;
15844 return 0;
15845}
15846_ACEOF
15847rm -f conftest.$ac_objext conftest$ac_exeext
15848if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15849 (eval $ac_link) 2>&5
15850 ac_status=$?
15851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15852 (exit $ac_status); } &&
15853 { ac_try='test -s conftest$ac_exeext'
15854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15855 (eval $ac_try) 2>&5
15856 ac_status=$?
15857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15858 (exit $ac_status); }; }; then
15859 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015860else
Martin v. Löwis11437992002-04-12 09:54:03 +000015861 echo "$as_me: failed program was:" >&5
15862cat conftest.$ac_ext >&5
15863eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015864fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015865rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015866fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015867echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15868echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15869if test `eval echo '${'$as_ac_var'}'` = yes; then
15870 cat >>confdefs.h <<_ACEOF
15871#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15872_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000015873
Michael W. Hudson54241132001-12-07 15:38:26 +000015874else
Martin v. Löwis11437992002-04-12 09:54:03 +000015875 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015876fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015877done
15878
Michael W. Hudson54241132001-12-07 15:38:26 +000015879
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015880LIBS=$LIBS_SAVE
15881
Guido van Rossumef2255b2000-03-10 22:30:29 +000015882# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015883if test "${ac_cv_header_wchar_h+set}" = set; then
15884 echo "$as_me:$LINENO: checking for wchar.h" >&5
15885echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15886if test "${ac_cv_header_wchar_h+set}" = set; then
15887 echo $ECHO_N "(cached) $ECHO_C" >&6
15888fi
15889echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15890echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015891else
Martin v. Löwis11437992002-04-12 09:54:03 +000015892 # Is the header compilable?
15893echo "$as_me:$LINENO: checking wchar.h usability" >&5
15894echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
15895cat >conftest.$ac_ext <<_ACEOF
15896#line $LINENO "configure"
15897#include "confdefs.h"
15898$ac_includes_default
15899#include <wchar.h>
15900_ACEOF
15901rm -f conftest.$ac_objext
15902if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15903 (eval $ac_compile) 2>&5
15904 ac_status=$?
15905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15906 (exit $ac_status); } &&
15907 { ac_try='test -s conftest.$ac_objext'
15908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15909 (eval $ac_try) 2>&5
15910 ac_status=$?
15911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15912 (exit $ac_status); }; }; then
15913 ac_header_compiler=yes
15914else
15915 echo "$as_me: failed program was:" >&5
15916cat conftest.$ac_ext >&5
15917ac_header_compiler=no
15918fi
15919rm -f conftest.$ac_objext conftest.$ac_ext
15920echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15921echo "${ECHO_T}$ac_header_compiler" >&6
15922
15923# Is the header present?
15924echo "$as_me:$LINENO: checking wchar.h presence" >&5
15925echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
15926cat >conftest.$ac_ext <<_ACEOF
15927#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015928#include "confdefs.h"
15929#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015930_ACEOF
15931if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15932 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15933 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000015934 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015935 rm -f conftest.er1
15936 cat conftest.err >&5
15937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15938 (exit $ac_status); } >/dev/null; then
15939 if test -s conftest.err; then
15940 ac_cpp_err=$ac_c_preproc_warn_flag
15941 else
15942 ac_cpp_err=
15943 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015944else
Martin v. Löwis11437992002-04-12 09:54:03 +000015945 ac_cpp_err=yes
15946fi
15947if test -z "$ac_cpp_err"; then
15948 ac_header_preproc=yes
15949else
15950 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000015951 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015952 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015953fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015954rm -f conftest.err conftest.$ac_ext
15955echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15956echo "${ECHO_T}$ac_header_preproc" >&6
15957
15958# So? What about this header?
15959case $ac_header_compiler:$ac_header_preproc in
15960 yes:no )
15961 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
15962echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15963 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
15964echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
15965 no:yes )
15966 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
15967echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
15968 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
15969echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
15970 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
15971echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
15972esac
15973echo "$as_me:$LINENO: checking for wchar.h" >&5
15974echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15975if test "${ac_cv_header_wchar_h+set}" = set; then
15976 echo $ECHO_N "(cached) $ECHO_C" >&6
15977else
15978 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000015979fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015980echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15981echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
15982
15983fi
15984if test $ac_cv_header_wchar_h = yes; then
15985
15986
15987cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015988#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015989_ACEOF
15990
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015991 wchar_h="yes"
15992
Guido van Rossumef2255b2000-03-10 22:30:29 +000015993else
Martin v. Löwis11437992002-04-12 09:54:03 +000015994 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015995
15996fi
15997
Michael W. Hudson54241132001-12-07 15:38:26 +000015998
Martin v. Löwis11437992002-04-12 09:54:03 +000015999
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016000# determine wchar_t size
16001if test "$wchar_h" = yes
16002then
Martin v. Löwis11437992002-04-12 09:54:03 +000016003 echo "$as_me:$LINENO: checking for wchar_t" >&5
16004echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
16005if test "${ac_cv_type_wchar_t+set}" = set; then
16006 echo $ECHO_N "(cached) $ECHO_C" >&6
16007else
16008 cat >conftest.$ac_ext <<_ACEOF
16009#line $LINENO "configure"
16010#include "confdefs.h"
16011#include <wchar.h>
16012
Barry Warsawfe33b792003-01-07 22:42:49 +000016013#ifdef F77_DUMMY_MAIN
16014# ifdef __cplusplus
16015 extern "C"
16016# endif
16017 int F77_DUMMY_MAIN() { return 1; }
16018#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016019int
16020main ()
16021{
16022if ((wchar_t *) 0)
16023 return 0;
16024if (sizeof (wchar_t))
16025 return 0;
16026 ;
16027 return 0;
16028}
16029_ACEOF
16030rm -f conftest.$ac_objext
16031if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16032 (eval $ac_compile) 2>&5
16033 ac_status=$?
16034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16035 (exit $ac_status); } &&
16036 { ac_try='test -s conftest.$ac_objext'
16037 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16038 (eval $ac_try) 2>&5
16039 ac_status=$?
16040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16041 (exit $ac_status); }; }; then
16042 ac_cv_type_wchar_t=yes
16043else
16044 echo "$as_me: failed program was:" >&5
16045cat conftest.$ac_ext >&5
16046ac_cv_type_wchar_t=no
16047fi
16048rm -f conftest.$ac_objext conftest.$ac_ext
16049fi
16050echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
16051echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
16052
16053echo "$as_me:$LINENO: checking size of wchar_t" >&5
16054echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
16055if test "${ac_cv_sizeof_wchar_t+set}" = set; then
16056 echo $ECHO_N "(cached) $ECHO_C" >&6
16057else
16058 if test "$ac_cv_type_wchar_t" = yes; then
16059 # The cast to unsigned long works around a bug in the HP C Compiler
16060 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16061 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16062 # This bug is HP SR number 8606223364.
16063 if test "$cross_compiling" = yes; then
16064 # Depending upon the size, compute the lo and hi bounds.
16065cat >conftest.$ac_ext <<_ACEOF
16066#line $LINENO "configure"
16067#include "confdefs.h"
16068#include <wchar.h>
16069
Barry Warsawfe33b792003-01-07 22:42:49 +000016070#ifdef F77_DUMMY_MAIN
16071# ifdef __cplusplus
16072 extern "C"
16073# endif
16074 int F77_DUMMY_MAIN() { return 1; }
16075#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016076int
16077main ()
16078{
16079static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
16080test_array [0] = 0
16081
16082 ;
16083 return 0;
16084}
16085_ACEOF
16086rm -f conftest.$ac_objext
16087if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16088 (eval $ac_compile) 2>&5
16089 ac_status=$?
16090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16091 (exit $ac_status); } &&
16092 { ac_try='test -s conftest.$ac_objext'
16093 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16094 (eval $ac_try) 2>&5
16095 ac_status=$?
16096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16097 (exit $ac_status); }; }; then
16098 ac_lo=0 ac_mid=0
16099 while :; do
16100 cat >conftest.$ac_ext <<_ACEOF
16101#line $LINENO "configure"
16102#include "confdefs.h"
16103#include <wchar.h>
16104
Barry Warsawfe33b792003-01-07 22:42:49 +000016105#ifdef F77_DUMMY_MAIN
16106# ifdef __cplusplus
16107 extern "C"
16108# endif
16109 int F77_DUMMY_MAIN() { return 1; }
16110#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016111int
16112main ()
16113{
16114static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16115test_array [0] = 0
16116
16117 ;
16118 return 0;
16119}
16120_ACEOF
16121rm -f conftest.$ac_objext
16122if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16123 (eval $ac_compile) 2>&5
16124 ac_status=$?
16125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16126 (exit $ac_status); } &&
16127 { ac_try='test -s conftest.$ac_objext'
16128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16129 (eval $ac_try) 2>&5
16130 ac_status=$?
16131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16132 (exit $ac_status); }; }; then
16133 ac_hi=$ac_mid; break
16134else
16135 echo "$as_me: failed program was:" >&5
16136cat conftest.$ac_ext >&5
16137ac_lo=`expr $ac_mid + 1`
16138 if test $ac_lo -le $ac_mid; then
16139 ac_lo= ac_hi=
16140 break
16141 fi
16142 ac_mid=`expr 2 '*' $ac_mid + 1`
16143fi
16144rm -f conftest.$ac_objext conftest.$ac_ext
16145 done
16146else
16147 echo "$as_me: failed program was:" >&5
16148cat conftest.$ac_ext >&5
16149cat >conftest.$ac_ext <<_ACEOF
16150#line $LINENO "configure"
16151#include "confdefs.h"
16152#include <wchar.h>
16153
Barry Warsawfe33b792003-01-07 22:42:49 +000016154#ifdef F77_DUMMY_MAIN
16155# ifdef __cplusplus
16156 extern "C"
16157# endif
16158 int F77_DUMMY_MAIN() { return 1; }
16159#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016160int
16161main ()
16162{
16163static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
16164test_array [0] = 0
16165
16166 ;
16167 return 0;
16168}
16169_ACEOF
16170rm -f conftest.$ac_objext
16171if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16172 (eval $ac_compile) 2>&5
16173 ac_status=$?
16174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16175 (exit $ac_status); } &&
16176 { ac_try='test -s conftest.$ac_objext'
16177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16178 (eval $ac_try) 2>&5
16179 ac_status=$?
16180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16181 (exit $ac_status); }; }; then
16182 ac_hi=-1 ac_mid=-1
16183 while :; do
16184 cat >conftest.$ac_ext <<_ACEOF
16185#line $LINENO "configure"
16186#include "confdefs.h"
16187#include <wchar.h>
16188
Barry Warsawfe33b792003-01-07 22:42:49 +000016189#ifdef F77_DUMMY_MAIN
16190# ifdef __cplusplus
16191 extern "C"
16192# endif
16193 int F77_DUMMY_MAIN() { return 1; }
16194#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016195int
16196main ()
16197{
16198static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
16199test_array [0] = 0
16200
16201 ;
16202 return 0;
16203}
16204_ACEOF
16205rm -f conftest.$ac_objext
16206if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16207 (eval $ac_compile) 2>&5
16208 ac_status=$?
16209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16210 (exit $ac_status); } &&
16211 { ac_try='test -s conftest.$ac_objext'
16212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16213 (eval $ac_try) 2>&5
16214 ac_status=$?
16215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16216 (exit $ac_status); }; }; then
16217 ac_lo=$ac_mid; break
16218else
16219 echo "$as_me: failed program was:" >&5
16220cat conftest.$ac_ext >&5
16221ac_hi=`expr '(' $ac_mid ')' - 1`
16222 if test $ac_mid -le $ac_hi; then
16223 ac_lo= ac_hi=
16224 break
16225 fi
16226 ac_mid=`expr 2 '*' $ac_mid`
16227fi
16228rm -f conftest.$ac_objext conftest.$ac_ext
16229 done
16230else
16231 echo "$as_me: failed program was:" >&5
16232cat conftest.$ac_ext >&5
16233ac_lo= ac_hi=
16234fi
16235rm -f conftest.$ac_objext conftest.$ac_ext
16236fi
16237rm -f conftest.$ac_objext conftest.$ac_ext
16238# Binary search between lo and hi bounds.
16239while test "x$ac_lo" != "x$ac_hi"; do
16240 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
16241 cat >conftest.$ac_ext <<_ACEOF
16242#line $LINENO "configure"
16243#include "confdefs.h"
16244#include <wchar.h>
16245
Barry Warsawfe33b792003-01-07 22:42:49 +000016246#ifdef F77_DUMMY_MAIN
16247# ifdef __cplusplus
16248 extern "C"
16249# endif
16250 int F77_DUMMY_MAIN() { return 1; }
16251#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016252int
16253main ()
16254{
16255static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16256test_array [0] = 0
16257
16258 ;
16259 return 0;
16260}
16261_ACEOF
16262rm -f conftest.$ac_objext
16263if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16264 (eval $ac_compile) 2>&5
16265 ac_status=$?
16266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16267 (exit $ac_status); } &&
16268 { ac_try='test -s conftest.$ac_objext'
16269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16270 (eval $ac_try) 2>&5
16271 ac_status=$?
16272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16273 (exit $ac_status); }; }; then
16274 ac_hi=$ac_mid
16275else
16276 echo "$as_me: failed program was:" >&5
16277cat conftest.$ac_ext >&5
16278ac_lo=`expr '(' $ac_mid ')' + 1`
16279fi
16280rm -f conftest.$ac_objext conftest.$ac_ext
16281done
16282case $ac_lo in
16283?*) ac_cv_sizeof_wchar_t=$ac_lo;;
16284'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
16285echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
16286 { (exit 1); exit 1; }; } ;;
16287esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016288else
16289 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016290 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
16291echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16292 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000016293else
Martin v. Löwis11437992002-04-12 09:54:03 +000016294 cat >conftest.$ac_ext <<_ACEOF
16295#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016296#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016297#include <wchar.h>
16298
16299long longval () { return (long) (sizeof (wchar_t)); }
16300unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000016301#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016302#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000016303#ifdef F77_DUMMY_MAIN
16304# ifdef __cplusplus
16305 extern "C"
16306# endif
16307 int F77_DUMMY_MAIN() { return 1; }
16308#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016309int
16310main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016311{
Martin v. Löwis11437992002-04-12 09:54:03 +000016312
16313 FILE *f = fopen ("conftest.val", "w");
16314 if (! f)
16315 exit (1);
16316 if (((long) (sizeof (wchar_t))) < 0)
16317 {
16318 long i = longval ();
16319 if (i != ((long) (sizeof (wchar_t))))
16320 exit (1);
16321 fprintf (f, "%ld\n", i);
16322 }
16323 else
16324 {
16325 unsigned long i = ulongval ();
16326 if (i != ((long) (sizeof (wchar_t))))
16327 exit (1);
16328 fprintf (f, "%lu\n", i);
16329 }
16330 exit (ferror (f) || fclose (f) != 0);
16331
16332 ;
16333 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000016334}
Martin v. Löwis11437992002-04-12 09:54:03 +000016335_ACEOF
16336rm -f conftest$ac_exeext
16337if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16338 (eval $ac_link) 2>&5
16339 ac_status=$?
16340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16341 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16343 (eval $ac_try) 2>&5
16344 ac_status=$?
16345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16346 (exit $ac_status); }; }; then
16347 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000016348else
Martin v. Löwis11437992002-04-12 09:54:03 +000016349 echo "$as_me: program exited with status $ac_status" >&5
16350echo "$as_me: failed program was:" >&5
16351cat conftest.$ac_ext >&5
16352( exit $ac_status )
16353{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
16354echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
16355 { (exit 1); exit 1; }; }
16356fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016357rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016358fi
16359fi
16360rm -f conftest.val
16361else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016362 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000016363fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016364fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016365echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
16366echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
16367cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016368#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016369_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016370
Michael W. Hudson54241132001-12-07 15:38:26 +000016371
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016372fi
16373
Martin v. Löwis11437992002-04-12 09:54:03 +000016374echo "$as_me:$LINENO: checking what type to use for unicode" >&5
16375echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016376# Check whether --enable-unicode or --disable-unicode was given.
16377if test "${enable_unicode+set}" = set; then
16378 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000016379
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016380else
16381 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000016382fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016383
16384if test $enable_unicode = yes
16385then
Martin v. Löwisfd917792001-06-27 20:22:04 +000016386 # Without any arguments, Py_UNICODE defaults to two-byte mode
16387 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016388fi
16389
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016390
16391
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016392case "$enable_unicode" in
16393ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000016394 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016395#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000016396_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016397
16398 ;;
16399ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000016400 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016401#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000016402_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016403
16404 ;;
16405esac
16406
Michael W. Hudson54241132001-12-07 15:38:26 +000016407
Martin v. Löwis11437992002-04-12 09:54:03 +000016408
16409
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016410
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016411if test "$enable_unicode" = "no"
16412then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016413 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000016414 echo "$as_me:$LINENO: result: not used" >&5
16415echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016416else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016417 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000016418
16419cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016420#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016421_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016422
16423 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
16424 then
16425 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016426
Martin v. Löwis11437992002-04-12 09:54:03 +000016427cat >>confdefs.h <<\_ACEOF
16428#define HAVE_USABLE_WCHAR_T 1
16429_ACEOF
16430
16431 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016432#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016433_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016434
16435 elif test "$ac_cv_sizeof_short" = "$unicode_size"
16436 then
16437 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000016438 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016439#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000016440_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016441
16442 elif test "$ac_cv_sizeof_long" = "$unicode_size"
16443 then
16444 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000016445 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016446#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000016447_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016448
16449 else
16450 PY_UNICODE_TYPE="no type found"
16451 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016452 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
16453echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016454fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016455
16456# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000016457echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
16458echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
16459if test "${ac_cv_c_bigendian+set}" = set; then
16460 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000016461else
Martin v. Löwis11437992002-04-12 09:54:03 +000016462 # See if sys/param.h defines the BYTE_ORDER macro.
16463cat >conftest.$ac_ext <<_ACEOF
16464#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016465#include "confdefs.h"
16466#include <sys/types.h>
16467#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000016468
Barry Warsawfe33b792003-01-07 22:42:49 +000016469#ifdef F77_DUMMY_MAIN
16470# ifdef __cplusplus
16471 extern "C"
16472# endif
16473 int F77_DUMMY_MAIN() { return 1; }
16474#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016475int
16476main ()
16477{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016478#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
16479 bogus endian macros
16480#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016481
16482 ;
16483 return 0;
16484}
16485_ACEOF
16486rm -f conftest.$ac_objext
16487if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16488 (eval $ac_compile) 2>&5
16489 ac_status=$?
16490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16491 (exit $ac_status); } &&
16492 { ac_try='test -s conftest.$ac_objext'
16493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16494 (eval $ac_try) 2>&5
16495 ac_status=$?
16496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16497 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016498 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000016499cat >conftest.$ac_ext <<_ACEOF
16500#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016501#include "confdefs.h"
16502#include <sys/types.h>
16503#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000016504
Barry Warsawfe33b792003-01-07 22:42:49 +000016505#ifdef F77_DUMMY_MAIN
16506# ifdef __cplusplus
16507 extern "C"
16508# endif
16509 int F77_DUMMY_MAIN() { return 1; }
16510#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016511int
16512main ()
16513{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016514#if BYTE_ORDER != BIG_ENDIAN
16515 not big endian
16516#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016517
16518 ;
16519 return 0;
16520}
16521_ACEOF
16522rm -f conftest.$ac_objext
16523if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16524 (eval $ac_compile) 2>&5
16525 ac_status=$?
16526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16527 (exit $ac_status); } &&
16528 { ac_try='test -s conftest.$ac_objext'
16529 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16530 (eval $ac_try) 2>&5
16531 ac_status=$?
16532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16533 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016534 ac_cv_c_bigendian=yes
16535else
Martin v. Löwis11437992002-04-12 09:54:03 +000016536 echo "$as_me: failed program was:" >&5
16537cat conftest.$ac_ext >&5
16538ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016539fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016540rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016541else
Martin v. Löwis11437992002-04-12 09:54:03 +000016542 echo "$as_me: failed program was:" >&5
16543cat conftest.$ac_ext >&5
16544# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000016545if test "$cross_compiling" = yes; then
Barry Warsawfe33b792003-01-07 22:42:49 +000016546 # try to guess the endianess by grep'ing values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000016547 ac_cv_c_bigendian=unknown
16548 cat >conftest.$ac_ext <<_ACEOF
16549#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016550#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016551short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16552short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16553void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
16554short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16555short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16556void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Barry Warsawfe33b792003-01-07 22:42:49 +000016557#ifdef F77_DUMMY_MAIN
16558# ifdef __cplusplus
16559 extern "C"
16560# endif
16561 int F77_DUMMY_MAIN() { return 1; }
16562#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016563int
16564main ()
16565{
16566 _ascii (); _ebcdic ();
16567 ;
16568 return 0;
16569}
16570_ACEOF
16571rm -f conftest.$ac_objext
16572if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16573 (eval $ac_compile) 2>&5
16574 ac_status=$?
16575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16576 (exit $ac_status); } &&
16577 { ac_try='test -s conftest.$ac_objext'
16578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16579 (eval $ac_try) 2>&5
16580 ac_status=$?
16581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16582 (exit $ac_status); }; }; then
Barry Warsawfe33b792003-01-07 22:42:49 +000016583 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016584 ac_cv_c_bigendian=yes
16585fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016586if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016587 if test "$ac_cv_c_bigendian" = unknown; then
16588 ac_cv_c_bigendian=no
16589 else
16590 # finding both strings is unlikely to happen, but who knows?
16591 ac_cv_c_bigendian=unknown
16592 fi
16593fi
16594else
16595 echo "$as_me: failed program was:" >&5
16596cat conftest.$ac_ext >&5
16597fi
16598rm -f conftest.$ac_objext conftest.$ac_ext
16599else
16600 cat >conftest.$ac_ext <<_ACEOF
16601#line $LINENO "configure"
16602#include "confdefs.h"
16603int
16604main ()
16605{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016606 /* Are we little or big endian? From Harbison&Steele. */
16607 union
16608 {
16609 long l;
16610 char c[sizeof (long)];
16611 } u;
16612 u.l = 1;
16613 exit (u.c[sizeof (long) - 1] == 1);
16614}
Martin v. Löwis11437992002-04-12 09:54:03 +000016615_ACEOF
16616rm -f conftest$ac_exeext
16617if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16618 (eval $ac_link) 2>&5
16619 ac_status=$?
16620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16621 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16623 (eval $ac_try) 2>&5
16624 ac_status=$?
16625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16626 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016627 ac_cv_c_bigendian=no
16628else
Martin v. Löwis11437992002-04-12 09:54:03 +000016629 echo "$as_me: program exited with status $ac_status" >&5
16630echo "$as_me: failed program was:" >&5
16631cat conftest.$ac_ext >&5
16632( exit $ac_status )
16633ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000016634fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016635rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016636fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016637fi
16638rm -f conftest.$ac_objext conftest.$ac_ext
16639fi
16640echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
16641echo "${ECHO_T}$ac_cv_c_bigendian" >&6
16642case $ac_cv_c_bigendian in
16643 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000016644
Martin v. Löwis11437992002-04-12 09:54:03 +000016645cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016646#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016647_ACEOF
16648 ;;
16649 no)
16650 ;;
16651 *)
Barry Warsawfe33b792003-01-07 22:42:49 +000016652 { { echo "$as_me:$LINENO: error: unknown endianess
Martin v. Löwis11437992002-04-12 09:54:03 +000016653presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Barry Warsawfe33b792003-01-07 22:42:49 +000016654echo "$as_me: error: unknown endianess
Martin v. Löwis11437992002-04-12 09:54:03 +000016655presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
16656 { (exit 1); exit 1; }; } ;;
16657esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000016658
Michael W. Hudson54241132001-12-07 15:38:26 +000016659
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016660# Check whether right shifting a negative integer extends the sign bit
16661# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000016662echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
16663echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
16664if test "${ac_cv_rshift_extends_sign+set}" = set; then
16665 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016666else
Martin v. Löwis11437992002-04-12 09:54:03 +000016667
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016668if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000016669 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016670else
Martin v. Löwis11437992002-04-12 09:54:03 +000016671 cat >conftest.$ac_ext <<_ACEOF
16672#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016673#include "confdefs.h"
16674
16675int main()
16676{
Vladimir Marangozova6180282000-07-12 05:05:06 +000016677 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016678}
16679
Martin v. Löwis11437992002-04-12 09:54:03 +000016680_ACEOF
16681rm -f conftest$ac_exeext
16682if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16683 (eval $ac_link) 2>&5
16684 ac_status=$?
16685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16686 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16687 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16688 (eval $ac_try) 2>&5
16689 ac_status=$?
16690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16691 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000016692 ac_cv_rshift_extends_sign=yes
16693else
Martin v. Löwis11437992002-04-12 09:54:03 +000016694 echo "$as_me: program exited with status $ac_status" >&5
16695echo "$as_me: failed program was:" >&5
16696cat conftest.$ac_ext >&5
16697( exit $ac_status )
16698ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000016699fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016700rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016701fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000016702fi
16703
Martin v. Löwis11437992002-04-12 09:54:03 +000016704echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
16705echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016706if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016707then
Martin v. Löwis11437992002-04-12 09:54:03 +000016708
16709cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016710#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016711_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016712
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016713fi
16714
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016715# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016716echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
16717echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
16718if test "${ac_cv_have_getc_unlocked+set}" = set; then
16719 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016720else
Martin v. Löwis11437992002-04-12 09:54:03 +000016721
16722cat >conftest.$ac_ext <<_ACEOF
16723#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016724#include "confdefs.h"
16725#include <stdio.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000016726#ifdef F77_DUMMY_MAIN
16727# ifdef __cplusplus
16728 extern "C"
16729# endif
16730 int F77_DUMMY_MAIN() { return 1; }
16731#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016732int
16733main ()
16734{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016735
16736 FILE *f = fopen("/dev/null", "r");
16737 flockfile(f);
16738 getc_unlocked(f);
16739 funlockfile(f);
16740
Martin v. Löwis11437992002-04-12 09:54:03 +000016741 ;
16742 return 0;
16743}
16744_ACEOF
16745rm -f conftest.$ac_objext conftest$ac_exeext
16746if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16747 (eval $ac_link) 2>&5
16748 ac_status=$?
16749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16750 (exit $ac_status); } &&
16751 { ac_try='test -s conftest$ac_exeext'
16752 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16753 (eval $ac_try) 2>&5
16754 ac_status=$?
16755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16756 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016757 ac_cv_have_getc_unlocked=yes
16758else
Martin v. Löwis11437992002-04-12 09:54:03 +000016759 echo "$as_me: failed program was:" >&5
16760cat conftest.$ac_ext >&5
16761ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016762fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016763rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016764fi
16765
Martin v. Löwis11437992002-04-12 09:54:03 +000016766echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
16767echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016768if test "$ac_cv_have_getc_unlocked" = yes
16769then
Martin v. Löwis11437992002-04-12 09:54:03 +000016770
16771cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016772#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016773_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016774
16775fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016776
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000016777# check for readline 2.2
16778cat >conftest.$ac_ext <<_ACEOF
16779#line $LINENO "configure"
16780#include "confdefs.h"
16781#include <readline/readline.h>
16782_ACEOF
16783if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16784 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16785 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000016786 egrep -v '^ *\+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000016787 rm -f conftest.er1
16788 cat conftest.err >&5
16789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16790 (exit $ac_status); } >/dev/null; then
16791 if test -s conftest.err; then
16792 ac_cpp_err=$ac_c_preproc_warn_flag
16793 else
16794 ac_cpp_err=
16795 fi
16796else
16797 ac_cpp_err=yes
16798fi
16799if test -z "$ac_cpp_err"; then
16800 have_readline=yes
16801else
16802 echo "$as_me: failed program was:" >&5
16803 cat conftest.$ac_ext >&5
16804 have_readline=no
16805fi
16806rm -f conftest.err conftest.$ac_ext
16807if test $have_readline = yes
16808then
16809 cat >conftest.$ac_ext <<_ACEOF
16810#line $LINENO "configure"
16811#include "confdefs.h"
16812#include <readline/readline.h>
16813
16814_ACEOF
16815if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000016816 egrep "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000016817
16818cat >>confdefs.h <<\_ACEOF
16819#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
16820_ACEOF
16821
16822fi
16823rm -f conftest*
16824
16825fi
16826
Martin v. Löwis0daad592001-09-30 21:09:59 +000016827# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000016828echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
16829echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
16830if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
16831 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000016832else
Martin v. Löwis11437992002-04-12 09:54:03 +000016833 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000016834LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016835cat >conftest.$ac_ext <<_ACEOF
16836#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000016837#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016838
Guido van Rossum353ae582001-07-10 16:45:32 +000016839/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016840#ifdef __cplusplus
16841extern "C"
16842#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000016843/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016844 builtin and then its argument prototype would still apply. */
16845char rl_pre_input_hook ();
Barry Warsawfe33b792003-01-07 22:42:49 +000016846#ifdef F77_DUMMY_MAIN
16847# ifdef __cplusplus
16848 extern "C"
16849# endif
16850 int F77_DUMMY_MAIN() { return 1; }
16851#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016852int
16853main ()
16854{
16855rl_pre_input_hook ();
16856 ;
16857 return 0;
16858}
16859_ACEOF
16860rm -f conftest.$ac_objext conftest$ac_exeext
16861if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16862 (eval $ac_link) 2>&5
16863 ac_status=$?
16864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16865 (exit $ac_status); } &&
16866 { ac_try='test -s conftest$ac_exeext'
16867 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16868 (eval $ac_try) 2>&5
16869 ac_status=$?
16870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16871 (exit $ac_status); }; }; then
16872 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000016873else
Martin v. Löwis11437992002-04-12 09:54:03 +000016874 echo "$as_me: failed program was:" >&5
16875cat conftest.$ac_ext >&5
16876ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000016877fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016878rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16879LIBS=$ac_check_lib_save_LIBS
16880fi
16881echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
16882echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
16883if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016884
Martin v. Löwis11437992002-04-12 09:54:03 +000016885cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016886#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016887_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016888
Martin v. Löwis0daad592001-09-30 21:09:59 +000016889fi
16890
Michael W. Hudson54241132001-12-07 15:38:26 +000016891
Martin v. Löwis0daad592001-09-30 21:09:59 +000016892# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000016893echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
16894echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
16895if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
16896 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000016897else
Martin v. Löwis11437992002-04-12 09:54:03 +000016898 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000016899LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016900cat >conftest.$ac_ext <<_ACEOF
16901#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000016902#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016903
Martin v. Löwis0daad592001-09-30 21:09:59 +000016904/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016905#ifdef __cplusplus
16906extern "C"
16907#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000016908/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016909 builtin and then its argument prototype would still apply. */
16910char rl_completion_matches ();
Barry Warsawfe33b792003-01-07 22:42:49 +000016911#ifdef F77_DUMMY_MAIN
16912# ifdef __cplusplus
16913 extern "C"
16914# endif
16915 int F77_DUMMY_MAIN() { return 1; }
16916#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016917int
16918main ()
16919{
16920rl_completion_matches ();
16921 ;
16922 return 0;
16923}
16924_ACEOF
16925rm -f conftest.$ac_objext conftest$ac_exeext
16926if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16927 (eval $ac_link) 2>&5
16928 ac_status=$?
16929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16930 (exit $ac_status); } &&
16931 { ac_try='test -s conftest$ac_exeext'
16932 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16933 (eval $ac_try) 2>&5
16934 ac_status=$?
16935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16936 (exit $ac_status); }; }; then
16937 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000016938else
Martin v. Löwis11437992002-04-12 09:54:03 +000016939 echo "$as_me: failed program was:" >&5
16940cat conftest.$ac_ext >&5
16941ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000016942fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016943rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16944LIBS=$ac_check_lib_save_LIBS
16945fi
16946echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
16947echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
16948if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016949
Martin v. Löwis11437992002-04-12 09:54:03 +000016950cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000016951#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016952_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000016953
Guido van Rossum353ae582001-07-10 16:45:32 +000016954fi
16955
Jack Jansendd19cf82001-12-06 22:36:17 +000016956
Martin v. Löwis11437992002-04-12 09:54:03 +000016957echo "$as_me:$LINENO: checking for broken nice()" >&5
16958echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
16959if test "${ac_cv_broken_nice+set}" = set; then
16960 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016961else
Martin v. Löwis11437992002-04-12 09:54:03 +000016962
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016963if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000016964 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016965else
Martin v. Löwis11437992002-04-12 09:54:03 +000016966 cat >conftest.$ac_ext <<_ACEOF
16967#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016968#include "confdefs.h"
16969
16970int main()
16971{
16972 int val1 = nice(1);
16973 if (val1 != -1 && val1 == nice(2))
16974 exit(0);
16975 exit(1);
16976}
16977
Martin v. Löwis11437992002-04-12 09:54:03 +000016978_ACEOF
16979rm -f conftest$ac_exeext
16980if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16981 (eval $ac_link) 2>&5
16982 ac_status=$?
16983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16984 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16986 (eval $ac_try) 2>&5
16987 ac_status=$?
16988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16989 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016990 ac_cv_broken_nice=yes
16991else
Martin v. Löwis11437992002-04-12 09:54:03 +000016992 echo "$as_me: program exited with status $ac_status" >&5
16993echo "$as_me: failed program was:" >&5
16994cat conftest.$ac_ext >&5
16995( exit $ac_status )
16996ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016997fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016998rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016999fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017000fi
17001
Martin v. Löwis11437992002-04-12 09:54:03 +000017002echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
17003echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017004if test "$ac_cv_broken_nice" = yes
17005then
Martin v. Löwis11437992002-04-12 09:54:03 +000017006
17007cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017008#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017009_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017010
17011fi
17012
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017013# tzset(3) exists and works like we expect it to
17014echo "$as_me:$LINENO: checking for working tzset()" >&5
17015echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
17016if test "${ac_cv_working_tzset+set}" = set; then
17017 echo $ECHO_N "(cached) $ECHO_C" >&6
17018else
17019
17020if test "$cross_compiling" = yes; then
17021 ac_cv_working_tzset=no
17022else
17023 cat >conftest.$ac_ext <<_ACEOF
17024#line $LINENO "configure"
17025#include "confdefs.h"
17026
17027#include <stdlib.h>
17028#include <time.h>
17029int main()
17030{
17031 int gmt_hour;
17032 int eastern_hour;
17033 time_t now;
17034 now = time((time_t*)NULL);
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017035 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017036 tzset();
17037 gmt_hour = localtime(&now)->tm_hour;
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017038 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017039 tzset();
17040 eastern_hour = localtime(&now)->tm_hour;
17041 if (eastern_hour == gmt_hour)
17042 exit(1);
17043 exit(0);
17044}
17045
17046_ACEOF
17047rm -f conftest$ac_exeext
17048if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17049 (eval $ac_link) 2>&5
17050 ac_status=$?
17051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17052 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17053 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17054 (eval $ac_try) 2>&5
17055 ac_status=$?
17056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17057 (exit $ac_status); }; }; then
17058 ac_cv_working_tzset=yes
17059else
17060 echo "$as_me: program exited with status $ac_status" >&5
17061echo "$as_me: failed program was:" >&5
17062cat conftest.$ac_ext >&5
17063( exit $ac_status )
17064ac_cv_working_tzset=no
17065fi
17066rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17067fi
17068fi
17069
17070echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
17071echo "${ECHO_T}$ac_cv_working_tzset" >&6
17072if test "$ac_cv_working_tzset" = yes
17073then
17074
17075cat >>confdefs.h <<\_ACEOF
17076#define HAVE_WORKING_TZSET 1
17077_ACEOF
17078
17079fi
17080
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017081# Look for subsecond timestamps in struct stat
17082echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
17083echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
17084if test "${ac_cv_stat_tv_nsec+set}" = set; then
17085 echo $ECHO_N "(cached) $ECHO_C" >&6
17086else
17087 cat >conftest.$ac_ext <<_ACEOF
17088#line $LINENO "configure"
17089#include "confdefs.h"
17090#include <sys/stat.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000017091#ifdef F77_DUMMY_MAIN
17092# ifdef __cplusplus
17093 extern "C"
17094# endif
17095 int F77_DUMMY_MAIN() { return 1; }
17096#endif
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017097int
17098main ()
17099{
17100
17101struct stat st;
17102st.st_mtim.tv_nsec = 1;
17103
17104 ;
17105 return 0;
17106}
17107_ACEOF
17108rm -f conftest.$ac_objext
17109if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17110 (eval $ac_compile) 2>&5
17111 ac_status=$?
17112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17113 (exit $ac_status); } &&
17114 { ac_try='test -s conftest.$ac_objext'
17115 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17116 (eval $ac_try) 2>&5
17117 ac_status=$?
17118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17119 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000017120 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017121else
17122 echo "$as_me: failed program was:" >&5
17123cat conftest.$ac_ext >&5
17124ac_cv_stat_tv_nsec=no
17125fi
17126rm -f conftest.$ac_objext conftest.$ac_ext
17127fi
17128
17129echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
17130echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
17131if test "$ac_cv_stat_tv_nsec" = yes
17132then
17133
17134cat >>confdefs.h <<\_ACEOF
17135#define HAVE_STAT_TV_NSEC 1
17136_ACEOF
17137
17138fi
17139
Jack Jansen666b1e72001-10-31 12:11:48 +000017140# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000017141echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
17142echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
17143if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
17144 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017145else
Martin v. Löwis11437992002-04-12 09:54:03 +000017146 cat >conftest.$ac_ext <<_ACEOF
17147#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000017148#include "confdefs.h"
17149#include <curses.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000017150#ifdef F77_DUMMY_MAIN
17151# ifdef __cplusplus
17152 extern "C"
17153# endif
17154 int F77_DUMMY_MAIN() { return 1; }
17155#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017156int
17157main ()
17158{
Jack Jansen666b1e72001-10-31 12:11:48 +000017159
17160 int rtn;
17161 rtn = mvwdelch(0,0,0);
17162
Martin v. Löwis11437992002-04-12 09:54:03 +000017163 ;
17164 return 0;
17165}
17166_ACEOF
17167rm -f conftest.$ac_objext
17168if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17169 (eval $ac_compile) 2>&5
17170 ac_status=$?
17171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17172 (exit $ac_status); } &&
17173 { ac_try='test -s conftest.$ac_objext'
17174 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17175 (eval $ac_try) 2>&5
17176 ac_status=$?
17177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17178 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017179 ac_cv_mvwdelch_is_expression=yes
17180else
Martin v. Löwis11437992002-04-12 09:54:03 +000017181 echo "$as_me: failed program was:" >&5
17182cat conftest.$ac_ext >&5
17183ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017184fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017185rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017186fi
17187
Martin v. Löwis11437992002-04-12 09:54:03 +000017188echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
17189echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017190
17191if test "$ac_cv_mvwdelch_is_expression" = yes
17192then
Martin v. Löwis11437992002-04-12 09:54:03 +000017193
17194cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017195#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017196_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017197
17198fi
17199
Martin v. Löwis11437992002-04-12 09:54:03 +000017200echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
17201echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
17202if test "${ac_cv_window_has_flags+set}" = set; then
17203 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017204else
Martin v. Löwis11437992002-04-12 09:54:03 +000017205 cat >conftest.$ac_ext <<_ACEOF
17206#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000017207#include "confdefs.h"
17208#include <curses.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000017209#ifdef F77_DUMMY_MAIN
17210# ifdef __cplusplus
17211 extern "C"
17212# endif
17213 int F77_DUMMY_MAIN() { return 1; }
17214#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017215int
17216main ()
17217{
Jack Jansen666b1e72001-10-31 12:11:48 +000017218
17219 WINDOW *w;
17220 w->_flags = 0;
17221
Martin v. Löwis11437992002-04-12 09:54:03 +000017222 ;
17223 return 0;
17224}
17225_ACEOF
17226rm -f conftest.$ac_objext
17227if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17228 (eval $ac_compile) 2>&5
17229 ac_status=$?
17230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17231 (exit $ac_status); } &&
17232 { ac_try='test -s conftest.$ac_objext'
17233 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17234 (eval $ac_try) 2>&5
17235 ac_status=$?
17236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17237 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017238 ac_cv_window_has_flags=yes
17239else
Martin v. Löwis11437992002-04-12 09:54:03 +000017240 echo "$as_me: failed program was:" >&5
17241cat conftest.$ac_ext >&5
17242ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017243fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017244rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017245fi
17246
Martin v. Löwis11437992002-04-12 09:54:03 +000017247echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
17248echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017249
Jack Jansen666b1e72001-10-31 12:11:48 +000017250
17251if test "$ac_cv_window_has_flags" = yes
17252then
Martin v. Löwis11437992002-04-12 09:54:03 +000017253
17254cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017255#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017256_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017257
17258fi
17259
Martin v. Löwis24a880b2002-12-31 12:55:15 +000017260echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
17261echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
17262
17263if test -e /dev/ptmx
17264then
17265 echo "$as_me:$LINENO: result: yes" >&5
17266echo "${ECHO_T}yes" >&6
17267
17268cat >>confdefs.h <<\_ACEOF
17269#define HAVE_DEV_PTMX 1
17270_ACEOF
17271
17272else
17273 echo "$as_me:$LINENO: result: no" >&5
17274echo "${ECHO_T}no" >&6
17275fi
17276
Neal Norwitz865400f2003-03-21 01:42:58 +000017277echo "$as_me:$LINENO: checking for /dev/ptc" >&5
17278echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
17279
17280if test -e /dev/ptc
17281then
17282 echo "$as_me:$LINENO: result: yes" >&5
17283echo "${ECHO_T}yes" >&6
17284
17285cat >>confdefs.h <<\_ACEOF
17286#define HAVE_DEV_PTC 1
17287_ACEOF
17288
17289else
17290 echo "$as_me:$LINENO: result: no" >&5
17291echo "${ECHO_T}no" >&6
17292fi
17293
Martin v. Löwis11437992002-04-12 09:54:03 +000017294echo "$as_me:$LINENO: checking for socklen_t" >&5
17295echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
17296if test "${ac_cv_type_socklen_t+set}" = set; then
17297 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000017298else
Martin v. Löwis11437992002-04-12 09:54:03 +000017299 cat >conftest.$ac_ext <<_ACEOF
17300#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000017301#include "confdefs.h"
Martin v. Löwis01c04012002-11-11 14:58:44 +000017302
17303#ifdef HAVE_SYS_TYPES_H
17304#include <sys/types.h>
17305#endif
17306#ifdef HAVE_SYS_SOCKET_H
17307#include <sys/socket.h>
17308#endif
17309
17310
Barry Warsawfe33b792003-01-07 22:42:49 +000017311#ifdef F77_DUMMY_MAIN
17312# ifdef __cplusplus
17313 extern "C"
17314# endif
17315 int F77_DUMMY_MAIN() { return 1; }
17316#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017317int
17318main ()
17319{
17320if ((socklen_t *) 0)
17321 return 0;
17322if (sizeof (socklen_t))
17323 return 0;
17324 ;
17325 return 0;
17326}
17327_ACEOF
17328rm -f conftest.$ac_objext
17329if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17330 (eval $ac_compile) 2>&5
17331 ac_status=$?
17332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17333 (exit $ac_status); } &&
17334 { ac_try='test -s conftest.$ac_objext'
17335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17336 (eval $ac_try) 2>&5
17337 ac_status=$?
17338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17339 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000017340 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000017341else
Martin v. Löwis11437992002-04-12 09:54:03 +000017342 echo "$as_me: failed program was:" >&5
17343cat conftest.$ac_ext >&5
17344ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000017345fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017346rm -f conftest.$ac_objext conftest.$ac_ext
17347fi
17348echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
17349echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
17350if test $ac_cv_type_socklen_t = yes; then
17351 :
17352else
Guido van Rossum95713eb2000-05-18 20:53:31 +000017353
Martin v. Löwis01c04012002-11-11 14:58:44 +000017354cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017355#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000017356_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017357
17358fi
17359
Michael W. Hudson54241132001-12-07 15:38:26 +000017360
Michael W. Hudson54241132001-12-07 15:38:26 +000017361
17362
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000017363for h in `(cd $srcdir;echo Python/thread_*.h)`
17364do
17365 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
17366done
17367
Michael W. Hudson54241132001-12-07 15:38:26 +000017368
Jack Jansen0b06be72002-06-21 14:48:38 +000017369SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000017370echo "$as_me:$LINENO: checking for build directories" >&5
17371echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017372for dir in $SRCDIRS; do
17373 if test ! -d $dir; then
17374 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000017375 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017376done
Martin v. Löwis11437992002-04-12 09:54:03 +000017377echo "$as_me:$LINENO: result: done" >&5
17378echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000017379
Guido van Rossum627b2d71993-12-24 10:39:16 +000017380# generate output files
Barry Warsawfe33b792003-01-07 22:42:49 +000017381ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017382
Martin v. Löwis11437992002-04-12 09:54:03 +000017383cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017384# This file is a shell script that caches the results of configure
17385# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017386# scripts and configure runs, see configure's option --config-cache.
17387# It is not useful on other systems. If it contains results you don't
17388# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017389#
Martin v. Löwis11437992002-04-12 09:54:03 +000017390# config.status only pays attention to the cache file if you give it
17391# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017392#
Barry Warsawfe33b792003-01-07 22:42:49 +000017393# `ac_cv_env_foo' variables (set or unset) will be overriden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017394# loading this file, other *unset* `ac_cv_foo' will be assigned the
17395# following values.
17396
17397_ACEOF
17398
Guido van Rossumf78abae1997-01-21 22:02:36 +000017399# The following way of writing the cache mishandles newlines in values,
17400# but we know of no workaround that is simple, portable, and efficient.
17401# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017402# Ultrix sh set writes to stderr and can't be redirected directly,
17403# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000017404{
17405 (set) 2>&1 |
17406 case `(ac_space=' '; set | grep ac_space) 2>&1` in
17407 *ac_space=\ *)
17408 # `set' does not quote correctly, so add quotes (double-quote
17409 # substitution turns \\\\ into \\, and sed turns \\ into \).
17410 sed -n \
17411 "s/'/'\\\\''/g;
17412 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17413 ;;
17414 *)
17415 # `set' quotes correctly as required by POSIX, so do not add quotes.
17416 sed -n \
17417 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17418 ;;
17419 esac;
17420} |
17421 sed '
17422 t clear
17423 : clear
17424 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17425 t end
17426 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17427 : end' >>confcache
17428if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017429 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017430 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17431 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017432 else
17433 echo "not updating unwritable cache $cache_file"
17434 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017435fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017436rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017437
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017438test "x$prefix" = xNONE && prefix=$ac_default_prefix
17439# Let make expand exec_prefix.
17440test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017441
Martin v. Löwis11437992002-04-12 09:54:03 +000017442# VPATH may cause trouble with some makes, so we remove $(srcdir),
17443# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17444# trailing colons and then remove the whole line if VPATH becomes empty
17445# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000017446if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017447 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17448s/:*\$(srcdir):*/:/;
17449s/:*\${srcdir}:*/:/;
17450s/:*@srcdir@:*/:/;
17451s/^\([^=]*=[ ]*\):*/\1/;
17452s/:*$//;
17453s/^[^=]*=[ ]*$//;
17454}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017455fi
17456
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017457DEFS=-DHAVE_CONFIG_H
17458
Martin v. Löwis11437992002-04-12 09:54:03 +000017459
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017460: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000017461ac_clean_files_save=$ac_clean_files
17462ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17463{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
17464echo "$as_me: creating $CONFIG_STATUS" >&6;}
17465cat >$CONFIG_STATUS <<_ACEOF
17466#! $SHELL
17467# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017468# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017469# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017470# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017471
Martin v. Löwis11437992002-04-12 09:54:03 +000017472debug=false
17473SHELL=\${CONFIG_SHELL-$SHELL}
17474_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000017475
Martin v. Löwis11437992002-04-12 09:54:03 +000017476cat >>$CONFIG_STATUS <<\_ACEOF
Barry Warsawfe33b792003-01-07 22:42:49 +000017477
Martin v. Löwis11437992002-04-12 09:54:03 +000017478## --------------------- ##
17479## M4sh Initialization. ##
17480## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017481
Martin v. Löwis11437992002-04-12 09:54:03 +000017482# Be Bourne compatible
17483if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17484 emulate sh
17485 NULLCMD=:
17486elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17487 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000017488fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017489
Barry Warsawfe33b792003-01-07 22:42:49 +000017490# NLS nuisances.
Martin v. Löwis11437992002-04-12 09:54:03 +000017491# Support unset when possible.
17492if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17493 as_unset=unset
17494else
17495 as_unset=false
17496fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017497
Barry Warsawfe33b792003-01-07 22:42:49 +000017498(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
17499 { $as_unset LANG || test "${LANG+set}" != set; } ||
17500 { LANG=C; export LANG; }
17501(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
17502 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
17503 { LC_ALL=C; export LC_ALL; }
17504(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
17505 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
17506 { LC_TIME=C; export LC_TIME; }
17507(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
17508 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
17509 { LC_CTYPE=C; export LC_CTYPE; }
17510(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
17511 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
17512 { LANGUAGE=C; export LANGUAGE; }
17513(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
17514 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
17515 { LC_COLLATE=C; export LC_COLLATE; }
17516(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
17517 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
17518 { LC_NUMERIC=C; export LC_NUMERIC; }
17519(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
17520 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
17521 { LC_MESSAGES=C; export LC_MESSAGES; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017522
17523
17524# Name of the executable.
Barry Warsawfe33b792003-01-07 22:42:49 +000017525as_me=`(basename "$0") 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017526$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17527 X"$0" : 'X\(//\)$' \| \
17528 X"$0" : 'X\(/\)$' \| \
17529 . : '\(.\)' 2>/dev/null ||
17530echo X/"$0" |
17531 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
17532 /^X\/\(\/\/\)$/{ s//\1/; q; }
17533 /^X\/\(\/\).*/{ s//\1/; q; }
17534 s/.*/./; q'`
17535
17536# PATH needs CR, and LINENO needs CR and PATH.
17537# Avoid depending upon Character Ranges.
17538as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17539as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17540as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17541as_cr_digits='0123456789'
17542as_cr_alnum=$as_cr_Letters$as_cr_digits
17543
17544# The user is always right.
17545if test "${PATH_SEPARATOR+set}" != set; then
17546 echo "#! /bin/sh" >conftest.sh
17547 echo "exit 0" >>conftest.sh
17548 chmod +x conftest.sh
Barry Warsawfe33b792003-01-07 22:42:49 +000017549 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017550 PATH_SEPARATOR=';'
17551 else
17552 PATH_SEPARATOR=:
17553 fi
17554 rm -f conftest.sh
17555fi
17556
17557
17558 as_lineno_1=$LINENO
17559 as_lineno_2=$LINENO
17560 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17561 test "x$as_lineno_1" != "x$as_lineno_2" &&
17562 test "x$as_lineno_3" = "x$as_lineno_2" || {
17563 # Find who we are. Look in the path if we contain no path at all
17564 # relative or not.
17565 case $0 in
17566 *[\\/]* ) as_myself=$0 ;;
17567 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17568for as_dir in $PATH
17569do
17570 IFS=$as_save_IFS
17571 test -z "$as_dir" && as_dir=.
17572 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17573done
17574
17575 ;;
17576 esac
17577 # We did not find ourselves, most probably we were run as `sh COMMAND'
17578 # in which case we are not to be found in the path.
17579 if test "x$as_myself" = x; then
17580 as_myself=$0
17581 fi
17582 if test ! -f "$as_myself"; then
17583 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
17584echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
17585 { (exit 1); exit 1; }; }
17586 fi
17587 case $CONFIG_SHELL in
17588 '')
17589 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17590for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
17591do
17592 IFS=$as_save_IFS
17593 test -z "$as_dir" && as_dir=.
17594 for as_base in sh bash ksh sh5; do
17595 case $as_dir in
17596 /*)
17597 if ("$as_dir/$as_base" -c '
17598 as_lineno_1=$LINENO
17599 as_lineno_2=$LINENO
17600 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17601 test "x$as_lineno_1" != "x$as_lineno_2" &&
17602 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
17603 CONFIG_SHELL=$as_dir/$as_base
17604 export CONFIG_SHELL
17605 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
17606 fi;;
17607 esac
17608 done
17609done
17610;;
Jack Jansendd19cf82001-12-06 22:36:17 +000017611 esac
17612
Martin v. Löwis11437992002-04-12 09:54:03 +000017613 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
17614 # uniformly replaced by the line number. The first 'sed' inserts a
17615 # line-number line before each line; the second 'sed' does the real
17616 # work. The second script uses 'N' to pair each line-number line
17617 # with the numbered line, and appends trailing '-' during
17618 # substitution so that $LINENO is not a special case at line end.
17619 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
17620 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
17621 sed '=' <$as_myself |
17622 sed '
17623 N
17624 s,$,-,
17625 : loop
17626 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
17627 t loop
17628 s,-$,,
17629 s,^['$as_cr_digits']*\n,,
17630 ' >$as_me.lineno &&
17631 chmod +x $as_me.lineno ||
17632 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
17633echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
17634 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017635
Martin v. Löwis11437992002-04-12 09:54:03 +000017636 # Don't try to exec as it changes $[0], causing all sort of problems
17637 # (the dirname of $[0] is not the place where we might find the
17638 # original and so on. Autoconf is especially sensible to this).
17639 . ./$as_me.lineno
17640 # Exit status is that of the last command.
17641 exit
17642}
17643
17644
17645case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
17646 *c*,-n*) ECHO_N= ECHO_C='
17647' ECHO_T=' ' ;;
17648 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
17649 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
17650esac
17651
17652if expr a : '\(a\)' >/dev/null 2>&1; then
17653 as_expr=expr
17654else
17655 as_expr=false
17656fi
17657
17658rm -f conf$$ conf$$.exe conf$$.file
17659echo >conf$$.file
17660if ln -s conf$$.file conf$$ 2>/dev/null; then
17661 # We could just check for DJGPP; but this test a) works b) is more generic
17662 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17663 if test -f conf$$.exe; then
17664 # Don't use ln at all; we don't have any links
17665 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017666 else
Martin v. Löwis11437992002-04-12 09:54:03 +000017667 as_ln_s='ln -s'
17668 fi
17669elif ln conf$$.file conf$$ 2>/dev/null; then
17670 as_ln_s=ln
17671else
17672 as_ln_s='cp -p'
17673fi
17674rm -f conf$$ conf$$.exe conf$$.file
17675
17676as_executable_p="test -f"
17677
17678# Sed expression to map a string onto a valid CPP name.
17679as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
17680
17681# Sed expression to map a string onto a valid variable name.
17682as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
17683
17684
17685# IFS
17686# We need space, tab and new line, in precisely that order.
17687as_nl='
17688'
17689IFS=" $as_nl"
17690
17691# CDPATH.
Barry Warsawfe33b792003-01-07 22:42:49 +000017692$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017693
17694exec 6>&1
17695
17696# Open the log real soon, to keep \$[0] and so on meaningful, and to
17697# report actual input values of CONFIG_FILES etc. instead of their
17698# values after options handling. Logging --version etc. is OK.
17699exec 5>>config.log
17700{
17701 echo
17702 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17703## Running $as_me. ##
17704_ASBOX
17705} >&5
17706cat >&5 <<_CSEOF
17707
Martin v. Löwis88afe662002-10-26 13:47:44 +000017708This file was extended by python $as_me 2.3, which was
Barry Warsawfe33b792003-01-07 22:42:49 +000017709generated by GNU Autoconf 2.53. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017710
17711 CONFIG_FILES = $CONFIG_FILES
17712 CONFIG_HEADERS = $CONFIG_HEADERS
17713 CONFIG_LINKS = $CONFIG_LINKS
17714 CONFIG_COMMANDS = $CONFIG_COMMANDS
17715 $ $0 $@
17716
17717_CSEOF
17718echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
17719echo >&5
17720_ACEOF
17721
17722# Files that config.status was made for.
17723if test -n "$ac_config_files"; then
17724 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17725fi
17726
17727if test -n "$ac_config_headers"; then
17728 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17729fi
17730
17731if test -n "$ac_config_links"; then
17732 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17733fi
17734
17735if test -n "$ac_config_commands"; then
17736 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17737fi
17738
17739cat >>$CONFIG_STATUS <<\_ACEOF
17740
17741ac_cs_usage="\
17742\`$as_me' instantiates files from templates according to the
17743current configuration.
17744
17745Usage: $0 [OPTIONS] [FILE]...
17746
17747 -h, --help print this help, then exit
17748 -V, --version print version number, then exit
17749 -d, --debug don't remove temporary files
17750 --recheck update $as_me by reconfiguring in the same conditions
17751 --file=FILE[:TEMPLATE]
17752 instantiate the configuration file FILE
17753 --header=FILE[:TEMPLATE]
17754 instantiate the configuration header FILE
17755
17756Configuration files:
17757$config_files
17758
17759Configuration headers:
17760$config_headers
17761
17762Report bugs to <bug-autoconf@gnu.org>."
17763_ACEOF
17764
17765cat >>$CONFIG_STATUS <<_ACEOF
17766ac_cs_version="\\
Martin v. Löwis88afe662002-10-26 13:47:44 +000017767python config.status 2.3
Barry Warsawfe33b792003-01-07 22:42:49 +000017768configured by $0, generated by GNU Autoconf 2.53,
Martin v. Löwis11437992002-04-12 09:54:03 +000017769 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17770
17771Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17772Free Software Foundation, Inc.
17773This config.status script is free software; the Free Software Foundation
17774gives unlimited permission to copy, distribute and modify it."
17775srcdir=$srcdir
17776INSTALL="$INSTALL"
17777_ACEOF
17778
17779cat >>$CONFIG_STATUS <<\_ACEOF
17780# If no file are specified by the user, then we need to provide default
17781# value. By we need to know if files were specified by the user.
17782ac_need_defaults=:
17783while test $# != 0
17784do
17785 case $1 in
17786 --*=*)
17787 ac_option=`expr "x$1" : 'x\([^=]*\)='`
17788 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Barry Warsawfe33b792003-01-07 22:42:49 +000017789 shift
17790 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17791 shift
Martin v. Löwis11437992002-04-12 09:54:03 +000017792 ;;
Barry Warsawfe33b792003-01-07 22:42:49 +000017793 -*);;
Martin v. Löwis11437992002-04-12 09:54:03 +000017794 *) # This is not an option, so the user has probably given explicit
17795 # arguments.
17796 ac_need_defaults=false;;
17797 esac
17798
Barry Warsawfe33b792003-01-07 22:42:49 +000017799 case $1 in
Martin v. Löwis11437992002-04-12 09:54:03 +000017800 # Handling of the options.
17801_ACEOF
17802cat >>$CONFIG_STATUS <<_ACEOF
17803 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17804 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17805 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17806_ACEOF
17807cat >>$CONFIG_STATUS <<\_ACEOF
17808 --version | --vers* | -V )
17809 echo "$ac_cs_version"; exit 0 ;;
17810 --he | --h)
17811 # Conflict between --help and --header
17812 { { echo "$as_me:$LINENO: error: ambiguous option: $1
17813Try \`$0 --help' for more information." >&5
17814echo "$as_me: error: ambiguous option: $1
17815Try \`$0 --help' for more information." >&2;}
17816 { (exit 1); exit 1; }; };;
17817 --help | --hel | -h )
17818 echo "$ac_cs_usage"; exit 0 ;;
17819 --debug | --d* | -d )
17820 debug=: ;;
17821 --file | --fil | --fi | --f )
Barry Warsawfe33b792003-01-07 22:42:49 +000017822 shift
17823 CONFIG_FILES="$CONFIG_FILES $1"
Martin v. Löwis11437992002-04-12 09:54:03 +000017824 ac_need_defaults=false;;
17825 --header | --heade | --head | --hea )
Barry Warsawfe33b792003-01-07 22:42:49 +000017826 shift
17827 CONFIG_HEADERS="$CONFIG_HEADERS $1"
Martin v. Löwis11437992002-04-12 09:54:03 +000017828 ac_need_defaults=false;;
17829
17830 # This is an error.
17831 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
17832Try \`$0 --help' for more information." >&5
17833echo "$as_me: error: unrecognized option: $1
17834Try \`$0 --help' for more information." >&2;}
17835 { (exit 1); exit 1; }; } ;;
17836
17837 *) ac_config_targets="$ac_config_targets $1" ;;
17838
17839 esac
17840 shift
17841done
17842
17843_ACEOF
17844
17845
17846
17847
17848
17849cat >>$CONFIG_STATUS <<\_ACEOF
17850for ac_config_target in $ac_config_targets
17851do
17852 case "$ac_config_target" in
17853 # Handling of arguments.
17854 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17855 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
17856 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17857 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
17858echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17859 { (exit 1); exit 1; }; };;
17860 esac
17861done
17862
17863# If the user did not use the arguments to specify the items to instantiate,
17864# then the envvar interface is used. Set only those that are not.
17865# We use the long form for the default assignment because of an extremely
17866# bizarre bug on SunOS 4.1.3.
17867if $ac_need_defaults; then
17868 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17869 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17870fi
17871
17872# Create a temporary directory, and hook for its removal unless debugging.
17873$debug ||
17874{
17875 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17876 trap '{ (exit 1); exit 1; }' 1 2 13 15
17877}
17878
17879# Create a (secure) tmp directory for tmp files.
17880: ${TMPDIR=/tmp}
17881{
17882 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17883 test -n "$tmp" && test -d "$tmp"
17884} ||
17885{
17886 tmp=$TMPDIR/cs$$-$RANDOM
17887 (umask 077 && mkdir $tmp)
17888} ||
17889{
17890 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17891 { (exit 1); exit 1; }
17892}
17893
17894_ACEOF
17895
17896cat >>$CONFIG_STATUS <<_ACEOF
17897
17898#
17899# CONFIG_FILES section.
17900#
17901
17902# No need to generate the scripts if there are no CONFIG_FILES.
17903# This happens for instance when ./config.status config.h
17904if test -n "\$CONFIG_FILES"; then
17905 # Protect against being on the right side of a sed subst in config.status.
17906 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17907 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17908s,@SHELL@,$SHELL,;t t
17909s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17910s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17911s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17912s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17913s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17914s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17915s,@exec_prefix@,$exec_prefix,;t t
17916s,@prefix@,$prefix,;t t
17917s,@program_transform_name@,$program_transform_name,;t t
17918s,@bindir@,$bindir,;t t
17919s,@sbindir@,$sbindir,;t t
17920s,@libexecdir@,$libexecdir,;t t
17921s,@datadir@,$datadir,;t t
17922s,@sysconfdir@,$sysconfdir,;t t
17923s,@sharedstatedir@,$sharedstatedir,;t t
17924s,@localstatedir@,$localstatedir,;t t
17925s,@libdir@,$libdir,;t t
17926s,@includedir@,$includedir,;t t
17927s,@oldincludedir@,$oldincludedir,;t t
17928s,@infodir@,$infodir,;t t
17929s,@mandir@,$mandir,;t t
17930s,@build_alias@,$build_alias,;t t
17931s,@host_alias@,$host_alias,;t t
17932s,@target_alias@,$target_alias,;t t
17933s,@DEFS@,$DEFS,;t t
17934s,@ECHO_C@,$ECHO_C,;t t
17935s,@ECHO_N@,$ECHO_N,;t t
17936s,@ECHO_T@,$ECHO_T,;t t
17937s,@LIBS@,$LIBS,;t t
17938s,@VERSION@,$VERSION,;t t
17939s,@SOVERSION@,$SOVERSION,;t t
17940s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
17941s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
17942s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
17943s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
17944s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
17945s,@MACHDEP@,$MACHDEP,;t t
17946s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000017947s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000017948s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000017949s,@CXX@,$CXX,;t t
17950s,@MAINOBJ@,$MAINOBJ,;t t
17951s,@EXEEXT@,$EXEEXT,;t t
17952s,@CC@,$CC,;t t
17953s,@CFLAGS@,$CFLAGS,;t t
17954s,@LDFLAGS@,$LDFLAGS,;t t
17955s,@CPPFLAGS@,$CPPFLAGS,;t t
17956s,@ac_ct_CC@,$ac_ct_CC,;t t
17957s,@OBJEXT@,$OBJEXT,;t t
17958s,@CPP@,$CPP,;t t
17959s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
17960s,@LIBRARY@,$LIBRARY,;t t
17961s,@LDLIBRARY@,$LDLIBRARY,;t t
17962s,@DLLLIBRARY@,$DLLLIBRARY,;t t
17963s,@BLDLIBRARY@,$BLDLIBRARY,;t t
17964s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
17965s,@INSTSONAME@,$INSTSONAME,;t t
17966s,@RUNSHARED@,$RUNSHARED,;t t
17967s,@LINKCC@,$LINKCC,;t t
17968s,@RANLIB@,$RANLIB,;t t
17969s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17970s,@AR@,$AR,;t t
17971s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17972s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17973s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17974s,@LN@,$LN,;t t
17975s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000017976s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000017977s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
17978s,@SO@,$SO,;t t
17979s,@LDSHARED@,$LDSHARED,;t t
17980s,@BLDSHARED@,$BLDSHARED,;t t
17981s,@CCSHARED@,$CCSHARED,;t t
17982s,@LINKFORSHARED@,$LINKFORSHARED,;t t
17983s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017984s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000017985s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
17986s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
17987s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
17988s,@LDLAST@,$LDLAST,;t t
17989s,@THREADOBJ@,$THREADOBJ,;t t
17990s,@DLINCLDIR@,$DLINCLDIR,;t t
17991s,@DYNLOADFILE@,$DYNLOADFILE,;t t
17992s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
17993s,@LIBOBJS@,$LIBOBJS,;t t
17994s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
17995s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
17996s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
17997s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
17998s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
17999s,@LIBM@,$LIBM,;t t
18000s,@LIBC@,$LIBC,;t t
18001s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
18002s,@THREADHEADERS@,$THREADHEADERS,;t t
18003s,@SRCDIRS@,$SRCDIRS,;t t
18004CEOF
18005
18006_ACEOF
18007
18008 cat >>$CONFIG_STATUS <<\_ACEOF
18009 # Split the substitutions into bite-sized pieces for seds with
18010 # small command number limits, like on Digital OSF/1 and HP-UX.
18011 ac_max_sed_lines=48
18012 ac_sed_frag=1 # Number of current file.
18013 ac_beg=1 # First line for current file.
18014 ac_end=$ac_max_sed_lines # Line after last line for current file.
18015 ac_more_lines=:
18016 ac_sed_cmds=
18017 while $ac_more_lines; do
18018 if test $ac_beg -gt 1; then
18019 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18020 else
18021 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18022 fi
18023 if test ! -s $tmp/subs.frag; then
18024 ac_more_lines=false
18025 else
18026 # The purpose of the label and of the branching condition is to
18027 # speed up the sed processing (if there are no `@' at all, there
18028 # is no need to browse any of the substitutions).
18029 # These are the two extra sed commands mentioned above.
18030 (echo ':t
18031 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18032 if test -z "$ac_sed_cmds"; then
18033 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18034 else
18035 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18036 fi
18037 ac_sed_frag=`expr $ac_sed_frag + 1`
18038 ac_beg=$ac_end
18039 ac_end=`expr $ac_end + $ac_max_sed_lines`
18040 fi
18041 done
18042 if test -z "$ac_sed_cmds"; then
18043 ac_sed_cmds=cat
18044 fi
18045fi # test -n "$CONFIG_FILES"
18046
18047_ACEOF
18048cat >>$CONFIG_STATUS <<\_ACEOF
18049for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18050 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18051 case $ac_file in
18052 - | *:- | *:-:* ) # input from stdin
18053 cat >$tmp/stdin
18054 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18055 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18056 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18057 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18058 * ) ac_file_in=$ac_file.in ;;
18059 esac
18060
18061 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18062 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18063$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18064 X"$ac_file" : 'X\(//\)[^/]' \| \
18065 X"$ac_file" : 'X\(//\)$' \| \
18066 X"$ac_file" : 'X\(/\)' \| \
18067 . : '\(.\)' 2>/dev/null ||
18068echo X"$ac_file" |
18069 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18070 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18071 /^X\(\/\/\)$/{ s//\1/; q; }
18072 /^X\(\/\).*/{ s//\1/; q; }
18073 s/.*/./; q'`
Barry Warsawfe33b792003-01-07 22:42:49 +000018074 { case "$ac_dir" in
18075 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18076 *) as_incr_dir=.;;
18077esac
18078as_dummy="$ac_dir"
18079for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18080 case $as_mkdir_dir in
18081 # Skip DOS drivespec
18082 ?:) as_incr_dir=$as_mkdir_dir ;;
18083 *)
18084 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18085 test -d "$as_incr_dir" ||
18086 mkdir "$as_incr_dir" ||
18087 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18088echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18089 { (exit 1); exit 1; }; }
18090 ;;
18091 esac
18092done; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018093
18094 ac_builddir=.
18095
18096if test "$ac_dir" != .; then
18097 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18098 # A "../" for each directory in $ac_dir_suffix.
18099 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18100else
18101 ac_dir_suffix= ac_top_builddir=
18102fi
18103
18104case $srcdir in
18105 .) # No --srcdir option. We are building in place.
18106 ac_srcdir=.
18107 if test -z "$ac_top_builddir"; then
18108 ac_top_srcdir=.
18109 else
18110 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18111 fi ;;
18112 [\\/]* | ?:[\\/]* ) # Absolute path.
18113 ac_srcdir=$srcdir$ac_dir_suffix;
18114 ac_top_srcdir=$srcdir ;;
18115 *) # Relative path.
18116 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18117 ac_top_srcdir=$ac_top_builddir$srcdir ;;
18118esac
18119# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18120# absolute.
18121ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwise9416172003-05-03 10:12:45 +000018122ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000018123ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18124ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18125
18126
18127 case $INSTALL in
18128 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18129 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
18130 esac
18131
18132 if test x"$ac_file" != x-; then
18133 { echo "$as_me:$LINENO: creating $ac_file" >&5
18134echo "$as_me: creating $ac_file" >&6;}
18135 rm -f "$ac_file"
18136 fi
18137 # Let's still pretend it is `configure' which instantiates (i.e., don't
18138 # use $as_me), people would be surprised to read:
18139 # /* config.h. Generated by config.status. */
18140 if test x"$ac_file" = x-; then
18141 configure_input=
18142 else
18143 configure_input="$ac_file. "
18144 fi
18145 configure_input=$configure_input"Generated from `echo $ac_file_in |
18146 sed 's,.*/,,'` by configure."
18147
18148 # First look for the input files in the build tree, otherwise in the
18149 # src tree.
18150 ac_file_inputs=`IFS=:
18151 for f in $ac_file_in; do
18152 case $f in
18153 -) echo $tmp/stdin ;;
18154 [\\/$]*)
18155 # Absolute (can't be DOS-style, as IFS=:)
18156 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18157echo "$as_me: error: cannot find input file: $f" >&2;}
18158 { (exit 1); exit 1; }; }
18159 echo $f;;
18160 *) # Relative
18161 if test -f "$f"; then
18162 # Build tree
18163 echo $f
18164 elif test -f "$srcdir/$f"; then
18165 # Source tree
18166 echo $srcdir/$f
18167 else
18168 # /dev/null tree
18169 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18170echo "$as_me: error: cannot find input file: $f" >&2;}
18171 { (exit 1); exit 1; }; }
18172 fi;;
18173 esac
18174 done` || { (exit 1); exit 1; }
18175_ACEOF
18176cat >>$CONFIG_STATUS <<_ACEOF
18177 sed "$ac_vpsub
18178$extrasub
18179_ACEOF
18180cat >>$CONFIG_STATUS <<\_ACEOF
18181:t
18182/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18183s,@configure_input@,$configure_input,;t t
18184s,@srcdir@,$ac_srcdir,;t t
18185s,@abs_srcdir@,$ac_abs_srcdir,;t t
18186s,@top_srcdir@,$ac_top_srcdir,;t t
18187s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18188s,@builddir@,$ac_builddir,;t t
18189s,@abs_builddir@,$ac_abs_builddir,;t t
18190s,@top_builddir@,$ac_top_builddir,;t t
18191s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
18192s,@INSTALL@,$ac_INSTALL,;t t
18193" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18194 rm -f $tmp/stdin
18195 if test x"$ac_file" != x-; then
18196 mv $tmp/out $ac_file
18197 else
18198 cat $tmp/out
18199 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018200 fi
18201
Martin v. Löwis11437992002-04-12 09:54:03 +000018202done
18203_ACEOF
18204cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018205
Martin v. Löwis11437992002-04-12 09:54:03 +000018206#
18207# CONFIG_HEADER section.
18208#
Guido van Rossum627b2d71993-12-24 10:39:16 +000018209
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018210# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18211# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000018212#
18213# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000018214ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18215ac_dB='[ ].*$,\1#\2'
18216ac_dC=' '
18217ac_dD=',;t'
18218# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18219ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18220ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018221ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000018222ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018223
Martin v. Löwis11437992002-04-12 09:54:03 +000018224for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000018225 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000018226 case $ac_file in
18227 - | *:- | *:-:* ) # input from stdin
18228 cat >$tmp/stdin
18229 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18230 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18231 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18232 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18233 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018234 esac
18235
Martin v. Löwis11437992002-04-12 09:54:03 +000018236 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
18237echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000018238
Martin v. Löwis11437992002-04-12 09:54:03 +000018239 # First look for the input files in the build tree, otherwise in the
18240 # src tree.
18241 ac_file_inputs=`IFS=:
18242 for f in $ac_file_in; do
18243 case $f in
18244 -) echo $tmp/stdin ;;
18245 [\\/$]*)
18246 # Absolute (can't be DOS-style, as IFS=:)
18247 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18248echo "$as_me: error: cannot find input file: $f" >&2;}
18249 { (exit 1); exit 1; }; }
18250 echo $f;;
18251 *) # Relative
18252 if test -f "$f"; then
18253 # Build tree
18254 echo $f
18255 elif test -f "$srcdir/$f"; then
18256 # Source tree
18257 echo $srcdir/$f
18258 else
18259 # /dev/null tree
18260 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18261echo "$as_me: error: cannot find input file: $f" >&2;}
18262 { (exit 1); exit 1; }; }
18263 fi;;
18264 esac
18265 done` || { (exit 1); exit 1; }
18266 # Remove the trailing spaces.
18267 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018268
Martin v. Löwis11437992002-04-12 09:54:03 +000018269_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018270
Martin v. Löwis11437992002-04-12 09:54:03 +000018271# Transform confdefs.h into two sed scripts, `conftest.defines' and
18272# `conftest.undefs', that substitutes the proper values into
18273# config.h.in to produce config.h. The first handles `#define'
18274# templates, and the second `#undef' templates.
18275# And first: Protect against being on the right side of a sed subst in
18276# config.status. Protect against being in an unquoted here document
18277# in config.status.
18278rm -f conftest.defines conftest.undefs
18279# Using a here document instead of a string reduces the quoting nightmare.
18280# Putting comments in sed scripts is not portable.
18281#
18282# `end' is used to avoid that the second main sed command (meant for
18283# 0-ary CPP macros) applies to n-ary macro definitions.
18284# See the Autoconf documentation for `clear'.
18285cat >confdef2sed.sed <<\_ACEOF
18286s/[\\&,]/\\&/g
18287s,[\\$`],\\&,g
18288t clear
18289: clear
18290s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
18291t end
18292s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
18293: end
18294_ACEOF
18295# If some macros were called several times there might be several times
18296# the same #defines, which is useless. Nevertheless, we may not want to
18297# sort them, since we want the *last* AC-DEFINE to be honored.
18298uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
18299sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
18300rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018301
18302# This sed command replaces #undef with comments. This is necessary, for
18303# example, in the case of _POSIX_SOURCE, which is predefined and required
18304# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000018305cat >>conftest.undefs <<\_ACEOF
18306s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
18307_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018308
Martin v. Löwis11437992002-04-12 09:54:03 +000018309# Break up conftest.defines because some shells have a limit on the size
18310# of here documents, and old seds have small limits too (100 cmds).
18311echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Barry Warsawfe33b792003-01-07 22:42:49 +000018312echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018313echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
18314echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018315rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000018316while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000018317do
Martin v. Löwis11437992002-04-12 09:54:03 +000018318 # Write a limited-size here document to $tmp/defines.sed.
18319 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
18320 # Speed up: don't consider the non `#define' lines.
18321 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
18322 # Work around the forget-to-reset-the-flag bug.
18323 echo 't clr' >>$CONFIG_STATUS
18324 echo ': clr' >>$CONFIG_STATUS
18325 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018326 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018327 sed -f $tmp/defines.sed $tmp/in >$tmp/out
18328 rm -f $tmp/in
18329 mv $tmp/out $tmp/in
18330' >>$CONFIG_STATUS
18331 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
18332 rm -f conftest.defines
18333 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000018334done
Martin v. Löwis11437992002-04-12 09:54:03 +000018335rm -f conftest.defines
Barry Warsawfe33b792003-01-07 22:42:49 +000018336echo ' fi # egrep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018337echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018338
Martin v. Löwis11437992002-04-12 09:54:03 +000018339# Break up conftest.undefs because some shells have a limit on the size
18340# of here documents, and old seds have small limits too (100 cmds).
18341echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
18342rm -f conftest.tail
18343while grep . conftest.undefs >/dev/null
18344do
18345 # Write a limited-size here document to $tmp/undefs.sed.
18346 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
18347 # Speed up: don't consider the non `#undef'
18348 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
18349 # Work around the forget-to-reset-the-flag bug.
18350 echo 't clr' >>$CONFIG_STATUS
18351 echo ': clr' >>$CONFIG_STATUS
18352 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
18353 echo 'CEOF
18354 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
18355 rm -f $tmp/in
18356 mv $tmp/out $tmp/in
18357' >>$CONFIG_STATUS
18358 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
18359 rm -f conftest.undefs
18360 mv conftest.tail conftest.undefs
18361done
18362rm -f conftest.undefs
18363
18364cat >>$CONFIG_STATUS <<\_ACEOF
18365 # Let's still pretend it is `configure' which instantiates (i.e., don't
18366 # use $as_me), people would be surprised to read:
18367 # /* config.h. Generated by config.status. */
18368 if test x"$ac_file" = x-; then
18369 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000018370 else
Martin v. Löwis11437992002-04-12 09:54:03 +000018371 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000018372 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018373 cat $tmp/in >>$tmp/config.h
18374 rm -f $tmp/in
18375 if test x"$ac_file" != x-; then
18376 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
18377 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
18378echo "$as_me: $ac_file is unchanged" >&6;}
18379 else
18380 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18381$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18382 X"$ac_file" : 'X\(//\)[^/]' \| \
18383 X"$ac_file" : 'X\(//\)$' \| \
18384 X"$ac_file" : 'X\(/\)' \| \
18385 . : '\(.\)' 2>/dev/null ||
18386echo X"$ac_file" |
18387 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18388 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18389 /^X\(\/\/\)$/{ s//\1/; q; }
18390 /^X\(\/\).*/{ s//\1/; q; }
18391 s/.*/./; q'`
Barry Warsawfe33b792003-01-07 22:42:49 +000018392 { case "$ac_dir" in
18393 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18394 *) as_incr_dir=.;;
18395esac
18396as_dummy="$ac_dir"
18397for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18398 case $as_mkdir_dir in
18399 # Skip DOS drivespec
18400 ?:) as_incr_dir=$as_mkdir_dir ;;
18401 *)
18402 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18403 test -d "$as_incr_dir" ||
18404 mkdir "$as_incr_dir" ||
18405 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18406echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18407 { (exit 1); exit 1; }; }
18408 ;;
18409 esac
18410done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018411
Martin v. Löwis11437992002-04-12 09:54:03 +000018412 rm -f $ac_file
18413 mv $tmp/config.h $ac_file
18414 fi
18415 else
18416 cat $tmp/config.h
18417 rm -f $tmp/config.h
18418 fi
18419done
18420_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000018421
Martin v. Löwis11437992002-04-12 09:54:03 +000018422cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018423
Martin v. Löwis11437992002-04-12 09:54:03 +000018424{ (exit 0); exit 0; }
18425_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018426chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018427ac_clean_files=$ac_clean_files_save
18428
18429
18430# configure is writing to config.log, and then calls config.status.
18431# config.status does its own redirection, appending to config.log.
18432# Unfortunately, on DOS this fails, as config.log is still kept open
18433# by configure, so config.status won't be able to write to it; its
18434# output is simply discarded. So we exec the FD to /dev/null,
18435# effectively closing config.log, so it can be properly (re)opened and
18436# appended to by config.status. When coming back to configure, we
18437# need to make the FD available again.
18438if test "$no_create" != yes; then
18439 ac_cs_success=:
18440 exec 5>/dev/null
18441 $SHELL $CONFIG_STATUS || ac_cs_success=false
18442 exec 5>>config.log
18443 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18444 # would make configure fail if this is the last instruction.
18445 $ac_cs_success || { (exit 1); exit 1; }
18446fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018447
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018448
18449echo "creating Setup"
18450if test ! -f Modules/Setup
18451then
18452 cp $srcdir/Modules/Setup.dist Modules/Setup
18453fi
18454
18455echo "creating Setup.local"
18456if test ! -f Modules/Setup.local
18457then
18458 echo "# Edit this file for local setup changes" >Modules/Setup.local
18459fi
18460
18461echo "creating Makefile"
18462$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
18463 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000018464 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018465mv config.c Modules