blob: 952b430e84b34b7467415046ce27a373582a1b49 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwisf2e488d2003-05-05 22:00:11 +00002# From configure.in Revision: 1.407 .
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öwis53e73c32003-05-05 05:13:18 +00001357 # On UnixWare 7, u_short is never defined with _XOPEN_SOURCE,
1358 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
1359 OpenUNIX/8.0| UnixWare/7.1.[13])
1360 define_xopen_source=no;;
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001361esac
1362
1363if test $define_xopen_source = yes
1364then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001365
1366cat >>confdefs.h <<\_ACEOF
1367#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001368_ACEOF
1369
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001370
1371 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1372 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1373 # several APIs are not declared. Since this is also needed in some
1374 # cases for HP-UX, we define it globally.
1375
1376
1377cat >>confdefs.h <<\_ACEOF
1378#define _XOPEN_SOURCE_EXTENDED 1
1379_ACEOF
1380
1381
1382cat >>confdefs.h <<\_ACEOF
1383#define _POSIX_C_SOURCE 200112L
1384_ACEOF
1385
1386
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001387fi
1388
Guido van Rossum91922671997-10-09 20:24:13 +00001389#
1390# SGI compilers allow the specification of the both the ABI and the
1391# ISA on the command line. Depending on the values of these switches,
1392# different and often incompatable code will be generated.
1393#
1394# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1395# thus supply support for various ABI/ISA combinations. The MACHDEP
1396# variable is also adjusted.
1397#
1398
1399if test ! -z "$SGI_ABI"
1400then
1401 CC="cc $SGI_ABI"
1402 LDFLAGS="$SGI_ABI $LDFLAGS"
1403 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1404fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001405echo "$as_me:$LINENO: result: $MACHDEP" >&5
1406echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001407
Jack Jansen83f898c2002-12-30 22:23:40 +00001408# And add extra plat-mac for darwin
1409
Jack Jansen7b59b422003-03-17 15:44:10 +00001410
Jack Jansen83f898c2002-12-30 22:23:40 +00001411echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1412echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1413if test -z "$EXTRAPLATDIR"
1414then
1415 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001416 darwin)
1417 EXTRAPLATDIR="\$(PLATMACDIRS)"
1418 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1419 ;;
1420 *)
1421 EXTRAPLATDIR=""
1422 EXTRAMACHDEPPATH=""
1423 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001424 esac
1425fi
1426echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1427echo "${ECHO_T}$EXTRAPLATDIR" >&6
1428
Guido van Rossum627b2d71993-12-24 10:39:16 +00001429# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001430
1431# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1432# for debug/optimization stuff. BASECFLAGS is for flags that are required
1433# just to get things to compile and link. Users are free to override OPT
1434# when running configure or make. The build should not break if they do.
1435# BASECFLAGS should generally not be messed with, however.
1436
1437# XXX shouldn't some/most/all of this code be merged with the stuff later
1438# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001439echo "$as_me:$LINENO: checking for --without-gcc" >&5
1440echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1441
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001442# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001443if test "${with_gcc+set}" = set; then
1444 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001445
Guido van Rossum7f43da71994-08-01 12:15:30 +00001446 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001447 no) CC=cc
1448 without_gcc=yes;;
1449 yes) CC=gcc
1450 without_gcc=no;;
1451 *) CC=$withval
1452 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001453 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001454else
Martin v. Löwis11437992002-04-12 09:54:03 +00001455
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001456 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001457 AIX*) CC=cc_r
1458 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001459 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001460 case $BE_HOST_CPU in
1461 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001462 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001463 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001464 BASECFLAGS="$BASECFLAGS -export pragma"
1465 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001466 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001467 ;;
1468 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001469 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001470 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001471 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001472 ;;
1473 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001474 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1475echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1476 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001477 ;;
1478 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001479 AR="\$(srcdir)/Modules/ar_beos"
1480 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001481 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001482 Monterey*)
1483 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001484 without_gcc=;;
1485 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001486 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001487fi;
1488echo "$as_me:$LINENO: result: $without_gcc" >&5
1489echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001490
1491
Guido van Rossum95012191999-12-16 17:50:52 +00001492
Fred Drakea1a84e72001-03-06 05:52:16 +00001493MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001494echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1495echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1496
Guido van Rossum95012191999-12-16 17:50:52 +00001497# Check whether --with-cxx or --without-cxx was given.
1498if test "${with_cxx+set}" = set; then
1499 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001500
Martin v. Löwis22352952000-12-13 17:37:02 +00001501 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001502 case $withval in
1503 no) CXX=
1504 with_cxx=no;;
1505 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001506 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001507 with_cxx=$withval;;
1508 esac
1509else
Martin v. Löwis11437992002-04-12 09:54:03 +00001510
Guido van Rossum95012191999-12-16 17:50:52 +00001511 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001512 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001513
Martin v. Löwis11437992002-04-12 09:54:03 +00001514fi;
1515echo "$as_me:$LINENO: result: $with_cxx" >&5
1516echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001517
1518if test "$with_cxx" = "yes"
1519then
Martin v. Löwis11437992002-04-12 09:54:03 +00001520 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1521echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1522 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001523fi
1524
1525
1526
1527
Martin v. Löwis11437992002-04-12 09:54:03 +00001528if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001529then
1530 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1531do
Martin v. Löwis11437992002-04-12 09:54:03 +00001532 # 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 +00001533set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001534echo "$as_me:$LINENO: checking for $ac_word" >&5
1535echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1536if test "${ac_cv_prog_CXX+set}" = set; then
1537 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001538else
1539 if test -n "$CXX"; then
1540 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1541else
Martin v. Löwis11437992002-04-12 09:54:03 +00001542as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1543for as_dir in $PATH
1544do
1545 IFS=$as_save_IFS
1546 test -z "$as_dir" && as_dir=.
1547 for ac_exec_ext in '' $ac_executable_extensions; do
1548 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1549 ac_cv_prog_CXX="$ac_prog"
1550 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1551 break 2
1552 fi
1553done
1554done
1555
Martin v. Löwis22352952000-12-13 17:37:02 +00001556fi
1557fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001558CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001559if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001560 echo "$as_me:$LINENO: result: $CXX" >&5
1561echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001562else
Martin v. Löwis11437992002-04-12 09:54:03 +00001563 echo "$as_me:$LINENO: result: no" >&5
1564echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001565fi
1566
Martin v. Löwis11437992002-04-12 09:54:03 +00001567 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001568done
1569test -n "$CXX" || CXX="notfound"
1570
1571 if test "$CXX" = "notfound"
1572 then
1573 CXX=
1574 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001575 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001576ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001577ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1578ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1579ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1580 cat >conftest.$ac_ext <<_ACEOF
1581#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001582#include "confdefs.h"
1583
Barry Warsawfe33b792003-01-07 22:42:49 +00001584#ifdef F77_DUMMY_MAIN
1585# ifdef __cplusplus
1586 extern "C"
1587# endif
1588 int F77_DUMMY_MAIN() { return 1; }
1589#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00001590int
1591main ()
1592{
Michael W. Hudson54241132001-12-07 15:38:26 +00001593
Martin v. Löwis11437992002-04-12 09:54:03 +00001594 ;
1595 return 0;
1596}
1597_ACEOF
1598ac_clean_files_save=$ac_clean_files
1599ac_clean_files="$ac_clean_files a.out a.exe"
1600# Try to create an executable without -o first, disregard a.out.
1601# It will help us diagnose broken compilers, and finding out an intuition
1602# of exeext.
1603echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1604echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1605ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1606if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1607 (eval $ac_link_default) 2>&5
1608 ac_status=$?
1609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1610 (exit $ac_status); }; then
1611 # Find the output, starting from the most likely. This scheme is
1612# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1613# resort.
1614
1615# Be careful to initialize this variable, since it used to be cached.
1616# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1617ac_cv_exeext=
Barry Warsawfe33b792003-01-07 22:42:49 +00001618for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1619 ls a.out conftest 2>/dev/null;
1620 ls a.* conftest.* 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001621 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00001622 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001623 a.out ) # We found the default executable, but exeext='' is most
1624 # certainly right.
1625 break;;
1626 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1627 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1628 export ac_cv_exeext
1629 break;;
1630 * ) break;;
1631 esac
1632done
1633else
1634 echo "$as_me: failed program was:" >&5
1635cat conftest.$ac_ext >&5
Barry Warsawfe33b792003-01-07 22:42:49 +00001636{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1637echo "$as_me: error: C++ compiler cannot create executables" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001638 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001639fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001640
1641ac_exeext=$ac_cv_exeext
1642echo "$as_me:$LINENO: result: $ac_file" >&5
1643echo "${ECHO_T}$ac_file" >&6
1644
1645# Check the compiler produces executables we can run. If not, either
1646# the compiler is broken, or we cross compile.
1647echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1648echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1649# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1650# If not cross compiling, check that we can run a simple program.
1651if test "$cross_compiling" != yes; then
1652 if { ac_try='./$ac_file'
1653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1654 (eval $ac_try) 2>&5
1655 ac_status=$?
1656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1657 (exit $ac_status); }; }; then
1658 cross_compiling=no
1659 else
1660 if test "$cross_compiling" = maybe; then
1661 cross_compiling=yes
1662 else
1663 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1664If you meant to cross compile, use \`--host'." >&5
1665echo "$as_me: error: cannot run C++ compiled programs.
1666If you meant to cross compile, use \`--host'." >&2;}
1667 { (exit 1); exit 1; }; }
1668 fi
1669 fi
1670fi
1671echo "$as_me:$LINENO: result: yes" >&5
1672echo "${ECHO_T}yes" >&6
1673
1674rm -f a.out a.exe conftest$ac_cv_exeext
1675ac_clean_files=$ac_clean_files_save
1676# Check the compiler produces executables we can run. If not, either
1677# the compiler is broken, or we cross compile.
1678echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1679echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1680echo "$as_me:$LINENO: result: $cross_compiling" >&5
1681echo "${ECHO_T}$cross_compiling" >&6
1682
1683echo "$as_me:$LINENO: checking for suffix of executables" >&5
1684echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1685if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1686 (eval $ac_link) 2>&5
1687 ac_status=$?
1688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1689 (exit $ac_status); }; then
1690 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1691# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1692# work properly (i.e., refer to `conftest.exe'), while it won't with
1693# `rm'.
Barry Warsawfe33b792003-01-07 22:42:49 +00001694for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001695 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00001696 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001697 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1698 export ac_cv_exeext
1699 break;;
1700 * ) break;;
1701 esac
1702done
1703else
1704 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1705echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1706 { (exit 1); exit 1; }; }
1707fi
1708
1709rm -f conftest$ac_cv_exeext
1710echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1711echo "${ECHO_T}$ac_cv_exeext" >&6
1712
1713rm -f conftest.$ac_ext
1714EXEEXT=$ac_cv_exeext
1715ac_exeext=$EXEEXT
1716
1717 ac_ext=c
1718ac_cpp='$CPP $CPPFLAGS'
1719ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1720ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1721ac_compiler_gnu=$ac_cv_c_compiler_gnu
1722
1723
Martin v. Löwis22352952000-12-13 17:37:02 +00001724
1725 fi
1726fi
1727
Guido van Rossum8b131c51995-03-09 14:10:13 +00001728# If the user switches compilers, we can't believe the cache
1729if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1730then
Martin v. Löwis11437992002-04-12 09:54:03 +00001731 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1732(it is also a good idea to do 'make clean' before compiling)" >&5
1733echo "$as_me: error: cached CC is different -- throw away $cache_file
1734(it is also a good idea to do 'make clean' before compiling)" >&2;}
1735 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001736fi
1737
Martin v. Löwis11437992002-04-12 09:54:03 +00001738ac_ext=c
1739ac_cpp='$CPP $CPPFLAGS'
1740ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1741ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1742ac_compiler_gnu=$ac_cv_c_compiler_gnu
1743if test -n "$ac_tool_prefix"; then
1744 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1745set dummy ${ac_tool_prefix}gcc; ac_word=$2
1746echo "$as_me:$LINENO: checking for $ac_word" >&5
1747echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1748if test "${ac_cv_prog_CC+set}" = set; then
1749 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001750else
1751 if test -n "$CC"; then
1752 ac_cv_prog_CC="$CC" # Let the user override the test.
1753else
Martin v. Löwis11437992002-04-12 09:54:03 +00001754as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1755for as_dir in $PATH
1756do
1757 IFS=$as_save_IFS
1758 test -z "$as_dir" && as_dir=.
1759 for ac_exec_ext in '' $ac_executable_extensions; do
1760 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1761 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1762 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1763 break 2
1764 fi
1765done
1766done
1767
Jack Jansendd19cf82001-12-06 22:36:17 +00001768fi
1769fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001770CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001771if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001772 echo "$as_me:$LINENO: result: $CC" >&5
1773echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001774else
Martin v. Löwis11437992002-04-12 09:54:03 +00001775 echo "$as_me:$LINENO: result: no" >&5
1776echo "${ECHO_T}no" >&6
1777fi
1778
1779fi
1780if test -z "$ac_cv_prog_CC"; then
1781 ac_ct_CC=$CC
1782 # Extract the first word of "gcc", so it can be a program name with args.
1783set dummy gcc; ac_word=$2
1784echo "$as_me:$LINENO: checking for $ac_word" >&5
1785echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1786if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1787 echo $ECHO_N "(cached) $ECHO_C" >&6
1788else
1789 if test -n "$ac_ct_CC"; then
1790 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1791else
1792as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1793for as_dir in $PATH
1794do
1795 IFS=$as_save_IFS
1796 test -z "$as_dir" && as_dir=.
1797 for ac_exec_ext in '' $ac_executable_extensions; do
1798 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1799 ac_cv_prog_ac_ct_CC="gcc"
1800 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1801 break 2
1802 fi
1803done
1804done
1805
1806fi
1807fi
1808ac_ct_CC=$ac_cv_prog_ac_ct_CC
1809if test -n "$ac_ct_CC"; then
1810 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1811echo "${ECHO_T}$ac_ct_CC" >&6
1812else
1813 echo "$as_me:$LINENO: result: no" >&5
1814echo "${ECHO_T}no" >&6
1815fi
1816
1817 CC=$ac_ct_CC
1818else
1819 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001820fi
1821
Jack Jansendd19cf82001-12-06 22:36:17 +00001822if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001823 if test -n "$ac_tool_prefix"; then
1824 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1825set dummy ${ac_tool_prefix}cc; ac_word=$2
1826echo "$as_me:$LINENO: checking for $ac_word" >&5
1827echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1828if test "${ac_cv_prog_CC+set}" = set; then
1829 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001830else
1831 if test -n "$CC"; then
1832 ac_cv_prog_CC="$CC" # Let the user override the test.
1833else
Martin v. Löwis11437992002-04-12 09:54:03 +00001834as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1835for as_dir in $PATH
1836do
1837 IFS=$as_save_IFS
1838 test -z "$as_dir" && as_dir=.
1839 for ac_exec_ext in '' $ac_executable_extensions; do
1840 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1841 ac_cv_prog_CC="${ac_tool_prefix}cc"
1842 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1843 break 2
1844 fi
1845done
1846done
1847
1848fi
1849fi
1850CC=$ac_cv_prog_CC
1851if test -n "$CC"; then
1852 echo "$as_me:$LINENO: result: $CC" >&5
1853echo "${ECHO_T}$CC" >&6
1854else
1855 echo "$as_me:$LINENO: result: no" >&5
1856echo "${ECHO_T}no" >&6
1857fi
1858
1859fi
1860if test -z "$ac_cv_prog_CC"; then
1861 ac_ct_CC=$CC
1862 # Extract the first word of "cc", so it can be a program name with args.
1863set dummy cc; ac_word=$2
1864echo "$as_me:$LINENO: checking for $ac_word" >&5
1865echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1866if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1867 echo $ECHO_N "(cached) $ECHO_C" >&6
1868else
1869 if test -n "$ac_ct_CC"; then
1870 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1871else
1872as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1873for as_dir in $PATH
1874do
1875 IFS=$as_save_IFS
1876 test -z "$as_dir" && as_dir=.
1877 for ac_exec_ext in '' $ac_executable_extensions; do
1878 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1879 ac_cv_prog_ac_ct_CC="cc"
1880 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1881 break 2
1882 fi
1883done
1884done
1885
1886fi
1887fi
1888ac_ct_CC=$ac_cv_prog_ac_ct_CC
1889if test -n "$ac_ct_CC"; then
1890 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1891echo "${ECHO_T}$ac_ct_CC" >&6
1892else
1893 echo "$as_me:$LINENO: result: no" >&5
1894echo "${ECHO_T}no" >&6
1895fi
1896
1897 CC=$ac_ct_CC
1898else
1899 CC="$ac_cv_prog_CC"
1900fi
1901
1902fi
1903if test -z "$CC"; then
1904 # Extract the first word of "cc", so it can be a program name with args.
1905set dummy cc; ac_word=$2
1906echo "$as_me:$LINENO: checking for $ac_word" >&5
1907echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1908if test "${ac_cv_prog_CC+set}" = set; then
1909 echo $ECHO_N "(cached) $ECHO_C" >&6
1910else
1911 if test -n "$CC"; then
1912 ac_cv_prog_CC="$CC" # Let the user override the test.
1913else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001914 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001915as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1916for as_dir in $PATH
1917do
1918 IFS=$as_save_IFS
1919 test -z "$as_dir" && as_dir=.
1920 for ac_exec_ext in '' $ac_executable_extensions; do
1921 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1922 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1923 ac_prog_rejected=yes
1924 continue
1925 fi
1926 ac_cv_prog_CC="cc"
1927 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1928 break 2
1929 fi
1930done
1931done
1932
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001933if test $ac_prog_rejected = yes; then
1934 # We found a bogon in the path, so make sure we never use it.
1935 set dummy $ac_cv_prog_CC
1936 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001937 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001938 # We chose a different compiler from the bogus one.
1939 # However, it has the same basename, so the bogon will be chosen
1940 # first if we set CC to just the basename; use the full file name.
1941 shift
Barry Warsawfe33b792003-01-07 22:42:49 +00001942 set dummy "$as_dir/$ac_word" ${1+"$@"}
1943 shift
1944 ac_cv_prog_CC="$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001945 fi
1946fi
1947fi
1948fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001949CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001950if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001951 echo "$as_me:$LINENO: result: $CC" >&5
1952echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001953else
Martin v. Löwis11437992002-04-12 09:54:03 +00001954 echo "$as_me:$LINENO: result: no" >&5
1955echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001956fi
1957
Martin v. Löwis11437992002-04-12 09:54:03 +00001958fi
1959if test -z "$CC"; then
1960 if test -n "$ac_tool_prefix"; then
1961 for ac_prog in cl
1962 do
1963 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1964set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1965echo "$as_me:$LINENO: checking for $ac_word" >&5
1966echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1967if test "${ac_cv_prog_CC+set}" = set; then
1968 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001969else
1970 if test -n "$CC"; then
1971 ac_cv_prog_CC="$CC" # Let the user override the test.
1972else
Martin v. Löwis11437992002-04-12 09:54:03 +00001973as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1974for as_dir in $PATH
1975do
1976 IFS=$as_save_IFS
1977 test -z "$as_dir" && as_dir=.
1978 for ac_exec_ext in '' $ac_executable_extensions; do
1979 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1980 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1981 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1982 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001983 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001984done
1985done
1986
1987fi
1988fi
1989CC=$ac_cv_prog_CC
1990if test -n "$CC"; then
1991 echo "$as_me:$LINENO: result: $CC" >&5
1992echo "${ECHO_T}$CC" >&6
1993else
1994 echo "$as_me:$LINENO: result: no" >&5
1995echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001996fi
1997
Martin v. Löwis11437992002-04-12 09:54:03 +00001998 test -n "$CC" && break
1999 done
2000fi
2001if test -z "$CC"; then
2002 ac_ct_CC=$CC
2003 for ac_prog in cl
2004do
2005 # Extract the first word of "$ac_prog", so it can be a program name with args.
2006set dummy $ac_prog; ac_word=$2
2007echo "$as_me:$LINENO: checking for $ac_word" >&5
2008echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2009if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2010 echo $ECHO_N "(cached) $ECHO_C" >&6
2011else
2012 if test -n "$ac_ct_CC"; then
2013 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2014else
2015as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2016for as_dir in $PATH
2017do
2018 IFS=$as_save_IFS
2019 test -z "$as_dir" && as_dir=.
2020 for ac_exec_ext in '' $ac_executable_extensions; do
2021 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2022 ac_cv_prog_ac_ct_CC="$ac_prog"
2023 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2024 break 2
2025 fi
2026done
2027done
Jack Jansendd19cf82001-12-06 22:36:17 +00002028
Martin v. Löwis11437992002-04-12 09:54:03 +00002029fi
2030fi
2031ac_ct_CC=$ac_cv_prog_ac_ct_CC
2032if test -n "$ac_ct_CC"; then
2033 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2034echo "${ECHO_T}$ac_ct_CC" >&6
2035else
2036 echo "$as_me:$LINENO: result: no" >&5
2037echo "${ECHO_T}no" >&6
2038fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002039
Martin v. Löwis11437992002-04-12 09:54:03 +00002040 test -n "$ac_ct_CC" && break
2041done
Michael W. Hudson54241132001-12-07 15:38:26 +00002042
Martin v. Löwis11437992002-04-12 09:54:03 +00002043 CC=$ac_ct_CC
2044fi
2045
2046fi
2047
2048
2049test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
2050echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
2051 { (exit 1); exit 1; }; }
2052
2053# Provide some information about the compiler.
2054echo "$as_me:$LINENO:" \
2055 "checking for C compiler version" >&5
2056ac_compiler=`set X $ac_compile; echo $2`
2057{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2058 (eval $ac_compiler --version </dev/null >&5) 2>&5
2059 ac_status=$?
2060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2061 (exit $ac_status); }
2062{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2063 (eval $ac_compiler -v </dev/null >&5) 2>&5
2064 ac_status=$?
2065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2066 (exit $ac_status); }
2067{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2068 (eval $ac_compiler -V </dev/null >&5) 2>&5
2069 ac_status=$?
2070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2071 (exit $ac_status); }
2072
2073cat >conftest.$ac_ext <<_ACEOF
2074#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00002075#include "confdefs.h"
2076
Barry Warsawfe33b792003-01-07 22:42:49 +00002077#ifdef F77_DUMMY_MAIN
2078# ifdef __cplusplus
2079 extern "C"
2080# endif
2081 int F77_DUMMY_MAIN() { return 1; }
2082#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002083int
2084main ()
2085{
2086
2087 ;
2088 return 0;
2089}
2090_ACEOF
2091ac_clean_files_save=$ac_clean_files
2092ac_clean_files="$ac_clean_files a.out a.exe"
2093# Try to create an executable without -o first, disregard a.out.
2094# It will help us diagnose broken compilers, and finding out an intuition
2095# of exeext.
2096echo "$as_me:$LINENO: checking for C compiler default output" >&5
2097echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2098ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2099if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2100 (eval $ac_link_default) 2>&5
2101 ac_status=$?
2102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2103 (exit $ac_status); }; then
2104 # Find the output, starting from the most likely. This scheme is
2105# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2106# resort.
2107
2108# Be careful to initialize this variable, since it used to be cached.
2109# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2110ac_cv_exeext=
Barry Warsawfe33b792003-01-07 22:42:49 +00002111for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
2112 ls a.out conftest 2>/dev/null;
2113 ls a.* conftest.* 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002114 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00002115 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002116 a.out ) # We found the default executable, but exeext='' is most
2117 # certainly right.
2118 break;;
2119 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2120 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2121 export ac_cv_exeext
2122 break;;
2123 * ) break;;
2124 esac
2125done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002126else
Martin v. Löwis11437992002-04-12 09:54:03 +00002127 echo "$as_me: failed program was:" >&5
2128cat conftest.$ac_ext >&5
Barry Warsawfe33b792003-01-07 22:42:49 +00002129{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2130echo "$as_me: error: C compiler cannot create executables" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002131 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002132fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002133
Martin v. Löwis11437992002-04-12 09:54:03 +00002134ac_exeext=$ac_cv_exeext
2135echo "$as_me:$LINENO: result: $ac_file" >&5
2136echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002137
Martin v. Löwis11437992002-04-12 09:54:03 +00002138# Check the compiler produces executables we can run. If not, either
2139# the compiler is broken, or we cross compile.
2140echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2141echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2142# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2143# If not cross compiling, check that we can run a simple program.
2144if test "$cross_compiling" != yes; then
2145 if { ac_try='./$ac_file'
2146 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2147 (eval $ac_try) 2>&5
2148 ac_status=$?
2149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2150 (exit $ac_status); }; }; then
2151 cross_compiling=no
2152 else
2153 if test "$cross_compiling" = maybe; then
2154 cross_compiling=yes
2155 else
2156 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2157If you meant to cross compile, use \`--host'." >&5
2158echo "$as_me: error: cannot run C compiled programs.
2159If you meant to cross compile, use \`--host'." >&2;}
2160 { (exit 1); exit 1; }; }
2161 fi
2162 fi
2163fi
2164echo "$as_me:$LINENO: result: yes" >&5
2165echo "${ECHO_T}yes" >&6
2166
2167rm -f a.out a.exe conftest$ac_cv_exeext
2168ac_clean_files=$ac_clean_files_save
2169# Check the compiler produces executables we can run. If not, either
2170# the compiler is broken, or we cross compile.
2171echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2172echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2173echo "$as_me:$LINENO: result: $cross_compiling" >&5
2174echo "${ECHO_T}$cross_compiling" >&6
2175
2176echo "$as_me:$LINENO: checking for suffix of executables" >&5
2177echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2178if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2179 (eval $ac_link) 2>&5
2180 ac_status=$?
2181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2182 (exit $ac_status); }; then
2183 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2184# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2185# work properly (i.e., refer to `conftest.exe'), while it won't with
2186# `rm'.
Barry Warsawfe33b792003-01-07 22:42:49 +00002187for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002188 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00002189 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002190 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2191 export ac_cv_exeext
2192 break;;
2193 * ) break;;
2194 esac
2195done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002196else
Martin v. Löwis11437992002-04-12 09:54:03 +00002197 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2198echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2199 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002200fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002201
Martin v. Löwis11437992002-04-12 09:54:03 +00002202rm -f conftest$ac_cv_exeext
2203echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2204echo "${ECHO_T}$ac_cv_exeext" >&6
2205
2206rm -f conftest.$ac_ext
2207EXEEXT=$ac_cv_exeext
2208ac_exeext=$EXEEXT
2209echo "$as_me:$LINENO: checking for suffix of object files" >&5
2210echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2211if test "${ac_cv_objext+set}" = set; then
2212 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002213else
Martin v. Löwis11437992002-04-12 09:54:03 +00002214 cat >conftest.$ac_ext <<_ACEOF
2215#line $LINENO "configure"
2216#include "confdefs.h"
2217
Barry Warsawfe33b792003-01-07 22:42:49 +00002218#ifdef F77_DUMMY_MAIN
2219# ifdef __cplusplus
2220 extern "C"
2221# endif
2222 int F77_DUMMY_MAIN() { return 1; }
2223#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002224int
2225main ()
2226{
2227
2228 ;
2229 return 0;
2230}
2231_ACEOF
2232rm -f conftest.o conftest.obj
2233if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2234 (eval $ac_compile) 2>&5
2235 ac_status=$?
2236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2237 (exit $ac_status); }; then
2238 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2239 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00002240 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002241 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2242 break;;
2243 esac
2244done
2245else
2246 echo "$as_me: failed program was:" >&5
2247cat conftest.$ac_ext >&5
2248{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2249echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2250 { (exit 1); exit 1; }; }
2251fi
2252
2253rm -f conftest.$ac_cv_objext conftest.$ac_ext
2254fi
2255echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2256echo "${ECHO_T}$ac_cv_objext" >&6
2257OBJEXT=$ac_cv_objext
2258ac_objext=$OBJEXT
2259echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2260echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2261if test "${ac_cv_c_compiler_gnu+set}" = set; then
2262 echo $ECHO_N "(cached) $ECHO_C" >&6
2263else
2264 cat >conftest.$ac_ext <<_ACEOF
2265#line $LINENO "configure"
2266#include "confdefs.h"
2267
Barry Warsawfe33b792003-01-07 22:42:49 +00002268#ifdef F77_DUMMY_MAIN
2269# ifdef __cplusplus
2270 extern "C"
2271# endif
2272 int F77_DUMMY_MAIN() { return 1; }
2273#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002274int
2275main ()
2276{
2277#ifndef __GNUC__
2278 choke me
2279#endif
2280
2281 ;
2282 return 0;
2283}
2284_ACEOF
2285rm -f conftest.$ac_objext
2286if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2287 (eval $ac_compile) 2>&5
2288 ac_status=$?
2289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2290 (exit $ac_status); } &&
2291 { ac_try='test -s conftest.$ac_objext'
2292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2293 (eval $ac_try) 2>&5
2294 ac_status=$?
2295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2296 (exit $ac_status); }; }; then
2297 ac_compiler_gnu=yes
2298else
2299 echo "$as_me: failed program was:" >&5
2300cat conftest.$ac_ext >&5
2301ac_compiler_gnu=no
2302fi
2303rm -f conftest.$ac_objext conftest.$ac_ext
2304ac_cv_c_compiler_gnu=$ac_compiler_gnu
2305
2306fi
2307echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2308echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2309GCC=`test $ac_compiler_gnu = yes && echo yes`
2310ac_test_CFLAGS=${CFLAGS+set}
2311ac_save_CFLAGS=$CFLAGS
2312CFLAGS="-g"
2313echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2314echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2315if test "${ac_cv_prog_cc_g+set}" = set; then
2316 echo $ECHO_N "(cached) $ECHO_C" >&6
2317else
2318 cat >conftest.$ac_ext <<_ACEOF
2319#line $LINENO "configure"
2320#include "confdefs.h"
2321
Barry Warsawfe33b792003-01-07 22:42:49 +00002322#ifdef F77_DUMMY_MAIN
2323# ifdef __cplusplus
2324 extern "C"
2325# endif
2326 int F77_DUMMY_MAIN() { return 1; }
2327#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002328int
2329main ()
2330{
2331
2332 ;
2333 return 0;
2334}
2335_ACEOF
2336rm -f conftest.$ac_objext
2337if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2338 (eval $ac_compile) 2>&5
2339 ac_status=$?
2340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2341 (exit $ac_status); } &&
2342 { ac_try='test -s conftest.$ac_objext'
2343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2344 (eval $ac_try) 2>&5
2345 ac_status=$?
2346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2347 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002348 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002349else
Martin v. Löwis11437992002-04-12 09:54:03 +00002350 echo "$as_me: failed program was:" >&5
2351cat conftest.$ac_ext >&5
2352ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002353fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002354rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002355fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002356echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2357echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002358if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002359 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002360elif test $ac_cv_prog_cc_g = yes; then
2361 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002362 CFLAGS="-g -O2"
2363 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002364 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002365 fi
2366else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002367 if test "$GCC" = yes; then
2368 CFLAGS="-O2"
2369 else
2370 CFLAGS=
2371 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002372fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002373# Some people use a C++ compiler to compile C. Since we use `exit',
2374# in C++ we need to declare it. In case someone uses the same compiler
2375# for both compiling C and C++ we need to have the C++ compiler decide
2376# the declaration of exit, since it's the most demanding environment.
2377cat >conftest.$ac_ext <<_ACEOF
2378#ifndef __cplusplus
2379 choke me
2380#endif
2381_ACEOF
2382rm -f conftest.$ac_objext
2383if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2384 (eval $ac_compile) 2>&5
2385 ac_status=$?
2386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2387 (exit $ac_status); } &&
2388 { ac_try='test -s conftest.$ac_objext'
2389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2390 (eval $ac_try) 2>&5
2391 ac_status=$?
2392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2393 (exit $ac_status); }; }; then
2394 for ac_declaration in \
2395 ''\
2396 '#include <stdlib.h>' \
2397 'extern "C" void std::exit (int) throw (); using std::exit;' \
2398 'extern "C" void std::exit (int); using std::exit;' \
2399 'extern "C" void exit (int) throw ();' \
2400 'extern "C" void exit (int);' \
2401 'void exit (int);'
2402do
2403 cat >conftest.$ac_ext <<_ACEOF
2404#line $LINENO "configure"
2405#include "confdefs.h"
2406#include <stdlib.h>
2407$ac_declaration
Barry Warsawfe33b792003-01-07 22:42:49 +00002408#ifdef F77_DUMMY_MAIN
2409# ifdef __cplusplus
2410 extern "C"
2411# endif
2412 int F77_DUMMY_MAIN() { return 1; }
2413#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002414int
2415main ()
2416{
2417exit (42);
2418 ;
2419 return 0;
2420}
2421_ACEOF
2422rm -f conftest.$ac_objext
2423if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2424 (eval $ac_compile) 2>&5
2425 ac_status=$?
2426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2427 (exit $ac_status); } &&
2428 { ac_try='test -s conftest.$ac_objext'
2429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2430 (eval $ac_try) 2>&5
2431 ac_status=$?
2432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2433 (exit $ac_status); }; }; then
2434 :
2435else
2436 echo "$as_me: failed program was:" >&5
2437cat conftest.$ac_ext >&5
2438continue
2439fi
2440rm -f conftest.$ac_objext conftest.$ac_ext
2441 cat >conftest.$ac_ext <<_ACEOF
2442#line $LINENO "configure"
2443#include "confdefs.h"
2444$ac_declaration
Barry Warsawfe33b792003-01-07 22:42:49 +00002445#ifdef F77_DUMMY_MAIN
2446# ifdef __cplusplus
2447 extern "C"
2448# endif
2449 int F77_DUMMY_MAIN() { return 1; }
2450#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002451int
2452main ()
2453{
2454exit (42);
2455 ;
2456 return 0;
2457}
2458_ACEOF
2459rm -f conftest.$ac_objext
2460if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2461 (eval $ac_compile) 2>&5
2462 ac_status=$?
2463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2464 (exit $ac_status); } &&
2465 { ac_try='test -s conftest.$ac_objext'
2466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2467 (eval $ac_try) 2>&5
2468 ac_status=$?
2469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2470 (exit $ac_status); }; }; then
2471 break
2472else
2473 echo "$as_me: failed program was:" >&5
2474cat conftest.$ac_ext >&5
2475fi
2476rm -f conftest.$ac_objext conftest.$ac_ext
2477done
2478rm -f conftest*
2479if test -n "$ac_declaration"; then
2480 echo '#ifdef __cplusplus' >>confdefs.h
2481 echo $ac_declaration >>confdefs.h
2482 echo '#endif' >>confdefs.h
2483fi
2484
2485else
2486 echo "$as_me: failed program was:" >&5
2487cat conftest.$ac_ext >&5
2488fi
2489rm -f conftest.$ac_objext conftest.$ac_ext
2490ac_ext=c
2491ac_cpp='$CPP $CPPFLAGS'
2492ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2493ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2494ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002495
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002496
2497# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002498
2499ac_ext=c
2500ac_cpp='$CPP $CPPFLAGS'
2501ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2502ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2503ac_compiler_gnu=$ac_cv_c_compiler_gnu
2504echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2505echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002506# On Suns, sometimes $CPP names a directory.
2507if test -n "$CPP" && test -d "$CPP"; then
2508 CPP=
2509fi
2510if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002511 if test "${ac_cv_prog_CPP+set}" = set; then
2512 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002513else
Martin v. Löwis11437992002-04-12 09:54:03 +00002514 # Double quotes because CPP needs to be expanded
2515 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2516 do
2517 ac_preproc_ok=false
2518for ac_c_preproc_warn_flag in '' yes
2519do
2520 # Use a header file that comes with gcc, so configuring glibc
2521 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002522 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002523 # not just through cpp. "Syntax error" is here to catch this case.
2524 cat >conftest.$ac_ext <<_ACEOF
2525#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002526#include "confdefs.h"
2527#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 Syntax error
2529_ACEOF
2530if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2531 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2532 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002533 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002534 rm -f conftest.er1
2535 cat conftest.err >&5
2536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2537 (exit $ac_status); } >/dev/null; then
2538 if test -s conftest.err; then
2539 ac_cpp_err=$ac_c_preproc_warn_flag
2540 else
2541 ac_cpp_err=
2542 fi
2543else
2544 ac_cpp_err=yes
2545fi
2546if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002547 :
2548else
Martin v. Löwis11437992002-04-12 09:54:03 +00002549 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002550 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002551 # Broken: fails on valid input.
2552continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002553fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002554rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002555
Martin v. Löwis11437992002-04-12 09:54:03 +00002556 # OK, works on sane cases. Now check whether non-existent headers
2557 # can be detected and how.
2558 cat >conftest.$ac_ext <<_ACEOF
2559#line $LINENO "configure"
2560#include "confdefs.h"
2561#include <ac_nonexistent.h>
2562_ACEOF
2563if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2564 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2565 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002566 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002567 rm -f conftest.er1
2568 cat conftest.err >&5
2569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2570 (exit $ac_status); } >/dev/null; then
2571 if test -s conftest.err; then
2572 ac_cpp_err=$ac_c_preproc_warn_flag
2573 else
2574 ac_cpp_err=
2575 fi
2576else
2577 ac_cpp_err=yes
2578fi
2579if test -z "$ac_cpp_err"; then
2580 # Broken: success on invalid input.
2581continue
2582else
2583 echo "$as_me: failed program was:" >&5
2584 cat conftest.$ac_ext >&5
2585 # Passes both tests.
2586ac_preproc_ok=:
2587break
2588fi
2589rm -f conftest.err conftest.$ac_ext
2590
2591done
2592# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2593rm -f conftest.err conftest.$ac_ext
2594if $ac_preproc_ok; then
2595 break
2596fi
2597
2598 done
2599 ac_cv_prog_CPP=$CPP
2600
2601fi
2602 CPP=$ac_cv_prog_CPP
2603else
2604 ac_cv_prog_CPP=$CPP
2605fi
2606echo "$as_me:$LINENO: result: $CPP" >&5
2607echo "${ECHO_T}$CPP" >&6
2608ac_preproc_ok=false
2609for ac_c_preproc_warn_flag in '' yes
2610do
2611 # Use a header file that comes with gcc, so configuring glibc
2612 # with a fresh cross-compiler works.
2613 # On the NeXT, cc -E runs the code through the compiler's parser,
2614 # not just through cpp. "Syntax error" is here to catch this case.
2615 cat >conftest.$ac_ext <<_ACEOF
2616#line $LINENO "configure"
2617#include "confdefs.h"
2618#include <assert.h>
2619 Syntax error
2620_ACEOF
2621if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2622 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2623 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002624 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 rm -f conftest.er1
2626 cat conftest.err >&5
2627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2628 (exit $ac_status); } >/dev/null; then
2629 if test -s conftest.err; then
2630 ac_cpp_err=$ac_c_preproc_warn_flag
2631 else
2632 ac_cpp_err=
2633 fi
2634else
2635 ac_cpp_err=yes
2636fi
2637if test -z "$ac_cpp_err"; then
2638 :
2639else
2640 echo "$as_me: failed program was:" >&5
2641 cat conftest.$ac_ext >&5
2642 # Broken: fails on valid input.
2643continue
2644fi
2645rm -f conftest.err conftest.$ac_ext
2646
2647 # OK, works on sane cases. Now check whether non-existent headers
2648 # can be detected and how.
2649 cat >conftest.$ac_ext <<_ACEOF
2650#line $LINENO "configure"
2651#include "confdefs.h"
2652#include <ac_nonexistent.h>
2653_ACEOF
2654if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2655 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2656 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002657 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002658 rm -f conftest.er1
2659 cat conftest.err >&5
2660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2661 (exit $ac_status); } >/dev/null; then
2662 if test -s conftest.err; then
2663 ac_cpp_err=$ac_c_preproc_warn_flag
2664 else
2665 ac_cpp_err=
2666 fi
2667else
2668 ac_cpp_err=yes
2669fi
2670if test -z "$ac_cpp_err"; then
2671 # Broken: success on invalid input.
2672continue
2673else
2674 echo "$as_me: failed program was:" >&5
2675 cat conftest.$ac_ext >&5
2676 # Passes both tests.
2677ac_preproc_ok=:
2678break
2679fi
2680rm -f conftest.err conftest.$ac_ext
2681
2682done
2683# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2684rm -f conftest.err conftest.$ac_ext
2685if $ac_preproc_ok; then
2686 :
2687else
2688 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2689echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2690 { (exit 1); exit 1; }; }
2691fi
2692
2693ac_ext=c
2694ac_cpp='$CPP $CPPFLAGS'
2695ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2696ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2697ac_compiler_gnu=$ac_cv_c_compiler_gnu
2698
2699
2700
2701echo "$as_me:$LINENO: checking for AIX" >&5
2702echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2703cat >conftest.$ac_ext <<_ACEOF
2704#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002705#include "confdefs.h"
2706#ifdef _AIX
2707 yes
2708#endif
2709
Martin v. Löwis11437992002-04-12 09:54:03 +00002710_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002711if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00002712 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002713 echo "$as_me:$LINENO: result: yes" >&5
2714echo "${ECHO_T}yes" >&6
2715cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002716#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002717_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002718
2719else
Martin v. Löwis11437992002-04-12 09:54:03 +00002720 echo "$as_me:$LINENO: result: no" >&5
2721echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002722fi
2723rm -f conftest*
2724
Michael W. Hudson54241132001-12-07 15:38:26 +00002725
Martin v. Löwis11437992002-04-12 09:54:03 +00002726echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2727echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2728if test "${ac_cv_header_stdc+set}" = set; then
2729 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002730else
Martin v. Löwis11437992002-04-12 09:54:03 +00002731 cat >conftest.$ac_ext <<_ACEOF
2732#line $LINENO "configure"
2733#include "confdefs.h"
2734#include <stdlib.h>
2735#include <stdarg.h>
2736#include <string.h>
2737#include <float.h>
2738
2739_ACEOF
2740if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2741 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2742 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002743 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002744 rm -f conftest.er1
2745 cat conftest.err >&5
2746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2747 (exit $ac_status); } >/dev/null; then
2748 if test -s conftest.err; then
2749 ac_cpp_err=$ac_c_preproc_warn_flag
2750 else
2751 ac_cpp_err=
2752 fi
2753else
2754 ac_cpp_err=yes
2755fi
2756if test -z "$ac_cpp_err"; then
2757 ac_cv_header_stdc=yes
2758else
2759 echo "$as_me: failed program was:" >&5
2760 cat conftest.$ac_ext >&5
2761 ac_cv_header_stdc=no
2762fi
2763rm -f conftest.err conftest.$ac_ext
2764
2765if test $ac_cv_header_stdc = yes; then
2766 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2767 cat >conftest.$ac_ext <<_ACEOF
2768#line $LINENO "configure"
2769#include "confdefs.h"
2770#include <string.h>
2771
2772_ACEOF
2773if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00002774 egrep "memchr" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002775 :
2776else
2777 ac_cv_header_stdc=no
2778fi
2779rm -f conftest*
2780
2781fi
2782
2783if test $ac_cv_header_stdc = yes; then
2784 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2785 cat >conftest.$ac_ext <<_ACEOF
2786#line $LINENO "configure"
2787#include "confdefs.h"
2788#include <stdlib.h>
2789
2790_ACEOF
2791if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00002792 egrep "free" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002793 :
2794else
2795 ac_cv_header_stdc=no
2796fi
2797rm -f conftest*
2798
2799fi
2800
2801if test $ac_cv_header_stdc = yes; then
2802 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2803 if test "$cross_compiling" = yes; then
2804 :
2805else
2806 cat >conftest.$ac_ext <<_ACEOF
2807#line $LINENO "configure"
2808#include "confdefs.h"
2809#include <ctype.h>
2810#if ((' ' & 0x0FF) == 0x020)
2811# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2812# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2813#else
2814# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2815 || ('j' <= (c) && (c) <= 'r') \
2816 || ('s' <= (c) && (c) <= 'z'))
2817# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2818#endif
2819
2820#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2821int
2822main ()
2823{
2824 int i;
2825 for (i = 0; i < 256; i++)
2826 if (XOR (islower (i), ISLOWER (i))
2827 || toupper (i) != TOUPPER (i))
2828 exit(2);
2829 exit (0);
2830}
2831_ACEOF
2832rm -f conftest$ac_exeext
2833if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2834 (eval $ac_link) 2>&5
2835 ac_status=$?
2836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2837 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2838 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2839 (eval $ac_try) 2>&5
2840 ac_status=$?
2841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2842 (exit $ac_status); }; }; then
2843 :
2844else
2845 echo "$as_me: program exited with status $ac_status" >&5
2846echo "$as_me: failed program was:" >&5
2847cat conftest.$ac_ext >&5
2848( exit $ac_status )
2849ac_cv_header_stdc=no
2850fi
Barry Warsawfe33b792003-01-07 22:42:49 +00002851rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002852fi
2853fi
2854fi
2855echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2856echo "${ECHO_T}$ac_cv_header_stdc" >&6
2857if test $ac_cv_header_stdc = yes; then
2858
2859cat >>confdefs.h <<\_ACEOF
2860#define STDC_HEADERS 1
2861_ACEOF
2862
2863fi
2864
2865# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2876 inttypes.h stdint.h unistd.h
2877do
2878as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2879echo "$as_me:$LINENO: checking for $ac_header" >&5
2880echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2881if eval "test \"\${$as_ac_Header+set}\" = set"; then
2882 echo $ECHO_N "(cached) $ECHO_C" >&6
2883else
2884 cat >conftest.$ac_ext <<_ACEOF
2885#line $LINENO "configure"
2886#include "confdefs.h"
2887$ac_includes_default
2888
2889#include <$ac_header>
2890_ACEOF
2891rm -f conftest.$ac_objext
2892if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2893 (eval $ac_compile) 2>&5
2894 ac_status=$?
2895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2896 (exit $ac_status); } &&
2897 { ac_try='test -s conftest.$ac_objext'
2898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2899 (eval $ac_try) 2>&5
2900 ac_status=$?
2901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2902 (exit $ac_status); }; }; then
2903 eval "$as_ac_Header=yes"
2904else
2905 echo "$as_me: failed program was:" >&5
2906cat conftest.$ac_ext >&5
2907eval "$as_ac_Header=no"
2908fi
2909rm -f conftest.$ac_objext conftest.$ac_ext
2910fi
2911echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2912echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2913if test `eval echo '${'$as_ac_Header'}'` = yes; then
2914 cat >>confdefs.h <<_ACEOF
2915#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2916_ACEOF
2917
2918fi
2919
2920done
2921
2922
2923if test "${ac_cv_header_minix_config_h+set}" = set; then
2924 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2925echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2926if test "${ac_cv_header_minix_config_h+set}" = set; then
2927 echo $ECHO_N "(cached) $ECHO_C" >&6
2928fi
2929echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2930echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2931else
2932 # Is the header compilable?
2933echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2934echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2935cat >conftest.$ac_ext <<_ACEOF
2936#line $LINENO "configure"
2937#include "confdefs.h"
2938$ac_includes_default
2939#include <minix/config.h>
2940_ACEOF
2941rm -f conftest.$ac_objext
2942if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2943 (eval $ac_compile) 2>&5
2944 ac_status=$?
2945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2946 (exit $ac_status); } &&
2947 { ac_try='test -s conftest.$ac_objext'
2948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2949 (eval $ac_try) 2>&5
2950 ac_status=$?
2951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2952 (exit $ac_status); }; }; then
2953 ac_header_compiler=yes
2954else
2955 echo "$as_me: failed program was:" >&5
2956cat conftest.$ac_ext >&5
2957ac_header_compiler=no
2958fi
2959rm -f conftest.$ac_objext conftest.$ac_ext
2960echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2961echo "${ECHO_T}$ac_header_compiler" >&6
2962
2963# Is the header present?
2964echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2965echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2966cat >conftest.$ac_ext <<_ACEOF
2967#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002968#include "confdefs.h"
2969#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002970_ACEOF
2971if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2972 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2973 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002974 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002975 rm -f conftest.er1
2976 cat conftest.err >&5
2977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2978 (exit $ac_status); } >/dev/null; then
2979 if test -s conftest.err; then
2980 ac_cpp_err=$ac_c_preproc_warn_flag
2981 else
2982 ac_cpp_err=
2983 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002984else
Martin v. Löwis11437992002-04-12 09:54:03 +00002985 ac_cpp_err=yes
2986fi
2987if test -z "$ac_cpp_err"; then
2988 ac_header_preproc=yes
2989else
2990 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002991 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002992 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002993fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002994rm -f conftest.err conftest.$ac_ext
2995echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
2996echo "${ECHO_T}$ac_header_preproc" >&6
2997
2998# So? What about this header?
2999case $ac_header_compiler:$ac_header_preproc in
3000 yes:no )
3001 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
3002echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3003 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
3004echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
3005 no:yes )
3006 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
3007echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
3008 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
3009echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
3010 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
3011echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
3012esac
3013echo "$as_me:$LINENO: checking for minix/config.h" >&5
3014echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3015if test "${ac_cv_header_minix_config_h+set}" = set; then
3016 echo $ECHO_N "(cached) $ECHO_C" >&6
3017else
3018 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003019fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003020echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3021echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3022
3023fi
3024if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003025 MINIX=yes
3026else
Martin v. Löwis11437992002-04-12 09:54:03 +00003027 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003028fi
3029
Martin v. Löwis11437992002-04-12 09:54:03 +00003030
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003031if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003032
3033cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003034#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003035_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003036
Martin v. Löwis11437992002-04-12 09:54:03 +00003037
3038cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003039#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00003040_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003041
Martin v. Löwis11437992002-04-12 09:54:03 +00003042
3043cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003044#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003045_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003046
3047fi
3048
3049
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003050# Check for unsupported systems
3051case $ac_sys_system/$ac_sys_release in
3052SunOS/4*|DYNIX/*|dgux*/*|IRIX/4*|Linux*/1*)
3053 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3054 echo See README for details.
3055 exit 1;;
3056esac
3057
3058if test "$MINIX" = yes; then
3059 echo This system \(MINIX\) is no longer supported.
3060 echo Read README for details.
3061 exit 1
3062fi
3063
Michael W. Hudson54241132001-12-07 15:38:26 +00003064
Martin v. Löwis11437992002-04-12 09:54:03 +00003065echo "$as_me:$LINENO: checking for --with-suffix" >&5
3066echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003067
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003068# Check whether --with-suffix or --without-suffix was given.
3069if test "${with_suffix+set}" = set; then
3070 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003071
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003072 case $withval in
3073 no) EXEEXT=;;
3074 yes) EXEEXT=.exe;;
3075 *) EXEEXT=$withval;;
3076 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003077fi;
3078echo "$as_me:$LINENO: result: $EXEEXT" >&5
3079echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003080
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003081# Test whether we're running on a non-case-sensitive system, in which
3082# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003083
Martin v. Löwis11437992002-04-12 09:54:03 +00003084echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3085echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003086if test ! -d CaseSensitiveTestDir; then
3087mkdir CaseSensitiveTestDir
3088fi
3089
3090if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003091then
Martin v. Löwis11437992002-04-12 09:54:03 +00003092 echo "$as_me:$LINENO: result: yes" >&5
3093echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003094 BUILDEXEEXT=.exe
3095else
Martin v. Löwis11437992002-04-12 09:54:03 +00003096 echo "$as_me:$LINENO: result: no" >&5
3097echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003098 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003099fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003100rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003101
Guido van Rossumdd997f71998-10-07 19:58:26 +00003102case $MACHDEP in
3103bsdos*)
3104 case $CC in
3105 gcc) CC="$CC -D_HAVE_BSDI";;
3106 esac;;
3107esac
3108
Guido van Rossum24b1e751997-08-21 02:29:16 +00003109case $ac_sys_system in
3110hp*|HP*)
3111 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003112 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003113 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003114Monterey*)
3115 case $CC in
3116 cc) CC="$CC -Wl,-Bexport";;
3117 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003118SunOS*)
3119 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003120
3121cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003122#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003123_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003124
3125 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003126esac
3127
Michael W. Hudson54241132001-12-07 15:38:26 +00003128
3129
Martin v. Löwis11437992002-04-12 09:54:03 +00003130echo "$as_me:$LINENO: checking LIBRARY" >&5
3131echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003132if test -z "$LIBRARY"
3133then
3134 LIBRARY='libpython$(VERSION).a'
3135fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003136echo "$as_me:$LINENO: result: $LIBRARY" >&5
3137echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003138
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003139# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003140# name of the library into which to insert object files). BLDLIBRARY is also
3141# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3142# is blank as the main program is not linked directly against LDLIBRARY.
3143# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3144# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3145# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3146# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003147#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003148# RUNSHARED is used to run shared python without installed libraries
3149#
3150# INSTSONAME is the name of the shared library that will be use to install
3151# on the system - some systems like version suffix, others don't
3152
3153
Michael W. Hudson54241132001-12-07 15:38:26 +00003154
3155
3156
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003157
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003158LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003159BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003160INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003161DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003162LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003163RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003164
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003165# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003166# If CXX is set, and if it is needed to link a main function that was
3167# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3168# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003169# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003170# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003171
Martin v. Löwis11437992002-04-12 09:54:03 +00003172echo "$as_me:$LINENO: checking LINKCC" >&5
3173echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003174if test -z "$LINKCC"
3175then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003176 if test -z "$CXX"; then
3177 LINKCC="\$(PURIFY) \$(CC)"
3178 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003179 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003180 $CXX -c conftest.$ac_ext 2>&5
3181 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3182 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3183 then
3184 LINKCC="\$(PURIFY) \$(CC)"
3185 else
3186 LINKCC="\$(PURIFY) \$(CXX)"
3187 fi
3188 rm -fr conftest*
3189 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003190 case $ac_sys_system in
3191 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003192 exp_extra="\"\""
3193 if test $ac_sys_release -ge 5 -o \
3194 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3195 exp_extra="."
3196 fi
3197 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003198 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003199 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003200 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003201 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003202 esac
3203fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003204echo "$as_me:$LINENO: result: $LINKCC" >&5
3205echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003206
Martin v. Löwis11437992002-04-12 09:54:03 +00003207echo "$as_me:$LINENO: checking for --enable-shared" >&5
3208echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003209# Check whether --enable-shared or --disable-shared was given.
3210if test "${enable_shared+set}" = set; then
3211 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003212
Martin v. Löwis11437992002-04-12 09:54:03 +00003213fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003214
3215if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003216then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003217 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003218 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003219 enable_shared="yes";;
3220 *)
3221 enable_shared="no";;
3222 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003223fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003224echo "$as_me:$LINENO: result: $enable_shared" >&5
3225echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003226
3227
Martin v. Löwis11437992002-04-12 09:54:03 +00003228echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3229echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003230
Guido van Rossumb8552162001-09-05 14:58:11 +00003231# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3232# library that we build, but we do not want to link against it (we
3233# will find it with a -framework option). For this reason there is an
3234# extra variable BLDLIBRARY against which Python and the extension
3235# modules are linked, BLDLIBRARY. This is normally the same as
3236# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003237if test "$enable_framework"
3238then
3239 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3240 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3241 BLDLIBRARY=''
3242else
3243 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003244fi
Jack Jansene578a632001-08-15 01:27:14 +00003245
Martin v. Löwis1142de32002-03-29 16:28:31 +00003246# Other platforms follow
3247if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003248
3249cat >>confdefs.h <<\_ACEOF
3250#define Py_ENABLE_SHARED 1
3251_ACEOF
3252
Martin v. Löwis1142de32002-03-29 16:28:31 +00003253 case $ac_sys_system in
3254 BeOS*)
3255 LDLIBRARY='libpython$(VERSION).so'
3256 ;;
3257 CYGWIN*)
3258 LDLIBRARY='libpython$(VERSION).dll.a'
3259 DLLLIBRARY='libpython$(VERSION).dll'
3260 ;;
3261 SunOS*)
3262 LDLIBRARY='libpython$(VERSION).so'
3263 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3264 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3265 ;;
Martin v. Löwis1bc894b2002-07-30 20:19:58 +00003266 Linux*|GNU*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003267 LDLIBRARY='libpython$(VERSION).so'
3268 BLDLIBRARY='-L. -lpython$(VERSION)'
3269 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3270 INSTSONAME="$LDLIBRARY".$SOVERSION
3271 ;;
3272 hp*|HP*)
3273 LDLIBRARY='libpython$(VERSION).sl'
3274 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3275 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3276 ;;
3277 OSF*)
3278 LDLIBRARY='libpython$(VERSION).so'
3279 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3280 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3281 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003282 atheos*)
3283 LDLIBRARY='libpython$(VERSION).so'
3284 BLDLIBRARY='-L. -lpython$(VERSION)'
3285 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3286 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003287 esac
3288 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3289 case $MACHDEP in
3290 dguxR4)
3291 LDLIBRARY='libpython$(VERSION).so'
Skip Montanarodecc6a42003-01-01 20:07:49 +00003292 BASECFLAGS="$BASECFLAGS -pic"
Martin v. Löwis1142de32002-03-29 16:28:31 +00003293 ;;
3294 esac
3295fi
3296
Martin v. Löwis11437992002-04-12 09:54:03 +00003297echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3298echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003299
Martin v. Löwis11437992002-04-12 09:54:03 +00003300if test -n "$ac_tool_prefix"; then
3301 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3302set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3303echo "$as_me:$LINENO: checking for $ac_word" >&5
3304echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3305if test "${ac_cv_prog_RANLIB+set}" = set; then
3306 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003307else
3308 if test -n "$RANLIB"; then
3309 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3310else
Martin v. Löwis11437992002-04-12 09:54:03 +00003311as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3312for as_dir in $PATH
3313do
3314 IFS=$as_save_IFS
3315 test -z "$as_dir" && as_dir=.
3316 for ac_exec_ext in '' $ac_executable_extensions; do
3317 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3318 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3319 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3320 break 2
3321 fi
3322done
3323done
3324
Guido van Rossum627b2d71993-12-24 10:39:16 +00003325fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003326fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003327RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003328if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003329 echo "$as_me:$LINENO: result: $RANLIB" >&5
3330echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003331else
Martin v. Löwis11437992002-04-12 09:54:03 +00003332 echo "$as_me:$LINENO: result: no" >&5
3333echo "${ECHO_T}no" >&6
3334fi
3335
3336fi
3337if test -z "$ac_cv_prog_RANLIB"; then
3338 ac_ct_RANLIB=$RANLIB
3339 # Extract the first word of "ranlib", so it can be a program name with args.
3340set dummy ranlib; ac_word=$2
3341echo "$as_me:$LINENO: checking for $ac_word" >&5
3342echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3343if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3344 echo $ECHO_N "(cached) $ECHO_C" >&6
3345else
3346 if test -n "$ac_ct_RANLIB"; then
3347 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3348else
3349as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3350for as_dir in $PATH
3351do
3352 IFS=$as_save_IFS
3353 test -z "$as_dir" && as_dir=.
3354 for ac_exec_ext in '' $ac_executable_extensions; do
3355 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3356 ac_cv_prog_ac_ct_RANLIB="ranlib"
3357 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3358 break 2
3359 fi
3360done
3361done
3362
3363 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3364fi
3365fi
3366ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3367if test -n "$ac_ct_RANLIB"; then
3368 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3369echo "${ECHO_T}$ac_ct_RANLIB" >&6
3370else
3371 echo "$as_me:$LINENO: result: no" >&5
3372echo "${ECHO_T}no" >&6
3373fi
3374
3375 RANLIB=$ac_ct_RANLIB
3376else
3377 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003378fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003379
3380
Guido van Rossum7f43da71994-08-01 12:15:30 +00003381for ac_prog in ar aal
3382do
Martin v. Löwis11437992002-04-12 09:54:03 +00003383 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003384set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003385echo "$as_me:$LINENO: checking for $ac_word" >&5
3386echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3387if test "${ac_cv_prog_AR+set}" = set; then
3388 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003389else
3390 if test -n "$AR"; then
3391 ac_cv_prog_AR="$AR" # Let the user override the test.
3392else
Martin v. Löwis11437992002-04-12 09:54:03 +00003393as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3394for as_dir in $PATH
3395do
3396 IFS=$as_save_IFS
3397 test -z "$as_dir" && as_dir=.
3398 for ac_exec_ext in '' $ac_executable_extensions; do
3399 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3400 ac_cv_prog_AR="$ac_prog"
3401 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3402 break 2
3403 fi
3404done
3405done
3406
Guido van Rossum7f43da71994-08-01 12:15:30 +00003407fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003408fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003409AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003410if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003411 echo "$as_me:$LINENO: result: $AR" >&5
3412echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003413else
Martin v. Löwis11437992002-04-12 09:54:03 +00003414 echo "$as_me:$LINENO: result: no" >&5
3415echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003416fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003417
Martin v. Löwis11437992002-04-12 09:54:03 +00003418 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003419done
3420test -n "$AR" || AR="ar"
3421
Michael W. Hudson54241132001-12-07 15:38:26 +00003422
Neil Schemenauera42c8272001-03-31 00:01:55 +00003423case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003424bsdos*|hp*|HP*)
3425 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003426 if test -z "$INSTALL"
3427 then
3428 INSTALL="${srcdir}/install-sh -c"
3429 fi
3430esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003431ac_aux_dir=
3432for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3433 if 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
3437 elif test -f $ac_dir/install.sh; then
3438 ac_aux_dir=$ac_dir
3439 ac_install_sh="$ac_aux_dir/install.sh -c"
3440 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003441 elif test -f $ac_dir/shtool; then
3442 ac_aux_dir=$ac_dir
3443 ac_install_sh="$ac_aux_dir/shtool install -c"
3444 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003445 fi
3446done
3447if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003448 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3449echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3450 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003451fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003452ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3453ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3454ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003455
3456# Find a good install program. We prefer a C program (faster),
3457# so one script is as good as another. But avoid the broken or
3458# incompatible versions:
3459# SysV /etc/install, /usr/sbin/install
3460# SunOS /usr/etc/install
3461# IRIX /sbin/install
3462# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003463# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003464# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3465# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3466# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3467# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003468echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3469echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003470if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003471if test "${ac_cv_path_install+set}" = set; then
3472 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003473else
Martin v. Löwis11437992002-04-12 09:54:03 +00003474 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3475for as_dir in $PATH
3476do
3477 IFS=$as_save_IFS
3478 test -z "$as_dir" && as_dir=.
3479 # Account for people who put trailing slashes in PATH elements.
3480case $as_dir/ in
3481 ./ | .// | /cC/* | \
3482 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3483 /usr/ucb/* ) ;;
3484 *)
3485 # OSF1 and SCO ODT 3.0 have their own names for install.
3486 # Don't use installbsd from OSF since it installs stuff as root
3487 # by default.
3488 for ac_prog in ginstall scoinst install; do
3489 for ac_exec_ext in '' $ac_executable_extensions; do
3490 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3491 if test $ac_prog = install &&
3492 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3493 # AIX install. It has an incompatible calling convention.
3494 :
3495 elif test $ac_prog = install &&
3496 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3497 # program-specific install script used by HP pwplus--don't use.
3498 :
3499 else
3500 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3501 break 3
3502 fi
3503 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003504 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003505 done
3506 ;;
3507esac
3508done
3509
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003510
3511fi
3512 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003513 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003514 else
3515 # As a last resort, use the slow shell script. We don't cache a
3516 # path for INSTALL within a source directory, because that will
3517 # break other packages using the cache if that directory is
3518 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003519 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003520 fi
3521fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003522echo "$as_me:$LINENO: result: $INSTALL" >&5
3523echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003524
3525# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3526# It thinks the first close brace ends the variable substitution.
3527test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3528
Martin v. Löwis11437992002-04-12 09:54:03 +00003529test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003530
3531test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3532
Michael W. Hudson54241132001-12-07 15:38:26 +00003533
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003534# Not every filesystem supports hard links
3535
3536if test -z "$LN" ; then
3537 case $ac_sys_system in
3538 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003539 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003540 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003541 *) LN=ln;;
3542 esac
3543fi
3544
Fred Drake109d9862001-07-11 06:27:56 +00003545# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003546echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3547echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3548
Fred Drake109d9862001-07-11 06:27:56 +00003549# Check whether --with-pydebug or --without-pydebug was given.
3550if test "${with_pydebug+set}" = set; then
3551 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003552
Fred Drake109d9862001-07-11 06:27:56 +00003553if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003554then
3555
3556cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003557#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003558_ACEOF
3559
3560 echo "$as_me:$LINENO: result: yes" >&5
3561echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003562 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003563else echo "$as_me:$LINENO: result: no" >&5
3564echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003565fi
3566else
Martin v. Löwis11437992002-04-12 09:54:03 +00003567 echo "$as_me:$LINENO: result: no" >&5
3568echo "${ECHO_T}no" >&6
3569fi;
Fred Drake109d9862001-07-11 06:27:56 +00003570
Skip Montanarodecc6a42003-01-01 20:07:49 +00003571# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3572# merged with this chunk of code?
3573
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003574# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003575# ------------------------
3576# (The following bit of code is complicated enough - please keep things
3577# indented properly. Just pretend you're editing Python code. ;-)
3578
3579# There are two parallel sets of case statements below, one that checks to
3580# see if OPT was set and one that does BASECFLAGS setting based upon
3581# compiler and platform. BASECFLAGS tweaks need to be made even if the
3582# user set OPT.
3583
3584# tweak OPT based on compiler and platform, only if the user didn't set
3585# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003586
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003587if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003588then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003589 case $GCC in
3590 yes)
3591 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003592 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003593 if test "$Py_DEBUG" = 'true' ; then
3594 # Optimization messes up debuggers, so turn it off for
3595 # debug builds.
3596 OPT="-g -Wall -Wstrict-prototypes"
3597 else
3598 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003599 fi
3600 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003601 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003602 OPT="-O3 -Wall -Wstrict-prototypes"
3603 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003604 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003605 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003606 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3607 ;;
3608 esac
Fred Drake109d9862001-07-11 06:27:56 +00003609 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003610
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003611 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003612 OPT="-O"
3613 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003614 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003615
3616 # The current (beta) Monterey compiler dies with optimizations
3617 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003618 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003619 Monterey*)
3620 OPT=""
3621 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003622 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003623
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003624fi
3625
Skip Montanarodecc6a42003-01-01 20:07:49 +00003626
3627# tweak BASECFLAGS based on compiler and platform
3628case $GCC in
3629yes)
3630 case $ac_sys_system in
3631 SCO_SV*)
3632 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3633 ;;
3634 # is there any other compiler on Darwin besides gcc?
3635 Darwin*)
3636 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp"
3637 ;;
3638 esac
3639 ;;
3640
3641*)
3642 case $ac_sys_system in
3643 OpenUNIX*|UnixWare*)
3644 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3645 ;;
3646 SCO_SV*)
3647 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3648 ;;
3649 esac
3650 ;;
3651esac
3652
Fred Drakee1ceaa02001-12-04 20:55:47 +00003653if test "$Py_DEBUG" = 'true'; then
3654 :
3655else
3656 OPT="-DNDEBUG $OPT"
3657fi
3658
Guido van Rossum563e7081996-09-10 18:20:48 +00003659if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003660then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003661 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003662fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003663
Martin v. Löwis11437992002-04-12 09:54:03 +00003664echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3665echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3666if test "${ac_cv_opt_olimit_ok+set}" = set; then
3667 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003668else
3669 ac_save_cc="$CC"
3670CC="$CC -OPT:Olimit=0"
3671if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003672 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003673else
Martin v. Löwis11437992002-04-12 09:54:03 +00003674 cat >conftest.$ac_ext <<_ACEOF
3675#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003676#include "confdefs.h"
3677int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003678_ACEOF
3679rm -f conftest$ac_exeext
3680if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3681 (eval $ac_link) 2>&5
3682 ac_status=$?
3683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3684 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3685 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3686 (eval $ac_try) 2>&5
3687 ac_status=$?
3688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3689 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003690 ac_cv_opt_olimit_ok=yes
3691else
Martin v. Löwis11437992002-04-12 09:54:03 +00003692 echo "$as_me: program exited with status $ac_status" >&5
3693echo "$as_me: failed program was:" >&5
3694cat conftest.$ac_ext >&5
3695( exit $ac_status )
3696ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003697fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003698rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003699fi
Guido van Rossum91922671997-10-09 20:24:13 +00003700CC="$ac_save_cc"
3701fi
3702
Martin v. Löwis11437992002-04-12 09:54:03 +00003703echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3704echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003705if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003706 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003707 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3708 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3709 # environment?
3710 Darwin*)
3711 ;;
3712 *)
3713 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3714 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003715 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003716else
Martin v. Löwis11437992002-04-12 09:54:03 +00003717 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3718echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3719 if test "${ac_cv_olimit_ok+set}" = set; then
3720 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003721else
3722 ac_save_cc="$CC"
3723 CC="$CC -Olimit 1500"
3724 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003725 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003726else
Martin v. Löwis11437992002-04-12 09:54:03 +00003727 cat >conftest.$ac_ext <<_ACEOF
3728#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003729#include "confdefs.h"
3730int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003731_ACEOF
3732rm -f conftest$ac_exeext
3733if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3734 (eval $ac_link) 2>&5
3735 ac_status=$?
3736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3737 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3739 (eval $ac_try) 2>&5
3740 ac_status=$?
3741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3742 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003743 ac_cv_olimit_ok=yes
3744else
Martin v. Löwis11437992002-04-12 09:54:03 +00003745 echo "$as_me: program exited with status $ac_status" >&5
3746echo "$as_me: failed program was:" >&5
3747cat conftest.$ac_ext >&5
3748( exit $ac_status )
3749ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003750fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003751rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003752fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003753 CC="$ac_save_cc"
3754fi
3755
Martin v. Löwis11437992002-04-12 09:54:03 +00003756 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3757echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003758 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003759 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003760 fi
3761fi
3762
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003763# On some compilers, pthreads are available without further options
3764# (e.g. MacOS X). On some of these systems, the compiler will not
3765# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3766# So we have to see first whether pthreads are available without
3767# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003768echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3769echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3770if test "${ac_cv_pthread_is_default+set}" = set; then
3771 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003772else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003773 if test "$cross_compiling" = yes; then
3774 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003775else
Martin v. Löwis11437992002-04-12 09:54:03 +00003776 cat >conftest.$ac_ext <<_ACEOF
3777#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003778#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003779
Martin v. Löwis130fb172001-07-19 11:00:41 +00003780#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003781
3782void* routine(void* p){return NULL;}
3783
3784int main(){
3785 pthread_t p;
3786 if(pthread_create(&p,NULL,routine,NULL)!=0)
3787 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003788 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003789 return 0;
3790}
3791
Martin v. Löwis11437992002-04-12 09:54:03 +00003792_ACEOF
3793rm -f conftest$ac_exeext
3794if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3795 (eval $ac_link) 2>&5
3796 ac_status=$?
3797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3798 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3799 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3800 (eval $ac_try) 2>&5
3801 ac_status=$?
3802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3803 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003804 ac_cv_pthread_is_default=yes
3805else
Martin v. Löwis11437992002-04-12 09:54:03 +00003806 echo "$as_me: program exited with status $ac_status" >&5
3807echo "$as_me: failed program was:" >&5
3808cat conftest.$ac_ext >&5
3809( exit $ac_status )
3810ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003811fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003812rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003813fi
3814
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003815fi
3816
Martin v. Löwis11437992002-04-12 09:54:03 +00003817echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3818echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003819
Michael W. Hudson54241132001-12-07 15:38:26 +00003820
Martin v. Löwis11437992002-04-12 09:54:03 +00003821if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003822then
3823 ac_cv_kpthread=no
3824else
3825# -Kpthread, if available, provides the right #defines
3826# and linker options to make pthread_create available
3827# Some compilers won't report that they do not support -Kpthread,
3828# so we need to run a program to see whether it really made the
3829# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003830echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3831echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3832if test "${ac_cv_kpthread+set}" = set; then
3833 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003834else
3835 ac_save_cc="$CC"
3836CC="$CC -Kpthread"
3837if test "$cross_compiling" = yes; then
3838 ac_cv_kpthread=no
3839else
Martin v. Löwis11437992002-04-12 09:54:03 +00003840 cat >conftest.$ac_ext <<_ACEOF
3841#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003842#include "confdefs.h"
3843
3844#include <pthread.h>
3845
3846void* routine(void* p){return NULL;}
3847
3848int main(){
3849 pthread_t p;
3850 if(pthread_create(&p,NULL,routine,NULL)!=0)
3851 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003852 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003853 return 0;
3854}
3855
Martin v. Löwis11437992002-04-12 09:54:03 +00003856_ACEOF
3857rm -f conftest$ac_exeext
3858if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3859 (eval $ac_link) 2>&5
3860 ac_status=$?
3861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3862 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3863 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3864 (eval $ac_try) 2>&5
3865 ac_status=$?
3866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3867 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003868 ac_cv_kpthread=yes
3869else
Martin v. Löwis11437992002-04-12 09:54:03 +00003870 echo "$as_me: program exited with status $ac_status" >&5
3871echo "$as_me: failed program was:" >&5
3872cat conftest.$ac_ext >&5
3873( exit $ac_status )
3874ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003875fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003876rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003877fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003878CC="$ac_save_cc"
3879fi
3880
Martin v. Löwis11437992002-04-12 09:54:03 +00003881echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3882echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003883fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003884
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003885if test $ac_cv_kpthread = no
3886then
3887# -Kthread, if available, provides the right #defines
3888# and linker options to make pthread_create available
3889# Some compilers won't report that they do not support -Kthread,
3890# so we need to run a program to see whether it really made the
3891# function available.
3892echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
3893echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
3894if test "${ac_cv_kthread+set}" = set; then
3895 echo $ECHO_N "(cached) $ECHO_C" >&6
3896else
3897 ac_save_cc="$CC"
3898CC="$CC -Kthread"
3899if test "$cross_compiling" = yes; then
3900 ac_cv_kthread=no
3901else
3902 cat >conftest.$ac_ext <<_ACEOF
3903#line $LINENO "configure"
3904#include "confdefs.h"
3905
3906#include <pthread.h>
3907
3908void* routine(void* p){return NULL;}
3909
3910int main(){
3911 pthread_t p;
3912 if(pthread_create(&p,NULL,routine,NULL)!=0)
3913 return 1;
3914 (void)pthread_detach(p);
3915 return 0;
3916}
3917
3918_ACEOF
3919rm -f conftest$ac_exeext
3920if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3921 (eval $ac_link) 2>&5
3922 ac_status=$?
3923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3924 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3925 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3926 (eval $ac_try) 2>&5
3927 ac_status=$?
3928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3929 (exit $ac_status); }; }; then
3930 ac_cv_kthread=yes
3931else
3932 echo "$as_me: program exited with status $ac_status" >&5
3933echo "$as_me: failed program was:" >&5
3934cat conftest.$ac_ext >&5
3935( exit $ac_status )
3936ac_cv_kthread=no
3937fi
3938rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3939fi
3940CC="$ac_save_cc"
3941fi
3942
3943echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
3944echo "${ECHO_T}$ac_cv_kthread" >&6
3945fi
3946
Michael W. Hudson54241132001-12-07 15:38:26 +00003947
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003948# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003949echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3950echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3951if test "${ac_cv_header_stdc+set}" = set; then
3952 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003953else
Martin v. Löwis11437992002-04-12 09:54:03 +00003954 cat >conftest.$ac_ext <<_ACEOF
3955#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003956#include "confdefs.h"
3957#include <stdlib.h>
3958#include <stdarg.h>
3959#include <string.h>
3960#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003961
3962_ACEOF
3963if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3964 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3965 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00003966 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003967 rm -f conftest.er1
3968 cat conftest.err >&5
3969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3970 (exit $ac_status); } >/dev/null; then
3971 if test -s conftest.err; then
3972 ac_cpp_err=$ac_c_preproc_warn_flag
3973 else
3974 ac_cpp_err=
3975 fi
3976else
3977 ac_cpp_err=yes
3978fi
3979if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003980 ac_cv_header_stdc=yes
3981else
Martin v. Löwis11437992002-04-12 09:54:03 +00003982 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003983 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003984 ac_cv_header_stdc=no
3985fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003986rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003987
3988if test $ac_cv_header_stdc = yes; then
3989 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003990 cat >conftest.$ac_ext <<_ACEOF
3991#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003992#include "confdefs.h"
3993#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003994
3995_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003996if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00003997 egrep "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003998 :
3999else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004000 ac_cv_header_stdc=no
4001fi
4002rm -f conftest*
4003
4004fi
4005
4006if test $ac_cv_header_stdc = yes; then
4007 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004008 cat >conftest.$ac_ext <<_ACEOF
4009#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004010#include "confdefs.h"
4011#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004012
4013_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004014if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00004015 egrep "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004016 :
4017else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004018 ac_cv_header_stdc=no
4019fi
4020rm -f conftest*
4021
4022fi
4023
4024if test $ac_cv_header_stdc = yes; then
4025 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004026 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004027 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004028else
Martin v. Löwis11437992002-04-12 09:54:03 +00004029 cat >conftest.$ac_ext <<_ACEOF
4030#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004031#include "confdefs.h"
4032#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004033#if ((' ' & 0x0FF) == 0x020)
4034# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4035# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4036#else
4037# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4038 || ('j' <= (c) && (c) <= 'r') \
4039 || ('s' <= (c) && (c) <= 'z'))
4040# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4041#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004042
Martin v. Löwis11437992002-04-12 09:54:03 +00004043#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4044int
4045main ()
4046{
4047 int i;
4048 for (i = 0; i < 256; i++)
4049 if (XOR (islower (i), ISLOWER (i))
4050 || toupper (i) != TOUPPER (i))
4051 exit(2);
4052 exit (0);
4053}
4054_ACEOF
4055rm -f conftest$ac_exeext
4056if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4057 (eval $ac_link) 2>&5
4058 ac_status=$?
4059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4060 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4061 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4062 (eval $ac_try) 2>&5
4063 ac_status=$?
4064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4065 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004066 :
4067else
Martin v. Löwis11437992002-04-12 09:54:03 +00004068 echo "$as_me: program exited with status $ac_status" >&5
4069echo "$as_me: failed program was:" >&5
4070cat conftest.$ac_ext >&5
4071( exit $ac_status )
4072ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004073fi
Barry Warsawfe33b792003-01-07 22:42:49 +00004074rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004075fi
4076fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004077fi
4078echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4079echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004080if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004081
4082cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004083#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004084_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004085
4086fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004087
Martin v. Löwis11437992002-04-12 09:54:03 +00004088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004125
Barry Warsawfe33b792003-01-07 22:42:49 +00004126
Martin v. Löwis11437992002-04-12 09:54:03 +00004127for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004128libintl.h locale.h ncurses.h poll.h pthread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004129signal.h stdarg.h stddef.h stdlib.h stropts.h termios.h thread.h \
4130unistd.h utime.h \
Skip Montanaro57454e52002-06-14 20:30:31 +00004131sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004132sys/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 +00004133sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Barry Warsawfe33b792003-01-07 22:42:49 +00004134sys/resource.h netpacket/packet.h sysexits.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004135do
Martin v. Löwis11437992002-04-12 09:54:03 +00004136as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4137if eval "test \"\${$as_ac_Header+set}\" = set"; then
4138 echo "$as_me:$LINENO: checking for $ac_header" >&5
4139echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4140if eval "test \"\${$as_ac_Header+set}\" = set"; then
4141 echo $ECHO_N "(cached) $ECHO_C" >&6
4142fi
4143echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4144echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004145else
Martin v. Löwis11437992002-04-12 09:54:03 +00004146 # Is the header compilable?
4147echo "$as_me:$LINENO: checking $ac_header usability" >&5
4148echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4149cat >conftest.$ac_ext <<_ACEOF
4150#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004151#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004152$ac_includes_default
4153#include <$ac_header>
4154_ACEOF
4155rm -f conftest.$ac_objext
4156if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4157 (eval $ac_compile) 2>&5
4158 ac_status=$?
4159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4160 (exit $ac_status); } &&
4161 { ac_try='test -s conftest.$ac_objext'
4162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4163 (eval $ac_try) 2>&5
4164 ac_status=$?
4165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4166 (exit $ac_status); }; }; then
4167 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004168else
Martin v. Löwis11437992002-04-12 09:54:03 +00004169 echo "$as_me: failed program was:" >&5
4170cat conftest.$ac_ext >&5
4171ac_header_compiler=no
4172fi
4173rm -f conftest.$ac_objext conftest.$ac_ext
4174echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4175echo "${ECHO_T}$ac_header_compiler" >&6
4176
4177# Is the header present?
4178echo "$as_me:$LINENO: checking $ac_header presence" >&5
4179echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4180cat >conftest.$ac_ext <<_ACEOF
4181#line $LINENO "configure"
4182#include "confdefs.h"
4183#include <$ac_header>
4184_ACEOF
4185if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4186 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4187 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004188 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004189 rm -f conftest.er1
4190 cat conftest.err >&5
4191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4192 (exit $ac_status); } >/dev/null; then
4193 if test -s conftest.err; then
4194 ac_cpp_err=$ac_c_preproc_warn_flag
4195 else
4196 ac_cpp_err=
4197 fi
4198else
4199 ac_cpp_err=yes
4200fi
4201if test -z "$ac_cpp_err"; then
4202 ac_header_preproc=yes
4203else
4204 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004205 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004206 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004207fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004208rm -f conftest.err conftest.$ac_ext
4209echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4210echo "${ECHO_T}$ac_header_preproc" >&6
4211
4212# So? What about this header?
4213case $ac_header_compiler:$ac_header_preproc in
4214 yes:no )
4215 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4216echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4217 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4218echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4219 no:yes )
4220 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4221echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4222 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4223echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4224 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4225echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4226esac
4227echo "$as_me:$LINENO: checking for $ac_header" >&5
4228echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4229if eval "test \"\${$as_ac_Header+set}\" = set"; then
4230 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004231else
Martin v. Löwis11437992002-04-12 09:54:03 +00004232 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004233fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004234echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4235echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4236
4237fi
4238if test `eval echo '${'$as_ac_Header'}'` = yes; then
4239 cat >>confdefs.h <<_ACEOF
4240#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4241_ACEOF
4242
4243fi
4244
Guido van Rossum627b2d71993-12-24 10:39:16 +00004245done
4246
Martin v. Löwis11437992002-04-12 09:54:03 +00004247
4248
4249
4250
4251
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004252ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004253for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4254 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4255echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4256echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4257if eval "test \"\${$as_ac_Header+set}\" = set"; then
4258 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004259else
Martin v. Löwis11437992002-04-12 09:54:03 +00004260 cat >conftest.$ac_ext <<_ACEOF
4261#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004262#include "confdefs.h"
4263#include <sys/types.h>
4264#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004265
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{
4275if ((DIR *) 0)
4276return 0;
4277 ;
4278 return 0;
4279}
4280_ACEOF
4281rm -f conftest.$ac_objext
4282if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4283 (eval $ac_compile) 2>&5
4284 ac_status=$?
4285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4286 (exit $ac_status); } &&
4287 { ac_try='test -s conftest.$ac_objext'
4288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4289 (eval $ac_try) 2>&5
4290 ac_status=$?
4291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4292 (exit $ac_status); }; }; then
4293 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004294else
Martin v. Löwis11437992002-04-12 09:54:03 +00004295 echo "$as_me: failed program was:" >&5
4296cat conftest.$ac_ext >&5
4297eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004298fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004299rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004300fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004301echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4302echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4303if test `eval echo '${'$as_ac_Header'}'` = yes; then
4304 cat >>confdefs.h <<_ACEOF
4305#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4306_ACEOF
4307
4308ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004309fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004310
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004311done
4312# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4313if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004314 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4315echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4316if test "${ac_cv_search_opendir+set}" = set; then
4317 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004318else
Martin v. Löwis11437992002-04-12 09:54:03 +00004319 ac_func_search_save_LIBS=$LIBS
4320ac_cv_search_opendir=no
4321cat >conftest.$ac_ext <<_ACEOF
4322#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004323#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004324
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004325/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004326#ifdef __cplusplus
4327extern "C"
4328#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004329/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004330 builtin and then its argument prototype would still apply. */
4331char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004332#ifdef F77_DUMMY_MAIN
4333# ifdef __cplusplus
4334 extern "C"
4335# endif
4336 int F77_DUMMY_MAIN() { return 1; }
4337#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004338int
4339main ()
4340{
4341opendir ();
4342 ;
4343 return 0;
4344}
4345_ACEOF
4346rm -f conftest.$ac_objext conftest$ac_exeext
4347if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4348 (eval $ac_link) 2>&5
4349 ac_status=$?
4350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4351 (exit $ac_status); } &&
4352 { ac_try='test -s conftest$ac_exeext'
4353 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4354 (eval $ac_try) 2>&5
4355 ac_status=$?
4356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4357 (exit $ac_status); }; }; then
4358 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004359else
Martin v. Löwis11437992002-04-12 09:54:03 +00004360 echo "$as_me: failed program was:" >&5
4361cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004362fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004363rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4364if test "$ac_cv_search_opendir" = no; then
4365 for ac_lib in dir; do
4366 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4367 cat >conftest.$ac_ext <<_ACEOF
4368#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004369#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004370
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004371/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004372#ifdef __cplusplus
4373extern "C"
4374#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004375/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004376 builtin and then its argument prototype would still apply. */
4377char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004378#ifdef F77_DUMMY_MAIN
4379# ifdef __cplusplus
4380 extern "C"
4381# endif
4382 int F77_DUMMY_MAIN() { return 1; }
4383#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004384int
4385main ()
4386{
4387opendir ();
4388 ;
4389 return 0;
4390}
4391_ACEOF
4392rm -f conftest.$ac_objext conftest$ac_exeext
4393if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4394 (eval $ac_link) 2>&5
4395 ac_status=$?
4396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4397 (exit $ac_status); } &&
4398 { ac_try='test -s conftest$ac_exeext'
4399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4400 (eval $ac_try) 2>&5
4401 ac_status=$?
4402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4403 (exit $ac_status); }; }; then
4404 ac_cv_search_opendir="-l$ac_lib"
4405break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004406else
Martin v. Löwis11437992002-04-12 09:54:03 +00004407 echo "$as_me: failed program was:" >&5
4408cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004409fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004410rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4411 done
4412fi
4413LIBS=$ac_func_search_save_LIBS
4414fi
4415echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4416echo "${ECHO_T}$ac_cv_search_opendir" >&6
4417if test "$ac_cv_search_opendir" != no; then
4418 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004419
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004420fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004421
Michael W. Hudson54241132001-12-07 15:38:26 +00004422else
Martin v. Löwis11437992002-04-12 09:54:03 +00004423 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4424echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4425if test "${ac_cv_search_opendir+set}" = set; then
4426 echo $ECHO_N "(cached) $ECHO_C" >&6
4427else
4428 ac_func_search_save_LIBS=$LIBS
4429ac_cv_search_opendir=no
4430cat >conftest.$ac_ext <<_ACEOF
4431#line $LINENO "configure"
4432#include "confdefs.h"
4433
4434/* Override any gcc2 internal prototype to avoid an error. */
4435#ifdef __cplusplus
4436extern "C"
4437#endif
4438/* We use char because int might match the return type of a gcc2
4439 builtin and then its argument prototype would still apply. */
4440char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004441#ifdef F77_DUMMY_MAIN
4442# ifdef __cplusplus
4443 extern "C"
4444# endif
4445 int F77_DUMMY_MAIN() { return 1; }
4446#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004447int
4448main ()
4449{
4450opendir ();
4451 ;
4452 return 0;
4453}
4454_ACEOF
4455rm -f conftest.$ac_objext conftest$ac_exeext
4456if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4457 (eval $ac_link) 2>&5
4458 ac_status=$?
4459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4460 (exit $ac_status); } &&
4461 { ac_try='test -s conftest$ac_exeext'
4462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4463 (eval $ac_try) 2>&5
4464 ac_status=$?
4465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4466 (exit $ac_status); }; }; then
4467 ac_cv_search_opendir="none required"
4468else
4469 echo "$as_me: failed program was:" >&5
4470cat conftest.$ac_ext >&5
4471fi
4472rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4473if test "$ac_cv_search_opendir" = no; then
4474 for ac_lib in x; do
4475 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4476 cat >conftest.$ac_ext <<_ACEOF
4477#line $LINENO "configure"
4478#include "confdefs.h"
4479
4480/* Override any gcc2 internal prototype to avoid an error. */
4481#ifdef __cplusplus
4482extern "C"
4483#endif
4484/* We use char because int might match the return type of a gcc2
4485 builtin and then its argument prototype would still apply. */
4486char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004487#ifdef F77_DUMMY_MAIN
4488# ifdef __cplusplus
4489 extern "C"
4490# endif
4491 int F77_DUMMY_MAIN() { return 1; }
4492#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004493int
4494main ()
4495{
4496opendir ();
4497 ;
4498 return 0;
4499}
4500_ACEOF
4501rm -f conftest.$ac_objext conftest$ac_exeext
4502if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4503 (eval $ac_link) 2>&5
4504 ac_status=$?
4505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4506 (exit $ac_status); } &&
4507 { ac_try='test -s conftest$ac_exeext'
4508 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4509 (eval $ac_try) 2>&5
4510 ac_status=$?
4511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4512 (exit $ac_status); }; }; then
4513 ac_cv_search_opendir="-l$ac_lib"
4514break
4515else
4516 echo "$as_me: failed program was:" >&5
4517cat conftest.$ac_ext >&5
4518fi
4519rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4520 done
4521fi
4522LIBS=$ac_func_search_save_LIBS
4523fi
4524echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4525echo "${ECHO_T}$ac_cv_search_opendir" >&6
4526if test "$ac_cv_search_opendir" != no; then
4527 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4528
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004529fi
4530
4531fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004532
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004533echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4534echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4535if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4536 echo $ECHO_N "(cached) $ECHO_C" >&6
4537else
4538 cat >conftest.$ac_ext <<_ACEOF
4539#line $LINENO "configure"
4540#include "confdefs.h"
4541#include <sys/types.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00004542#ifdef F77_DUMMY_MAIN
4543# ifdef __cplusplus
4544 extern "C"
4545# endif
4546 int F77_DUMMY_MAIN() { return 1; }
4547#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004548int
4549main ()
4550{
4551return makedev(0, 0);
4552 ;
4553 return 0;
4554}
4555_ACEOF
4556rm -f conftest.$ac_objext conftest$ac_exeext
4557if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4558 (eval $ac_link) 2>&5
4559 ac_status=$?
4560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4561 (exit $ac_status); } &&
4562 { ac_try='test -s conftest$ac_exeext'
4563 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4564 (eval $ac_try) 2>&5
4565 ac_status=$?
4566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4567 (exit $ac_status); }; }; then
4568 ac_cv_header_sys_types_h_makedev=yes
4569else
4570 echo "$as_me: failed program was:" >&5
4571cat conftest.$ac_ext >&5
4572ac_cv_header_sys_types_h_makedev=no
4573fi
4574rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4575
4576fi
4577echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4578echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4579
4580if test $ac_cv_header_sys_types_h_makedev = no; then
4581if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4582 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4583echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4584if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4585 echo $ECHO_N "(cached) $ECHO_C" >&6
4586fi
4587echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4588echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4589else
4590 # Is the header compilable?
4591echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4592echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4593cat >conftest.$ac_ext <<_ACEOF
4594#line $LINENO "configure"
4595#include "confdefs.h"
4596$ac_includes_default
4597#include <sys/mkdev.h>
4598_ACEOF
4599rm -f conftest.$ac_objext
4600if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4601 (eval $ac_compile) 2>&5
4602 ac_status=$?
4603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4604 (exit $ac_status); } &&
4605 { ac_try='test -s conftest.$ac_objext'
4606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4607 (eval $ac_try) 2>&5
4608 ac_status=$?
4609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4610 (exit $ac_status); }; }; then
4611 ac_header_compiler=yes
4612else
4613 echo "$as_me: failed program was:" >&5
4614cat conftest.$ac_ext >&5
4615ac_header_compiler=no
4616fi
4617rm -f conftest.$ac_objext conftest.$ac_ext
4618echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4619echo "${ECHO_T}$ac_header_compiler" >&6
4620
4621# Is the header present?
4622echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4623echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4624cat >conftest.$ac_ext <<_ACEOF
4625#line $LINENO "configure"
4626#include "confdefs.h"
4627#include <sys/mkdev.h>
4628_ACEOF
4629if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4630 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4631 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004632 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004633 rm -f conftest.er1
4634 cat conftest.err >&5
4635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4636 (exit $ac_status); } >/dev/null; then
4637 if test -s conftest.err; then
4638 ac_cpp_err=$ac_c_preproc_warn_flag
4639 else
4640 ac_cpp_err=
4641 fi
4642else
4643 ac_cpp_err=yes
4644fi
4645if test -z "$ac_cpp_err"; then
4646 ac_header_preproc=yes
4647else
4648 echo "$as_me: failed program was:" >&5
4649 cat conftest.$ac_ext >&5
4650 ac_header_preproc=no
4651fi
4652rm -f conftest.err conftest.$ac_ext
4653echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4654echo "${ECHO_T}$ac_header_preproc" >&6
4655
4656# So? What about this header?
4657case $ac_header_compiler:$ac_header_preproc in
4658 yes:no )
4659 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4660echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4661 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4662echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4663 no:yes )
4664 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4665echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4666 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4667echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4668 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4669echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4670esac
4671echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4672echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4673if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4674 echo $ECHO_N "(cached) $ECHO_C" >&6
4675else
4676 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4677fi
4678echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4679echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4680
4681fi
4682if test $ac_cv_header_sys_mkdev_h = yes; then
4683
4684cat >>confdefs.h <<\_ACEOF
4685#define MAJOR_IN_MKDEV 1
4686_ACEOF
4687
4688fi
4689
4690
4691
4692 if test $ac_cv_header_sys_mkdev_h = no; then
4693 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4694 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4695echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4696if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4697 echo $ECHO_N "(cached) $ECHO_C" >&6
4698fi
4699echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4700echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4701else
4702 # Is the header compilable?
4703echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4704echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4705cat >conftest.$ac_ext <<_ACEOF
4706#line $LINENO "configure"
4707#include "confdefs.h"
4708$ac_includes_default
4709#include <sys/sysmacros.h>
4710_ACEOF
4711rm -f conftest.$ac_objext
4712if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4713 (eval $ac_compile) 2>&5
4714 ac_status=$?
4715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4716 (exit $ac_status); } &&
4717 { ac_try='test -s conftest.$ac_objext'
4718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4719 (eval $ac_try) 2>&5
4720 ac_status=$?
4721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4722 (exit $ac_status); }; }; then
4723 ac_header_compiler=yes
4724else
4725 echo "$as_me: failed program was:" >&5
4726cat conftest.$ac_ext >&5
4727ac_header_compiler=no
4728fi
4729rm -f conftest.$ac_objext conftest.$ac_ext
4730echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4731echo "${ECHO_T}$ac_header_compiler" >&6
4732
4733# Is the header present?
4734echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
4735echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
4736cat >conftest.$ac_ext <<_ACEOF
4737#line $LINENO "configure"
4738#include "confdefs.h"
4739#include <sys/sysmacros.h>
4740_ACEOF
4741if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4742 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4743 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004744 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004745 rm -f conftest.er1
4746 cat conftest.err >&5
4747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4748 (exit $ac_status); } >/dev/null; then
4749 if test -s conftest.err; then
4750 ac_cpp_err=$ac_c_preproc_warn_flag
4751 else
4752 ac_cpp_err=
4753 fi
4754else
4755 ac_cpp_err=yes
4756fi
4757if test -z "$ac_cpp_err"; then
4758 ac_header_preproc=yes
4759else
4760 echo "$as_me: failed program was:" >&5
4761 cat conftest.$ac_ext >&5
4762 ac_header_preproc=no
4763fi
4764rm -f conftest.err conftest.$ac_ext
4765echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4766echo "${ECHO_T}$ac_header_preproc" >&6
4767
4768# So? What about this header?
4769case $ac_header_compiler:$ac_header_preproc in
4770 yes:no )
4771 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
4772echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4773 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4774echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4775 no:yes )
4776 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
4777echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
4778 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
4779echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
4780 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4781echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4782esac
4783echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4784echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4785if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4786 echo $ECHO_N "(cached) $ECHO_C" >&6
4787else
4788 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
4789fi
4790echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4791echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4792
4793fi
4794if test $ac_cv_header_sys_sysmacros_h = yes; then
4795
4796cat >>confdefs.h <<\_ACEOF
4797#define MAJOR_IN_SYSMACROS 1
4798_ACEOF
4799
4800fi
4801
4802
4803 fi
4804fi
4805
Michael W. Hudson54241132001-12-07 15:38:26 +00004806
Guido van Rossum627b2d71993-12-24 10:39:16 +00004807# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004808was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004809echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4810echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4811cat >conftest.$ac_ext <<_ACEOF
4812#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004813#include "confdefs.h"
4814#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004815
4816_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004817if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00004818 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004819 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004820else
Martin v. Löwis11437992002-04-12 09:54:03 +00004821
4822
4823cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004824#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004825_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004826
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004827
Guido van Rossum627b2d71993-12-24 10:39:16 +00004828fi
4829rm -f conftest*
4830
Martin v. Löwis11437992002-04-12 09:54:03 +00004831echo "$as_me:$LINENO: result: $was_it_defined" >&5
4832echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004833
Neal Norwitz11690112002-07-30 01:08:28 +00004834# Check whether using makedev requires defining _OSF_SOURCE
4835echo "$as_me:$LINENO: checking for makedev" >&5
4836echo $ECHO_N "checking for makedev... $ECHO_C" >&6
4837cat >conftest.$ac_ext <<_ACEOF
4838#line $LINENO "configure"
4839#include "confdefs.h"
Neal Norwitz6eb37f02003-02-23 23:28:15 +00004840#include <sys/types.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00004841#ifdef F77_DUMMY_MAIN
4842# ifdef __cplusplus
4843 extern "C"
4844# endif
4845 int F77_DUMMY_MAIN() { return 1; }
4846#endif
Neal Norwitz11690112002-07-30 01:08:28 +00004847int
4848main ()
4849{
4850 makedev(0, 0)
4851 ;
4852 return 0;
4853}
4854_ACEOF
4855rm -f conftest.$ac_objext conftest$ac_exeext
4856if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4857 (eval $ac_link) 2>&5
4858 ac_status=$?
4859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4860 (exit $ac_status); } &&
4861 { ac_try='test -s conftest$ac_exeext'
4862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4863 (eval $ac_try) 2>&5
4864 ac_status=$?
4865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4866 (exit $ac_status); }; }; then
4867 ac_cv_has_makedev=yes
4868else
4869 echo "$as_me: failed program was:" >&5
4870cat conftest.$ac_ext >&5
4871ac_cv_has_makedev=no
4872fi
4873rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4874if test "$ac_cv_has_makedev" = "no"; then
4875 # we didn't link, try if _OSF_SOURCE will allow us to link
4876 cat >conftest.$ac_ext <<_ACEOF
4877#line $LINENO "configure"
4878#include "confdefs.h"
4879
Neal Norwitz6eb37f02003-02-23 23:28:15 +00004880#define _OSF_SOURCE 1
4881#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00004882
Barry Warsawfe33b792003-01-07 22:42:49 +00004883#ifdef F77_DUMMY_MAIN
4884# ifdef __cplusplus
4885 extern "C"
4886# endif
4887 int F77_DUMMY_MAIN() { return 1; }
4888#endif
Neal Norwitz11690112002-07-30 01:08:28 +00004889int
4890main ()
4891{
4892 makedev(0, 0)
4893 ;
4894 return 0;
4895}
4896_ACEOF
4897rm -f conftest.$ac_objext conftest$ac_exeext
4898if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4899 (eval $ac_link) 2>&5
4900 ac_status=$?
4901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4902 (exit $ac_status); } &&
4903 { ac_try='test -s conftest$ac_exeext'
4904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4905 (eval $ac_try) 2>&5
4906 ac_status=$?
4907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4908 (exit $ac_status); }; }; then
4909 ac_cv_has_makedev=yes
4910else
4911 echo "$as_me: failed program was:" >&5
4912cat conftest.$ac_ext >&5
4913ac_cv_has_makedev=no
4914fi
4915rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4916 if test "$ac_cv_has_makedev" = "yes"; then
4917
4918cat >>confdefs.h <<\_ACEOF
4919#define _OSF_SOURCE 1
4920_ACEOF
4921
4922 fi
4923fi
4924echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
4925echo "${ECHO_T}$ac_cv_has_makedev" >&6
4926if test "$ac_cv_has_makedev" = "yes"; then
4927
4928cat >>confdefs.h <<\_ACEOF
4929#define HAVE_MAKEDEV 1
4930_ACEOF
4931
4932fi
4933
Martin v. Löwis399a6892002-10-04 10:22:02 +00004934# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
4935# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
4936# defined, but the compiler does not support pragma redefine_extname,
4937# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
4938# structures (such as rlimit64) without declaring them. As a
4939# work-around, disable LFS on such configurations
4940
4941use_lfs=yes
4942echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
4943echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
4944cat >conftest.$ac_ext <<_ACEOF
4945#line $LINENO "configure"
4946#include "confdefs.h"
4947
4948#define _LARGEFILE_SOURCE 1
4949#define _FILE_OFFSET_BITS 64
4950#include <sys/resource.h>
4951
Barry Warsawfe33b792003-01-07 22:42:49 +00004952#ifdef F77_DUMMY_MAIN
4953# ifdef __cplusplus
4954 extern "C"
4955# endif
4956 int F77_DUMMY_MAIN() { return 1; }
4957#endif
Martin v. Löwis399a6892002-10-04 10:22:02 +00004958int
4959main ()
4960{
4961struct rlimit foo;
4962 ;
4963 return 0;
4964}
4965_ACEOF
4966rm -f conftest.$ac_objext
4967if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4968 (eval $ac_compile) 2>&5
4969 ac_status=$?
4970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4971 (exit $ac_status); } &&
4972 { ac_try='test -s conftest.$ac_objext'
4973 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4974 (eval $ac_try) 2>&5
4975 ac_status=$?
4976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4977 (exit $ac_status); }; }; then
4978 sol_lfs_bug=no
4979else
4980 echo "$as_me: failed program was:" >&5
4981cat conftest.$ac_ext >&5
4982sol_lfs_bug=yes
4983fi
4984rm -f conftest.$ac_objext conftest.$ac_ext
4985echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
4986echo "${ECHO_T}$sol_lfs_bug" >&6
4987if test "$sol_lfs_bug" = "yes"; then
4988 use_lfs=no
4989fi
4990
4991if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00004992# Two defines needed to enable largefile support on various platforms
4993# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004994
Martin v. Löwis11437992002-04-12 09:54:03 +00004995cat >>confdefs.h <<\_ACEOF
4996#define _LARGEFILE_SOURCE 1
4997_ACEOF
4998
4999
5000cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005001#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005002_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005003
Martin v. Löwis399a6892002-10-04 10:22:02 +00005004fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005005
Guido van Rossum84e7b241996-08-19 21:59:00 +00005006# Add some code to confdefs.h so that the test for off_t works on SCO
5007cat >> confdefs.h <<\EOF
5008#if defined(SCO_DS)
5009#undef _OFF_T
5010#endif
5011EOF
5012
Guido van Rossumef2255b2000-03-10 22:30:29 +00005013# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005014echo "$as_me:$LINENO: checking for mode_t" >&5
5015echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5016if test "${ac_cv_type_mode_t+set}" = set; then
5017 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005018else
Martin v. Löwis11437992002-04-12 09:54:03 +00005019 cat >conftest.$ac_ext <<_ACEOF
5020#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005021#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005022$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005023#ifdef F77_DUMMY_MAIN
5024# ifdef __cplusplus
5025 extern "C"
5026# endif
5027 int F77_DUMMY_MAIN() { return 1; }
5028#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005029int
5030main ()
5031{
5032if ((mode_t *) 0)
5033 return 0;
5034if (sizeof (mode_t))
5035 return 0;
5036 ;
5037 return 0;
5038}
5039_ACEOF
5040rm -f conftest.$ac_objext
5041if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5042 (eval $ac_compile) 2>&5
5043 ac_status=$?
5044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5045 (exit $ac_status); } &&
5046 { ac_try='test -s conftest.$ac_objext'
5047 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5048 (eval $ac_try) 2>&5
5049 ac_status=$?
5050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5051 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005052 ac_cv_type_mode_t=yes
5053else
Martin v. Löwis11437992002-04-12 09:54:03 +00005054 echo "$as_me: failed program was:" >&5
5055cat conftest.$ac_ext >&5
5056ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005057fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005058rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005059fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005060echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5061echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5062if test $ac_cv_type_mode_t = yes; then
5063 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005064else
Martin v. Löwis11437992002-04-12 09:54:03 +00005065
5066cat >>confdefs.h <<_ACEOF
5067#define mode_t int
5068_ACEOF
5069
5070fi
5071
5072echo "$as_me:$LINENO: checking for off_t" >&5
5073echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5074if test "${ac_cv_type_off_t+set}" = set; then
5075 echo $ECHO_N "(cached) $ECHO_C" >&6
5076else
5077 cat >conftest.$ac_ext <<_ACEOF
5078#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005079#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005080$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005081#ifdef F77_DUMMY_MAIN
5082# ifdef __cplusplus
5083 extern "C"
5084# endif
5085 int F77_DUMMY_MAIN() { return 1; }
5086#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005087int
5088main ()
5089{
5090if ((off_t *) 0)
5091 return 0;
5092if (sizeof (off_t))
5093 return 0;
5094 ;
5095 return 0;
5096}
5097_ACEOF
5098rm -f conftest.$ac_objext
5099if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5100 (eval $ac_compile) 2>&5
5101 ac_status=$?
5102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5103 (exit $ac_status); } &&
5104 { ac_try='test -s conftest.$ac_objext'
5105 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5106 (eval $ac_try) 2>&5
5107 ac_status=$?
5108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5109 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005110 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005111else
Martin v. Löwis11437992002-04-12 09:54:03 +00005112 echo "$as_me: failed program was:" >&5
5113cat conftest.$ac_ext >&5
5114ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005115fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005116rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005117fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005118echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5119echo "${ECHO_T}$ac_cv_type_off_t" >&6
5120if test $ac_cv_type_off_t = yes; then
5121 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005122else
Martin v. Löwis11437992002-04-12 09:54:03 +00005123
5124cat >>confdefs.h <<_ACEOF
5125#define off_t long
5126_ACEOF
5127
5128fi
5129
5130echo "$as_me:$LINENO: checking for pid_t" >&5
5131echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5132if test "${ac_cv_type_pid_t+set}" = set; then
5133 echo $ECHO_N "(cached) $ECHO_C" >&6
5134else
5135 cat >conftest.$ac_ext <<_ACEOF
5136#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005137#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005138$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005139#ifdef F77_DUMMY_MAIN
5140# ifdef __cplusplus
5141 extern "C"
5142# endif
5143 int F77_DUMMY_MAIN() { return 1; }
5144#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005145int
5146main ()
5147{
5148if ((pid_t *) 0)
5149 return 0;
5150if (sizeof (pid_t))
5151 return 0;
5152 ;
5153 return 0;
5154}
5155_ACEOF
5156rm -f conftest.$ac_objext
5157if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5158 (eval $ac_compile) 2>&5
5159 ac_status=$?
5160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5161 (exit $ac_status); } &&
5162 { ac_try='test -s conftest.$ac_objext'
5163 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5164 (eval $ac_try) 2>&5
5165 ac_status=$?
5166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5167 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005168 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005169else
Martin v. Löwis11437992002-04-12 09:54:03 +00005170 echo "$as_me: failed program was:" >&5
5171cat conftest.$ac_ext >&5
5172ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005173fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005174rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005175fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005176echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5177echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5178if test $ac_cv_type_pid_t = yes; then
5179 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005180else
Martin v. Löwis11437992002-04-12 09:54:03 +00005181
5182cat >>confdefs.h <<_ACEOF
5183#define pid_t int
5184_ACEOF
5185
5186fi
5187
5188echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5189echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5190if test "${ac_cv_type_signal+set}" = set; then
5191 echo $ECHO_N "(cached) $ECHO_C" >&6
5192else
5193 cat >conftest.$ac_ext <<_ACEOF
5194#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005195#include "confdefs.h"
5196#include <sys/types.h>
5197#include <signal.h>
5198#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005199# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005200#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005201#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005202extern "C" void (*signal (int, void (*)(int)))(int);
5203#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005204void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005205#endif
5206
Barry Warsawfe33b792003-01-07 22:42:49 +00005207#ifdef F77_DUMMY_MAIN
5208# ifdef __cplusplus
5209 extern "C"
5210# endif
5211 int F77_DUMMY_MAIN() { return 1; }
5212#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005213int
5214main ()
5215{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005216int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005217 ;
5218 return 0;
5219}
5220_ACEOF
5221rm -f conftest.$ac_objext
5222if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5223 (eval $ac_compile) 2>&5
5224 ac_status=$?
5225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5226 (exit $ac_status); } &&
5227 { ac_try='test -s conftest.$ac_objext'
5228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5229 (eval $ac_try) 2>&5
5230 ac_status=$?
5231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5232 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005233 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005234else
Martin v. Löwis11437992002-04-12 09:54:03 +00005235 echo "$as_me: failed program was:" >&5
5236cat conftest.$ac_ext >&5
5237ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005238fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005239rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005240fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005241echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5242echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005243
Martin v. Löwis11437992002-04-12 09:54:03 +00005244cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005245#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005246_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005247
Michael W. Hudson54241132001-12-07 15:38:26 +00005248
Martin v. Löwis11437992002-04-12 09:54:03 +00005249echo "$as_me:$LINENO: checking for size_t" >&5
5250echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5251if test "${ac_cv_type_size_t+set}" = set; then
5252 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005253else
Martin v. Löwis11437992002-04-12 09:54:03 +00005254 cat >conftest.$ac_ext <<_ACEOF
5255#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005256#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005257$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005258#ifdef F77_DUMMY_MAIN
5259# ifdef __cplusplus
5260 extern "C"
5261# endif
5262 int F77_DUMMY_MAIN() { return 1; }
5263#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005264int
5265main ()
5266{
5267if ((size_t *) 0)
5268 return 0;
5269if (sizeof (size_t))
5270 return 0;
5271 ;
5272 return 0;
5273}
5274_ACEOF
5275rm -f conftest.$ac_objext
5276if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5277 (eval $ac_compile) 2>&5
5278 ac_status=$?
5279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5280 (exit $ac_status); } &&
5281 { ac_try='test -s conftest.$ac_objext'
5282 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5283 (eval $ac_try) 2>&5
5284 ac_status=$?
5285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5286 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005287 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005288else
Martin v. Löwis11437992002-04-12 09:54:03 +00005289 echo "$as_me: failed program was:" >&5
5290cat conftest.$ac_ext >&5
5291ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005292fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005293rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005294fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005295echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5296echo "${ECHO_T}$ac_cv_type_size_t" >&6
5297if test $ac_cv_type_size_t = yes; then
5298 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005299else
Martin v. Löwis11437992002-04-12 09:54:03 +00005300
5301cat >>confdefs.h <<_ACEOF
5302#define size_t unsigned
5303_ACEOF
5304
5305fi
5306
5307echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5308echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5309if test "${ac_cv_type_uid_t+set}" = set; then
5310 echo $ECHO_N "(cached) $ECHO_C" >&6
5311else
5312 cat >conftest.$ac_ext <<_ACEOF
5313#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005314#include "confdefs.h"
5315#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005316
5317_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005318if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00005319 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005320 ac_cv_type_uid_t=yes
5321else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005322 ac_cv_type_uid_t=no
5323fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005324rm -f conftest*
5325
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005326fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005327echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5328echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005329if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005330
Martin v. Löwis11437992002-04-12 09:54:03 +00005331cat >>confdefs.h <<\_ACEOF
5332#define uid_t int
5333_ACEOF
5334
5335
5336cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005337#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005338_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005339
5340fi
5341
Jack Jansendd19cf82001-12-06 22:36:17 +00005342
Michael W. Hudson54241132001-12-07 15:38:26 +00005343# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00005344echo "$as_me:$LINENO: checking for int" >&5
5345echo $ECHO_N "checking for int... $ECHO_C" >&6
5346if test "${ac_cv_type_int+set}" = set; then
5347 echo $ECHO_N "(cached) $ECHO_C" >&6
5348else
5349 cat >conftest.$ac_ext <<_ACEOF
5350#line $LINENO "configure"
5351#include "confdefs.h"
5352$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005353#ifdef F77_DUMMY_MAIN
5354# ifdef __cplusplus
5355 extern "C"
5356# endif
5357 int F77_DUMMY_MAIN() { return 1; }
5358#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005359int
5360main ()
5361{
5362if ((int *) 0)
5363 return 0;
5364if (sizeof (int))
5365 return 0;
5366 ;
5367 return 0;
5368}
5369_ACEOF
5370rm -f conftest.$ac_objext
5371if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5372 (eval $ac_compile) 2>&5
5373 ac_status=$?
5374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5375 (exit $ac_status); } &&
5376 { ac_try='test -s conftest.$ac_objext'
5377 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5378 (eval $ac_try) 2>&5
5379 ac_status=$?
5380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5381 (exit $ac_status); }; }; then
5382 ac_cv_type_int=yes
5383else
5384 echo "$as_me: failed program was:" >&5
5385cat conftest.$ac_ext >&5
5386ac_cv_type_int=no
5387fi
5388rm -f conftest.$ac_objext conftest.$ac_ext
5389fi
5390echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5391echo "${ECHO_T}$ac_cv_type_int" >&6
5392
5393echo "$as_me:$LINENO: checking size of int" >&5
5394echo $ECHO_N "checking size of int... $ECHO_C" >&6
5395if test "${ac_cv_sizeof_int+set}" = set; then
5396 echo $ECHO_N "(cached) $ECHO_C" >&6
5397else
5398 if test "$ac_cv_type_int" = yes; then
5399 # The cast to unsigned long works around a bug in the HP C Compiler
5400 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5401 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5402 # This bug is HP SR number 8606223364.
5403 if test "$cross_compiling" = yes; then
5404 # Depending upon the size, compute the lo and hi bounds.
5405cat >conftest.$ac_ext <<_ACEOF
5406#line $LINENO "configure"
5407#include "confdefs.h"
5408$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005409#ifdef F77_DUMMY_MAIN
5410# ifdef __cplusplus
5411 extern "C"
5412# endif
5413 int F77_DUMMY_MAIN() { return 1; }
5414#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005415int
5416main ()
5417{
5418static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5419test_array [0] = 0
5420
5421 ;
5422 return 0;
5423}
5424_ACEOF
5425rm -f conftest.$ac_objext
5426if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5427 (eval $ac_compile) 2>&5
5428 ac_status=$?
5429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5430 (exit $ac_status); } &&
5431 { ac_try='test -s conftest.$ac_objext'
5432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5433 (eval $ac_try) 2>&5
5434 ac_status=$?
5435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5436 (exit $ac_status); }; }; then
5437 ac_lo=0 ac_mid=0
5438 while :; do
5439 cat >conftest.$ac_ext <<_ACEOF
5440#line $LINENO "configure"
5441#include "confdefs.h"
5442$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005443#ifdef F77_DUMMY_MAIN
5444# ifdef __cplusplus
5445 extern "C"
5446# endif
5447 int F77_DUMMY_MAIN() { return 1; }
5448#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005449int
5450main ()
5451{
5452static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5453test_array [0] = 0
5454
5455 ;
5456 return 0;
5457}
5458_ACEOF
5459rm -f conftest.$ac_objext
5460if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5461 (eval $ac_compile) 2>&5
5462 ac_status=$?
5463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5464 (exit $ac_status); } &&
5465 { ac_try='test -s conftest.$ac_objext'
5466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5467 (eval $ac_try) 2>&5
5468 ac_status=$?
5469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5470 (exit $ac_status); }; }; then
5471 ac_hi=$ac_mid; break
5472else
5473 echo "$as_me: failed program was:" >&5
5474cat conftest.$ac_ext >&5
5475ac_lo=`expr $ac_mid + 1`
5476 if test $ac_lo -le $ac_mid; then
5477 ac_lo= ac_hi=
5478 break
5479 fi
5480 ac_mid=`expr 2 '*' $ac_mid + 1`
5481fi
5482rm -f conftest.$ac_objext conftest.$ac_ext
5483 done
5484else
5485 echo "$as_me: failed program was:" >&5
5486cat conftest.$ac_ext >&5
5487cat >conftest.$ac_ext <<_ACEOF
5488#line $LINENO "configure"
5489#include "confdefs.h"
5490$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005491#ifdef F77_DUMMY_MAIN
5492# ifdef __cplusplus
5493 extern "C"
5494# endif
5495 int F77_DUMMY_MAIN() { return 1; }
5496#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005497int
5498main ()
5499{
5500static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5501test_array [0] = 0
5502
5503 ;
5504 return 0;
5505}
5506_ACEOF
5507rm -f conftest.$ac_objext
5508if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5509 (eval $ac_compile) 2>&5
5510 ac_status=$?
5511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5512 (exit $ac_status); } &&
5513 { ac_try='test -s conftest.$ac_objext'
5514 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5515 (eval $ac_try) 2>&5
5516 ac_status=$?
5517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5518 (exit $ac_status); }; }; then
5519 ac_hi=-1 ac_mid=-1
5520 while :; do
5521 cat >conftest.$ac_ext <<_ACEOF
5522#line $LINENO "configure"
5523#include "confdefs.h"
5524$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005525#ifdef F77_DUMMY_MAIN
5526# ifdef __cplusplus
5527 extern "C"
5528# endif
5529 int F77_DUMMY_MAIN() { return 1; }
5530#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005531int
5532main ()
5533{
5534static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5535test_array [0] = 0
5536
5537 ;
5538 return 0;
5539}
5540_ACEOF
5541rm -f conftest.$ac_objext
5542if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5543 (eval $ac_compile) 2>&5
5544 ac_status=$?
5545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5546 (exit $ac_status); } &&
5547 { ac_try='test -s conftest.$ac_objext'
5548 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5549 (eval $ac_try) 2>&5
5550 ac_status=$?
5551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5552 (exit $ac_status); }; }; then
5553 ac_lo=$ac_mid; break
5554else
5555 echo "$as_me: failed program was:" >&5
5556cat conftest.$ac_ext >&5
5557ac_hi=`expr '(' $ac_mid ')' - 1`
5558 if test $ac_mid -le $ac_hi; then
5559 ac_lo= ac_hi=
5560 break
5561 fi
5562 ac_mid=`expr 2 '*' $ac_mid`
5563fi
5564rm -f conftest.$ac_objext conftest.$ac_ext
5565 done
5566else
5567 echo "$as_me: failed program was:" >&5
5568cat conftest.$ac_ext >&5
5569ac_lo= ac_hi=
5570fi
5571rm -f conftest.$ac_objext conftest.$ac_ext
5572fi
5573rm -f conftest.$ac_objext conftest.$ac_ext
5574# Binary search between lo and hi bounds.
5575while test "x$ac_lo" != "x$ac_hi"; do
5576 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5577 cat >conftest.$ac_ext <<_ACEOF
5578#line $LINENO "configure"
5579#include "confdefs.h"
5580$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005581#ifdef F77_DUMMY_MAIN
5582# ifdef __cplusplus
5583 extern "C"
5584# endif
5585 int F77_DUMMY_MAIN() { return 1; }
5586#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005587int
5588main ()
5589{
5590static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5591test_array [0] = 0
5592
5593 ;
5594 return 0;
5595}
5596_ACEOF
5597rm -f conftest.$ac_objext
5598if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5599 (eval $ac_compile) 2>&5
5600 ac_status=$?
5601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5602 (exit $ac_status); } &&
5603 { ac_try='test -s conftest.$ac_objext'
5604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5605 (eval $ac_try) 2>&5
5606 ac_status=$?
5607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5608 (exit $ac_status); }; }; then
5609 ac_hi=$ac_mid
5610else
5611 echo "$as_me: failed program was:" >&5
5612cat conftest.$ac_ext >&5
5613ac_lo=`expr '(' $ac_mid ')' + 1`
5614fi
5615rm -f conftest.$ac_objext conftest.$ac_ext
5616done
5617case $ac_lo in
5618?*) ac_cv_sizeof_int=$ac_lo;;
5619'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5620echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5621 { (exit 1); exit 1; }; } ;;
5622esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005623else
5624 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005625 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5626echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5627 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005628else
Martin v. Löwis11437992002-04-12 09:54:03 +00005629 cat >conftest.$ac_ext <<_ACEOF
5630#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005631#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005632$ac_includes_default
5633long longval () { return (long) (sizeof (int)); }
5634unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005635#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005636#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00005637#ifdef F77_DUMMY_MAIN
5638# ifdef __cplusplus
5639 extern "C"
5640# endif
5641 int F77_DUMMY_MAIN() { return 1; }
5642#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005643int
5644main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005645{
Martin v. Löwis11437992002-04-12 09:54:03 +00005646
5647 FILE *f = fopen ("conftest.val", "w");
5648 if (! f)
5649 exit (1);
5650 if (((long) (sizeof (int))) < 0)
5651 {
5652 long i = longval ();
5653 if (i != ((long) (sizeof (int))))
5654 exit (1);
5655 fprintf (f, "%ld\n", i);
5656 }
5657 else
5658 {
5659 unsigned long i = ulongval ();
5660 if (i != ((long) (sizeof (int))))
5661 exit (1);
5662 fprintf (f, "%lu\n", i);
5663 }
5664 exit (ferror (f) || fclose (f) != 0);
5665
5666 ;
5667 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005668}
Martin v. Löwis11437992002-04-12 09:54:03 +00005669_ACEOF
5670rm -f conftest$ac_exeext
5671if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5672 (eval $ac_link) 2>&5
5673 ac_status=$?
5674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5675 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5676 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5677 (eval $ac_try) 2>&5
5678 ac_status=$?
5679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5680 (exit $ac_status); }; }; then
5681 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005682else
Martin v. Löwis11437992002-04-12 09:54:03 +00005683 echo "$as_me: program exited with status $ac_status" >&5
5684echo "$as_me: failed program was:" >&5
5685cat conftest.$ac_ext >&5
5686( exit $ac_status )
5687{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5688echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5689 { (exit 1); exit 1; }; }
5690fi
Barry Warsawfe33b792003-01-07 22:42:49 +00005691rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005692fi
5693fi
5694rm -f conftest.val
5695else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005696 ac_cv_sizeof_int=0
5697fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005698fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005699echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5700echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5701cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005702#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005703_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005704
5705
Martin v. Löwis11437992002-04-12 09:54:03 +00005706echo "$as_me:$LINENO: checking for long" >&5
5707echo $ECHO_N "checking for long... $ECHO_C" >&6
5708if test "${ac_cv_type_long+set}" = set; then
5709 echo $ECHO_N "(cached) $ECHO_C" >&6
5710else
5711 cat >conftest.$ac_ext <<_ACEOF
5712#line $LINENO "configure"
5713#include "confdefs.h"
5714$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005715#ifdef F77_DUMMY_MAIN
5716# ifdef __cplusplus
5717 extern "C"
5718# endif
5719 int F77_DUMMY_MAIN() { return 1; }
5720#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005721int
5722main ()
5723{
5724if ((long *) 0)
5725 return 0;
5726if (sizeof (long))
5727 return 0;
5728 ;
5729 return 0;
5730}
5731_ACEOF
5732rm -f conftest.$ac_objext
5733if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5734 (eval $ac_compile) 2>&5
5735 ac_status=$?
5736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5737 (exit $ac_status); } &&
5738 { ac_try='test -s conftest.$ac_objext'
5739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5740 (eval $ac_try) 2>&5
5741 ac_status=$?
5742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5743 (exit $ac_status); }; }; then
5744 ac_cv_type_long=yes
5745else
5746 echo "$as_me: failed program was:" >&5
5747cat conftest.$ac_ext >&5
5748ac_cv_type_long=no
5749fi
5750rm -f conftest.$ac_objext conftest.$ac_ext
5751fi
5752echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5753echo "${ECHO_T}$ac_cv_type_long" >&6
5754
5755echo "$as_me:$LINENO: checking size of long" >&5
5756echo $ECHO_N "checking size of long... $ECHO_C" >&6
5757if test "${ac_cv_sizeof_long+set}" = set; then
5758 echo $ECHO_N "(cached) $ECHO_C" >&6
5759else
5760 if test "$ac_cv_type_long" = yes; then
5761 # The cast to unsigned long works around a bug in the HP C Compiler
5762 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5763 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5764 # This bug is HP SR number 8606223364.
5765 if test "$cross_compiling" = yes; then
5766 # Depending upon the size, compute the lo and hi bounds.
5767cat >conftest.$ac_ext <<_ACEOF
5768#line $LINENO "configure"
5769#include "confdefs.h"
5770$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005771#ifdef F77_DUMMY_MAIN
5772# ifdef __cplusplus
5773 extern "C"
5774# endif
5775 int F77_DUMMY_MAIN() { return 1; }
5776#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005777int
5778main ()
5779{
5780static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5781test_array [0] = 0
5782
5783 ;
5784 return 0;
5785}
5786_ACEOF
5787rm -f conftest.$ac_objext
5788if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5789 (eval $ac_compile) 2>&5
5790 ac_status=$?
5791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5792 (exit $ac_status); } &&
5793 { ac_try='test -s conftest.$ac_objext'
5794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5795 (eval $ac_try) 2>&5
5796 ac_status=$?
5797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5798 (exit $ac_status); }; }; then
5799 ac_lo=0 ac_mid=0
5800 while :; do
5801 cat >conftest.$ac_ext <<_ACEOF
5802#line $LINENO "configure"
5803#include "confdefs.h"
5804$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005805#ifdef F77_DUMMY_MAIN
5806# ifdef __cplusplus
5807 extern "C"
5808# endif
5809 int F77_DUMMY_MAIN() { return 1; }
5810#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005811int
5812main ()
5813{
5814static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5815test_array [0] = 0
5816
5817 ;
5818 return 0;
5819}
5820_ACEOF
5821rm -f conftest.$ac_objext
5822if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5823 (eval $ac_compile) 2>&5
5824 ac_status=$?
5825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5826 (exit $ac_status); } &&
5827 { ac_try='test -s conftest.$ac_objext'
5828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5829 (eval $ac_try) 2>&5
5830 ac_status=$?
5831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5832 (exit $ac_status); }; }; then
5833 ac_hi=$ac_mid; break
5834else
5835 echo "$as_me: failed program was:" >&5
5836cat conftest.$ac_ext >&5
5837ac_lo=`expr $ac_mid + 1`
5838 if test $ac_lo -le $ac_mid; then
5839 ac_lo= ac_hi=
5840 break
5841 fi
5842 ac_mid=`expr 2 '*' $ac_mid + 1`
5843fi
5844rm -f conftest.$ac_objext conftest.$ac_ext
5845 done
5846else
5847 echo "$as_me: failed program was:" >&5
5848cat conftest.$ac_ext >&5
5849cat >conftest.$ac_ext <<_ACEOF
5850#line $LINENO "configure"
5851#include "confdefs.h"
5852$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005853#ifdef F77_DUMMY_MAIN
5854# ifdef __cplusplus
5855 extern "C"
5856# endif
5857 int F77_DUMMY_MAIN() { return 1; }
5858#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005859int
5860main ()
5861{
5862static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5863test_array [0] = 0
5864
5865 ;
5866 return 0;
5867}
5868_ACEOF
5869rm -f conftest.$ac_objext
5870if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5871 (eval $ac_compile) 2>&5
5872 ac_status=$?
5873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5874 (exit $ac_status); } &&
5875 { ac_try='test -s conftest.$ac_objext'
5876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5877 (eval $ac_try) 2>&5
5878 ac_status=$?
5879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5880 (exit $ac_status); }; }; then
5881 ac_hi=-1 ac_mid=-1
5882 while :; do
5883 cat >conftest.$ac_ext <<_ACEOF
5884#line $LINENO "configure"
5885#include "confdefs.h"
5886$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005887#ifdef F77_DUMMY_MAIN
5888# ifdef __cplusplus
5889 extern "C"
5890# endif
5891 int F77_DUMMY_MAIN() { return 1; }
5892#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005893int
5894main ()
5895{
5896static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5897test_array [0] = 0
5898
5899 ;
5900 return 0;
5901}
5902_ACEOF
5903rm -f conftest.$ac_objext
5904if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5905 (eval $ac_compile) 2>&5
5906 ac_status=$?
5907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5908 (exit $ac_status); } &&
5909 { ac_try='test -s conftest.$ac_objext'
5910 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5911 (eval $ac_try) 2>&5
5912 ac_status=$?
5913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5914 (exit $ac_status); }; }; then
5915 ac_lo=$ac_mid; break
5916else
5917 echo "$as_me: failed program was:" >&5
5918cat conftest.$ac_ext >&5
5919ac_hi=`expr '(' $ac_mid ')' - 1`
5920 if test $ac_mid -le $ac_hi; then
5921 ac_lo= ac_hi=
5922 break
5923 fi
5924 ac_mid=`expr 2 '*' $ac_mid`
5925fi
5926rm -f conftest.$ac_objext conftest.$ac_ext
5927 done
5928else
5929 echo "$as_me: failed program was:" >&5
5930cat conftest.$ac_ext >&5
5931ac_lo= ac_hi=
5932fi
5933rm -f conftest.$ac_objext conftest.$ac_ext
5934fi
5935rm -f conftest.$ac_objext conftest.$ac_ext
5936# Binary search between lo and hi bounds.
5937while test "x$ac_lo" != "x$ac_hi"; do
5938 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5939 cat >conftest.$ac_ext <<_ACEOF
5940#line $LINENO "configure"
5941#include "confdefs.h"
5942$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005943#ifdef F77_DUMMY_MAIN
5944# ifdef __cplusplus
5945 extern "C"
5946# endif
5947 int F77_DUMMY_MAIN() { return 1; }
5948#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005949int
5950main ()
5951{
5952static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5953test_array [0] = 0
5954
5955 ;
5956 return 0;
5957}
5958_ACEOF
5959rm -f conftest.$ac_objext
5960if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5961 (eval $ac_compile) 2>&5
5962 ac_status=$?
5963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5964 (exit $ac_status); } &&
5965 { ac_try='test -s conftest.$ac_objext'
5966 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5967 (eval $ac_try) 2>&5
5968 ac_status=$?
5969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5970 (exit $ac_status); }; }; then
5971 ac_hi=$ac_mid
5972else
5973 echo "$as_me: failed program was:" >&5
5974cat conftest.$ac_ext >&5
5975ac_lo=`expr '(' $ac_mid ')' + 1`
5976fi
5977rm -f conftest.$ac_objext conftest.$ac_ext
5978done
5979case $ac_lo in
5980?*) ac_cv_sizeof_long=$ac_lo;;
5981'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5982echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5983 { (exit 1); exit 1; }; } ;;
5984esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005985else
5986 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005987 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5988echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5989 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005990else
Martin v. Löwis11437992002-04-12 09:54:03 +00005991 cat >conftest.$ac_ext <<_ACEOF
5992#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005993#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005994$ac_includes_default
5995long longval () { return (long) (sizeof (long)); }
5996unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005997#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005998#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00005999#ifdef F77_DUMMY_MAIN
6000# ifdef __cplusplus
6001 extern "C"
6002# endif
6003 int F77_DUMMY_MAIN() { return 1; }
6004#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006005int
6006main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006007{
Martin v. Löwis11437992002-04-12 09:54:03 +00006008
6009 FILE *f = fopen ("conftest.val", "w");
6010 if (! f)
6011 exit (1);
6012 if (((long) (sizeof (long))) < 0)
6013 {
6014 long i = longval ();
6015 if (i != ((long) (sizeof (long))))
6016 exit (1);
6017 fprintf (f, "%ld\n", i);
6018 }
6019 else
6020 {
6021 unsigned long i = ulongval ();
6022 if (i != ((long) (sizeof (long))))
6023 exit (1);
6024 fprintf (f, "%lu\n", i);
6025 }
6026 exit (ferror (f) || fclose (f) != 0);
6027
6028 ;
6029 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006030}
Martin v. Löwis11437992002-04-12 09:54:03 +00006031_ACEOF
6032rm -f conftest$ac_exeext
6033if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6034 (eval $ac_link) 2>&5
6035 ac_status=$?
6036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6037 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6038 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6039 (eval $ac_try) 2>&5
6040 ac_status=$?
6041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6042 (exit $ac_status); }; }; then
6043 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006044else
Martin v. Löwis11437992002-04-12 09:54:03 +00006045 echo "$as_me: program exited with status $ac_status" >&5
6046echo "$as_me: failed program was:" >&5
6047cat conftest.$ac_ext >&5
6048( exit $ac_status )
6049{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
6050echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
6051 { (exit 1); exit 1; }; }
6052fi
Barry Warsawfe33b792003-01-07 22:42:49 +00006053rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006054fi
6055fi
6056rm -f conftest.val
6057else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006058 ac_cv_sizeof_long=0
6059fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006060fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006061echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6062echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6063cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006064#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006065_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006066
6067
Martin v. Löwis11437992002-04-12 09:54:03 +00006068echo "$as_me:$LINENO: checking for void *" >&5
6069echo $ECHO_N "checking for void *... $ECHO_C" >&6
6070if test "${ac_cv_type_void_p+set}" = set; then
6071 echo $ECHO_N "(cached) $ECHO_C" >&6
6072else
6073 cat >conftest.$ac_ext <<_ACEOF
6074#line $LINENO "configure"
6075#include "confdefs.h"
6076$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006077#ifdef F77_DUMMY_MAIN
6078# ifdef __cplusplus
6079 extern "C"
6080# endif
6081 int F77_DUMMY_MAIN() { return 1; }
6082#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006083int
6084main ()
6085{
6086if ((void * *) 0)
6087 return 0;
6088if (sizeof (void *))
6089 return 0;
6090 ;
6091 return 0;
6092}
6093_ACEOF
6094rm -f conftest.$ac_objext
6095if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6096 (eval $ac_compile) 2>&5
6097 ac_status=$?
6098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6099 (exit $ac_status); } &&
6100 { ac_try='test -s conftest.$ac_objext'
6101 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6102 (eval $ac_try) 2>&5
6103 ac_status=$?
6104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6105 (exit $ac_status); }; }; then
6106 ac_cv_type_void_p=yes
6107else
6108 echo "$as_me: failed program was:" >&5
6109cat conftest.$ac_ext >&5
6110ac_cv_type_void_p=no
6111fi
6112rm -f conftest.$ac_objext conftest.$ac_ext
6113fi
6114echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
6115echo "${ECHO_T}$ac_cv_type_void_p" >&6
6116
6117echo "$as_me:$LINENO: checking size of void *" >&5
6118echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6119if test "${ac_cv_sizeof_void_p+set}" = set; then
6120 echo $ECHO_N "(cached) $ECHO_C" >&6
6121else
6122 if test "$ac_cv_type_void_p" = yes; then
6123 # The cast to unsigned long works around a bug in the HP C Compiler
6124 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6125 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6126 # This bug is HP SR number 8606223364.
6127 if test "$cross_compiling" = yes; then
6128 # Depending upon the size, compute the lo and hi bounds.
6129cat >conftest.$ac_ext <<_ACEOF
6130#line $LINENO "configure"
6131#include "confdefs.h"
6132$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006133#ifdef F77_DUMMY_MAIN
6134# ifdef __cplusplus
6135 extern "C"
6136# endif
6137 int F77_DUMMY_MAIN() { return 1; }
6138#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006139int
6140main ()
6141{
6142static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
6143test_array [0] = 0
6144
6145 ;
6146 return 0;
6147}
6148_ACEOF
6149rm -f conftest.$ac_objext
6150if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6151 (eval $ac_compile) 2>&5
6152 ac_status=$?
6153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6154 (exit $ac_status); } &&
6155 { ac_try='test -s conftest.$ac_objext'
6156 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6157 (eval $ac_try) 2>&5
6158 ac_status=$?
6159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6160 (exit $ac_status); }; }; then
6161 ac_lo=0 ac_mid=0
6162 while :; do
6163 cat >conftest.$ac_ext <<_ACEOF
6164#line $LINENO "configure"
6165#include "confdefs.h"
6166$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006167#ifdef F77_DUMMY_MAIN
6168# ifdef __cplusplus
6169 extern "C"
6170# endif
6171 int F77_DUMMY_MAIN() { return 1; }
6172#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006173int
6174main ()
6175{
6176static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6177test_array [0] = 0
6178
6179 ;
6180 return 0;
6181}
6182_ACEOF
6183rm -f conftest.$ac_objext
6184if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6185 (eval $ac_compile) 2>&5
6186 ac_status=$?
6187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6188 (exit $ac_status); } &&
6189 { ac_try='test -s conftest.$ac_objext'
6190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6191 (eval $ac_try) 2>&5
6192 ac_status=$?
6193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6194 (exit $ac_status); }; }; then
6195 ac_hi=$ac_mid; break
6196else
6197 echo "$as_me: failed program was:" >&5
6198cat conftest.$ac_ext >&5
6199ac_lo=`expr $ac_mid + 1`
6200 if test $ac_lo -le $ac_mid; then
6201 ac_lo= ac_hi=
6202 break
6203 fi
6204 ac_mid=`expr 2 '*' $ac_mid + 1`
6205fi
6206rm -f conftest.$ac_objext conftest.$ac_ext
6207 done
6208else
6209 echo "$as_me: failed program was:" >&5
6210cat conftest.$ac_ext >&5
6211cat >conftest.$ac_ext <<_ACEOF
6212#line $LINENO "configure"
6213#include "confdefs.h"
6214$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006215#ifdef F77_DUMMY_MAIN
6216# ifdef __cplusplus
6217 extern "C"
6218# endif
6219 int F77_DUMMY_MAIN() { return 1; }
6220#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006221int
6222main ()
6223{
6224static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6225test_array [0] = 0
6226
6227 ;
6228 return 0;
6229}
6230_ACEOF
6231rm -f conftest.$ac_objext
6232if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6233 (eval $ac_compile) 2>&5
6234 ac_status=$?
6235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6236 (exit $ac_status); } &&
6237 { ac_try='test -s conftest.$ac_objext'
6238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6239 (eval $ac_try) 2>&5
6240 ac_status=$?
6241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6242 (exit $ac_status); }; }; then
6243 ac_hi=-1 ac_mid=-1
6244 while :; do
6245 cat >conftest.$ac_ext <<_ACEOF
6246#line $LINENO "configure"
6247#include "confdefs.h"
6248$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006249#ifdef F77_DUMMY_MAIN
6250# ifdef __cplusplus
6251 extern "C"
6252# endif
6253 int F77_DUMMY_MAIN() { return 1; }
6254#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006255int
6256main ()
6257{
6258static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6259test_array [0] = 0
6260
6261 ;
6262 return 0;
6263}
6264_ACEOF
6265rm -f conftest.$ac_objext
6266if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6267 (eval $ac_compile) 2>&5
6268 ac_status=$?
6269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6270 (exit $ac_status); } &&
6271 { ac_try='test -s conftest.$ac_objext'
6272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6273 (eval $ac_try) 2>&5
6274 ac_status=$?
6275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6276 (exit $ac_status); }; }; then
6277 ac_lo=$ac_mid; break
6278else
6279 echo "$as_me: failed program was:" >&5
6280cat conftest.$ac_ext >&5
6281ac_hi=`expr '(' $ac_mid ')' - 1`
6282 if test $ac_mid -le $ac_hi; then
6283 ac_lo= ac_hi=
6284 break
6285 fi
6286 ac_mid=`expr 2 '*' $ac_mid`
6287fi
6288rm -f conftest.$ac_objext conftest.$ac_ext
6289 done
6290else
6291 echo "$as_me: failed program was:" >&5
6292cat conftest.$ac_ext >&5
6293ac_lo= ac_hi=
6294fi
6295rm -f conftest.$ac_objext conftest.$ac_ext
6296fi
6297rm -f conftest.$ac_objext conftest.$ac_ext
6298# Binary search between lo and hi bounds.
6299while test "x$ac_lo" != "x$ac_hi"; do
6300 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6301 cat >conftest.$ac_ext <<_ACEOF
6302#line $LINENO "configure"
6303#include "confdefs.h"
6304$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006305#ifdef F77_DUMMY_MAIN
6306# ifdef __cplusplus
6307 extern "C"
6308# endif
6309 int F77_DUMMY_MAIN() { return 1; }
6310#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006311int
6312main ()
6313{
6314static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6315test_array [0] = 0
6316
6317 ;
6318 return 0;
6319}
6320_ACEOF
6321rm -f conftest.$ac_objext
6322if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6323 (eval $ac_compile) 2>&5
6324 ac_status=$?
6325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6326 (exit $ac_status); } &&
6327 { ac_try='test -s conftest.$ac_objext'
6328 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6329 (eval $ac_try) 2>&5
6330 ac_status=$?
6331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6332 (exit $ac_status); }; }; then
6333 ac_hi=$ac_mid
6334else
6335 echo "$as_me: failed program was:" >&5
6336cat conftest.$ac_ext >&5
6337ac_lo=`expr '(' $ac_mid ')' + 1`
6338fi
6339rm -f conftest.$ac_objext conftest.$ac_ext
6340done
6341case $ac_lo in
6342?*) ac_cv_sizeof_void_p=$ac_lo;;
6343'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6344echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6345 { (exit 1); exit 1; }; } ;;
6346esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006347else
6348 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006349 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6350echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6351 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006352else
Martin v. Löwis11437992002-04-12 09:54:03 +00006353 cat >conftest.$ac_ext <<_ACEOF
6354#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00006355#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006356$ac_includes_default
6357long longval () { return (long) (sizeof (void *)); }
6358unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006359#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006360#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00006361#ifdef F77_DUMMY_MAIN
6362# ifdef __cplusplus
6363 extern "C"
6364# endif
6365 int F77_DUMMY_MAIN() { return 1; }
6366#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006367int
6368main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006369{
Martin v. Löwis11437992002-04-12 09:54:03 +00006370
6371 FILE *f = fopen ("conftest.val", "w");
6372 if (! f)
6373 exit (1);
6374 if (((long) (sizeof (void *))) < 0)
6375 {
6376 long i = longval ();
6377 if (i != ((long) (sizeof (void *))))
6378 exit (1);
6379 fprintf (f, "%ld\n", i);
6380 }
6381 else
6382 {
6383 unsigned long i = ulongval ();
6384 if (i != ((long) (sizeof (void *))))
6385 exit (1);
6386 fprintf (f, "%lu\n", i);
6387 }
6388 exit (ferror (f) || fclose (f) != 0);
6389
6390 ;
6391 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006392}
Martin v. Löwis11437992002-04-12 09:54:03 +00006393_ACEOF
6394rm -f conftest$ac_exeext
6395if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6396 (eval $ac_link) 2>&5
6397 ac_status=$?
6398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6399 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6401 (eval $ac_try) 2>&5
6402 ac_status=$?
6403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6404 (exit $ac_status); }; }; then
6405 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006406else
Martin v. Löwis11437992002-04-12 09:54:03 +00006407 echo "$as_me: program exited with status $ac_status" >&5
6408echo "$as_me: failed program was:" >&5
6409cat conftest.$ac_ext >&5
6410( exit $ac_status )
6411{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6412echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6413 { (exit 1); exit 1; }; }
6414fi
Barry Warsawfe33b792003-01-07 22:42:49 +00006415rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006416fi
6417fi
6418rm -f conftest.val
6419else
Guido van Rossumad678af1998-10-02 14:42:15 +00006420 ac_cv_sizeof_void_p=0
6421fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006422fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006423echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6424echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6425cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006426#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006427_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006428
6429
Martin v. Löwis11437992002-04-12 09:54:03 +00006430echo "$as_me:$LINENO: checking for char" >&5
6431echo $ECHO_N "checking for char... $ECHO_C" >&6
6432if test "${ac_cv_type_char+set}" = set; then
6433 echo $ECHO_N "(cached) $ECHO_C" >&6
6434else
6435 cat >conftest.$ac_ext <<_ACEOF
6436#line $LINENO "configure"
6437#include "confdefs.h"
6438$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006439#ifdef F77_DUMMY_MAIN
6440# ifdef __cplusplus
6441 extern "C"
6442# endif
6443 int F77_DUMMY_MAIN() { return 1; }
6444#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006445int
6446main ()
6447{
6448if ((char *) 0)
6449 return 0;
6450if (sizeof (char))
6451 return 0;
6452 ;
6453 return 0;
6454}
6455_ACEOF
6456rm -f conftest.$ac_objext
6457if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6458 (eval $ac_compile) 2>&5
6459 ac_status=$?
6460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6461 (exit $ac_status); } &&
6462 { ac_try='test -s conftest.$ac_objext'
6463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6464 (eval $ac_try) 2>&5
6465 ac_status=$?
6466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6467 (exit $ac_status); }; }; then
6468 ac_cv_type_char=yes
6469else
6470 echo "$as_me: failed program was:" >&5
6471cat conftest.$ac_ext >&5
6472ac_cv_type_char=no
6473fi
6474rm -f conftest.$ac_objext conftest.$ac_ext
6475fi
6476echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
6477echo "${ECHO_T}$ac_cv_type_char" >&6
6478
6479echo "$as_me:$LINENO: checking size of char" >&5
6480echo $ECHO_N "checking size of char... $ECHO_C" >&6
6481if test "${ac_cv_sizeof_char+set}" = set; then
6482 echo $ECHO_N "(cached) $ECHO_C" >&6
6483else
6484 if test "$ac_cv_type_char" = yes; then
6485 # The cast to unsigned long works around a bug in the HP C Compiler
6486 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6487 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6488 # This bug is HP SR number 8606223364.
6489 if test "$cross_compiling" = yes; then
6490 # Depending upon the size, compute the lo and hi bounds.
6491cat >conftest.$ac_ext <<_ACEOF
6492#line $LINENO "configure"
6493#include "confdefs.h"
6494$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006495#ifdef F77_DUMMY_MAIN
6496# ifdef __cplusplus
6497 extern "C"
6498# endif
6499 int F77_DUMMY_MAIN() { return 1; }
6500#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006501int
6502main ()
6503{
6504static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
6505test_array [0] = 0
6506
6507 ;
6508 return 0;
6509}
6510_ACEOF
6511rm -f conftest.$ac_objext
6512if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6513 (eval $ac_compile) 2>&5
6514 ac_status=$?
6515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6516 (exit $ac_status); } &&
6517 { ac_try='test -s conftest.$ac_objext'
6518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6519 (eval $ac_try) 2>&5
6520 ac_status=$?
6521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6522 (exit $ac_status); }; }; then
6523 ac_lo=0 ac_mid=0
6524 while :; do
6525 cat >conftest.$ac_ext <<_ACEOF
6526#line $LINENO "configure"
6527#include "confdefs.h"
6528$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006529#ifdef F77_DUMMY_MAIN
6530# ifdef __cplusplus
6531 extern "C"
6532# endif
6533 int F77_DUMMY_MAIN() { return 1; }
6534#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006535int
6536main ()
6537{
6538static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6539test_array [0] = 0
6540
6541 ;
6542 return 0;
6543}
6544_ACEOF
6545rm -f conftest.$ac_objext
6546if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6547 (eval $ac_compile) 2>&5
6548 ac_status=$?
6549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6550 (exit $ac_status); } &&
6551 { ac_try='test -s conftest.$ac_objext'
6552 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6553 (eval $ac_try) 2>&5
6554 ac_status=$?
6555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6556 (exit $ac_status); }; }; then
6557 ac_hi=$ac_mid; break
6558else
6559 echo "$as_me: failed program was:" >&5
6560cat conftest.$ac_ext >&5
6561ac_lo=`expr $ac_mid + 1`
6562 if test $ac_lo -le $ac_mid; then
6563 ac_lo= ac_hi=
6564 break
6565 fi
6566 ac_mid=`expr 2 '*' $ac_mid + 1`
6567fi
6568rm -f conftest.$ac_objext conftest.$ac_ext
6569 done
6570else
6571 echo "$as_me: failed program was:" >&5
6572cat conftest.$ac_ext >&5
6573cat >conftest.$ac_ext <<_ACEOF
6574#line $LINENO "configure"
6575#include "confdefs.h"
6576$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006577#ifdef F77_DUMMY_MAIN
6578# ifdef __cplusplus
6579 extern "C"
6580# endif
6581 int F77_DUMMY_MAIN() { return 1; }
6582#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006583int
6584main ()
6585{
6586static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
6587test_array [0] = 0
6588
6589 ;
6590 return 0;
6591}
6592_ACEOF
6593rm -f conftest.$ac_objext
6594if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6595 (eval $ac_compile) 2>&5
6596 ac_status=$?
6597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6598 (exit $ac_status); } &&
6599 { ac_try='test -s conftest.$ac_objext'
6600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6601 (eval $ac_try) 2>&5
6602 ac_status=$?
6603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6604 (exit $ac_status); }; }; then
6605 ac_hi=-1 ac_mid=-1
6606 while :; do
6607 cat >conftest.$ac_ext <<_ACEOF
6608#line $LINENO "configure"
6609#include "confdefs.h"
6610$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006611#ifdef F77_DUMMY_MAIN
6612# ifdef __cplusplus
6613 extern "C"
6614# endif
6615 int F77_DUMMY_MAIN() { return 1; }
6616#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006617int
6618main ()
6619{
6620static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
6621test_array [0] = 0
6622
6623 ;
6624 return 0;
6625}
6626_ACEOF
6627rm -f conftest.$ac_objext
6628if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6629 (eval $ac_compile) 2>&5
6630 ac_status=$?
6631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6632 (exit $ac_status); } &&
6633 { ac_try='test -s conftest.$ac_objext'
6634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6635 (eval $ac_try) 2>&5
6636 ac_status=$?
6637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6638 (exit $ac_status); }; }; then
6639 ac_lo=$ac_mid; break
6640else
6641 echo "$as_me: failed program was:" >&5
6642cat conftest.$ac_ext >&5
6643ac_hi=`expr '(' $ac_mid ')' - 1`
6644 if test $ac_mid -le $ac_hi; then
6645 ac_lo= ac_hi=
6646 break
6647 fi
6648 ac_mid=`expr 2 '*' $ac_mid`
6649fi
6650rm -f conftest.$ac_objext conftest.$ac_ext
6651 done
6652else
6653 echo "$as_me: failed program was:" >&5
6654cat conftest.$ac_ext >&5
6655ac_lo= ac_hi=
6656fi
6657rm -f conftest.$ac_objext conftest.$ac_ext
6658fi
6659rm -f conftest.$ac_objext conftest.$ac_ext
6660# Binary search between lo and hi bounds.
6661while test "x$ac_lo" != "x$ac_hi"; do
6662 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6663 cat >conftest.$ac_ext <<_ACEOF
6664#line $LINENO "configure"
6665#include "confdefs.h"
6666$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006667#ifdef F77_DUMMY_MAIN
6668# ifdef __cplusplus
6669 extern "C"
6670# endif
6671 int F77_DUMMY_MAIN() { return 1; }
6672#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006673int
6674main ()
6675{
6676static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6677test_array [0] = 0
6678
6679 ;
6680 return 0;
6681}
6682_ACEOF
6683rm -f conftest.$ac_objext
6684if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6685 (eval $ac_compile) 2>&5
6686 ac_status=$?
6687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6688 (exit $ac_status); } &&
6689 { ac_try='test -s conftest.$ac_objext'
6690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6691 (eval $ac_try) 2>&5
6692 ac_status=$?
6693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6694 (exit $ac_status); }; }; then
6695 ac_hi=$ac_mid
6696else
6697 echo "$as_me: failed program was:" >&5
6698cat conftest.$ac_ext >&5
6699ac_lo=`expr '(' $ac_mid ')' + 1`
6700fi
6701rm -f conftest.$ac_objext conftest.$ac_ext
6702done
6703case $ac_lo in
6704?*) ac_cv_sizeof_char=$ac_lo;;
6705'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6706echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6707 { (exit 1); exit 1; }; } ;;
6708esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006709else
6710 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006711 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6712echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6713 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006714else
Martin v. Löwis11437992002-04-12 09:54:03 +00006715 cat >conftest.$ac_ext <<_ACEOF
6716#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006717#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006718$ac_includes_default
6719long longval () { return (long) (sizeof (char)); }
6720unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006721#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006722#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00006723#ifdef F77_DUMMY_MAIN
6724# ifdef __cplusplus
6725 extern "C"
6726# endif
6727 int F77_DUMMY_MAIN() { return 1; }
6728#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006729int
6730main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006731{
Martin v. Löwis11437992002-04-12 09:54:03 +00006732
6733 FILE *f = fopen ("conftest.val", "w");
6734 if (! f)
6735 exit (1);
6736 if (((long) (sizeof (char))) < 0)
6737 {
6738 long i = longval ();
6739 if (i != ((long) (sizeof (char))))
6740 exit (1);
6741 fprintf (f, "%ld\n", i);
6742 }
6743 else
6744 {
6745 unsigned long i = ulongval ();
6746 if (i != ((long) (sizeof (char))))
6747 exit (1);
6748 fprintf (f, "%lu\n", i);
6749 }
6750 exit (ferror (f) || fclose (f) != 0);
6751
6752 ;
6753 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006754}
Martin v. Löwis11437992002-04-12 09:54:03 +00006755_ACEOF
6756rm -f conftest$ac_exeext
6757if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6758 (eval $ac_link) 2>&5
6759 ac_status=$?
6760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6761 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6762 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6763 (eval $ac_try) 2>&5
6764 ac_status=$?
6765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6766 (exit $ac_status); }; }; then
6767 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006768else
Martin v. Löwis11437992002-04-12 09:54:03 +00006769 echo "$as_me: program exited with status $ac_status" >&5
6770echo "$as_me: failed program was:" >&5
6771cat conftest.$ac_ext >&5
6772( exit $ac_status )
6773{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6774echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6775 { (exit 1); exit 1; }; }
6776fi
Barry Warsawfe33b792003-01-07 22:42:49 +00006777rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006778fi
6779fi
6780rm -f conftest.val
6781else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006782 ac_cv_sizeof_char=0
6783fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006784fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006785echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6786echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6787cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006788#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006789_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006790
6791
Martin v. Löwis11437992002-04-12 09:54:03 +00006792echo "$as_me:$LINENO: checking for short" >&5
6793echo $ECHO_N "checking for short... $ECHO_C" >&6
6794if test "${ac_cv_type_short+set}" = set; then
6795 echo $ECHO_N "(cached) $ECHO_C" >&6
6796else
6797 cat >conftest.$ac_ext <<_ACEOF
6798#line $LINENO "configure"
6799#include "confdefs.h"
6800$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006801#ifdef F77_DUMMY_MAIN
6802# ifdef __cplusplus
6803 extern "C"
6804# endif
6805 int F77_DUMMY_MAIN() { return 1; }
6806#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006807int
6808main ()
6809{
6810if ((short *) 0)
6811 return 0;
6812if (sizeof (short))
6813 return 0;
6814 ;
6815 return 0;
6816}
6817_ACEOF
6818rm -f conftest.$ac_objext
6819if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6820 (eval $ac_compile) 2>&5
6821 ac_status=$?
6822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6823 (exit $ac_status); } &&
6824 { ac_try='test -s conftest.$ac_objext'
6825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6826 (eval $ac_try) 2>&5
6827 ac_status=$?
6828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6829 (exit $ac_status); }; }; then
6830 ac_cv_type_short=yes
6831else
6832 echo "$as_me: failed program was:" >&5
6833cat conftest.$ac_ext >&5
6834ac_cv_type_short=no
6835fi
6836rm -f conftest.$ac_objext conftest.$ac_ext
6837fi
6838echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6839echo "${ECHO_T}$ac_cv_type_short" >&6
6840
6841echo "$as_me:$LINENO: checking size of short" >&5
6842echo $ECHO_N "checking size of short... $ECHO_C" >&6
6843if test "${ac_cv_sizeof_short+set}" = set; then
6844 echo $ECHO_N "(cached) $ECHO_C" >&6
6845else
6846 if test "$ac_cv_type_short" = yes; then
6847 # The cast to unsigned long works around a bug in the HP C Compiler
6848 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6849 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6850 # This bug is HP SR number 8606223364.
6851 if test "$cross_compiling" = yes; then
6852 # Depending upon the size, compute the lo and hi bounds.
6853cat >conftest.$ac_ext <<_ACEOF
6854#line $LINENO "configure"
6855#include "confdefs.h"
6856$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006857#ifdef F77_DUMMY_MAIN
6858# ifdef __cplusplus
6859 extern "C"
6860# endif
6861 int F77_DUMMY_MAIN() { return 1; }
6862#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006863int
6864main ()
6865{
6866static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6867test_array [0] = 0
6868
6869 ;
6870 return 0;
6871}
6872_ACEOF
6873rm -f conftest.$ac_objext
6874if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6875 (eval $ac_compile) 2>&5
6876 ac_status=$?
6877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6878 (exit $ac_status); } &&
6879 { ac_try='test -s conftest.$ac_objext'
6880 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6881 (eval $ac_try) 2>&5
6882 ac_status=$?
6883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6884 (exit $ac_status); }; }; then
6885 ac_lo=0 ac_mid=0
6886 while :; do
6887 cat >conftest.$ac_ext <<_ACEOF
6888#line $LINENO "configure"
6889#include "confdefs.h"
6890$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006891#ifdef F77_DUMMY_MAIN
6892# ifdef __cplusplus
6893 extern "C"
6894# endif
6895 int F77_DUMMY_MAIN() { return 1; }
6896#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006897int
6898main ()
6899{
6900static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6901test_array [0] = 0
6902
6903 ;
6904 return 0;
6905}
6906_ACEOF
6907rm -f conftest.$ac_objext
6908if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6909 (eval $ac_compile) 2>&5
6910 ac_status=$?
6911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6912 (exit $ac_status); } &&
6913 { ac_try='test -s conftest.$ac_objext'
6914 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6915 (eval $ac_try) 2>&5
6916 ac_status=$?
6917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6918 (exit $ac_status); }; }; then
6919 ac_hi=$ac_mid; break
6920else
6921 echo "$as_me: failed program was:" >&5
6922cat conftest.$ac_ext >&5
6923ac_lo=`expr $ac_mid + 1`
6924 if test $ac_lo -le $ac_mid; then
6925 ac_lo= ac_hi=
6926 break
6927 fi
6928 ac_mid=`expr 2 '*' $ac_mid + 1`
6929fi
6930rm -f conftest.$ac_objext conftest.$ac_ext
6931 done
6932else
6933 echo "$as_me: failed program was:" >&5
6934cat conftest.$ac_ext >&5
6935cat >conftest.$ac_ext <<_ACEOF
6936#line $LINENO "configure"
6937#include "confdefs.h"
6938$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006939#ifdef F77_DUMMY_MAIN
6940# ifdef __cplusplus
6941 extern "C"
6942# endif
6943 int F77_DUMMY_MAIN() { return 1; }
6944#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006945int
6946main ()
6947{
6948static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6949test_array [0] = 0
6950
6951 ;
6952 return 0;
6953}
6954_ACEOF
6955rm -f conftest.$ac_objext
6956if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6957 (eval $ac_compile) 2>&5
6958 ac_status=$?
6959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6960 (exit $ac_status); } &&
6961 { ac_try='test -s conftest.$ac_objext'
6962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6963 (eval $ac_try) 2>&5
6964 ac_status=$?
6965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6966 (exit $ac_status); }; }; then
6967 ac_hi=-1 ac_mid=-1
6968 while :; do
6969 cat >conftest.$ac_ext <<_ACEOF
6970#line $LINENO "configure"
6971#include "confdefs.h"
6972$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006973#ifdef F77_DUMMY_MAIN
6974# ifdef __cplusplus
6975 extern "C"
6976# endif
6977 int F77_DUMMY_MAIN() { return 1; }
6978#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006979int
6980main ()
6981{
6982static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6983test_array [0] = 0
6984
6985 ;
6986 return 0;
6987}
6988_ACEOF
6989rm -f conftest.$ac_objext
6990if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6991 (eval $ac_compile) 2>&5
6992 ac_status=$?
6993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6994 (exit $ac_status); } &&
6995 { ac_try='test -s conftest.$ac_objext'
6996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6997 (eval $ac_try) 2>&5
6998 ac_status=$?
6999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7000 (exit $ac_status); }; }; then
7001 ac_lo=$ac_mid; break
7002else
7003 echo "$as_me: failed program was:" >&5
7004cat conftest.$ac_ext >&5
7005ac_hi=`expr '(' $ac_mid ')' - 1`
7006 if test $ac_mid -le $ac_hi; then
7007 ac_lo= ac_hi=
7008 break
7009 fi
7010 ac_mid=`expr 2 '*' $ac_mid`
7011fi
7012rm -f conftest.$ac_objext conftest.$ac_ext
7013 done
7014else
7015 echo "$as_me: failed program was:" >&5
7016cat conftest.$ac_ext >&5
7017ac_lo= ac_hi=
7018fi
7019rm -f conftest.$ac_objext conftest.$ac_ext
7020fi
7021rm -f conftest.$ac_objext conftest.$ac_ext
7022# Binary search between lo and hi bounds.
7023while test "x$ac_lo" != "x$ac_hi"; do
7024 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7025 cat >conftest.$ac_ext <<_ACEOF
7026#line $LINENO "configure"
7027#include "confdefs.h"
7028$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007029#ifdef F77_DUMMY_MAIN
7030# ifdef __cplusplus
7031 extern "C"
7032# endif
7033 int F77_DUMMY_MAIN() { return 1; }
7034#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007035int
7036main ()
7037{
7038static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7039test_array [0] = 0
7040
7041 ;
7042 return 0;
7043}
7044_ACEOF
7045rm -f conftest.$ac_objext
7046if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7047 (eval $ac_compile) 2>&5
7048 ac_status=$?
7049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7050 (exit $ac_status); } &&
7051 { ac_try='test -s conftest.$ac_objext'
7052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7053 (eval $ac_try) 2>&5
7054 ac_status=$?
7055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7056 (exit $ac_status); }; }; then
7057 ac_hi=$ac_mid
7058else
7059 echo "$as_me: failed program was:" >&5
7060cat conftest.$ac_ext >&5
7061ac_lo=`expr '(' $ac_mid ')' + 1`
7062fi
7063rm -f conftest.$ac_objext conftest.$ac_ext
7064done
7065case $ac_lo in
7066?*) ac_cv_sizeof_short=$ac_lo;;
7067'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
7068echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
7069 { (exit 1); exit 1; }; } ;;
7070esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007071else
7072 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007073 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7074echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7075 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007076else
Martin v. Löwis11437992002-04-12 09:54:03 +00007077 cat >conftest.$ac_ext <<_ACEOF
7078#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007079#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007080$ac_includes_default
7081long longval () { return (long) (sizeof (short)); }
7082unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007083#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007084#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00007085#ifdef F77_DUMMY_MAIN
7086# ifdef __cplusplus
7087 extern "C"
7088# endif
7089 int F77_DUMMY_MAIN() { return 1; }
7090#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007091int
7092main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007093{
Martin v. Löwis11437992002-04-12 09:54:03 +00007094
7095 FILE *f = fopen ("conftest.val", "w");
7096 if (! f)
7097 exit (1);
7098 if (((long) (sizeof (short))) < 0)
7099 {
7100 long i = longval ();
7101 if (i != ((long) (sizeof (short))))
7102 exit (1);
7103 fprintf (f, "%ld\n", i);
7104 }
7105 else
7106 {
7107 unsigned long i = ulongval ();
7108 if (i != ((long) (sizeof (short))))
7109 exit (1);
7110 fprintf (f, "%lu\n", i);
7111 }
7112 exit (ferror (f) || fclose (f) != 0);
7113
7114 ;
7115 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007116}
Martin v. Löwis11437992002-04-12 09:54:03 +00007117_ACEOF
7118rm -f conftest$ac_exeext
7119if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7120 (eval $ac_link) 2>&5
7121 ac_status=$?
7122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7123 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7124 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7125 (eval $ac_try) 2>&5
7126 ac_status=$?
7127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7128 (exit $ac_status); }; }; then
7129 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007130else
Martin v. Löwis11437992002-04-12 09:54:03 +00007131 echo "$as_me: program exited with status $ac_status" >&5
7132echo "$as_me: failed program was:" >&5
7133cat conftest.$ac_ext >&5
7134( exit $ac_status )
7135{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
7136echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
7137 { (exit 1); exit 1; }; }
7138fi
Barry Warsawfe33b792003-01-07 22:42:49 +00007139rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007140fi
7141fi
7142rm -f conftest.val
7143else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007144 ac_cv_sizeof_short=0
7145fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007146fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007147echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7148echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7149cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007150#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007151_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007152
7153
Martin v. Löwis11437992002-04-12 09:54:03 +00007154echo "$as_me:$LINENO: checking for float" >&5
7155echo $ECHO_N "checking for float... $ECHO_C" >&6
7156if test "${ac_cv_type_float+set}" = set; then
7157 echo $ECHO_N "(cached) $ECHO_C" >&6
7158else
7159 cat >conftest.$ac_ext <<_ACEOF
7160#line $LINENO "configure"
7161#include "confdefs.h"
7162$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007163#ifdef F77_DUMMY_MAIN
7164# ifdef __cplusplus
7165 extern "C"
7166# endif
7167 int F77_DUMMY_MAIN() { return 1; }
7168#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007169int
7170main ()
7171{
7172if ((float *) 0)
7173 return 0;
7174if (sizeof (float))
7175 return 0;
7176 ;
7177 return 0;
7178}
7179_ACEOF
7180rm -f conftest.$ac_objext
7181if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7182 (eval $ac_compile) 2>&5
7183 ac_status=$?
7184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7185 (exit $ac_status); } &&
7186 { ac_try='test -s conftest.$ac_objext'
7187 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7188 (eval $ac_try) 2>&5
7189 ac_status=$?
7190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7191 (exit $ac_status); }; }; then
7192 ac_cv_type_float=yes
7193else
7194 echo "$as_me: failed program was:" >&5
7195cat conftest.$ac_ext >&5
7196ac_cv_type_float=no
7197fi
7198rm -f conftest.$ac_objext conftest.$ac_ext
7199fi
7200echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7201echo "${ECHO_T}$ac_cv_type_float" >&6
7202
7203echo "$as_me:$LINENO: checking size of float" >&5
7204echo $ECHO_N "checking size of float... $ECHO_C" >&6
7205if test "${ac_cv_sizeof_float+set}" = set; then
7206 echo $ECHO_N "(cached) $ECHO_C" >&6
7207else
7208 if test "$ac_cv_type_float" = yes; then
7209 # The cast to unsigned long works around a bug in the HP C Compiler
7210 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7211 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7212 # This bug is HP SR number 8606223364.
7213 if test "$cross_compiling" = yes; then
7214 # Depending upon the size, compute the lo and hi bounds.
7215cat >conftest.$ac_ext <<_ACEOF
7216#line $LINENO "configure"
7217#include "confdefs.h"
7218$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007219#ifdef F77_DUMMY_MAIN
7220# ifdef __cplusplus
7221 extern "C"
7222# endif
7223 int F77_DUMMY_MAIN() { return 1; }
7224#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007225int
7226main ()
7227{
7228static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7229test_array [0] = 0
7230
7231 ;
7232 return 0;
7233}
7234_ACEOF
7235rm -f conftest.$ac_objext
7236if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7237 (eval $ac_compile) 2>&5
7238 ac_status=$?
7239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7240 (exit $ac_status); } &&
7241 { ac_try='test -s conftest.$ac_objext'
7242 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7243 (eval $ac_try) 2>&5
7244 ac_status=$?
7245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7246 (exit $ac_status); }; }; then
7247 ac_lo=0 ac_mid=0
7248 while :; do
7249 cat >conftest.$ac_ext <<_ACEOF
7250#line $LINENO "configure"
7251#include "confdefs.h"
7252$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007253#ifdef F77_DUMMY_MAIN
7254# ifdef __cplusplus
7255 extern "C"
7256# endif
7257 int F77_DUMMY_MAIN() { return 1; }
7258#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007259int
7260main ()
7261{
7262static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7263test_array [0] = 0
7264
7265 ;
7266 return 0;
7267}
7268_ACEOF
7269rm -f conftest.$ac_objext
7270if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7271 (eval $ac_compile) 2>&5
7272 ac_status=$?
7273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7274 (exit $ac_status); } &&
7275 { ac_try='test -s conftest.$ac_objext'
7276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7277 (eval $ac_try) 2>&5
7278 ac_status=$?
7279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7280 (exit $ac_status); }; }; then
7281 ac_hi=$ac_mid; break
7282else
7283 echo "$as_me: failed program was:" >&5
7284cat conftest.$ac_ext >&5
7285ac_lo=`expr $ac_mid + 1`
7286 if test $ac_lo -le $ac_mid; then
7287 ac_lo= ac_hi=
7288 break
7289 fi
7290 ac_mid=`expr 2 '*' $ac_mid + 1`
7291fi
7292rm -f conftest.$ac_objext conftest.$ac_ext
7293 done
7294else
7295 echo "$as_me: failed program was:" >&5
7296cat conftest.$ac_ext >&5
7297cat >conftest.$ac_ext <<_ACEOF
7298#line $LINENO "configure"
7299#include "confdefs.h"
7300$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007301#ifdef F77_DUMMY_MAIN
7302# ifdef __cplusplus
7303 extern "C"
7304# endif
7305 int F77_DUMMY_MAIN() { return 1; }
7306#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007307int
7308main ()
7309{
7310static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7311test_array [0] = 0
7312
7313 ;
7314 return 0;
7315}
7316_ACEOF
7317rm -f conftest.$ac_objext
7318if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7319 (eval $ac_compile) 2>&5
7320 ac_status=$?
7321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7322 (exit $ac_status); } &&
7323 { ac_try='test -s conftest.$ac_objext'
7324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7325 (eval $ac_try) 2>&5
7326 ac_status=$?
7327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7328 (exit $ac_status); }; }; then
7329 ac_hi=-1 ac_mid=-1
7330 while :; do
7331 cat >conftest.$ac_ext <<_ACEOF
7332#line $LINENO "configure"
7333#include "confdefs.h"
7334$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007335#ifdef F77_DUMMY_MAIN
7336# ifdef __cplusplus
7337 extern "C"
7338# endif
7339 int F77_DUMMY_MAIN() { return 1; }
7340#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007341int
7342main ()
7343{
7344static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7345test_array [0] = 0
7346
7347 ;
7348 return 0;
7349}
7350_ACEOF
7351rm -f conftest.$ac_objext
7352if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7353 (eval $ac_compile) 2>&5
7354 ac_status=$?
7355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7356 (exit $ac_status); } &&
7357 { ac_try='test -s conftest.$ac_objext'
7358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7359 (eval $ac_try) 2>&5
7360 ac_status=$?
7361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7362 (exit $ac_status); }; }; then
7363 ac_lo=$ac_mid; break
7364else
7365 echo "$as_me: failed program was:" >&5
7366cat conftest.$ac_ext >&5
7367ac_hi=`expr '(' $ac_mid ')' - 1`
7368 if test $ac_mid -le $ac_hi; then
7369 ac_lo= ac_hi=
7370 break
7371 fi
7372 ac_mid=`expr 2 '*' $ac_mid`
7373fi
7374rm -f conftest.$ac_objext conftest.$ac_ext
7375 done
7376else
7377 echo "$as_me: failed program was:" >&5
7378cat conftest.$ac_ext >&5
7379ac_lo= ac_hi=
7380fi
7381rm -f conftest.$ac_objext conftest.$ac_ext
7382fi
7383rm -f conftest.$ac_objext conftest.$ac_ext
7384# Binary search between lo and hi bounds.
7385while test "x$ac_lo" != "x$ac_hi"; do
7386 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7387 cat >conftest.$ac_ext <<_ACEOF
7388#line $LINENO "configure"
7389#include "confdefs.h"
7390$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007391#ifdef F77_DUMMY_MAIN
7392# ifdef __cplusplus
7393 extern "C"
7394# endif
7395 int F77_DUMMY_MAIN() { return 1; }
7396#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007397int
7398main ()
7399{
7400static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7401test_array [0] = 0
7402
7403 ;
7404 return 0;
7405}
7406_ACEOF
7407rm -f conftest.$ac_objext
7408if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7409 (eval $ac_compile) 2>&5
7410 ac_status=$?
7411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7412 (exit $ac_status); } &&
7413 { ac_try='test -s conftest.$ac_objext'
7414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7415 (eval $ac_try) 2>&5
7416 ac_status=$?
7417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7418 (exit $ac_status); }; }; then
7419 ac_hi=$ac_mid
7420else
7421 echo "$as_me: failed program was:" >&5
7422cat conftest.$ac_ext >&5
7423ac_lo=`expr '(' $ac_mid ')' + 1`
7424fi
7425rm -f conftest.$ac_objext conftest.$ac_ext
7426done
7427case $ac_lo in
7428?*) ac_cv_sizeof_float=$ac_lo;;
7429'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7430echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7431 { (exit 1); exit 1; }; } ;;
7432esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007433else
7434 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007435 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7436echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7437 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007438else
Martin v. Löwis11437992002-04-12 09:54:03 +00007439 cat >conftest.$ac_ext <<_ACEOF
7440#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007441#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007442$ac_includes_default
7443long longval () { return (long) (sizeof (float)); }
7444unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007445#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007446#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00007447#ifdef F77_DUMMY_MAIN
7448# ifdef __cplusplus
7449 extern "C"
7450# endif
7451 int F77_DUMMY_MAIN() { return 1; }
7452#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007453int
7454main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007455{
Martin v. Löwis11437992002-04-12 09:54:03 +00007456
7457 FILE *f = fopen ("conftest.val", "w");
7458 if (! f)
7459 exit (1);
7460 if (((long) (sizeof (float))) < 0)
7461 {
7462 long i = longval ();
7463 if (i != ((long) (sizeof (float))))
7464 exit (1);
7465 fprintf (f, "%ld\n", i);
7466 }
7467 else
7468 {
7469 unsigned long i = ulongval ();
7470 if (i != ((long) (sizeof (float))))
7471 exit (1);
7472 fprintf (f, "%lu\n", i);
7473 }
7474 exit (ferror (f) || fclose (f) != 0);
7475
7476 ;
7477 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007478}
Martin v. Löwis11437992002-04-12 09:54:03 +00007479_ACEOF
7480rm -f conftest$ac_exeext
7481if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7482 (eval $ac_link) 2>&5
7483 ac_status=$?
7484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7485 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7487 (eval $ac_try) 2>&5
7488 ac_status=$?
7489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7490 (exit $ac_status); }; }; then
7491 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007492else
Martin v. Löwis11437992002-04-12 09:54:03 +00007493 echo "$as_me: program exited with status $ac_status" >&5
7494echo "$as_me: failed program was:" >&5
7495cat conftest.$ac_ext >&5
7496( exit $ac_status )
7497{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7498echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7499 { (exit 1); exit 1; }; }
7500fi
Barry Warsawfe33b792003-01-07 22:42:49 +00007501rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007502fi
7503fi
7504rm -f conftest.val
7505else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007506 ac_cv_sizeof_float=0
7507fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007508fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007509echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7510echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7511cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007512#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007513_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007514
7515
Martin v. Löwis11437992002-04-12 09:54:03 +00007516echo "$as_me:$LINENO: checking for double" >&5
7517echo $ECHO_N "checking for double... $ECHO_C" >&6
7518if test "${ac_cv_type_double+set}" = set; then
7519 echo $ECHO_N "(cached) $ECHO_C" >&6
7520else
7521 cat >conftest.$ac_ext <<_ACEOF
7522#line $LINENO "configure"
7523#include "confdefs.h"
7524$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007525#ifdef F77_DUMMY_MAIN
7526# ifdef __cplusplus
7527 extern "C"
7528# endif
7529 int F77_DUMMY_MAIN() { return 1; }
7530#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007531int
7532main ()
7533{
7534if ((double *) 0)
7535 return 0;
7536if (sizeof (double))
7537 return 0;
7538 ;
7539 return 0;
7540}
7541_ACEOF
7542rm -f conftest.$ac_objext
7543if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7544 (eval $ac_compile) 2>&5
7545 ac_status=$?
7546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7547 (exit $ac_status); } &&
7548 { ac_try='test -s conftest.$ac_objext'
7549 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7550 (eval $ac_try) 2>&5
7551 ac_status=$?
7552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7553 (exit $ac_status); }; }; then
7554 ac_cv_type_double=yes
7555else
7556 echo "$as_me: failed program was:" >&5
7557cat conftest.$ac_ext >&5
7558ac_cv_type_double=no
7559fi
7560rm -f conftest.$ac_objext conftest.$ac_ext
7561fi
7562echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7563echo "${ECHO_T}$ac_cv_type_double" >&6
7564
7565echo "$as_me:$LINENO: checking size of double" >&5
7566echo $ECHO_N "checking size of double... $ECHO_C" >&6
7567if test "${ac_cv_sizeof_double+set}" = set; then
7568 echo $ECHO_N "(cached) $ECHO_C" >&6
7569else
7570 if test "$ac_cv_type_double" = yes; then
7571 # The cast to unsigned long works around a bug in the HP C Compiler
7572 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7573 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7574 # This bug is HP SR number 8606223364.
7575 if test "$cross_compiling" = yes; then
7576 # Depending upon the size, compute the lo and hi bounds.
7577cat >conftest.$ac_ext <<_ACEOF
7578#line $LINENO "configure"
7579#include "confdefs.h"
7580$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007581#ifdef F77_DUMMY_MAIN
7582# ifdef __cplusplus
7583 extern "C"
7584# endif
7585 int F77_DUMMY_MAIN() { return 1; }
7586#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007587int
7588main ()
7589{
7590static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7591test_array [0] = 0
7592
7593 ;
7594 return 0;
7595}
7596_ACEOF
7597rm -f conftest.$ac_objext
7598if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7599 (eval $ac_compile) 2>&5
7600 ac_status=$?
7601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7602 (exit $ac_status); } &&
7603 { ac_try='test -s conftest.$ac_objext'
7604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7605 (eval $ac_try) 2>&5
7606 ac_status=$?
7607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7608 (exit $ac_status); }; }; then
7609 ac_lo=0 ac_mid=0
7610 while :; do
7611 cat >conftest.$ac_ext <<_ACEOF
7612#line $LINENO "configure"
7613#include "confdefs.h"
7614$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007615#ifdef F77_DUMMY_MAIN
7616# ifdef __cplusplus
7617 extern "C"
7618# endif
7619 int F77_DUMMY_MAIN() { return 1; }
7620#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007621int
7622main ()
7623{
7624static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7625test_array [0] = 0
7626
7627 ;
7628 return 0;
7629}
7630_ACEOF
7631rm -f conftest.$ac_objext
7632if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7633 (eval $ac_compile) 2>&5
7634 ac_status=$?
7635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7636 (exit $ac_status); } &&
7637 { ac_try='test -s conftest.$ac_objext'
7638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7639 (eval $ac_try) 2>&5
7640 ac_status=$?
7641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7642 (exit $ac_status); }; }; then
7643 ac_hi=$ac_mid; break
7644else
7645 echo "$as_me: failed program was:" >&5
7646cat conftest.$ac_ext >&5
7647ac_lo=`expr $ac_mid + 1`
7648 if test $ac_lo -le $ac_mid; then
7649 ac_lo= ac_hi=
7650 break
7651 fi
7652 ac_mid=`expr 2 '*' $ac_mid + 1`
7653fi
7654rm -f conftest.$ac_objext conftest.$ac_ext
7655 done
7656else
7657 echo "$as_me: failed program was:" >&5
7658cat conftest.$ac_ext >&5
7659cat >conftest.$ac_ext <<_ACEOF
7660#line $LINENO "configure"
7661#include "confdefs.h"
7662$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007663#ifdef F77_DUMMY_MAIN
7664# ifdef __cplusplus
7665 extern "C"
7666# endif
7667 int F77_DUMMY_MAIN() { return 1; }
7668#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007669int
7670main ()
7671{
7672static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7673test_array [0] = 0
7674
7675 ;
7676 return 0;
7677}
7678_ACEOF
7679rm -f conftest.$ac_objext
7680if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7681 (eval $ac_compile) 2>&5
7682 ac_status=$?
7683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7684 (exit $ac_status); } &&
7685 { ac_try='test -s conftest.$ac_objext'
7686 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7687 (eval $ac_try) 2>&5
7688 ac_status=$?
7689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7690 (exit $ac_status); }; }; then
7691 ac_hi=-1 ac_mid=-1
7692 while :; do
7693 cat >conftest.$ac_ext <<_ACEOF
7694#line $LINENO "configure"
7695#include "confdefs.h"
7696$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007697#ifdef F77_DUMMY_MAIN
7698# ifdef __cplusplus
7699 extern "C"
7700# endif
7701 int F77_DUMMY_MAIN() { return 1; }
7702#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007703int
7704main ()
7705{
7706static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7707test_array [0] = 0
7708
7709 ;
7710 return 0;
7711}
7712_ACEOF
7713rm -f conftest.$ac_objext
7714if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7715 (eval $ac_compile) 2>&5
7716 ac_status=$?
7717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7718 (exit $ac_status); } &&
7719 { ac_try='test -s conftest.$ac_objext'
7720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7721 (eval $ac_try) 2>&5
7722 ac_status=$?
7723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7724 (exit $ac_status); }; }; then
7725 ac_lo=$ac_mid; break
7726else
7727 echo "$as_me: failed program was:" >&5
7728cat conftest.$ac_ext >&5
7729ac_hi=`expr '(' $ac_mid ')' - 1`
7730 if test $ac_mid -le $ac_hi; then
7731 ac_lo= ac_hi=
7732 break
7733 fi
7734 ac_mid=`expr 2 '*' $ac_mid`
7735fi
7736rm -f conftest.$ac_objext conftest.$ac_ext
7737 done
7738else
7739 echo "$as_me: failed program was:" >&5
7740cat conftest.$ac_ext >&5
7741ac_lo= ac_hi=
7742fi
7743rm -f conftest.$ac_objext conftest.$ac_ext
7744fi
7745rm -f conftest.$ac_objext conftest.$ac_ext
7746# Binary search between lo and hi bounds.
7747while test "x$ac_lo" != "x$ac_hi"; do
7748 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7749 cat >conftest.$ac_ext <<_ACEOF
7750#line $LINENO "configure"
7751#include "confdefs.h"
7752$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007753#ifdef F77_DUMMY_MAIN
7754# ifdef __cplusplus
7755 extern "C"
7756# endif
7757 int F77_DUMMY_MAIN() { return 1; }
7758#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007759int
7760main ()
7761{
7762static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7763test_array [0] = 0
7764
7765 ;
7766 return 0;
7767}
7768_ACEOF
7769rm -f conftest.$ac_objext
7770if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7771 (eval $ac_compile) 2>&5
7772 ac_status=$?
7773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7774 (exit $ac_status); } &&
7775 { ac_try='test -s conftest.$ac_objext'
7776 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7777 (eval $ac_try) 2>&5
7778 ac_status=$?
7779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7780 (exit $ac_status); }; }; then
7781 ac_hi=$ac_mid
7782else
7783 echo "$as_me: failed program was:" >&5
7784cat conftest.$ac_ext >&5
7785ac_lo=`expr '(' $ac_mid ')' + 1`
7786fi
7787rm -f conftest.$ac_objext conftest.$ac_ext
7788done
7789case $ac_lo in
7790?*) ac_cv_sizeof_double=$ac_lo;;
7791'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7792echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7793 { (exit 1); exit 1; }; } ;;
7794esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007795else
7796 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007797 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7798echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7799 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007800else
Martin v. Löwis11437992002-04-12 09:54:03 +00007801 cat >conftest.$ac_ext <<_ACEOF
7802#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007803#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007804$ac_includes_default
7805long longval () { return (long) (sizeof (double)); }
7806unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007807#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007808#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00007809#ifdef F77_DUMMY_MAIN
7810# ifdef __cplusplus
7811 extern "C"
7812# endif
7813 int F77_DUMMY_MAIN() { return 1; }
7814#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007815int
7816main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007817{
Martin v. Löwis11437992002-04-12 09:54:03 +00007818
7819 FILE *f = fopen ("conftest.val", "w");
7820 if (! f)
7821 exit (1);
7822 if (((long) (sizeof (double))) < 0)
7823 {
7824 long i = longval ();
7825 if (i != ((long) (sizeof (double))))
7826 exit (1);
7827 fprintf (f, "%ld\n", i);
7828 }
7829 else
7830 {
7831 unsigned long i = ulongval ();
7832 if (i != ((long) (sizeof (double))))
7833 exit (1);
7834 fprintf (f, "%lu\n", i);
7835 }
7836 exit (ferror (f) || fclose (f) != 0);
7837
7838 ;
7839 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007840}
Martin v. Löwis11437992002-04-12 09:54:03 +00007841_ACEOF
7842rm -f conftest$ac_exeext
7843if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7844 (eval $ac_link) 2>&5
7845 ac_status=$?
7846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7847 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7849 (eval $ac_try) 2>&5
7850 ac_status=$?
7851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7852 (exit $ac_status); }; }; then
7853 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007854else
Martin v. Löwis11437992002-04-12 09:54:03 +00007855 echo "$as_me: program exited with status $ac_status" >&5
7856echo "$as_me: failed program was:" >&5
7857cat conftest.$ac_ext >&5
7858( exit $ac_status )
7859{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7860echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7861 { (exit 1); exit 1; }; }
7862fi
Barry Warsawfe33b792003-01-07 22:42:49 +00007863rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007864fi
7865fi
7866rm -f conftest.val
7867else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007868 ac_cv_sizeof_double=0
7869fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007870fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007871echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7872echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7873cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007874#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007875_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007876
7877
Martin v. Löwis11437992002-04-12 09:54:03 +00007878echo "$as_me:$LINENO: checking for fpos_t" >&5
7879echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7880if test "${ac_cv_type_fpos_t+set}" = set; then
7881 echo $ECHO_N "(cached) $ECHO_C" >&6
7882else
7883 cat >conftest.$ac_ext <<_ACEOF
7884#line $LINENO "configure"
7885#include "confdefs.h"
7886$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007887#ifdef F77_DUMMY_MAIN
7888# ifdef __cplusplus
7889 extern "C"
7890# endif
7891 int F77_DUMMY_MAIN() { return 1; }
7892#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007893int
7894main ()
7895{
7896if ((fpos_t *) 0)
7897 return 0;
7898if (sizeof (fpos_t))
7899 return 0;
7900 ;
7901 return 0;
7902}
7903_ACEOF
7904rm -f conftest.$ac_objext
7905if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7906 (eval $ac_compile) 2>&5
7907 ac_status=$?
7908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7909 (exit $ac_status); } &&
7910 { ac_try='test -s conftest.$ac_objext'
7911 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7912 (eval $ac_try) 2>&5
7913 ac_status=$?
7914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7915 (exit $ac_status); }; }; then
7916 ac_cv_type_fpos_t=yes
7917else
7918 echo "$as_me: failed program was:" >&5
7919cat conftest.$ac_ext >&5
7920ac_cv_type_fpos_t=no
7921fi
7922rm -f conftest.$ac_objext conftest.$ac_ext
7923fi
7924echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7925echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7926
7927echo "$as_me:$LINENO: checking size of fpos_t" >&5
7928echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7929if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7930 echo $ECHO_N "(cached) $ECHO_C" >&6
7931else
7932 if test "$ac_cv_type_fpos_t" = yes; then
7933 # The cast to unsigned long works around a bug in the HP C Compiler
7934 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7935 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7936 # This bug is HP SR number 8606223364.
7937 if test "$cross_compiling" = yes; then
7938 # Depending upon the size, compute the lo and hi bounds.
7939cat >conftest.$ac_ext <<_ACEOF
7940#line $LINENO "configure"
7941#include "confdefs.h"
7942$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007943#ifdef F77_DUMMY_MAIN
7944# ifdef __cplusplus
7945 extern "C"
7946# endif
7947 int F77_DUMMY_MAIN() { return 1; }
7948#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007949int
7950main ()
7951{
7952static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7953test_array [0] = 0
7954
7955 ;
7956 return 0;
7957}
7958_ACEOF
7959rm -f conftest.$ac_objext
7960if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7961 (eval $ac_compile) 2>&5
7962 ac_status=$?
7963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7964 (exit $ac_status); } &&
7965 { ac_try='test -s conftest.$ac_objext'
7966 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7967 (eval $ac_try) 2>&5
7968 ac_status=$?
7969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7970 (exit $ac_status); }; }; then
7971 ac_lo=0 ac_mid=0
7972 while :; do
7973 cat >conftest.$ac_ext <<_ACEOF
7974#line $LINENO "configure"
7975#include "confdefs.h"
7976$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007977#ifdef F77_DUMMY_MAIN
7978# ifdef __cplusplus
7979 extern "C"
7980# endif
7981 int F77_DUMMY_MAIN() { return 1; }
7982#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007983int
7984main ()
7985{
7986static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7987test_array [0] = 0
7988
7989 ;
7990 return 0;
7991}
7992_ACEOF
7993rm -f conftest.$ac_objext
7994if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7995 (eval $ac_compile) 2>&5
7996 ac_status=$?
7997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7998 (exit $ac_status); } &&
7999 { ac_try='test -s conftest.$ac_objext'
8000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8001 (eval $ac_try) 2>&5
8002 ac_status=$?
8003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8004 (exit $ac_status); }; }; then
8005 ac_hi=$ac_mid; break
8006else
8007 echo "$as_me: failed program was:" >&5
8008cat conftest.$ac_ext >&5
8009ac_lo=`expr $ac_mid + 1`
8010 if test $ac_lo -le $ac_mid; then
8011 ac_lo= ac_hi=
8012 break
8013 fi
8014 ac_mid=`expr 2 '*' $ac_mid + 1`
8015fi
8016rm -f conftest.$ac_objext conftest.$ac_ext
8017 done
8018else
8019 echo "$as_me: failed program was:" >&5
8020cat conftest.$ac_ext >&5
8021cat >conftest.$ac_ext <<_ACEOF
8022#line $LINENO "configure"
8023#include "confdefs.h"
8024$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008025#ifdef F77_DUMMY_MAIN
8026# ifdef __cplusplus
8027 extern "C"
8028# endif
8029 int F77_DUMMY_MAIN() { return 1; }
8030#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008031int
8032main ()
8033{
8034static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
8035test_array [0] = 0
8036
8037 ;
8038 return 0;
8039}
8040_ACEOF
8041rm -f conftest.$ac_objext
8042if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8043 (eval $ac_compile) 2>&5
8044 ac_status=$?
8045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8046 (exit $ac_status); } &&
8047 { ac_try='test -s conftest.$ac_objext'
8048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8049 (eval $ac_try) 2>&5
8050 ac_status=$?
8051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8052 (exit $ac_status); }; }; then
8053 ac_hi=-1 ac_mid=-1
8054 while :; do
8055 cat >conftest.$ac_ext <<_ACEOF
8056#line $LINENO "configure"
8057#include "confdefs.h"
8058$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008059#ifdef F77_DUMMY_MAIN
8060# ifdef __cplusplus
8061 extern "C"
8062# endif
8063 int F77_DUMMY_MAIN() { return 1; }
8064#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008065int
8066main ()
8067{
8068static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8069test_array [0] = 0
8070
8071 ;
8072 return 0;
8073}
8074_ACEOF
8075rm -f conftest.$ac_objext
8076if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8077 (eval $ac_compile) 2>&5
8078 ac_status=$?
8079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8080 (exit $ac_status); } &&
8081 { ac_try='test -s conftest.$ac_objext'
8082 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8083 (eval $ac_try) 2>&5
8084 ac_status=$?
8085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8086 (exit $ac_status); }; }; then
8087 ac_lo=$ac_mid; break
8088else
8089 echo "$as_me: failed program was:" >&5
8090cat conftest.$ac_ext >&5
8091ac_hi=`expr '(' $ac_mid ')' - 1`
8092 if test $ac_mid -le $ac_hi; then
8093 ac_lo= ac_hi=
8094 break
8095 fi
8096 ac_mid=`expr 2 '*' $ac_mid`
8097fi
8098rm -f conftest.$ac_objext conftest.$ac_ext
8099 done
8100else
8101 echo "$as_me: failed program was:" >&5
8102cat conftest.$ac_ext >&5
8103ac_lo= ac_hi=
8104fi
8105rm -f conftest.$ac_objext conftest.$ac_ext
8106fi
8107rm -f conftest.$ac_objext conftest.$ac_ext
8108# Binary search between lo and hi bounds.
8109while test "x$ac_lo" != "x$ac_hi"; do
8110 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8111 cat >conftest.$ac_ext <<_ACEOF
8112#line $LINENO "configure"
8113#include "confdefs.h"
8114$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008115#ifdef F77_DUMMY_MAIN
8116# ifdef __cplusplus
8117 extern "C"
8118# endif
8119 int F77_DUMMY_MAIN() { return 1; }
8120#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008121int
8122main ()
8123{
8124static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8125test_array [0] = 0
8126
8127 ;
8128 return 0;
8129}
8130_ACEOF
8131rm -f conftest.$ac_objext
8132if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8133 (eval $ac_compile) 2>&5
8134 ac_status=$?
8135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8136 (exit $ac_status); } &&
8137 { ac_try='test -s conftest.$ac_objext'
8138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8139 (eval $ac_try) 2>&5
8140 ac_status=$?
8141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8142 (exit $ac_status); }; }; then
8143 ac_hi=$ac_mid
8144else
8145 echo "$as_me: failed program was:" >&5
8146cat conftest.$ac_ext >&5
8147ac_lo=`expr '(' $ac_mid ')' + 1`
8148fi
8149rm -f conftest.$ac_objext conftest.$ac_ext
8150done
8151case $ac_lo in
8152?*) ac_cv_sizeof_fpos_t=$ac_lo;;
8153'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8154echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
8155 { (exit 1); exit 1; }; } ;;
8156esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008157else
8158 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008159 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8160echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8161 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008162else
Martin v. Löwis11437992002-04-12 09:54:03 +00008163 cat >conftest.$ac_ext <<_ACEOF
8164#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008165#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008166$ac_includes_default
8167long longval () { return (long) (sizeof (fpos_t)); }
8168unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008169#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008170#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00008171#ifdef F77_DUMMY_MAIN
8172# ifdef __cplusplus
8173 extern "C"
8174# endif
8175 int F77_DUMMY_MAIN() { return 1; }
8176#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008177int
8178main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008179{
Martin v. Löwis11437992002-04-12 09:54:03 +00008180
8181 FILE *f = fopen ("conftest.val", "w");
8182 if (! f)
8183 exit (1);
8184 if (((long) (sizeof (fpos_t))) < 0)
8185 {
8186 long i = longval ();
8187 if (i != ((long) (sizeof (fpos_t))))
8188 exit (1);
8189 fprintf (f, "%ld\n", i);
8190 }
8191 else
8192 {
8193 unsigned long i = ulongval ();
8194 if (i != ((long) (sizeof (fpos_t))))
8195 exit (1);
8196 fprintf (f, "%lu\n", i);
8197 }
8198 exit (ferror (f) || fclose (f) != 0);
8199
8200 ;
8201 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008202}
Martin v. Löwis11437992002-04-12 09:54:03 +00008203_ACEOF
8204rm -f conftest$ac_exeext
8205if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8206 (eval $ac_link) 2>&5
8207 ac_status=$?
8208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8209 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8211 (eval $ac_try) 2>&5
8212 ac_status=$?
8213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8214 (exit $ac_status); }; }; then
8215 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008216else
Martin v. Löwis11437992002-04-12 09:54:03 +00008217 echo "$as_me: program exited with status $ac_status" >&5
8218echo "$as_me: failed program was:" >&5
8219cat conftest.$ac_ext >&5
8220( exit $ac_status )
8221{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8222echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
8223 { (exit 1); exit 1; }; }
8224fi
Barry Warsawfe33b792003-01-07 22:42:49 +00008225rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008226fi
8227fi
8228rm -f conftest.val
8229else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008230 ac_cv_sizeof_fpos_t=0
8231fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008232fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008233echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8234echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8235cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008236#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008237_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008238
Michael W. Hudson54241132001-12-07 15:38:26 +00008239
8240
Martin v. Löwis11437992002-04-12 09:54:03 +00008241echo "$as_me:$LINENO: checking for long long support" >&5
8242echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008243have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008244cat >conftest.$ac_ext <<_ACEOF
8245#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008246#include "confdefs.h"
8247
Barry Warsawfe33b792003-01-07 22:42:49 +00008248#ifdef F77_DUMMY_MAIN
8249# ifdef __cplusplus
8250 extern "C"
8251# endif
8252 int F77_DUMMY_MAIN() { return 1; }
8253#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008254int
8255main ()
8256{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008257long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008258 ;
8259 return 0;
8260}
8261_ACEOF
8262rm -f conftest.$ac_objext
8263if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8264 (eval $ac_compile) 2>&5
8265 ac_status=$?
8266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8267 (exit $ac_status); } &&
8268 { ac_try='test -s conftest.$ac_objext'
8269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8270 (eval $ac_try) 2>&5
8271 ac_status=$?
8272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8273 (exit $ac_status); }; }; then
8274
8275
8276cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008277#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008278_ACEOF
8279
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008280 have_long_long=yes
8281
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008282else
Martin v. Löwis11437992002-04-12 09:54:03 +00008283 echo "$as_me: failed program was:" >&5
8284cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008285fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008286rm -f conftest.$ac_objext conftest.$ac_ext
8287echo "$as_me:$LINENO: result: $have_long_long" >&5
8288echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008289if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008290echo "$as_me:$LINENO: checking for long long" >&5
8291echo $ECHO_N "checking for long long... $ECHO_C" >&6
8292if test "${ac_cv_type_long_long+set}" = set; then
8293 echo $ECHO_N "(cached) $ECHO_C" >&6
8294else
8295 cat >conftest.$ac_ext <<_ACEOF
8296#line $LINENO "configure"
8297#include "confdefs.h"
8298$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008299#ifdef F77_DUMMY_MAIN
8300# ifdef __cplusplus
8301 extern "C"
8302# endif
8303 int F77_DUMMY_MAIN() { return 1; }
8304#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008305int
8306main ()
8307{
8308if ((long long *) 0)
8309 return 0;
8310if (sizeof (long long))
8311 return 0;
8312 ;
8313 return 0;
8314}
8315_ACEOF
8316rm -f conftest.$ac_objext
8317if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8318 (eval $ac_compile) 2>&5
8319 ac_status=$?
8320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8321 (exit $ac_status); } &&
8322 { ac_try='test -s conftest.$ac_objext'
8323 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8324 (eval $ac_try) 2>&5
8325 ac_status=$?
8326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8327 (exit $ac_status); }; }; then
8328 ac_cv_type_long_long=yes
8329else
8330 echo "$as_me: failed program was:" >&5
8331cat conftest.$ac_ext >&5
8332ac_cv_type_long_long=no
8333fi
8334rm -f conftest.$ac_objext conftest.$ac_ext
8335fi
8336echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8337echo "${ECHO_T}$ac_cv_type_long_long" >&6
8338
8339echo "$as_me:$LINENO: checking size of long long" >&5
8340echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8341if test "${ac_cv_sizeof_long_long+set}" = set; then
8342 echo $ECHO_N "(cached) $ECHO_C" >&6
8343else
8344 if test "$ac_cv_type_long_long" = yes; then
8345 # The cast to unsigned long works around a bug in the HP C Compiler
8346 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8347 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8348 # This bug is HP SR number 8606223364.
8349 if test "$cross_compiling" = yes; then
8350 # Depending upon the size, compute the lo and hi bounds.
8351cat >conftest.$ac_ext <<_ACEOF
8352#line $LINENO "configure"
8353#include "confdefs.h"
8354$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008355#ifdef F77_DUMMY_MAIN
8356# ifdef __cplusplus
8357 extern "C"
8358# endif
8359 int F77_DUMMY_MAIN() { return 1; }
8360#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008361int
8362main ()
8363{
8364static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8365test_array [0] = 0
8366
8367 ;
8368 return 0;
8369}
8370_ACEOF
8371rm -f conftest.$ac_objext
8372if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8373 (eval $ac_compile) 2>&5
8374 ac_status=$?
8375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8376 (exit $ac_status); } &&
8377 { ac_try='test -s conftest.$ac_objext'
8378 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8379 (eval $ac_try) 2>&5
8380 ac_status=$?
8381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8382 (exit $ac_status); }; }; then
8383 ac_lo=0 ac_mid=0
8384 while :; do
8385 cat >conftest.$ac_ext <<_ACEOF
8386#line $LINENO "configure"
8387#include "confdefs.h"
8388$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008389#ifdef F77_DUMMY_MAIN
8390# ifdef __cplusplus
8391 extern "C"
8392# endif
8393 int F77_DUMMY_MAIN() { return 1; }
8394#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008395int
8396main ()
8397{
8398static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8399test_array [0] = 0
8400
8401 ;
8402 return 0;
8403}
8404_ACEOF
8405rm -f conftest.$ac_objext
8406if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8407 (eval $ac_compile) 2>&5
8408 ac_status=$?
8409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8410 (exit $ac_status); } &&
8411 { ac_try='test -s conftest.$ac_objext'
8412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8413 (eval $ac_try) 2>&5
8414 ac_status=$?
8415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8416 (exit $ac_status); }; }; then
8417 ac_hi=$ac_mid; break
8418else
8419 echo "$as_me: failed program was:" >&5
8420cat conftest.$ac_ext >&5
8421ac_lo=`expr $ac_mid + 1`
8422 if test $ac_lo -le $ac_mid; then
8423 ac_lo= ac_hi=
8424 break
8425 fi
8426 ac_mid=`expr 2 '*' $ac_mid + 1`
8427fi
8428rm -f conftest.$ac_objext conftest.$ac_ext
8429 done
8430else
8431 echo "$as_me: failed program was:" >&5
8432cat conftest.$ac_ext >&5
8433cat >conftest.$ac_ext <<_ACEOF
8434#line $LINENO "configure"
8435#include "confdefs.h"
8436$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008437#ifdef F77_DUMMY_MAIN
8438# ifdef __cplusplus
8439 extern "C"
8440# endif
8441 int F77_DUMMY_MAIN() { return 1; }
8442#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008443int
8444main ()
8445{
8446static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8447test_array [0] = 0
8448
8449 ;
8450 return 0;
8451}
8452_ACEOF
8453rm -f conftest.$ac_objext
8454if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8455 (eval $ac_compile) 2>&5
8456 ac_status=$?
8457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8458 (exit $ac_status); } &&
8459 { ac_try='test -s conftest.$ac_objext'
8460 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8461 (eval $ac_try) 2>&5
8462 ac_status=$?
8463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8464 (exit $ac_status); }; }; then
8465 ac_hi=-1 ac_mid=-1
8466 while :; do
8467 cat >conftest.$ac_ext <<_ACEOF
8468#line $LINENO "configure"
8469#include "confdefs.h"
8470$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008471#ifdef F77_DUMMY_MAIN
8472# ifdef __cplusplus
8473 extern "C"
8474# endif
8475 int F77_DUMMY_MAIN() { return 1; }
8476#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008477int
8478main ()
8479{
8480static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8481test_array [0] = 0
8482
8483 ;
8484 return 0;
8485}
8486_ACEOF
8487rm -f conftest.$ac_objext
8488if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8489 (eval $ac_compile) 2>&5
8490 ac_status=$?
8491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8492 (exit $ac_status); } &&
8493 { ac_try='test -s conftest.$ac_objext'
8494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8495 (eval $ac_try) 2>&5
8496 ac_status=$?
8497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8498 (exit $ac_status); }; }; then
8499 ac_lo=$ac_mid; break
8500else
8501 echo "$as_me: failed program was:" >&5
8502cat conftest.$ac_ext >&5
8503ac_hi=`expr '(' $ac_mid ')' - 1`
8504 if test $ac_mid -le $ac_hi; then
8505 ac_lo= ac_hi=
8506 break
8507 fi
8508 ac_mid=`expr 2 '*' $ac_mid`
8509fi
8510rm -f conftest.$ac_objext conftest.$ac_ext
8511 done
8512else
8513 echo "$as_me: failed program was:" >&5
8514cat conftest.$ac_ext >&5
8515ac_lo= ac_hi=
8516fi
8517rm -f conftest.$ac_objext conftest.$ac_ext
8518fi
8519rm -f conftest.$ac_objext conftest.$ac_ext
8520# Binary search between lo and hi bounds.
8521while test "x$ac_lo" != "x$ac_hi"; do
8522 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8523 cat >conftest.$ac_ext <<_ACEOF
8524#line $LINENO "configure"
8525#include "confdefs.h"
8526$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008527#ifdef F77_DUMMY_MAIN
8528# ifdef __cplusplus
8529 extern "C"
8530# endif
8531 int F77_DUMMY_MAIN() { return 1; }
8532#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008533int
8534main ()
8535{
8536static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8537test_array [0] = 0
8538
8539 ;
8540 return 0;
8541}
8542_ACEOF
8543rm -f conftest.$ac_objext
8544if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8545 (eval $ac_compile) 2>&5
8546 ac_status=$?
8547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8548 (exit $ac_status); } &&
8549 { ac_try='test -s conftest.$ac_objext'
8550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8551 (eval $ac_try) 2>&5
8552 ac_status=$?
8553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8554 (exit $ac_status); }; }; then
8555 ac_hi=$ac_mid
8556else
8557 echo "$as_me: failed program was:" >&5
8558cat conftest.$ac_ext >&5
8559ac_lo=`expr '(' $ac_mid ')' + 1`
8560fi
8561rm -f conftest.$ac_objext conftest.$ac_ext
8562done
8563case $ac_lo in
8564?*) ac_cv_sizeof_long_long=$ac_lo;;
8565'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8566echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8567 { (exit 1); exit 1; }; } ;;
8568esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008569else
8570 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008571 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8572echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8573 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008574else
Martin v. Löwis11437992002-04-12 09:54:03 +00008575 cat >conftest.$ac_ext <<_ACEOF
8576#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008577#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008578$ac_includes_default
8579long longval () { return (long) (sizeof (long long)); }
8580unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008581#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008582#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00008583#ifdef F77_DUMMY_MAIN
8584# ifdef __cplusplus
8585 extern "C"
8586# endif
8587 int F77_DUMMY_MAIN() { return 1; }
8588#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008589int
8590main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008591{
Martin v. Löwis11437992002-04-12 09:54:03 +00008592
8593 FILE *f = fopen ("conftest.val", "w");
8594 if (! f)
8595 exit (1);
8596 if (((long) (sizeof (long long))) < 0)
8597 {
8598 long i = longval ();
8599 if (i != ((long) (sizeof (long long))))
8600 exit (1);
8601 fprintf (f, "%ld\n", i);
8602 }
8603 else
8604 {
8605 unsigned long i = ulongval ();
8606 if (i != ((long) (sizeof (long long))))
8607 exit (1);
8608 fprintf (f, "%lu\n", i);
8609 }
8610 exit (ferror (f) || fclose (f) != 0);
8611
8612 ;
8613 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008614}
Martin v. Löwis11437992002-04-12 09:54:03 +00008615_ACEOF
8616rm -f conftest$ac_exeext
8617if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8618 (eval $ac_link) 2>&5
8619 ac_status=$?
8620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8621 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8623 (eval $ac_try) 2>&5
8624 ac_status=$?
8625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8626 (exit $ac_status); }; }; then
8627 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008628else
Martin v. Löwis11437992002-04-12 09:54:03 +00008629 echo "$as_me: program exited with status $ac_status" >&5
8630echo "$as_me: failed program was:" >&5
8631cat conftest.$ac_ext >&5
8632( exit $ac_status )
8633{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8634echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8635 { (exit 1); exit 1; }; }
8636fi
Barry Warsawfe33b792003-01-07 22:42:49 +00008637rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008638fi
8639fi
8640rm -f conftest.val
8641else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008642 ac_cv_sizeof_long_long=0
8643fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008644fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008645echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8646echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8647cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008648#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008649_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008650
Michael W. Hudson54241132001-12-07 15:38:26 +00008651
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008652fi
8653
Martin v. Löwis11437992002-04-12 09:54:03 +00008654echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8655echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008656have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008657cat >conftest.$ac_ext <<_ACEOF
8658#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008659#include "confdefs.h"
8660
Barry Warsawfe33b792003-01-07 22:42:49 +00008661#ifdef F77_DUMMY_MAIN
8662# ifdef __cplusplus
8663 extern "C"
8664# endif
8665 int F77_DUMMY_MAIN() { return 1; }
8666#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008667int
8668main ()
8669{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008670uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008671 ;
8672 return 0;
8673}
8674_ACEOF
8675rm -f conftest.$ac_objext
8676if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8677 (eval $ac_compile) 2>&5
8678 ac_status=$?
8679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8680 (exit $ac_status); } &&
8681 { ac_try='test -s conftest.$ac_objext'
8682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8683 (eval $ac_try) 2>&5
8684 ac_status=$?
8685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8686 (exit $ac_status); }; }; then
8687
8688
8689cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008690#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008691_ACEOF
8692
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008693 have_uintptr_t=yes
8694
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008695else
Martin v. Löwis11437992002-04-12 09:54:03 +00008696 echo "$as_me: failed program was:" >&5
8697cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008698fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008699rm -f conftest.$ac_objext conftest.$ac_ext
8700echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8701echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008702if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008703echo "$as_me:$LINENO: checking for uintptr_t" >&5
8704echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8705if test "${ac_cv_type_uintptr_t+set}" = set; then
8706 echo $ECHO_N "(cached) $ECHO_C" >&6
8707else
8708 cat >conftest.$ac_ext <<_ACEOF
8709#line $LINENO "configure"
8710#include "confdefs.h"
8711$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008712#ifdef F77_DUMMY_MAIN
8713# ifdef __cplusplus
8714 extern "C"
8715# endif
8716 int F77_DUMMY_MAIN() { return 1; }
8717#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008718int
8719main ()
8720{
8721if ((uintptr_t *) 0)
8722 return 0;
8723if (sizeof (uintptr_t))
8724 return 0;
8725 ;
8726 return 0;
8727}
8728_ACEOF
8729rm -f conftest.$ac_objext
8730if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8731 (eval $ac_compile) 2>&5
8732 ac_status=$?
8733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8734 (exit $ac_status); } &&
8735 { ac_try='test -s conftest.$ac_objext'
8736 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8737 (eval $ac_try) 2>&5
8738 ac_status=$?
8739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8740 (exit $ac_status); }; }; then
8741 ac_cv_type_uintptr_t=yes
8742else
8743 echo "$as_me: failed program was:" >&5
8744cat conftest.$ac_ext >&5
8745ac_cv_type_uintptr_t=no
8746fi
8747rm -f conftest.$ac_objext conftest.$ac_ext
8748fi
8749echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8750echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8751
8752echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8753echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8754if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8755 echo $ECHO_N "(cached) $ECHO_C" >&6
8756else
8757 if test "$ac_cv_type_uintptr_t" = yes; then
8758 # The cast to unsigned long works around a bug in the HP C Compiler
8759 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8760 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8761 # This bug is HP SR number 8606223364.
8762 if test "$cross_compiling" = yes; then
8763 # Depending upon the size, compute the lo and hi bounds.
8764cat >conftest.$ac_ext <<_ACEOF
8765#line $LINENO "configure"
8766#include "confdefs.h"
8767$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008768#ifdef F77_DUMMY_MAIN
8769# ifdef __cplusplus
8770 extern "C"
8771# endif
8772 int F77_DUMMY_MAIN() { return 1; }
8773#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008774int
8775main ()
8776{
8777static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8778test_array [0] = 0
8779
8780 ;
8781 return 0;
8782}
8783_ACEOF
8784rm -f conftest.$ac_objext
8785if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8786 (eval $ac_compile) 2>&5
8787 ac_status=$?
8788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8789 (exit $ac_status); } &&
8790 { ac_try='test -s conftest.$ac_objext'
8791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8792 (eval $ac_try) 2>&5
8793 ac_status=$?
8794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8795 (exit $ac_status); }; }; then
8796 ac_lo=0 ac_mid=0
8797 while :; do
8798 cat >conftest.$ac_ext <<_ACEOF
8799#line $LINENO "configure"
8800#include "confdefs.h"
8801$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008802#ifdef F77_DUMMY_MAIN
8803# ifdef __cplusplus
8804 extern "C"
8805# endif
8806 int F77_DUMMY_MAIN() { return 1; }
8807#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008808int
8809main ()
8810{
8811static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8812test_array [0] = 0
8813
8814 ;
8815 return 0;
8816}
8817_ACEOF
8818rm -f conftest.$ac_objext
8819if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8820 (eval $ac_compile) 2>&5
8821 ac_status=$?
8822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8823 (exit $ac_status); } &&
8824 { ac_try='test -s conftest.$ac_objext'
8825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8826 (eval $ac_try) 2>&5
8827 ac_status=$?
8828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8829 (exit $ac_status); }; }; then
8830 ac_hi=$ac_mid; break
8831else
8832 echo "$as_me: failed program was:" >&5
8833cat conftest.$ac_ext >&5
8834ac_lo=`expr $ac_mid + 1`
8835 if test $ac_lo -le $ac_mid; then
8836 ac_lo= ac_hi=
8837 break
8838 fi
8839 ac_mid=`expr 2 '*' $ac_mid + 1`
8840fi
8841rm -f conftest.$ac_objext conftest.$ac_ext
8842 done
8843else
8844 echo "$as_me: failed program was:" >&5
8845cat conftest.$ac_ext >&5
8846cat >conftest.$ac_ext <<_ACEOF
8847#line $LINENO "configure"
8848#include "confdefs.h"
8849$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008850#ifdef F77_DUMMY_MAIN
8851# ifdef __cplusplus
8852 extern "C"
8853# endif
8854 int F77_DUMMY_MAIN() { return 1; }
8855#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008856int
8857main ()
8858{
8859static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8860test_array [0] = 0
8861
8862 ;
8863 return 0;
8864}
8865_ACEOF
8866rm -f conftest.$ac_objext
8867if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8868 (eval $ac_compile) 2>&5
8869 ac_status=$?
8870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8871 (exit $ac_status); } &&
8872 { ac_try='test -s conftest.$ac_objext'
8873 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8874 (eval $ac_try) 2>&5
8875 ac_status=$?
8876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8877 (exit $ac_status); }; }; then
8878 ac_hi=-1 ac_mid=-1
8879 while :; do
8880 cat >conftest.$ac_ext <<_ACEOF
8881#line $LINENO "configure"
8882#include "confdefs.h"
8883$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008884#ifdef F77_DUMMY_MAIN
8885# ifdef __cplusplus
8886 extern "C"
8887# endif
8888 int F77_DUMMY_MAIN() { return 1; }
8889#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008890int
8891main ()
8892{
8893static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8894test_array [0] = 0
8895
8896 ;
8897 return 0;
8898}
8899_ACEOF
8900rm -f conftest.$ac_objext
8901if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8902 (eval $ac_compile) 2>&5
8903 ac_status=$?
8904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8905 (exit $ac_status); } &&
8906 { ac_try='test -s conftest.$ac_objext'
8907 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8908 (eval $ac_try) 2>&5
8909 ac_status=$?
8910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8911 (exit $ac_status); }; }; then
8912 ac_lo=$ac_mid; break
8913else
8914 echo "$as_me: failed program was:" >&5
8915cat conftest.$ac_ext >&5
8916ac_hi=`expr '(' $ac_mid ')' - 1`
8917 if test $ac_mid -le $ac_hi; then
8918 ac_lo= ac_hi=
8919 break
8920 fi
8921 ac_mid=`expr 2 '*' $ac_mid`
8922fi
8923rm -f conftest.$ac_objext conftest.$ac_ext
8924 done
8925else
8926 echo "$as_me: failed program was:" >&5
8927cat conftest.$ac_ext >&5
8928ac_lo= ac_hi=
8929fi
8930rm -f conftest.$ac_objext conftest.$ac_ext
8931fi
8932rm -f conftest.$ac_objext conftest.$ac_ext
8933# Binary search between lo and hi bounds.
8934while test "x$ac_lo" != "x$ac_hi"; do
8935 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8936 cat >conftest.$ac_ext <<_ACEOF
8937#line $LINENO "configure"
8938#include "confdefs.h"
8939$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008940#ifdef F77_DUMMY_MAIN
8941# ifdef __cplusplus
8942 extern "C"
8943# endif
8944 int F77_DUMMY_MAIN() { return 1; }
8945#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008946int
8947main ()
8948{
8949static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8950test_array [0] = 0
8951
8952 ;
8953 return 0;
8954}
8955_ACEOF
8956rm -f conftest.$ac_objext
8957if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8958 (eval $ac_compile) 2>&5
8959 ac_status=$?
8960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8961 (exit $ac_status); } &&
8962 { ac_try='test -s conftest.$ac_objext'
8963 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8964 (eval $ac_try) 2>&5
8965 ac_status=$?
8966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8967 (exit $ac_status); }; }; then
8968 ac_hi=$ac_mid
8969else
8970 echo "$as_me: failed program was:" >&5
8971cat conftest.$ac_ext >&5
8972ac_lo=`expr '(' $ac_mid ')' + 1`
8973fi
8974rm -f conftest.$ac_objext conftest.$ac_ext
8975done
8976case $ac_lo in
8977?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8978'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8979echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8980 { (exit 1); exit 1; }; } ;;
8981esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008982else
8983 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008984 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8985echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8986 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008987else
Martin v. Löwis11437992002-04-12 09:54:03 +00008988 cat >conftest.$ac_ext <<_ACEOF
8989#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008990#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008991$ac_includes_default
8992long longval () { return (long) (sizeof (uintptr_t)); }
8993unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008994#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008995#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00008996#ifdef F77_DUMMY_MAIN
8997# ifdef __cplusplus
8998 extern "C"
8999# endif
9000 int F77_DUMMY_MAIN() { return 1; }
9001#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009002int
9003main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009004{
Martin v. Löwis11437992002-04-12 09:54:03 +00009005
9006 FILE *f = fopen ("conftest.val", "w");
9007 if (! f)
9008 exit (1);
9009 if (((long) (sizeof (uintptr_t))) < 0)
9010 {
9011 long i = longval ();
9012 if (i != ((long) (sizeof (uintptr_t))))
9013 exit (1);
9014 fprintf (f, "%ld\n", i);
9015 }
9016 else
9017 {
9018 unsigned long i = ulongval ();
9019 if (i != ((long) (sizeof (uintptr_t))))
9020 exit (1);
9021 fprintf (f, "%lu\n", i);
9022 }
9023 exit (ferror (f) || fclose (f) != 0);
9024
9025 ;
9026 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009027}
Martin v. Löwis11437992002-04-12 09:54:03 +00009028_ACEOF
9029rm -f conftest$ac_exeext
9030if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9031 (eval $ac_link) 2>&5
9032 ac_status=$?
9033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9034 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9036 (eval $ac_try) 2>&5
9037 ac_status=$?
9038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9039 (exit $ac_status); }; }; then
9040 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009041else
Martin v. Löwis11437992002-04-12 09:54:03 +00009042 echo "$as_me: program exited with status $ac_status" >&5
9043echo "$as_me: failed program was:" >&5
9044cat conftest.$ac_ext >&5
9045( exit $ac_status )
9046{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
9047echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
9048 { (exit 1); exit 1; }; }
9049fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009050rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009051fi
9052fi
9053rm -f conftest.val
9054else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009055 ac_cv_sizeof_uintptr_t=0
9056fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009057fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009058echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
9059echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
9060cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009061#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009062_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009063
Michael W. Hudson54241132001-12-07 15:38:26 +00009064
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009065fi
9066
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009067# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009068echo "$as_me:$LINENO: checking size of off_t" >&5
9069echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
9070if test "${ac_cv_sizeof_off_t+set}" = set; then
9071 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009072else
9073 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009074 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009075else
Martin v. Löwis11437992002-04-12 09:54:03 +00009076 cat >conftest.$ac_ext <<_ACEOF
9077#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009078#include "confdefs.h"
9079#include <stdio.h>
9080#include <sys/types.h>
9081main()
9082{
9083 FILE *f=fopen("conftestval", "w");
9084 if (!f) exit(1);
9085 fprintf(f, "%d\n", sizeof(off_t));
9086 exit(0);
9087}
Martin v. Löwis11437992002-04-12 09:54:03 +00009088_ACEOF
9089rm -f conftest$ac_exeext
9090if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9091 (eval $ac_link) 2>&5
9092 ac_status=$?
9093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9094 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9096 (eval $ac_try) 2>&5
9097 ac_status=$?
9098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9099 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009100 ac_cv_sizeof_off_t=`cat conftestval`
9101else
Martin v. Löwis11437992002-04-12 09:54:03 +00009102 echo "$as_me: program exited with status $ac_status" >&5
9103echo "$as_me: failed program was:" >&5
9104cat conftest.$ac_ext >&5
9105( exit $ac_status )
9106ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009107fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009108rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009109fi
9110
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009111fi
9112
Martin v. Löwis11437992002-04-12 09:54:03 +00009113echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
9114echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
9115
9116cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009117#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009118_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009119
Michael W. Hudson54241132001-12-07 15:38:26 +00009120
Martin v. Löwis11437992002-04-12 09:54:03 +00009121echo "$as_me:$LINENO: checking whether to enable large file support" >&5
9122echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009123if test "$have_long_long" = yes -a \
9124 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
9125 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009126
Martin v. Löwis11437992002-04-12 09:54:03 +00009127cat >>confdefs.h <<\_ACEOF
9128#define HAVE_LARGEFILE_SUPPORT 1
9129_ACEOF
9130
9131 echo "$as_me:$LINENO: result: yes" >&5
9132echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009133else
Martin v. Löwis11437992002-04-12 09:54:03 +00009134 echo "$as_me:$LINENO: result: no" >&5
9135echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009136fi
9137
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009138# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009139echo "$as_me:$LINENO: checking size of time_t" >&5
9140echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
9141if test "${ac_cv_sizeof_time_t+set}" = set; then
9142 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009143else
9144 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009145 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009146else
Martin v. Löwis11437992002-04-12 09:54:03 +00009147 cat >conftest.$ac_ext <<_ACEOF
9148#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009149#include "confdefs.h"
9150#include <stdio.h>
9151#include <time.h>
9152main()
9153{
9154 FILE *f=fopen("conftestval", "w");
9155 if (!f) exit(1);
9156 fprintf(f, "%d\n", sizeof(time_t));
9157 exit(0);
9158}
Martin v. Löwis11437992002-04-12 09:54:03 +00009159_ACEOF
9160rm -f conftest$ac_exeext
9161if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9162 (eval $ac_link) 2>&5
9163 ac_status=$?
9164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9165 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9167 (eval $ac_try) 2>&5
9168 ac_status=$?
9169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9170 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009171 ac_cv_sizeof_time_t=`cat conftestval`
9172else
Martin v. Löwis11437992002-04-12 09:54:03 +00009173 echo "$as_me: program exited with status $ac_status" >&5
9174echo "$as_me: failed program was:" >&5
9175cat conftest.$ac_ext >&5
9176( exit $ac_status )
9177ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009178fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009179rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009180fi
9181
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009182fi
9183
Martin v. Löwis11437992002-04-12 09:54:03 +00009184echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9185echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9186
9187cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009188#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009189_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009190
Michael W. Hudson54241132001-12-07 15:38:26 +00009191
9192
Trent Mick635f6fb2000-08-23 21:33:05 +00009193# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009194ac_save_cc="$CC"
9195if test "$ac_cv_kpthread" = "yes"
9196then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009197elif test "$ac_cv_kthread" = "yes"
9198then CC="$CC -Kthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009199fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009200echo "$as_me:$LINENO: checking for pthread_t" >&5
9201echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009202have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009203cat >conftest.$ac_ext <<_ACEOF
9204#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009205#include "confdefs.h"
9206#include <pthread.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00009207#ifdef F77_DUMMY_MAIN
9208# ifdef __cplusplus
9209 extern "C"
9210# endif
9211 int F77_DUMMY_MAIN() { return 1; }
9212#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009213int
9214main ()
9215{
Guido van Rossum12580492000-09-24 16:47:19 +00009216pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009217 ;
9218 return 0;
9219}
9220_ACEOF
9221rm -f conftest.$ac_objext
9222if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9223 (eval $ac_compile) 2>&5
9224 ac_status=$?
9225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9226 (exit $ac_status); } &&
9227 { ac_try='test -s conftest.$ac_objext'
9228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9229 (eval $ac_try) 2>&5
9230 ac_status=$?
9231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9232 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009233 have_pthread_t=yes
9234else
Martin v. Löwis11437992002-04-12 09:54:03 +00009235 echo "$as_me: failed program was:" >&5
9236cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00009237fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009238rm -f conftest.$ac_objext conftest.$ac_ext
9239echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9240echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009241if test "$have_pthread_t" = yes ; then
9242 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009243 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9244echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9245 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9246 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009247else
9248 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009249 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009250else
Martin v. Löwis11437992002-04-12 09:54:03 +00009251 cat >conftest.$ac_ext <<_ACEOF
9252#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009253#include "confdefs.h"
9254#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009255#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +00009256 main()
9257 {
9258 FILE *f=fopen("conftestval", "w");
9259 if (!f) exit(1);
9260 fprintf(f, "%d\n", sizeof(pthread_t));
9261 exit(0);
9262 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009263_ACEOF
9264rm -f conftest$ac_exeext
9265if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9266 (eval $ac_link) 2>&5
9267 ac_status=$?
9268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9269 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9271 (eval $ac_try) 2>&5
9272 ac_status=$?
9273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9274 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009275 ac_cv_sizeof_pthread_t=`cat conftestval`
9276else
Martin v. Löwis11437992002-04-12 09:54:03 +00009277 echo "$as_me: program exited with status $ac_status" >&5
9278echo "$as_me: failed program was:" >&5
9279cat conftest.$ac_ext >&5
9280( exit $ac_status )
9281ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009282fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009283rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009284fi
9285
Trent Mick635f6fb2000-08-23 21:33:05 +00009286fi
9287
Martin v. Löwis11437992002-04-12 09:54:03 +00009288 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9289echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9290
9291cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009292#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009293_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009294
9295fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009296CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009297
Martin v. Löwis11437992002-04-12 09:54:03 +00009298echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9299echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009300# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9301if test "${enable_toolbox_glue+set}" = set; then
9302 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009303
Martin v. Löwis11437992002-04-12 09:54:03 +00009304fi;
Jack Jansene578a632001-08-15 01:27:14 +00009305
9306if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009307then
Jack Jansene578a632001-08-15 01:27:14 +00009308 case $ac_sys_system/$ac_sys_release in
9309 Darwin/*)
9310 enable_toolbox_glue="yes";;
9311 *)
9312 enable_toolbox_glue="no";;
9313 esac
9314fi
9315case "$enable_toolbox_glue" in
9316yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009317 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009318 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009319 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009320
9321cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009322#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009323_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009324
9325 ;;
9326*)
9327 extra_frameworks=""
9328 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009329 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009330 ;;
9331esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009332echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9333echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009334
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009335
9336case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009337 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009338 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009339 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00009340 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9341 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009342 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009343 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009344 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00009345 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9346 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009347esac
9348
Martin v. Löwis11437992002-04-12 09:54:03 +00009349echo "$as_me:$LINENO: checking for --enable-framework" >&5
9350echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009351if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009352then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009353 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009354 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009355 # in the build location.
Jack Jansenea0c3822002-08-01 21:57:49 +00009356 LDFLAGS="$LDFLAGS -Wl,-F."
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009357
Martin v. Löwis11437992002-04-12 09:54:03 +00009358cat >>confdefs.h <<\_ACEOF
9359#define WITH_NEXT_FRAMEWORK 1
9360_ACEOF
9361
9362 echo "$as_me:$LINENO: result: yes" >&5
9363echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009364else
Martin v. Löwis11437992002-04-12 09:54:03 +00009365 echo "$as_me:$LINENO: result: no" >&5
9366echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009367fi
9368
Martin v. Löwis11437992002-04-12 09:54:03 +00009369echo "$as_me:$LINENO: checking for dyld" >&5
9370echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009371case $ac_sys_system/$ac_sys_release in
9372 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009373
Martin v. Löwis11437992002-04-12 09:54:03 +00009374cat >>confdefs.h <<\_ACEOF
9375#define WITH_DYLD 1
9376_ACEOF
9377
9378 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9379echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009380 ;;
9381 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009382 echo "$as_me:$LINENO: result: no" >&5
9383echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009384 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009385esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009386
Guido van Rossum0a516c91994-09-12 10:58:40 +00009387# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009388
Michael W. Hudson54241132001-12-07 15:38:26 +00009389
9390
9391
9392
Guido van Rossum0a516c91994-09-12 10:58:40 +00009393# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009394# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009395echo "$as_me:$LINENO: checking SO" >&5
9396echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009397if test -z "$SO"
9398then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009399 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009400 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009401 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009402 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009403 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009404fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009405echo "$as_me:$LINENO: result: $SO" >&5
9406echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009407# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00009408# -- "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 +00009409# (Shared libraries in this instance are shared modules to be loaded into
9410# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009411echo "$as_me:$LINENO: checking LDSHARED" >&5
9412echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009413if test -z "$LDSHARED"
9414then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009415 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009416 AIX*)
9417 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009418 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009419 ;;
9420 BeOS*)
9421 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009422 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009423 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009424 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009425 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009426 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009427 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00009428 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009429 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009430 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +00009431 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009432 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009433 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
9434 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009435 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009436 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9437 if test "$enable_framework" ; then
9438 # Link against the framework. All externals should be defined.
9439 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9440 else
9441 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009442 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009443 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009444 Darwin/*)
9445 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9446 if test "$enable_framework" ; then
9447 # Link against the framework. All externals should be defined.
9448 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9449 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009450 # No framework, use the Python app as bundle-loader
9451 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009452 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009453 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009454 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00009455 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009456 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009457 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009458 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009459 then
9460 LDSHARED="cc -shared ${LDFLAGS}"
9461 else
9462 LDSHARED="ld -Bshareable ${LDFLAGS}"
9463 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009464 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009465 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009466 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009467 then LDSHARED='$(CC) -shared'
9468 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009469 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009470 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +00009471 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009472 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009473 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009474 *) LDSHARED="ld";;
9475 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009476fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009477echo "$as_me:$LINENO: result: $LDSHARED" >&5
9478echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009479BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009480# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009481# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009482echo "$as_me:$LINENO: checking CCSHARED" >&5
9483echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009484if test -z "$CCSHARED"
9485then
Guido van Rossum07397971997-04-29 21:49:50 +00009486 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009487 SunOS*) if test "$GCC" = yes;
9488 then CCSHARED="-fPIC";
9489 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009490 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009491 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009492 else CCSHARED="+z";
9493 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009494 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009495 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009496 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009497 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009498 if test "$GCC" = "yes"
9499 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009500 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009501 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009502 SCO_SV*)
9503 if test "$GCC" = "yes"
9504 then CCSHARED="-fPIC"
9505 else CCSHARED="-Kpic -belf"
9506 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009507 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009508 IRIX*/6*) case $CC in
9509 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009510 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009511 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009512 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009513 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009514fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009515echo "$as_me:$LINENO: result: $CCSHARED" >&5
9516echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009517# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009518# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009519echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9520echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009521if test -z "$LINKFORSHARED"
9522then
Guido van Rossum07397971997-04-29 21:49:50 +00009523 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009524 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009525 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009526 LINKFORSHARED="-Wl,-E -Wl,+s";;
9527# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009528 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009529 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009530 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009531 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009532 # -u __dummy makes the linker aware of the objc runtime
9533 # in System.framework; otherwise, __objcInit (referenced in
9534 # crt1.o) gets erroneously defined as common, which breaks dynamic
9535 # loading of any modules which reference it in System.framework.
9536 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9537 # not used by the core itself but which needs to be in the core so
9538 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00009539 # -prebind is no longer used, because it actually seems to give a
9540 # slowdown in stead of a speedup, maybe due to the large number of
9541 # dynamic loads Python does.
9542 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009543 if test "$enable_framework"
9544 then
9545 LINKFORSHARED="$LINKFORSHARED -framework Python"
9546 fi
9547 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009548 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009549 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009550 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009551 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009552 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9553 then
9554 LINKFORSHARED="-Wl,--export-dynamic"
9555 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009556 SunOS/5*) case $CC in
9557 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009558 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009559 then
9560 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009561 fi;;
9562 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009563 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009564fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009565echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9566echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009567
Michael W. Hudson54241132001-12-07 15:38:26 +00009568
Martin v. Löwis11437992002-04-12 09:54:03 +00009569echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9570echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009571if test ! "$LIBRARY" = "$LDLIBRARY"
9572then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009573 case $ac_sys_system in
9574 CYGWIN*)
9575 # Cygwin needs CCSHARED when building extension DLLs
9576 # but not when building the interpreter DLL.
9577 CFLAGSFORSHARED='';;
9578 *)
9579 CFLAGSFORSHARED='$(CCSHARED)'
9580 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009581fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009582echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9583echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009584
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009585# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9586# library (with --enable-shared).
9587# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009588# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9589# if it is not required, since it creates a dependency of the shared library
9590# to LIBS. This, in turn, means that applications linking the shared libpython
9591# don't need to link LIBS explicitly. The default should be only changed
9592# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009593
9594echo "$as_me:$LINENO: checking SHLIBS" >&5
9595echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9596case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009597 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009598 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009599esac
9600echo "$as_me:$LINENO: result: $SHLIBS" >&5
9601echo "${ECHO_T}$SHLIBS" >&6
9602
9603
Guido van Rossum627b2d71993-12-24 10:39:16 +00009604# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009605
9606echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9607echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9608if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9609 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009610else
Martin v. Löwis11437992002-04-12 09:54:03 +00009611 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009612LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009613cat >conftest.$ac_ext <<_ACEOF
9614#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009615#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009616
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009617/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009618#ifdef __cplusplus
9619extern "C"
9620#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009621/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009622 builtin and then its argument prototype would still apply. */
9623char dlopen ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009624#ifdef F77_DUMMY_MAIN
9625# ifdef __cplusplus
9626 extern "C"
9627# endif
9628 int F77_DUMMY_MAIN() { return 1; }
9629#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009630int
9631main ()
9632{
9633dlopen ();
9634 ;
9635 return 0;
9636}
9637_ACEOF
9638rm -f conftest.$ac_objext conftest$ac_exeext
9639if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9640 (eval $ac_link) 2>&5
9641 ac_status=$?
9642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9643 (exit $ac_status); } &&
9644 { ac_try='test -s conftest$ac_exeext'
9645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9646 (eval $ac_try) 2>&5
9647 ac_status=$?
9648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9649 (exit $ac_status); }; }; then
9650 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009651else
Martin v. Löwis11437992002-04-12 09:54:03 +00009652 echo "$as_me: failed program was:" >&5
9653cat conftest.$ac_ext >&5
9654ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009655fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009656rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9657LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009658fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009659echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9660echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9661if test $ac_cv_lib_dl_dlopen = yes; then
9662 cat >>confdefs.h <<_ACEOF
9663#define HAVE_LIBDL 1
9664_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009665
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009666 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009667
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009668fi
9669 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009670
9671echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9672echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9673if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9674 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009675else
Martin v. Löwis11437992002-04-12 09:54:03 +00009676 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009677LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009678cat >conftest.$ac_ext <<_ACEOF
9679#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009680#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009681
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009682/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009683#ifdef __cplusplus
9684extern "C"
9685#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009686/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009687 builtin and then its argument prototype would still apply. */
9688char shl_load ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009689#ifdef F77_DUMMY_MAIN
9690# ifdef __cplusplus
9691 extern "C"
9692# endif
9693 int F77_DUMMY_MAIN() { return 1; }
9694#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009695int
9696main ()
9697{
9698shl_load ();
9699 ;
9700 return 0;
9701}
9702_ACEOF
9703rm -f conftest.$ac_objext conftest$ac_exeext
9704if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9705 (eval $ac_link) 2>&5
9706 ac_status=$?
9707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9708 (exit $ac_status); } &&
9709 { ac_try='test -s conftest$ac_exeext'
9710 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9711 (eval $ac_try) 2>&5
9712 ac_status=$?
9713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9714 (exit $ac_status); }; }; then
9715 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009716else
Martin v. Löwis11437992002-04-12 09:54:03 +00009717 echo "$as_me: failed program was:" >&5
9718cat conftest.$ac_ext >&5
9719ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009720fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009721rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9722LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009723fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009724echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9725echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9726if test $ac_cv_lib_dld_shl_load = yes; then
9727 cat >>confdefs.h <<_ACEOF
9728#define HAVE_LIBDLD 1
9729_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009730
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009731 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009732
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009733fi
9734 # Dynamic linking for HP-UX
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009735echo "$as_me:$LINENO: checking for library containing sem_init" >&5
9736echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9737if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009738 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009739else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009740 ac_func_search_save_LIBS=$LIBS
9741ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009742cat >conftest.$ac_ext <<_ACEOF
9743#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009744#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009745
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009746/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009747#ifdef __cplusplus
9748extern "C"
9749#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009750/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009751 builtin and then its argument prototype would still apply. */
9752char sem_init ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009753#ifdef F77_DUMMY_MAIN
9754# ifdef __cplusplus
9755 extern "C"
9756# endif
9757 int F77_DUMMY_MAIN() { return 1; }
9758#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009759int
9760main ()
9761{
9762sem_init ();
9763 ;
9764 return 0;
9765}
9766_ACEOF
9767rm -f conftest.$ac_objext conftest$ac_exeext
9768if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9769 (eval $ac_link) 2>&5
9770 ac_status=$?
9771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9772 (exit $ac_status); } &&
9773 { ac_try='test -s conftest$ac_exeext'
9774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9775 (eval $ac_try) 2>&5
9776 ac_status=$?
9777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9778 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009779 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009780else
Martin v. Löwis11437992002-04-12 09:54:03 +00009781 echo "$as_me: failed program was:" >&5
9782cat conftest.$ac_ext >&5
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009783fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009784rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009785if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009786 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009787 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9788 cat >conftest.$ac_ext <<_ACEOF
9789#line $LINENO "configure"
9790#include "confdefs.h"
9791
9792/* Override any gcc2 internal prototype to avoid an error. */
9793#ifdef __cplusplus
9794extern "C"
9795#endif
9796/* We use char because int might match the return type of a gcc2
9797 builtin and then its argument prototype would still apply. */
9798char sem_init ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009799#ifdef F77_DUMMY_MAIN
9800# ifdef __cplusplus
9801 extern "C"
9802# endif
9803 int F77_DUMMY_MAIN() { return 1; }
9804#endif
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009805int
9806main ()
9807{
9808sem_init ();
9809 ;
9810 return 0;
9811}
Martin v. Löwis11437992002-04-12 09:54:03 +00009812_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009813rm -f conftest.$ac_objext conftest$ac_exeext
9814if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9815 (eval $ac_link) 2>&5
9816 ac_status=$?
9817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9818 (exit $ac_status); } &&
9819 { ac_try='test -s conftest$ac_exeext'
9820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9821 (eval $ac_try) 2>&5
9822 ac_status=$?
9823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9824 (exit $ac_status); }; }; then
9825 ac_cv_search_sem_init="-l$ac_lib"
9826break
9827else
9828 echo "$as_me: failed program was:" >&5
9829cat conftest.$ac_ext >&5
9830fi
9831rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9832 done
9833fi
9834LIBS=$ac_func_search_save_LIBS
9835fi
9836echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9837echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9838if test "$ac_cv_search_sem_init" != no; then
9839 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009840
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009841fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009842 # 'Real Time' functions on Solaris
9843 # posix4 on Solaris 2.6
9844 # pthread (first!) on Linux
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009845
9846# checks for system dependent C++ extensions support
9847case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009848 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9849echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9850 cat >conftest.$ac_ext <<_ACEOF
9851#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009852#include "confdefs.h"
9853#include "/usr/lpp/xlC/include/load.h"
Barry Warsawfe33b792003-01-07 22:42:49 +00009854#ifdef F77_DUMMY_MAIN
9855# ifdef __cplusplus
9856 extern "C"
9857# endif
9858 int F77_DUMMY_MAIN() { return 1; }
9859#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009860int
9861main ()
9862{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009863loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009864 ;
9865 return 0;
9866}
9867_ACEOF
9868rm -f conftest.$ac_objext conftest$ac_exeext
9869if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9870 (eval $ac_link) 2>&5
9871 ac_status=$?
9872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9873 (exit $ac_status); } &&
9874 { ac_try='test -s conftest$ac_exeext'
9875 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9876 (eval $ac_try) 2>&5
9877 ac_status=$?
9878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9879 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009880
Martin v. Löwis11437992002-04-12 09:54:03 +00009881cat >>confdefs.h <<\_ACEOF
9882#define AIX_GENUINE_CPLUSPLUS 1
9883_ACEOF
9884
9885 echo "$as_me:$LINENO: result: yes" >&5
9886echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009887else
Martin v. Löwis11437992002-04-12 09:54:03 +00009888 echo "$as_me: failed program was:" >&5
9889cat conftest.$ac_ext >&5
9890echo "$as_me:$LINENO: result: no" >&5
9891echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009892fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009893rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009894 *) ;;
9895esac
9896
Guido van Rossum70c7f481998-03-26 18:44:10 +00009897# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Martin v. Löwise1172582002-11-13 08:51:19 +00009898# However on SGI IRIX 4, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009899# BeOS' sockets are stashed in libnet.
9900case "$ac_sys_system" in
9901IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009902*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009903echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9904echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9905if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9906 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009907else
Martin v. Löwis11437992002-04-12 09:54:03 +00009908 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009909LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009910cat >conftest.$ac_ext <<_ACEOF
9911#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009912#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009913
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009914/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009915#ifdef __cplusplus
9916extern "C"
9917#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009918/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009919 builtin and then its argument prototype would still apply. */
9920char t_open ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009921#ifdef F77_DUMMY_MAIN
9922# ifdef __cplusplus
9923 extern "C"
9924# endif
9925 int F77_DUMMY_MAIN() { return 1; }
9926#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009927int
9928main ()
9929{
9930t_open ();
9931 ;
9932 return 0;
9933}
9934_ACEOF
9935rm -f conftest.$ac_objext conftest$ac_exeext
9936if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9937 (eval $ac_link) 2>&5
9938 ac_status=$?
9939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9940 (exit $ac_status); } &&
9941 { ac_try='test -s conftest$ac_exeext'
9942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9943 (eval $ac_try) 2>&5
9944 ac_status=$?
9945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9946 (exit $ac_status); }; }; then
9947 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009948else
Martin v. Löwis11437992002-04-12 09:54:03 +00009949 echo "$as_me: failed program was:" >&5
9950cat conftest.$ac_ext >&5
9951ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009952fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009953rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9954LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009955fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009956echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9957echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9958if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009959 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009960fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009961 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009962echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9963echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9964if test "${ac_cv_lib_socket_socket+set}" = set; then
9965 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009966else
Martin v. Löwis11437992002-04-12 09:54:03 +00009967 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009968LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009969cat >conftest.$ac_ext <<_ACEOF
9970#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009971#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009972
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009973/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009974#ifdef __cplusplus
9975extern "C"
9976#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009977/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009978 builtin and then its argument prototype would still apply. */
9979char socket ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009980#ifdef F77_DUMMY_MAIN
9981# ifdef __cplusplus
9982 extern "C"
9983# endif
9984 int F77_DUMMY_MAIN() { return 1; }
9985#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009986int
9987main ()
9988{
9989socket ();
9990 ;
9991 return 0;
9992}
9993_ACEOF
9994rm -f conftest.$ac_objext conftest$ac_exeext
9995if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9996 (eval $ac_link) 2>&5
9997 ac_status=$?
9998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9999 (exit $ac_status); } &&
10000 { ac_try='test -s conftest$ac_exeext'
10001 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10002 (eval $ac_try) 2>&5
10003 ac_status=$?
10004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10005 (exit $ac_status); }; }; then
10006 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010007else
Martin v. Löwis11437992002-04-12 09:54:03 +000010008 echo "$as_me: failed program was:" >&5
10009cat conftest.$ac_ext >&5
10010ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010011fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010012rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10013LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010014fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010015echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
10016echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
10017if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000010018 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010019fi
10020 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000010021;;
10022esac
10023case "$ac_sys_system" in
10024BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010025echo "$as_me:$LINENO: checking for socket in -lnet" >&5
10026echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
10027if test "${ac_cv_lib_net_socket+set}" = set; then
10028 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010029else
Martin v. Löwis11437992002-04-12 09:54:03 +000010030 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010031LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010032cat >conftest.$ac_ext <<_ACEOF
10033#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010034#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010035
Guido van Rossumad678af1998-10-02 14:42:15 +000010036/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010037#ifdef __cplusplus
10038extern "C"
10039#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010040/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010041 builtin and then its argument prototype would still apply. */
10042char socket ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010043#ifdef F77_DUMMY_MAIN
10044# ifdef __cplusplus
10045 extern "C"
10046# endif
10047 int F77_DUMMY_MAIN() { return 1; }
10048#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010049int
10050main ()
10051{
10052socket ();
10053 ;
10054 return 0;
10055}
10056_ACEOF
10057rm -f conftest.$ac_objext conftest$ac_exeext
10058if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10059 (eval $ac_link) 2>&5
10060 ac_status=$?
10061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10062 (exit $ac_status); } &&
10063 { ac_try='test -s conftest$ac_exeext'
10064 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10065 (eval $ac_try) 2>&5
10066 ac_status=$?
10067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10068 (exit $ac_status); }; }; then
10069 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010070else
Martin v. Löwis11437992002-04-12 09:54:03 +000010071 echo "$as_me: failed program was:" >&5
10072cat conftest.$ac_ext >&5
10073ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010074fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010075rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10076LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010077fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010078echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
10079echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
10080if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010081 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010082fi
10083 # BeOS
10084;;
10085esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000010086
Martin v. Löwis11437992002-04-12 09:54:03 +000010087echo "$as_me:$LINENO: checking for --with-libs" >&5
10088echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
10089
Guido van Rossuma68acba1996-07-31 17:36:39 +000010090# Check whether --with-libs or --without-libs was given.
10091if test "${with_libs+set}" = set; then
10092 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000010093
10094echo "$as_me:$LINENO: result: $withval" >&5
10095echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000010096LIBS="$withval $LIBS"
10097
10098else
Martin v. Löwis11437992002-04-12 09:54:03 +000010099 echo "$as_me:$LINENO: result: no" >&5
10100echo "${ECHO_T}no" >&6
10101fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000010102
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010103# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010104
10105
Martin v. Löwis11437992002-04-12 09:54:03 +000010106echo "$as_me:$LINENO: checking for --with-signal-module" >&5
10107echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
10108
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010109# Check whether --with-signal-module or --without-signal-module was given.
10110if test "${with_signal_module+set}" = set; then
10111 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010112
Martin v. Löwis11437992002-04-12 09:54:03 +000010113fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010114
10115if test -z "$with_signal_module"
10116then with_signal_module="yes"
10117fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010118echo "$as_me:$LINENO: result: $with_signal_module" >&5
10119echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010120
10121if test "${with_signal_module}" = "yes"; then
10122 USE_SIGNAL_MODULE=""
10123 SIGNAL_OBJS=""
10124else
10125 USE_SIGNAL_MODULE="#"
10126 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10127fi
10128
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010129# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010130
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010131USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010132
Martin v. Löwis11437992002-04-12 09:54:03 +000010133echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
10134echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
10135
Guido van Rossumec2f0731997-01-22 20:54:01 +000010136
10137# Check whether --with-dec-threads or --without-dec-threads was given.
10138if test "${with_dec_threads+set}" = set; then
10139 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000010140
10141echo "$as_me:$LINENO: result: $withval" >&5
10142echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000010143LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000010144if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000010145 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000010146fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010147else
Martin v. Löwis11437992002-04-12 09:54:03 +000010148 echo "$as_me:$LINENO: result: no" >&5
10149echo "${ECHO_T}no" >&6
10150fi;
10151
10152# Templates for things AC_DEFINEd more than once.
10153# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010154
10155
Martin v. Löwis11437992002-04-12 09:54:03 +000010156
10157
10158
10159
10160
10161echo "$as_me:$LINENO: checking for --with-threads" >&5
10162echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
10163
Guido van Rossumec2f0731997-01-22 20:54:01 +000010164# Check whether --with-threads or --without-threads was given.
10165if test "${with_threads+set}" = set; then
10166 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000010167
Martin v. Löwis11437992002-04-12 09:54:03 +000010168fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000010169
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010170# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010171
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010172# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010173if test "${with_thread+set}" = set; then
10174 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010175 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000010176fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010177
10178if test -z "$with_threads"
10179then with_threads="yes"
10180fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010181echo "$as_me:$LINENO: result: $with_threads" >&5
10182echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010183
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010184
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010185if test "$with_threads" = "no"
10186then
10187 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010188elif test "$ac_cv_pthread_is_default" = yes
10189then
Martin v. Löwis11437992002-04-12 09:54:03 +000010190 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010191#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010192_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010193
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010194 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010195 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010196#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010197_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010198
10199 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010200 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010201elif test "$ac_cv_kpthread" = "yes"
10202then
10203 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010204 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010205#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010206_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010207
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010208 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010209 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010210elif test "$ac_cv_kthread" = "yes"
10211then
10212 CC="$CC -Kthread"
10213 cat >>confdefs.h <<\_ACEOF
10214#define WITH_THREAD 1
10215_ACEOF
10216
10217 posix_threads=yes
10218 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010219else
10220 if test ! -z "$with_threads" -a -d "$with_threads"
10221 then LDFLAGS="$LDFLAGS -L$with_threads"
10222 fi
10223 if test ! -z "$withval" -a -d "$withval"
10224 then LDFLAGS="$LDFLAGS -L$withval"
10225 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010226
10227 # According to the POSIX spec, a pthreads implementation must
10228 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010229 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10230echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10231 cat >conftest.$ac_ext <<_ACEOF
10232#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010233#include "confdefs.h"
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010234
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010235#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010236#ifdef _POSIX_THREADS
10237yes
10238#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010239
10240_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010241if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000010242 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010243 unistd_defines_pthreads=yes
10244else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010245 unistd_defines_pthreads=no
10246fi
10247rm -f conftest*
10248
Martin v. Löwis11437992002-04-12 09:54:03 +000010249 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10250echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010251
Martin v. Löwis11437992002-04-12 09:54:03 +000010252 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010253#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010254_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010255
Martin v. Löwis11437992002-04-12 09:54:03 +000010256 if test "${ac_cv_header_cthreads_h+set}" = set; then
10257 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10258echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10259if test "${ac_cv_header_cthreads_h+set}" = set; then
10260 echo $ECHO_N "(cached) $ECHO_C" >&6
10261fi
10262echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10263echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010264else
Martin v. Löwis11437992002-04-12 09:54:03 +000010265 # Is the header compilable?
10266echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10267echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10268cat >conftest.$ac_ext <<_ACEOF
10269#line $LINENO "configure"
10270#include "confdefs.h"
10271$ac_includes_default
10272#include <cthreads.h>
10273_ACEOF
10274rm -f conftest.$ac_objext
10275if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10276 (eval $ac_compile) 2>&5
10277 ac_status=$?
10278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10279 (exit $ac_status); } &&
10280 { ac_try='test -s conftest.$ac_objext'
10281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10282 (eval $ac_try) 2>&5
10283 ac_status=$?
10284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10285 (exit $ac_status); }; }; then
10286 ac_header_compiler=yes
10287else
10288 echo "$as_me: failed program was:" >&5
10289cat conftest.$ac_ext >&5
10290ac_header_compiler=no
10291fi
10292rm -f conftest.$ac_objext conftest.$ac_ext
10293echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10294echo "${ECHO_T}$ac_header_compiler" >&6
10295
10296# Is the header present?
10297echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10298echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10299cat >conftest.$ac_ext <<_ACEOF
10300#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010301#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010302#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010303_ACEOF
10304if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10305 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10306 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010307 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010308 rm -f conftest.er1
10309 cat conftest.err >&5
10310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10311 (exit $ac_status); } >/dev/null; then
10312 if test -s conftest.err; then
10313 ac_cpp_err=$ac_c_preproc_warn_flag
10314 else
10315 ac_cpp_err=
10316 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010317else
Martin v. Löwis11437992002-04-12 09:54:03 +000010318 ac_cpp_err=yes
10319fi
10320if test -z "$ac_cpp_err"; then
10321 ac_header_preproc=yes
10322else
10323 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +000010324 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010325 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010326fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010327rm -f conftest.err conftest.$ac_ext
10328echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10329echo "${ECHO_T}$ac_header_preproc" >&6
10330
10331# So? What about this header?
10332case $ac_header_compiler:$ac_header_preproc in
10333 yes:no )
10334 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10335echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10336 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10337echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10338 no:yes )
10339 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10340echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10341 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10342echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10343 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10344echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10345esac
10346echo "$as_me:$LINENO: checking for cthreads.h" >&5
10347echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10348if test "${ac_cv_header_cthreads_h+set}" = set; then
10349 echo $ECHO_N "(cached) $ECHO_C" >&6
10350else
10351 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010352fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010353echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10354echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10355
10356fi
10357if test $ac_cv_header_cthreads_h = yes; then
10358 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010359#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010360_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010361
Martin v. Löwis11437992002-04-12 09:54:03 +000010362 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010363#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010364_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010365
Martin v. Löwis11437992002-04-12 09:54:03 +000010366
10367cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010368#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010369_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010370
10371 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010372 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010373else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010374
Martin v. Löwis11437992002-04-12 09:54:03 +000010375 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10376 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10377echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10378if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10379 echo $ECHO_N "(cached) $ECHO_C" >&6
10380fi
10381echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10382echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010383else
Martin v. Löwis11437992002-04-12 09:54:03 +000010384 # Is the header compilable?
10385echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10386echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10387cat >conftest.$ac_ext <<_ACEOF
10388#line $LINENO "configure"
10389#include "confdefs.h"
10390$ac_includes_default
10391#include <mach/cthreads.h>
10392_ACEOF
10393rm -f conftest.$ac_objext
10394if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10395 (eval $ac_compile) 2>&5
10396 ac_status=$?
10397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10398 (exit $ac_status); } &&
10399 { ac_try='test -s conftest.$ac_objext'
10400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10401 (eval $ac_try) 2>&5
10402 ac_status=$?
10403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10404 (exit $ac_status); }; }; then
10405 ac_header_compiler=yes
10406else
10407 echo "$as_me: failed program was:" >&5
10408cat conftest.$ac_ext >&5
10409ac_header_compiler=no
10410fi
10411rm -f conftest.$ac_objext conftest.$ac_ext
10412echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10413echo "${ECHO_T}$ac_header_compiler" >&6
10414
10415# Is the header present?
10416echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10417echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10418cat >conftest.$ac_ext <<_ACEOF
10419#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010420#include "confdefs.h"
10421#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010422_ACEOF
10423if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10424 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10425 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010426 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010427 rm -f conftest.er1
10428 cat conftest.err >&5
10429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10430 (exit $ac_status); } >/dev/null; then
10431 if test -s conftest.err; then
10432 ac_cpp_err=$ac_c_preproc_warn_flag
10433 else
10434 ac_cpp_err=
10435 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010436else
Martin v. Löwis11437992002-04-12 09:54:03 +000010437 ac_cpp_err=yes
10438fi
10439if test -z "$ac_cpp_err"; then
10440 ac_header_preproc=yes
10441else
10442 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010443 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010444 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010445fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010446rm -f conftest.err conftest.$ac_ext
10447echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10448echo "${ECHO_T}$ac_header_preproc" >&6
10449
10450# So? What about this header?
10451case $ac_header_compiler:$ac_header_preproc in
10452 yes:no )
10453 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10454echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10455 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10456echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10457 no:yes )
10458 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10459echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10460 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10461echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10462 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10463echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10464esac
10465echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10466echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10467if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10468 echo $ECHO_N "(cached) $ECHO_C" >&6
10469else
10470 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010471fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010472echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10473echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10474
10475fi
10476if test $ac_cv_header_mach_cthreads_h = yes; then
10477 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010478#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010479_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010480
Martin v. Löwis11437992002-04-12 09:54:03 +000010481 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010482#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010483_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010484
Martin v. Löwis11437992002-04-12 09:54:03 +000010485
10486cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010487#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010488_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010489
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010490 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010491else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010492
Martin v. Löwis11437992002-04-12 09:54:03 +000010493 echo "$as_me:$LINENO: checking for --with-pth" >&5
10494echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10495
10496# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010497if test "${with_pth+set}" = set; then
10498 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010499 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010500echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010501 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010502#define WITH_THREAD 1
10503_ACEOF
10504
10505
10506cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010507#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010508_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010509
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010510 LIBS="-lpth $LIBS"
10511 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010512else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010513 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010514echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010515
10516 # Just looking for pthread_create in libpthread is not enough:
10517 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10518 # So we really have to include pthread.h, and then link.
10519 _libs=$LIBS
10520 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010521 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10522echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10523 cat >conftest.$ac_ext <<_ACEOF
10524#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010525#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010526#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010527
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010528void * start_routine (void *arg) { exit (0); }
Barry Warsawfe33b792003-01-07 22:42:49 +000010529#ifdef F77_DUMMY_MAIN
10530# ifdef __cplusplus
10531 extern "C"
10532# endif
10533 int F77_DUMMY_MAIN() { return 1; }
10534#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010535int
10536main ()
10537{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010538
10539pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010540 ;
10541 return 0;
10542}
10543_ACEOF
10544rm -f conftest.$ac_objext conftest$ac_exeext
10545if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10546 (eval $ac_link) 2>&5
10547 ac_status=$?
10548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10549 (exit $ac_status); } &&
10550 { ac_try='test -s conftest$ac_exeext'
10551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10552 (eval $ac_try) 2>&5
10553 ac_status=$?
10554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10555 (exit $ac_status); }; }; then
10556
10557 echo "$as_me:$LINENO: result: yes" >&5
10558echo "${ECHO_T}yes" >&6
10559 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010560#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010561_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010562
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010563 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010564 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010565else
Martin v. Löwis11437992002-04-12 09:54:03 +000010566 echo "$as_me: failed program was:" >&5
10567cat conftest.$ac_ext >&5
10568
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010569 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010570 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10571echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10572if test "${ac_cv_func_pthread_detach+set}" = set; then
10573 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010574else
Martin v. Löwis11437992002-04-12 09:54:03 +000010575 cat >conftest.$ac_ext <<_ACEOF
10576#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010577#include "confdefs.h"
10578/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010579 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010580#include <assert.h>
10581/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010582#ifdef __cplusplus
10583extern "C"
10584#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010585/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010586 builtin and then its argument prototype would still apply. */
10587char pthread_detach ();
10588char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010589
Barry Warsawfe33b792003-01-07 22:42:49 +000010590#ifdef F77_DUMMY_MAIN
10591# ifdef __cplusplus
10592 extern "C"
10593# endif
10594 int F77_DUMMY_MAIN() { return 1; }
10595#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010596int
10597main ()
10598{
Guido van Rossumad678af1998-10-02 14:42:15 +000010599/* The GNU C library defines this for functions which it implements
10600 to always fail with ENOSYS. Some functions are actually named
10601 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010602#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010603choke me
10604#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010605f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +000010606#endif
10607
Martin v. Löwis11437992002-04-12 09:54:03 +000010608 ;
10609 return 0;
10610}
10611_ACEOF
10612rm -f conftest.$ac_objext conftest$ac_exeext
10613if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10614 (eval $ac_link) 2>&5
10615 ac_status=$?
10616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10617 (exit $ac_status); } &&
10618 { ac_try='test -s conftest$ac_exeext'
10619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10620 (eval $ac_try) 2>&5
10621 ac_status=$?
10622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10623 (exit $ac_status); }; }; then
10624 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010625else
Martin v. Löwis11437992002-04-12 09:54:03 +000010626 echo "$as_me: failed program was:" >&5
10627cat conftest.$ac_ext >&5
10628ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010629fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010630rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010631fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010632echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10633echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10634if test $ac_cv_func_pthread_detach = yes; then
10635 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010636#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010637_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010638
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010639 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010640 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010641else
Guido van Rossumad678af1998-10-02 14:42:15 +000010642
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010643 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10644 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10645echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10646if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10647 echo $ECHO_N "(cached) $ECHO_C" >&6
10648fi
10649echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10650echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10651else
10652 # Is the header compilable?
10653echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10654echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10655cat >conftest.$ac_ext <<_ACEOF
10656#line $LINENO "configure"
10657#include "confdefs.h"
10658$ac_includes_default
10659#include <atheos/threads.h>
10660_ACEOF
10661rm -f conftest.$ac_objext
10662if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10663 (eval $ac_compile) 2>&5
10664 ac_status=$?
10665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10666 (exit $ac_status); } &&
10667 { ac_try='test -s conftest.$ac_objext'
10668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10669 (eval $ac_try) 2>&5
10670 ac_status=$?
10671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10672 (exit $ac_status); }; }; then
10673 ac_header_compiler=yes
10674else
10675 echo "$as_me: failed program was:" >&5
10676cat conftest.$ac_ext >&5
10677ac_header_compiler=no
10678fi
10679rm -f conftest.$ac_objext conftest.$ac_ext
10680echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10681echo "${ECHO_T}$ac_header_compiler" >&6
10682
10683# Is the header present?
10684echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10685echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10686cat >conftest.$ac_ext <<_ACEOF
10687#line $LINENO "configure"
10688#include "confdefs.h"
10689#include <atheos/threads.h>
10690_ACEOF
10691if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10692 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10693 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010694 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010695 rm -f conftest.er1
10696 cat conftest.err >&5
10697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10698 (exit $ac_status); } >/dev/null; then
10699 if test -s conftest.err; then
10700 ac_cpp_err=$ac_c_preproc_warn_flag
10701 else
10702 ac_cpp_err=
10703 fi
10704else
10705 ac_cpp_err=yes
10706fi
10707if test -z "$ac_cpp_err"; then
10708 ac_header_preproc=yes
10709else
10710 echo "$as_me: failed program was:" >&5
10711 cat conftest.$ac_ext >&5
10712 ac_header_preproc=no
10713fi
10714rm -f conftest.err conftest.$ac_ext
10715echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10716echo "${ECHO_T}$ac_header_preproc" >&6
10717
10718# So? What about this header?
10719case $ac_header_compiler:$ac_header_preproc in
10720 yes:no )
10721 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10722echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10723 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10724echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10725 no:yes )
10726 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10727echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10728 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10729echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10730 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10731echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10732esac
10733echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10734echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10735if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10736 echo $ECHO_N "(cached) $ECHO_C" >&6
10737else
10738 ac_cv_header_atheos_threads_h=$ac_header_preproc
10739fi
10740echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10741echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10742
10743fi
10744if test $ac_cv_header_atheos_threads_h = yes; then
10745 cat >>confdefs.h <<\_ACEOF
10746#define WITH_THREAD 1
10747_ACEOF
10748
10749
10750cat >>confdefs.h <<\_ACEOF
10751#define ATHEOS_THREADS 1
10752_ACEOF
10753
10754 THREADOBJ="Python/thread.o"
10755else
10756
Martin v. Löwis11437992002-04-12 09:54:03 +000010757 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10758 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10759echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10760if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10761 echo $ECHO_N "(cached) $ECHO_C" >&6
10762fi
10763echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10764echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010765else
Martin v. Löwis11437992002-04-12 09:54:03 +000010766 # Is the header compilable?
10767echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10768echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10769cat >conftest.$ac_ext <<_ACEOF
10770#line $LINENO "configure"
10771#include "confdefs.h"
10772$ac_includes_default
10773#include <kernel/OS.h>
10774_ACEOF
10775rm -f conftest.$ac_objext
10776if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10777 (eval $ac_compile) 2>&5
10778 ac_status=$?
10779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10780 (exit $ac_status); } &&
10781 { ac_try='test -s conftest.$ac_objext'
10782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10783 (eval $ac_try) 2>&5
10784 ac_status=$?
10785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10786 (exit $ac_status); }; }; then
10787 ac_header_compiler=yes
10788else
10789 echo "$as_me: failed program was:" >&5
10790cat conftest.$ac_ext >&5
10791ac_header_compiler=no
10792fi
10793rm -f conftest.$ac_objext conftest.$ac_ext
10794echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10795echo "${ECHO_T}$ac_header_compiler" >&6
10796
10797# Is the header present?
10798echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10799echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10800cat >conftest.$ac_ext <<_ACEOF
10801#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010802#include "confdefs.h"
10803#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010804_ACEOF
10805if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10806 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10807 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010808 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010809 rm -f conftest.er1
10810 cat conftest.err >&5
10811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10812 (exit $ac_status); } >/dev/null; then
10813 if test -s conftest.err; then
10814 ac_cpp_err=$ac_c_preproc_warn_flag
10815 else
10816 ac_cpp_err=
10817 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010818else
Martin v. Löwis11437992002-04-12 09:54:03 +000010819 ac_cpp_err=yes
10820fi
10821if test -z "$ac_cpp_err"; then
10822 ac_header_preproc=yes
10823else
10824 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010825 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010826 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010827fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010828rm -f conftest.err conftest.$ac_ext
10829echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10830echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010831
Martin v. Löwis11437992002-04-12 09:54:03 +000010832# So? What about this header?
10833case $ac_header_compiler:$ac_header_preproc in
10834 yes:no )
10835 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10836echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10837 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10838echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10839 no:yes )
10840 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10841echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10842 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10843echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10844 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10845echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10846esac
10847echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10848echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10849if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10850 echo $ECHO_N "(cached) $ECHO_C" >&6
10851else
10852 ac_cv_header_kernel_OS_h=$ac_header_preproc
10853fi
10854echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10855echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10856
10857fi
10858if test $ac_cv_header_kernel_OS_h = yes; then
10859 cat >>confdefs.h <<\_ACEOF
10860#define WITH_THREAD 1
10861_ACEOF
10862
10863
10864cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010865#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010866_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010867
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010868 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010869else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010870
Martin v. Löwis11437992002-04-12 09:54:03 +000010871 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10872echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10873if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10874 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010875else
Martin v. Löwis11437992002-04-12 09:54:03 +000010876 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010877LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010878cat >conftest.$ac_ext <<_ACEOF
10879#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010880#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010881
Greg Steinadf63d62000-07-05 10:38:09 +000010882/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010883#ifdef __cplusplus
10884extern "C"
10885#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010886/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010887 builtin and then its argument prototype would still apply. */
10888char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010889#ifdef F77_DUMMY_MAIN
10890# ifdef __cplusplus
10891 extern "C"
10892# endif
10893 int F77_DUMMY_MAIN() { return 1; }
10894#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010895int
10896main ()
10897{
10898pthread_create ();
10899 ;
10900 return 0;
10901}
10902_ACEOF
10903rm -f conftest.$ac_objext conftest$ac_exeext
10904if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10905 (eval $ac_link) 2>&5
10906 ac_status=$?
10907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10908 (exit $ac_status); } &&
10909 { ac_try='test -s conftest$ac_exeext'
10910 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10911 (eval $ac_try) 2>&5
10912 ac_status=$?
10913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10914 (exit $ac_status); }; }; then
10915 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010916else
Martin v. Löwis11437992002-04-12 09:54:03 +000010917 echo "$as_me: failed program was:" >&5
10918cat conftest.$ac_ext >&5
10919ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010920fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010921rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10922LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010923fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010924echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10925echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10926if test $ac_cv_lib_pthreads_pthread_create = yes; then
10927 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010928#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010929_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010930
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010931 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010932 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010933 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010934else
Greg Steinadf63d62000-07-05 10:38:09 +000010935
Martin v. Löwis11437992002-04-12 09:54:03 +000010936 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10937echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10938if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10939 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010940else
Martin v. Löwis11437992002-04-12 09:54:03 +000010941 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010942LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010943cat >conftest.$ac_ext <<_ACEOF
10944#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010945#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010946
Guido van Rossum49545951997-12-02 19:28:29 +000010947/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010948#ifdef __cplusplus
10949extern "C"
10950#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010951/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010952 builtin and then its argument prototype would still apply. */
10953char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010954#ifdef F77_DUMMY_MAIN
10955# ifdef __cplusplus
10956 extern "C"
10957# endif
10958 int F77_DUMMY_MAIN() { return 1; }
10959#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010960int
10961main ()
10962{
10963pthread_create ();
10964 ;
10965 return 0;
10966}
10967_ACEOF
10968rm -f conftest.$ac_objext conftest$ac_exeext
10969if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10970 (eval $ac_link) 2>&5
10971 ac_status=$?
10972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10973 (exit $ac_status); } &&
10974 { ac_try='test -s conftest$ac_exeext'
10975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10976 (eval $ac_try) 2>&5
10977 ac_status=$?
10978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10979 (exit $ac_status); }; }; then
10980 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010981else
Martin v. Löwis11437992002-04-12 09:54:03 +000010982 echo "$as_me: failed program was:" >&5
10983cat conftest.$ac_ext >&5
10984ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010985fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010986rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10987LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010988fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010989echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10990echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10991if test $ac_cv_lib_c_r_pthread_create = yes; then
10992 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010993#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010994_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010995
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010996 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010997 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010998 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010999else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011000
Martin v. Löwis11437992002-04-12 09:54:03 +000011001 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
11002echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
11003if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
11004 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011005else
Martin v. Löwis11437992002-04-12 09:54:03 +000011006 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011007LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011008cat >conftest.$ac_ext <<_ACEOF
11009#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011010#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011011
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011012/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011013#ifdef __cplusplus
11014extern "C"
11015#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011016/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011017 builtin and then its argument prototype would still apply. */
11018char __d6_pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011019#ifdef F77_DUMMY_MAIN
11020# ifdef __cplusplus
11021 extern "C"
11022# endif
11023 int F77_DUMMY_MAIN() { return 1; }
11024#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011025int
11026main ()
11027{
11028__d6_pthread_create ();
11029 ;
11030 return 0;
11031}
11032_ACEOF
11033rm -f conftest.$ac_objext conftest$ac_exeext
11034if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11035 (eval $ac_link) 2>&5
11036 ac_status=$?
11037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11038 (exit $ac_status); } &&
11039 { ac_try='test -s conftest$ac_exeext'
11040 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11041 (eval $ac_try) 2>&5
11042 ac_status=$?
11043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11044 (exit $ac_status); }; }; then
11045 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011046else
Martin v. Löwis11437992002-04-12 09:54:03 +000011047 echo "$as_me: failed program was:" >&5
11048cat conftest.$ac_ext >&5
11049ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011050fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011051rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11052LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011053fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011054echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
11055echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
11056if test $ac_cv_lib_thread___d6_pthread_create = yes; then
11057 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011058#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011059_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011060
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011061 echo Systems with __d6_pthread_create are not supported anymore.
11062 echo See README
11063 exit 1
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011064 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011065 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011066 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000011067else
Guido van Rossum49545951997-12-02 19:28:29 +000011068
Martin v. Löwis11437992002-04-12 09:54:03 +000011069 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
11070echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
11071if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
11072 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011073else
Martin v. Löwis11437992002-04-12 09:54:03 +000011074 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011075LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011076cat >conftest.$ac_ext <<_ACEOF
11077#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011078#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011079
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011080/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011081#ifdef __cplusplus
11082extern "C"
11083#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011084/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011085 builtin and then its argument prototype would still apply. */
11086char __pthread_create_system ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011087#ifdef F77_DUMMY_MAIN
11088# ifdef __cplusplus
11089 extern "C"
11090# endif
11091 int F77_DUMMY_MAIN() { return 1; }
11092#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011093int
11094main ()
11095{
11096__pthread_create_system ();
11097 ;
11098 return 0;
11099}
11100_ACEOF
11101rm -f conftest.$ac_objext conftest$ac_exeext
11102if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11103 (eval $ac_link) 2>&5
11104 ac_status=$?
11105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11106 (exit $ac_status); } &&
11107 { ac_try='test -s conftest$ac_exeext'
11108 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11109 (eval $ac_try) 2>&5
11110 ac_status=$?
11111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11112 (exit $ac_status); }; }; then
11113 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011114else
Martin v. Löwis11437992002-04-12 09:54:03 +000011115 echo "$as_me: failed program was:" >&5
11116cat conftest.$ac_ext >&5
11117ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011118fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011119rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11120LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011121fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011122echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11123echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
11124if test $ac_cv_lib_pthread___pthread_create_system = yes; then
11125 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011126#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011127_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011128
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011129 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011130 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011131 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011132else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011133
Martin v. Löwis11437992002-04-12 09:54:03 +000011134 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
11135echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
11136if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
11137 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000011138else
Martin v. Löwis11437992002-04-12 09:54:03 +000011139 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011140LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011141cat >conftest.$ac_ext <<_ACEOF
11142#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011143#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011144
Guido van Rossumb93a8621998-05-07 13:27:32 +000011145/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011146#ifdef __cplusplus
11147extern "C"
11148#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000011149/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011150 builtin and then its argument prototype would still apply. */
11151char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011152#ifdef F77_DUMMY_MAIN
11153# ifdef __cplusplus
11154 extern "C"
11155# endif
11156 int F77_DUMMY_MAIN() { return 1; }
11157#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011158int
11159main ()
11160{
11161pthread_create ();
11162 ;
11163 return 0;
11164}
11165_ACEOF
11166rm -f conftest.$ac_objext conftest$ac_exeext
11167if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11168 (eval $ac_link) 2>&5
11169 ac_status=$?
11170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11171 (exit $ac_status); } &&
11172 { ac_try='test -s conftest$ac_exeext'
11173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11174 (eval $ac_try) 2>&5
11175 ac_status=$?
11176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11177 (exit $ac_status); }; }; then
11178 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000011179else
Martin v. Löwis11437992002-04-12 09:54:03 +000011180 echo "$as_me: failed program was:" >&5
11181cat conftest.$ac_ext >&5
11182ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011183fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011184rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11185LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011186fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011187echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
11188echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
11189if test $ac_cv_lib_cma_pthread_create = yes; then
11190 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011191#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011192_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011193
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011194 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011195 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011196 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011197else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011198
Martin v. Löwis130fb172001-07-19 11:00:41 +000011199 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000011200fi
11201
Guido van Rossum627b2d71993-12-24 10:39:16 +000011202
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011203fi
11204
Guido van Rossum0be3e491997-05-22 20:33:33 +000011205fi
11206
Guido van Rossum49545951997-12-02 19:28:29 +000011207fi
11208
Guido van Rossumb93a8621998-05-07 13:27:32 +000011209fi
11210
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011211fi
11212
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011213
Michael W. Hudson54241132001-12-07 15:38:26 +000011214fi
11215
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011216
11217fi
11218
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011219fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011220rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11221fi;
11222fi
11223
11224
11225fi
11226
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011227
Michael W. Hudson54241132001-12-07 15:38:26 +000011228
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011229 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011230 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011231
11232cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011233#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011234_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011235
11236 fi
11237
Martin v. Löwisdfc33fd2003-01-21 10:14:41 +000011238 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11239 case $ac_sys_system/$ac_sys_release in
11240 SunOS/5.8)
11241cat >>confdefs.h <<\_ACEOF
11242#define HAVE_BROKEN_POSIX_SEMAPHORES 1
11243_ACEOF
11244;;
11245 esac
11246
Martin v. Löwis11437992002-04-12 09:54:03 +000011247 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11248echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11249 if test "${ac_cv_pthread_system_supported+set}" = set; then
11250 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011251else
11252 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011253 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011254else
Martin v. Löwis11437992002-04-12 09:54:03 +000011255 cat >conftest.$ac_ext <<_ACEOF
11256#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011257#include "confdefs.h"
11258#include <pthread.h>
11259 void *foo(void *parm) {
11260 return NULL;
11261 }
11262 main() {
11263 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011264 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011265 if (pthread_attr_init(&attr)) exit(-1);
11266 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011267 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011268 exit(0);
11269 }
Martin v. Löwis11437992002-04-12 09:54:03 +000011270_ACEOF
11271rm -f conftest$ac_exeext
11272if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11273 (eval $ac_link) 2>&5
11274 ac_status=$?
11275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11276 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11278 (eval $ac_try) 2>&5
11279 ac_status=$?
11280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11281 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011282 ac_cv_pthread_system_supported=yes
11283else
Martin v. Löwis11437992002-04-12 09:54:03 +000011284 echo "$as_me: program exited with status $ac_status" >&5
11285echo "$as_me: failed program was:" >&5
11286cat conftest.$ac_ext >&5
11287( exit $ac_status )
11288ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011289fi
Barry Warsawfe33b792003-01-07 22:42:49 +000011290rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011291fi
11292
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011293fi
11294
Martin v. Löwis11437992002-04-12 09:54:03 +000011295 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11296echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011297 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011298
11299cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011300#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011301_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011302
11303 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011304
11305for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011306do
Martin v. Löwis11437992002-04-12 09:54:03 +000011307as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11308echo "$as_me:$LINENO: checking for $ac_func" >&5
11309echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11310if eval "test \"\${$as_ac_var+set}\" = set"; then
11311 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011312else
Martin v. Löwis11437992002-04-12 09:54:03 +000011313 cat >conftest.$ac_ext <<_ACEOF
11314#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011315#include "confdefs.h"
11316/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011317 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011318#include <assert.h>
11319/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011320#ifdef __cplusplus
11321extern "C"
11322#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011323/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011324 builtin and then its argument prototype would still apply. */
11325char $ac_func ();
11326char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011327
Barry Warsawfe33b792003-01-07 22:42:49 +000011328#ifdef F77_DUMMY_MAIN
11329# ifdef __cplusplus
11330 extern "C"
11331# endif
11332 int F77_DUMMY_MAIN() { return 1; }
11333#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011334int
11335main ()
11336{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011337/* The GNU C library defines this for functions which it implements
11338 to always fail with ENOSYS. Some functions are actually named
11339 something starting with __ and the normal name is an alias. */
11340#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11341choke me
11342#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011343f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011344#endif
11345
Martin v. Löwis11437992002-04-12 09:54:03 +000011346 ;
11347 return 0;
11348}
11349_ACEOF
11350rm -f conftest.$ac_objext conftest$ac_exeext
11351if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11352 (eval $ac_link) 2>&5
11353 ac_status=$?
11354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11355 (exit $ac_status); } &&
11356 { ac_try='test -s conftest$ac_exeext'
11357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11358 (eval $ac_try) 2>&5
11359 ac_status=$?
11360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11361 (exit $ac_status); }; }; then
11362 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011363else
Martin v. Löwis11437992002-04-12 09:54:03 +000011364 echo "$as_me: failed program was:" >&5
11365cat conftest.$ac_ext >&5
11366eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011367fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011368rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011369fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011370echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11371echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11372if test `eval echo '${'$as_ac_var'}'` = yes; then
11373 cat >>confdefs.h <<_ACEOF
11374#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11375_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011376
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011377fi
11378done
11379
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011380 fi
11381
Martin v. Löwis11437992002-04-12 09:54:03 +000011382 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11383echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11384if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11385 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011386else
Martin v. Löwis11437992002-04-12 09:54:03 +000011387 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011388LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011389cat >conftest.$ac_ext <<_ACEOF
11390#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011391#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011392
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011393/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011394#ifdef __cplusplus
11395extern "C"
11396#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011397/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011398 builtin and then its argument prototype would still apply. */
11399char usconfig ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011400#ifdef F77_DUMMY_MAIN
11401# ifdef __cplusplus
11402 extern "C"
11403# endif
11404 int F77_DUMMY_MAIN() { return 1; }
11405#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011406int
11407main ()
11408{
11409usconfig ();
11410 ;
11411 return 0;
11412}
11413_ACEOF
11414rm -f conftest.$ac_objext conftest$ac_exeext
11415if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11416 (eval $ac_link) 2>&5
11417 ac_status=$?
11418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11419 (exit $ac_status); } &&
11420 { ac_try='test -s conftest$ac_exeext'
11421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11422 (eval $ac_try) 2>&5
11423 ac_status=$?
11424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11425 (exit $ac_status); }; }; then
11426 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011427else
Martin v. Löwis11437992002-04-12 09:54:03 +000011428 echo "$as_me: failed program was:" >&5
11429cat conftest.$ac_ext >&5
11430ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011431fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011432rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11433LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011434fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011435echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11436echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11437if test $ac_cv_lib_mpc_usconfig = yes; then
11438 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011439#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011440_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011441
Martin v. Löwis130fb172001-07-19 11:00:41 +000011442 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011443 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011444 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011445fi
11446
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011447
Neal Norwitza978ab02002-11-02 16:58:05 +000011448 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011449 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11450echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11451if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11452 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011453else
Martin v. Löwis11437992002-04-12 09:54:03 +000011454 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011455LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011456cat >conftest.$ac_ext <<_ACEOF
11457#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011458#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011459
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011460/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011461#ifdef __cplusplus
11462extern "C"
11463#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011464/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011465 builtin and then its argument prototype would still apply. */
11466char thr_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011467#ifdef F77_DUMMY_MAIN
11468# ifdef __cplusplus
11469 extern "C"
11470# endif
11471 int F77_DUMMY_MAIN() { return 1; }
11472#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011473int
11474main ()
11475{
11476thr_create ();
11477 ;
11478 return 0;
11479}
11480_ACEOF
11481rm -f conftest.$ac_objext conftest$ac_exeext
11482if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11483 (eval $ac_link) 2>&5
11484 ac_status=$?
11485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11486 (exit $ac_status); } &&
11487 { ac_try='test -s conftest$ac_exeext'
11488 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11489 (eval $ac_try) 2>&5
11490 ac_status=$?
11491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11492 (exit $ac_status); }; }; then
11493 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011494else
Martin v. Löwis11437992002-04-12 09:54:03 +000011495 echo "$as_me: failed program was:" >&5
11496cat conftest.$ac_ext >&5
11497ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011498fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011499rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11500LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011501fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011502echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11503echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11504if test $ac_cv_lib_thread_thr_create = yes; then
11505 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011506#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011507_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011508
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011509 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011510 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011511 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011512fi
11513
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011514 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011515
Martin v. Löwis130fb172001-07-19 11:00:41 +000011516 if test "$USE_THREAD_MODULE" != "#"
11517 then
11518 # If the above checks didn't disable threads, (at least) OSF1
11519 # needs this '-threads' argument during linking.
11520 case $ac_sys_system in
11521 OSF1) LDLAST=-threads;;
11522 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011523 fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011524
11525 if test "$posix_threads" = yes -a \
11526 "$ac_sys_system" = "SunOS" -a \
11527 "$ac_sys_release" = "5.6"; then
11528
11529cat >>confdefs.h <<\_ACEOF
11530#define HAVE_PTHREAD_DESTRUCTOR 1
11531_ACEOF
11532
11533 fi
11534
Guido van Rossum627b2d71993-12-24 10:39:16 +000011535fi
11536
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011537# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011538
11539
11540echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11541echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011542# Check whether --enable-ipv6 or --disable-ipv6 was given.
11543if test "${enable_ipv6+set}" = set; then
11544 enableval="$enable_ipv6"
11545 case "$enableval" in
11546 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011547 echo "$as_me:$LINENO: result: no" >&5
11548echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011549 ipv6=no
11550 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011551 *) echo "$as_me:$LINENO: result: yes" >&5
11552echo "${ECHO_T}yes" >&6
11553 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011554#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011555_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011556
11557 ipv6=yes
11558 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011559 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011560else
Martin v. Löwis11437992002-04-12 09:54:03 +000011561
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011562 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011563 echo "$as_me:$LINENO: result: no" >&5
11564echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011565 ipv6=no
11566
11567else
Martin v. Löwis11437992002-04-12 09:54:03 +000011568 cat >conftest.$ac_ext <<_ACEOF
11569#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011570#include "confdefs.h"
11571 /* AF_INET6 available check */
11572#include <sys/types.h>
11573#include <sys/socket.h>
11574main()
11575{
11576 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11577 exit(1);
11578 else
11579 exit(0);
11580}
11581
Martin v. Löwis11437992002-04-12 09:54:03 +000011582_ACEOF
11583rm -f conftest$ac_exeext
11584if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11585 (eval $ac_link) 2>&5
11586 ac_status=$?
11587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11588 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11590 (eval $ac_try) 2>&5
11591 ac_status=$?
11592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11593 (exit $ac_status); }; }; then
11594 echo "$as_me:$LINENO: result: yes" >&5
11595echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011596 ipv6=yes
11597else
Martin v. Löwis11437992002-04-12 09:54:03 +000011598 echo "$as_me: program exited with status $ac_status" >&5
11599echo "$as_me: failed program was:" >&5
11600cat conftest.$ac_ext >&5
11601( exit $ac_status )
11602echo "$as_me:$LINENO: result: no" >&5
11603echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011604 ipv6=no
11605fi
Barry Warsawfe33b792003-01-07 22:42:49 +000011606rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011607fi
11608
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011609if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011610 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11611echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11612 cat >conftest.$ac_ext <<_ACEOF
11613#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011614#include "confdefs.h"
11615#include <sys/types.h>
11616#include <netinet/in.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000011617#ifdef F77_DUMMY_MAIN
11618# ifdef __cplusplus
11619 extern "C"
11620# endif
11621 int F77_DUMMY_MAIN() { return 1; }
11622#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011623int
11624main ()
11625{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011626struct sockaddr_in6 x;
11627x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011628 ;
11629 return 0;
11630}
11631_ACEOF
11632rm -f conftest.$ac_objext
11633if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11634 (eval $ac_compile) 2>&5
11635 ac_status=$?
11636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11637 (exit $ac_status); } &&
11638 { ac_try='test -s conftest.$ac_objext'
11639 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11640 (eval $ac_try) 2>&5
11641 ac_status=$?
11642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11643 (exit $ac_status); }; }; then
11644 echo "$as_me:$LINENO: result: yes" >&5
11645echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011646 ipv6=yes
11647else
Martin v. Löwis11437992002-04-12 09:54:03 +000011648 echo "$as_me: failed program was:" >&5
11649cat conftest.$ac_ext >&5
11650echo "$as_me:$LINENO: result: no" >&5
11651echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011652 ipv6=no
11653fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011654rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011655fi
11656
11657if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011658 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011659#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011660_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011661
11662fi
11663
Martin v. Löwis11437992002-04-12 09:54:03 +000011664fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011665
11666ipv6type=unknown
11667ipv6lib=none
11668ipv6trylibc=no
11669
11670if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011671 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11672echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011673 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11674 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011675 case $i in
11676 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011677 cat >conftest.$ac_ext <<_ACEOF
11678#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011679#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011680
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011681#include <netinet/in.h>
11682#ifdef IPV6_INRIA_VERSION
11683yes
11684#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011685_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011686if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011687 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011688 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011689fi
11690rm -f conftest*
11691
11692 ;;
11693 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011694 cat >conftest.$ac_ext <<_ACEOF
11695#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011696#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011697
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011698#include <netinet/in.h>
11699#ifdef __KAME__
11700yes
11701#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011702_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011703if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011704 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011705 ipv6type=$i;
11706 ipv6lib=inet6
11707 ipv6libdir=/usr/local/v6/lib
11708 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011709fi
11710rm -f conftest*
11711
11712 ;;
11713 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011714 cat >conftest.$ac_ext <<_ACEOF
11715#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011716#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011717
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011718#include <features.h>
11719#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11720yes
11721#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011722_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011723if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011724 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011725 ipv6type=$i;
11726 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011727fi
11728rm -f conftest*
11729
11730 ;;
11731 linux-inet6)
11732 if test -d /usr/inet6; then
11733 ipv6type=$i
11734 ipv6lib=inet6
11735 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011736 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011737 fi
11738 ;;
11739 solaris)
11740 if test -f /etc/netconfig; then
11741 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11742 ipv6type=$i
11743 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011744 fi
11745 fi
11746 ;;
11747 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011748 cat >conftest.$ac_ext <<_ACEOF
11749#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011750#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011751
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011752#include <sys/param.h>
11753#ifdef _TOSHIBA_INET6
11754yes
11755#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011756_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011757if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011758 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011759 ipv6type=$i;
11760 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011761 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011762fi
11763rm -f conftest*
11764
11765 ;;
11766 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011767 cat >conftest.$ac_ext <<_ACEOF
11768#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011769#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011770
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011771#include </usr/local/v6/include/sys/v6config.h>
11772#ifdef __V6D__
11773yes
11774#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011775_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011776if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011777 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011778 ipv6type=$i;
11779 ipv6lib=v6;
11780 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011781 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011782fi
11783rm -f conftest*
11784
11785 ;;
11786 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011787 cat >conftest.$ac_ext <<_ACEOF
11788#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011789#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011790
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011791#include <sys/param.h>
11792#ifdef _ZETA_MINAMI_INET6
11793yes
11794#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011795_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011796if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011797 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011798 ipv6type=$i;
11799 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011800 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011801fi
11802rm -f conftest*
11803
11804 ;;
11805 esac
11806 if test "$ipv6type" != "unknown"; then
11807 break
11808 fi
11809 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011810 echo "$as_me:$LINENO: result: $ipv6type" >&5
11811echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011812fi
11813
11814if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11815 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11816 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11817 echo "using lib$ipv6lib"
11818 else
11819 if test $ipv6trylibc = "yes"; then
11820 echo "using libc"
11821 else
11822 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11823 echo "You need to fetch lib$ipv6lib.a from appropriate"
11824 echo 'ipv6 kit and compile beforehand.'
11825 exit 1
11826 fi
11827 fi
11828fi
11829
Jack Jansen7b8c7542002-04-14 20:12:41 +000011830# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000011831echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
11832echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000011833
11834# Check whether --with-universal-newlines or --without-universal-newlines was given.
11835if test "${with_universal_newlines+set}" = set; then
11836 withval="$with_universal_newlines"
11837
11838fi;
11839
11840if test -z "$with_universal_newlines"
11841then with_universal_newlines="yes"
11842fi
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011843if test "$with_universal_newlines" = "no"
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011844then
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011845 echo --without-universal-newlines is unsupported, see README
11846 exit 1
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011847else
Martin v. Löwise8aea582002-04-16 05:51:02 +000011848
11849cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011850#define WITH_UNIVERSAL_NEWLINES 1
11851_ACEOF
11852
11853fi
11854echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11855echo "${ECHO_T}$with_universal_newlines" >&6
11856
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011857# Check for --with-doc-strings
11858echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11859echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11860
11861# Check whether --with-doc-strings or --without-doc-strings was given.
11862if test "${with_doc_strings+set}" = set; then
11863 withval="$with_doc_strings"
11864
11865fi;
11866
11867if test -z "$with_doc_strings"
11868then with_doc_strings="yes"
11869fi
11870if test "$with_doc_strings" != "no"
11871then
11872
11873cat >>confdefs.h <<\_ACEOF
11874#define WITH_DOC_STRINGS 1
11875_ACEOF
11876
11877fi
11878echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11879echo "${ECHO_T}$with_doc_strings" >&6
11880
Neil Schemenauera35c6882001-02-27 04:45:05 +000011881# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011882echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11883echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11884
Neil Schemenauera35c6882001-02-27 04:45:05 +000011885# Check whether --with-pymalloc or --without-pymalloc was given.
11886if test "${with_pymalloc+set}" = set; then
11887 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011888
Martin v. Löwis11437992002-04-12 09:54:03 +000011889fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011890
Neil Schemenauer16c22972002-03-22 15:34:49 +000011891if test -z "$with_pymalloc"
11892then with_pymalloc="yes"
11893fi
11894if test "$with_pymalloc" != "no"
11895then
Martin v. Löwis11437992002-04-12 09:54:03 +000011896
11897cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011898#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011899_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011900
11901fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011902echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11903echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011904
Barry Warsawef82cd72000-06-30 16:21:01 +000011905# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011906echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11907echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11908
Barry Warsawef82cd72000-06-30 16:21:01 +000011909# Check whether --with-wctype-functions or --without-wctype-functions was given.
11910if test "${with_wctype_functions+set}" = set; then
11911 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011912
Barry Warsawef82cd72000-06-30 16:21:01 +000011913if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011914then
11915
11916cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011917#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011918_ACEOF
11919
11920 echo "$as_me:$LINENO: result: yes" >&5
11921echo "${ECHO_T}yes" >&6
11922else echo "$as_me:$LINENO: result: no" >&5
11923echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011924fi
11925else
Martin v. Löwis11437992002-04-12 09:54:03 +000011926 echo "$as_me:$LINENO: result: no" >&5
11927echo "${ECHO_T}no" >&6
11928fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011929
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011930# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011931
Guido van Rossum98935bf2001-09-05 19:13:16 +000011932DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011933
Martin v. Löwis11437992002-04-12 09:54:03 +000011934echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11935echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11936
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011937# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011938if test "${with_sgi_dl+set}" = set; then
11939 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011940
11941echo "$as_me:$LINENO: result: $withval" >&5
11942echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000011943echo --with-sgi-dl is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011944exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011945
11946cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011947#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011948_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011949
Guido van Rossume97ee181999-12-20 21:27:22 +000011950DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011951dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011952if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011953then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011954else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11955echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11956 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011957fi
11958DLINCLDIR=${dldir}
11959LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011960else
Martin v. Löwis11437992002-04-12 09:54:03 +000011961 echo "$as_me:$LINENO: result: no" >&5
11962echo "${ECHO_T}no" >&6
11963fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011964
Martin v. Löwis11437992002-04-12 09:54:03 +000011965echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11966echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011967
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011968# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011969if test "${with_dl_dld+set}" = set; then
11970 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011971
11972echo "$as_me:$LINENO: result: $withval" >&5
11973echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000011974echo --with-dl-dld is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011975exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011976
11977cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011978#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011979_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011980
Guido van Rossume97ee181999-12-20 21:27:22 +000011981DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011982dldir=`echo "$withval" | sed 's/,.*//'`
11983dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011984if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011985then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011986else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&5
11987echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&2;}
11988 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011989fi
11990DLINCLDIR=${dldir}
11991LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011992else
Martin v. Löwis11437992002-04-12 09:54:03 +000011993 echo "$as_me:$LINENO: result: no" >&5
11994echo "${ECHO_T}no" >&6
11995fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011996
Guido van Rossume97ee181999-12-20 21:27:22 +000011997# the dlopen() function means we might want to use dynload_shlib.o. some
11998# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011999
Thomas Wouters3a584202000-08-05 23:28:51 +000012000for ac_func in dlopen
12001do
Martin v. Löwis11437992002-04-12 09:54:03 +000012002as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12003echo "$as_me:$LINENO: checking for $ac_func" >&5
12004echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12005if eval "test \"\${$as_ac_var+set}\" = set"; then
12006 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012007else
Martin v. Löwis11437992002-04-12 09:54:03 +000012008 cat >conftest.$ac_ext <<_ACEOF
12009#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000012010#include "confdefs.h"
12011/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012012 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000012013#include <assert.h>
12014/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012015#ifdef __cplusplus
12016extern "C"
12017#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012018/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012019 builtin and then its argument prototype would still apply. */
12020char $ac_func ();
12021char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000012022
Barry Warsawfe33b792003-01-07 22:42:49 +000012023#ifdef F77_DUMMY_MAIN
12024# ifdef __cplusplus
12025 extern "C"
12026# endif
12027 int F77_DUMMY_MAIN() { return 1; }
12028#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012029int
12030main ()
12031{
Guido van Rossume97ee181999-12-20 21:27:22 +000012032/* The GNU C library defines this for functions which it implements
12033 to always fail with ENOSYS. Some functions are actually named
12034 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012035#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000012036choke me
12037#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012038f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000012039#endif
12040
Martin v. Löwis11437992002-04-12 09:54:03 +000012041 ;
12042 return 0;
12043}
12044_ACEOF
12045rm -f conftest.$ac_objext conftest$ac_exeext
12046if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12047 (eval $ac_link) 2>&5
12048 ac_status=$?
12049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12050 (exit $ac_status); } &&
12051 { ac_try='test -s conftest$ac_exeext'
12052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12053 (eval $ac_try) 2>&5
12054 ac_status=$?
12055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12056 (exit $ac_status); }; }; then
12057 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012058else
Martin v. Löwis11437992002-04-12 09:54:03 +000012059 echo "$as_me: failed program was:" >&5
12060cat conftest.$ac_ext >&5
12061eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012062fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012063rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012064fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012065echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12066echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12067if test `eval echo '${'$as_ac_var'}'` = yes; then
12068 cat >>confdefs.h <<_ACEOF
12069#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12070_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012071
Guido van Rossume97ee181999-12-20 21:27:22 +000012072fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012073done
Guido van Rossume97ee181999-12-20 21:27:22 +000012074
Michael W. Hudson54241132001-12-07 15:38:26 +000012075
Guido van Rossume97ee181999-12-20 21:27:22 +000012076# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12077# loading of modules.
12078
Martin v. Löwis11437992002-04-12 09:54:03 +000012079echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
12080echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012081if test -z "$DYNLOADFILE"
12082then
12083 case $ac_sys_system/$ac_sys_release in
12084 AIX*) DYNLOADFILE="dynload_aix.o";;
12085 BeOS*) DYNLOADFILE="dynload_beos.o";;
12086 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000012087 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012088 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000012089 *)
12090 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
12091 # out any dynamic loading
12092 if test "$ac_cv_func_dlopen" = yes
12093 then DYNLOADFILE="dynload_shlib.o"
12094 else DYNLOADFILE="dynload_stub.o"
12095 fi
12096 ;;
12097 esac
12098fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012099echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
12100echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012101if test "$DYNLOADFILE" != "dynload_stub.o"
12102then
Martin v. Löwis11437992002-04-12 09:54:03 +000012103
12104cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012105#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012106_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012107
12108fi
12109
Neil Schemenauer4e425612001-06-19 15:44:15 +000012110# MACHDEP_OBJS can be set to platform-specific object files needed by Python
12111
Michael W. Hudson54241132001-12-07 15:38:26 +000012112
Martin v. Löwis11437992002-04-12 09:54:03 +000012113echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
12114echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012115if test -z "$MACHDEP_OBJS"
12116then
Jack Jansene578a632001-08-15 01:27:14 +000012117 MACHDEP_OBJS=$extra_machdep_objs
12118else
12119 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000012120fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012121echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
12122echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012123
Guido van Rossum627b2d71993-12-24 10:39:16 +000012124# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
Martin v. Löwis9c36c292002-12-21 18:34:06 +000012198
Martin v. Löwisd5843682002-11-21 20:41:28 +000012199for ac_func in alarm chown clock confstr ctermid execv \
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012200 fchdir fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012201 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
12202 getpriority getpwent getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000012203 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000012204 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000012205 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000012206 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000012207 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012208 sigaction siginterrupt sigrelse strftime strptime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000012209 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012210 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000012211do
Martin v. Löwis11437992002-04-12 09:54:03 +000012212as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12213echo "$as_me:$LINENO: checking for $ac_func" >&5
12214echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12215if eval "test \"\${$as_ac_var+set}\" = set"; then
12216 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012217else
Martin v. Löwis11437992002-04-12 09:54:03 +000012218 cat >conftest.$ac_ext <<_ACEOF
12219#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012220#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012221/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012222 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012223#include <assert.h>
12224/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012225#ifdef __cplusplus
12226extern "C"
12227#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012228/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012229 builtin and then its argument prototype would still apply. */
12230char $ac_func ();
12231char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012232
Barry Warsawfe33b792003-01-07 22:42:49 +000012233#ifdef F77_DUMMY_MAIN
12234# ifdef __cplusplus
12235 extern "C"
12236# endif
12237 int F77_DUMMY_MAIN() { return 1; }
12238#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012239int
12240main ()
12241{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012242/* The GNU C library defines this for functions which it implements
12243 to always fail with ENOSYS. Some functions are actually named
12244 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012245#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012246choke me
12247#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012248f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012249#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012250
Martin v. Löwis11437992002-04-12 09:54:03 +000012251 ;
12252 return 0;
12253}
12254_ACEOF
12255rm -f conftest.$ac_objext conftest$ac_exeext
12256if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12257 (eval $ac_link) 2>&5
12258 ac_status=$?
12259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12260 (exit $ac_status); } &&
12261 { ac_try='test -s conftest$ac_exeext'
12262 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12263 (eval $ac_try) 2>&5
12264 ac_status=$?
12265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12266 (exit $ac_status); }; }; then
12267 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012268else
Martin v. Löwis11437992002-04-12 09:54:03 +000012269 echo "$as_me: failed program was:" >&5
12270cat conftest.$ac_ext >&5
12271eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012272fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012273rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012274fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012275echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12276echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12277if test `eval echo '${'$as_ac_var'}'` = yes; then
12278 cat >>confdefs.h <<_ACEOF
12279#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12280_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012281
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012282fi
12283done
12284
Michael W. Hudson54241132001-12-07 15:38:26 +000012285
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012286# For some functions, having a definition is not sufficient, since
12287# we want to take their address.
12288echo "$as_me:$LINENO: checking for chroot" >&5
12289echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12290cat >conftest.$ac_ext <<_ACEOF
12291#line $LINENO "configure"
12292#include "confdefs.h"
12293#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012294#ifdef F77_DUMMY_MAIN
12295# ifdef __cplusplus
12296 extern "C"
12297# endif
12298 int F77_DUMMY_MAIN() { return 1; }
12299#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012300int
12301main ()
12302{
12303void *x=chroot
12304 ;
12305 return 0;
12306}
12307_ACEOF
12308rm -f conftest.$ac_objext
12309if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12310 (eval $ac_compile) 2>&5
12311 ac_status=$?
12312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12313 (exit $ac_status); } &&
12314 { ac_try='test -s conftest.$ac_objext'
12315 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12316 (eval $ac_try) 2>&5
12317 ac_status=$?
12318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12319 (exit $ac_status); }; }; then
12320
12321cat >>confdefs.h <<\_ACEOF
12322#define HAVE_CHROOT 1
12323_ACEOF
12324
12325 echo "$as_me:$LINENO: result: yes" >&5
12326echo "${ECHO_T}yes" >&6
12327else
12328 echo "$as_me: failed program was:" >&5
12329cat conftest.$ac_ext >&5
12330echo "$as_me:$LINENO: result: no" >&5
12331echo "${ECHO_T}no" >&6
12332
12333fi
12334rm -f conftest.$ac_objext conftest.$ac_ext
12335echo "$as_me:$LINENO: checking for link" >&5
12336echo $ECHO_N "checking for link... $ECHO_C" >&6
12337cat >conftest.$ac_ext <<_ACEOF
12338#line $LINENO "configure"
12339#include "confdefs.h"
12340#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012341#ifdef F77_DUMMY_MAIN
12342# ifdef __cplusplus
12343 extern "C"
12344# endif
12345 int F77_DUMMY_MAIN() { return 1; }
12346#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012347int
12348main ()
12349{
12350void *x=link
12351 ;
12352 return 0;
12353}
12354_ACEOF
12355rm -f conftest.$ac_objext
12356if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12357 (eval $ac_compile) 2>&5
12358 ac_status=$?
12359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12360 (exit $ac_status); } &&
12361 { ac_try='test -s conftest.$ac_objext'
12362 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12363 (eval $ac_try) 2>&5
12364 ac_status=$?
12365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12366 (exit $ac_status); }; }; then
12367
12368cat >>confdefs.h <<\_ACEOF
12369#define HAVE_LINK 1
12370_ACEOF
12371
12372 echo "$as_me:$LINENO: result: yes" >&5
12373echo "${ECHO_T}yes" >&6
12374else
12375 echo "$as_me: failed program was:" >&5
12376cat conftest.$ac_ext >&5
12377echo "$as_me:$LINENO: result: no" >&5
12378echo "${ECHO_T}no" >&6
12379
12380fi
12381rm -f conftest.$ac_objext conftest.$ac_ext
12382echo "$as_me:$LINENO: checking for symlink" >&5
12383echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12384cat >conftest.$ac_ext <<_ACEOF
12385#line $LINENO "configure"
12386#include "confdefs.h"
12387#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012388#ifdef F77_DUMMY_MAIN
12389# ifdef __cplusplus
12390 extern "C"
12391# endif
12392 int F77_DUMMY_MAIN() { return 1; }
12393#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012394int
12395main ()
12396{
12397void *x=symlink
12398 ;
12399 return 0;
12400}
12401_ACEOF
12402rm -f conftest.$ac_objext
12403if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12404 (eval $ac_compile) 2>&5
12405 ac_status=$?
12406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12407 (exit $ac_status); } &&
12408 { ac_try='test -s conftest.$ac_objext'
12409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12410 (eval $ac_try) 2>&5
12411 ac_status=$?
12412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12413 (exit $ac_status); }; }; then
12414
12415cat >>confdefs.h <<\_ACEOF
12416#define HAVE_SYMLINK 1
12417_ACEOF
12418
12419 echo "$as_me:$LINENO: result: yes" >&5
12420echo "${ECHO_T}yes" >&6
12421else
12422 echo "$as_me: failed program was:" >&5
12423cat conftest.$ac_ext >&5
12424echo "$as_me:$LINENO: result: no" >&5
12425echo "${ECHO_T}no" >&6
12426
12427fi
12428rm -f conftest.$ac_objext conftest.$ac_ext
12429
Martin v. Löwisd5843682002-11-21 20:41:28 +000012430# On some systems (eg. FreeBSD 5), we would find a definition of the
12431# functions ctermid_r, setgroups in the library, but no prototype
12432# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12433# address to avoid compiler warnings and potential miscompilations
12434# because of the missing prototypes.
12435
12436echo "$as_me:$LINENO: checking for ctermid_r" >&5
12437echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
12438cat >conftest.$ac_ext <<_ACEOF
12439#line $LINENO "configure"
12440#include "confdefs.h"
12441
12442#include "confdefs.h"
12443#include <stdio.h>
12444
Barry Warsawfe33b792003-01-07 22:42:49 +000012445#ifdef F77_DUMMY_MAIN
12446# ifdef __cplusplus
12447 extern "C"
12448# endif
12449 int F77_DUMMY_MAIN() { return 1; }
12450#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012451int
12452main ()
12453{
12454void* p = ctermid_r
12455 ;
12456 return 0;
12457}
12458_ACEOF
12459rm -f conftest.$ac_objext
12460if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12461 (eval $ac_compile) 2>&5
12462 ac_status=$?
12463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12464 (exit $ac_status); } &&
12465 { ac_try='test -s conftest.$ac_objext'
12466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12467 (eval $ac_try) 2>&5
12468 ac_status=$?
12469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12470 (exit $ac_status); }; }; then
12471
12472cat >>confdefs.h <<\_ACEOF
12473#define HAVE_CTERMID_R 1
12474_ACEOF
12475
12476 echo "$as_me:$LINENO: result: yes" >&5
12477echo "${ECHO_T}yes" >&6
12478else
12479 echo "$as_me: failed program was:" >&5
12480cat conftest.$ac_ext >&5
12481echo "$as_me:$LINENO: result: no" >&5
12482echo "${ECHO_T}no" >&6
12483
12484fi
12485rm -f conftest.$ac_objext conftest.$ac_ext
12486
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012487echo "$as_me:$LINENO: checking for flock" >&5
12488echo $ECHO_N "checking for flock... $ECHO_C" >&6
12489cat >conftest.$ac_ext <<_ACEOF
12490#line $LINENO "configure"
12491#include "confdefs.h"
12492
12493#include "confdefs.h"
12494#include <sys/file.h>
12495
12496#ifdef F77_DUMMY_MAIN
12497# ifdef __cplusplus
12498 extern "C"
12499# endif
12500 int F77_DUMMY_MAIN() { return 1; }
12501#endif
12502int
12503main ()
12504{
12505void* p = flock
12506 ;
12507 return 0;
12508}
12509_ACEOF
12510rm -f conftest.$ac_objext
12511if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12512 (eval $ac_compile) 2>&5
12513 ac_status=$?
12514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12515 (exit $ac_status); } &&
12516 { ac_try='test -s conftest.$ac_objext'
12517 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12518 (eval $ac_try) 2>&5
12519 ac_status=$?
12520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12521 (exit $ac_status); }; }; then
12522
12523cat >>confdefs.h <<\_ACEOF
12524#define HAVE_FLOCK 1
12525_ACEOF
12526
12527 echo "$as_me:$LINENO: result: yes" >&5
12528echo "${ECHO_T}yes" >&6
12529else
12530 echo "$as_me: failed program was:" >&5
12531cat conftest.$ac_ext >&5
12532echo "$as_me:$LINENO: result: no" >&5
12533echo "${ECHO_T}no" >&6
12534
12535fi
12536rm -f conftest.$ac_objext conftest.$ac_ext
12537
12538echo "$as_me:$LINENO: checking for getpagesize" >&5
12539echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
12540cat >conftest.$ac_ext <<_ACEOF
12541#line $LINENO "configure"
12542#include "confdefs.h"
12543
12544#include "confdefs.h"
12545#include <unistd.h>
12546
12547#ifdef F77_DUMMY_MAIN
12548# ifdef __cplusplus
12549 extern "C"
12550# endif
12551 int F77_DUMMY_MAIN() { return 1; }
12552#endif
12553int
12554main ()
12555{
12556void* p = getpagesize
12557 ;
12558 return 0;
12559}
12560_ACEOF
12561rm -f conftest.$ac_objext
12562if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12563 (eval $ac_compile) 2>&5
12564 ac_status=$?
12565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12566 (exit $ac_status); } &&
12567 { ac_try='test -s conftest.$ac_objext'
12568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12569 (eval $ac_try) 2>&5
12570 ac_status=$?
12571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12572 (exit $ac_status); }; }; then
12573
12574cat >>confdefs.h <<\_ACEOF
12575#define HAVE_GETPAGESIZE 1
12576_ACEOF
12577
12578 echo "$as_me:$LINENO: result: yes" >&5
12579echo "${ECHO_T}yes" >&6
12580else
12581 echo "$as_me: failed program was:" >&5
12582cat conftest.$ac_ext >&5
12583echo "$as_me:$LINENO: result: no" >&5
12584echo "${ECHO_T}no" >&6
12585
12586fi
12587rm -f conftest.$ac_objext conftest.$ac_ext
12588
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012589echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
12590echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
12591if test "${ac_cv_lib_c_inet_aton+set}" = set; then
12592 echo $ECHO_N "(cached) $ECHO_C" >&6
12593else
12594 ac_check_lib_save_LIBS=$LIBS
12595LIBS="-lc $LIBS"
12596cat >conftest.$ac_ext <<_ACEOF
12597#line $LINENO "configure"
12598#include "confdefs.h"
12599
12600/* Override any gcc2 internal prototype to avoid an error. */
12601#ifdef __cplusplus
12602extern "C"
12603#endif
12604/* We use char because int might match the return type of a gcc2
12605 builtin and then its argument prototype would still apply. */
12606char inet_aton ();
12607#ifdef F77_DUMMY_MAIN
12608# ifdef __cplusplus
12609 extern "C"
12610# endif
12611 int F77_DUMMY_MAIN() { return 1; }
12612#endif
12613int
12614main ()
12615{
12616inet_aton ();
12617 ;
12618 return 0;
12619}
12620_ACEOF
12621rm -f conftest.$ac_objext conftest$ac_exeext
12622if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12623 (eval $ac_link) 2>&5
12624 ac_status=$?
12625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12626 (exit $ac_status); } &&
12627 { ac_try='test -s conftest$ac_exeext'
12628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12629 (eval $ac_try) 2>&5
12630 ac_status=$?
12631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12632 (exit $ac_status); }; }; then
12633 ac_cv_lib_c_inet_aton=yes
12634else
12635 echo "$as_me: failed program was:" >&5
12636cat conftest.$ac_ext >&5
12637ac_cv_lib_c_inet_aton=no
12638fi
12639rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12640LIBS=$ac_check_lib_save_LIBS
12641fi
12642echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
12643echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
12644if test $ac_cv_lib_c_inet_aton = yes; then
12645 /bin/true
12646else
12647
12648echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
12649echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
12650if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
12651 echo $ECHO_N "(cached) $ECHO_C" >&6
12652else
12653 ac_check_lib_save_LIBS=$LIBS
12654LIBS="-lresolv $LIBS"
12655cat >conftest.$ac_ext <<_ACEOF
12656#line $LINENO "configure"
12657#include "confdefs.h"
12658
12659/* Override any gcc2 internal prototype to avoid an error. */
12660#ifdef __cplusplus
12661extern "C"
12662#endif
12663/* We use char because int might match the return type of a gcc2
12664 builtin and then its argument prototype would still apply. */
12665char inet_aton ();
12666#ifdef F77_DUMMY_MAIN
12667# ifdef __cplusplus
12668 extern "C"
12669# endif
12670 int F77_DUMMY_MAIN() { return 1; }
12671#endif
12672int
12673main ()
12674{
12675inet_aton ();
12676 ;
12677 return 0;
12678}
12679_ACEOF
12680rm -f conftest.$ac_objext conftest$ac_exeext
12681if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12682 (eval $ac_link) 2>&5
12683 ac_status=$?
12684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12685 (exit $ac_status); } &&
12686 { ac_try='test -s conftest$ac_exeext'
12687 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12688 (eval $ac_try) 2>&5
12689 ac_status=$?
12690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12691 (exit $ac_status); }; }; then
12692 ac_cv_lib_resolv_inet_aton=yes
12693else
12694 echo "$as_me: failed program was:" >&5
12695cat conftest.$ac_ext >&5
12696ac_cv_lib_resolv_inet_aton=no
12697fi
12698rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12699LIBS=$ac_check_lib_save_LIBS
12700fi
12701echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
12702echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
12703if test $ac_cv_lib_resolv_inet_aton = yes; then
12704 cat >>confdefs.h <<_ACEOF
12705#define HAVE_LIBRESOLV 1
12706_ACEOF
12707
12708 LIBS="-lresolv $LIBS"
12709
12710fi
12711
12712
12713fi
12714
12715
Martin v. Löwise9416172003-05-03 10:12:45 +000012716echo "$as_me:$LINENO: checking for hstrerror" >&5
12717echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
12718cat >conftest.$ac_ext <<_ACEOF
12719#line $LINENO "configure"
12720#include "confdefs.h"
12721
12722#include "confdefs.h"
12723#include <netdb.h>
12724
12725#ifdef F77_DUMMY_MAIN
12726# ifdef __cplusplus
12727 extern "C"
12728# endif
12729 int F77_DUMMY_MAIN() { return 1; }
12730#endif
12731int
12732main ()
12733{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012734void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012735 ;
12736 return 0;
12737}
12738_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012739rm -f conftest.$ac_objext conftest$ac_exeext
12740if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12741 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000012742 ac_status=$?
12743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12744 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012745 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000012746 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12747 (eval $ac_try) 2>&5
12748 ac_status=$?
12749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12750 (exit $ac_status); }; }; then
12751
12752cat >>confdefs.h <<\_ACEOF
12753#define HAVE_HSTRERROR 1
12754_ACEOF
12755
12756 echo "$as_me:$LINENO: result: yes" >&5
12757echo "${ECHO_T}yes" >&6
12758else
12759 echo "$as_me: failed program was:" >&5
12760cat conftest.$ac_ext >&5
12761echo "$as_me:$LINENO: result: no" >&5
12762echo "${ECHO_T}no" >&6
12763
12764fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012765rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012766
12767echo "$as_me:$LINENO: checking for inet_aton" >&5
12768echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
12769cat >conftest.$ac_ext <<_ACEOF
12770#line $LINENO "configure"
12771#include "confdefs.h"
12772
12773#include "confdefs.h"
12774#include <sys/socket.h>
12775#include <netinet/in.h>
12776#include <arpa/inet.h>
12777
12778#ifdef F77_DUMMY_MAIN
12779# ifdef __cplusplus
12780 extern "C"
12781# endif
12782 int F77_DUMMY_MAIN() { return 1; }
12783#endif
12784int
12785main ()
12786{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012787void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012788 ;
12789 return 0;
12790}
12791_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012792rm -f conftest.$ac_objext conftest$ac_exeext
12793if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12794 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000012795 ac_status=$?
12796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12797 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012798 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000012799 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12800 (eval $ac_try) 2>&5
12801 ac_status=$?
12802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12803 (exit $ac_status); }; }; then
12804
12805cat >>confdefs.h <<\_ACEOF
12806#define HAVE_INET_ATON 1
12807_ACEOF
12808
12809 echo "$as_me:$LINENO: result: yes" >&5
12810echo "${ECHO_T}yes" >&6
12811else
12812 echo "$as_me: failed program was:" >&5
12813cat conftest.$ac_ext >&5
12814echo "$as_me:$LINENO: result: no" >&5
12815echo "${ECHO_T}no" >&6
12816
12817fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012818rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012819
12820echo "$as_me:$LINENO: checking for inet_pton" >&5
12821echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
12822cat >conftest.$ac_ext <<_ACEOF
12823#line $LINENO "configure"
12824#include "confdefs.h"
12825
12826#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012827#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012828#include <sys/socket.h>
12829#include <netinet/in.h>
12830#include <arpa/inet.h>
12831
12832#ifdef F77_DUMMY_MAIN
12833# ifdef __cplusplus
12834 extern "C"
12835# endif
12836 int F77_DUMMY_MAIN() { return 1; }
12837#endif
12838int
12839main ()
12840{
12841void* p = inet_pton
12842 ;
12843 return 0;
12844}
12845_ACEOF
12846rm -f conftest.$ac_objext
12847if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12848 (eval $ac_compile) 2>&5
12849 ac_status=$?
12850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12851 (exit $ac_status); } &&
12852 { ac_try='test -s conftest.$ac_objext'
12853 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12854 (eval $ac_try) 2>&5
12855 ac_status=$?
12856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12857 (exit $ac_status); }; }; then
12858
12859cat >>confdefs.h <<\_ACEOF
12860#define HAVE_INET_PTON 1
12861_ACEOF
12862
12863 echo "$as_me:$LINENO: result: yes" >&5
12864echo "${ECHO_T}yes" >&6
12865else
12866 echo "$as_me: failed program was:" >&5
12867cat conftest.$ac_ext >&5
12868echo "$as_me:$LINENO: result: no" >&5
12869echo "${ECHO_T}no" >&6
12870
12871fi
12872rm -f conftest.$ac_objext conftest.$ac_ext
12873
Martin v. Löwisd5843682002-11-21 20:41:28 +000012874echo "$as_me:$LINENO: checking for setgroups" >&5
12875echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
12876cat >conftest.$ac_ext <<_ACEOF
12877#line $LINENO "configure"
12878#include "confdefs.h"
12879
12880#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012881#include <unistd.h>
Martin v. Löwisd5843682002-11-21 20:41:28 +000012882
Barry Warsawfe33b792003-01-07 22:42:49 +000012883#ifdef F77_DUMMY_MAIN
12884# ifdef __cplusplus
12885 extern "C"
12886# endif
12887 int F77_DUMMY_MAIN() { return 1; }
12888#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012889int
12890main ()
12891{
12892void* p = setgroups
12893 ;
12894 return 0;
12895}
12896_ACEOF
12897rm -f conftest.$ac_objext
12898if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12899 (eval $ac_compile) 2>&5
12900 ac_status=$?
12901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12902 (exit $ac_status); } &&
12903 { ac_try='test -s conftest.$ac_objext'
12904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12905 (eval $ac_try) 2>&5
12906 ac_status=$?
12907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12908 (exit $ac_status); }; }; then
12909
12910cat >>confdefs.h <<\_ACEOF
12911#define HAVE_SETGROUPS 1
12912_ACEOF
12913
12914 echo "$as_me:$LINENO: result: yes" >&5
12915echo "${ECHO_T}yes" >&6
12916else
12917 echo "$as_me: failed program was:" >&5
12918cat conftest.$ac_ext >&5
12919echo "$as_me:$LINENO: result: no" >&5
12920echo "${ECHO_T}no" >&6
12921
12922fi
12923rm -f conftest.$ac_objext conftest.$ac_ext
12924
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012925# check for openpty and forkpty
12926
Martin v. Löwis11437992002-04-12 09:54:03 +000012927
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012928for ac_func in openpty
12929do
Martin v. Löwis11437992002-04-12 09:54:03 +000012930as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12931echo "$as_me:$LINENO: checking for $ac_func" >&5
12932echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12933if eval "test \"\${$as_ac_var+set}\" = set"; then
12934 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012935else
Martin v. Löwis11437992002-04-12 09:54:03 +000012936 cat >conftest.$ac_ext <<_ACEOF
12937#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012938#include "confdefs.h"
12939/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012940 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012941#include <assert.h>
12942/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012943#ifdef __cplusplus
12944extern "C"
12945#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012946/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012947 builtin and then its argument prototype would still apply. */
12948char $ac_func ();
12949char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012950
Barry Warsawfe33b792003-01-07 22:42:49 +000012951#ifdef F77_DUMMY_MAIN
12952# ifdef __cplusplus
12953 extern "C"
12954# endif
12955 int F77_DUMMY_MAIN() { return 1; }
12956#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012957int
12958main ()
12959{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012960/* The GNU C library defines this for functions which it implements
12961 to always fail with ENOSYS. Some functions are actually named
12962 something starting with __ and the normal name is an alias. */
12963#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12964choke me
12965#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012966f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012967#endif
12968
Martin v. Löwis11437992002-04-12 09:54:03 +000012969 ;
12970 return 0;
12971}
12972_ACEOF
12973rm -f conftest.$ac_objext conftest$ac_exeext
12974if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12975 (eval $ac_link) 2>&5
12976 ac_status=$?
12977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12978 (exit $ac_status); } &&
12979 { ac_try='test -s conftest$ac_exeext'
12980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12981 (eval $ac_try) 2>&5
12982 ac_status=$?
12983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12984 (exit $ac_status); }; }; then
12985 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012986else
Martin v. Löwis11437992002-04-12 09:54:03 +000012987 echo "$as_me: failed program was:" >&5
12988cat conftest.$ac_ext >&5
12989eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012990fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012991rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012992fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012993echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12994echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12995if test `eval echo '${'$as_ac_var'}'` = yes; then
12996 cat >>confdefs.h <<_ACEOF
12997#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12998_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012999
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013000else
Martin v. Löwis11437992002-04-12 09:54:03 +000013001 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
13002echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
13003if test "${ac_cv_lib_util_openpty+set}" = set; then
13004 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013005else
Martin v. Löwis11437992002-04-12 09:54:03 +000013006 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013007LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013008cat >conftest.$ac_ext <<_ACEOF
13009#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013010#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013011
Fred Drake8cef4cf2000-06-28 16:40:38 +000013012/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013013#ifdef __cplusplus
13014extern "C"
13015#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013016/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013017 builtin and then its argument prototype would still apply. */
13018char openpty ();
Barry Warsawfe33b792003-01-07 22:42:49 +000013019#ifdef F77_DUMMY_MAIN
13020# ifdef __cplusplus
13021 extern "C"
13022# endif
13023 int F77_DUMMY_MAIN() { return 1; }
13024#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013025int
13026main ()
13027{
13028openpty ();
13029 ;
13030 return 0;
13031}
13032_ACEOF
13033rm -f conftest.$ac_objext conftest$ac_exeext
13034if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13035 (eval $ac_link) 2>&5
13036 ac_status=$?
13037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13038 (exit $ac_status); } &&
13039 { ac_try='test -s conftest$ac_exeext'
13040 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13041 (eval $ac_try) 2>&5
13042 ac_status=$?
13043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13044 (exit $ac_status); }; }; then
13045 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013046else
Martin v. Löwis11437992002-04-12 09:54:03 +000013047 echo "$as_me: failed program was:" >&5
13048cat conftest.$ac_ext >&5
13049ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013050fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013051rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13052LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013053fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013054echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
13055echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
13056if test $ac_cv_lib_util_openpty = yes; then
13057 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013058#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013059_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013060 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013061fi
13062
13063fi
13064done
13065
Martin v. Löwis11437992002-04-12 09:54:03 +000013066
Fred Drake8cef4cf2000-06-28 16:40:38 +000013067for ac_func in forkpty
13068do
Martin v. Löwis11437992002-04-12 09:54:03 +000013069as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13070echo "$as_me:$LINENO: checking for $ac_func" >&5
13071echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13072if eval "test \"\${$as_ac_var+set}\" = set"; then
13073 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013074else
Martin v. Löwis11437992002-04-12 09:54:03 +000013075 cat >conftest.$ac_ext <<_ACEOF
13076#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013077#include "confdefs.h"
13078/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013079 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000013080#include <assert.h>
13081/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013082#ifdef __cplusplus
13083extern "C"
13084#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013085/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013086 builtin and then its argument prototype would still apply. */
13087char $ac_func ();
13088char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000013089
Barry Warsawfe33b792003-01-07 22:42:49 +000013090#ifdef F77_DUMMY_MAIN
13091# ifdef __cplusplus
13092 extern "C"
13093# endif
13094 int F77_DUMMY_MAIN() { return 1; }
13095#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013096int
13097main ()
13098{
Fred Drake8cef4cf2000-06-28 16:40:38 +000013099/* The GNU C library defines this for functions which it implements
13100 to always fail with ENOSYS. Some functions are actually named
13101 something starting with __ and the normal name is an alias. */
13102#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13103choke me
13104#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013105f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000013106#endif
13107
Martin v. Löwis11437992002-04-12 09:54:03 +000013108 ;
13109 return 0;
13110}
13111_ACEOF
13112rm -f conftest.$ac_objext conftest$ac_exeext
13113if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13114 (eval $ac_link) 2>&5
13115 ac_status=$?
13116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13117 (exit $ac_status); } &&
13118 { ac_try='test -s conftest$ac_exeext'
13119 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13120 (eval $ac_try) 2>&5
13121 ac_status=$?
13122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13123 (exit $ac_status); }; }; then
13124 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013125else
Martin v. Löwis11437992002-04-12 09:54:03 +000013126 echo "$as_me: failed program was:" >&5
13127cat conftest.$ac_ext >&5
13128eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013129fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013130rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013131fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013132echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13133echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13134if test `eval echo '${'$as_ac_var'}'` = yes; then
13135 cat >>confdefs.h <<_ACEOF
13136#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13137_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013138
Fred Drake8cef4cf2000-06-28 16:40:38 +000013139else
Martin v. Löwis11437992002-04-12 09:54:03 +000013140 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
13141echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
13142if test "${ac_cv_lib_util_forkpty+set}" = set; then
13143 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013144else
Martin v. Löwis11437992002-04-12 09:54:03 +000013145 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013146LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013147cat >conftest.$ac_ext <<_ACEOF
13148#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013149#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013150
Fred Drake8cef4cf2000-06-28 16:40:38 +000013151/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013152#ifdef __cplusplus
13153extern "C"
13154#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013155/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013156 builtin and then its argument prototype would still apply. */
13157char forkpty ();
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{
13167forkpty ();
13168 ;
13169 return 0;
13170}
13171_ACEOF
13172rm -f conftest.$ac_objext conftest$ac_exeext
13173if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13174 (eval $ac_link) 2>&5
13175 ac_status=$?
13176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13177 (exit $ac_status); } &&
13178 { ac_try='test -s conftest$ac_exeext'
13179 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13180 (eval $ac_try) 2>&5
13181 ac_status=$?
13182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13183 (exit $ac_status); }; }; then
13184 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013185else
Martin v. Löwis11437992002-04-12 09:54:03 +000013186 echo "$as_me: failed program was:" >&5
13187cat conftest.$ac_ext >&5
13188ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013189fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013190rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13191LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013192fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013193echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
13194echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
13195if test $ac_cv_lib_util_forkpty = yes; then
13196 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013197#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013198_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013199 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013200fi
13201
13202fi
13203done
13204
Jack Jansendd19cf82001-12-06 22:36:17 +000013205
Michael W. Hudson54241132001-12-07 15:38:26 +000013206# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013207
13208
13209
13210
13211
13212
Fred Drake8cef4cf2000-06-28 16:40:38 +000013213for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
13214do
Martin v. Löwis11437992002-04-12 09:54:03 +000013215as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13216echo "$as_me:$LINENO: checking for $ac_func" >&5
13217echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13218if eval "test \"\${$as_ac_var+set}\" = set"; then
13219 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013220else
Martin v. Löwis11437992002-04-12 09:54:03 +000013221 cat >conftest.$ac_ext <<_ACEOF
13222#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013223#include "confdefs.h"
13224/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013225 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013226#include <assert.h>
13227/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013228#ifdef __cplusplus
13229extern "C"
13230#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013231/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013232 builtin and then its argument prototype would still apply. */
13233char $ac_func ();
13234char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013235
Barry Warsawfe33b792003-01-07 22:42:49 +000013236#ifdef F77_DUMMY_MAIN
13237# ifdef __cplusplus
13238 extern "C"
13239# endif
13240 int F77_DUMMY_MAIN() { return 1; }
13241#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013242int
13243main ()
13244{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013245/* The GNU C library defines this for functions which it implements
13246 to always fail with ENOSYS. Some functions are actually named
13247 something starting with __ and the normal name is an alias. */
13248#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13249choke me
13250#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013251f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013252#endif
13253
Martin v. Löwis11437992002-04-12 09:54:03 +000013254 ;
13255 return 0;
13256}
13257_ACEOF
13258rm -f conftest.$ac_objext conftest$ac_exeext
13259if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13260 (eval $ac_link) 2>&5
13261 ac_status=$?
13262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13263 (exit $ac_status); } &&
13264 { ac_try='test -s conftest$ac_exeext'
13265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13266 (eval $ac_try) 2>&5
13267 ac_status=$?
13268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13269 (exit $ac_status); }; }; then
13270 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013271else
Martin v. Löwis11437992002-04-12 09:54:03 +000013272 echo "$as_me: failed program was:" >&5
13273cat conftest.$ac_ext >&5
13274eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013275fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013276rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013277fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013278echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13279echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13280if test `eval echo '${'$as_ac_var'}'` = yes; then
13281 cat >>confdefs.h <<_ACEOF
13282#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13283_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000013284
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013285fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000013286done
13287
Michael W. Hudson54241132001-12-07 15:38:26 +000013288
Martin v. Löwis11437992002-04-12 09:54:03 +000013289
13290
13291
13292
13293
Martin v. Löwis1142de32002-03-29 16:28:31 +000013294for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000013295do
Martin v. Löwis11437992002-04-12 09:54:03 +000013296as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13297echo "$as_me:$LINENO: checking for $ac_func" >&5
13298echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13299if eval "test \"\${$as_ac_var+set}\" = set"; then
13300 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013301else
Martin v. Löwis11437992002-04-12 09:54:03 +000013302 cat >conftest.$ac_ext <<_ACEOF
13303#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013304#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013305/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013306 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013307#include <assert.h>
13308/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013309#ifdef __cplusplus
13310extern "C"
13311#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013312/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013313 builtin and then its argument prototype would still apply. */
13314char $ac_func ();
13315char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013316
Barry Warsawfe33b792003-01-07 22:42:49 +000013317#ifdef F77_DUMMY_MAIN
13318# ifdef __cplusplus
13319 extern "C"
13320# endif
13321 int F77_DUMMY_MAIN() { return 1; }
13322#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013323int
13324main ()
13325{
Guido van Rossum627b2d71993-12-24 10:39:16 +000013326/* The GNU C library defines this for functions which it implements
13327 to always fail with ENOSYS. Some functions are actually named
13328 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013329#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013330choke me
13331#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013332f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013333#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013334
Martin v. Löwis11437992002-04-12 09:54:03 +000013335 ;
13336 return 0;
13337}
13338_ACEOF
13339rm -f conftest.$ac_objext conftest$ac_exeext
13340if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13341 (eval $ac_link) 2>&5
13342 ac_status=$?
13343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13344 (exit $ac_status); } &&
13345 { ac_try='test -s conftest$ac_exeext'
13346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13347 (eval $ac_try) 2>&5
13348 ac_status=$?
13349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13350 (exit $ac_status); }; }; then
13351 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013352else
Martin v. Löwis11437992002-04-12 09:54:03 +000013353 echo "$as_me: failed program was:" >&5
13354cat conftest.$ac_ext >&5
13355eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013356fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013357rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000013358fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013359echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13360echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13361if test `eval echo '${'$as_ac_var'}'` = yes; then
13362 cat >>confdefs.h <<_ACEOF
13363#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13364_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000013365
Martin v. Löwis1142de32002-03-29 16:28:31 +000013366else
Martin v. Löwis11437992002-04-12 09:54:03 +000013367 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013368fi
13369done
13370
13371
Martin v. Löwis11437992002-04-12 09:54:03 +000013372
Martin v. Löwis1142de32002-03-29 16:28:31 +000013373for ac_func in getpgrp
13374do
Martin v. Löwis11437992002-04-12 09:54:03 +000013375as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13376echo "$as_me:$LINENO: checking for $ac_func" >&5
13377echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13378if eval "test \"\${$as_ac_var+set}\" = set"; then
13379 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000013380else
Martin v. Löwis11437992002-04-12 09:54:03 +000013381 cat >conftest.$ac_ext <<_ACEOF
13382#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013383#include "confdefs.h"
13384/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013385 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000013386#include <assert.h>
13387/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013388#ifdef __cplusplus
13389extern "C"
13390#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013391/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013392 builtin and then its argument prototype would still apply. */
13393char $ac_func ();
13394char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000013395
Barry Warsawfe33b792003-01-07 22:42:49 +000013396#ifdef F77_DUMMY_MAIN
13397# ifdef __cplusplus
13398 extern "C"
13399# endif
13400 int F77_DUMMY_MAIN() { return 1; }
13401#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013402int
13403main ()
13404{
Martin v. Löwis1142de32002-03-29 16:28:31 +000013405/* The GNU C library defines this for functions which it implements
13406 to always fail with ENOSYS. Some functions are actually named
13407 something starting with __ and the normal name is an alias. */
13408#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13409choke me
13410#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013411f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000013412#endif
13413
Martin v. Löwis11437992002-04-12 09:54:03 +000013414 ;
13415 return 0;
13416}
13417_ACEOF
13418rm -f conftest.$ac_objext conftest$ac_exeext
13419if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13420 (eval $ac_link) 2>&5
13421 ac_status=$?
13422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13423 (exit $ac_status); } &&
13424 { ac_try='test -s conftest$ac_exeext'
13425 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13426 (eval $ac_try) 2>&5
13427 ac_status=$?
13428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13429 (exit $ac_status); }; }; then
13430 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013431else
Martin v. Löwis11437992002-04-12 09:54:03 +000013432 echo "$as_me: failed program was:" >&5
13433cat conftest.$ac_ext >&5
13434eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013435fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013436rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013437fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013438echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13439echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13440if test `eval echo '${'$as_ac_var'}'` = yes; then
13441 cat >>confdefs.h <<_ACEOF
13442#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13443_ACEOF
13444 cat >conftest.$ac_ext <<_ACEOF
13445#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013446#include "confdefs.h"
13447#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000013448#ifdef F77_DUMMY_MAIN
13449# ifdef __cplusplus
13450 extern "C"
13451# endif
13452 int F77_DUMMY_MAIN() { return 1; }
13453#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013454int
13455main ()
13456{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013457getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013458 ;
13459 return 0;
13460}
13461_ACEOF
13462rm -f conftest.$ac_objext
13463if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13464 (eval $ac_compile) 2>&5
13465 ac_status=$?
13466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13467 (exit $ac_status); } &&
13468 { ac_try='test -s conftest.$ac_objext'
13469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13470 (eval $ac_try) 2>&5
13471 ac_status=$?
13472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13473 (exit $ac_status); }; }; then
13474
13475cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013476#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013477_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013478
Martin v. Löwis11437992002-04-12 09:54:03 +000013479
Guido van Rossumf78abae1997-01-21 22:02:36 +000013480else
Martin v. Löwis11437992002-04-12 09:54:03 +000013481 echo "$as_me: failed program was:" >&5
13482cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013483fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013484rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013485
Guido van Rossum627b2d71993-12-24 10:39:16 +000013486fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013487done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013488
Jack Jansen150753c2003-03-29 22:07:47 +000013489
13490for ac_func in setpgrp
13491do
13492as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13493echo "$as_me:$LINENO: checking for $ac_func" >&5
13494echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13495if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013496 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013497else
Martin v. Löwis11437992002-04-12 09:54:03 +000013498 cat >conftest.$ac_ext <<_ACEOF
13499#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013500#include "confdefs.h"
Jack Jansen150753c2003-03-29 22:07:47 +000013501/* System header to define __stub macros and hopefully few prototypes,
13502 which can conflict with char $ac_func (); below. */
13503#include <assert.h>
13504/* Override any gcc2 internal prototype to avoid an error. */
13505#ifdef __cplusplus
13506extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000013507#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013508/* We use char because int might match the return type of a gcc2
13509 builtin and then its argument prototype would still apply. */
13510char $ac_func ();
13511char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013512
Barry Warsawfe33b792003-01-07 22:42:49 +000013513#ifdef F77_DUMMY_MAIN
13514# ifdef __cplusplus
13515 extern "C"
13516# endif
13517 int F77_DUMMY_MAIN() { return 1; }
13518#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013519int
13520main ()
13521{
Jack Jansen150753c2003-03-29 22:07:47 +000013522/* The GNU C library defines this for functions which it implements
13523 to always fail with ENOSYS. Some functions are actually named
13524 something starting with __ and the normal name is an alias. */
13525#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13526choke me
13527#else
13528f = $ac_func;
13529#endif
13530
Martin v. Löwis11437992002-04-12 09:54:03 +000013531 ;
13532 return 0;
13533}
13534_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013535rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000013536if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13537 (eval $ac_link) 2>&5
13538 ac_status=$?
13539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013540 (exit $ac_status); } &&
13541 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13543 (eval $ac_try) 2>&5
13544 ac_status=$?
13545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13546 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000013547 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013548else
Jack Jansen150753c2003-03-29 22:07:47 +000013549 echo "$as_me: failed program was:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013550cat conftest.$ac_ext >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013551eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013552fi
Jack Jansen150753c2003-03-29 22:07:47 +000013553rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013554fi
Jack Jansen150753c2003-03-29 22:07:47 +000013555echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13556echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13557if test `eval echo '${'$as_ac_var'}'` = yes; then
13558 cat >>confdefs.h <<_ACEOF
13559#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13560_ACEOF
13561 cat >conftest.$ac_ext <<_ACEOF
13562#line $LINENO "configure"
13563#include "confdefs.h"
13564#include <unistd.h>
13565#ifdef F77_DUMMY_MAIN
13566# ifdef __cplusplus
13567 extern "C"
13568# endif
13569 int F77_DUMMY_MAIN() { return 1; }
13570#endif
13571int
13572main ()
13573{
13574setpgrp(0,0);
13575 ;
13576 return 0;
13577}
13578_ACEOF
13579rm -f conftest.$ac_objext
13580if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13581 (eval $ac_compile) 2>&5
13582 ac_status=$?
13583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13584 (exit $ac_status); } &&
13585 { ac_try='test -s conftest.$ac_objext'
13586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13587 (eval $ac_try) 2>&5
13588 ac_status=$?
13589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13590 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013591
13592cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013593#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013594_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013595
Jack Jansen150753c2003-03-29 22:07:47 +000013596
13597else
13598 echo "$as_me: failed program was:" >&5
13599cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013600fi
Jack Jansen150753c2003-03-29 22:07:47 +000013601rm -f conftest.$ac_objext conftest.$ac_ext
13602
13603fi
13604done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013605
Martin v. Löwis11437992002-04-12 09:54:03 +000013606
Thomas Wouters3a584202000-08-05 23:28:51 +000013607for ac_func in gettimeofday
13608do
Martin v. Löwis11437992002-04-12 09:54:03 +000013609as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13610echo "$as_me:$LINENO: checking for $ac_func" >&5
13611echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13612if eval "test \"\${$as_ac_var+set}\" = set"; then
13613 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013614else
Martin v. Löwis11437992002-04-12 09:54:03 +000013615 cat >conftest.$ac_ext <<_ACEOF
13616#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013617#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013618/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013619 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013620#include <assert.h>
13621/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013622#ifdef __cplusplus
13623extern "C"
13624#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013625/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013626 builtin and then its argument prototype would still apply. */
13627char $ac_func ();
13628char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013629
Barry Warsawfe33b792003-01-07 22:42:49 +000013630#ifdef F77_DUMMY_MAIN
13631# ifdef __cplusplus
13632 extern "C"
13633# endif
13634 int F77_DUMMY_MAIN() { return 1; }
13635#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013636int
13637main ()
13638{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013639/* The GNU C library defines this for functions which it implements
13640 to always fail with ENOSYS. Some functions are actually named
13641 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013642#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013643choke me
13644#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013645f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013646#endif
13647
Martin v. Löwis11437992002-04-12 09:54:03 +000013648 ;
13649 return 0;
13650}
13651_ACEOF
13652rm -f conftest.$ac_objext conftest$ac_exeext
13653if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13654 (eval $ac_link) 2>&5
13655 ac_status=$?
13656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13657 (exit $ac_status); } &&
13658 { ac_try='test -s conftest$ac_exeext'
13659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13660 (eval $ac_try) 2>&5
13661 ac_status=$?
13662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13663 (exit $ac_status); }; }; then
13664 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013665else
Martin v. Löwis11437992002-04-12 09:54:03 +000013666 echo "$as_me: failed program was:" >&5
13667cat conftest.$ac_ext >&5
13668eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013669fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013670rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013671fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013672echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13673echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13674if test `eval echo '${'$as_ac_var'}'` = yes; then
13675 cat >>confdefs.h <<_ACEOF
13676#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13677_ACEOF
13678 cat >conftest.$ac_ext <<_ACEOF
13679#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013680#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013681#include <sys/time.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000013682#ifdef F77_DUMMY_MAIN
13683# ifdef __cplusplus
13684 extern "C"
13685# endif
13686 int F77_DUMMY_MAIN() { return 1; }
13687#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013688int
13689main ()
13690{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013691gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013692 ;
13693 return 0;
13694}
13695_ACEOF
13696rm -f conftest.$ac_objext
13697if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13698 (eval $ac_compile) 2>&5
13699 ac_status=$?
13700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13701 (exit $ac_status); } &&
13702 { ac_try='test -s conftest.$ac_objext'
13703 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13704 (eval $ac_try) 2>&5
13705 ac_status=$?
13706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13707 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013708 :
13709else
Martin v. Löwis11437992002-04-12 09:54:03 +000013710 echo "$as_me: failed program was:" >&5
13711cat conftest.$ac_ext >&5
13712
13713cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013714#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013715_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013716
Martin v. Löwis11437992002-04-12 09:54:03 +000013717
Guido van Rossum627b2d71993-12-24 10:39:16 +000013718fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013719rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013720
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013721fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013722done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013723
Michael W. Hudson54241132001-12-07 15:38:26 +000013724
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013725echo "$as_me:$LINENO: checking for major" >&5
13726echo $ECHO_N "checking for major... $ECHO_C" >&6
13727cat >conftest.$ac_ext <<_ACEOF
13728#line $LINENO "configure"
13729#include "confdefs.h"
13730
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013731#if defined(MAJOR_IN_MKDEV)
13732#include <sys/mkdev.h>
13733#elif defined(MAJOR_IN_SYSMACROS)
13734#include <sys/sysmacros.h>
13735#else
13736#include <sys/types.h>
13737#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013738
Barry Warsawfe33b792003-01-07 22:42:49 +000013739#ifdef F77_DUMMY_MAIN
13740# ifdef __cplusplus
13741 extern "C"
13742# endif
13743 int F77_DUMMY_MAIN() { return 1; }
13744#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013745int
13746main ()
13747{
13748
13749 makedev(major(0),minor(0));
13750
13751 ;
13752 return 0;
13753}
13754_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000013755rm -f conftest.$ac_objext conftest$ac_exeext
13756if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13757 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013758 ac_status=$?
13759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13760 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000013761 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013762 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13763 (eval $ac_try) 2>&5
13764 ac_status=$?
13765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13766 (exit $ac_status); }; }; then
13767
13768
13769cat >>confdefs.h <<\_ACEOF
13770#define HAVE_DEVICE_MACROS 1
13771_ACEOF
13772
13773 echo "$as_me:$LINENO: result: yes" >&5
13774echo "${ECHO_T}yes" >&6
13775
13776else
13777 echo "$as_me: failed program was:" >&5
13778cat conftest.$ac_ext >&5
13779
13780 echo "$as_me:$LINENO: result: no" >&5
13781echo "${ECHO_T}no" >&6
13782
13783fi
Martin v. Löwise3271202002-11-07 07:42:30 +000013784rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013785
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013786# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013787# for [no]getaddrinfo in netdb.h.
13788echo "$as_me:$LINENO: checking for getaddrinfo" >&5
13789echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
13790cat >conftest.$ac_ext <<_ACEOF
13791#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013792#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013793
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013794#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013795#include <sys/socket.h>
13796#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013797#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013798
Barry Warsawfe33b792003-01-07 22:42:49 +000013799#ifdef F77_DUMMY_MAIN
13800# ifdef __cplusplus
13801 extern "C"
13802# endif
13803 int F77_DUMMY_MAIN() { return 1; }
13804#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013805int
13806main ()
13807{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013808
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013809getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013810
Martin v. Löwis11437992002-04-12 09:54:03 +000013811 ;
13812 return 0;
13813}
13814_ACEOF
13815rm -f conftest.$ac_objext conftest$ac_exeext
13816if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13817 (eval $ac_link) 2>&5
13818 ac_status=$?
13819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13820 (exit $ac_status); } &&
13821 { ac_try='test -s conftest$ac_exeext'
13822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13823 (eval $ac_try) 2>&5
13824 ac_status=$?
13825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13826 (exit $ac_status); }; }; then
13827
13828echo "$as_me:$LINENO: result: yes" >&5
13829echo "${ECHO_T}yes" >&6
13830echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
13831echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013832if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013833 echo "$as_me:$LINENO: result: buggy" >&5
13834echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013835buggygetaddrinfo=yes
13836else
Martin v. Löwis11437992002-04-12 09:54:03 +000013837 cat >conftest.$ac_ext <<_ACEOF
13838#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013839#include "confdefs.h"
13840
13841#include <sys/types.h>
13842#include <netdb.h>
13843#include <string.h>
13844#include <sys/socket.h>
13845#include <netinet/in.h>
13846
13847main()
13848{
13849 int passive, gaierr, inet4 = 0, inet6 = 0;
13850 struct addrinfo hints, *ai, *aitop;
13851 char straddr[INET6_ADDRSTRLEN], strport[16];
13852
13853 for (passive = 0; passive <= 1; passive++) {
13854 memset(&hints, 0, sizeof(hints));
13855 hints.ai_family = AF_UNSPEC;
13856 hints.ai_flags = passive ? AI_PASSIVE : 0;
13857 hints.ai_socktype = SOCK_STREAM;
13858 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13859 (void)gai_strerror(gaierr);
13860 goto bad;
13861 }
13862 for (ai = aitop; ai; ai = ai->ai_next) {
13863 if (ai->ai_addr == NULL ||
13864 ai->ai_addrlen == 0 ||
13865 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13866 straddr, sizeof(straddr), strport, sizeof(strport),
13867 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13868 goto bad;
13869 }
13870 switch (ai->ai_family) {
13871 case AF_INET:
13872 if (strcmp(strport, "54321") != 0) {
13873 goto bad;
13874 }
13875 if (passive) {
13876 if (strcmp(straddr, "0.0.0.0") != 0) {
13877 goto bad;
13878 }
13879 } else {
13880 if (strcmp(straddr, "127.0.0.1") != 0) {
13881 goto bad;
13882 }
13883 }
13884 inet4++;
13885 break;
13886 case AF_INET6:
13887 if (strcmp(strport, "54321") != 0) {
13888 goto bad;
13889 }
13890 if (passive) {
13891 if (strcmp(straddr, "::") != 0) {
13892 goto bad;
13893 }
13894 } else {
13895 if (strcmp(straddr, "::1") != 0) {
13896 goto bad;
13897 }
13898 }
13899 inet6++;
13900 break;
13901 case AF_UNSPEC:
13902 goto bad;
13903 break;
13904 default:
13905 /* another family support? */
13906 break;
13907 }
13908 }
13909 }
13910
13911 if (!(inet4 == 0 || inet4 == 2))
13912 goto bad;
13913 if (!(inet6 == 0 || inet6 == 2))
13914 goto bad;
13915
13916 if (aitop)
13917 freeaddrinfo(aitop);
13918 exit(0);
13919
13920 bad:
13921 if (aitop)
13922 freeaddrinfo(aitop);
13923 exit(1);
13924}
13925
Martin v. Löwis11437992002-04-12 09:54:03 +000013926_ACEOF
13927rm -f conftest$ac_exeext
13928if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13929 (eval $ac_link) 2>&5
13930 ac_status=$?
13931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13932 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13934 (eval $ac_try) 2>&5
13935 ac_status=$?
13936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13937 (exit $ac_status); }; }; then
13938 echo "$as_me:$LINENO: result: good" >&5
13939echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013940buggygetaddrinfo=no
13941else
Martin v. Löwis11437992002-04-12 09:54:03 +000013942 echo "$as_me: program exited with status $ac_status" >&5
13943echo "$as_me: failed program was:" >&5
13944cat conftest.$ac_ext >&5
13945( exit $ac_status )
13946echo "$as_me:$LINENO: result: buggy" >&5
13947echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013948buggygetaddrinfo=yes
13949fi
Barry Warsawfe33b792003-01-07 22:42:49 +000013950rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013951fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013952else
Martin v. Löwis11437992002-04-12 09:54:03 +000013953 echo "$as_me: failed program was:" >&5
13954cat conftest.$ac_ext >&5
13955
13956echo "$as_me:$LINENO: result: no" >&5
13957echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013958buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013959
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013960fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013961rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013962
13963if test "$buggygetaddrinfo" = "yes"; then
13964 if test "$ipv6" = "yes"; then
13965 echo 'Fatal: You must get working getaddrinfo() function.'
13966 echo ' or you can specify "--disable-ipv6"'.
13967 exit 1
13968 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013969else
Martin v. Löwis11437992002-04-12 09:54:03 +000013970
13971cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013972#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013973_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013974
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013975fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013976
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013977for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013978do
Martin v. Löwis11437992002-04-12 09:54:03 +000013979as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13980echo "$as_me:$LINENO: checking for $ac_func" >&5
13981echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13982if eval "test \"\${$as_ac_var+set}\" = set"; then
13983 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013984else
Martin v. Löwis11437992002-04-12 09:54:03 +000013985 cat >conftest.$ac_ext <<_ACEOF
13986#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013987#include "confdefs.h"
13988/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013989 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013990#include <assert.h>
13991/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013992#ifdef __cplusplus
13993extern "C"
13994#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013995/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013996 builtin and then its argument prototype would still apply. */
13997char $ac_func ();
13998char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013999
Barry Warsawfe33b792003-01-07 22:42:49 +000014000#ifdef F77_DUMMY_MAIN
14001# ifdef __cplusplus
14002 extern "C"
14003# endif
14004 int F77_DUMMY_MAIN() { return 1; }
14005#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014006int
14007main ()
14008{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014009/* The GNU C library defines this for functions which it implements
14010 to always fail with ENOSYS. Some functions are actually named
14011 something starting with __ and the normal name is an alias. */
14012#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14013choke me
14014#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014015f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014016#endif
14017
Martin v. Löwis11437992002-04-12 09:54:03 +000014018 ;
14019 return 0;
14020}
14021_ACEOF
14022rm -f conftest.$ac_objext conftest$ac_exeext
14023if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14024 (eval $ac_link) 2>&5
14025 ac_status=$?
14026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14027 (exit $ac_status); } &&
14028 { ac_try='test -s conftest$ac_exeext'
14029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14030 (eval $ac_try) 2>&5
14031 ac_status=$?
14032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14033 (exit $ac_status); }; }; then
14034 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014035else
Martin v. Löwis11437992002-04-12 09:54:03 +000014036 echo "$as_me: failed program was:" >&5
14037cat conftest.$ac_ext >&5
14038eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014039fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014040rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014041fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014042echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14043echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14044if test `eval echo '${'$as_ac_var'}'` = yes; then
14045 cat >>confdefs.h <<_ACEOF
14046#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14047_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014048
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014049fi
14050done
14051
Michael W. Hudson54241132001-12-07 15:38:26 +000014052
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014053# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000014054echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
14055echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14056if test "${ac_cv_header_time+set}" = set; then
14057 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014058else
Martin v. Löwis11437992002-04-12 09:54:03 +000014059 cat >conftest.$ac_ext <<_ACEOF
14060#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014061#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014062#include <sys/types.h>
14063#include <sys/time.h>
14064#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014065
Barry Warsawfe33b792003-01-07 22:42:49 +000014066#ifdef F77_DUMMY_MAIN
14067# ifdef __cplusplus
14068 extern "C"
14069# endif
14070 int F77_DUMMY_MAIN() { return 1; }
14071#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014072int
14073main ()
14074{
14075if ((struct tm *) 0)
14076return 0;
14077 ;
14078 return 0;
14079}
14080_ACEOF
14081rm -f conftest.$ac_objext
14082if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14083 (eval $ac_compile) 2>&5
14084 ac_status=$?
14085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14086 (exit $ac_status); } &&
14087 { ac_try='test -s conftest.$ac_objext'
14088 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14089 (eval $ac_try) 2>&5
14090 ac_status=$?
14091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14092 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014093 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014094else
Martin v. Löwis11437992002-04-12 09:54:03 +000014095 echo "$as_me: failed program was:" >&5
14096cat conftest.$ac_ext >&5
14097ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014098fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014099rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014100fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014101echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
14102echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014103if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014104
14105cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014106#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014107_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014108
14109fi
14110
Martin v. Löwis11437992002-04-12 09:54:03 +000014111echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
14112echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
14113if test "${ac_cv_struct_tm+set}" = set; then
14114 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014115else
Martin v. Löwis11437992002-04-12 09:54:03 +000014116 cat >conftest.$ac_ext <<_ACEOF
14117#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014118#include "confdefs.h"
14119#include <sys/types.h>
14120#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014121
Barry Warsawfe33b792003-01-07 22:42:49 +000014122#ifdef F77_DUMMY_MAIN
14123# ifdef __cplusplus
14124 extern "C"
14125# endif
14126 int F77_DUMMY_MAIN() { return 1; }
14127#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014128int
14129main ()
14130{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014131struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000014132 ;
14133 return 0;
14134}
14135_ACEOF
14136rm -f conftest.$ac_objext
14137if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14138 (eval $ac_compile) 2>&5
14139 ac_status=$?
14140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14141 (exit $ac_status); } &&
14142 { ac_try='test -s conftest.$ac_objext'
14143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14144 (eval $ac_try) 2>&5
14145 ac_status=$?
14146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14147 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014148 ac_cv_struct_tm=time.h
14149else
Martin v. Löwis11437992002-04-12 09:54:03 +000014150 echo "$as_me: failed program was:" >&5
14151cat conftest.$ac_ext >&5
14152ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014153fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014154rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014155fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014156echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
14157echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014158if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014159
14160cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014161#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014162_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014163
14164fi
14165
Martin v. Löwis11437992002-04-12 09:54:03 +000014166echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
14167echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
14168if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
14169 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014170else
Martin v. Löwis11437992002-04-12 09:54:03 +000014171 cat >conftest.$ac_ext <<_ACEOF
14172#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014173#include "confdefs.h"
14174#include <sys/types.h>
14175#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000014176
14177
Barry Warsawfe33b792003-01-07 22:42:49 +000014178#ifdef F77_DUMMY_MAIN
14179# ifdef __cplusplus
14180 extern "C"
14181# endif
14182 int F77_DUMMY_MAIN() { return 1; }
14183#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014184int
14185main ()
14186{
14187static struct tm ac_aggr;
14188if (ac_aggr.tm_zone)
14189return 0;
14190 ;
14191 return 0;
14192}
14193_ACEOF
14194rm -f conftest.$ac_objext
14195if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14196 (eval $ac_compile) 2>&5
14197 ac_status=$?
14198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14199 (exit $ac_status); } &&
14200 { ac_try='test -s conftest.$ac_objext'
14201 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14202 (eval $ac_try) 2>&5
14203 ac_status=$?
14204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14205 (exit $ac_status); }; }; then
14206 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014207else
Martin v. Löwis11437992002-04-12 09:54:03 +000014208 echo "$as_me: failed program was:" >&5
14209cat conftest.$ac_ext >&5
14210ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014211fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014212rm -f conftest.$ac_objext conftest.$ac_ext
14213fi
14214echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
14215echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
14216if test $ac_cv_member_struct_tm_tm_zone = yes; then
14217
14218cat >>confdefs.h <<_ACEOF
14219#define HAVE_STRUCT_TM_TM_ZONE 1
14220_ACEOF
14221
14222
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014223fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014224
Martin v. Löwis11437992002-04-12 09:54:03 +000014225if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14226
14227cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014228#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014229_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014230
14231else
Martin v. Löwis11437992002-04-12 09:54:03 +000014232 echo "$as_me:$LINENO: checking for tzname" >&5
14233echo $ECHO_N "checking for tzname... $ECHO_C" >&6
14234if test "${ac_cv_var_tzname+set}" = set; then
14235 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014236else
Martin v. Löwis11437992002-04-12 09:54:03 +000014237 cat >conftest.$ac_ext <<_ACEOF
14238#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014239#include "confdefs.h"
14240#include <time.h>
14241#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014242extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014243#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014244
Barry Warsawfe33b792003-01-07 22:42:49 +000014245#ifdef F77_DUMMY_MAIN
14246# ifdef __cplusplus
14247 extern "C"
14248# endif
14249 int F77_DUMMY_MAIN() { return 1; }
14250#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014251int
14252main ()
14253{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014254atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000014255 ;
14256 return 0;
14257}
14258_ACEOF
14259rm -f conftest.$ac_objext conftest$ac_exeext
14260if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14261 (eval $ac_link) 2>&5
14262 ac_status=$?
14263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14264 (exit $ac_status); } &&
14265 { ac_try='test -s conftest$ac_exeext'
14266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14267 (eval $ac_try) 2>&5
14268 ac_status=$?
14269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14270 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014271 ac_cv_var_tzname=yes
14272else
Martin v. Löwis11437992002-04-12 09:54:03 +000014273 echo "$as_me: failed program was:" >&5
14274cat conftest.$ac_ext >&5
14275ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014276fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014277rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000014278fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014279echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
14280echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014281 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014282
14283cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014284#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014285_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014286
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014287 fi
14288fi
14289
Martin v. Löwis11437992002-04-12 09:54:03 +000014290echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
14291echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
14292if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
14293 echo $ECHO_N "(cached) $ECHO_C" >&6
14294else
14295 cat >conftest.$ac_ext <<_ACEOF
14296#line $LINENO "configure"
14297#include "confdefs.h"
14298$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014299#ifdef F77_DUMMY_MAIN
14300# ifdef __cplusplus
14301 extern "C"
14302# endif
14303 int F77_DUMMY_MAIN() { return 1; }
14304#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014305int
14306main ()
14307{
14308static struct stat ac_aggr;
14309if (ac_aggr.st_rdev)
14310return 0;
14311 ;
14312 return 0;
14313}
14314_ACEOF
14315rm -f conftest.$ac_objext
14316if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14317 (eval $ac_compile) 2>&5
14318 ac_status=$?
14319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14320 (exit $ac_status); } &&
14321 { ac_try='test -s conftest.$ac_objext'
14322 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14323 (eval $ac_try) 2>&5
14324 ac_status=$?
14325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14326 (exit $ac_status); }; }; then
14327 ac_cv_member_struct_stat_st_rdev=yes
14328else
14329 echo "$as_me: failed program was:" >&5
14330cat conftest.$ac_ext >&5
14331ac_cv_member_struct_stat_st_rdev=no
14332fi
14333rm -f conftest.$ac_objext conftest.$ac_ext
14334fi
14335echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
14336echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
14337if test $ac_cv_member_struct_stat_st_rdev = yes; then
14338
14339cat >>confdefs.h <<_ACEOF
14340#define HAVE_STRUCT_STAT_ST_RDEV 1
14341_ACEOF
14342
14343
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014344fi
14345
Martin v. Löwis11437992002-04-12 09:54:03 +000014346echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
14347echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
14348if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
14349 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014350else
Martin v. Löwis11437992002-04-12 09:54:03 +000014351 cat >conftest.$ac_ext <<_ACEOF
14352#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014353#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014354$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014355#ifdef F77_DUMMY_MAIN
14356# ifdef __cplusplus
14357 extern "C"
14358# endif
14359 int F77_DUMMY_MAIN() { return 1; }
14360#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014361int
14362main ()
14363{
14364static struct stat ac_aggr;
14365if (ac_aggr.st_blksize)
14366return 0;
14367 ;
14368 return 0;
14369}
14370_ACEOF
14371rm -f conftest.$ac_objext
14372if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14373 (eval $ac_compile) 2>&5
14374 ac_status=$?
14375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14376 (exit $ac_status); } &&
14377 { ac_try='test -s conftest.$ac_objext'
14378 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14379 (eval $ac_try) 2>&5
14380 ac_status=$?
14381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14382 (exit $ac_status); }; }; then
14383 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014384else
Martin v. Löwis11437992002-04-12 09:54:03 +000014385 echo "$as_me: failed program was:" >&5
14386cat conftest.$ac_ext >&5
14387ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014388fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014389rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014390fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014391echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
14392echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
14393if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014394
Martin v. Löwis11437992002-04-12 09:54:03 +000014395cat >>confdefs.h <<_ACEOF
14396#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
14397_ACEOF
14398
14399
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014400fi
14401
Martin v. Löwis11437992002-04-12 09:54:03 +000014402echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
14403echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
14404if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
14405 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014406else
Martin v. Löwis11437992002-04-12 09:54:03 +000014407 cat >conftest.$ac_ext <<_ACEOF
14408#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014409#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014410$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014411#ifdef F77_DUMMY_MAIN
14412# ifdef __cplusplus
14413 extern "C"
14414# endif
14415 int F77_DUMMY_MAIN() { return 1; }
14416#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014417int
14418main ()
14419{
14420static struct stat ac_aggr;
14421if (ac_aggr.st_blocks)
14422return 0;
14423 ;
14424 return 0;
14425}
14426_ACEOF
14427rm -f conftest.$ac_objext
14428if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14429 (eval $ac_compile) 2>&5
14430 ac_status=$?
14431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14432 (exit $ac_status); } &&
14433 { ac_try='test -s conftest.$ac_objext'
14434 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14435 (eval $ac_try) 2>&5
14436 ac_status=$?
14437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14438 (exit $ac_status); }; }; then
14439 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014440else
Martin v. Löwis11437992002-04-12 09:54:03 +000014441 echo "$as_me: failed program was:" >&5
14442cat conftest.$ac_ext >&5
14443ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014444fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014445rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014446fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014447echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
14448echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
14449if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014450
Martin v. Löwis11437992002-04-12 09:54:03 +000014451cat >>confdefs.h <<_ACEOF
14452#define HAVE_STRUCT_STAT_ST_BLOCKS 1
14453_ACEOF
14454
14455
14456cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014457#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014458_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014459
14460else
Martin v. Löwis11437992002-04-12 09:54:03 +000014461 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014462fi
14463
Michael W. Hudson54241132001-12-07 15:38:26 +000014464
Martin v. Löwis11437992002-04-12 09:54:03 +000014465
14466echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
14467echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
14468if test "${ac_cv_header_time_altzone+set}" = set; then
14469 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014470else
Martin v. Löwis11437992002-04-12 09:54:03 +000014471 cat >conftest.$ac_ext <<_ACEOF
14472#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014473#include "confdefs.h"
14474#include <time.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014475#ifdef F77_DUMMY_MAIN
14476# ifdef __cplusplus
14477 extern "C"
14478# endif
14479 int F77_DUMMY_MAIN() { return 1; }
14480#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014481int
14482main ()
14483{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014484return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000014485 ;
14486 return 0;
14487}
14488_ACEOF
14489rm -f conftest.$ac_objext
14490if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14491 (eval $ac_compile) 2>&5
14492 ac_status=$?
14493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14494 (exit $ac_status); } &&
14495 { ac_try='test -s conftest.$ac_objext'
14496 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14497 (eval $ac_try) 2>&5
14498 ac_status=$?
14499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14500 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014501 ac_cv_header_time_altzone=yes
14502else
Martin v. Löwis11437992002-04-12 09:54:03 +000014503 echo "$as_me: failed program was:" >&5
14504cat conftest.$ac_ext >&5
14505ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000014506fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014507rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014508fi
14509
Martin v. Löwis11437992002-04-12 09:54:03 +000014510echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
14511echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014512if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014513
14514cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014515#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014516_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014517
14518fi
14519
Guido van Rossumda88dad1995-01-26 00:46:29 +000014520was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014521echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
14522echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
14523cat >conftest.$ac_ext <<_ACEOF
14524#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014525#include "confdefs.h"
14526
14527#include <sys/types.h>
14528#include <sys/select.h>
14529#include <sys/time.h>
14530
Barry Warsawfe33b792003-01-07 22:42:49 +000014531#ifdef F77_DUMMY_MAIN
14532# ifdef __cplusplus
14533 extern "C"
14534# endif
14535 int F77_DUMMY_MAIN() { return 1; }
14536#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014537int
14538main ()
14539{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014540;
Martin v. Löwis11437992002-04-12 09:54:03 +000014541 ;
14542 return 0;
14543}
14544_ACEOF
14545rm -f conftest.$ac_objext
14546if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14547 (eval $ac_compile) 2>&5
14548 ac_status=$?
14549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14550 (exit $ac_status); } &&
14551 { ac_try='test -s conftest.$ac_objext'
14552 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14553 (eval $ac_try) 2>&5
14554 ac_status=$?
14555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14556 (exit $ac_status); }; }; then
14557
14558
14559cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014560#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014561_ACEOF
14562
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014563 was_it_defined=yes
14564
Guido van Rossumf78abae1997-01-21 22:02:36 +000014565else
Martin v. Löwis11437992002-04-12 09:54:03 +000014566 echo "$as_me: failed program was:" >&5
14567cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014568fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014569rm -f conftest.$ac_objext conftest.$ac_ext
14570echo "$as_me:$LINENO: result: $was_it_defined" >&5
14571echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000014572
Martin v. Löwis11437992002-04-12 09:54:03 +000014573echo "$as_me:$LINENO: checking for addrinfo" >&5
14574echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
14575if test "${ac_cv_struct_addrinfo+set}" = set; then
14576 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014577else
Martin v. Löwis11437992002-04-12 09:54:03 +000014578 cat >conftest.$ac_ext <<_ACEOF
14579#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014580#include "confdefs.h"
14581
14582# include <netdb.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014583#ifdef F77_DUMMY_MAIN
14584# ifdef __cplusplus
14585 extern "C"
14586# endif
14587 int F77_DUMMY_MAIN() { return 1; }
14588#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014589int
14590main ()
14591{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014592struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000014593 ;
14594 return 0;
14595}
14596_ACEOF
14597rm -f conftest.$ac_objext
14598if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14599 (eval $ac_compile) 2>&5
14600 ac_status=$?
14601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14602 (exit $ac_status); } &&
14603 { ac_try='test -s conftest.$ac_objext'
14604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14605 (eval $ac_try) 2>&5
14606 ac_status=$?
14607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14608 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014609 ac_cv_struct_addrinfo=yes
14610else
Martin v. Löwis11437992002-04-12 09:54:03 +000014611 echo "$as_me: failed program was:" >&5
14612cat conftest.$ac_ext >&5
14613ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014614fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014615rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014616fi
14617
Martin v. Löwis11437992002-04-12 09:54:03 +000014618echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
14619echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014620if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014621
14622cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014623#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014624_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014625
14626fi
14627
Martin v. Löwis11437992002-04-12 09:54:03 +000014628echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
14629echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
14630if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
14631 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014632else
Martin v. Löwis11437992002-04-12 09:54:03 +000014633 cat >conftest.$ac_ext <<_ACEOF
14634#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014635#include "confdefs.h"
14636
14637# include <sys/types.h>
14638# include <sys/socket.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014639#ifdef F77_DUMMY_MAIN
14640# ifdef __cplusplus
14641 extern "C"
14642# endif
14643 int F77_DUMMY_MAIN() { return 1; }
14644#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014645int
14646main ()
14647{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014648struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000014649 ;
14650 return 0;
14651}
14652_ACEOF
14653rm -f conftest.$ac_objext
14654if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14655 (eval $ac_compile) 2>&5
14656 ac_status=$?
14657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14658 (exit $ac_status); } &&
14659 { ac_try='test -s conftest.$ac_objext'
14660 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14661 (eval $ac_try) 2>&5
14662 ac_status=$?
14663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14664 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014665 ac_cv_struct_sockaddr_storage=yes
14666else
Martin v. Löwis11437992002-04-12 09:54:03 +000014667 echo "$as_me: failed program was:" >&5
14668cat conftest.$ac_ext >&5
14669ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014670fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014671rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014672fi
14673
Martin v. Löwis11437992002-04-12 09:54:03 +000014674echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
14675echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014676if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014677
14678cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014679#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014680_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014681
14682fi
14683
Guido van Rossum627b2d71993-12-24 10:39:16 +000014684# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000014685
Michael W. Hudson54241132001-12-07 15:38:26 +000014686
Martin v. Löwis11437992002-04-12 09:54:03 +000014687echo "$as_me:$LINENO: checking whether char is unsigned" >&5
14688echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
14689if test "${ac_cv_c_char_unsigned+set}" = set; then
14690 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000014691else
Martin v. Löwis11437992002-04-12 09:54:03 +000014692 cat >conftest.$ac_ext <<_ACEOF
14693#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000014694#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014695$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014696#ifdef F77_DUMMY_MAIN
14697# ifdef __cplusplus
14698 extern "C"
14699# endif
14700 int F77_DUMMY_MAIN() { return 1; }
14701#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014702int
14703main ()
14704{
14705static int test_array [1 - 2 * !(((char) -1) < 0)];
14706test_array [0] = 0
14707
14708 ;
14709 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000014710}
Martin v. Löwis11437992002-04-12 09:54:03 +000014711_ACEOF
14712rm -f conftest.$ac_objext
14713if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14714 (eval $ac_compile) 2>&5
14715 ac_status=$?
14716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14717 (exit $ac_status); } &&
14718 { ac_try='test -s conftest.$ac_objext'
14719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14720 (eval $ac_try) 2>&5
14721 ac_status=$?
14722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14723 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000014724 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014725else
14726 echo "$as_me: failed program was:" >&5
14727cat conftest.$ac_ext >&5
14728ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014729fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014730rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014731fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014732echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
14733echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014734if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014735 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014736#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014737_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014738
14739fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000014740
Barry Warsawfe33b792003-01-07 22:42:49 +000014741echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
14742echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
14743if test "${ac_cv_prog_cc_stdc+set}" = set; then
14744 echo $ECHO_N "(cached) $ECHO_C" >&6
14745else
14746 ac_cv_prog_cc_stdc=no
14747ac_save_CC=$CC
14748cat >conftest.$ac_ext <<_ACEOF
14749#line $LINENO "configure"
14750#include "confdefs.h"
14751#include <stdarg.h>
14752#include <stdio.h>
14753#include <sys/types.h>
14754#include <sys/stat.h>
14755/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
14756struct buf { int x; };
14757FILE * (*rcsopen) (struct buf *, struct stat *, int);
14758static char *e (p, i)
14759 char **p;
14760 int i;
14761{
14762 return p[i];
14763}
14764static char *f (char * (*g) (char **, int), char **p, ...)
14765{
14766 char *s;
14767 va_list v;
14768 va_start (v,p);
14769 s = g (p, va_arg (v,int));
14770 va_end (v);
14771 return s;
14772}
14773int test (int i, double x);
14774struct s1 {int (*f) (int a);};
14775struct s2 {int (*f) (double a);};
14776int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
14777int argc;
14778char **argv;
14779#ifdef F77_DUMMY_MAIN
14780# ifdef __cplusplus
14781 extern "C"
14782# endif
14783 int F77_DUMMY_MAIN() { return 1; }
14784#endif
14785int
14786main ()
14787{
14788return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
14789 ;
14790 return 0;
14791}
14792_ACEOF
14793# Don't try gcc -ansi; that turns off useful extensions and
14794# breaks some systems' header files.
14795# AIX -qlanglvl=ansi
14796# Ultrix and OSF/1 -std1
14797# HP-UX 10.20 and later -Ae
14798# HP-UX older versions -Aa -D_HPUX_SOURCE
14799# SVR4 -Xc -D__EXTENSIONS__
14800for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
14801do
14802 CC="$ac_save_CC $ac_arg"
14803 rm -f conftest.$ac_objext
14804if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14805 (eval $ac_compile) 2>&5
14806 ac_status=$?
14807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14808 (exit $ac_status); } &&
14809 { ac_try='test -s conftest.$ac_objext'
14810 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14811 (eval $ac_try) 2>&5
14812 ac_status=$?
14813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14814 (exit $ac_status); }; }; then
14815 ac_cv_prog_cc_stdc=$ac_arg
14816break
14817else
14818 echo "$as_me: failed program was:" >&5
14819cat conftest.$ac_ext >&5
14820fi
14821rm -f conftest.$ac_objext
14822done
14823rm -f conftest.$ac_ext conftest.$ac_objext
14824CC=$ac_save_CC
14825
14826fi
14827
14828case "x$ac_cv_prog_cc_stdc" in
14829 x|xno)
14830 echo "$as_me:$LINENO: result: none needed" >&5
14831echo "${ECHO_T}none needed" >&6 ;;
14832 *)
14833 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
14834echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
14835 CC="$CC $ac_cv_prog_cc_stdc" ;;
14836esac
14837
Martin v. Löwis11437992002-04-12 09:54:03 +000014838echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
14839echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14840if test "${ac_cv_c_const+set}" = set; then
14841 echo $ECHO_N "(cached) $ECHO_C" >&6
14842else
14843 cat >conftest.$ac_ext <<_ACEOF
14844#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014845#include "confdefs.h"
14846
Barry Warsawfe33b792003-01-07 22:42:49 +000014847#ifdef F77_DUMMY_MAIN
14848# ifdef __cplusplus
14849 extern "C"
14850# endif
14851 int F77_DUMMY_MAIN() { return 1; }
14852#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014853int
14854main ()
14855{
14856/* FIXME: Include the comments suggested by Paul. */
14857#ifndef __cplusplus
14858 /* Ultrix mips cc rejects this. */
14859 typedef int charset[2];
14860 const charset x;
14861 /* SunOS 4.1.1 cc rejects this. */
14862 char const *const *ccp;
14863 char **p;
14864 /* NEC SVR4.0.2 mips cc rejects this. */
14865 struct point {int x, y;};
14866 static struct point const zero = {0,0};
14867 /* AIX XL C 1.02.0.0 rejects this.
14868 It does not let you subtract one const X* pointer from another in
14869 an arm of an if-expression whose if-part is not a constant
14870 expression */
14871 const char *g = "string";
14872 ccp = &g + (g ? g-g : 0);
14873 /* HPUX 7.0 cc rejects these. */
14874 ++ccp;
14875 p = (char**) ccp;
14876 ccp = (char const *const *) p;
14877 { /* SCO 3.2v4 cc rejects this. */
14878 char *t;
14879 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014880
Martin v. Löwis11437992002-04-12 09:54:03 +000014881 *t++ = 0;
14882 }
14883 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
14884 int x[] = {25, 17};
14885 const int *foo = &x[0];
14886 ++foo;
14887 }
14888 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14889 typedef const int *iptr;
14890 iptr p = 0;
14891 ++p;
14892 }
14893 { /* AIX XL C 1.02.0.0 rejects this saying
14894 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14895 struct s { int j; const int *ap[3]; };
14896 struct s *b; b->j = 5;
14897 }
14898 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14899 const int foo = 10;
14900 }
14901#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000014902
Martin v. Löwis11437992002-04-12 09:54:03 +000014903 ;
14904 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000014905}
Martin v. Löwis11437992002-04-12 09:54:03 +000014906_ACEOF
14907rm -f conftest.$ac_objext
14908if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14909 (eval $ac_compile) 2>&5
14910 ac_status=$?
14911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14912 (exit $ac_status); } &&
14913 { ac_try='test -s conftest.$ac_objext'
14914 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14915 (eval $ac_try) 2>&5
14916 ac_status=$?
14917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14918 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014919 ac_cv_c_const=yes
14920else
Martin v. Löwis11437992002-04-12 09:54:03 +000014921 echo "$as_me: failed program was:" >&5
14922cat conftest.$ac_ext >&5
14923ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014924fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014925rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014926fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014927echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
14928echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014929if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014930
14931cat >>confdefs.h <<\_ACEOF
14932#define const
14933_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014934
14935fi
14936
Michael W. Hudson54241132001-12-07 15:38:26 +000014937
Guido van Rossumda88dad1995-01-26 00:46:29 +000014938works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014939echo "$as_me:$LINENO: checking for working volatile" >&5
14940echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
14941cat >conftest.$ac_ext <<_ACEOF
14942#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014943#include "confdefs.h"
14944
Barry Warsawfe33b792003-01-07 22:42:49 +000014945#ifdef F77_DUMMY_MAIN
14946# ifdef __cplusplus
14947 extern "C"
14948# endif
14949 int F77_DUMMY_MAIN() { return 1; }
14950#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014951int
14952main ()
14953{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014954volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014955 ;
14956 return 0;
14957}
14958_ACEOF
14959rm -f conftest.$ac_objext
14960if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14961 (eval $ac_compile) 2>&5
14962 ac_status=$?
14963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14964 (exit $ac_status); } &&
14965 { ac_try='test -s conftest.$ac_objext'
14966 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14967 (eval $ac_try) 2>&5
14968 ac_status=$?
14969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14970 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014971 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014972else
Martin v. Löwis11437992002-04-12 09:54:03 +000014973 echo "$as_me: failed program was:" >&5
14974cat conftest.$ac_ext >&5
14975
14976cat >>confdefs.h <<\_ACEOF
14977#define volatile
14978_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014979
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014980
Guido van Rossum627b2d71993-12-24 10:39:16 +000014981fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014982rm -f conftest.$ac_objext conftest.$ac_ext
14983echo "$as_me:$LINENO: result: $works" >&5
14984echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014985
Guido van Rossumda88dad1995-01-26 00:46:29 +000014986works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014987echo "$as_me:$LINENO: checking for working signed char" >&5
14988echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
14989cat >conftest.$ac_ext <<_ACEOF
14990#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014991#include "confdefs.h"
14992
Barry Warsawfe33b792003-01-07 22:42:49 +000014993#ifdef F77_DUMMY_MAIN
14994# ifdef __cplusplus
14995 extern "C"
14996# endif
14997 int F77_DUMMY_MAIN() { return 1; }
14998#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014999int
15000main ()
15001{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015002signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000015003 ;
15004 return 0;
15005}
15006_ACEOF
15007rm -f conftest.$ac_objext
15008if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15009 (eval $ac_compile) 2>&5
15010 ac_status=$?
15011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15012 (exit $ac_status); } &&
15013 { ac_try='test -s conftest.$ac_objext'
15014 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15015 (eval $ac_try) 2>&5
15016 ac_status=$?
15017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15018 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015019 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015020else
Martin v. Löwis11437992002-04-12 09:54:03 +000015021 echo "$as_me: failed program was:" >&5
15022cat conftest.$ac_ext >&5
15023
15024cat >>confdefs.h <<\_ACEOF
15025#define signed
15026_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000015027
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015028
Guido van Rossum7f43da71994-08-01 12:15:30 +000015029fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015030rm -f conftest.$ac_objext conftest.$ac_ext
15031echo "$as_me:$LINENO: result: $works" >&5
15032echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015033
Guido van Rossumda88dad1995-01-26 00:46:29 +000015034have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015035echo "$as_me:$LINENO: checking for prototypes" >&5
15036echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
15037cat >conftest.$ac_ext <<_ACEOF
15038#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015039#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015040int foo(int x) { return 0; }
Barry Warsawfe33b792003-01-07 22:42:49 +000015041#ifdef F77_DUMMY_MAIN
15042# ifdef __cplusplus
15043 extern "C"
15044# endif
15045 int F77_DUMMY_MAIN() { return 1; }
15046#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015047int
15048main ()
15049{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015050return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000015051 ;
15052 return 0;
15053}
15054_ACEOF
15055rm -f conftest.$ac_objext
15056if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15057 (eval $ac_compile) 2>&5
15058 ac_status=$?
15059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15060 (exit $ac_status); } &&
15061 { ac_try='test -s conftest.$ac_objext'
15062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15063 (eval $ac_try) 2>&5
15064 ac_status=$?
15065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15066 (exit $ac_status); }; }; then
15067
15068
15069cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015070#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015071_ACEOF
15072
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015073 have_prototypes=yes
15074
Guido van Rossumf78abae1997-01-21 22:02:36 +000015075else
Martin v. Löwis11437992002-04-12 09:54:03 +000015076 echo "$as_me: failed program was:" >&5
15077cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000015078fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015079rm -f conftest.$ac_objext conftest.$ac_ext
15080echo "$as_me:$LINENO: result: $have_prototypes" >&5
15081echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015082
Guido van Rossumda88dad1995-01-26 00:46:29 +000015083works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015084echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
15085echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
15086cat >conftest.$ac_ext <<_ACEOF
15087#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015088#include "confdefs.h"
15089
15090#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000015091int foo(int x, ...) {
15092 va_list va;
15093 va_start(va, x);
15094 va_arg(va, int);
15095 va_arg(va, char *);
15096 va_arg(va, double);
15097 return 0;
15098}
Guido van Rossum7f43da71994-08-01 12:15:30 +000015099
Barry Warsawfe33b792003-01-07 22:42:49 +000015100#ifdef F77_DUMMY_MAIN
15101# ifdef __cplusplus
15102 extern "C"
15103# endif
15104 int F77_DUMMY_MAIN() { return 1; }
15105#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015106int
15107main ()
15108{
Guido van Rossum90eea071996-08-30 20:58:57 +000015109return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000015110 ;
15111 return 0;
15112}
15113_ACEOF
15114rm -f conftest.$ac_objext
15115if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15116 (eval $ac_compile) 2>&5
15117 ac_status=$?
15118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15119 (exit $ac_status); } &&
15120 { ac_try='test -s conftest.$ac_objext'
15121 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15122 (eval $ac_try) 2>&5
15123 ac_status=$?
15124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15125 (exit $ac_status); }; }; then
15126
15127
15128cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015129#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015130_ACEOF
15131
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015132 works=yes
15133
Guido van Rossumf78abae1997-01-21 22:02:36 +000015134else
Martin v. Löwis11437992002-04-12 09:54:03 +000015135 echo "$as_me: failed program was:" >&5
15136cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000015137fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015138rm -f conftest.$ac_objext conftest.$ac_ext
15139echo "$as_me:$LINENO: result: $works" >&5
15140echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015141
Guido van Rossumda88dad1995-01-26 00:46:29 +000015142if test "$have_prototypes" = yes; then
15143bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015144echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
15145echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
15146cat >conftest.$ac_ext <<_ACEOF
15147#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015148#include "confdefs.h"
15149#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000015150#ifdef F77_DUMMY_MAIN
15151# ifdef __cplusplus
15152 extern "C"
15153# endif
15154 int F77_DUMMY_MAIN() { return 1; }
15155#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015156int
15157main ()
15158{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015159char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000015160 ;
15161 return 0;
15162}
15163_ACEOF
15164rm -f conftest.$ac_objext
15165if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15166 (eval $ac_compile) 2>&5
15167 ac_status=$?
15168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15169 (exit $ac_status); } &&
15170 { ac_try='test -s conftest.$ac_objext'
15171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15172 (eval $ac_try) 2>&5
15173 ac_status=$?
15174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15175 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000015176 :
15177else
Martin v. Löwis11437992002-04-12 09:54:03 +000015178 echo "$as_me: failed program was:" >&5
15179cat conftest.$ac_ext >&5
15180
15181cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015182#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015183_ACEOF
15184
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015185 bad_prototypes=yes
15186
Guido van Rossum627b2d71993-12-24 10:39:16 +000015187fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015188rm -f conftest.$ac_objext conftest.$ac_ext
15189echo "$as_me:$LINENO: result: $bad_prototypes" >&5
15190echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015191fi
15192
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015193# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000015194echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
15195echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
15196cat >conftest.$ac_ext <<_ACEOF
15197#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015198#include "confdefs.h"
15199#include <sys/types.h>
15200#include <sys/socket.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000015201#ifdef F77_DUMMY_MAIN
15202# ifdef __cplusplus
15203 extern "C"
15204# endif
15205 int F77_DUMMY_MAIN() { return 1; }
15206#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015207int
15208main ()
15209{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015210struct sockaddr x;
15211x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015212 ;
15213 return 0;
15214}
15215_ACEOF
15216rm -f conftest.$ac_objext
15217if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15218 (eval $ac_compile) 2>&5
15219 ac_status=$?
15220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15221 (exit $ac_status); } &&
15222 { ac_try='test -s conftest.$ac_objext'
15223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15224 (eval $ac_try) 2>&5
15225 ac_status=$?
15226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15227 (exit $ac_status); }; }; then
15228 echo "$as_me:$LINENO: result: yes" >&5
15229echo "${ECHO_T}yes" >&6
15230
15231cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015232#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015233_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015234
15235else
Martin v. Löwis11437992002-04-12 09:54:03 +000015236 echo "$as_me: failed program was:" >&5
15237cat conftest.$ac_ext >&5
15238echo "$as_me:$LINENO: result: no" >&5
15239echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015240fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015241rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015242
Guido van Rossumda88dad1995-01-26 00:46:29 +000015243va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015244echo "$as_me:$LINENO: checking whether va_list is an array" >&5
15245echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
15246cat >conftest.$ac_ext <<_ACEOF
15247#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015248#include "confdefs.h"
15249
15250#ifdef HAVE_STDARG_PROTOTYPES
15251#include <stdarg.h>
15252#else
15253#include <varargs.h>
15254#endif
15255
Barry Warsawfe33b792003-01-07 22:42:49 +000015256#ifdef F77_DUMMY_MAIN
15257# ifdef __cplusplus
15258 extern "C"
15259# endif
15260 int F77_DUMMY_MAIN() { return 1; }
15261#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015262int
15263main ()
15264{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015265va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000015266 ;
15267 return 0;
15268}
15269_ACEOF
15270rm -f conftest.$ac_objext
15271if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15272 (eval $ac_compile) 2>&5
15273 ac_status=$?
15274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15275 (exit $ac_status); } &&
15276 { ac_try='test -s conftest.$ac_objext'
15277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15278 (eval $ac_try) 2>&5
15279 ac_status=$?
15280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15281 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015282 :
15283else
Martin v. Löwis11437992002-04-12 09:54:03 +000015284 echo "$as_me: failed program was:" >&5
15285cat conftest.$ac_ext >&5
15286
15287
15288cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015289#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015290_ACEOF
15291
Guido van Rossumda88dad1995-01-26 00:46:29 +000015292 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015293
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015294fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015295rm -f conftest.$ac_objext conftest.$ac_ext
15296echo "$as_me:$LINENO: result: $va_list_is_array" >&5
15297echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015298
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015299# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000015300
15301
15302
15303echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
15304echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
15305if test "${ac_cv_func_gethostbyname_r+set}" = set; then
15306 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015307else
Martin v. Löwis11437992002-04-12 09:54:03 +000015308 cat >conftest.$ac_ext <<_ACEOF
15309#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015310#include "confdefs.h"
15311/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015312 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015313#include <assert.h>
15314/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015315#ifdef __cplusplus
15316extern "C"
15317#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015318/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015319 builtin and then its argument prototype would still apply. */
15320char gethostbyname_r ();
15321char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015322
Barry Warsawfe33b792003-01-07 22:42:49 +000015323#ifdef F77_DUMMY_MAIN
15324# ifdef __cplusplus
15325 extern "C"
15326# endif
15327 int F77_DUMMY_MAIN() { return 1; }
15328#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015329int
15330main ()
15331{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015332/* The GNU C library defines this for functions which it implements
15333 to always fail with ENOSYS. Some functions are actually named
15334 something starting with __ and the normal name is an alias. */
15335#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
15336choke me
15337#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015338f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015339#endif
15340
Martin v. Löwis11437992002-04-12 09:54:03 +000015341 ;
15342 return 0;
15343}
15344_ACEOF
15345rm -f conftest.$ac_objext conftest$ac_exeext
15346if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15347 (eval $ac_link) 2>&5
15348 ac_status=$?
15349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15350 (exit $ac_status); } &&
15351 { ac_try='test -s conftest$ac_exeext'
15352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15353 (eval $ac_try) 2>&5
15354 ac_status=$?
15355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15356 (exit $ac_status); }; }; then
15357 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015358else
Martin v. Löwis11437992002-04-12 09:54:03 +000015359 echo "$as_me: failed program was:" >&5
15360cat conftest.$ac_ext >&5
15361ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015362fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015363rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015364fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015365echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
15366echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
15367if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015368
Martin v. Löwis11437992002-04-12 09:54:03 +000015369 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015370#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015371_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015372
Martin v. Löwis11437992002-04-12 09:54:03 +000015373 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
15374echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015375 OLD_CFLAGS=$CFLAGS
15376 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015377 cat >conftest.$ac_ext <<_ACEOF
15378#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015379#include "confdefs.h"
15380
15381# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015382
Barry Warsawfe33b792003-01-07 22:42:49 +000015383#ifdef F77_DUMMY_MAIN
15384# ifdef __cplusplus
15385 extern "C"
15386# endif
15387 int F77_DUMMY_MAIN() { return 1; }
15388#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015389int
15390main ()
15391{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015392
15393 char *name;
15394 struct hostent *he, *res;
15395 char buffer[2048];
15396 int buflen = 2048;
15397 int h_errnop;
15398
15399 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015400
15401 ;
15402 return 0;
15403}
15404_ACEOF
15405rm -f conftest.$ac_objext
15406if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15407 (eval $ac_compile) 2>&5
15408 ac_status=$?
15409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15410 (exit $ac_status); } &&
15411 { ac_try='test -s conftest.$ac_objext'
15412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15413 (eval $ac_try) 2>&5
15414 ac_status=$?
15415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15416 (exit $ac_status); }; }; then
15417
15418 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015419#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015420_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015421
Martin v. Löwis11437992002-04-12 09:54:03 +000015422
15423cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015424#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015425_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015426
Martin v. Löwis11437992002-04-12 09:54:03 +000015427 echo "$as_me:$LINENO: result: yes" >&5
15428echo "${ECHO_T}yes" >&6
15429
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015430else
Martin v. Löwis11437992002-04-12 09:54:03 +000015431 echo "$as_me: failed program was:" >&5
15432cat conftest.$ac_ext >&5
15433
15434 echo "$as_me:$LINENO: result: no" >&5
15435echo "${ECHO_T}no" >&6
15436 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
15437echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
15438 cat >conftest.$ac_ext <<_ACEOF
15439#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015440#include "confdefs.h"
15441
15442# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015443
Barry Warsawfe33b792003-01-07 22:42:49 +000015444#ifdef F77_DUMMY_MAIN
15445# ifdef __cplusplus
15446 extern "C"
15447# endif
15448 int F77_DUMMY_MAIN() { return 1; }
15449#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015450int
15451main ()
15452{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015453
15454 char *name;
15455 struct hostent *he;
15456 char buffer[2048];
15457 int buflen = 2048;
15458 int h_errnop;
15459
15460 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015461
15462 ;
15463 return 0;
15464}
15465_ACEOF
15466rm -f conftest.$ac_objext
15467if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15468 (eval $ac_compile) 2>&5
15469 ac_status=$?
15470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15471 (exit $ac_status); } &&
15472 { ac_try='test -s conftest.$ac_objext'
15473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15474 (eval $ac_try) 2>&5
15475 ac_status=$?
15476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15477 (exit $ac_status); }; }; then
15478
15479 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015480#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015481_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015482
Martin v. Löwis11437992002-04-12 09:54:03 +000015483
15484cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015485#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015486_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015487
Martin v. Löwis11437992002-04-12 09:54:03 +000015488 echo "$as_me:$LINENO: result: yes" >&5
15489echo "${ECHO_T}yes" >&6
15490
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015491else
Martin v. Löwis11437992002-04-12 09:54:03 +000015492 echo "$as_me: failed program was:" >&5
15493cat conftest.$ac_ext >&5
15494
15495 echo "$as_me:$LINENO: result: no" >&5
15496echo "${ECHO_T}no" >&6
15497 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
15498echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
15499 cat >conftest.$ac_ext <<_ACEOF
15500#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015501#include "confdefs.h"
15502
15503# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015504
Barry Warsawfe33b792003-01-07 22:42:49 +000015505#ifdef F77_DUMMY_MAIN
15506# ifdef __cplusplus
15507 extern "C"
15508# endif
15509 int F77_DUMMY_MAIN() { return 1; }
15510#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015511int
15512main ()
15513{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015514
15515 char *name;
15516 struct hostent *he;
15517 struct hostent_data data;
15518
15519 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000015520
15521 ;
15522 return 0;
15523}
15524_ACEOF
15525rm -f conftest.$ac_objext
15526if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15527 (eval $ac_compile) 2>&5
15528 ac_status=$?
15529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15530 (exit $ac_status); } &&
15531 { ac_try='test -s conftest.$ac_objext'
15532 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15533 (eval $ac_try) 2>&5
15534 ac_status=$?
15535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15536 (exit $ac_status); }; }; then
15537
15538 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015539#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015540_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015541
Martin v. Löwis11437992002-04-12 09:54:03 +000015542
15543cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015544#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015545_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015546
Martin v. Löwis11437992002-04-12 09:54:03 +000015547 echo "$as_me:$LINENO: result: yes" >&5
15548echo "${ECHO_T}yes" >&6
15549
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015550else
Martin v. Löwis11437992002-04-12 09:54:03 +000015551 echo "$as_me: failed program was:" >&5
15552cat conftest.$ac_ext >&5
15553
15554 echo "$as_me:$LINENO: result: no" >&5
15555echo "${ECHO_T}no" >&6
15556
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015557fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015558rm -f conftest.$ac_objext conftest.$ac_ext
15559
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015560fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015561rm -f conftest.$ac_objext conftest.$ac_ext
15562
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015563fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015564rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015565 CFLAGS=$OLD_CFLAGS
15566
15567else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015568
Martin v. Löwis11437992002-04-12 09:54:03 +000015569
15570for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000015571do
Martin v. Löwis11437992002-04-12 09:54:03 +000015572as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15573echo "$as_me:$LINENO: checking for $ac_func" >&5
15574echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15575if eval "test \"\${$as_ac_var+set}\" = set"; then
15576 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015577else
Martin v. Löwis11437992002-04-12 09:54:03 +000015578 cat >conftest.$ac_ext <<_ACEOF
15579#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015580#include "confdefs.h"
15581/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015582 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015583#include <assert.h>
15584/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015585#ifdef __cplusplus
15586extern "C"
15587#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015588/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015589 builtin and then its argument prototype would still apply. */
15590char $ac_func ();
15591char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015592
Barry Warsawfe33b792003-01-07 22:42:49 +000015593#ifdef F77_DUMMY_MAIN
15594# ifdef __cplusplus
15595 extern "C"
15596# endif
15597 int F77_DUMMY_MAIN() { return 1; }
15598#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015599int
15600main ()
15601{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015602/* The GNU C library defines this for functions which it implements
15603 to always fail with ENOSYS. Some functions are actually named
15604 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015605#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015606choke me
15607#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015608f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015609#endif
15610
Martin v. Löwis11437992002-04-12 09:54:03 +000015611 ;
15612 return 0;
15613}
15614_ACEOF
15615rm -f conftest.$ac_objext conftest$ac_exeext
15616if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15617 (eval $ac_link) 2>&5
15618 ac_status=$?
15619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15620 (exit $ac_status); } &&
15621 { ac_try='test -s conftest$ac_exeext'
15622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15623 (eval $ac_try) 2>&5
15624 ac_status=$?
15625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15626 (exit $ac_status); }; }; then
15627 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015628else
Martin v. Löwis11437992002-04-12 09:54:03 +000015629 echo "$as_me: failed program was:" >&5
15630cat conftest.$ac_ext >&5
15631eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015632fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015633rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015634fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015635echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15636echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15637if test `eval echo '${'$as_ac_var'}'` = yes; then
15638 cat >>confdefs.h <<_ACEOF
15639#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15640_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015641
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015642fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015643done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015644
Michael W. Hudson54241132001-12-07 15:38:26 +000015645
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015646fi
15647
Michael W. Hudson54241132001-12-07 15:38:26 +000015648
15649
15650
15651
15652
15653
Guido van Rossum627b2d71993-12-24 10:39:16 +000015654# checks for system services
15655# (none yet)
15656
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015657# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000015658echo "$as_me:$LINENO: checking for __fpu_control" >&5
15659echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
15660if test "${ac_cv_func___fpu_control+set}" = set; then
15661 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015662else
Martin v. Löwis11437992002-04-12 09:54:03 +000015663 cat >conftest.$ac_ext <<_ACEOF
15664#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015665#include "confdefs.h"
15666/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015667 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015668#include <assert.h>
15669/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015670#ifdef __cplusplus
15671extern "C"
15672#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015673/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015674 builtin and then its argument prototype would still apply. */
15675char __fpu_control ();
15676char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015677
Barry Warsawfe33b792003-01-07 22:42:49 +000015678#ifdef F77_DUMMY_MAIN
15679# ifdef __cplusplus
15680 extern "C"
15681# endif
15682 int F77_DUMMY_MAIN() { return 1; }
15683#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015684int
15685main ()
15686{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015687/* The GNU C library defines this for functions which it implements
15688 to always fail with ENOSYS. Some functions are actually named
15689 something starting with __ and the normal name is an alias. */
15690#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
15691choke me
15692#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015693f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015694#endif
15695
Martin v. Löwis11437992002-04-12 09:54:03 +000015696 ;
15697 return 0;
15698}
15699_ACEOF
15700rm -f conftest.$ac_objext conftest$ac_exeext
15701if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15702 (eval $ac_link) 2>&5
15703 ac_status=$?
15704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15705 (exit $ac_status); } &&
15706 { ac_try='test -s conftest$ac_exeext'
15707 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15708 (eval $ac_try) 2>&5
15709 ac_status=$?
15710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15711 (exit $ac_status); }; }; then
15712 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015713else
Martin v. Löwis11437992002-04-12 09:54:03 +000015714 echo "$as_me: failed program was:" >&5
15715cat conftest.$ac_ext >&5
15716ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015717fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015718rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015719fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015720echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
15721echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
15722if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015723 :
15724else
Martin v. Löwis11437992002-04-12 09:54:03 +000015725
15726echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
15727echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
15728if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
15729 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015730else
Martin v. Löwis11437992002-04-12 09:54:03 +000015731 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015732LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015733cat >conftest.$ac_ext <<_ACEOF
15734#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015735#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015736
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015737/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015738#ifdef __cplusplus
15739extern "C"
15740#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015741/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015742 builtin and then its argument prototype would still apply. */
15743char __fpu_control ();
Barry Warsawfe33b792003-01-07 22:42:49 +000015744#ifdef F77_DUMMY_MAIN
15745# ifdef __cplusplus
15746 extern "C"
15747# endif
15748 int F77_DUMMY_MAIN() { return 1; }
15749#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015750int
15751main ()
15752{
15753__fpu_control ();
15754 ;
15755 return 0;
15756}
15757_ACEOF
15758rm -f conftest.$ac_objext conftest$ac_exeext
15759if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15760 (eval $ac_link) 2>&5
15761 ac_status=$?
15762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15763 (exit $ac_status); } &&
15764 { ac_try='test -s conftest$ac_exeext'
15765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15766 (eval $ac_try) 2>&5
15767 ac_status=$?
15768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15769 (exit $ac_status); }; }; then
15770 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015771else
Martin v. Löwis11437992002-04-12 09:54:03 +000015772 echo "$as_me: failed program was:" >&5
15773cat conftest.$ac_ext >&5
15774ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015775fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015776rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15777LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015778fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015779echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
15780echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
15781if test $ac_cv_lib_ieee___fpu_control = yes; then
15782 cat >>confdefs.h <<_ACEOF
15783#define HAVE_LIBIEEE 1
15784_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015785
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015786 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015787
Guido van Rossum627b2d71993-12-24 10:39:16 +000015788fi
15789
Michael W. Hudson54241132001-12-07 15:38:26 +000015790
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015791fi
15792
Michael W. Hudson54241132001-12-07 15:38:26 +000015793
Guido van Rossum7f253911997-05-09 02:42:48 +000015794# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000015795echo "$as_me:$LINENO: checking for --with-fpectl" >&5
15796echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
15797
Guido van Rossum7f253911997-05-09 02:42:48 +000015798# Check whether --with-fpectl or --without-fpectl was given.
15799if test "${with_fpectl+set}" = set; then
15800 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000015801
Guido van Rossum7f253911997-05-09 02:42:48 +000015802if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015803then
15804
15805cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000015806#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015807_ACEOF
15808
15809 echo "$as_me:$LINENO: result: yes" >&5
15810echo "${ECHO_T}yes" >&6
15811else echo "$as_me:$LINENO: result: no" >&5
15812echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015813fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015814else
Martin v. Löwis11437992002-04-12 09:54:03 +000015815 echo "$as_me:$LINENO: result: no" >&5
15816echo "${ECHO_T}no" >&6
15817fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000015818
Guido van Rossum7f43da71994-08-01 12:15:30 +000015819# check for --with-libm=...
15820
Guido van Rossum563e7081996-09-10 18:20:48 +000015821case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000015822Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015823BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000015824*) LIBM=-lm
15825esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015826echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
15827echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
15828
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015829# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015830if test "${with_libm+set}" = set; then
15831 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000015832
Guido van Rossum7f253911997-05-09 02:42:48 +000015833if test "$withval" = no
15834then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000015835 echo "$as_me:$LINENO: result: force LIBM empty" >&5
15836echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015837elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015838then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015839 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
15840echo "${ECHO_T}set LIBM=\"$withval\"" >&6
15841else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
15842echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
15843 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015844fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015845else
Martin v. Löwis11437992002-04-12 09:54:03 +000015846 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
15847echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
15848fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015849
15850# check for --with-libc=...
15851
Martin v. Löwis11437992002-04-12 09:54:03 +000015852echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
15853echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
15854
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015855# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015856if test "${with_libc+set}" = set; then
15857 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000015858
Guido van Rossum7f253911997-05-09 02:42:48 +000015859if test "$withval" = no
15860then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000015861 echo "$as_me:$LINENO: result: force LIBC empty" >&5
15862echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015863elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015864then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015865 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
15866echo "${ECHO_T}set LIBC=\"$withval\"" >&6
15867else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
15868echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
15869 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015870fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015871else
Martin v. Löwis11437992002-04-12 09:54:03 +000015872 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
15873echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
15874fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015875
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015876# check for hypot() in math library
15877LIBS_SAVE=$LIBS
15878LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000015879
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015880for ac_func in hypot
15881do
Martin v. Löwis11437992002-04-12 09:54:03 +000015882as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15883echo "$as_me:$LINENO: checking for $ac_func" >&5
15884echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15885if eval "test \"\${$as_ac_var+set}\" = set"; then
15886 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015887else
Martin v. Löwis11437992002-04-12 09:54:03 +000015888 cat >conftest.$ac_ext <<_ACEOF
15889#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015890#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015891/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015892 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015893#include <assert.h>
15894/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015895#ifdef __cplusplus
15896extern "C"
15897#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015898/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015899 builtin and then its argument prototype would still apply. */
15900char $ac_func ();
15901char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015902
Barry Warsawfe33b792003-01-07 22:42:49 +000015903#ifdef F77_DUMMY_MAIN
15904# ifdef __cplusplus
15905 extern "C"
15906# endif
15907 int F77_DUMMY_MAIN() { return 1; }
15908#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015909int
15910main ()
15911{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015912/* The GNU C library defines this for functions which it implements
15913 to always fail with ENOSYS. Some functions are actually named
15914 something starting with __ and the normal name is an alias. */
15915#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15916choke me
15917#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015918f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015919#endif
15920
Martin v. Löwis11437992002-04-12 09:54:03 +000015921 ;
15922 return 0;
15923}
15924_ACEOF
15925rm -f conftest.$ac_objext conftest$ac_exeext
15926if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15927 (eval $ac_link) 2>&5
15928 ac_status=$?
15929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15930 (exit $ac_status); } &&
15931 { ac_try='test -s conftest$ac_exeext'
15932 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15933 (eval $ac_try) 2>&5
15934 ac_status=$?
15935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15936 (exit $ac_status); }; }; then
15937 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015938else
Martin v. Löwis11437992002-04-12 09:54:03 +000015939 echo "$as_me: failed program was:" >&5
15940cat conftest.$ac_ext >&5
15941eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015942fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015943rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015944fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015945echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15946echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15947if test `eval echo '${'$as_ac_var'}'` = yes; then
15948 cat >>confdefs.h <<_ACEOF
15949#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15950_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000015951
Michael W. Hudson54241132001-12-07 15:38:26 +000015952else
Martin v. Löwis11437992002-04-12 09:54:03 +000015953 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015954fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015955done
15956
Michael W. Hudson54241132001-12-07 15:38:26 +000015957
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015958LIBS=$LIBS_SAVE
15959
Guido van Rossumef2255b2000-03-10 22:30:29 +000015960# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015961if test "${ac_cv_header_wchar_h+set}" = set; then
15962 echo "$as_me:$LINENO: checking for wchar.h" >&5
15963echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15964if test "${ac_cv_header_wchar_h+set}" = set; then
15965 echo $ECHO_N "(cached) $ECHO_C" >&6
15966fi
15967echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15968echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015969else
Martin v. Löwis11437992002-04-12 09:54:03 +000015970 # Is the header compilable?
15971echo "$as_me:$LINENO: checking wchar.h usability" >&5
15972echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
15973cat >conftest.$ac_ext <<_ACEOF
15974#line $LINENO "configure"
15975#include "confdefs.h"
15976$ac_includes_default
15977#include <wchar.h>
15978_ACEOF
15979rm -f conftest.$ac_objext
15980if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15981 (eval $ac_compile) 2>&5
15982 ac_status=$?
15983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15984 (exit $ac_status); } &&
15985 { ac_try='test -s conftest.$ac_objext'
15986 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15987 (eval $ac_try) 2>&5
15988 ac_status=$?
15989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15990 (exit $ac_status); }; }; then
15991 ac_header_compiler=yes
15992else
15993 echo "$as_me: failed program was:" >&5
15994cat conftest.$ac_ext >&5
15995ac_header_compiler=no
15996fi
15997rm -f conftest.$ac_objext conftest.$ac_ext
15998echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15999echo "${ECHO_T}$ac_header_compiler" >&6
16000
16001# Is the header present?
16002echo "$as_me:$LINENO: checking wchar.h presence" >&5
16003echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
16004cat >conftest.$ac_ext <<_ACEOF
16005#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016006#include "confdefs.h"
16007#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016008_ACEOF
16009if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16010 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16011 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000016012 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016013 rm -f conftest.er1
16014 cat conftest.err >&5
16015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16016 (exit $ac_status); } >/dev/null; then
16017 if test -s conftest.err; then
16018 ac_cpp_err=$ac_c_preproc_warn_flag
16019 else
16020 ac_cpp_err=
16021 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016022else
Martin v. Löwis11437992002-04-12 09:54:03 +000016023 ac_cpp_err=yes
16024fi
16025if test -z "$ac_cpp_err"; then
16026 ac_header_preproc=yes
16027else
16028 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000016029 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016030 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016031fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016032rm -f conftest.err conftest.$ac_ext
16033echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16034echo "${ECHO_T}$ac_header_preproc" >&6
16035
16036# So? What about this header?
16037case $ac_header_compiler:$ac_header_preproc in
16038 yes:no )
16039 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
16040echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16041 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
16042echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
16043 no:yes )
16044 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
16045echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
16046 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
16047echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
16048 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
16049echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
16050esac
16051echo "$as_me:$LINENO: checking for wchar.h" >&5
16052echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16053if test "${ac_cv_header_wchar_h+set}" = set; then
16054 echo $ECHO_N "(cached) $ECHO_C" >&6
16055else
16056 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000016057fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016058echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16059echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
16060
16061fi
16062if test $ac_cv_header_wchar_h = yes; then
16063
16064
16065cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016066#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016067_ACEOF
16068
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016069 wchar_h="yes"
16070
Guido van Rossumef2255b2000-03-10 22:30:29 +000016071else
Martin v. Löwis11437992002-04-12 09:54:03 +000016072 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016073
16074fi
16075
Michael W. Hudson54241132001-12-07 15:38:26 +000016076
Martin v. Löwis11437992002-04-12 09:54:03 +000016077
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016078# determine wchar_t size
16079if test "$wchar_h" = yes
16080then
Martin v. Löwis11437992002-04-12 09:54:03 +000016081 echo "$as_me:$LINENO: checking for wchar_t" >&5
16082echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
16083if test "${ac_cv_type_wchar_t+set}" = set; then
16084 echo $ECHO_N "(cached) $ECHO_C" >&6
16085else
16086 cat >conftest.$ac_ext <<_ACEOF
16087#line $LINENO "configure"
16088#include "confdefs.h"
16089#include <wchar.h>
16090
Barry Warsawfe33b792003-01-07 22:42:49 +000016091#ifdef F77_DUMMY_MAIN
16092# ifdef __cplusplus
16093 extern "C"
16094# endif
16095 int F77_DUMMY_MAIN() { return 1; }
16096#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016097int
16098main ()
16099{
16100if ((wchar_t *) 0)
16101 return 0;
16102if (sizeof (wchar_t))
16103 return 0;
16104 ;
16105 return 0;
16106}
16107_ACEOF
16108rm -f conftest.$ac_objext
16109if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16110 (eval $ac_compile) 2>&5
16111 ac_status=$?
16112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16113 (exit $ac_status); } &&
16114 { ac_try='test -s conftest.$ac_objext'
16115 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16116 (eval $ac_try) 2>&5
16117 ac_status=$?
16118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16119 (exit $ac_status); }; }; then
16120 ac_cv_type_wchar_t=yes
16121else
16122 echo "$as_me: failed program was:" >&5
16123cat conftest.$ac_ext >&5
16124ac_cv_type_wchar_t=no
16125fi
16126rm -f conftest.$ac_objext conftest.$ac_ext
16127fi
16128echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
16129echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
16130
16131echo "$as_me:$LINENO: checking size of wchar_t" >&5
16132echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
16133if test "${ac_cv_sizeof_wchar_t+set}" = set; then
16134 echo $ECHO_N "(cached) $ECHO_C" >&6
16135else
16136 if test "$ac_cv_type_wchar_t" = yes; then
16137 # The cast to unsigned long works around a bug in the HP C Compiler
16138 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16139 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16140 # This bug is HP SR number 8606223364.
16141 if test "$cross_compiling" = yes; then
16142 # Depending upon the size, compute the lo and hi bounds.
16143cat >conftest.$ac_ext <<_ACEOF
16144#line $LINENO "configure"
16145#include "confdefs.h"
16146#include <wchar.h>
16147
Barry Warsawfe33b792003-01-07 22:42:49 +000016148#ifdef F77_DUMMY_MAIN
16149# ifdef __cplusplus
16150 extern "C"
16151# endif
16152 int F77_DUMMY_MAIN() { return 1; }
16153#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016154int
16155main ()
16156{
16157static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
16158test_array [0] = 0
16159
16160 ;
16161 return 0;
16162}
16163_ACEOF
16164rm -f conftest.$ac_objext
16165if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16166 (eval $ac_compile) 2>&5
16167 ac_status=$?
16168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16169 (exit $ac_status); } &&
16170 { ac_try='test -s conftest.$ac_objext'
16171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16172 (eval $ac_try) 2>&5
16173 ac_status=$?
16174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16175 (exit $ac_status); }; }; then
16176 ac_lo=0 ac_mid=0
16177 while :; do
16178 cat >conftest.$ac_ext <<_ACEOF
16179#line $LINENO "configure"
16180#include "confdefs.h"
16181#include <wchar.h>
16182
Barry Warsawfe33b792003-01-07 22:42:49 +000016183#ifdef F77_DUMMY_MAIN
16184# ifdef __cplusplus
16185 extern "C"
16186# endif
16187 int F77_DUMMY_MAIN() { return 1; }
16188#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016189int
16190main ()
16191{
16192static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16193test_array [0] = 0
16194
16195 ;
16196 return 0;
16197}
16198_ACEOF
16199rm -f conftest.$ac_objext
16200if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16201 (eval $ac_compile) 2>&5
16202 ac_status=$?
16203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16204 (exit $ac_status); } &&
16205 { ac_try='test -s conftest.$ac_objext'
16206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16207 (eval $ac_try) 2>&5
16208 ac_status=$?
16209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16210 (exit $ac_status); }; }; then
16211 ac_hi=$ac_mid; break
16212else
16213 echo "$as_me: failed program was:" >&5
16214cat conftest.$ac_ext >&5
16215ac_lo=`expr $ac_mid + 1`
16216 if test $ac_lo -le $ac_mid; then
16217 ac_lo= ac_hi=
16218 break
16219 fi
16220 ac_mid=`expr 2 '*' $ac_mid + 1`
16221fi
16222rm -f conftest.$ac_objext conftest.$ac_ext
16223 done
16224else
16225 echo "$as_me: failed program was:" >&5
16226cat conftest.$ac_ext >&5
16227cat >conftest.$ac_ext <<_ACEOF
16228#line $LINENO "configure"
16229#include "confdefs.h"
16230#include <wchar.h>
16231
Barry Warsawfe33b792003-01-07 22:42:49 +000016232#ifdef F77_DUMMY_MAIN
16233# ifdef __cplusplus
16234 extern "C"
16235# endif
16236 int F77_DUMMY_MAIN() { return 1; }
16237#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016238int
16239main ()
16240{
16241static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
16242test_array [0] = 0
16243
16244 ;
16245 return 0;
16246}
16247_ACEOF
16248rm -f conftest.$ac_objext
16249if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16250 (eval $ac_compile) 2>&5
16251 ac_status=$?
16252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16253 (exit $ac_status); } &&
16254 { ac_try='test -s conftest.$ac_objext'
16255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16256 (eval $ac_try) 2>&5
16257 ac_status=$?
16258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16259 (exit $ac_status); }; }; then
16260 ac_hi=-1 ac_mid=-1
16261 while :; do
16262 cat >conftest.$ac_ext <<_ACEOF
16263#line $LINENO "configure"
16264#include "confdefs.h"
16265#include <wchar.h>
16266
Barry Warsawfe33b792003-01-07 22:42:49 +000016267#ifdef F77_DUMMY_MAIN
16268# ifdef __cplusplus
16269 extern "C"
16270# endif
16271 int F77_DUMMY_MAIN() { return 1; }
16272#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016273int
16274main ()
16275{
16276static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
16277test_array [0] = 0
16278
16279 ;
16280 return 0;
16281}
16282_ACEOF
16283rm -f conftest.$ac_objext
16284if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16285 (eval $ac_compile) 2>&5
16286 ac_status=$?
16287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16288 (exit $ac_status); } &&
16289 { ac_try='test -s conftest.$ac_objext'
16290 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16291 (eval $ac_try) 2>&5
16292 ac_status=$?
16293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16294 (exit $ac_status); }; }; then
16295 ac_lo=$ac_mid; break
16296else
16297 echo "$as_me: failed program was:" >&5
16298cat conftest.$ac_ext >&5
16299ac_hi=`expr '(' $ac_mid ')' - 1`
16300 if test $ac_mid -le $ac_hi; then
16301 ac_lo= ac_hi=
16302 break
16303 fi
16304 ac_mid=`expr 2 '*' $ac_mid`
16305fi
16306rm -f conftest.$ac_objext conftest.$ac_ext
16307 done
16308else
16309 echo "$as_me: failed program was:" >&5
16310cat conftest.$ac_ext >&5
16311ac_lo= ac_hi=
16312fi
16313rm -f conftest.$ac_objext conftest.$ac_ext
16314fi
16315rm -f conftest.$ac_objext conftest.$ac_ext
16316# Binary search between lo and hi bounds.
16317while test "x$ac_lo" != "x$ac_hi"; do
16318 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
16319 cat >conftest.$ac_ext <<_ACEOF
16320#line $LINENO "configure"
16321#include "confdefs.h"
16322#include <wchar.h>
16323
Barry Warsawfe33b792003-01-07 22:42:49 +000016324#ifdef F77_DUMMY_MAIN
16325# ifdef __cplusplus
16326 extern "C"
16327# endif
16328 int F77_DUMMY_MAIN() { return 1; }
16329#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016330int
16331main ()
16332{
16333static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16334test_array [0] = 0
16335
16336 ;
16337 return 0;
16338}
16339_ACEOF
16340rm -f conftest.$ac_objext
16341if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16342 (eval $ac_compile) 2>&5
16343 ac_status=$?
16344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16345 (exit $ac_status); } &&
16346 { ac_try='test -s conftest.$ac_objext'
16347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16348 (eval $ac_try) 2>&5
16349 ac_status=$?
16350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16351 (exit $ac_status); }; }; then
16352 ac_hi=$ac_mid
16353else
16354 echo "$as_me: failed program was:" >&5
16355cat conftest.$ac_ext >&5
16356ac_lo=`expr '(' $ac_mid ')' + 1`
16357fi
16358rm -f conftest.$ac_objext conftest.$ac_ext
16359done
16360case $ac_lo in
16361?*) ac_cv_sizeof_wchar_t=$ac_lo;;
16362'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
16363echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
16364 { (exit 1); exit 1; }; } ;;
16365esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016366else
16367 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016368 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
16369echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16370 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000016371else
Martin v. Löwis11437992002-04-12 09:54:03 +000016372 cat >conftest.$ac_ext <<_ACEOF
16373#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016374#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016375#include <wchar.h>
16376
16377long longval () { return (long) (sizeof (wchar_t)); }
16378unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000016379#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016380#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000016381#ifdef F77_DUMMY_MAIN
16382# ifdef __cplusplus
16383 extern "C"
16384# endif
16385 int F77_DUMMY_MAIN() { return 1; }
16386#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016387int
16388main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016389{
Martin v. Löwis11437992002-04-12 09:54:03 +000016390
16391 FILE *f = fopen ("conftest.val", "w");
16392 if (! f)
16393 exit (1);
16394 if (((long) (sizeof (wchar_t))) < 0)
16395 {
16396 long i = longval ();
16397 if (i != ((long) (sizeof (wchar_t))))
16398 exit (1);
16399 fprintf (f, "%ld\n", i);
16400 }
16401 else
16402 {
16403 unsigned long i = ulongval ();
16404 if (i != ((long) (sizeof (wchar_t))))
16405 exit (1);
16406 fprintf (f, "%lu\n", i);
16407 }
16408 exit (ferror (f) || fclose (f) != 0);
16409
16410 ;
16411 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000016412}
Martin v. Löwis11437992002-04-12 09:54:03 +000016413_ACEOF
16414rm -f conftest$ac_exeext
16415if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16416 (eval $ac_link) 2>&5
16417 ac_status=$?
16418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16419 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16421 (eval $ac_try) 2>&5
16422 ac_status=$?
16423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16424 (exit $ac_status); }; }; then
16425 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000016426else
Martin v. Löwis11437992002-04-12 09:54:03 +000016427 echo "$as_me: program exited with status $ac_status" >&5
16428echo "$as_me: failed program was:" >&5
16429cat conftest.$ac_ext >&5
16430( exit $ac_status )
16431{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
16432echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
16433 { (exit 1); exit 1; }; }
16434fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016435rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016436fi
16437fi
16438rm -f conftest.val
16439else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016440 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000016441fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016442fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016443echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
16444echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
16445cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016446#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016447_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016448
Michael W. Hudson54241132001-12-07 15:38:26 +000016449
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016450fi
16451
Martin v. Löwis11437992002-04-12 09:54:03 +000016452echo "$as_me:$LINENO: checking what type to use for unicode" >&5
16453echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016454# Check whether --enable-unicode or --disable-unicode was given.
16455if test "${enable_unicode+set}" = set; then
16456 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000016457
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016458else
16459 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000016460fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016461
16462if test $enable_unicode = yes
16463then
Martin v. Löwisfd917792001-06-27 20:22:04 +000016464 # Without any arguments, Py_UNICODE defaults to two-byte mode
16465 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016466fi
16467
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016468
16469
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016470case "$enable_unicode" in
16471ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000016472 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016473#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000016474_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016475
16476 ;;
16477ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000016478 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016479#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000016480_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016481
16482 ;;
16483esac
16484
Michael W. Hudson54241132001-12-07 15:38:26 +000016485
Martin v. Löwis11437992002-04-12 09:54:03 +000016486
16487
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016488
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016489if test "$enable_unicode" = "no"
16490then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016491 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000016492 echo "$as_me:$LINENO: result: not used" >&5
16493echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016494else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016495 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000016496
16497cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016498#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016499_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016500
16501 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
16502 then
16503 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016504
Martin v. Löwis11437992002-04-12 09:54:03 +000016505cat >>confdefs.h <<\_ACEOF
16506#define HAVE_USABLE_WCHAR_T 1
16507_ACEOF
16508
16509 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016510#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016511_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016512
16513 elif test "$ac_cv_sizeof_short" = "$unicode_size"
16514 then
16515 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000016516 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016517#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000016518_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016519
16520 elif test "$ac_cv_sizeof_long" = "$unicode_size"
16521 then
16522 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000016523 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016524#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000016525_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016526
16527 else
16528 PY_UNICODE_TYPE="no type found"
16529 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016530 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
16531echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016532fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016533
16534# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000016535echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
16536echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
16537if test "${ac_cv_c_bigendian+set}" = set; then
16538 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000016539else
Martin v. Löwis11437992002-04-12 09:54:03 +000016540 # See if sys/param.h defines the BYTE_ORDER macro.
16541cat >conftest.$ac_ext <<_ACEOF
16542#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016543#include "confdefs.h"
16544#include <sys/types.h>
16545#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000016546
Barry Warsawfe33b792003-01-07 22:42:49 +000016547#ifdef F77_DUMMY_MAIN
16548# ifdef __cplusplus
16549 extern "C"
16550# endif
16551 int F77_DUMMY_MAIN() { return 1; }
16552#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016553int
16554main ()
16555{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016556#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
16557 bogus endian macros
16558#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016559
16560 ;
16561 return 0;
16562}
16563_ACEOF
16564rm -f conftest.$ac_objext
16565if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16566 (eval $ac_compile) 2>&5
16567 ac_status=$?
16568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16569 (exit $ac_status); } &&
16570 { ac_try='test -s conftest.$ac_objext'
16571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16572 (eval $ac_try) 2>&5
16573 ac_status=$?
16574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16575 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016576 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000016577cat >conftest.$ac_ext <<_ACEOF
16578#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016579#include "confdefs.h"
16580#include <sys/types.h>
16581#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000016582
Barry Warsawfe33b792003-01-07 22:42:49 +000016583#ifdef F77_DUMMY_MAIN
16584# ifdef __cplusplus
16585 extern "C"
16586# endif
16587 int F77_DUMMY_MAIN() { return 1; }
16588#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016589int
16590main ()
16591{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016592#if BYTE_ORDER != BIG_ENDIAN
16593 not big endian
16594#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016595
16596 ;
16597 return 0;
16598}
16599_ACEOF
16600rm -f conftest.$ac_objext
16601if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16602 (eval $ac_compile) 2>&5
16603 ac_status=$?
16604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16605 (exit $ac_status); } &&
16606 { ac_try='test -s conftest.$ac_objext'
16607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16608 (eval $ac_try) 2>&5
16609 ac_status=$?
16610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16611 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016612 ac_cv_c_bigendian=yes
16613else
Martin v. Löwis11437992002-04-12 09:54:03 +000016614 echo "$as_me: failed program was:" >&5
16615cat conftest.$ac_ext >&5
16616ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016617fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016618rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016619else
Martin v. Löwis11437992002-04-12 09:54:03 +000016620 echo "$as_me: failed program was:" >&5
16621cat conftest.$ac_ext >&5
16622# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000016623if test "$cross_compiling" = yes; then
Barry Warsawfe33b792003-01-07 22:42:49 +000016624 # try to guess the endianess by grep'ing values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000016625 ac_cv_c_bigendian=unknown
16626 cat >conftest.$ac_ext <<_ACEOF
16627#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016628#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016629short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16630short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16631void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
16632short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16633short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16634void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Barry Warsawfe33b792003-01-07 22:42:49 +000016635#ifdef F77_DUMMY_MAIN
16636# ifdef __cplusplus
16637 extern "C"
16638# endif
16639 int F77_DUMMY_MAIN() { return 1; }
16640#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016641int
16642main ()
16643{
16644 _ascii (); _ebcdic ();
16645 ;
16646 return 0;
16647}
16648_ACEOF
16649rm -f conftest.$ac_objext
16650if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16651 (eval $ac_compile) 2>&5
16652 ac_status=$?
16653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16654 (exit $ac_status); } &&
16655 { ac_try='test -s conftest.$ac_objext'
16656 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16657 (eval $ac_try) 2>&5
16658 ac_status=$?
16659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16660 (exit $ac_status); }; }; then
Barry Warsawfe33b792003-01-07 22:42:49 +000016661 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016662 ac_cv_c_bigendian=yes
16663fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016664if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016665 if test "$ac_cv_c_bigendian" = unknown; then
16666 ac_cv_c_bigendian=no
16667 else
16668 # finding both strings is unlikely to happen, but who knows?
16669 ac_cv_c_bigendian=unknown
16670 fi
16671fi
16672else
16673 echo "$as_me: failed program was:" >&5
16674cat conftest.$ac_ext >&5
16675fi
16676rm -f conftest.$ac_objext conftest.$ac_ext
16677else
16678 cat >conftest.$ac_ext <<_ACEOF
16679#line $LINENO "configure"
16680#include "confdefs.h"
16681int
16682main ()
16683{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016684 /* Are we little or big endian? From Harbison&Steele. */
16685 union
16686 {
16687 long l;
16688 char c[sizeof (long)];
16689 } u;
16690 u.l = 1;
16691 exit (u.c[sizeof (long) - 1] == 1);
16692}
Martin v. Löwis11437992002-04-12 09:54:03 +000016693_ACEOF
16694rm -f conftest$ac_exeext
16695if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16696 (eval $ac_link) 2>&5
16697 ac_status=$?
16698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16699 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16701 (eval $ac_try) 2>&5
16702 ac_status=$?
16703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16704 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016705 ac_cv_c_bigendian=no
16706else
Martin v. Löwis11437992002-04-12 09:54:03 +000016707 echo "$as_me: program exited with status $ac_status" >&5
16708echo "$as_me: failed program was:" >&5
16709cat conftest.$ac_ext >&5
16710( exit $ac_status )
16711ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000016712fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016713rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016714fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016715fi
16716rm -f conftest.$ac_objext conftest.$ac_ext
16717fi
16718echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
16719echo "${ECHO_T}$ac_cv_c_bigendian" >&6
16720case $ac_cv_c_bigendian in
16721 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000016722
Martin v. Löwis11437992002-04-12 09:54:03 +000016723cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016724#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016725_ACEOF
16726 ;;
16727 no)
16728 ;;
16729 *)
Barry Warsawfe33b792003-01-07 22:42:49 +000016730 { { echo "$as_me:$LINENO: error: unknown endianess
Martin v. Löwis11437992002-04-12 09:54:03 +000016731presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Barry Warsawfe33b792003-01-07 22:42:49 +000016732echo "$as_me: error: unknown endianess
Martin v. Löwis11437992002-04-12 09:54:03 +000016733presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
16734 { (exit 1); exit 1; }; } ;;
16735esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000016736
Michael W. Hudson54241132001-12-07 15:38:26 +000016737
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016738# Check whether right shifting a negative integer extends the sign bit
16739# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000016740echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
16741echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
16742if test "${ac_cv_rshift_extends_sign+set}" = set; then
16743 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016744else
Martin v. Löwis11437992002-04-12 09:54:03 +000016745
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016746if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000016747 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016748else
Martin v. Löwis11437992002-04-12 09:54:03 +000016749 cat >conftest.$ac_ext <<_ACEOF
16750#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016751#include "confdefs.h"
16752
16753int main()
16754{
Vladimir Marangozova6180282000-07-12 05:05:06 +000016755 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016756}
16757
Martin v. Löwis11437992002-04-12 09:54:03 +000016758_ACEOF
16759rm -f conftest$ac_exeext
16760if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16761 (eval $ac_link) 2>&5
16762 ac_status=$?
16763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16764 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16766 (eval $ac_try) 2>&5
16767 ac_status=$?
16768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16769 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000016770 ac_cv_rshift_extends_sign=yes
16771else
Martin v. Löwis11437992002-04-12 09:54:03 +000016772 echo "$as_me: program exited with status $ac_status" >&5
16773echo "$as_me: failed program was:" >&5
16774cat conftest.$ac_ext >&5
16775( exit $ac_status )
16776ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000016777fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016778rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016779fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000016780fi
16781
Martin v. Löwis11437992002-04-12 09:54:03 +000016782echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
16783echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016784if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016785then
Martin v. Löwis11437992002-04-12 09:54:03 +000016786
16787cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016788#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016789_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016790
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016791fi
16792
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016793# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016794echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
16795echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
16796if test "${ac_cv_have_getc_unlocked+set}" = set; then
16797 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016798else
Martin v. Löwis11437992002-04-12 09:54:03 +000016799
16800cat >conftest.$ac_ext <<_ACEOF
16801#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016802#include "confdefs.h"
16803#include <stdio.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000016804#ifdef F77_DUMMY_MAIN
16805# ifdef __cplusplus
16806 extern "C"
16807# endif
16808 int F77_DUMMY_MAIN() { return 1; }
16809#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016810int
16811main ()
16812{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016813
16814 FILE *f = fopen("/dev/null", "r");
16815 flockfile(f);
16816 getc_unlocked(f);
16817 funlockfile(f);
16818
Martin v. Löwis11437992002-04-12 09:54:03 +000016819 ;
16820 return 0;
16821}
16822_ACEOF
16823rm -f conftest.$ac_objext conftest$ac_exeext
16824if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16825 (eval $ac_link) 2>&5
16826 ac_status=$?
16827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16828 (exit $ac_status); } &&
16829 { ac_try='test -s conftest$ac_exeext'
16830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16831 (eval $ac_try) 2>&5
16832 ac_status=$?
16833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16834 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016835 ac_cv_have_getc_unlocked=yes
16836else
Martin v. Löwis11437992002-04-12 09:54:03 +000016837 echo "$as_me: failed program was:" >&5
16838cat conftest.$ac_ext >&5
16839ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016840fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016841rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016842fi
16843
Martin v. Löwis11437992002-04-12 09:54:03 +000016844echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
16845echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016846if test "$ac_cv_have_getc_unlocked" = yes
16847then
Martin v. Löwis11437992002-04-12 09:54:03 +000016848
16849cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016850#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016851_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016852
16853fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016854
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000016855# check for readline 2.2
16856cat >conftest.$ac_ext <<_ACEOF
16857#line $LINENO "configure"
16858#include "confdefs.h"
16859#include <readline/readline.h>
16860_ACEOF
16861if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16862 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16863 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000016864 egrep -v '^ *\+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000016865 rm -f conftest.er1
16866 cat conftest.err >&5
16867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16868 (exit $ac_status); } >/dev/null; then
16869 if test -s conftest.err; then
16870 ac_cpp_err=$ac_c_preproc_warn_flag
16871 else
16872 ac_cpp_err=
16873 fi
16874else
16875 ac_cpp_err=yes
16876fi
16877if test -z "$ac_cpp_err"; then
16878 have_readline=yes
16879else
16880 echo "$as_me: failed program was:" >&5
16881 cat conftest.$ac_ext >&5
16882 have_readline=no
16883fi
16884rm -f conftest.err conftest.$ac_ext
16885if test $have_readline = yes
16886then
16887 cat >conftest.$ac_ext <<_ACEOF
16888#line $LINENO "configure"
16889#include "confdefs.h"
16890#include <readline/readline.h>
16891
16892_ACEOF
16893if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000016894 egrep "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000016895
16896cat >>confdefs.h <<\_ACEOF
16897#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
16898_ACEOF
16899
16900fi
16901rm -f conftest*
16902
16903fi
16904
Martin v. Löwis0daad592001-09-30 21:09:59 +000016905# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000016906echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
16907echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
16908if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
16909 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000016910else
Martin v. Löwis11437992002-04-12 09:54:03 +000016911 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000016912LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016913cat >conftest.$ac_ext <<_ACEOF
16914#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000016915#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016916
Guido van Rossum353ae582001-07-10 16:45:32 +000016917/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016918#ifdef __cplusplus
16919extern "C"
16920#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000016921/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016922 builtin and then its argument prototype would still apply. */
16923char rl_pre_input_hook ();
Barry Warsawfe33b792003-01-07 22:42:49 +000016924#ifdef F77_DUMMY_MAIN
16925# ifdef __cplusplus
16926 extern "C"
16927# endif
16928 int F77_DUMMY_MAIN() { return 1; }
16929#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016930int
16931main ()
16932{
16933rl_pre_input_hook ();
16934 ;
16935 return 0;
16936}
16937_ACEOF
16938rm -f conftest.$ac_objext conftest$ac_exeext
16939if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16940 (eval $ac_link) 2>&5
16941 ac_status=$?
16942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16943 (exit $ac_status); } &&
16944 { ac_try='test -s conftest$ac_exeext'
16945 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16946 (eval $ac_try) 2>&5
16947 ac_status=$?
16948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16949 (exit $ac_status); }; }; then
16950 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000016951else
Martin v. Löwis11437992002-04-12 09:54:03 +000016952 echo "$as_me: failed program was:" >&5
16953cat conftest.$ac_ext >&5
16954ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000016955fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016956rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16957LIBS=$ac_check_lib_save_LIBS
16958fi
16959echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
16960echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
16961if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016962
Martin v. Löwis11437992002-04-12 09:54:03 +000016963cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016964#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016965_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016966
Martin v. Löwis0daad592001-09-30 21:09:59 +000016967fi
16968
Michael W. Hudson54241132001-12-07 15:38:26 +000016969
Martin v. Löwis0daad592001-09-30 21:09:59 +000016970# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000016971echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
16972echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
16973if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
16974 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000016975else
Martin v. Löwis11437992002-04-12 09:54:03 +000016976 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000016977LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016978cat >conftest.$ac_ext <<_ACEOF
16979#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000016980#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016981
Martin v. Löwis0daad592001-09-30 21:09:59 +000016982/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016983#ifdef __cplusplus
16984extern "C"
16985#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000016986/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016987 builtin and then its argument prototype would still apply. */
16988char rl_completion_matches ();
Barry Warsawfe33b792003-01-07 22:42:49 +000016989#ifdef F77_DUMMY_MAIN
16990# ifdef __cplusplus
16991 extern "C"
16992# endif
16993 int F77_DUMMY_MAIN() { return 1; }
16994#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016995int
16996main ()
16997{
16998rl_completion_matches ();
16999 ;
17000 return 0;
17001}
17002_ACEOF
17003rm -f conftest.$ac_objext conftest$ac_exeext
17004if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17005 (eval $ac_link) 2>&5
17006 ac_status=$?
17007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17008 (exit $ac_status); } &&
17009 { ac_try='test -s conftest$ac_exeext'
17010 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17011 (eval $ac_try) 2>&5
17012 ac_status=$?
17013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17014 (exit $ac_status); }; }; then
17015 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000017016else
Martin v. Löwis11437992002-04-12 09:54:03 +000017017 echo "$as_me: failed program was:" >&5
17018cat conftest.$ac_ext >&5
17019ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000017020fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017021rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17022LIBS=$ac_check_lib_save_LIBS
17023fi
17024echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
17025echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
17026if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017027
Martin v. Löwis11437992002-04-12 09:54:03 +000017028cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017029#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017030_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017031
Guido van Rossum353ae582001-07-10 16:45:32 +000017032fi
17033
Jack Jansendd19cf82001-12-06 22:36:17 +000017034
Martin v. Löwis11437992002-04-12 09:54:03 +000017035echo "$as_me:$LINENO: checking for broken nice()" >&5
17036echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
17037if test "${ac_cv_broken_nice+set}" = set; then
17038 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017039else
Martin v. Löwis11437992002-04-12 09:54:03 +000017040
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017041if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017042 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017043else
Martin v. Löwis11437992002-04-12 09:54:03 +000017044 cat >conftest.$ac_ext <<_ACEOF
17045#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017046#include "confdefs.h"
17047
17048int main()
17049{
17050 int val1 = nice(1);
17051 if (val1 != -1 && val1 == nice(2))
17052 exit(0);
17053 exit(1);
17054}
17055
Martin v. Löwis11437992002-04-12 09:54:03 +000017056_ACEOF
17057rm -f conftest$ac_exeext
17058if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17059 (eval $ac_link) 2>&5
17060 ac_status=$?
17061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17062 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17063 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17064 (eval $ac_try) 2>&5
17065 ac_status=$?
17066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17067 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017068 ac_cv_broken_nice=yes
17069else
Martin v. Löwis11437992002-04-12 09:54:03 +000017070 echo "$as_me: program exited with status $ac_status" >&5
17071echo "$as_me: failed program was:" >&5
17072cat conftest.$ac_ext >&5
17073( exit $ac_status )
17074ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017075fi
Barry Warsawfe33b792003-01-07 22:42:49 +000017076rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017077fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017078fi
17079
Martin v. Löwis11437992002-04-12 09:54:03 +000017080echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
17081echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017082if test "$ac_cv_broken_nice" = yes
17083then
Martin v. Löwis11437992002-04-12 09:54:03 +000017084
17085cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017086#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017087_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017088
17089fi
17090
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017091# tzset(3) exists and works like we expect it to
17092echo "$as_me:$LINENO: checking for working tzset()" >&5
17093echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
17094if test "${ac_cv_working_tzset+set}" = set; then
17095 echo $ECHO_N "(cached) $ECHO_C" >&6
17096else
17097
17098if test "$cross_compiling" = yes; then
17099 ac_cv_working_tzset=no
17100else
17101 cat >conftest.$ac_ext <<_ACEOF
17102#line $LINENO "configure"
17103#include "confdefs.h"
17104
17105#include <stdlib.h>
17106#include <time.h>
17107int main()
17108{
17109 int gmt_hour;
17110 int eastern_hour;
17111 time_t now;
17112 now = time((time_t*)NULL);
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017113 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017114 tzset();
17115 gmt_hour = localtime(&now)->tm_hour;
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017116 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017117 tzset();
17118 eastern_hour = localtime(&now)->tm_hour;
17119 if (eastern_hour == gmt_hour)
17120 exit(1);
17121 exit(0);
17122}
17123
17124_ACEOF
17125rm -f conftest$ac_exeext
17126if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17127 (eval $ac_link) 2>&5
17128 ac_status=$?
17129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17130 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17132 (eval $ac_try) 2>&5
17133 ac_status=$?
17134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17135 (exit $ac_status); }; }; then
17136 ac_cv_working_tzset=yes
17137else
17138 echo "$as_me: program exited with status $ac_status" >&5
17139echo "$as_me: failed program was:" >&5
17140cat conftest.$ac_ext >&5
17141( exit $ac_status )
17142ac_cv_working_tzset=no
17143fi
17144rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17145fi
17146fi
17147
17148echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
17149echo "${ECHO_T}$ac_cv_working_tzset" >&6
17150if test "$ac_cv_working_tzset" = yes
17151then
17152
17153cat >>confdefs.h <<\_ACEOF
17154#define HAVE_WORKING_TZSET 1
17155_ACEOF
17156
17157fi
17158
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017159# Look for subsecond timestamps in struct stat
17160echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
17161echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
17162if test "${ac_cv_stat_tv_nsec+set}" = set; then
17163 echo $ECHO_N "(cached) $ECHO_C" >&6
17164else
17165 cat >conftest.$ac_ext <<_ACEOF
17166#line $LINENO "configure"
17167#include "confdefs.h"
17168#include <sys/stat.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000017169#ifdef F77_DUMMY_MAIN
17170# ifdef __cplusplus
17171 extern "C"
17172# endif
17173 int F77_DUMMY_MAIN() { return 1; }
17174#endif
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017175int
17176main ()
17177{
17178
17179struct stat st;
17180st.st_mtim.tv_nsec = 1;
17181
17182 ;
17183 return 0;
17184}
17185_ACEOF
17186rm -f conftest.$ac_objext
17187if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17188 (eval $ac_compile) 2>&5
17189 ac_status=$?
17190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17191 (exit $ac_status); } &&
17192 { ac_try='test -s conftest.$ac_objext'
17193 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17194 (eval $ac_try) 2>&5
17195 ac_status=$?
17196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17197 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000017198 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017199else
17200 echo "$as_me: failed program was:" >&5
17201cat conftest.$ac_ext >&5
17202ac_cv_stat_tv_nsec=no
17203fi
17204rm -f conftest.$ac_objext conftest.$ac_ext
17205fi
17206
17207echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
17208echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
17209if test "$ac_cv_stat_tv_nsec" = yes
17210then
17211
17212cat >>confdefs.h <<\_ACEOF
17213#define HAVE_STAT_TV_NSEC 1
17214_ACEOF
17215
17216fi
17217
Jack Jansen666b1e72001-10-31 12:11:48 +000017218# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000017219echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
17220echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
17221if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
17222 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017223else
Martin v. Löwis11437992002-04-12 09:54:03 +000017224 cat >conftest.$ac_ext <<_ACEOF
17225#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000017226#include "confdefs.h"
17227#include <curses.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000017228#ifdef F77_DUMMY_MAIN
17229# ifdef __cplusplus
17230 extern "C"
17231# endif
17232 int F77_DUMMY_MAIN() { return 1; }
17233#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017234int
17235main ()
17236{
Jack Jansen666b1e72001-10-31 12:11:48 +000017237
17238 int rtn;
17239 rtn = mvwdelch(0,0,0);
17240
Martin v. Löwis11437992002-04-12 09:54:03 +000017241 ;
17242 return 0;
17243}
17244_ACEOF
17245rm -f conftest.$ac_objext
17246if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17247 (eval $ac_compile) 2>&5
17248 ac_status=$?
17249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17250 (exit $ac_status); } &&
17251 { ac_try='test -s conftest.$ac_objext'
17252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17253 (eval $ac_try) 2>&5
17254 ac_status=$?
17255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17256 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017257 ac_cv_mvwdelch_is_expression=yes
17258else
Martin v. Löwis11437992002-04-12 09:54:03 +000017259 echo "$as_me: failed program was:" >&5
17260cat conftest.$ac_ext >&5
17261ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017262fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017263rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017264fi
17265
Martin v. Löwis11437992002-04-12 09:54:03 +000017266echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
17267echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017268
17269if test "$ac_cv_mvwdelch_is_expression" = yes
17270then
Martin v. Löwis11437992002-04-12 09:54:03 +000017271
17272cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017273#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017274_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017275
17276fi
17277
Martin v. Löwis11437992002-04-12 09:54:03 +000017278echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
17279echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
17280if test "${ac_cv_window_has_flags+set}" = set; then
17281 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017282else
Martin v. Löwis11437992002-04-12 09:54:03 +000017283 cat >conftest.$ac_ext <<_ACEOF
17284#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000017285#include "confdefs.h"
17286#include <curses.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000017287#ifdef F77_DUMMY_MAIN
17288# ifdef __cplusplus
17289 extern "C"
17290# endif
17291 int F77_DUMMY_MAIN() { return 1; }
17292#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017293int
17294main ()
17295{
Jack Jansen666b1e72001-10-31 12:11:48 +000017296
17297 WINDOW *w;
17298 w->_flags = 0;
17299
Martin v. Löwis11437992002-04-12 09:54:03 +000017300 ;
17301 return 0;
17302}
17303_ACEOF
17304rm -f conftest.$ac_objext
17305if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17306 (eval $ac_compile) 2>&5
17307 ac_status=$?
17308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17309 (exit $ac_status); } &&
17310 { ac_try='test -s conftest.$ac_objext'
17311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17312 (eval $ac_try) 2>&5
17313 ac_status=$?
17314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17315 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017316 ac_cv_window_has_flags=yes
17317else
Martin v. Löwis11437992002-04-12 09:54:03 +000017318 echo "$as_me: failed program was:" >&5
17319cat conftest.$ac_ext >&5
17320ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017321fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017322rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017323fi
17324
Martin v. Löwis11437992002-04-12 09:54:03 +000017325echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
17326echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017327
Jack Jansen666b1e72001-10-31 12:11:48 +000017328
17329if test "$ac_cv_window_has_flags" = yes
17330then
Martin v. Löwis11437992002-04-12 09:54:03 +000017331
17332cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017333#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017334_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017335
17336fi
17337
Martin v. Löwis24a880b2002-12-31 12:55:15 +000017338echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
17339echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
17340
17341if test -e /dev/ptmx
17342then
17343 echo "$as_me:$LINENO: result: yes" >&5
17344echo "${ECHO_T}yes" >&6
17345
17346cat >>confdefs.h <<\_ACEOF
17347#define HAVE_DEV_PTMX 1
17348_ACEOF
17349
17350else
17351 echo "$as_me:$LINENO: result: no" >&5
17352echo "${ECHO_T}no" >&6
17353fi
17354
Neal Norwitz865400f2003-03-21 01:42:58 +000017355echo "$as_me:$LINENO: checking for /dev/ptc" >&5
17356echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
17357
17358if test -e /dev/ptc
17359then
17360 echo "$as_me:$LINENO: result: yes" >&5
17361echo "${ECHO_T}yes" >&6
17362
17363cat >>confdefs.h <<\_ACEOF
17364#define HAVE_DEV_PTC 1
17365_ACEOF
17366
17367else
17368 echo "$as_me:$LINENO: result: no" >&5
17369echo "${ECHO_T}no" >&6
17370fi
17371
Martin v. Löwis11437992002-04-12 09:54:03 +000017372echo "$as_me:$LINENO: checking for socklen_t" >&5
17373echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
17374if test "${ac_cv_type_socklen_t+set}" = set; then
17375 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000017376else
Martin v. Löwis11437992002-04-12 09:54:03 +000017377 cat >conftest.$ac_ext <<_ACEOF
17378#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000017379#include "confdefs.h"
Martin v. Löwis01c04012002-11-11 14:58:44 +000017380
17381#ifdef HAVE_SYS_TYPES_H
17382#include <sys/types.h>
17383#endif
17384#ifdef HAVE_SYS_SOCKET_H
17385#include <sys/socket.h>
17386#endif
17387
17388
Barry Warsawfe33b792003-01-07 22:42:49 +000017389#ifdef F77_DUMMY_MAIN
17390# ifdef __cplusplus
17391 extern "C"
17392# endif
17393 int F77_DUMMY_MAIN() { return 1; }
17394#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017395int
17396main ()
17397{
17398if ((socklen_t *) 0)
17399 return 0;
17400if (sizeof (socklen_t))
17401 return 0;
17402 ;
17403 return 0;
17404}
17405_ACEOF
17406rm -f conftest.$ac_objext
17407if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17408 (eval $ac_compile) 2>&5
17409 ac_status=$?
17410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17411 (exit $ac_status); } &&
17412 { ac_try='test -s conftest.$ac_objext'
17413 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17414 (eval $ac_try) 2>&5
17415 ac_status=$?
17416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17417 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000017418 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000017419else
Martin v. Löwis11437992002-04-12 09:54:03 +000017420 echo "$as_me: failed program was:" >&5
17421cat conftest.$ac_ext >&5
17422ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000017423fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017424rm -f conftest.$ac_objext conftest.$ac_ext
17425fi
17426echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
17427echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
17428if test $ac_cv_type_socklen_t = yes; then
17429 :
17430else
Guido van Rossum95713eb2000-05-18 20:53:31 +000017431
Martin v. Löwis01c04012002-11-11 14:58:44 +000017432cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017433#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000017434_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017435
17436fi
17437
Michael W. Hudson54241132001-12-07 15:38:26 +000017438
Michael W. Hudson54241132001-12-07 15:38:26 +000017439
17440
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000017441for h in `(cd $srcdir;echo Python/thread_*.h)`
17442do
17443 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
17444done
17445
Michael W. Hudson54241132001-12-07 15:38:26 +000017446
Jack Jansen0b06be72002-06-21 14:48:38 +000017447SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000017448echo "$as_me:$LINENO: checking for build directories" >&5
17449echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017450for dir in $SRCDIRS; do
17451 if test ! -d $dir; then
17452 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000017453 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017454done
Martin v. Löwis11437992002-04-12 09:54:03 +000017455echo "$as_me:$LINENO: result: done" >&5
17456echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000017457
Guido van Rossum627b2d71993-12-24 10:39:16 +000017458# generate output files
Barry Warsawfe33b792003-01-07 22:42:49 +000017459ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017460
Martin v. Löwis11437992002-04-12 09:54:03 +000017461cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017462# This file is a shell script that caches the results of configure
17463# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017464# scripts and configure runs, see configure's option --config-cache.
17465# It is not useful on other systems. If it contains results you don't
17466# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017467#
Martin v. Löwis11437992002-04-12 09:54:03 +000017468# config.status only pays attention to the cache file if you give it
17469# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017470#
Barry Warsawfe33b792003-01-07 22:42:49 +000017471# `ac_cv_env_foo' variables (set or unset) will be overriden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017472# loading this file, other *unset* `ac_cv_foo' will be assigned the
17473# following values.
17474
17475_ACEOF
17476
Guido van Rossumf78abae1997-01-21 22:02:36 +000017477# The following way of writing the cache mishandles newlines in values,
17478# but we know of no workaround that is simple, portable, and efficient.
17479# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017480# Ultrix sh set writes to stderr and can't be redirected directly,
17481# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000017482{
17483 (set) 2>&1 |
17484 case `(ac_space=' '; set | grep ac_space) 2>&1` in
17485 *ac_space=\ *)
17486 # `set' does not quote correctly, so add quotes (double-quote
17487 # substitution turns \\\\ into \\, and sed turns \\ into \).
17488 sed -n \
17489 "s/'/'\\\\''/g;
17490 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17491 ;;
17492 *)
17493 # `set' quotes correctly as required by POSIX, so do not add quotes.
17494 sed -n \
17495 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17496 ;;
17497 esac;
17498} |
17499 sed '
17500 t clear
17501 : clear
17502 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17503 t end
17504 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17505 : end' >>confcache
17506if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017507 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017508 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17509 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017510 else
17511 echo "not updating unwritable cache $cache_file"
17512 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017513fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017514rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017515
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017516test "x$prefix" = xNONE && prefix=$ac_default_prefix
17517# Let make expand exec_prefix.
17518test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017519
Martin v. Löwis11437992002-04-12 09:54:03 +000017520# VPATH may cause trouble with some makes, so we remove $(srcdir),
17521# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17522# trailing colons and then remove the whole line if VPATH becomes empty
17523# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000017524if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017525 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17526s/:*\$(srcdir):*/:/;
17527s/:*\${srcdir}:*/:/;
17528s/:*@srcdir@:*/:/;
17529s/^\([^=]*=[ ]*\):*/\1/;
17530s/:*$//;
17531s/^[^=]*=[ ]*$//;
17532}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017533fi
17534
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017535DEFS=-DHAVE_CONFIG_H
17536
Martin v. Löwis11437992002-04-12 09:54:03 +000017537
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017538: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000017539ac_clean_files_save=$ac_clean_files
17540ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17541{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
17542echo "$as_me: creating $CONFIG_STATUS" >&6;}
17543cat >$CONFIG_STATUS <<_ACEOF
17544#! $SHELL
17545# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017546# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017547# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017548# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017549
Martin v. Löwis11437992002-04-12 09:54:03 +000017550debug=false
17551SHELL=\${CONFIG_SHELL-$SHELL}
17552_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000017553
Martin v. Löwis11437992002-04-12 09:54:03 +000017554cat >>$CONFIG_STATUS <<\_ACEOF
Barry Warsawfe33b792003-01-07 22:42:49 +000017555
Martin v. Löwis11437992002-04-12 09:54:03 +000017556## --------------------- ##
17557## M4sh Initialization. ##
17558## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017559
Martin v. Löwis11437992002-04-12 09:54:03 +000017560# Be Bourne compatible
17561if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17562 emulate sh
17563 NULLCMD=:
17564elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17565 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000017566fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017567
Barry Warsawfe33b792003-01-07 22:42:49 +000017568# NLS nuisances.
Martin v. Löwis11437992002-04-12 09:54:03 +000017569# Support unset when possible.
17570if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17571 as_unset=unset
17572else
17573 as_unset=false
17574fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017575
Barry Warsawfe33b792003-01-07 22:42:49 +000017576(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
17577 { $as_unset LANG || test "${LANG+set}" != set; } ||
17578 { LANG=C; export LANG; }
17579(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
17580 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
17581 { LC_ALL=C; export LC_ALL; }
17582(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
17583 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
17584 { LC_TIME=C; export LC_TIME; }
17585(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
17586 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
17587 { LC_CTYPE=C; export LC_CTYPE; }
17588(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
17589 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
17590 { LANGUAGE=C; export LANGUAGE; }
17591(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
17592 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
17593 { LC_COLLATE=C; export LC_COLLATE; }
17594(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
17595 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
17596 { LC_NUMERIC=C; export LC_NUMERIC; }
17597(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
17598 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
17599 { LC_MESSAGES=C; export LC_MESSAGES; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017600
17601
17602# Name of the executable.
Barry Warsawfe33b792003-01-07 22:42:49 +000017603as_me=`(basename "$0") 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017604$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17605 X"$0" : 'X\(//\)$' \| \
17606 X"$0" : 'X\(/\)$' \| \
17607 . : '\(.\)' 2>/dev/null ||
17608echo X/"$0" |
17609 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
17610 /^X\/\(\/\/\)$/{ s//\1/; q; }
17611 /^X\/\(\/\).*/{ s//\1/; q; }
17612 s/.*/./; q'`
17613
17614# PATH needs CR, and LINENO needs CR and PATH.
17615# Avoid depending upon Character Ranges.
17616as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17617as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17618as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17619as_cr_digits='0123456789'
17620as_cr_alnum=$as_cr_Letters$as_cr_digits
17621
17622# The user is always right.
17623if test "${PATH_SEPARATOR+set}" != set; then
17624 echo "#! /bin/sh" >conftest.sh
17625 echo "exit 0" >>conftest.sh
17626 chmod +x conftest.sh
Barry Warsawfe33b792003-01-07 22:42:49 +000017627 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017628 PATH_SEPARATOR=';'
17629 else
17630 PATH_SEPARATOR=:
17631 fi
17632 rm -f conftest.sh
17633fi
17634
17635
17636 as_lineno_1=$LINENO
17637 as_lineno_2=$LINENO
17638 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17639 test "x$as_lineno_1" != "x$as_lineno_2" &&
17640 test "x$as_lineno_3" = "x$as_lineno_2" || {
17641 # Find who we are. Look in the path if we contain no path at all
17642 # relative or not.
17643 case $0 in
17644 *[\\/]* ) as_myself=$0 ;;
17645 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17646for as_dir in $PATH
17647do
17648 IFS=$as_save_IFS
17649 test -z "$as_dir" && as_dir=.
17650 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17651done
17652
17653 ;;
17654 esac
17655 # We did not find ourselves, most probably we were run as `sh COMMAND'
17656 # in which case we are not to be found in the path.
17657 if test "x$as_myself" = x; then
17658 as_myself=$0
17659 fi
17660 if test ! -f "$as_myself"; then
17661 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
17662echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
17663 { (exit 1); exit 1; }; }
17664 fi
17665 case $CONFIG_SHELL in
17666 '')
17667 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17668for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
17669do
17670 IFS=$as_save_IFS
17671 test -z "$as_dir" && as_dir=.
17672 for as_base in sh bash ksh sh5; do
17673 case $as_dir in
17674 /*)
17675 if ("$as_dir/$as_base" -c '
17676 as_lineno_1=$LINENO
17677 as_lineno_2=$LINENO
17678 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17679 test "x$as_lineno_1" != "x$as_lineno_2" &&
17680 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
17681 CONFIG_SHELL=$as_dir/$as_base
17682 export CONFIG_SHELL
17683 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
17684 fi;;
17685 esac
17686 done
17687done
17688;;
Jack Jansendd19cf82001-12-06 22:36:17 +000017689 esac
17690
Martin v. Löwis11437992002-04-12 09:54:03 +000017691 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
17692 # uniformly replaced by the line number. The first 'sed' inserts a
17693 # line-number line before each line; the second 'sed' does the real
17694 # work. The second script uses 'N' to pair each line-number line
17695 # with the numbered line, and appends trailing '-' during
17696 # substitution so that $LINENO is not a special case at line end.
17697 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
17698 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
17699 sed '=' <$as_myself |
17700 sed '
17701 N
17702 s,$,-,
17703 : loop
17704 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
17705 t loop
17706 s,-$,,
17707 s,^['$as_cr_digits']*\n,,
17708 ' >$as_me.lineno &&
17709 chmod +x $as_me.lineno ||
17710 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
17711echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
17712 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017713
Martin v. Löwis11437992002-04-12 09:54:03 +000017714 # Don't try to exec as it changes $[0], causing all sort of problems
17715 # (the dirname of $[0] is not the place where we might find the
17716 # original and so on. Autoconf is especially sensible to this).
17717 . ./$as_me.lineno
17718 # Exit status is that of the last command.
17719 exit
17720}
17721
17722
17723case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
17724 *c*,-n*) ECHO_N= ECHO_C='
17725' ECHO_T=' ' ;;
17726 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
17727 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
17728esac
17729
17730if expr a : '\(a\)' >/dev/null 2>&1; then
17731 as_expr=expr
17732else
17733 as_expr=false
17734fi
17735
17736rm -f conf$$ conf$$.exe conf$$.file
17737echo >conf$$.file
17738if ln -s conf$$.file conf$$ 2>/dev/null; then
17739 # We could just check for DJGPP; but this test a) works b) is more generic
17740 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17741 if test -f conf$$.exe; then
17742 # Don't use ln at all; we don't have any links
17743 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017744 else
Martin v. Löwis11437992002-04-12 09:54:03 +000017745 as_ln_s='ln -s'
17746 fi
17747elif ln conf$$.file conf$$ 2>/dev/null; then
17748 as_ln_s=ln
17749else
17750 as_ln_s='cp -p'
17751fi
17752rm -f conf$$ conf$$.exe conf$$.file
17753
17754as_executable_p="test -f"
17755
17756# Sed expression to map a string onto a valid CPP name.
17757as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
17758
17759# Sed expression to map a string onto a valid variable name.
17760as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
17761
17762
17763# IFS
17764# We need space, tab and new line, in precisely that order.
17765as_nl='
17766'
17767IFS=" $as_nl"
17768
17769# CDPATH.
Barry Warsawfe33b792003-01-07 22:42:49 +000017770$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017771
17772exec 6>&1
17773
17774# Open the log real soon, to keep \$[0] and so on meaningful, and to
17775# report actual input values of CONFIG_FILES etc. instead of their
17776# values after options handling. Logging --version etc. is OK.
17777exec 5>>config.log
17778{
17779 echo
17780 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17781## Running $as_me. ##
17782_ASBOX
17783} >&5
17784cat >&5 <<_CSEOF
17785
Martin v. Löwis88afe662002-10-26 13:47:44 +000017786This file was extended by python $as_me 2.3, which was
Barry Warsawfe33b792003-01-07 22:42:49 +000017787generated by GNU Autoconf 2.53. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017788
17789 CONFIG_FILES = $CONFIG_FILES
17790 CONFIG_HEADERS = $CONFIG_HEADERS
17791 CONFIG_LINKS = $CONFIG_LINKS
17792 CONFIG_COMMANDS = $CONFIG_COMMANDS
17793 $ $0 $@
17794
17795_CSEOF
17796echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
17797echo >&5
17798_ACEOF
17799
17800# Files that config.status was made for.
17801if test -n "$ac_config_files"; then
17802 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17803fi
17804
17805if test -n "$ac_config_headers"; then
17806 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17807fi
17808
17809if test -n "$ac_config_links"; then
17810 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17811fi
17812
17813if test -n "$ac_config_commands"; then
17814 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17815fi
17816
17817cat >>$CONFIG_STATUS <<\_ACEOF
17818
17819ac_cs_usage="\
17820\`$as_me' instantiates files from templates according to the
17821current configuration.
17822
17823Usage: $0 [OPTIONS] [FILE]...
17824
17825 -h, --help print this help, then exit
17826 -V, --version print version number, then exit
17827 -d, --debug don't remove temporary files
17828 --recheck update $as_me by reconfiguring in the same conditions
17829 --file=FILE[:TEMPLATE]
17830 instantiate the configuration file FILE
17831 --header=FILE[:TEMPLATE]
17832 instantiate the configuration header FILE
17833
17834Configuration files:
17835$config_files
17836
17837Configuration headers:
17838$config_headers
17839
17840Report bugs to <bug-autoconf@gnu.org>."
17841_ACEOF
17842
17843cat >>$CONFIG_STATUS <<_ACEOF
17844ac_cs_version="\\
Martin v. Löwis88afe662002-10-26 13:47:44 +000017845python config.status 2.3
Barry Warsawfe33b792003-01-07 22:42:49 +000017846configured by $0, generated by GNU Autoconf 2.53,
Martin v. Löwis11437992002-04-12 09:54:03 +000017847 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17848
17849Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17850Free Software Foundation, Inc.
17851This config.status script is free software; the Free Software Foundation
17852gives unlimited permission to copy, distribute and modify it."
17853srcdir=$srcdir
17854INSTALL="$INSTALL"
17855_ACEOF
17856
17857cat >>$CONFIG_STATUS <<\_ACEOF
17858# If no file are specified by the user, then we need to provide default
17859# value. By we need to know if files were specified by the user.
17860ac_need_defaults=:
17861while test $# != 0
17862do
17863 case $1 in
17864 --*=*)
17865 ac_option=`expr "x$1" : 'x\([^=]*\)='`
17866 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Barry Warsawfe33b792003-01-07 22:42:49 +000017867 shift
17868 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17869 shift
Martin v. Löwis11437992002-04-12 09:54:03 +000017870 ;;
Barry Warsawfe33b792003-01-07 22:42:49 +000017871 -*);;
Martin v. Löwis11437992002-04-12 09:54:03 +000017872 *) # This is not an option, so the user has probably given explicit
17873 # arguments.
17874 ac_need_defaults=false;;
17875 esac
17876
Barry Warsawfe33b792003-01-07 22:42:49 +000017877 case $1 in
Martin v. Löwis11437992002-04-12 09:54:03 +000017878 # Handling of the options.
17879_ACEOF
17880cat >>$CONFIG_STATUS <<_ACEOF
17881 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17882 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17883 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17884_ACEOF
17885cat >>$CONFIG_STATUS <<\_ACEOF
17886 --version | --vers* | -V )
17887 echo "$ac_cs_version"; exit 0 ;;
17888 --he | --h)
17889 # Conflict between --help and --header
17890 { { echo "$as_me:$LINENO: error: ambiguous option: $1
17891Try \`$0 --help' for more information." >&5
17892echo "$as_me: error: ambiguous option: $1
17893Try \`$0 --help' for more information." >&2;}
17894 { (exit 1); exit 1; }; };;
17895 --help | --hel | -h )
17896 echo "$ac_cs_usage"; exit 0 ;;
17897 --debug | --d* | -d )
17898 debug=: ;;
17899 --file | --fil | --fi | --f )
Barry Warsawfe33b792003-01-07 22:42:49 +000017900 shift
17901 CONFIG_FILES="$CONFIG_FILES $1"
Martin v. Löwis11437992002-04-12 09:54:03 +000017902 ac_need_defaults=false;;
17903 --header | --heade | --head | --hea )
Barry Warsawfe33b792003-01-07 22:42:49 +000017904 shift
17905 CONFIG_HEADERS="$CONFIG_HEADERS $1"
Martin v. Löwis11437992002-04-12 09:54:03 +000017906 ac_need_defaults=false;;
17907
17908 # This is an error.
17909 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
17910Try \`$0 --help' for more information." >&5
17911echo "$as_me: error: unrecognized option: $1
17912Try \`$0 --help' for more information." >&2;}
17913 { (exit 1); exit 1; }; } ;;
17914
17915 *) ac_config_targets="$ac_config_targets $1" ;;
17916
17917 esac
17918 shift
17919done
17920
17921_ACEOF
17922
17923
17924
17925
17926
17927cat >>$CONFIG_STATUS <<\_ACEOF
17928for ac_config_target in $ac_config_targets
17929do
17930 case "$ac_config_target" in
17931 # Handling of arguments.
17932 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17933 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
17934 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17935 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
17936echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17937 { (exit 1); exit 1; }; };;
17938 esac
17939done
17940
17941# If the user did not use the arguments to specify the items to instantiate,
17942# then the envvar interface is used. Set only those that are not.
17943# We use the long form for the default assignment because of an extremely
17944# bizarre bug on SunOS 4.1.3.
17945if $ac_need_defaults; then
17946 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17947 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17948fi
17949
17950# Create a temporary directory, and hook for its removal unless debugging.
17951$debug ||
17952{
17953 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17954 trap '{ (exit 1); exit 1; }' 1 2 13 15
17955}
17956
17957# Create a (secure) tmp directory for tmp files.
17958: ${TMPDIR=/tmp}
17959{
17960 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17961 test -n "$tmp" && test -d "$tmp"
17962} ||
17963{
17964 tmp=$TMPDIR/cs$$-$RANDOM
17965 (umask 077 && mkdir $tmp)
17966} ||
17967{
17968 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17969 { (exit 1); exit 1; }
17970}
17971
17972_ACEOF
17973
17974cat >>$CONFIG_STATUS <<_ACEOF
17975
17976#
17977# CONFIG_FILES section.
17978#
17979
17980# No need to generate the scripts if there are no CONFIG_FILES.
17981# This happens for instance when ./config.status config.h
17982if test -n "\$CONFIG_FILES"; then
17983 # Protect against being on the right side of a sed subst in config.status.
17984 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17985 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17986s,@SHELL@,$SHELL,;t t
17987s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17988s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17989s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17990s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17991s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17992s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17993s,@exec_prefix@,$exec_prefix,;t t
17994s,@prefix@,$prefix,;t t
17995s,@program_transform_name@,$program_transform_name,;t t
17996s,@bindir@,$bindir,;t t
17997s,@sbindir@,$sbindir,;t t
17998s,@libexecdir@,$libexecdir,;t t
17999s,@datadir@,$datadir,;t t
18000s,@sysconfdir@,$sysconfdir,;t t
18001s,@sharedstatedir@,$sharedstatedir,;t t
18002s,@localstatedir@,$localstatedir,;t t
18003s,@libdir@,$libdir,;t t
18004s,@includedir@,$includedir,;t t
18005s,@oldincludedir@,$oldincludedir,;t t
18006s,@infodir@,$infodir,;t t
18007s,@mandir@,$mandir,;t t
18008s,@build_alias@,$build_alias,;t t
18009s,@host_alias@,$host_alias,;t t
18010s,@target_alias@,$target_alias,;t t
18011s,@DEFS@,$DEFS,;t t
18012s,@ECHO_C@,$ECHO_C,;t t
18013s,@ECHO_N@,$ECHO_N,;t t
18014s,@ECHO_T@,$ECHO_T,;t t
18015s,@LIBS@,$LIBS,;t t
18016s,@VERSION@,$VERSION,;t t
18017s,@SOVERSION@,$SOVERSION,;t t
18018s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
18019s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
18020s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
18021s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
18022s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
18023s,@MACHDEP@,$MACHDEP,;t t
18024s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000018025s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000018026s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018027s,@CXX@,$CXX,;t t
18028s,@MAINOBJ@,$MAINOBJ,;t t
18029s,@EXEEXT@,$EXEEXT,;t t
18030s,@CC@,$CC,;t t
18031s,@CFLAGS@,$CFLAGS,;t t
18032s,@LDFLAGS@,$LDFLAGS,;t t
18033s,@CPPFLAGS@,$CPPFLAGS,;t t
18034s,@ac_ct_CC@,$ac_ct_CC,;t t
18035s,@OBJEXT@,$OBJEXT,;t t
18036s,@CPP@,$CPP,;t t
18037s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
18038s,@LIBRARY@,$LIBRARY,;t t
18039s,@LDLIBRARY@,$LDLIBRARY,;t t
18040s,@DLLLIBRARY@,$DLLLIBRARY,;t t
18041s,@BLDLIBRARY@,$BLDLIBRARY,;t t
18042s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
18043s,@INSTSONAME@,$INSTSONAME,;t t
18044s,@RUNSHARED@,$RUNSHARED,;t t
18045s,@LINKCC@,$LINKCC,;t t
18046s,@RANLIB@,$RANLIB,;t t
18047s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18048s,@AR@,$AR,;t t
18049s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18050s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18051s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18052s,@LN@,$LN,;t t
18053s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000018054s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018055s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
18056s,@SO@,$SO,;t t
18057s,@LDSHARED@,$LDSHARED,;t t
18058s,@BLDSHARED@,$BLDSHARED,;t t
18059s,@CCSHARED@,$CCSHARED,;t t
18060s,@LINKFORSHARED@,$LINKFORSHARED,;t t
18061s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018062s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018063s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
18064s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
18065s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
18066s,@LDLAST@,$LDLAST,;t t
18067s,@THREADOBJ@,$THREADOBJ,;t t
18068s,@DLINCLDIR@,$DLINCLDIR,;t t
18069s,@DYNLOADFILE@,$DYNLOADFILE,;t t
18070s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
18071s,@LIBOBJS@,$LIBOBJS,;t t
18072s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
18073s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
18074s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
18075s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
18076s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
18077s,@LIBM@,$LIBM,;t t
18078s,@LIBC@,$LIBC,;t t
18079s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
18080s,@THREADHEADERS@,$THREADHEADERS,;t t
18081s,@SRCDIRS@,$SRCDIRS,;t t
18082CEOF
18083
18084_ACEOF
18085
18086 cat >>$CONFIG_STATUS <<\_ACEOF
18087 # Split the substitutions into bite-sized pieces for seds with
18088 # small command number limits, like on Digital OSF/1 and HP-UX.
18089 ac_max_sed_lines=48
18090 ac_sed_frag=1 # Number of current file.
18091 ac_beg=1 # First line for current file.
18092 ac_end=$ac_max_sed_lines # Line after last line for current file.
18093 ac_more_lines=:
18094 ac_sed_cmds=
18095 while $ac_more_lines; do
18096 if test $ac_beg -gt 1; then
18097 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18098 else
18099 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18100 fi
18101 if test ! -s $tmp/subs.frag; then
18102 ac_more_lines=false
18103 else
18104 # The purpose of the label and of the branching condition is to
18105 # speed up the sed processing (if there are no `@' at all, there
18106 # is no need to browse any of the substitutions).
18107 # These are the two extra sed commands mentioned above.
18108 (echo ':t
18109 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18110 if test -z "$ac_sed_cmds"; then
18111 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18112 else
18113 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18114 fi
18115 ac_sed_frag=`expr $ac_sed_frag + 1`
18116 ac_beg=$ac_end
18117 ac_end=`expr $ac_end + $ac_max_sed_lines`
18118 fi
18119 done
18120 if test -z "$ac_sed_cmds"; then
18121 ac_sed_cmds=cat
18122 fi
18123fi # test -n "$CONFIG_FILES"
18124
18125_ACEOF
18126cat >>$CONFIG_STATUS <<\_ACEOF
18127for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18128 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18129 case $ac_file in
18130 - | *:- | *:-:* ) # input from stdin
18131 cat >$tmp/stdin
18132 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18133 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18134 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18135 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18136 * ) ac_file_in=$ac_file.in ;;
18137 esac
18138
18139 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18140 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18141$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18142 X"$ac_file" : 'X\(//\)[^/]' \| \
18143 X"$ac_file" : 'X\(//\)$' \| \
18144 X"$ac_file" : 'X\(/\)' \| \
18145 . : '\(.\)' 2>/dev/null ||
18146echo X"$ac_file" |
18147 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18148 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18149 /^X\(\/\/\)$/{ s//\1/; q; }
18150 /^X\(\/\).*/{ s//\1/; q; }
18151 s/.*/./; q'`
Barry Warsawfe33b792003-01-07 22:42:49 +000018152 { case "$ac_dir" in
18153 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18154 *) as_incr_dir=.;;
18155esac
18156as_dummy="$ac_dir"
18157for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18158 case $as_mkdir_dir in
18159 # Skip DOS drivespec
18160 ?:) as_incr_dir=$as_mkdir_dir ;;
18161 *)
18162 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18163 test -d "$as_incr_dir" ||
18164 mkdir "$as_incr_dir" ||
18165 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18166echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18167 { (exit 1); exit 1; }; }
18168 ;;
18169 esac
18170done; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018171
18172 ac_builddir=.
18173
18174if test "$ac_dir" != .; then
18175 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18176 # A "../" for each directory in $ac_dir_suffix.
18177 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18178else
18179 ac_dir_suffix= ac_top_builddir=
18180fi
18181
18182case $srcdir in
18183 .) # No --srcdir option. We are building in place.
18184 ac_srcdir=.
18185 if test -z "$ac_top_builddir"; then
18186 ac_top_srcdir=.
18187 else
18188 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18189 fi ;;
18190 [\\/]* | ?:[\\/]* ) # Absolute path.
18191 ac_srcdir=$srcdir$ac_dir_suffix;
18192 ac_top_srcdir=$srcdir ;;
18193 *) # Relative path.
18194 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18195 ac_top_srcdir=$ac_top_builddir$srcdir ;;
18196esac
18197# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18198# absolute.
18199ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwise9416172003-05-03 10:12:45 +000018200ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000018201ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18202ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18203
18204
18205 case $INSTALL in
18206 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18207 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
18208 esac
18209
18210 if test x"$ac_file" != x-; then
18211 { echo "$as_me:$LINENO: creating $ac_file" >&5
18212echo "$as_me: creating $ac_file" >&6;}
18213 rm -f "$ac_file"
18214 fi
18215 # Let's still pretend it is `configure' which instantiates (i.e., don't
18216 # use $as_me), people would be surprised to read:
18217 # /* config.h. Generated by config.status. */
18218 if test x"$ac_file" = x-; then
18219 configure_input=
18220 else
18221 configure_input="$ac_file. "
18222 fi
18223 configure_input=$configure_input"Generated from `echo $ac_file_in |
18224 sed 's,.*/,,'` by configure."
18225
18226 # First look for the input files in the build tree, otherwise in the
18227 # src tree.
18228 ac_file_inputs=`IFS=:
18229 for f in $ac_file_in; do
18230 case $f in
18231 -) echo $tmp/stdin ;;
18232 [\\/$]*)
18233 # Absolute (can't be DOS-style, as IFS=:)
18234 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18235echo "$as_me: error: cannot find input file: $f" >&2;}
18236 { (exit 1); exit 1; }; }
18237 echo $f;;
18238 *) # Relative
18239 if test -f "$f"; then
18240 # Build tree
18241 echo $f
18242 elif test -f "$srcdir/$f"; then
18243 # Source tree
18244 echo $srcdir/$f
18245 else
18246 # /dev/null tree
18247 { { 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 fi;;
18251 esac
18252 done` || { (exit 1); exit 1; }
18253_ACEOF
18254cat >>$CONFIG_STATUS <<_ACEOF
18255 sed "$ac_vpsub
18256$extrasub
18257_ACEOF
18258cat >>$CONFIG_STATUS <<\_ACEOF
18259:t
18260/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18261s,@configure_input@,$configure_input,;t t
18262s,@srcdir@,$ac_srcdir,;t t
18263s,@abs_srcdir@,$ac_abs_srcdir,;t t
18264s,@top_srcdir@,$ac_top_srcdir,;t t
18265s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18266s,@builddir@,$ac_builddir,;t t
18267s,@abs_builddir@,$ac_abs_builddir,;t t
18268s,@top_builddir@,$ac_top_builddir,;t t
18269s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
18270s,@INSTALL@,$ac_INSTALL,;t t
18271" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18272 rm -f $tmp/stdin
18273 if test x"$ac_file" != x-; then
18274 mv $tmp/out $ac_file
18275 else
18276 cat $tmp/out
18277 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018278 fi
18279
Martin v. Löwis11437992002-04-12 09:54:03 +000018280done
18281_ACEOF
18282cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018283
Martin v. Löwis11437992002-04-12 09:54:03 +000018284#
18285# CONFIG_HEADER section.
18286#
Guido van Rossum627b2d71993-12-24 10:39:16 +000018287
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018288# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18289# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000018290#
18291# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000018292ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18293ac_dB='[ ].*$,\1#\2'
18294ac_dC=' '
18295ac_dD=',;t'
18296# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18297ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18298ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018299ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000018300ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018301
Martin v. Löwis11437992002-04-12 09:54:03 +000018302for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000018303 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000018304 case $ac_file in
18305 - | *:- | *:-:* ) # input from stdin
18306 cat >$tmp/stdin
18307 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18308 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18309 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18310 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18311 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018312 esac
18313
Martin v. Löwis11437992002-04-12 09:54:03 +000018314 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
18315echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000018316
Martin v. Löwis11437992002-04-12 09:54:03 +000018317 # First look for the input files in the build tree, otherwise in the
18318 # src tree.
18319 ac_file_inputs=`IFS=:
18320 for f in $ac_file_in; do
18321 case $f in
18322 -) echo $tmp/stdin ;;
18323 [\\/$]*)
18324 # Absolute (can't be DOS-style, as IFS=:)
18325 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18326echo "$as_me: error: cannot find input file: $f" >&2;}
18327 { (exit 1); exit 1; }; }
18328 echo $f;;
18329 *) # Relative
18330 if test -f "$f"; then
18331 # Build tree
18332 echo $f
18333 elif test -f "$srcdir/$f"; then
18334 # Source tree
18335 echo $srcdir/$f
18336 else
18337 # /dev/null tree
18338 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18339echo "$as_me: error: cannot find input file: $f" >&2;}
18340 { (exit 1); exit 1; }; }
18341 fi;;
18342 esac
18343 done` || { (exit 1); exit 1; }
18344 # Remove the trailing spaces.
18345 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018346
Martin v. Löwis11437992002-04-12 09:54:03 +000018347_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018348
Martin v. Löwis11437992002-04-12 09:54:03 +000018349# Transform confdefs.h into two sed scripts, `conftest.defines' and
18350# `conftest.undefs', that substitutes the proper values into
18351# config.h.in to produce config.h. The first handles `#define'
18352# templates, and the second `#undef' templates.
18353# And first: Protect against being on the right side of a sed subst in
18354# config.status. Protect against being in an unquoted here document
18355# in config.status.
18356rm -f conftest.defines conftest.undefs
18357# Using a here document instead of a string reduces the quoting nightmare.
18358# Putting comments in sed scripts is not portable.
18359#
18360# `end' is used to avoid that the second main sed command (meant for
18361# 0-ary CPP macros) applies to n-ary macro definitions.
18362# See the Autoconf documentation for `clear'.
18363cat >confdef2sed.sed <<\_ACEOF
18364s/[\\&,]/\\&/g
18365s,[\\$`],\\&,g
18366t clear
18367: clear
18368s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
18369t end
18370s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
18371: end
18372_ACEOF
18373# If some macros were called several times there might be several times
18374# the same #defines, which is useless. Nevertheless, we may not want to
18375# sort them, since we want the *last* AC-DEFINE to be honored.
18376uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
18377sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
18378rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018379
18380# This sed command replaces #undef with comments. This is necessary, for
18381# example, in the case of _POSIX_SOURCE, which is predefined and required
18382# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000018383cat >>conftest.undefs <<\_ACEOF
18384s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
18385_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018386
Martin v. Löwis11437992002-04-12 09:54:03 +000018387# Break up conftest.defines because some shells have a limit on the size
18388# of here documents, and old seds have small limits too (100 cmds).
18389echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Barry Warsawfe33b792003-01-07 22:42:49 +000018390echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018391echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
18392echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018393rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000018394while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000018395do
Martin v. Löwis11437992002-04-12 09:54:03 +000018396 # Write a limited-size here document to $tmp/defines.sed.
18397 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
18398 # Speed up: don't consider the non `#define' lines.
18399 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
18400 # Work around the forget-to-reset-the-flag bug.
18401 echo 't clr' >>$CONFIG_STATUS
18402 echo ': clr' >>$CONFIG_STATUS
18403 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018404 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018405 sed -f $tmp/defines.sed $tmp/in >$tmp/out
18406 rm -f $tmp/in
18407 mv $tmp/out $tmp/in
18408' >>$CONFIG_STATUS
18409 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
18410 rm -f conftest.defines
18411 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000018412done
Martin v. Löwis11437992002-04-12 09:54:03 +000018413rm -f conftest.defines
Barry Warsawfe33b792003-01-07 22:42:49 +000018414echo ' fi # egrep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018415echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018416
Martin v. Löwis11437992002-04-12 09:54:03 +000018417# Break up conftest.undefs because some shells have a limit on the size
18418# of here documents, and old seds have small limits too (100 cmds).
18419echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
18420rm -f conftest.tail
18421while grep . conftest.undefs >/dev/null
18422do
18423 # Write a limited-size here document to $tmp/undefs.sed.
18424 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
18425 # Speed up: don't consider the non `#undef'
18426 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
18427 # Work around the forget-to-reset-the-flag bug.
18428 echo 't clr' >>$CONFIG_STATUS
18429 echo ': clr' >>$CONFIG_STATUS
18430 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
18431 echo 'CEOF
18432 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
18433 rm -f $tmp/in
18434 mv $tmp/out $tmp/in
18435' >>$CONFIG_STATUS
18436 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
18437 rm -f conftest.undefs
18438 mv conftest.tail conftest.undefs
18439done
18440rm -f conftest.undefs
18441
18442cat >>$CONFIG_STATUS <<\_ACEOF
18443 # Let's still pretend it is `configure' which instantiates (i.e., don't
18444 # use $as_me), people would be surprised to read:
18445 # /* config.h. Generated by config.status. */
18446 if test x"$ac_file" = x-; then
18447 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000018448 else
Martin v. Löwis11437992002-04-12 09:54:03 +000018449 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000018450 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018451 cat $tmp/in >>$tmp/config.h
18452 rm -f $tmp/in
18453 if test x"$ac_file" != x-; then
18454 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
18455 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
18456echo "$as_me: $ac_file is unchanged" >&6;}
18457 else
18458 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18459$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18460 X"$ac_file" : 'X\(//\)[^/]' \| \
18461 X"$ac_file" : 'X\(//\)$' \| \
18462 X"$ac_file" : 'X\(/\)' \| \
18463 . : '\(.\)' 2>/dev/null ||
18464echo X"$ac_file" |
18465 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18466 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18467 /^X\(\/\/\)$/{ s//\1/; q; }
18468 /^X\(\/\).*/{ s//\1/; q; }
18469 s/.*/./; q'`
Barry Warsawfe33b792003-01-07 22:42:49 +000018470 { case "$ac_dir" in
18471 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18472 *) as_incr_dir=.;;
18473esac
18474as_dummy="$ac_dir"
18475for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18476 case $as_mkdir_dir in
18477 # Skip DOS drivespec
18478 ?:) as_incr_dir=$as_mkdir_dir ;;
18479 *)
18480 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18481 test -d "$as_incr_dir" ||
18482 mkdir "$as_incr_dir" ||
18483 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18484echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18485 { (exit 1); exit 1; }; }
18486 ;;
18487 esac
18488done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018489
Martin v. Löwis11437992002-04-12 09:54:03 +000018490 rm -f $ac_file
18491 mv $tmp/config.h $ac_file
18492 fi
18493 else
18494 cat $tmp/config.h
18495 rm -f $tmp/config.h
18496 fi
18497done
18498_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000018499
Martin v. Löwis11437992002-04-12 09:54:03 +000018500cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018501
Martin v. Löwis11437992002-04-12 09:54:03 +000018502{ (exit 0); exit 0; }
18503_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018504chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018505ac_clean_files=$ac_clean_files_save
18506
18507
18508# configure is writing to config.log, and then calls config.status.
18509# config.status does its own redirection, appending to config.log.
18510# Unfortunately, on DOS this fails, as config.log is still kept open
18511# by configure, so config.status won't be able to write to it; its
18512# output is simply discarded. So we exec the FD to /dev/null,
18513# effectively closing config.log, so it can be properly (re)opened and
18514# appended to by config.status. When coming back to configure, we
18515# need to make the FD available again.
18516if test "$no_create" != yes; then
18517 ac_cs_success=:
18518 exec 5>/dev/null
18519 $SHELL $CONFIG_STATUS || ac_cs_success=false
18520 exec 5>>config.log
18521 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18522 # would make configure fail if this is the last instruction.
18523 $ac_cs_success || { (exit 1); exit 1; }
18524fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018525
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018526
18527echo "creating Setup"
18528if test ! -f Modules/Setup
18529then
18530 cp $srcdir/Modules/Setup.dist Modules/Setup
18531fi
18532
18533echo "creating Setup.local"
18534if test ! -f Modules/Setup.local
18535then
18536 echo "# Edit this file for local setup changes" >Modules/Setup.local
18537fi
18538
18539echo "creating Makefile"
18540$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
18541 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000018542 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018543mv config.c Modules