blob: ad33c34e7c932fd1e7a084dbfe2bfdf289cb5b04 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00002# From configure.in Revision: 1.411 .
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öwis858f8172003-05-24 12:35:47 +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.
Martin v. Löwis858f8172003-05-24 12:35:47 +00001351 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm.
1352 OpenBSD/2.* | OpenBSD/3.[0123])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001353 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00001354 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
1355 # of union __?sigval. Reported by Stuart Bishop.
1356 SunOS/5.6)
1357 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001358 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
1359 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
1360 OpenUNIX/8.0.0| UnixWare/7.1.[0-3])
1361 define_xopen_source=no;;
1362 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001363 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001364 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001365 define_xopen_source=no;;
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001366esac
1367
1368if test $define_xopen_source = yes
1369then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001370
1371cat >>confdefs.h <<\_ACEOF
1372#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001373_ACEOF
1374
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001375
1376 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1377 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1378 # several APIs are not declared. Since this is also needed in some
1379 # cases for HP-UX, we define it globally.
1380
1381
1382cat >>confdefs.h <<\_ACEOF
1383#define _XOPEN_SOURCE_EXTENDED 1
1384_ACEOF
1385
1386
1387cat >>confdefs.h <<\_ACEOF
1388#define _POSIX_C_SOURCE 200112L
1389_ACEOF
1390
1391
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001392fi
1393
Guido van Rossum91922671997-10-09 20:24:13 +00001394#
1395# SGI compilers allow the specification of the both the ABI and the
1396# ISA on the command line. Depending on the values of these switches,
1397# different and often incompatable code will be generated.
1398#
1399# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1400# thus supply support for various ABI/ISA combinations. The MACHDEP
1401# variable is also adjusted.
1402#
1403
1404if test ! -z "$SGI_ABI"
1405then
1406 CC="cc $SGI_ABI"
1407 LDFLAGS="$SGI_ABI $LDFLAGS"
1408 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1409fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001410echo "$as_me:$LINENO: result: $MACHDEP" >&5
1411echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001412
Jack Jansen83f898c2002-12-30 22:23:40 +00001413# And add extra plat-mac for darwin
1414
Jack Jansen7b59b422003-03-17 15:44:10 +00001415
Jack Jansen83f898c2002-12-30 22:23:40 +00001416echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1417echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1418if test -z "$EXTRAPLATDIR"
1419then
1420 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001421 darwin)
1422 EXTRAPLATDIR="\$(PLATMACDIRS)"
1423 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1424 ;;
1425 *)
1426 EXTRAPLATDIR=""
1427 EXTRAMACHDEPPATH=""
1428 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001429 esac
1430fi
1431echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1432echo "${ECHO_T}$EXTRAPLATDIR" >&6
1433
Guido van Rossum627b2d71993-12-24 10:39:16 +00001434# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001435
1436# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1437# for debug/optimization stuff. BASECFLAGS is for flags that are required
1438# just to get things to compile and link. Users are free to override OPT
1439# when running configure or make. The build should not break if they do.
1440# BASECFLAGS should generally not be messed with, however.
1441
1442# XXX shouldn't some/most/all of this code be merged with the stuff later
1443# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001444echo "$as_me:$LINENO: checking for --without-gcc" >&5
1445echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1446
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001447# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001448if test "${with_gcc+set}" = set; then
1449 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001450
Guido van Rossum7f43da71994-08-01 12:15:30 +00001451 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001452 no) CC=cc
1453 without_gcc=yes;;
1454 yes) CC=gcc
1455 without_gcc=no;;
1456 *) CC=$withval
1457 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001458 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001459else
Martin v. Löwis11437992002-04-12 09:54:03 +00001460
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001461 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001462 AIX*) CC=cc_r
1463 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001464 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001465 case $BE_HOST_CPU in
1466 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001467 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001468 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001469 BASECFLAGS="$BASECFLAGS -export pragma"
1470 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001471 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001472 ;;
1473 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001474 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001475 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001476 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001477 ;;
1478 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001479 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1480echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1481 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001482 ;;
1483 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001484 AR="\$(srcdir)/Modules/ar_beos"
1485 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001486 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001487 Monterey*)
1488 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001489 without_gcc=;;
1490 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001491 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001492fi;
1493echo "$as_me:$LINENO: result: $without_gcc" >&5
1494echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001495
1496
Guido van Rossum95012191999-12-16 17:50:52 +00001497
Fred Drakea1a84e72001-03-06 05:52:16 +00001498MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001499echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1500echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1501
Guido van Rossum95012191999-12-16 17:50:52 +00001502# Check whether --with-cxx or --without-cxx was given.
1503if test "${with_cxx+set}" = set; then
1504 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001505
Martin v. Löwis22352952000-12-13 17:37:02 +00001506 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001507 case $withval in
1508 no) CXX=
1509 with_cxx=no;;
1510 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001511 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001512 with_cxx=$withval;;
1513 esac
1514else
Martin v. Löwis11437992002-04-12 09:54:03 +00001515
Guido van Rossum95012191999-12-16 17:50:52 +00001516 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001517 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001518
Martin v. Löwis11437992002-04-12 09:54:03 +00001519fi;
1520echo "$as_me:$LINENO: result: $with_cxx" >&5
1521echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001522
1523if test "$with_cxx" = "yes"
1524then
Martin v. Löwis11437992002-04-12 09:54:03 +00001525 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1526echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1527 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001528fi
1529
1530
1531
1532
Martin v. Löwis11437992002-04-12 09:54:03 +00001533if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001534then
1535 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1536do
Martin v. Löwis11437992002-04-12 09:54:03 +00001537 # 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 +00001538set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001539echo "$as_me:$LINENO: checking for $ac_word" >&5
1540echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1541if test "${ac_cv_prog_CXX+set}" = set; then
1542 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001543else
1544 if test -n "$CXX"; then
1545 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1546else
Martin v. Löwis11437992002-04-12 09:54:03 +00001547as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1548for as_dir in $PATH
1549do
1550 IFS=$as_save_IFS
1551 test -z "$as_dir" && as_dir=.
1552 for ac_exec_ext in '' $ac_executable_extensions; do
1553 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1554 ac_cv_prog_CXX="$ac_prog"
1555 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1556 break 2
1557 fi
1558done
1559done
1560
Martin v. Löwis22352952000-12-13 17:37:02 +00001561fi
1562fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001563CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001564if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001565 echo "$as_me:$LINENO: result: $CXX" >&5
1566echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001567else
Martin v. Löwis11437992002-04-12 09:54:03 +00001568 echo "$as_me:$LINENO: result: no" >&5
1569echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001570fi
1571
Martin v. Löwis11437992002-04-12 09:54:03 +00001572 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001573done
1574test -n "$CXX" || CXX="notfound"
1575
1576 if test "$CXX" = "notfound"
1577 then
1578 CXX=
1579 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001580 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001581ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001582ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1583ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1584ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1585 cat >conftest.$ac_ext <<_ACEOF
1586#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001587#include "confdefs.h"
1588
Barry Warsawfe33b792003-01-07 22:42:49 +00001589#ifdef F77_DUMMY_MAIN
1590# ifdef __cplusplus
1591 extern "C"
1592# endif
1593 int F77_DUMMY_MAIN() { return 1; }
1594#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00001595int
1596main ()
1597{
Michael W. Hudson54241132001-12-07 15:38:26 +00001598
Martin v. Löwis11437992002-04-12 09:54:03 +00001599 ;
1600 return 0;
1601}
1602_ACEOF
1603ac_clean_files_save=$ac_clean_files
1604ac_clean_files="$ac_clean_files a.out a.exe"
1605# Try to create an executable without -o first, disregard a.out.
1606# It will help us diagnose broken compilers, and finding out an intuition
1607# of exeext.
1608echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1609echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1610ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1611if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1612 (eval $ac_link_default) 2>&5
1613 ac_status=$?
1614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1615 (exit $ac_status); }; then
1616 # Find the output, starting from the most likely. This scheme is
1617# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1618# resort.
1619
1620# Be careful to initialize this variable, since it used to be cached.
1621# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1622ac_cv_exeext=
Barry Warsawfe33b792003-01-07 22:42:49 +00001623for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1624 ls a.out conftest 2>/dev/null;
1625 ls a.* conftest.* 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001626 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00001627 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001628 a.out ) # We found the default executable, but exeext='' is most
1629 # certainly right.
1630 break;;
1631 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1632 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1633 export ac_cv_exeext
1634 break;;
1635 * ) break;;
1636 esac
1637done
1638else
1639 echo "$as_me: failed program was:" >&5
1640cat conftest.$ac_ext >&5
Barry Warsawfe33b792003-01-07 22:42:49 +00001641{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1642echo "$as_me: error: C++ compiler cannot create executables" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001643 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001644fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001645
1646ac_exeext=$ac_cv_exeext
1647echo "$as_me:$LINENO: result: $ac_file" >&5
1648echo "${ECHO_T}$ac_file" >&6
1649
1650# Check the compiler produces executables we can run. If not, either
1651# the compiler is broken, or we cross compile.
1652echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1653echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1654# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1655# If not cross compiling, check that we can run a simple program.
1656if test "$cross_compiling" != yes; then
1657 if { ac_try='./$ac_file'
1658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1659 (eval $ac_try) 2>&5
1660 ac_status=$?
1661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1662 (exit $ac_status); }; }; then
1663 cross_compiling=no
1664 else
1665 if test "$cross_compiling" = maybe; then
1666 cross_compiling=yes
1667 else
1668 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1669If you meant to cross compile, use \`--host'." >&5
1670echo "$as_me: error: cannot run C++ compiled programs.
1671If you meant to cross compile, use \`--host'." >&2;}
1672 { (exit 1); exit 1; }; }
1673 fi
1674 fi
1675fi
1676echo "$as_me:$LINENO: result: yes" >&5
1677echo "${ECHO_T}yes" >&6
1678
1679rm -f a.out a.exe conftest$ac_cv_exeext
1680ac_clean_files=$ac_clean_files_save
1681# Check the compiler produces executables we can run. If not, either
1682# the compiler is broken, or we cross compile.
1683echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1684echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1685echo "$as_me:$LINENO: result: $cross_compiling" >&5
1686echo "${ECHO_T}$cross_compiling" >&6
1687
1688echo "$as_me:$LINENO: checking for suffix of executables" >&5
1689echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1690if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1691 (eval $ac_link) 2>&5
1692 ac_status=$?
1693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1694 (exit $ac_status); }; then
1695 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1696# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1697# work properly (i.e., refer to `conftest.exe'), while it won't with
1698# `rm'.
Barry Warsawfe33b792003-01-07 22:42:49 +00001699for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001700 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00001701 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001702 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1703 export ac_cv_exeext
1704 break;;
1705 * ) break;;
1706 esac
1707done
1708else
1709 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1710echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1711 { (exit 1); exit 1; }; }
1712fi
1713
1714rm -f conftest$ac_cv_exeext
1715echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1716echo "${ECHO_T}$ac_cv_exeext" >&6
1717
1718rm -f conftest.$ac_ext
1719EXEEXT=$ac_cv_exeext
1720ac_exeext=$EXEEXT
1721
1722 ac_ext=c
1723ac_cpp='$CPP $CPPFLAGS'
1724ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1725ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1726ac_compiler_gnu=$ac_cv_c_compiler_gnu
1727
1728
Martin v. Löwis22352952000-12-13 17:37:02 +00001729
1730 fi
1731fi
1732
Guido van Rossum8b131c51995-03-09 14:10:13 +00001733# If the user switches compilers, we can't believe the cache
1734if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1735then
Martin v. Löwis11437992002-04-12 09:54:03 +00001736 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1737(it is also a good idea to do 'make clean' before compiling)" >&5
1738echo "$as_me: error: cached CC is different -- throw away $cache_file
1739(it is also a good idea to do 'make clean' before compiling)" >&2;}
1740 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001741fi
1742
Martin v. Löwis11437992002-04-12 09:54:03 +00001743ac_ext=c
1744ac_cpp='$CPP $CPPFLAGS'
1745ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1746ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1747ac_compiler_gnu=$ac_cv_c_compiler_gnu
1748if test -n "$ac_tool_prefix"; then
1749 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1750set dummy ${ac_tool_prefix}gcc; ac_word=$2
1751echo "$as_me:$LINENO: checking for $ac_word" >&5
1752echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1753if test "${ac_cv_prog_CC+set}" = set; then
1754 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001755else
1756 if test -n "$CC"; then
1757 ac_cv_prog_CC="$CC" # Let the user override the test.
1758else
Martin v. Löwis11437992002-04-12 09:54:03 +00001759as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1760for as_dir in $PATH
1761do
1762 IFS=$as_save_IFS
1763 test -z "$as_dir" && as_dir=.
1764 for ac_exec_ext in '' $ac_executable_extensions; do
1765 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1766 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1767 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1768 break 2
1769 fi
1770done
1771done
1772
Jack Jansendd19cf82001-12-06 22:36:17 +00001773fi
1774fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001775CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001776if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001777 echo "$as_me:$LINENO: result: $CC" >&5
1778echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001779else
Martin v. Löwis11437992002-04-12 09:54:03 +00001780 echo "$as_me:$LINENO: result: no" >&5
1781echo "${ECHO_T}no" >&6
1782fi
1783
1784fi
1785if test -z "$ac_cv_prog_CC"; then
1786 ac_ct_CC=$CC
1787 # Extract the first word of "gcc", so it can be a program name with args.
1788set dummy gcc; ac_word=$2
1789echo "$as_me:$LINENO: checking for $ac_word" >&5
1790echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1791if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1792 echo $ECHO_N "(cached) $ECHO_C" >&6
1793else
1794 if test -n "$ac_ct_CC"; then
1795 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1796else
1797as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1798for as_dir in $PATH
1799do
1800 IFS=$as_save_IFS
1801 test -z "$as_dir" && as_dir=.
1802 for ac_exec_ext in '' $ac_executable_extensions; do
1803 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1804 ac_cv_prog_ac_ct_CC="gcc"
1805 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1806 break 2
1807 fi
1808done
1809done
1810
1811fi
1812fi
1813ac_ct_CC=$ac_cv_prog_ac_ct_CC
1814if test -n "$ac_ct_CC"; then
1815 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1816echo "${ECHO_T}$ac_ct_CC" >&6
1817else
1818 echo "$as_me:$LINENO: result: no" >&5
1819echo "${ECHO_T}no" >&6
1820fi
1821
1822 CC=$ac_ct_CC
1823else
1824 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001825fi
1826
Jack Jansendd19cf82001-12-06 22:36:17 +00001827if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001828 if test -n "$ac_tool_prefix"; then
1829 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1830set dummy ${ac_tool_prefix}cc; ac_word=$2
1831echo "$as_me:$LINENO: checking for $ac_word" >&5
1832echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1833if test "${ac_cv_prog_CC+set}" = set; then
1834 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001835else
1836 if test -n "$CC"; then
1837 ac_cv_prog_CC="$CC" # Let the user override the test.
1838else
Martin v. Löwis11437992002-04-12 09:54:03 +00001839as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1840for as_dir in $PATH
1841do
1842 IFS=$as_save_IFS
1843 test -z "$as_dir" && as_dir=.
1844 for ac_exec_ext in '' $ac_executable_extensions; do
1845 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1846 ac_cv_prog_CC="${ac_tool_prefix}cc"
1847 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1848 break 2
1849 fi
1850done
1851done
1852
1853fi
1854fi
1855CC=$ac_cv_prog_CC
1856if test -n "$CC"; then
1857 echo "$as_me:$LINENO: result: $CC" >&5
1858echo "${ECHO_T}$CC" >&6
1859else
1860 echo "$as_me:$LINENO: result: no" >&5
1861echo "${ECHO_T}no" >&6
1862fi
1863
1864fi
1865if test -z "$ac_cv_prog_CC"; then
1866 ac_ct_CC=$CC
1867 # Extract the first word of "cc", so it can be a program name with args.
1868set dummy cc; ac_word=$2
1869echo "$as_me:$LINENO: checking for $ac_word" >&5
1870echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1871if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1872 echo $ECHO_N "(cached) $ECHO_C" >&6
1873else
1874 if test -n "$ac_ct_CC"; then
1875 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1876else
1877as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1878for as_dir in $PATH
1879do
1880 IFS=$as_save_IFS
1881 test -z "$as_dir" && as_dir=.
1882 for ac_exec_ext in '' $ac_executable_extensions; do
1883 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1884 ac_cv_prog_ac_ct_CC="cc"
1885 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1886 break 2
1887 fi
1888done
1889done
1890
1891fi
1892fi
1893ac_ct_CC=$ac_cv_prog_ac_ct_CC
1894if test -n "$ac_ct_CC"; then
1895 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1896echo "${ECHO_T}$ac_ct_CC" >&6
1897else
1898 echo "$as_me:$LINENO: result: no" >&5
1899echo "${ECHO_T}no" >&6
1900fi
1901
1902 CC=$ac_ct_CC
1903else
1904 CC="$ac_cv_prog_CC"
1905fi
1906
1907fi
1908if test -z "$CC"; then
1909 # Extract the first word of "cc", so it can be a program name with args.
1910set dummy cc; ac_word=$2
1911echo "$as_me:$LINENO: checking for $ac_word" >&5
1912echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1913if test "${ac_cv_prog_CC+set}" = set; then
1914 echo $ECHO_N "(cached) $ECHO_C" >&6
1915else
1916 if test -n "$CC"; then
1917 ac_cv_prog_CC="$CC" # Let the user override the test.
1918else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001919 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001920as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1921for as_dir in $PATH
1922do
1923 IFS=$as_save_IFS
1924 test -z "$as_dir" && as_dir=.
1925 for ac_exec_ext in '' $ac_executable_extensions; do
1926 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1927 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1928 ac_prog_rejected=yes
1929 continue
1930 fi
1931 ac_cv_prog_CC="cc"
1932 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1933 break 2
1934 fi
1935done
1936done
1937
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001938if test $ac_prog_rejected = yes; then
1939 # We found a bogon in the path, so make sure we never use it.
1940 set dummy $ac_cv_prog_CC
1941 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001942 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001943 # We chose a different compiler from the bogus one.
1944 # However, it has the same basename, so the bogon will be chosen
1945 # first if we set CC to just the basename; use the full file name.
1946 shift
Barry Warsawfe33b792003-01-07 22:42:49 +00001947 set dummy "$as_dir/$ac_word" ${1+"$@"}
1948 shift
1949 ac_cv_prog_CC="$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001950 fi
1951fi
1952fi
1953fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001954CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001955if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001956 echo "$as_me:$LINENO: result: $CC" >&5
1957echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001958else
Martin v. Löwis11437992002-04-12 09:54:03 +00001959 echo "$as_me:$LINENO: result: no" >&5
1960echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001961fi
1962
Martin v. Löwis11437992002-04-12 09:54:03 +00001963fi
1964if test -z "$CC"; then
1965 if test -n "$ac_tool_prefix"; then
1966 for ac_prog in cl
1967 do
1968 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1969set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1970echo "$as_me:$LINENO: checking for $ac_word" >&5
1971echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1972if test "${ac_cv_prog_CC+set}" = set; then
1973 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001974else
1975 if test -n "$CC"; then
1976 ac_cv_prog_CC="$CC" # Let the user override the test.
1977else
Martin v. Löwis11437992002-04-12 09:54:03 +00001978as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1979for as_dir in $PATH
1980do
1981 IFS=$as_save_IFS
1982 test -z "$as_dir" && as_dir=.
1983 for ac_exec_ext in '' $ac_executable_extensions; do
1984 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1985 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1986 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1987 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001988 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001989done
1990done
1991
1992fi
1993fi
1994CC=$ac_cv_prog_CC
1995if test -n "$CC"; then
1996 echo "$as_me:$LINENO: result: $CC" >&5
1997echo "${ECHO_T}$CC" >&6
1998else
1999 echo "$as_me:$LINENO: result: no" >&5
2000echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002001fi
2002
Martin v. Löwis11437992002-04-12 09:54:03 +00002003 test -n "$CC" && break
2004 done
2005fi
2006if test -z "$CC"; then
2007 ac_ct_CC=$CC
2008 for ac_prog in cl
2009do
2010 # Extract the first word of "$ac_prog", so it can be a program name with args.
2011set dummy $ac_prog; ac_word=$2
2012echo "$as_me:$LINENO: checking for $ac_word" >&5
2013echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2014if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2015 echo $ECHO_N "(cached) $ECHO_C" >&6
2016else
2017 if test -n "$ac_ct_CC"; then
2018 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2019else
2020as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2021for as_dir in $PATH
2022do
2023 IFS=$as_save_IFS
2024 test -z "$as_dir" && as_dir=.
2025 for ac_exec_ext in '' $ac_executable_extensions; do
2026 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2027 ac_cv_prog_ac_ct_CC="$ac_prog"
2028 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2029 break 2
2030 fi
2031done
2032done
Jack Jansendd19cf82001-12-06 22:36:17 +00002033
Martin v. Löwis11437992002-04-12 09:54:03 +00002034fi
2035fi
2036ac_ct_CC=$ac_cv_prog_ac_ct_CC
2037if test -n "$ac_ct_CC"; then
2038 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2039echo "${ECHO_T}$ac_ct_CC" >&6
2040else
2041 echo "$as_me:$LINENO: result: no" >&5
2042echo "${ECHO_T}no" >&6
2043fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002044
Martin v. Löwis11437992002-04-12 09:54:03 +00002045 test -n "$ac_ct_CC" && break
2046done
Michael W. Hudson54241132001-12-07 15:38:26 +00002047
Martin v. Löwis11437992002-04-12 09:54:03 +00002048 CC=$ac_ct_CC
2049fi
2050
2051fi
2052
2053
2054test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
2055echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
2056 { (exit 1); exit 1; }; }
2057
2058# Provide some information about the compiler.
2059echo "$as_me:$LINENO:" \
2060 "checking for C compiler version" >&5
2061ac_compiler=`set X $ac_compile; echo $2`
2062{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2063 (eval $ac_compiler --version </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{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2073 (eval $ac_compiler -V </dev/null >&5) 2>&5
2074 ac_status=$?
2075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2076 (exit $ac_status); }
2077
2078cat >conftest.$ac_ext <<_ACEOF
2079#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00002080#include "confdefs.h"
2081
Barry Warsawfe33b792003-01-07 22:42:49 +00002082#ifdef F77_DUMMY_MAIN
2083# ifdef __cplusplus
2084 extern "C"
2085# endif
2086 int F77_DUMMY_MAIN() { return 1; }
2087#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002088int
2089main ()
2090{
2091
2092 ;
2093 return 0;
2094}
2095_ACEOF
2096ac_clean_files_save=$ac_clean_files
2097ac_clean_files="$ac_clean_files a.out a.exe"
2098# Try to create an executable without -o first, disregard a.out.
2099# It will help us diagnose broken compilers, and finding out an intuition
2100# of exeext.
2101echo "$as_me:$LINENO: checking for C compiler default output" >&5
2102echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2103ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2104if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2105 (eval $ac_link_default) 2>&5
2106 ac_status=$?
2107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2108 (exit $ac_status); }; then
2109 # Find the output, starting from the most likely. This scheme is
2110# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2111# resort.
2112
2113# Be careful to initialize this variable, since it used to be cached.
2114# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2115ac_cv_exeext=
Barry Warsawfe33b792003-01-07 22:42:49 +00002116for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
2117 ls a.out conftest 2>/dev/null;
2118 ls a.* conftest.* 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002119 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00002120 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002121 a.out ) # We found the default executable, but exeext='' is most
2122 # certainly right.
2123 break;;
2124 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2125 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2126 export ac_cv_exeext
2127 break;;
2128 * ) break;;
2129 esac
2130done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002131else
Martin v. Löwis11437992002-04-12 09:54:03 +00002132 echo "$as_me: failed program was:" >&5
2133cat conftest.$ac_ext >&5
Barry Warsawfe33b792003-01-07 22:42:49 +00002134{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2135echo "$as_me: error: C compiler cannot create executables" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002136 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002137fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002138
Martin v. Löwis11437992002-04-12 09:54:03 +00002139ac_exeext=$ac_cv_exeext
2140echo "$as_me:$LINENO: result: $ac_file" >&5
2141echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002142
Martin v. Löwis11437992002-04-12 09:54:03 +00002143# Check the compiler produces executables we can run. If not, either
2144# the compiler is broken, or we cross compile.
2145echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2146echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2147# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2148# If not cross compiling, check that we can run a simple program.
2149if test "$cross_compiling" != yes; then
2150 if { ac_try='./$ac_file'
2151 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2152 (eval $ac_try) 2>&5
2153 ac_status=$?
2154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2155 (exit $ac_status); }; }; then
2156 cross_compiling=no
2157 else
2158 if test "$cross_compiling" = maybe; then
2159 cross_compiling=yes
2160 else
2161 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2162If you meant to cross compile, use \`--host'." >&5
2163echo "$as_me: error: cannot run C compiled programs.
2164If you meant to cross compile, use \`--host'." >&2;}
2165 { (exit 1); exit 1; }; }
2166 fi
2167 fi
2168fi
2169echo "$as_me:$LINENO: result: yes" >&5
2170echo "${ECHO_T}yes" >&6
2171
2172rm -f a.out a.exe conftest$ac_cv_exeext
2173ac_clean_files=$ac_clean_files_save
2174# Check the compiler produces executables we can run. If not, either
2175# the compiler is broken, or we cross compile.
2176echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2177echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2178echo "$as_me:$LINENO: result: $cross_compiling" >&5
2179echo "${ECHO_T}$cross_compiling" >&6
2180
2181echo "$as_me:$LINENO: checking for suffix of executables" >&5
2182echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2183if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2184 (eval $ac_link) 2>&5
2185 ac_status=$?
2186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2187 (exit $ac_status); }; then
2188 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2189# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2190# work properly (i.e., refer to `conftest.exe'), while it won't with
2191# `rm'.
Barry Warsawfe33b792003-01-07 22:42:49 +00002192for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002193 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00002194 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002195 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2196 export ac_cv_exeext
2197 break;;
2198 * ) break;;
2199 esac
2200done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002201else
Martin v. Löwis11437992002-04-12 09:54:03 +00002202 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2203echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2204 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002205fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002206
Martin v. Löwis11437992002-04-12 09:54:03 +00002207rm -f conftest$ac_cv_exeext
2208echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2209echo "${ECHO_T}$ac_cv_exeext" >&6
2210
2211rm -f conftest.$ac_ext
2212EXEEXT=$ac_cv_exeext
2213ac_exeext=$EXEEXT
2214echo "$as_me:$LINENO: checking for suffix of object files" >&5
2215echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2216if test "${ac_cv_objext+set}" = set; then
2217 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002218else
Martin v. Löwis11437992002-04-12 09:54:03 +00002219 cat >conftest.$ac_ext <<_ACEOF
2220#line $LINENO "configure"
2221#include "confdefs.h"
2222
Barry Warsawfe33b792003-01-07 22:42:49 +00002223#ifdef F77_DUMMY_MAIN
2224# ifdef __cplusplus
2225 extern "C"
2226# endif
2227 int F77_DUMMY_MAIN() { return 1; }
2228#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002229int
2230main ()
2231{
2232
2233 ;
2234 return 0;
2235}
2236_ACEOF
2237rm -f conftest.o conftest.obj
2238if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2239 (eval $ac_compile) 2>&5
2240 ac_status=$?
2241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2242 (exit $ac_status); }; then
2243 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2244 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00002245 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002246 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2247 break;;
2248 esac
2249done
2250else
2251 echo "$as_me: failed program was:" >&5
2252cat conftest.$ac_ext >&5
2253{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2254echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2255 { (exit 1); exit 1; }; }
2256fi
2257
2258rm -f conftest.$ac_cv_objext conftest.$ac_ext
2259fi
2260echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2261echo "${ECHO_T}$ac_cv_objext" >&6
2262OBJEXT=$ac_cv_objext
2263ac_objext=$OBJEXT
2264echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2265echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2266if test "${ac_cv_c_compiler_gnu+set}" = set; then
2267 echo $ECHO_N "(cached) $ECHO_C" >&6
2268else
2269 cat >conftest.$ac_ext <<_ACEOF
2270#line $LINENO "configure"
2271#include "confdefs.h"
2272
Barry Warsawfe33b792003-01-07 22:42:49 +00002273#ifdef F77_DUMMY_MAIN
2274# ifdef __cplusplus
2275 extern "C"
2276# endif
2277 int F77_DUMMY_MAIN() { return 1; }
2278#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002279int
2280main ()
2281{
2282#ifndef __GNUC__
2283 choke me
2284#endif
2285
2286 ;
2287 return 0;
2288}
2289_ACEOF
2290rm -f conftest.$ac_objext
2291if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2292 (eval $ac_compile) 2>&5
2293 ac_status=$?
2294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2295 (exit $ac_status); } &&
2296 { ac_try='test -s conftest.$ac_objext'
2297 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2298 (eval $ac_try) 2>&5
2299 ac_status=$?
2300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2301 (exit $ac_status); }; }; then
2302 ac_compiler_gnu=yes
2303else
2304 echo "$as_me: failed program was:" >&5
2305cat conftest.$ac_ext >&5
2306ac_compiler_gnu=no
2307fi
2308rm -f conftest.$ac_objext conftest.$ac_ext
2309ac_cv_c_compiler_gnu=$ac_compiler_gnu
2310
2311fi
2312echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2313echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2314GCC=`test $ac_compiler_gnu = yes && echo yes`
2315ac_test_CFLAGS=${CFLAGS+set}
2316ac_save_CFLAGS=$CFLAGS
2317CFLAGS="-g"
2318echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2319echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2320if test "${ac_cv_prog_cc_g+set}" = set; then
2321 echo $ECHO_N "(cached) $ECHO_C" >&6
2322else
2323 cat >conftest.$ac_ext <<_ACEOF
2324#line $LINENO "configure"
2325#include "confdefs.h"
2326
Barry Warsawfe33b792003-01-07 22:42:49 +00002327#ifdef F77_DUMMY_MAIN
2328# ifdef __cplusplus
2329 extern "C"
2330# endif
2331 int F77_DUMMY_MAIN() { return 1; }
2332#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002333int
2334main ()
2335{
2336
2337 ;
2338 return 0;
2339}
2340_ACEOF
2341rm -f conftest.$ac_objext
2342if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2343 (eval $ac_compile) 2>&5
2344 ac_status=$?
2345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2346 (exit $ac_status); } &&
2347 { ac_try='test -s conftest.$ac_objext'
2348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2349 (eval $ac_try) 2>&5
2350 ac_status=$?
2351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2352 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002353 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002354else
Martin v. Löwis11437992002-04-12 09:54:03 +00002355 echo "$as_me: failed program was:" >&5
2356cat conftest.$ac_ext >&5
2357ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002358fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002359rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002360fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002361echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2362echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002363if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002364 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002365elif test $ac_cv_prog_cc_g = yes; then
2366 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002367 CFLAGS="-g -O2"
2368 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002369 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002370 fi
2371else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002372 if test "$GCC" = yes; then
2373 CFLAGS="-O2"
2374 else
2375 CFLAGS=
2376 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002377fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002378# Some people use a C++ compiler to compile C. Since we use `exit',
2379# in C++ we need to declare it. In case someone uses the same compiler
2380# for both compiling C and C++ we need to have the C++ compiler decide
2381# the declaration of exit, since it's the most demanding environment.
2382cat >conftest.$ac_ext <<_ACEOF
2383#ifndef __cplusplus
2384 choke me
2385#endif
2386_ACEOF
2387rm -f conftest.$ac_objext
2388if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2389 (eval $ac_compile) 2>&5
2390 ac_status=$?
2391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2392 (exit $ac_status); } &&
2393 { ac_try='test -s conftest.$ac_objext'
2394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2395 (eval $ac_try) 2>&5
2396 ac_status=$?
2397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2398 (exit $ac_status); }; }; then
2399 for ac_declaration in \
2400 ''\
2401 '#include <stdlib.h>' \
2402 'extern "C" void std::exit (int) throw (); using std::exit;' \
2403 'extern "C" void std::exit (int); using std::exit;' \
2404 'extern "C" void exit (int) throw ();' \
2405 'extern "C" void exit (int);' \
2406 'void exit (int);'
2407do
2408 cat >conftest.$ac_ext <<_ACEOF
2409#line $LINENO "configure"
2410#include "confdefs.h"
2411#include <stdlib.h>
2412$ac_declaration
Barry Warsawfe33b792003-01-07 22:42:49 +00002413#ifdef F77_DUMMY_MAIN
2414# ifdef __cplusplus
2415 extern "C"
2416# endif
2417 int F77_DUMMY_MAIN() { return 1; }
2418#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002419int
2420main ()
2421{
2422exit (42);
2423 ;
2424 return 0;
2425}
2426_ACEOF
2427rm -f conftest.$ac_objext
2428if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2429 (eval $ac_compile) 2>&5
2430 ac_status=$?
2431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2432 (exit $ac_status); } &&
2433 { ac_try='test -s conftest.$ac_objext'
2434 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2435 (eval $ac_try) 2>&5
2436 ac_status=$?
2437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2438 (exit $ac_status); }; }; then
2439 :
2440else
2441 echo "$as_me: failed program was:" >&5
2442cat conftest.$ac_ext >&5
2443continue
2444fi
2445rm -f conftest.$ac_objext conftest.$ac_ext
2446 cat >conftest.$ac_ext <<_ACEOF
2447#line $LINENO "configure"
2448#include "confdefs.h"
2449$ac_declaration
Barry Warsawfe33b792003-01-07 22:42:49 +00002450#ifdef F77_DUMMY_MAIN
2451# ifdef __cplusplus
2452 extern "C"
2453# endif
2454 int F77_DUMMY_MAIN() { return 1; }
2455#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002456int
2457main ()
2458{
2459exit (42);
2460 ;
2461 return 0;
2462}
2463_ACEOF
2464rm -f conftest.$ac_objext
2465if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2466 (eval $ac_compile) 2>&5
2467 ac_status=$?
2468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2469 (exit $ac_status); } &&
2470 { ac_try='test -s conftest.$ac_objext'
2471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2472 (eval $ac_try) 2>&5
2473 ac_status=$?
2474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2475 (exit $ac_status); }; }; then
2476 break
2477else
2478 echo "$as_me: failed program was:" >&5
2479cat conftest.$ac_ext >&5
2480fi
2481rm -f conftest.$ac_objext conftest.$ac_ext
2482done
2483rm -f conftest*
2484if test -n "$ac_declaration"; then
2485 echo '#ifdef __cplusplus' >>confdefs.h
2486 echo $ac_declaration >>confdefs.h
2487 echo '#endif' >>confdefs.h
2488fi
2489
2490else
2491 echo "$as_me: failed program was:" >&5
2492cat conftest.$ac_ext >&5
2493fi
2494rm -f conftest.$ac_objext conftest.$ac_ext
2495ac_ext=c
2496ac_cpp='$CPP $CPPFLAGS'
2497ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2498ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2499ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002500
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002501
2502# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002503
2504ac_ext=c
2505ac_cpp='$CPP $CPPFLAGS'
2506ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2507ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2508ac_compiler_gnu=$ac_cv_c_compiler_gnu
2509echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2510echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002511# On Suns, sometimes $CPP names a directory.
2512if test -n "$CPP" && test -d "$CPP"; then
2513 CPP=
2514fi
2515if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002516 if test "${ac_cv_prog_CPP+set}" = set; then
2517 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002518else
Martin v. Löwis11437992002-04-12 09:54:03 +00002519 # Double quotes because CPP needs to be expanded
2520 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2521 do
2522 ac_preproc_ok=false
2523for ac_c_preproc_warn_flag in '' yes
2524do
2525 # Use a header file that comes with gcc, so configuring glibc
2526 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002527 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 # not just through cpp. "Syntax error" is here to catch this case.
2529 cat >conftest.$ac_ext <<_ACEOF
2530#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002531#include "confdefs.h"
2532#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 Syntax error
2534_ACEOF
2535if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2536 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2537 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002538 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002539 rm -f conftest.er1
2540 cat conftest.err >&5
2541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2542 (exit $ac_status); } >/dev/null; then
2543 if test -s conftest.err; then
2544 ac_cpp_err=$ac_c_preproc_warn_flag
2545 else
2546 ac_cpp_err=
2547 fi
2548else
2549 ac_cpp_err=yes
2550fi
2551if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002552 :
2553else
Martin v. Löwis11437992002-04-12 09:54:03 +00002554 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002555 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002556 # Broken: fails on valid input.
2557continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002558fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002559rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561 # OK, works on sane cases. Now check whether non-existent headers
2562 # can be detected and how.
2563 cat >conftest.$ac_ext <<_ACEOF
2564#line $LINENO "configure"
2565#include "confdefs.h"
2566#include <ac_nonexistent.h>
2567_ACEOF
2568if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2569 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2570 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002571 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002572 rm -f conftest.er1
2573 cat conftest.err >&5
2574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2575 (exit $ac_status); } >/dev/null; then
2576 if test -s conftest.err; then
2577 ac_cpp_err=$ac_c_preproc_warn_flag
2578 else
2579 ac_cpp_err=
2580 fi
2581else
2582 ac_cpp_err=yes
2583fi
2584if test -z "$ac_cpp_err"; then
2585 # Broken: success on invalid input.
2586continue
2587else
2588 echo "$as_me: failed program was:" >&5
2589 cat conftest.$ac_ext >&5
2590 # Passes both tests.
2591ac_preproc_ok=:
2592break
2593fi
2594rm -f conftest.err conftest.$ac_ext
2595
2596done
2597# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2598rm -f conftest.err conftest.$ac_ext
2599if $ac_preproc_ok; then
2600 break
2601fi
2602
2603 done
2604 ac_cv_prog_CPP=$CPP
2605
2606fi
2607 CPP=$ac_cv_prog_CPP
2608else
2609 ac_cv_prog_CPP=$CPP
2610fi
2611echo "$as_me:$LINENO: result: $CPP" >&5
2612echo "${ECHO_T}$CPP" >&6
2613ac_preproc_ok=false
2614for ac_c_preproc_warn_flag in '' yes
2615do
2616 # Use a header file that comes with gcc, so configuring glibc
2617 # with a fresh cross-compiler works.
2618 # On the NeXT, cc -E runs the code through the compiler's parser,
2619 # not just through cpp. "Syntax error" is here to catch this case.
2620 cat >conftest.$ac_ext <<_ACEOF
2621#line $LINENO "configure"
2622#include "confdefs.h"
2623#include <assert.h>
2624 Syntax error
2625_ACEOF
2626if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2627 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2628 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002629 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002630 rm -f conftest.er1
2631 cat conftest.err >&5
2632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2633 (exit $ac_status); } >/dev/null; then
2634 if test -s conftest.err; then
2635 ac_cpp_err=$ac_c_preproc_warn_flag
2636 else
2637 ac_cpp_err=
2638 fi
2639else
2640 ac_cpp_err=yes
2641fi
2642if test -z "$ac_cpp_err"; then
2643 :
2644else
2645 echo "$as_me: failed program was:" >&5
2646 cat conftest.$ac_ext >&5
2647 # Broken: fails on valid input.
2648continue
2649fi
2650rm -f conftest.err conftest.$ac_ext
2651
2652 # OK, works on sane cases. Now check whether non-existent headers
2653 # can be detected and how.
2654 cat >conftest.$ac_ext <<_ACEOF
2655#line $LINENO "configure"
2656#include "confdefs.h"
2657#include <ac_nonexistent.h>
2658_ACEOF
2659if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2660 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2661 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002662 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002663 rm -f conftest.er1
2664 cat conftest.err >&5
2665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2666 (exit $ac_status); } >/dev/null; then
2667 if test -s conftest.err; then
2668 ac_cpp_err=$ac_c_preproc_warn_flag
2669 else
2670 ac_cpp_err=
2671 fi
2672else
2673 ac_cpp_err=yes
2674fi
2675if test -z "$ac_cpp_err"; then
2676 # Broken: success on invalid input.
2677continue
2678else
2679 echo "$as_me: failed program was:" >&5
2680 cat conftest.$ac_ext >&5
2681 # Passes both tests.
2682ac_preproc_ok=:
2683break
2684fi
2685rm -f conftest.err conftest.$ac_ext
2686
2687done
2688# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2689rm -f conftest.err conftest.$ac_ext
2690if $ac_preproc_ok; then
2691 :
2692else
2693 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2694echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2695 { (exit 1); exit 1; }; }
2696fi
2697
2698ac_ext=c
2699ac_cpp='$CPP $CPPFLAGS'
2700ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2701ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2702ac_compiler_gnu=$ac_cv_c_compiler_gnu
2703
2704
2705
2706echo "$as_me:$LINENO: checking for AIX" >&5
2707echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2708cat >conftest.$ac_ext <<_ACEOF
2709#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002710#include "confdefs.h"
2711#ifdef _AIX
2712 yes
2713#endif
2714
Martin v. Löwis11437992002-04-12 09:54:03 +00002715_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002716if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00002717 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002718 echo "$as_me:$LINENO: result: yes" >&5
2719echo "${ECHO_T}yes" >&6
2720cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002721#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002722_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002723
2724else
Martin v. Löwis11437992002-04-12 09:54:03 +00002725 echo "$as_me:$LINENO: result: no" >&5
2726echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002727fi
2728rm -f conftest*
2729
Michael W. Hudson54241132001-12-07 15:38:26 +00002730
Martin v. Löwis11437992002-04-12 09:54:03 +00002731echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2732echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2733if test "${ac_cv_header_stdc+set}" = set; then
2734 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002735else
Martin v. Löwis11437992002-04-12 09:54:03 +00002736 cat >conftest.$ac_ext <<_ACEOF
2737#line $LINENO "configure"
2738#include "confdefs.h"
2739#include <stdlib.h>
2740#include <stdarg.h>
2741#include <string.h>
2742#include <float.h>
2743
2744_ACEOF
2745if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2746 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2747 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002748 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002749 rm -f conftest.er1
2750 cat conftest.err >&5
2751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2752 (exit $ac_status); } >/dev/null; then
2753 if test -s conftest.err; then
2754 ac_cpp_err=$ac_c_preproc_warn_flag
2755 else
2756 ac_cpp_err=
2757 fi
2758else
2759 ac_cpp_err=yes
2760fi
2761if test -z "$ac_cpp_err"; then
2762 ac_cv_header_stdc=yes
2763else
2764 echo "$as_me: failed program was:" >&5
2765 cat conftest.$ac_ext >&5
2766 ac_cv_header_stdc=no
2767fi
2768rm -f conftest.err conftest.$ac_ext
2769
2770if test $ac_cv_header_stdc = yes; then
2771 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2772 cat >conftest.$ac_ext <<_ACEOF
2773#line $LINENO "configure"
2774#include "confdefs.h"
2775#include <string.h>
2776
2777_ACEOF
2778if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00002779 egrep "memchr" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002780 :
2781else
2782 ac_cv_header_stdc=no
2783fi
2784rm -f conftest*
2785
2786fi
2787
2788if test $ac_cv_header_stdc = yes; then
2789 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2790 cat >conftest.$ac_ext <<_ACEOF
2791#line $LINENO "configure"
2792#include "confdefs.h"
2793#include <stdlib.h>
2794
2795_ACEOF
2796if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00002797 egrep "free" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002798 :
2799else
2800 ac_cv_header_stdc=no
2801fi
2802rm -f conftest*
2803
2804fi
2805
2806if test $ac_cv_header_stdc = yes; then
2807 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2808 if test "$cross_compiling" = yes; then
2809 :
2810else
2811 cat >conftest.$ac_ext <<_ACEOF
2812#line $LINENO "configure"
2813#include "confdefs.h"
2814#include <ctype.h>
2815#if ((' ' & 0x0FF) == 0x020)
2816# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2817# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2818#else
2819# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2820 || ('j' <= (c) && (c) <= 'r') \
2821 || ('s' <= (c) && (c) <= 'z'))
2822# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2823#endif
2824
2825#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2826int
2827main ()
2828{
2829 int i;
2830 for (i = 0; i < 256; i++)
2831 if (XOR (islower (i), ISLOWER (i))
2832 || toupper (i) != TOUPPER (i))
2833 exit(2);
2834 exit (0);
2835}
2836_ACEOF
2837rm -f conftest$ac_exeext
2838if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2839 (eval $ac_link) 2>&5
2840 ac_status=$?
2841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2842 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2843 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2844 (eval $ac_try) 2>&5
2845 ac_status=$?
2846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2847 (exit $ac_status); }; }; then
2848 :
2849else
2850 echo "$as_me: program exited with status $ac_status" >&5
2851echo "$as_me: failed program was:" >&5
2852cat conftest.$ac_ext >&5
2853( exit $ac_status )
2854ac_cv_header_stdc=no
2855fi
Barry Warsawfe33b792003-01-07 22:42:49 +00002856rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002857fi
2858fi
2859fi
2860echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2861echo "${ECHO_T}$ac_cv_header_stdc" >&6
2862if test $ac_cv_header_stdc = yes; then
2863
2864cat >>confdefs.h <<\_ACEOF
2865#define STDC_HEADERS 1
2866_ACEOF
2867
2868fi
2869
2870# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2881 inttypes.h stdint.h unistd.h
2882do
2883as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2884echo "$as_me:$LINENO: checking for $ac_header" >&5
2885echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2886if eval "test \"\${$as_ac_Header+set}\" = set"; then
2887 echo $ECHO_N "(cached) $ECHO_C" >&6
2888else
2889 cat >conftest.$ac_ext <<_ACEOF
2890#line $LINENO "configure"
2891#include "confdefs.h"
2892$ac_includes_default
2893
2894#include <$ac_header>
2895_ACEOF
2896rm -f conftest.$ac_objext
2897if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2898 (eval $ac_compile) 2>&5
2899 ac_status=$?
2900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2901 (exit $ac_status); } &&
2902 { ac_try='test -s conftest.$ac_objext'
2903 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2904 (eval $ac_try) 2>&5
2905 ac_status=$?
2906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2907 (exit $ac_status); }; }; then
2908 eval "$as_ac_Header=yes"
2909else
2910 echo "$as_me: failed program was:" >&5
2911cat conftest.$ac_ext >&5
2912eval "$as_ac_Header=no"
2913fi
2914rm -f conftest.$ac_objext conftest.$ac_ext
2915fi
2916echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2917echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2918if test `eval echo '${'$as_ac_Header'}'` = yes; then
2919 cat >>confdefs.h <<_ACEOF
2920#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2921_ACEOF
2922
2923fi
2924
2925done
2926
2927
2928if test "${ac_cv_header_minix_config_h+set}" = set; then
2929 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2930echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2931if test "${ac_cv_header_minix_config_h+set}" = set; then
2932 echo $ECHO_N "(cached) $ECHO_C" >&6
2933fi
2934echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2935echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2936else
2937 # Is the header compilable?
2938echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2939echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2940cat >conftest.$ac_ext <<_ACEOF
2941#line $LINENO "configure"
2942#include "confdefs.h"
2943$ac_includes_default
2944#include <minix/config.h>
2945_ACEOF
2946rm -f conftest.$ac_objext
2947if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2948 (eval $ac_compile) 2>&5
2949 ac_status=$?
2950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2951 (exit $ac_status); } &&
2952 { ac_try='test -s conftest.$ac_objext'
2953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2954 (eval $ac_try) 2>&5
2955 ac_status=$?
2956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2957 (exit $ac_status); }; }; then
2958 ac_header_compiler=yes
2959else
2960 echo "$as_me: failed program was:" >&5
2961cat conftest.$ac_ext >&5
2962ac_header_compiler=no
2963fi
2964rm -f conftest.$ac_objext conftest.$ac_ext
2965echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2966echo "${ECHO_T}$ac_header_compiler" >&6
2967
2968# Is the header present?
2969echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2970echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2971cat >conftest.$ac_ext <<_ACEOF
2972#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002973#include "confdefs.h"
2974#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002975_ACEOF
2976if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2977 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2978 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002979 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002980 rm -f conftest.er1
2981 cat conftest.err >&5
2982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2983 (exit $ac_status); } >/dev/null; then
2984 if test -s conftest.err; then
2985 ac_cpp_err=$ac_c_preproc_warn_flag
2986 else
2987 ac_cpp_err=
2988 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002989else
Martin v. Löwis11437992002-04-12 09:54:03 +00002990 ac_cpp_err=yes
2991fi
2992if test -z "$ac_cpp_err"; then
2993 ac_header_preproc=yes
2994else
2995 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002996 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002997 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002998fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002999rm -f conftest.err conftest.$ac_ext
3000echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3001echo "${ECHO_T}$ac_header_preproc" >&6
3002
3003# So? What about this header?
3004case $ac_header_compiler:$ac_header_preproc in
3005 yes:no )
3006 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
3007echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3008 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
3009echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
3010 no:yes )
3011 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
3012echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
3013 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
3014echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
3015 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
3016echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
3017esac
3018echo "$as_me:$LINENO: checking for minix/config.h" >&5
3019echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3020if test "${ac_cv_header_minix_config_h+set}" = set; then
3021 echo $ECHO_N "(cached) $ECHO_C" >&6
3022else
3023 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003024fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003025echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3026echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3027
3028fi
3029if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003030 MINIX=yes
3031else
Martin v. Löwis11437992002-04-12 09:54:03 +00003032 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003033fi
3034
Martin v. Löwis11437992002-04-12 09:54:03 +00003035
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003036if test "$MINIX" = yes; then
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_SOURCE 1
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 _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00003045_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003046
Martin v. Löwis11437992002-04-12 09:54:03 +00003047
3048cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003049#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003050_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003051
3052fi
3053
3054
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003055# Check for unsupported systems
3056case $ac_sys_system/$ac_sys_release in
3057SunOS/4*|DYNIX/*|dgux*/*|IRIX/4*|Linux*/1*)
3058 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3059 echo See README for details.
3060 exit 1;;
3061esac
3062
3063if test "$MINIX" = yes; then
3064 echo This system \(MINIX\) is no longer supported.
3065 echo Read README for details.
3066 exit 1
3067fi
3068
Michael W. Hudson54241132001-12-07 15:38:26 +00003069
Martin v. Löwis11437992002-04-12 09:54:03 +00003070echo "$as_me:$LINENO: checking for --with-suffix" >&5
3071echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003072
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003073# Check whether --with-suffix or --without-suffix was given.
3074if test "${with_suffix+set}" = set; then
3075 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003076
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003077 case $withval in
3078 no) EXEEXT=;;
3079 yes) EXEEXT=.exe;;
3080 *) EXEEXT=$withval;;
3081 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003082fi;
3083echo "$as_me:$LINENO: result: $EXEEXT" >&5
3084echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003085
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003086# Test whether we're running on a non-case-sensitive system, in which
3087# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003088
Martin v. Löwis11437992002-04-12 09:54:03 +00003089echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3090echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003091if test ! -d CaseSensitiveTestDir; then
3092mkdir CaseSensitiveTestDir
3093fi
3094
3095if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003096then
Martin v. Löwis11437992002-04-12 09:54:03 +00003097 echo "$as_me:$LINENO: result: yes" >&5
3098echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003099 BUILDEXEEXT=.exe
3100else
Martin v. Löwis11437992002-04-12 09:54:03 +00003101 echo "$as_me:$LINENO: result: no" >&5
3102echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003103 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003104fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003105rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003106
Guido van Rossumdd997f71998-10-07 19:58:26 +00003107case $MACHDEP in
3108bsdos*)
3109 case $CC in
3110 gcc) CC="$CC -D_HAVE_BSDI";;
3111 esac;;
3112esac
3113
Guido van Rossum24b1e751997-08-21 02:29:16 +00003114case $ac_sys_system in
3115hp*|HP*)
3116 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003117 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003118 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003119Monterey*)
3120 case $CC in
3121 cc) CC="$CC -Wl,-Bexport";;
3122 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003123SunOS*)
3124 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003125
3126cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003127#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003128_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003129
3130 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003131esac
3132
Michael W. Hudson54241132001-12-07 15:38:26 +00003133
3134
Martin v. Löwis11437992002-04-12 09:54:03 +00003135echo "$as_me:$LINENO: checking LIBRARY" >&5
3136echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003137if test -z "$LIBRARY"
3138then
3139 LIBRARY='libpython$(VERSION).a'
3140fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003141echo "$as_me:$LINENO: result: $LIBRARY" >&5
3142echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003143
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003144# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003145# name of the library into which to insert object files). BLDLIBRARY is also
3146# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3147# is blank as the main program is not linked directly against LDLIBRARY.
3148# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3149# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3150# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3151# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003152#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003153# RUNSHARED is used to run shared python without installed libraries
3154#
3155# INSTSONAME is the name of the shared library that will be use to install
3156# on the system - some systems like version suffix, others don't
3157
3158
Michael W. Hudson54241132001-12-07 15:38:26 +00003159
3160
3161
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003162
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003163LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003164BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003165INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003166DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003167LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003168RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003169
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003170# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003171# If CXX is set, and if it is needed to link a main function that was
3172# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3173# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003174# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003175# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003176
Martin v. Löwis11437992002-04-12 09:54:03 +00003177echo "$as_me:$LINENO: checking LINKCC" >&5
3178echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003179if test -z "$LINKCC"
3180then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003181 if test -z "$CXX"; then
3182 LINKCC="\$(PURIFY) \$(CC)"
3183 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003184 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003185 $CXX -c conftest.$ac_ext 2>&5
3186 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3187 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3188 then
3189 LINKCC="\$(PURIFY) \$(CC)"
3190 else
3191 LINKCC="\$(PURIFY) \$(CXX)"
3192 fi
3193 rm -fr conftest*
3194 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003195 case $ac_sys_system in
3196 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003197 exp_extra="\"\""
3198 if test $ac_sys_release -ge 5 -o \
3199 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3200 exp_extra="."
3201 fi
3202 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003203 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003204 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003205 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003206 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003207 esac
3208fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003209echo "$as_me:$LINENO: result: $LINKCC" >&5
3210echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003211
Martin v. Löwis11437992002-04-12 09:54:03 +00003212echo "$as_me:$LINENO: checking for --enable-shared" >&5
3213echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003214# Check whether --enable-shared or --disable-shared was given.
3215if test "${enable_shared+set}" = set; then
3216 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003217
Martin v. Löwis11437992002-04-12 09:54:03 +00003218fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003219
3220if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003221then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003222 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003223 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003224 enable_shared="yes";;
3225 *)
3226 enable_shared="no";;
3227 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003228fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003229echo "$as_me:$LINENO: result: $enable_shared" >&5
3230echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003231
3232
Martin v. Löwis11437992002-04-12 09:54:03 +00003233echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3234echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003235
Guido van Rossumb8552162001-09-05 14:58:11 +00003236# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3237# library that we build, but we do not want to link against it (we
3238# will find it with a -framework option). For this reason there is an
3239# extra variable BLDLIBRARY against which Python and the extension
3240# modules are linked, BLDLIBRARY. This is normally the same as
3241# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003242if test "$enable_framework"
3243then
3244 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3245 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3246 BLDLIBRARY=''
3247else
3248 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003249fi
Jack Jansene578a632001-08-15 01:27:14 +00003250
Martin v. Löwis1142de32002-03-29 16:28:31 +00003251# Other platforms follow
3252if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003253
3254cat >>confdefs.h <<\_ACEOF
3255#define Py_ENABLE_SHARED 1
3256_ACEOF
3257
Martin v. Löwis1142de32002-03-29 16:28:31 +00003258 case $ac_sys_system in
3259 BeOS*)
3260 LDLIBRARY='libpython$(VERSION).so'
3261 ;;
3262 CYGWIN*)
3263 LDLIBRARY='libpython$(VERSION).dll.a'
3264 DLLLIBRARY='libpython$(VERSION).dll'
3265 ;;
3266 SunOS*)
3267 LDLIBRARY='libpython$(VERSION).so'
3268 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3269 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3270 ;;
Martin v. Löwis1bc894b2002-07-30 20:19:58 +00003271 Linux*|GNU*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003272 LDLIBRARY='libpython$(VERSION).so'
3273 BLDLIBRARY='-L. -lpython$(VERSION)'
3274 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3275 INSTSONAME="$LDLIBRARY".$SOVERSION
3276 ;;
3277 hp*|HP*)
3278 LDLIBRARY='libpython$(VERSION).sl'
3279 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3280 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3281 ;;
3282 OSF*)
3283 LDLIBRARY='libpython$(VERSION).so'
3284 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3285 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3286 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003287 atheos*)
3288 LDLIBRARY='libpython$(VERSION).so'
3289 BLDLIBRARY='-L. -lpython$(VERSION)'
3290 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3291 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003292 esac
3293 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3294 case $MACHDEP in
3295 dguxR4)
3296 LDLIBRARY='libpython$(VERSION).so'
Skip Montanarodecc6a42003-01-01 20:07:49 +00003297 BASECFLAGS="$BASECFLAGS -pic"
Martin v. Löwis1142de32002-03-29 16:28:31 +00003298 ;;
3299 esac
3300fi
3301
Martin v. Löwis11437992002-04-12 09:54:03 +00003302echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3303echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003304
Martin v. Löwis11437992002-04-12 09:54:03 +00003305if test -n "$ac_tool_prefix"; then
3306 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3307set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3308echo "$as_me:$LINENO: checking for $ac_word" >&5
3309echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3310if test "${ac_cv_prog_RANLIB+set}" = set; then
3311 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003312else
3313 if test -n "$RANLIB"; then
3314 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3315else
Martin v. Löwis11437992002-04-12 09:54:03 +00003316as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3317for as_dir in $PATH
3318do
3319 IFS=$as_save_IFS
3320 test -z "$as_dir" && as_dir=.
3321 for ac_exec_ext in '' $ac_executable_extensions; do
3322 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3323 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3324 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3325 break 2
3326 fi
3327done
3328done
3329
Guido van Rossum627b2d71993-12-24 10:39:16 +00003330fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003331fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003332RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003333if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003334 echo "$as_me:$LINENO: result: $RANLIB" >&5
3335echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003336else
Martin v. Löwis11437992002-04-12 09:54:03 +00003337 echo "$as_me:$LINENO: result: no" >&5
3338echo "${ECHO_T}no" >&6
3339fi
3340
3341fi
3342if test -z "$ac_cv_prog_RANLIB"; then
3343 ac_ct_RANLIB=$RANLIB
3344 # Extract the first word of "ranlib", so it can be a program name with args.
3345set dummy ranlib; ac_word=$2
3346echo "$as_me:$LINENO: checking for $ac_word" >&5
3347echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3348if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3349 echo $ECHO_N "(cached) $ECHO_C" >&6
3350else
3351 if test -n "$ac_ct_RANLIB"; then
3352 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3353else
3354as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3355for as_dir in $PATH
3356do
3357 IFS=$as_save_IFS
3358 test -z "$as_dir" && as_dir=.
3359 for ac_exec_ext in '' $ac_executable_extensions; do
3360 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3361 ac_cv_prog_ac_ct_RANLIB="ranlib"
3362 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3363 break 2
3364 fi
3365done
3366done
3367
3368 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3369fi
3370fi
3371ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3372if test -n "$ac_ct_RANLIB"; then
3373 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3374echo "${ECHO_T}$ac_ct_RANLIB" >&6
3375else
3376 echo "$as_me:$LINENO: result: no" >&5
3377echo "${ECHO_T}no" >&6
3378fi
3379
3380 RANLIB=$ac_ct_RANLIB
3381else
3382 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003383fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003384
3385
Guido van Rossum7f43da71994-08-01 12:15:30 +00003386for ac_prog in ar aal
3387do
Martin v. Löwis11437992002-04-12 09:54:03 +00003388 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003389set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003390echo "$as_me:$LINENO: checking for $ac_word" >&5
3391echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3392if test "${ac_cv_prog_AR+set}" = set; then
3393 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003394else
3395 if test -n "$AR"; then
3396 ac_cv_prog_AR="$AR" # Let the user override the test.
3397else
Martin v. Löwis11437992002-04-12 09:54:03 +00003398as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3399for as_dir in $PATH
3400do
3401 IFS=$as_save_IFS
3402 test -z "$as_dir" && as_dir=.
3403 for ac_exec_ext in '' $ac_executable_extensions; do
3404 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3405 ac_cv_prog_AR="$ac_prog"
3406 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3407 break 2
3408 fi
3409done
3410done
3411
Guido van Rossum7f43da71994-08-01 12:15:30 +00003412fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003413fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003414AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003415if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003416 echo "$as_me:$LINENO: result: $AR" >&5
3417echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003418else
Martin v. Löwis11437992002-04-12 09:54:03 +00003419 echo "$as_me:$LINENO: result: no" >&5
3420echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003421fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003422
Martin v. Löwis11437992002-04-12 09:54:03 +00003423 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003424done
3425test -n "$AR" || AR="ar"
3426
Michael W. Hudson54241132001-12-07 15:38:26 +00003427
Neil Schemenauera42c8272001-03-31 00:01:55 +00003428case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003429bsdos*|hp*|HP*)
3430 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003431 if test -z "$INSTALL"
3432 then
3433 INSTALL="${srcdir}/install-sh -c"
3434 fi
3435esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003436ac_aux_dir=
3437for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3438 if test -f $ac_dir/install-sh; then
3439 ac_aux_dir=$ac_dir
3440 ac_install_sh="$ac_aux_dir/install-sh -c"
3441 break
3442 elif test -f $ac_dir/install.sh; then
3443 ac_aux_dir=$ac_dir
3444 ac_install_sh="$ac_aux_dir/install.sh -c"
3445 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003446 elif test -f $ac_dir/shtool; then
3447 ac_aux_dir=$ac_dir
3448 ac_install_sh="$ac_aux_dir/shtool install -c"
3449 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003450 fi
3451done
3452if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003453 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3454echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3455 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003456fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003457ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3458ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3459ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003460
3461# Find a good install program. We prefer a C program (faster),
3462# so one script is as good as another. But avoid the broken or
3463# incompatible versions:
3464# SysV /etc/install, /usr/sbin/install
3465# SunOS /usr/etc/install
3466# IRIX /sbin/install
3467# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003468# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003469# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3470# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3471# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3472# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003473echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3474echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003475if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003476if test "${ac_cv_path_install+set}" = set; then
3477 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003478else
Martin v. Löwis11437992002-04-12 09:54:03 +00003479 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3480for as_dir in $PATH
3481do
3482 IFS=$as_save_IFS
3483 test -z "$as_dir" && as_dir=.
3484 # Account for people who put trailing slashes in PATH elements.
3485case $as_dir/ in
3486 ./ | .// | /cC/* | \
3487 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3488 /usr/ucb/* ) ;;
3489 *)
3490 # OSF1 and SCO ODT 3.0 have their own names for install.
3491 # Don't use installbsd from OSF since it installs stuff as root
3492 # by default.
3493 for ac_prog in ginstall scoinst install; do
3494 for ac_exec_ext in '' $ac_executable_extensions; do
3495 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3496 if test $ac_prog = install &&
3497 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3498 # AIX install. It has an incompatible calling convention.
3499 :
3500 elif test $ac_prog = install &&
3501 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3502 # program-specific install script used by HP pwplus--don't use.
3503 :
3504 else
3505 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3506 break 3
3507 fi
3508 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003509 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003510 done
3511 ;;
3512esac
3513done
3514
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003515
3516fi
3517 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003518 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003519 else
3520 # As a last resort, use the slow shell script. We don't cache a
3521 # path for INSTALL within a source directory, because that will
3522 # break other packages using the cache if that directory is
3523 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003524 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003525 fi
3526fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003527echo "$as_me:$LINENO: result: $INSTALL" >&5
3528echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003529
3530# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3531# It thinks the first close brace ends the variable substitution.
3532test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3533
Martin v. Löwis11437992002-04-12 09:54:03 +00003534test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003535
3536test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3537
Michael W. Hudson54241132001-12-07 15:38:26 +00003538
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003539# Not every filesystem supports hard links
3540
3541if test -z "$LN" ; then
3542 case $ac_sys_system in
3543 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003544 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003545 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003546 *) LN=ln;;
3547 esac
3548fi
3549
Fred Drake109d9862001-07-11 06:27:56 +00003550# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003551echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3552echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3553
Fred Drake109d9862001-07-11 06:27:56 +00003554# Check whether --with-pydebug or --without-pydebug was given.
3555if test "${with_pydebug+set}" = set; then
3556 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003557
Fred Drake109d9862001-07-11 06:27:56 +00003558if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003559then
3560
3561cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003562#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003563_ACEOF
3564
3565 echo "$as_me:$LINENO: result: yes" >&5
3566echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003567 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003568else echo "$as_me:$LINENO: result: no" >&5
3569echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003570fi
3571else
Martin v. Löwis11437992002-04-12 09:54:03 +00003572 echo "$as_me:$LINENO: result: no" >&5
3573echo "${ECHO_T}no" >&6
3574fi;
Fred Drake109d9862001-07-11 06:27:56 +00003575
Skip Montanarodecc6a42003-01-01 20:07:49 +00003576# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3577# merged with this chunk of code?
3578
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003579# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003580# ------------------------
3581# (The following bit of code is complicated enough - please keep things
3582# indented properly. Just pretend you're editing Python code. ;-)
3583
3584# There are two parallel sets of case statements below, one that checks to
3585# see if OPT was set and one that does BASECFLAGS setting based upon
3586# compiler and platform. BASECFLAGS tweaks need to be made even if the
3587# user set OPT.
3588
3589# tweak OPT based on compiler and platform, only if the user didn't set
3590# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003591
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003592if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003593then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003594 case $GCC in
3595 yes)
3596 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003597 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003598 if test "$Py_DEBUG" = 'true' ; then
3599 # Optimization messes up debuggers, so turn it off for
3600 # debug builds.
3601 OPT="-g -Wall -Wstrict-prototypes"
3602 else
3603 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003604 fi
3605 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003606 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003607 OPT="-O3 -Wall -Wstrict-prototypes"
3608 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003609 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003610 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003611 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3612 ;;
3613 esac
Fred Drake109d9862001-07-11 06:27:56 +00003614 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003615
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003616 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003617 OPT="-O"
3618 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003619 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003620
3621 # The current (beta) Monterey compiler dies with optimizations
3622 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003623 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003624 Monterey*)
3625 OPT=""
3626 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003627 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003628
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003629fi
3630
Skip Montanarodecc6a42003-01-01 20:07:49 +00003631
3632# tweak BASECFLAGS based on compiler and platform
3633case $GCC in
3634yes)
3635 case $ac_sys_system in
3636 SCO_SV*)
3637 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3638 ;;
3639 # is there any other compiler on Darwin besides gcc?
3640 Darwin*)
3641 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp"
3642 ;;
3643 esac
3644 ;;
3645
3646*)
3647 case $ac_sys_system in
3648 OpenUNIX*|UnixWare*)
3649 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3650 ;;
3651 SCO_SV*)
3652 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3653 ;;
3654 esac
3655 ;;
3656esac
3657
Fred Drakee1ceaa02001-12-04 20:55:47 +00003658if test "$Py_DEBUG" = 'true'; then
3659 :
3660else
3661 OPT="-DNDEBUG $OPT"
3662fi
3663
Guido van Rossum563e7081996-09-10 18:20:48 +00003664if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003665then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003666 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003667fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003668
Martin v. Löwis11437992002-04-12 09:54:03 +00003669echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3670echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3671if test "${ac_cv_opt_olimit_ok+set}" = set; then
3672 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003673else
3674 ac_save_cc="$CC"
3675CC="$CC -OPT:Olimit=0"
3676if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003677 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003678else
Martin v. Löwis11437992002-04-12 09:54:03 +00003679 cat >conftest.$ac_ext <<_ACEOF
3680#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003681#include "confdefs.h"
3682int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003683_ACEOF
3684rm -f conftest$ac_exeext
3685if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3686 (eval $ac_link) 2>&5
3687 ac_status=$?
3688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3689 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3691 (eval $ac_try) 2>&5
3692 ac_status=$?
3693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3694 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003695 ac_cv_opt_olimit_ok=yes
3696else
Martin v. Löwis11437992002-04-12 09:54:03 +00003697 echo "$as_me: program exited with status $ac_status" >&5
3698echo "$as_me: failed program was:" >&5
3699cat conftest.$ac_ext >&5
3700( exit $ac_status )
3701ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003702fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003703rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003704fi
Guido van Rossum91922671997-10-09 20:24:13 +00003705CC="$ac_save_cc"
3706fi
3707
Martin v. Löwis11437992002-04-12 09:54:03 +00003708echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3709echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003710if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003711 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003712 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3713 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3714 # environment?
3715 Darwin*)
3716 ;;
3717 *)
3718 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3719 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003720 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003721else
Martin v. Löwis11437992002-04-12 09:54:03 +00003722 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3723echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3724 if test "${ac_cv_olimit_ok+set}" = set; then
3725 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003726else
3727 ac_save_cc="$CC"
3728 CC="$CC -Olimit 1500"
3729 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003730 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003731else
Martin v. Löwis11437992002-04-12 09:54:03 +00003732 cat >conftest.$ac_ext <<_ACEOF
3733#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003734#include "confdefs.h"
3735int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003736_ACEOF
3737rm -f conftest$ac_exeext
3738if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3739 (eval $ac_link) 2>&5
3740 ac_status=$?
3741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3742 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3743 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3744 (eval $ac_try) 2>&5
3745 ac_status=$?
3746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3747 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003748 ac_cv_olimit_ok=yes
3749else
Martin v. Löwis11437992002-04-12 09:54:03 +00003750 echo "$as_me: program exited with status $ac_status" >&5
3751echo "$as_me: failed program was:" >&5
3752cat conftest.$ac_ext >&5
3753( exit $ac_status )
3754ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003755fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003756rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003757fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003758 CC="$ac_save_cc"
3759fi
3760
Martin v. Löwis11437992002-04-12 09:54:03 +00003761 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3762echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003763 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003764 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003765 fi
3766fi
3767
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003768# On some compilers, pthreads are available without further options
3769# (e.g. MacOS X). On some of these systems, the compiler will not
3770# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3771# So we have to see first whether pthreads are available without
3772# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003773echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3774echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3775if test "${ac_cv_pthread_is_default+set}" = set; then
3776 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003777else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003778 if test "$cross_compiling" = yes; then
3779 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003780else
Martin v. Löwis11437992002-04-12 09:54:03 +00003781 cat >conftest.$ac_ext <<_ACEOF
3782#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003783#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003784
Martin v. Löwis130fb172001-07-19 11:00:41 +00003785#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003786
3787void* routine(void* p){return NULL;}
3788
3789int main(){
3790 pthread_t p;
3791 if(pthread_create(&p,NULL,routine,NULL)!=0)
3792 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003793 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003794 return 0;
3795}
3796
Martin v. Löwis11437992002-04-12 09:54:03 +00003797_ACEOF
3798rm -f conftest$ac_exeext
3799if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3800 (eval $ac_link) 2>&5
3801 ac_status=$?
3802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3803 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3805 (eval $ac_try) 2>&5
3806 ac_status=$?
3807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3808 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003809 ac_cv_pthread_is_default=yes
3810else
Martin v. Löwis11437992002-04-12 09:54:03 +00003811 echo "$as_me: program exited with status $ac_status" >&5
3812echo "$as_me: failed program was:" >&5
3813cat conftest.$ac_ext >&5
3814( exit $ac_status )
3815ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003816fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003817rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003818fi
3819
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003820fi
3821
Martin v. Löwis11437992002-04-12 09:54:03 +00003822echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3823echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003824
Michael W. Hudson54241132001-12-07 15:38:26 +00003825
Martin v. Löwis11437992002-04-12 09:54:03 +00003826if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003827then
3828 ac_cv_kpthread=no
3829else
3830# -Kpthread, if available, provides the right #defines
3831# and linker options to make pthread_create available
3832# Some compilers won't report that they do not support -Kpthread,
3833# so we need to run a program to see whether it really made the
3834# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003835echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3836echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3837if test "${ac_cv_kpthread+set}" = set; then
3838 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003839else
3840 ac_save_cc="$CC"
3841CC="$CC -Kpthread"
3842if test "$cross_compiling" = yes; then
3843 ac_cv_kpthread=no
3844else
Martin v. Löwis11437992002-04-12 09:54:03 +00003845 cat >conftest.$ac_ext <<_ACEOF
3846#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003847#include "confdefs.h"
3848
3849#include <pthread.h>
3850
3851void* routine(void* p){return NULL;}
3852
3853int main(){
3854 pthread_t p;
3855 if(pthread_create(&p,NULL,routine,NULL)!=0)
3856 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003857 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003858 return 0;
3859}
3860
Martin v. Löwis11437992002-04-12 09:54:03 +00003861_ACEOF
3862rm -f conftest$ac_exeext
3863if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3864 (eval $ac_link) 2>&5
3865 ac_status=$?
3866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3867 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3868 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3869 (eval $ac_try) 2>&5
3870 ac_status=$?
3871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3872 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003873 ac_cv_kpthread=yes
3874else
Martin v. Löwis11437992002-04-12 09:54:03 +00003875 echo "$as_me: program exited with status $ac_status" >&5
3876echo "$as_me: failed program was:" >&5
3877cat conftest.$ac_ext >&5
3878( exit $ac_status )
3879ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003880fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003881rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003882fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003883CC="$ac_save_cc"
3884fi
3885
Martin v. Löwis11437992002-04-12 09:54:03 +00003886echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3887echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003888fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003889
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003890if test $ac_cv_kpthread = no
3891then
3892# -Kthread, if available, provides the right #defines
3893# and linker options to make pthread_create available
3894# Some compilers won't report that they do not support -Kthread,
3895# so we need to run a program to see whether it really made the
3896# function available.
3897echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
3898echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
3899if test "${ac_cv_kthread+set}" = set; then
3900 echo $ECHO_N "(cached) $ECHO_C" >&6
3901else
3902 ac_save_cc="$CC"
3903CC="$CC -Kthread"
3904if test "$cross_compiling" = yes; then
3905 ac_cv_kthread=no
3906else
3907 cat >conftest.$ac_ext <<_ACEOF
3908#line $LINENO "configure"
3909#include "confdefs.h"
3910
3911#include <pthread.h>
3912
3913void* routine(void* p){return NULL;}
3914
3915int main(){
3916 pthread_t p;
3917 if(pthread_create(&p,NULL,routine,NULL)!=0)
3918 return 1;
3919 (void)pthread_detach(p);
3920 return 0;
3921}
3922
3923_ACEOF
3924rm -f conftest$ac_exeext
3925if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3926 (eval $ac_link) 2>&5
3927 ac_status=$?
3928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3929 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3931 (eval $ac_try) 2>&5
3932 ac_status=$?
3933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3934 (exit $ac_status); }; }; then
3935 ac_cv_kthread=yes
3936else
3937 echo "$as_me: program exited with status $ac_status" >&5
3938echo "$as_me: failed program was:" >&5
3939cat conftest.$ac_ext >&5
3940( exit $ac_status )
3941ac_cv_kthread=no
3942fi
3943rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3944fi
3945CC="$ac_save_cc"
3946fi
3947
3948echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
3949echo "${ECHO_T}$ac_cv_kthread" >&6
3950fi
3951
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00003952if test $ac_cv_kthread = no
3953then
3954# -pthread, if available, provides the right #defines
3955# and linker options to make pthread_create available
3956# Some compilers won't report that they do not support -pthread,
3957# so we need to run a program to see whether it really made the
3958# function available.
3959echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
3960echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
3961if test "${ac_cv_thread+set}" = set; then
3962 echo $ECHO_N "(cached) $ECHO_C" >&6
3963else
3964 ac_save_cc="$CC"
3965CC="$CC -pthread"
3966if test "$cross_compiling" = yes; then
3967 ac_cv_pthread=no
3968else
3969 cat >conftest.$ac_ext <<_ACEOF
3970#line $LINENO "configure"
3971#include "confdefs.h"
3972
3973#include <pthread.h>
3974
3975void* routine(void* p){return NULL;}
3976
3977int main(){
3978 pthread_t p;
3979 if(pthread_create(&p,NULL,routine,NULL)!=0)
3980 return 1;
3981 (void)pthread_detach(p);
3982 return 0;
3983}
3984
3985_ACEOF
3986rm -f conftest$ac_exeext
3987if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3988 (eval $ac_link) 2>&5
3989 ac_status=$?
3990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3991 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3993 (eval $ac_try) 2>&5
3994 ac_status=$?
3995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3996 (exit $ac_status); }; }; then
3997 ac_cv_pthread=yes
3998else
3999 echo "$as_me: program exited with status $ac_status" >&5
4000echo "$as_me: failed program was:" >&5
4001cat conftest.$ac_ext >&5
4002( exit $ac_status )
4003ac_cv_pthread=no
4004fi
4005rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4006fi
4007CC="$ac_save_cc"
4008fi
4009
4010echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4011echo "${ECHO_T}$ac_cv_pthread" >&6
4012fi
4013
Michael W. Hudson54241132001-12-07 15:38:26 +00004014
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004015# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00004016echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4017echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4018if test "${ac_cv_header_stdc+set}" = set; then
4019 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004020else
Martin v. Löwis11437992002-04-12 09:54:03 +00004021 cat >conftest.$ac_ext <<_ACEOF
4022#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004023#include "confdefs.h"
4024#include <stdlib.h>
4025#include <stdarg.h>
4026#include <string.h>
4027#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004028
4029_ACEOF
4030if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4031 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4032 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004033 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004034 rm -f conftest.er1
4035 cat conftest.err >&5
4036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4037 (exit $ac_status); } >/dev/null; then
4038 if test -s conftest.err; then
4039 ac_cpp_err=$ac_c_preproc_warn_flag
4040 else
4041 ac_cpp_err=
4042 fi
4043else
4044 ac_cpp_err=yes
4045fi
4046if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004047 ac_cv_header_stdc=yes
4048else
Martin v. Löwis11437992002-04-12 09:54:03 +00004049 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00004050 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004051 ac_cv_header_stdc=no
4052fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004053rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004054
4055if test $ac_cv_header_stdc = yes; then
4056 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004057 cat >conftest.$ac_ext <<_ACEOF
4058#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004059#include "confdefs.h"
4060#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004061
4062_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004063if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00004064 egrep "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004065 :
4066else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004067 ac_cv_header_stdc=no
4068fi
4069rm -f conftest*
4070
4071fi
4072
4073if test $ac_cv_header_stdc = yes; then
4074 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004075 cat >conftest.$ac_ext <<_ACEOF
4076#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004077#include "confdefs.h"
4078#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004079
4080_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004081if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00004082 egrep "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004083 :
4084else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004085 ac_cv_header_stdc=no
4086fi
4087rm -f conftest*
4088
4089fi
4090
4091if test $ac_cv_header_stdc = yes; then
4092 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004093 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004094 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004095else
Martin v. Löwis11437992002-04-12 09:54:03 +00004096 cat >conftest.$ac_ext <<_ACEOF
4097#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004098#include "confdefs.h"
4099#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004100#if ((' ' & 0x0FF) == 0x020)
4101# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4102# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4103#else
4104# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4105 || ('j' <= (c) && (c) <= 'r') \
4106 || ('s' <= (c) && (c) <= 'z'))
4107# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4108#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004109
Martin v. Löwis11437992002-04-12 09:54:03 +00004110#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4111int
4112main ()
4113{
4114 int i;
4115 for (i = 0; i < 256; i++)
4116 if (XOR (islower (i), ISLOWER (i))
4117 || toupper (i) != TOUPPER (i))
4118 exit(2);
4119 exit (0);
4120}
4121_ACEOF
4122rm -f conftest$ac_exeext
4123if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4124 (eval $ac_link) 2>&5
4125 ac_status=$?
4126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4127 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4129 (eval $ac_try) 2>&5
4130 ac_status=$?
4131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4132 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004133 :
4134else
Martin v. Löwis11437992002-04-12 09:54:03 +00004135 echo "$as_me: program exited with status $ac_status" >&5
4136echo "$as_me: failed program was:" >&5
4137cat conftest.$ac_ext >&5
4138( exit $ac_status )
4139ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004140fi
Barry Warsawfe33b792003-01-07 22:42:49 +00004141rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004142fi
4143fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004144fi
4145echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4146echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004147if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004148
4149cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004150#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004151_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004152
4153fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004154
Martin v. Löwis11437992002-04-12 09:54:03 +00004155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004192
Barry Warsawfe33b792003-01-07 22:42:49 +00004193
Neal Norwitz82251032003-05-23 14:35:24 +00004194
Martin v. Löwis11437992002-04-12 09:54:03 +00004195for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004196libintl.h locale.h ncurses.h poll.h pthread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004197signal.h stdarg.h stddef.h stdlib.h stropts.h termios.h thread.h \
4198unistd.h utime.h \
Neal Norwitz82251032003-05-23 14:35:24 +00004199sys/audioio.h sys/bsdtty.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004200sys/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 +00004201sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Barry Warsawfe33b792003-01-07 22:42:49 +00004202sys/resource.h netpacket/packet.h sysexits.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004203do
Martin v. Löwis11437992002-04-12 09:54:03 +00004204as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4205if eval "test \"\${$as_ac_Header+set}\" = set"; then
4206 echo "$as_me:$LINENO: checking for $ac_header" >&5
4207echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4208if eval "test \"\${$as_ac_Header+set}\" = set"; then
4209 echo $ECHO_N "(cached) $ECHO_C" >&6
4210fi
4211echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4212echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004213else
Martin v. Löwis11437992002-04-12 09:54:03 +00004214 # Is the header compilable?
4215echo "$as_me:$LINENO: checking $ac_header usability" >&5
4216echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4217cat >conftest.$ac_ext <<_ACEOF
4218#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004219#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004220$ac_includes_default
4221#include <$ac_header>
4222_ACEOF
4223rm -f conftest.$ac_objext
4224if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4225 (eval $ac_compile) 2>&5
4226 ac_status=$?
4227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4228 (exit $ac_status); } &&
4229 { ac_try='test -s conftest.$ac_objext'
4230 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4231 (eval $ac_try) 2>&5
4232 ac_status=$?
4233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4234 (exit $ac_status); }; }; then
4235 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004236else
Martin v. Löwis11437992002-04-12 09:54:03 +00004237 echo "$as_me: failed program was:" >&5
4238cat conftest.$ac_ext >&5
4239ac_header_compiler=no
4240fi
4241rm -f conftest.$ac_objext conftest.$ac_ext
4242echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4243echo "${ECHO_T}$ac_header_compiler" >&6
4244
4245# Is the header present?
4246echo "$as_me:$LINENO: checking $ac_header presence" >&5
4247echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4248cat >conftest.$ac_ext <<_ACEOF
4249#line $LINENO "configure"
4250#include "confdefs.h"
4251#include <$ac_header>
4252_ACEOF
4253if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4254 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4255 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004256 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004257 rm -f conftest.er1
4258 cat conftest.err >&5
4259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4260 (exit $ac_status); } >/dev/null; then
4261 if test -s conftest.err; then
4262 ac_cpp_err=$ac_c_preproc_warn_flag
4263 else
4264 ac_cpp_err=
4265 fi
4266else
4267 ac_cpp_err=yes
4268fi
4269if test -z "$ac_cpp_err"; then
4270 ac_header_preproc=yes
4271else
4272 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004273 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004274 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004275fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004276rm -f conftest.err conftest.$ac_ext
4277echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4278echo "${ECHO_T}$ac_header_preproc" >&6
4279
4280# So? What about this header?
4281case $ac_header_compiler:$ac_header_preproc in
4282 yes:no )
4283 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4284echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4285 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4286echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4287 no:yes )
4288 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4289echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4290 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4291echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4292 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4293echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4294esac
4295echo "$as_me:$LINENO: checking for $ac_header" >&5
4296echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4297if eval "test \"\${$as_ac_Header+set}\" = set"; then
4298 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004299else
Martin v. Löwis11437992002-04-12 09:54:03 +00004300 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004301fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004302echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4303echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4304
4305fi
4306if test `eval echo '${'$as_ac_Header'}'` = yes; then
4307 cat >>confdefs.h <<_ACEOF
4308#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4309_ACEOF
4310
4311fi
4312
Guido van Rossum627b2d71993-12-24 10:39:16 +00004313done
4314
Martin v. Löwis11437992002-04-12 09:54:03 +00004315
4316
4317
4318
4319
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004320ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004321for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4322 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4323echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4324echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4325if eval "test \"\${$as_ac_Header+set}\" = set"; then
4326 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004327else
Martin v. Löwis11437992002-04-12 09:54:03 +00004328 cat >conftest.$ac_ext <<_ACEOF
4329#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004330#include "confdefs.h"
4331#include <sys/types.h>
4332#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004333
Barry Warsawfe33b792003-01-07 22:42:49 +00004334#ifdef F77_DUMMY_MAIN
4335# ifdef __cplusplus
4336 extern "C"
4337# endif
4338 int F77_DUMMY_MAIN() { return 1; }
4339#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004340int
4341main ()
4342{
4343if ((DIR *) 0)
4344return 0;
4345 ;
4346 return 0;
4347}
4348_ACEOF
4349rm -f conftest.$ac_objext
4350if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4351 (eval $ac_compile) 2>&5
4352 ac_status=$?
4353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4354 (exit $ac_status); } &&
4355 { ac_try='test -s conftest.$ac_objext'
4356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4357 (eval $ac_try) 2>&5
4358 ac_status=$?
4359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4360 (exit $ac_status); }; }; then
4361 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004362else
Martin v. Löwis11437992002-04-12 09:54:03 +00004363 echo "$as_me: failed program was:" >&5
4364cat conftest.$ac_ext >&5
4365eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004366fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004367rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004368fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004369echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4370echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4371if test `eval echo '${'$as_ac_Header'}'` = yes; then
4372 cat >>confdefs.h <<_ACEOF
4373#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4374_ACEOF
4375
4376ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004377fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004378
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004379done
4380# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4381if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004382 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4383echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4384if test "${ac_cv_search_opendir+set}" = set; then
4385 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004386else
Martin v. Löwis11437992002-04-12 09:54:03 +00004387 ac_func_search_save_LIBS=$LIBS
4388ac_cv_search_opendir=no
4389cat >conftest.$ac_ext <<_ACEOF
4390#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004391#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004392
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004393/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004394#ifdef __cplusplus
4395extern "C"
4396#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004397/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004398 builtin and then its argument prototype would still apply. */
4399char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004400#ifdef F77_DUMMY_MAIN
4401# ifdef __cplusplus
4402 extern "C"
4403# endif
4404 int F77_DUMMY_MAIN() { return 1; }
4405#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004406int
4407main ()
4408{
4409opendir ();
4410 ;
4411 return 0;
4412}
4413_ACEOF
4414rm -f conftest.$ac_objext conftest$ac_exeext
4415if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4416 (eval $ac_link) 2>&5
4417 ac_status=$?
4418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4419 (exit $ac_status); } &&
4420 { ac_try='test -s conftest$ac_exeext'
4421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4422 (eval $ac_try) 2>&5
4423 ac_status=$?
4424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4425 (exit $ac_status); }; }; then
4426 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004427else
Martin v. Löwis11437992002-04-12 09:54:03 +00004428 echo "$as_me: failed program was:" >&5
4429cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004430fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004431rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4432if test "$ac_cv_search_opendir" = no; then
4433 for ac_lib in dir; do
4434 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4435 cat >conftest.$ac_ext <<_ACEOF
4436#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004437#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004438
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004439/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004440#ifdef __cplusplus
4441extern "C"
4442#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004443/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004444 builtin and then its argument prototype would still apply. */
4445char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004446#ifdef F77_DUMMY_MAIN
4447# ifdef __cplusplus
4448 extern "C"
4449# endif
4450 int F77_DUMMY_MAIN() { return 1; }
4451#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004452int
4453main ()
4454{
4455opendir ();
4456 ;
4457 return 0;
4458}
4459_ACEOF
4460rm -f conftest.$ac_objext conftest$ac_exeext
4461if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4462 (eval $ac_link) 2>&5
4463 ac_status=$?
4464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4465 (exit $ac_status); } &&
4466 { ac_try='test -s conftest$ac_exeext'
4467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4468 (eval $ac_try) 2>&5
4469 ac_status=$?
4470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4471 (exit $ac_status); }; }; then
4472 ac_cv_search_opendir="-l$ac_lib"
4473break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004474else
Martin v. Löwis11437992002-04-12 09:54:03 +00004475 echo "$as_me: failed program was:" >&5
4476cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004477fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004478rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4479 done
4480fi
4481LIBS=$ac_func_search_save_LIBS
4482fi
4483echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4484echo "${ECHO_T}$ac_cv_search_opendir" >&6
4485if test "$ac_cv_search_opendir" != no; then
4486 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004487
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004488fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004489
Michael W. Hudson54241132001-12-07 15:38:26 +00004490else
Martin v. Löwis11437992002-04-12 09:54:03 +00004491 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4492echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4493if test "${ac_cv_search_opendir+set}" = set; then
4494 echo $ECHO_N "(cached) $ECHO_C" >&6
4495else
4496 ac_func_search_save_LIBS=$LIBS
4497ac_cv_search_opendir=no
4498cat >conftest.$ac_ext <<_ACEOF
4499#line $LINENO "configure"
4500#include "confdefs.h"
4501
4502/* Override any gcc2 internal prototype to avoid an error. */
4503#ifdef __cplusplus
4504extern "C"
4505#endif
4506/* We use char because int might match the return type of a gcc2
4507 builtin and then its argument prototype would still apply. */
4508char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004509#ifdef F77_DUMMY_MAIN
4510# ifdef __cplusplus
4511 extern "C"
4512# endif
4513 int F77_DUMMY_MAIN() { return 1; }
4514#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004515int
4516main ()
4517{
4518opendir ();
4519 ;
4520 return 0;
4521}
4522_ACEOF
4523rm -f conftest.$ac_objext conftest$ac_exeext
4524if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4525 (eval $ac_link) 2>&5
4526 ac_status=$?
4527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4528 (exit $ac_status); } &&
4529 { ac_try='test -s conftest$ac_exeext'
4530 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4531 (eval $ac_try) 2>&5
4532 ac_status=$?
4533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4534 (exit $ac_status); }; }; then
4535 ac_cv_search_opendir="none required"
4536else
4537 echo "$as_me: failed program was:" >&5
4538cat conftest.$ac_ext >&5
4539fi
4540rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4541if test "$ac_cv_search_opendir" = no; then
4542 for ac_lib in x; do
4543 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4544 cat >conftest.$ac_ext <<_ACEOF
4545#line $LINENO "configure"
4546#include "confdefs.h"
4547
4548/* Override any gcc2 internal prototype to avoid an error. */
4549#ifdef __cplusplus
4550extern "C"
4551#endif
4552/* We use char because int might match the return type of a gcc2
4553 builtin and then its argument prototype would still apply. */
4554char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004555#ifdef F77_DUMMY_MAIN
4556# ifdef __cplusplus
4557 extern "C"
4558# endif
4559 int F77_DUMMY_MAIN() { return 1; }
4560#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004561int
4562main ()
4563{
4564opendir ();
4565 ;
4566 return 0;
4567}
4568_ACEOF
4569rm -f conftest.$ac_objext conftest$ac_exeext
4570if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4571 (eval $ac_link) 2>&5
4572 ac_status=$?
4573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4574 (exit $ac_status); } &&
4575 { ac_try='test -s conftest$ac_exeext'
4576 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4577 (eval $ac_try) 2>&5
4578 ac_status=$?
4579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4580 (exit $ac_status); }; }; then
4581 ac_cv_search_opendir="-l$ac_lib"
4582break
4583else
4584 echo "$as_me: failed program was:" >&5
4585cat conftest.$ac_ext >&5
4586fi
4587rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4588 done
4589fi
4590LIBS=$ac_func_search_save_LIBS
4591fi
4592echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4593echo "${ECHO_T}$ac_cv_search_opendir" >&6
4594if test "$ac_cv_search_opendir" != no; then
4595 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4596
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004597fi
4598
4599fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004600
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004601echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4602echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4603if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4604 echo $ECHO_N "(cached) $ECHO_C" >&6
4605else
4606 cat >conftest.$ac_ext <<_ACEOF
4607#line $LINENO "configure"
4608#include "confdefs.h"
4609#include <sys/types.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00004610#ifdef F77_DUMMY_MAIN
4611# ifdef __cplusplus
4612 extern "C"
4613# endif
4614 int F77_DUMMY_MAIN() { return 1; }
4615#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004616int
4617main ()
4618{
4619return makedev(0, 0);
4620 ;
4621 return 0;
4622}
4623_ACEOF
4624rm -f conftest.$ac_objext conftest$ac_exeext
4625if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4626 (eval $ac_link) 2>&5
4627 ac_status=$?
4628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4629 (exit $ac_status); } &&
4630 { ac_try='test -s conftest$ac_exeext'
4631 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4632 (eval $ac_try) 2>&5
4633 ac_status=$?
4634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4635 (exit $ac_status); }; }; then
4636 ac_cv_header_sys_types_h_makedev=yes
4637else
4638 echo "$as_me: failed program was:" >&5
4639cat conftest.$ac_ext >&5
4640ac_cv_header_sys_types_h_makedev=no
4641fi
4642rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4643
4644fi
4645echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4646echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4647
4648if test $ac_cv_header_sys_types_h_makedev = no; then
4649if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4650 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4651echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4652if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4653 echo $ECHO_N "(cached) $ECHO_C" >&6
4654fi
4655echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4656echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4657else
4658 # Is the header compilable?
4659echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4660echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4661cat >conftest.$ac_ext <<_ACEOF
4662#line $LINENO "configure"
4663#include "confdefs.h"
4664$ac_includes_default
4665#include <sys/mkdev.h>
4666_ACEOF
4667rm -f conftest.$ac_objext
4668if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4669 (eval $ac_compile) 2>&5
4670 ac_status=$?
4671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4672 (exit $ac_status); } &&
4673 { ac_try='test -s conftest.$ac_objext'
4674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4675 (eval $ac_try) 2>&5
4676 ac_status=$?
4677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4678 (exit $ac_status); }; }; then
4679 ac_header_compiler=yes
4680else
4681 echo "$as_me: failed program was:" >&5
4682cat conftest.$ac_ext >&5
4683ac_header_compiler=no
4684fi
4685rm -f conftest.$ac_objext conftest.$ac_ext
4686echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4687echo "${ECHO_T}$ac_header_compiler" >&6
4688
4689# Is the header present?
4690echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4691echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4692cat >conftest.$ac_ext <<_ACEOF
4693#line $LINENO "configure"
4694#include "confdefs.h"
4695#include <sys/mkdev.h>
4696_ACEOF
4697if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4698 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4699 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004700 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004701 rm -f conftest.er1
4702 cat conftest.err >&5
4703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4704 (exit $ac_status); } >/dev/null; then
4705 if test -s conftest.err; then
4706 ac_cpp_err=$ac_c_preproc_warn_flag
4707 else
4708 ac_cpp_err=
4709 fi
4710else
4711 ac_cpp_err=yes
4712fi
4713if test -z "$ac_cpp_err"; then
4714 ac_header_preproc=yes
4715else
4716 echo "$as_me: failed program was:" >&5
4717 cat conftest.$ac_ext >&5
4718 ac_header_preproc=no
4719fi
4720rm -f conftest.err conftest.$ac_ext
4721echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4722echo "${ECHO_T}$ac_header_preproc" >&6
4723
4724# So? What about this header?
4725case $ac_header_compiler:$ac_header_preproc in
4726 yes:no )
4727 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4728echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4729 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4730echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4731 no:yes )
4732 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4733echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4734 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4735echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4736 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4737echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4738esac
4739echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4740echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4741if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4742 echo $ECHO_N "(cached) $ECHO_C" >&6
4743else
4744 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4745fi
4746echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4747echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4748
4749fi
4750if test $ac_cv_header_sys_mkdev_h = yes; then
4751
4752cat >>confdefs.h <<\_ACEOF
4753#define MAJOR_IN_MKDEV 1
4754_ACEOF
4755
4756fi
4757
4758
4759
4760 if test $ac_cv_header_sys_mkdev_h = no; then
4761 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4762 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4763echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4764if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4765 echo $ECHO_N "(cached) $ECHO_C" >&6
4766fi
4767echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4768echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4769else
4770 # Is the header compilable?
4771echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4772echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4773cat >conftest.$ac_ext <<_ACEOF
4774#line $LINENO "configure"
4775#include "confdefs.h"
4776$ac_includes_default
4777#include <sys/sysmacros.h>
4778_ACEOF
4779rm -f conftest.$ac_objext
4780if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4781 (eval $ac_compile) 2>&5
4782 ac_status=$?
4783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4784 (exit $ac_status); } &&
4785 { ac_try='test -s conftest.$ac_objext'
4786 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4787 (eval $ac_try) 2>&5
4788 ac_status=$?
4789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4790 (exit $ac_status); }; }; then
4791 ac_header_compiler=yes
4792else
4793 echo "$as_me: failed program was:" >&5
4794cat conftest.$ac_ext >&5
4795ac_header_compiler=no
4796fi
4797rm -f conftest.$ac_objext conftest.$ac_ext
4798echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4799echo "${ECHO_T}$ac_header_compiler" >&6
4800
4801# Is the header present?
4802echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
4803echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
4804cat >conftest.$ac_ext <<_ACEOF
4805#line $LINENO "configure"
4806#include "confdefs.h"
4807#include <sys/sysmacros.h>
4808_ACEOF
4809if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4810 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4811 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004812 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004813 rm -f conftest.er1
4814 cat conftest.err >&5
4815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4816 (exit $ac_status); } >/dev/null; then
4817 if test -s conftest.err; then
4818 ac_cpp_err=$ac_c_preproc_warn_flag
4819 else
4820 ac_cpp_err=
4821 fi
4822else
4823 ac_cpp_err=yes
4824fi
4825if test -z "$ac_cpp_err"; then
4826 ac_header_preproc=yes
4827else
4828 echo "$as_me: failed program was:" >&5
4829 cat conftest.$ac_ext >&5
4830 ac_header_preproc=no
4831fi
4832rm -f conftest.err conftest.$ac_ext
4833echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4834echo "${ECHO_T}$ac_header_preproc" >&6
4835
4836# So? What about this header?
4837case $ac_header_compiler:$ac_header_preproc in
4838 yes:no )
4839 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
4840echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4841 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4842echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4843 no:yes )
4844 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
4845echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
4846 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
4847echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
4848 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4849echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4850esac
4851echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4852echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4853if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4854 echo $ECHO_N "(cached) $ECHO_C" >&6
4855else
4856 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
4857fi
4858echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4859echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4860
4861fi
4862if test $ac_cv_header_sys_sysmacros_h = yes; then
4863
4864cat >>confdefs.h <<\_ACEOF
4865#define MAJOR_IN_SYSMACROS 1
4866_ACEOF
4867
4868fi
4869
4870
4871 fi
4872fi
4873
Michael W. Hudson54241132001-12-07 15:38:26 +00004874
Guido van Rossum627b2d71993-12-24 10:39:16 +00004875# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004876was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004877echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4878echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4879cat >conftest.$ac_ext <<_ACEOF
4880#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004881#include "confdefs.h"
4882#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004883
4884_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004885if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00004886 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004887 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004888else
Martin v. Löwis11437992002-04-12 09:54:03 +00004889
4890
4891cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004892#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004893_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004894
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004895
Guido van Rossum627b2d71993-12-24 10:39:16 +00004896fi
4897rm -f conftest*
4898
Martin v. Löwis11437992002-04-12 09:54:03 +00004899echo "$as_me:$LINENO: result: $was_it_defined" >&5
4900echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004901
Neal Norwitz11690112002-07-30 01:08:28 +00004902# Check whether using makedev requires defining _OSF_SOURCE
4903echo "$as_me:$LINENO: checking for makedev" >&5
4904echo $ECHO_N "checking for makedev... $ECHO_C" >&6
4905cat >conftest.$ac_ext <<_ACEOF
4906#line $LINENO "configure"
4907#include "confdefs.h"
Neal Norwitz6eb37f02003-02-23 23:28:15 +00004908#include <sys/types.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00004909#ifdef F77_DUMMY_MAIN
4910# ifdef __cplusplus
4911 extern "C"
4912# endif
4913 int F77_DUMMY_MAIN() { return 1; }
4914#endif
Neal Norwitz11690112002-07-30 01:08:28 +00004915int
4916main ()
4917{
4918 makedev(0, 0)
4919 ;
4920 return 0;
4921}
4922_ACEOF
4923rm -f conftest.$ac_objext conftest$ac_exeext
4924if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4925 (eval $ac_link) 2>&5
4926 ac_status=$?
4927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4928 (exit $ac_status); } &&
4929 { ac_try='test -s conftest$ac_exeext'
4930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4931 (eval $ac_try) 2>&5
4932 ac_status=$?
4933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4934 (exit $ac_status); }; }; then
4935 ac_cv_has_makedev=yes
4936else
4937 echo "$as_me: failed program was:" >&5
4938cat conftest.$ac_ext >&5
4939ac_cv_has_makedev=no
4940fi
4941rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4942if test "$ac_cv_has_makedev" = "no"; then
4943 # we didn't link, try if _OSF_SOURCE will allow us to link
4944 cat >conftest.$ac_ext <<_ACEOF
4945#line $LINENO "configure"
4946#include "confdefs.h"
4947
Neal Norwitz6eb37f02003-02-23 23:28:15 +00004948#define _OSF_SOURCE 1
4949#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00004950
Barry Warsawfe33b792003-01-07 22:42:49 +00004951#ifdef F77_DUMMY_MAIN
4952# ifdef __cplusplus
4953 extern "C"
4954# endif
4955 int F77_DUMMY_MAIN() { return 1; }
4956#endif
Neal Norwitz11690112002-07-30 01:08:28 +00004957int
4958main ()
4959{
4960 makedev(0, 0)
4961 ;
4962 return 0;
4963}
4964_ACEOF
4965rm -f conftest.$ac_objext conftest$ac_exeext
4966if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4967 (eval $ac_link) 2>&5
4968 ac_status=$?
4969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4970 (exit $ac_status); } &&
4971 { ac_try='test -s conftest$ac_exeext'
4972 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4973 (eval $ac_try) 2>&5
4974 ac_status=$?
4975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4976 (exit $ac_status); }; }; then
4977 ac_cv_has_makedev=yes
4978else
4979 echo "$as_me: failed program was:" >&5
4980cat conftest.$ac_ext >&5
4981ac_cv_has_makedev=no
4982fi
4983rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4984 if test "$ac_cv_has_makedev" = "yes"; then
4985
4986cat >>confdefs.h <<\_ACEOF
4987#define _OSF_SOURCE 1
4988_ACEOF
4989
4990 fi
4991fi
4992echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
4993echo "${ECHO_T}$ac_cv_has_makedev" >&6
4994if test "$ac_cv_has_makedev" = "yes"; then
4995
4996cat >>confdefs.h <<\_ACEOF
4997#define HAVE_MAKEDEV 1
4998_ACEOF
4999
5000fi
5001
Martin v. Löwis399a6892002-10-04 10:22:02 +00005002# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5003# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5004# defined, but the compiler does not support pragma redefine_extname,
5005# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5006# structures (such as rlimit64) without declaring them. As a
5007# work-around, disable LFS on such configurations
5008
5009use_lfs=yes
5010echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5011echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
5012cat >conftest.$ac_ext <<_ACEOF
5013#line $LINENO "configure"
5014#include "confdefs.h"
5015
5016#define _LARGEFILE_SOURCE 1
5017#define _FILE_OFFSET_BITS 64
5018#include <sys/resource.h>
5019
Barry Warsawfe33b792003-01-07 22:42:49 +00005020#ifdef F77_DUMMY_MAIN
5021# ifdef __cplusplus
5022 extern "C"
5023# endif
5024 int F77_DUMMY_MAIN() { return 1; }
5025#endif
Martin v. Löwis399a6892002-10-04 10:22:02 +00005026int
5027main ()
5028{
5029struct rlimit foo;
5030 ;
5031 return 0;
5032}
5033_ACEOF
5034rm -f conftest.$ac_objext
5035if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5036 (eval $ac_compile) 2>&5
5037 ac_status=$?
5038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5039 (exit $ac_status); } &&
5040 { ac_try='test -s conftest.$ac_objext'
5041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5042 (eval $ac_try) 2>&5
5043 ac_status=$?
5044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5045 (exit $ac_status); }; }; then
5046 sol_lfs_bug=no
5047else
5048 echo "$as_me: failed program was:" >&5
5049cat conftest.$ac_ext >&5
5050sol_lfs_bug=yes
5051fi
5052rm -f conftest.$ac_objext conftest.$ac_ext
5053echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5054echo "${ECHO_T}$sol_lfs_bug" >&6
5055if test "$sol_lfs_bug" = "yes"; then
5056 use_lfs=no
5057fi
5058
5059if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005060# Two defines needed to enable largefile support on various platforms
5061# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005062
Martin v. Löwis11437992002-04-12 09:54:03 +00005063cat >>confdefs.h <<\_ACEOF
5064#define _LARGEFILE_SOURCE 1
5065_ACEOF
5066
5067
5068cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005069#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005070_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005071
Martin v. Löwis399a6892002-10-04 10:22:02 +00005072fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005073
Guido van Rossum84e7b241996-08-19 21:59:00 +00005074# Add some code to confdefs.h so that the test for off_t works on SCO
5075cat >> confdefs.h <<\EOF
5076#if defined(SCO_DS)
5077#undef _OFF_T
5078#endif
5079EOF
5080
Guido van Rossumef2255b2000-03-10 22:30:29 +00005081# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005082echo "$as_me:$LINENO: checking for mode_t" >&5
5083echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5084if test "${ac_cv_type_mode_t+set}" = set; then
5085 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005086else
Martin v. Löwis11437992002-04-12 09:54:03 +00005087 cat >conftest.$ac_ext <<_ACEOF
5088#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005089#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005090$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005091#ifdef F77_DUMMY_MAIN
5092# ifdef __cplusplus
5093 extern "C"
5094# endif
5095 int F77_DUMMY_MAIN() { return 1; }
5096#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005097int
5098main ()
5099{
5100if ((mode_t *) 0)
5101 return 0;
5102if (sizeof (mode_t))
5103 return 0;
5104 ;
5105 return 0;
5106}
5107_ACEOF
5108rm -f conftest.$ac_objext
5109if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5110 (eval $ac_compile) 2>&5
5111 ac_status=$?
5112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5113 (exit $ac_status); } &&
5114 { ac_try='test -s conftest.$ac_objext'
5115 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5116 (eval $ac_try) 2>&5
5117 ac_status=$?
5118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5119 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005120 ac_cv_type_mode_t=yes
5121else
Martin v. Löwis11437992002-04-12 09:54:03 +00005122 echo "$as_me: failed program was:" >&5
5123cat conftest.$ac_ext >&5
5124ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005125fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005126rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005127fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005128echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5129echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5130if test $ac_cv_type_mode_t = yes; then
5131 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005132else
Martin v. Löwis11437992002-04-12 09:54:03 +00005133
5134cat >>confdefs.h <<_ACEOF
5135#define mode_t int
5136_ACEOF
5137
5138fi
5139
5140echo "$as_me:$LINENO: checking for off_t" >&5
5141echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5142if test "${ac_cv_type_off_t+set}" = set; then
5143 echo $ECHO_N "(cached) $ECHO_C" >&6
5144else
5145 cat >conftest.$ac_ext <<_ACEOF
5146#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005147#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005148$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005149#ifdef F77_DUMMY_MAIN
5150# ifdef __cplusplus
5151 extern "C"
5152# endif
5153 int F77_DUMMY_MAIN() { return 1; }
5154#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005155int
5156main ()
5157{
5158if ((off_t *) 0)
5159 return 0;
5160if (sizeof (off_t))
5161 return 0;
5162 ;
5163 return 0;
5164}
5165_ACEOF
5166rm -f conftest.$ac_objext
5167if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5168 (eval $ac_compile) 2>&5
5169 ac_status=$?
5170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5171 (exit $ac_status); } &&
5172 { ac_try='test -s conftest.$ac_objext'
5173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5174 (eval $ac_try) 2>&5
5175 ac_status=$?
5176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5177 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005178 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005179else
Martin v. Löwis11437992002-04-12 09:54:03 +00005180 echo "$as_me: failed program was:" >&5
5181cat conftest.$ac_ext >&5
5182ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005183fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005184rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005185fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005186echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5187echo "${ECHO_T}$ac_cv_type_off_t" >&6
5188if test $ac_cv_type_off_t = yes; then
5189 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005190else
Martin v. Löwis11437992002-04-12 09:54:03 +00005191
5192cat >>confdefs.h <<_ACEOF
5193#define off_t long
5194_ACEOF
5195
5196fi
5197
5198echo "$as_me:$LINENO: checking for pid_t" >&5
5199echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5200if test "${ac_cv_type_pid_t+set}" = set; then
5201 echo $ECHO_N "(cached) $ECHO_C" >&6
5202else
5203 cat >conftest.$ac_ext <<_ACEOF
5204#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005205#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005206$ac_includes_default
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{
5216if ((pid_t *) 0)
5217 return 0;
5218if (sizeof (pid_t))
5219 return 0;
5220 ;
5221 return 0;
5222}
5223_ACEOF
5224rm -f conftest.$ac_objext
5225if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5226 (eval $ac_compile) 2>&5
5227 ac_status=$?
5228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5229 (exit $ac_status); } &&
5230 { ac_try='test -s conftest.$ac_objext'
5231 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5232 (eval $ac_try) 2>&5
5233 ac_status=$?
5234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5235 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005236 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005237else
Martin v. Löwis11437992002-04-12 09:54:03 +00005238 echo "$as_me: failed program was:" >&5
5239cat conftest.$ac_ext >&5
5240ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005241fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005242rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005243fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005244echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5245echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5246if test $ac_cv_type_pid_t = yes; then
5247 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005248else
Martin v. Löwis11437992002-04-12 09:54:03 +00005249
5250cat >>confdefs.h <<_ACEOF
5251#define pid_t int
5252_ACEOF
5253
5254fi
5255
5256echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5257echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5258if test "${ac_cv_type_signal+set}" = set; then
5259 echo $ECHO_N "(cached) $ECHO_C" >&6
5260else
5261 cat >conftest.$ac_ext <<_ACEOF
5262#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005263#include "confdefs.h"
5264#include <sys/types.h>
5265#include <signal.h>
5266#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005267# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005268#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005269#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005270extern "C" void (*signal (int, void (*)(int)))(int);
5271#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005272void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005273#endif
5274
Barry Warsawfe33b792003-01-07 22:42:49 +00005275#ifdef F77_DUMMY_MAIN
5276# ifdef __cplusplus
5277 extern "C"
5278# endif
5279 int F77_DUMMY_MAIN() { return 1; }
5280#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005281int
5282main ()
5283{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005284int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005285 ;
5286 return 0;
5287}
5288_ACEOF
5289rm -f conftest.$ac_objext
5290if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5291 (eval $ac_compile) 2>&5
5292 ac_status=$?
5293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5294 (exit $ac_status); } &&
5295 { ac_try='test -s conftest.$ac_objext'
5296 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5297 (eval $ac_try) 2>&5
5298 ac_status=$?
5299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5300 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005301 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005302else
Martin v. Löwis11437992002-04-12 09:54:03 +00005303 echo "$as_me: failed program was:" >&5
5304cat conftest.$ac_ext >&5
5305ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005306fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005307rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005308fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005309echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5310echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005311
Martin v. Löwis11437992002-04-12 09:54:03 +00005312cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005313#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005314_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005315
Michael W. Hudson54241132001-12-07 15:38:26 +00005316
Martin v. Löwis11437992002-04-12 09:54:03 +00005317echo "$as_me:$LINENO: checking for size_t" >&5
5318echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5319if test "${ac_cv_type_size_t+set}" = set; then
5320 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005321else
Martin v. Löwis11437992002-04-12 09:54:03 +00005322 cat >conftest.$ac_ext <<_ACEOF
5323#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005324#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005325$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005326#ifdef F77_DUMMY_MAIN
5327# ifdef __cplusplus
5328 extern "C"
5329# endif
5330 int F77_DUMMY_MAIN() { return 1; }
5331#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005332int
5333main ()
5334{
5335if ((size_t *) 0)
5336 return 0;
5337if (sizeof (size_t))
5338 return 0;
5339 ;
5340 return 0;
5341}
5342_ACEOF
5343rm -f conftest.$ac_objext
5344if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5345 (eval $ac_compile) 2>&5
5346 ac_status=$?
5347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5348 (exit $ac_status); } &&
5349 { ac_try='test -s conftest.$ac_objext'
5350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5351 (eval $ac_try) 2>&5
5352 ac_status=$?
5353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5354 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005355 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005356else
Martin v. Löwis11437992002-04-12 09:54:03 +00005357 echo "$as_me: failed program was:" >&5
5358cat conftest.$ac_ext >&5
5359ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005360fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005361rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005362fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005363echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5364echo "${ECHO_T}$ac_cv_type_size_t" >&6
5365if test $ac_cv_type_size_t = yes; then
5366 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005367else
Martin v. Löwis11437992002-04-12 09:54:03 +00005368
5369cat >>confdefs.h <<_ACEOF
5370#define size_t unsigned
5371_ACEOF
5372
5373fi
5374
5375echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5376echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5377if test "${ac_cv_type_uid_t+set}" = set; then
5378 echo $ECHO_N "(cached) $ECHO_C" >&6
5379else
5380 cat >conftest.$ac_ext <<_ACEOF
5381#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005382#include "confdefs.h"
5383#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005384
5385_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005386if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00005387 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005388 ac_cv_type_uid_t=yes
5389else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005390 ac_cv_type_uid_t=no
5391fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005392rm -f conftest*
5393
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005394fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005395echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5396echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005397if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005398
Martin v. Löwis11437992002-04-12 09:54:03 +00005399cat >>confdefs.h <<\_ACEOF
5400#define uid_t int
5401_ACEOF
5402
5403
5404cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005405#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005406_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005407
5408fi
5409
Jack Jansendd19cf82001-12-06 22:36:17 +00005410
Michael W. Hudson54241132001-12-07 15:38:26 +00005411# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00005412echo "$as_me:$LINENO: checking for int" >&5
5413echo $ECHO_N "checking for int... $ECHO_C" >&6
5414if test "${ac_cv_type_int+set}" = set; then
5415 echo $ECHO_N "(cached) $ECHO_C" >&6
5416else
5417 cat >conftest.$ac_ext <<_ACEOF
5418#line $LINENO "configure"
5419#include "confdefs.h"
5420$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005421#ifdef F77_DUMMY_MAIN
5422# ifdef __cplusplus
5423 extern "C"
5424# endif
5425 int F77_DUMMY_MAIN() { return 1; }
5426#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005427int
5428main ()
5429{
5430if ((int *) 0)
5431 return 0;
5432if (sizeof (int))
5433 return 0;
5434 ;
5435 return 0;
5436}
5437_ACEOF
5438rm -f conftest.$ac_objext
5439if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5440 (eval $ac_compile) 2>&5
5441 ac_status=$?
5442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5443 (exit $ac_status); } &&
5444 { ac_try='test -s conftest.$ac_objext'
5445 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5446 (eval $ac_try) 2>&5
5447 ac_status=$?
5448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5449 (exit $ac_status); }; }; then
5450 ac_cv_type_int=yes
5451else
5452 echo "$as_me: failed program was:" >&5
5453cat conftest.$ac_ext >&5
5454ac_cv_type_int=no
5455fi
5456rm -f conftest.$ac_objext conftest.$ac_ext
5457fi
5458echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5459echo "${ECHO_T}$ac_cv_type_int" >&6
5460
5461echo "$as_me:$LINENO: checking size of int" >&5
5462echo $ECHO_N "checking size of int... $ECHO_C" >&6
5463if test "${ac_cv_sizeof_int+set}" = set; then
5464 echo $ECHO_N "(cached) $ECHO_C" >&6
5465else
5466 if test "$ac_cv_type_int" = yes; then
5467 # The cast to unsigned long works around a bug in the HP C Compiler
5468 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5469 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5470 # This bug is HP SR number 8606223364.
5471 if test "$cross_compiling" = yes; then
5472 # Depending upon the size, compute the lo and hi bounds.
5473cat >conftest.$ac_ext <<_ACEOF
5474#line $LINENO "configure"
5475#include "confdefs.h"
5476$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005477#ifdef F77_DUMMY_MAIN
5478# ifdef __cplusplus
5479 extern "C"
5480# endif
5481 int F77_DUMMY_MAIN() { return 1; }
5482#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005483int
5484main ()
5485{
5486static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5487test_array [0] = 0
5488
5489 ;
5490 return 0;
5491}
5492_ACEOF
5493rm -f conftest.$ac_objext
5494if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5495 (eval $ac_compile) 2>&5
5496 ac_status=$?
5497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5498 (exit $ac_status); } &&
5499 { ac_try='test -s conftest.$ac_objext'
5500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5501 (eval $ac_try) 2>&5
5502 ac_status=$?
5503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5504 (exit $ac_status); }; }; then
5505 ac_lo=0 ac_mid=0
5506 while :; do
5507 cat >conftest.$ac_ext <<_ACEOF
5508#line $LINENO "configure"
5509#include "confdefs.h"
5510$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005511#ifdef F77_DUMMY_MAIN
5512# ifdef __cplusplus
5513 extern "C"
5514# endif
5515 int F77_DUMMY_MAIN() { return 1; }
5516#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005517int
5518main ()
5519{
5520static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5521test_array [0] = 0
5522
5523 ;
5524 return 0;
5525}
5526_ACEOF
5527rm -f conftest.$ac_objext
5528if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5529 (eval $ac_compile) 2>&5
5530 ac_status=$?
5531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5532 (exit $ac_status); } &&
5533 { ac_try='test -s conftest.$ac_objext'
5534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5535 (eval $ac_try) 2>&5
5536 ac_status=$?
5537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5538 (exit $ac_status); }; }; then
5539 ac_hi=$ac_mid; break
5540else
5541 echo "$as_me: failed program was:" >&5
5542cat conftest.$ac_ext >&5
5543ac_lo=`expr $ac_mid + 1`
5544 if test $ac_lo -le $ac_mid; then
5545 ac_lo= ac_hi=
5546 break
5547 fi
5548 ac_mid=`expr 2 '*' $ac_mid + 1`
5549fi
5550rm -f conftest.$ac_objext conftest.$ac_ext
5551 done
5552else
5553 echo "$as_me: failed program was:" >&5
5554cat conftest.$ac_ext >&5
5555cat >conftest.$ac_ext <<_ACEOF
5556#line $LINENO "configure"
5557#include "confdefs.h"
5558$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005559#ifdef F77_DUMMY_MAIN
5560# ifdef __cplusplus
5561 extern "C"
5562# endif
5563 int F77_DUMMY_MAIN() { return 1; }
5564#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005565int
5566main ()
5567{
5568static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5569test_array [0] = 0
5570
5571 ;
5572 return 0;
5573}
5574_ACEOF
5575rm -f conftest.$ac_objext
5576if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5577 (eval $ac_compile) 2>&5
5578 ac_status=$?
5579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5580 (exit $ac_status); } &&
5581 { ac_try='test -s conftest.$ac_objext'
5582 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5583 (eval $ac_try) 2>&5
5584 ac_status=$?
5585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5586 (exit $ac_status); }; }; then
5587 ac_hi=-1 ac_mid=-1
5588 while :; do
5589 cat >conftest.$ac_ext <<_ACEOF
5590#line $LINENO "configure"
5591#include "confdefs.h"
5592$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005593#ifdef F77_DUMMY_MAIN
5594# ifdef __cplusplus
5595 extern "C"
5596# endif
5597 int F77_DUMMY_MAIN() { return 1; }
5598#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005599int
5600main ()
5601{
5602static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5603test_array [0] = 0
5604
5605 ;
5606 return 0;
5607}
5608_ACEOF
5609rm -f conftest.$ac_objext
5610if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5611 (eval $ac_compile) 2>&5
5612 ac_status=$?
5613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5614 (exit $ac_status); } &&
5615 { ac_try='test -s conftest.$ac_objext'
5616 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5617 (eval $ac_try) 2>&5
5618 ac_status=$?
5619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5620 (exit $ac_status); }; }; then
5621 ac_lo=$ac_mid; break
5622else
5623 echo "$as_me: failed program was:" >&5
5624cat conftest.$ac_ext >&5
5625ac_hi=`expr '(' $ac_mid ')' - 1`
5626 if test $ac_mid -le $ac_hi; then
5627 ac_lo= ac_hi=
5628 break
5629 fi
5630 ac_mid=`expr 2 '*' $ac_mid`
5631fi
5632rm -f conftest.$ac_objext conftest.$ac_ext
5633 done
5634else
5635 echo "$as_me: failed program was:" >&5
5636cat conftest.$ac_ext >&5
5637ac_lo= ac_hi=
5638fi
5639rm -f conftest.$ac_objext conftest.$ac_ext
5640fi
5641rm -f conftest.$ac_objext conftest.$ac_ext
5642# Binary search between lo and hi bounds.
5643while test "x$ac_lo" != "x$ac_hi"; do
5644 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5645 cat >conftest.$ac_ext <<_ACEOF
5646#line $LINENO "configure"
5647#include "confdefs.h"
5648$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005649#ifdef F77_DUMMY_MAIN
5650# ifdef __cplusplus
5651 extern "C"
5652# endif
5653 int F77_DUMMY_MAIN() { return 1; }
5654#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005655int
5656main ()
5657{
5658static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5659test_array [0] = 0
5660
5661 ;
5662 return 0;
5663}
5664_ACEOF
5665rm -f conftest.$ac_objext
5666if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5667 (eval $ac_compile) 2>&5
5668 ac_status=$?
5669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5670 (exit $ac_status); } &&
5671 { ac_try='test -s conftest.$ac_objext'
5672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5673 (eval $ac_try) 2>&5
5674 ac_status=$?
5675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5676 (exit $ac_status); }; }; then
5677 ac_hi=$ac_mid
5678else
5679 echo "$as_me: failed program was:" >&5
5680cat conftest.$ac_ext >&5
5681ac_lo=`expr '(' $ac_mid ')' + 1`
5682fi
5683rm -f conftest.$ac_objext conftest.$ac_ext
5684done
5685case $ac_lo in
5686?*) ac_cv_sizeof_int=$ac_lo;;
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; }; } ;;
5690esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005691else
5692 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005693 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5694echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5695 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005696else
Martin v. Löwis11437992002-04-12 09:54:03 +00005697 cat >conftest.$ac_ext <<_ACEOF
5698#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005699#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005700$ac_includes_default
5701long longval () { return (long) (sizeof (int)); }
5702unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005703#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005704#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00005705#ifdef F77_DUMMY_MAIN
5706# ifdef __cplusplus
5707 extern "C"
5708# endif
5709 int F77_DUMMY_MAIN() { return 1; }
5710#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005711int
5712main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005713{
Martin v. Löwis11437992002-04-12 09:54:03 +00005714
5715 FILE *f = fopen ("conftest.val", "w");
5716 if (! f)
5717 exit (1);
5718 if (((long) (sizeof (int))) < 0)
5719 {
5720 long i = longval ();
5721 if (i != ((long) (sizeof (int))))
5722 exit (1);
5723 fprintf (f, "%ld\n", i);
5724 }
5725 else
5726 {
5727 unsigned long i = ulongval ();
5728 if (i != ((long) (sizeof (int))))
5729 exit (1);
5730 fprintf (f, "%lu\n", i);
5731 }
5732 exit (ferror (f) || fclose (f) != 0);
5733
5734 ;
5735 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005736}
Martin v. Löwis11437992002-04-12 09:54:03 +00005737_ACEOF
5738rm -f conftest$ac_exeext
5739if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5740 (eval $ac_link) 2>&5
5741 ac_status=$?
5742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5743 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5744 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5745 (eval $ac_try) 2>&5
5746 ac_status=$?
5747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5748 (exit $ac_status); }; }; then
5749 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005750else
Martin v. Löwis11437992002-04-12 09:54:03 +00005751 echo "$as_me: program exited with status $ac_status" >&5
5752echo "$as_me: failed program was:" >&5
5753cat conftest.$ac_ext >&5
5754( exit $ac_status )
5755{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5756echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5757 { (exit 1); exit 1; }; }
5758fi
Barry Warsawfe33b792003-01-07 22:42:49 +00005759rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005760fi
5761fi
5762rm -f conftest.val
5763else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005764 ac_cv_sizeof_int=0
5765fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005766fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005767echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5768echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5769cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005770#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005771_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005772
5773
Martin v. Löwis11437992002-04-12 09:54:03 +00005774echo "$as_me:$LINENO: checking for long" >&5
5775echo $ECHO_N "checking for long... $ECHO_C" >&6
5776if test "${ac_cv_type_long+set}" = set; then
5777 echo $ECHO_N "(cached) $ECHO_C" >&6
5778else
5779 cat >conftest.$ac_ext <<_ACEOF
5780#line $LINENO "configure"
5781#include "confdefs.h"
5782$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005783#ifdef F77_DUMMY_MAIN
5784# ifdef __cplusplus
5785 extern "C"
5786# endif
5787 int F77_DUMMY_MAIN() { return 1; }
5788#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005789int
5790main ()
5791{
5792if ((long *) 0)
5793 return 0;
5794if (sizeof (long))
5795 return 0;
5796 ;
5797 return 0;
5798}
5799_ACEOF
5800rm -f conftest.$ac_objext
5801if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5802 (eval $ac_compile) 2>&5
5803 ac_status=$?
5804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5805 (exit $ac_status); } &&
5806 { ac_try='test -s conftest.$ac_objext'
5807 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5808 (eval $ac_try) 2>&5
5809 ac_status=$?
5810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5811 (exit $ac_status); }; }; then
5812 ac_cv_type_long=yes
5813else
5814 echo "$as_me: failed program was:" >&5
5815cat conftest.$ac_ext >&5
5816ac_cv_type_long=no
5817fi
5818rm -f conftest.$ac_objext conftest.$ac_ext
5819fi
5820echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5821echo "${ECHO_T}$ac_cv_type_long" >&6
5822
5823echo "$as_me:$LINENO: checking size of long" >&5
5824echo $ECHO_N "checking size of long... $ECHO_C" >&6
5825if test "${ac_cv_sizeof_long+set}" = set; then
5826 echo $ECHO_N "(cached) $ECHO_C" >&6
5827else
5828 if test "$ac_cv_type_long" = yes; then
5829 # The cast to unsigned long works around a bug in the HP C Compiler
5830 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5831 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5832 # This bug is HP SR number 8606223364.
5833 if test "$cross_compiling" = yes; then
5834 # Depending upon the size, compute the lo and hi bounds.
5835cat >conftest.$ac_ext <<_ACEOF
5836#line $LINENO "configure"
5837#include "confdefs.h"
5838$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005839#ifdef F77_DUMMY_MAIN
5840# ifdef __cplusplus
5841 extern "C"
5842# endif
5843 int F77_DUMMY_MAIN() { return 1; }
5844#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005845int
5846main ()
5847{
5848static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5849test_array [0] = 0
5850
5851 ;
5852 return 0;
5853}
5854_ACEOF
5855rm -f conftest.$ac_objext
5856if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5857 (eval $ac_compile) 2>&5
5858 ac_status=$?
5859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5860 (exit $ac_status); } &&
5861 { ac_try='test -s conftest.$ac_objext'
5862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5863 (eval $ac_try) 2>&5
5864 ac_status=$?
5865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5866 (exit $ac_status); }; }; then
5867 ac_lo=0 ac_mid=0
5868 while :; do
5869 cat >conftest.$ac_ext <<_ACEOF
5870#line $LINENO "configure"
5871#include "confdefs.h"
5872$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005873#ifdef F77_DUMMY_MAIN
5874# ifdef __cplusplus
5875 extern "C"
5876# endif
5877 int F77_DUMMY_MAIN() { return 1; }
5878#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005879int
5880main ()
5881{
5882static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5883test_array [0] = 0
5884
5885 ;
5886 return 0;
5887}
5888_ACEOF
5889rm -f conftest.$ac_objext
5890if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5891 (eval $ac_compile) 2>&5
5892 ac_status=$?
5893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5894 (exit $ac_status); } &&
5895 { ac_try='test -s conftest.$ac_objext'
5896 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5897 (eval $ac_try) 2>&5
5898 ac_status=$?
5899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5900 (exit $ac_status); }; }; then
5901 ac_hi=$ac_mid; break
5902else
5903 echo "$as_me: failed program was:" >&5
5904cat conftest.$ac_ext >&5
5905ac_lo=`expr $ac_mid + 1`
5906 if test $ac_lo -le $ac_mid; then
5907 ac_lo= ac_hi=
5908 break
5909 fi
5910 ac_mid=`expr 2 '*' $ac_mid + 1`
5911fi
5912rm -f conftest.$ac_objext conftest.$ac_ext
5913 done
5914else
5915 echo "$as_me: failed program was:" >&5
5916cat conftest.$ac_ext >&5
5917cat >conftest.$ac_ext <<_ACEOF
5918#line $LINENO "configure"
5919#include "confdefs.h"
5920$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005921#ifdef F77_DUMMY_MAIN
5922# ifdef __cplusplus
5923 extern "C"
5924# endif
5925 int F77_DUMMY_MAIN() { return 1; }
5926#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005927int
5928main ()
5929{
5930static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5931test_array [0] = 0
5932
5933 ;
5934 return 0;
5935}
5936_ACEOF
5937rm -f conftest.$ac_objext
5938if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5939 (eval $ac_compile) 2>&5
5940 ac_status=$?
5941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5942 (exit $ac_status); } &&
5943 { ac_try='test -s conftest.$ac_objext'
5944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5945 (eval $ac_try) 2>&5
5946 ac_status=$?
5947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5948 (exit $ac_status); }; }; then
5949 ac_hi=-1 ac_mid=-1
5950 while :; do
5951 cat >conftest.$ac_ext <<_ACEOF
5952#line $LINENO "configure"
5953#include "confdefs.h"
5954$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005955#ifdef F77_DUMMY_MAIN
5956# ifdef __cplusplus
5957 extern "C"
5958# endif
5959 int F77_DUMMY_MAIN() { return 1; }
5960#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005961int
5962main ()
5963{
5964static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5965test_array [0] = 0
5966
5967 ;
5968 return 0;
5969}
5970_ACEOF
5971rm -f conftest.$ac_objext
5972if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5973 (eval $ac_compile) 2>&5
5974 ac_status=$?
5975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5976 (exit $ac_status); } &&
5977 { ac_try='test -s conftest.$ac_objext'
5978 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5979 (eval $ac_try) 2>&5
5980 ac_status=$?
5981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5982 (exit $ac_status); }; }; then
5983 ac_lo=$ac_mid; break
5984else
5985 echo "$as_me: failed program was:" >&5
5986cat conftest.$ac_ext >&5
5987ac_hi=`expr '(' $ac_mid ')' - 1`
5988 if test $ac_mid -le $ac_hi; then
5989 ac_lo= ac_hi=
5990 break
5991 fi
5992 ac_mid=`expr 2 '*' $ac_mid`
5993fi
5994rm -f conftest.$ac_objext conftest.$ac_ext
5995 done
5996else
5997 echo "$as_me: failed program was:" >&5
5998cat conftest.$ac_ext >&5
5999ac_lo= ac_hi=
6000fi
6001rm -f conftest.$ac_objext conftest.$ac_ext
6002fi
6003rm -f conftest.$ac_objext conftest.$ac_ext
6004# Binary search between lo and hi bounds.
6005while test "x$ac_lo" != "x$ac_hi"; do
6006 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6007 cat >conftest.$ac_ext <<_ACEOF
6008#line $LINENO "configure"
6009#include "confdefs.h"
6010$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006011#ifdef F77_DUMMY_MAIN
6012# ifdef __cplusplus
6013 extern "C"
6014# endif
6015 int F77_DUMMY_MAIN() { return 1; }
6016#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006017int
6018main ()
6019{
6020static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6021test_array [0] = 0
6022
6023 ;
6024 return 0;
6025}
6026_ACEOF
6027rm -f conftest.$ac_objext
6028if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6029 (eval $ac_compile) 2>&5
6030 ac_status=$?
6031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6032 (exit $ac_status); } &&
6033 { ac_try='test -s conftest.$ac_objext'
6034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6035 (eval $ac_try) 2>&5
6036 ac_status=$?
6037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6038 (exit $ac_status); }; }; then
6039 ac_hi=$ac_mid
6040else
6041 echo "$as_me: failed program was:" >&5
6042cat conftest.$ac_ext >&5
6043ac_lo=`expr '(' $ac_mid ')' + 1`
6044fi
6045rm -f conftest.$ac_objext conftest.$ac_ext
6046done
6047case $ac_lo in
6048?*) ac_cv_sizeof_long=$ac_lo;;
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; }; } ;;
6052esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006053else
6054 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006055 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6056echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6057 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006058else
Martin v. Löwis11437992002-04-12 09:54:03 +00006059 cat >conftest.$ac_ext <<_ACEOF
6060#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006061#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006062$ac_includes_default
6063long longval () { return (long) (sizeof (long)); }
6064unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006065#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006066#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00006067#ifdef F77_DUMMY_MAIN
6068# ifdef __cplusplus
6069 extern "C"
6070# endif
6071 int F77_DUMMY_MAIN() { return 1; }
6072#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006073int
6074main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006075{
Martin v. Löwis11437992002-04-12 09:54:03 +00006076
6077 FILE *f = fopen ("conftest.val", "w");
6078 if (! f)
6079 exit (1);
6080 if (((long) (sizeof (long))) < 0)
6081 {
6082 long i = longval ();
6083 if (i != ((long) (sizeof (long))))
6084 exit (1);
6085 fprintf (f, "%ld\n", i);
6086 }
6087 else
6088 {
6089 unsigned long i = ulongval ();
6090 if (i != ((long) (sizeof (long))))
6091 exit (1);
6092 fprintf (f, "%lu\n", i);
6093 }
6094 exit (ferror (f) || fclose (f) != 0);
6095
6096 ;
6097 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006098}
Martin v. Löwis11437992002-04-12 09:54:03 +00006099_ACEOF
6100rm -f conftest$ac_exeext
6101if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6102 (eval $ac_link) 2>&5
6103 ac_status=$?
6104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6105 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6106 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6107 (eval $ac_try) 2>&5
6108 ac_status=$?
6109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6110 (exit $ac_status); }; }; then
6111 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006112else
Martin v. Löwis11437992002-04-12 09:54:03 +00006113 echo "$as_me: program exited with status $ac_status" >&5
6114echo "$as_me: failed program was:" >&5
6115cat conftest.$ac_ext >&5
6116( exit $ac_status )
6117{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
6118echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
6119 { (exit 1); exit 1; }; }
6120fi
Barry Warsawfe33b792003-01-07 22:42:49 +00006121rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006122fi
6123fi
6124rm -f conftest.val
6125else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006126 ac_cv_sizeof_long=0
6127fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006128fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006129echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6130echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6131cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006132#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006133_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006134
6135
Martin v. Löwis11437992002-04-12 09:54:03 +00006136echo "$as_me:$LINENO: checking for void *" >&5
6137echo $ECHO_N "checking for void *... $ECHO_C" >&6
6138if test "${ac_cv_type_void_p+set}" = set; then
6139 echo $ECHO_N "(cached) $ECHO_C" >&6
6140else
6141 cat >conftest.$ac_ext <<_ACEOF
6142#line $LINENO "configure"
6143#include "confdefs.h"
6144$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006145#ifdef F77_DUMMY_MAIN
6146# ifdef __cplusplus
6147 extern "C"
6148# endif
6149 int F77_DUMMY_MAIN() { return 1; }
6150#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006151int
6152main ()
6153{
6154if ((void * *) 0)
6155 return 0;
6156if (sizeof (void *))
6157 return 0;
6158 ;
6159 return 0;
6160}
6161_ACEOF
6162rm -f conftest.$ac_objext
6163if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6164 (eval $ac_compile) 2>&5
6165 ac_status=$?
6166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6167 (exit $ac_status); } &&
6168 { ac_try='test -s conftest.$ac_objext'
6169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6170 (eval $ac_try) 2>&5
6171 ac_status=$?
6172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6173 (exit $ac_status); }; }; then
6174 ac_cv_type_void_p=yes
6175else
6176 echo "$as_me: failed program was:" >&5
6177cat conftest.$ac_ext >&5
6178ac_cv_type_void_p=no
6179fi
6180rm -f conftest.$ac_objext conftest.$ac_ext
6181fi
6182echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
6183echo "${ECHO_T}$ac_cv_type_void_p" >&6
6184
6185echo "$as_me:$LINENO: checking size of void *" >&5
6186echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6187if test "${ac_cv_sizeof_void_p+set}" = set; then
6188 echo $ECHO_N "(cached) $ECHO_C" >&6
6189else
6190 if test "$ac_cv_type_void_p" = yes; then
6191 # The cast to unsigned long works around a bug in the HP C Compiler
6192 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6193 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6194 # This bug is HP SR number 8606223364.
6195 if test "$cross_compiling" = yes; then
6196 # Depending upon the size, compute the lo and hi bounds.
6197cat >conftest.$ac_ext <<_ACEOF
6198#line $LINENO "configure"
6199#include "confdefs.h"
6200$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006201#ifdef F77_DUMMY_MAIN
6202# ifdef __cplusplus
6203 extern "C"
6204# endif
6205 int F77_DUMMY_MAIN() { return 1; }
6206#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006207int
6208main ()
6209{
6210static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
6211test_array [0] = 0
6212
6213 ;
6214 return 0;
6215}
6216_ACEOF
6217rm -f conftest.$ac_objext
6218if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6219 (eval $ac_compile) 2>&5
6220 ac_status=$?
6221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6222 (exit $ac_status); } &&
6223 { ac_try='test -s conftest.$ac_objext'
6224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6225 (eval $ac_try) 2>&5
6226 ac_status=$?
6227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6228 (exit $ac_status); }; }; then
6229 ac_lo=0 ac_mid=0
6230 while :; do
6231 cat >conftest.$ac_ext <<_ACEOF
6232#line $LINENO "configure"
6233#include "confdefs.h"
6234$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006235#ifdef F77_DUMMY_MAIN
6236# ifdef __cplusplus
6237 extern "C"
6238# endif
6239 int F77_DUMMY_MAIN() { return 1; }
6240#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006241int
6242main ()
6243{
6244static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6245test_array [0] = 0
6246
6247 ;
6248 return 0;
6249}
6250_ACEOF
6251rm -f conftest.$ac_objext
6252if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6253 (eval $ac_compile) 2>&5
6254 ac_status=$?
6255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6256 (exit $ac_status); } &&
6257 { ac_try='test -s conftest.$ac_objext'
6258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6259 (eval $ac_try) 2>&5
6260 ac_status=$?
6261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6262 (exit $ac_status); }; }; then
6263 ac_hi=$ac_mid; break
6264else
6265 echo "$as_me: failed program was:" >&5
6266cat conftest.$ac_ext >&5
6267ac_lo=`expr $ac_mid + 1`
6268 if test $ac_lo -le $ac_mid; then
6269 ac_lo= ac_hi=
6270 break
6271 fi
6272 ac_mid=`expr 2 '*' $ac_mid + 1`
6273fi
6274rm -f conftest.$ac_objext conftest.$ac_ext
6275 done
6276else
6277 echo "$as_me: failed program was:" >&5
6278cat conftest.$ac_ext >&5
6279cat >conftest.$ac_ext <<_ACEOF
6280#line $LINENO "configure"
6281#include "confdefs.h"
6282$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006283#ifdef F77_DUMMY_MAIN
6284# ifdef __cplusplus
6285 extern "C"
6286# endif
6287 int F77_DUMMY_MAIN() { return 1; }
6288#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006289int
6290main ()
6291{
6292static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6293test_array [0] = 0
6294
6295 ;
6296 return 0;
6297}
6298_ACEOF
6299rm -f conftest.$ac_objext
6300if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6301 (eval $ac_compile) 2>&5
6302 ac_status=$?
6303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6304 (exit $ac_status); } &&
6305 { ac_try='test -s conftest.$ac_objext'
6306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6307 (eval $ac_try) 2>&5
6308 ac_status=$?
6309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6310 (exit $ac_status); }; }; then
6311 ac_hi=-1 ac_mid=-1
6312 while :; do
6313 cat >conftest.$ac_ext <<_ACEOF
6314#line $LINENO "configure"
6315#include "confdefs.h"
6316$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006317#ifdef F77_DUMMY_MAIN
6318# ifdef __cplusplus
6319 extern "C"
6320# endif
6321 int F77_DUMMY_MAIN() { return 1; }
6322#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006323int
6324main ()
6325{
6326static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6327test_array [0] = 0
6328
6329 ;
6330 return 0;
6331}
6332_ACEOF
6333rm -f conftest.$ac_objext
6334if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6335 (eval $ac_compile) 2>&5
6336 ac_status=$?
6337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6338 (exit $ac_status); } &&
6339 { ac_try='test -s conftest.$ac_objext'
6340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6341 (eval $ac_try) 2>&5
6342 ac_status=$?
6343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6344 (exit $ac_status); }; }; then
6345 ac_lo=$ac_mid; break
6346else
6347 echo "$as_me: failed program was:" >&5
6348cat conftest.$ac_ext >&5
6349ac_hi=`expr '(' $ac_mid ')' - 1`
6350 if test $ac_mid -le $ac_hi; then
6351 ac_lo= ac_hi=
6352 break
6353 fi
6354 ac_mid=`expr 2 '*' $ac_mid`
6355fi
6356rm -f conftest.$ac_objext conftest.$ac_ext
6357 done
6358else
6359 echo "$as_me: failed program was:" >&5
6360cat conftest.$ac_ext >&5
6361ac_lo= ac_hi=
6362fi
6363rm -f conftest.$ac_objext conftest.$ac_ext
6364fi
6365rm -f conftest.$ac_objext conftest.$ac_ext
6366# Binary search between lo and hi bounds.
6367while test "x$ac_lo" != "x$ac_hi"; do
6368 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6369 cat >conftest.$ac_ext <<_ACEOF
6370#line $LINENO "configure"
6371#include "confdefs.h"
6372$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006373#ifdef F77_DUMMY_MAIN
6374# ifdef __cplusplus
6375 extern "C"
6376# endif
6377 int F77_DUMMY_MAIN() { return 1; }
6378#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006379int
6380main ()
6381{
6382static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6383test_array [0] = 0
6384
6385 ;
6386 return 0;
6387}
6388_ACEOF
6389rm -f conftest.$ac_objext
6390if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6391 (eval $ac_compile) 2>&5
6392 ac_status=$?
6393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6394 (exit $ac_status); } &&
6395 { ac_try='test -s conftest.$ac_objext'
6396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6397 (eval $ac_try) 2>&5
6398 ac_status=$?
6399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6400 (exit $ac_status); }; }; then
6401 ac_hi=$ac_mid
6402else
6403 echo "$as_me: failed program was:" >&5
6404cat conftest.$ac_ext >&5
6405ac_lo=`expr '(' $ac_mid ')' + 1`
6406fi
6407rm -f conftest.$ac_objext conftest.$ac_ext
6408done
6409case $ac_lo in
6410?*) ac_cv_sizeof_void_p=$ac_lo;;
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; }; } ;;
6414esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006415else
6416 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006417 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6418echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6419 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006420else
Martin v. Löwis11437992002-04-12 09:54:03 +00006421 cat >conftest.$ac_ext <<_ACEOF
6422#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00006423#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006424$ac_includes_default
6425long longval () { return (long) (sizeof (void *)); }
6426unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006427#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006428#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00006429#ifdef F77_DUMMY_MAIN
6430# ifdef __cplusplus
6431 extern "C"
6432# endif
6433 int F77_DUMMY_MAIN() { return 1; }
6434#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006435int
6436main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006437{
Martin v. Löwis11437992002-04-12 09:54:03 +00006438
6439 FILE *f = fopen ("conftest.val", "w");
6440 if (! f)
6441 exit (1);
6442 if (((long) (sizeof (void *))) < 0)
6443 {
6444 long i = longval ();
6445 if (i != ((long) (sizeof (void *))))
6446 exit (1);
6447 fprintf (f, "%ld\n", i);
6448 }
6449 else
6450 {
6451 unsigned long i = ulongval ();
6452 if (i != ((long) (sizeof (void *))))
6453 exit (1);
6454 fprintf (f, "%lu\n", i);
6455 }
6456 exit (ferror (f) || fclose (f) != 0);
6457
6458 ;
6459 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006460}
Martin v. Löwis11437992002-04-12 09:54:03 +00006461_ACEOF
6462rm -f conftest$ac_exeext
6463if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6464 (eval $ac_link) 2>&5
6465 ac_status=$?
6466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6467 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6469 (eval $ac_try) 2>&5
6470 ac_status=$?
6471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6472 (exit $ac_status); }; }; then
6473 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006474else
Martin v. Löwis11437992002-04-12 09:54:03 +00006475 echo "$as_me: program exited with status $ac_status" >&5
6476echo "$as_me: failed program was:" >&5
6477cat conftest.$ac_ext >&5
6478( exit $ac_status )
6479{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6480echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6481 { (exit 1); exit 1; }; }
6482fi
Barry Warsawfe33b792003-01-07 22:42:49 +00006483rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006484fi
6485fi
6486rm -f conftest.val
6487else
Guido van Rossumad678af1998-10-02 14:42:15 +00006488 ac_cv_sizeof_void_p=0
6489fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006490fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006491echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6492echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6493cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006494#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006495_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006496
6497
Martin v. Löwis11437992002-04-12 09:54:03 +00006498echo "$as_me:$LINENO: checking for char" >&5
6499echo $ECHO_N "checking for char... $ECHO_C" >&6
6500if test "${ac_cv_type_char+set}" = set; then
6501 echo $ECHO_N "(cached) $ECHO_C" >&6
6502else
6503 cat >conftest.$ac_ext <<_ACEOF
6504#line $LINENO "configure"
6505#include "confdefs.h"
6506$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006507#ifdef F77_DUMMY_MAIN
6508# ifdef __cplusplus
6509 extern "C"
6510# endif
6511 int F77_DUMMY_MAIN() { return 1; }
6512#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006513int
6514main ()
6515{
6516if ((char *) 0)
6517 return 0;
6518if (sizeof (char))
6519 return 0;
6520 ;
6521 return 0;
6522}
6523_ACEOF
6524rm -f conftest.$ac_objext
6525if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6526 (eval $ac_compile) 2>&5
6527 ac_status=$?
6528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6529 (exit $ac_status); } &&
6530 { ac_try='test -s conftest.$ac_objext'
6531 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6532 (eval $ac_try) 2>&5
6533 ac_status=$?
6534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6535 (exit $ac_status); }; }; then
6536 ac_cv_type_char=yes
6537else
6538 echo "$as_me: failed program was:" >&5
6539cat conftest.$ac_ext >&5
6540ac_cv_type_char=no
6541fi
6542rm -f conftest.$ac_objext conftest.$ac_ext
6543fi
6544echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
6545echo "${ECHO_T}$ac_cv_type_char" >&6
6546
6547echo "$as_me:$LINENO: checking size of char" >&5
6548echo $ECHO_N "checking size of char... $ECHO_C" >&6
6549if test "${ac_cv_sizeof_char+set}" = set; then
6550 echo $ECHO_N "(cached) $ECHO_C" >&6
6551else
6552 if test "$ac_cv_type_char" = yes; then
6553 # The cast to unsigned long works around a bug in the HP C Compiler
6554 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6555 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6556 # This bug is HP SR number 8606223364.
6557 if test "$cross_compiling" = yes; then
6558 # Depending upon the size, compute the lo and hi bounds.
6559cat >conftest.$ac_ext <<_ACEOF
6560#line $LINENO "configure"
6561#include "confdefs.h"
6562$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006563#ifdef F77_DUMMY_MAIN
6564# ifdef __cplusplus
6565 extern "C"
6566# endif
6567 int F77_DUMMY_MAIN() { return 1; }
6568#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006569int
6570main ()
6571{
6572static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
6573test_array [0] = 0
6574
6575 ;
6576 return 0;
6577}
6578_ACEOF
6579rm -f conftest.$ac_objext
6580if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6581 (eval $ac_compile) 2>&5
6582 ac_status=$?
6583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6584 (exit $ac_status); } &&
6585 { ac_try='test -s conftest.$ac_objext'
6586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6587 (eval $ac_try) 2>&5
6588 ac_status=$?
6589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6590 (exit $ac_status); }; }; then
6591 ac_lo=0 ac_mid=0
6592 while :; do
6593 cat >conftest.$ac_ext <<_ACEOF
6594#line $LINENO "configure"
6595#include "confdefs.h"
6596$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006597#ifdef F77_DUMMY_MAIN
6598# ifdef __cplusplus
6599 extern "C"
6600# endif
6601 int F77_DUMMY_MAIN() { return 1; }
6602#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006603int
6604main ()
6605{
6606static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6607test_array [0] = 0
6608
6609 ;
6610 return 0;
6611}
6612_ACEOF
6613rm -f conftest.$ac_objext
6614if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6615 (eval $ac_compile) 2>&5
6616 ac_status=$?
6617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6618 (exit $ac_status); } &&
6619 { ac_try='test -s conftest.$ac_objext'
6620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6621 (eval $ac_try) 2>&5
6622 ac_status=$?
6623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6624 (exit $ac_status); }; }; then
6625 ac_hi=$ac_mid; break
6626else
6627 echo "$as_me: failed program was:" >&5
6628cat conftest.$ac_ext >&5
6629ac_lo=`expr $ac_mid + 1`
6630 if test $ac_lo -le $ac_mid; then
6631 ac_lo= ac_hi=
6632 break
6633 fi
6634 ac_mid=`expr 2 '*' $ac_mid + 1`
6635fi
6636rm -f conftest.$ac_objext conftest.$ac_ext
6637 done
6638else
6639 echo "$as_me: failed program was:" >&5
6640cat conftest.$ac_ext >&5
6641cat >conftest.$ac_ext <<_ACEOF
6642#line $LINENO "configure"
6643#include "confdefs.h"
6644$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006645#ifdef F77_DUMMY_MAIN
6646# ifdef __cplusplus
6647 extern "C"
6648# endif
6649 int F77_DUMMY_MAIN() { return 1; }
6650#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006651int
6652main ()
6653{
6654static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
6655test_array [0] = 0
6656
6657 ;
6658 return 0;
6659}
6660_ACEOF
6661rm -f conftest.$ac_objext
6662if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6663 (eval $ac_compile) 2>&5
6664 ac_status=$?
6665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6666 (exit $ac_status); } &&
6667 { ac_try='test -s conftest.$ac_objext'
6668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6669 (eval $ac_try) 2>&5
6670 ac_status=$?
6671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6672 (exit $ac_status); }; }; then
6673 ac_hi=-1 ac_mid=-1
6674 while :; do
6675 cat >conftest.$ac_ext <<_ACEOF
6676#line $LINENO "configure"
6677#include "confdefs.h"
6678$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006679#ifdef F77_DUMMY_MAIN
6680# ifdef __cplusplus
6681 extern "C"
6682# endif
6683 int F77_DUMMY_MAIN() { return 1; }
6684#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006685int
6686main ()
6687{
6688static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
6689test_array [0] = 0
6690
6691 ;
6692 return 0;
6693}
6694_ACEOF
6695rm -f conftest.$ac_objext
6696if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6697 (eval $ac_compile) 2>&5
6698 ac_status=$?
6699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6700 (exit $ac_status); } &&
6701 { ac_try='test -s conftest.$ac_objext'
6702 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6703 (eval $ac_try) 2>&5
6704 ac_status=$?
6705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6706 (exit $ac_status); }; }; then
6707 ac_lo=$ac_mid; break
6708else
6709 echo "$as_me: failed program was:" >&5
6710cat conftest.$ac_ext >&5
6711ac_hi=`expr '(' $ac_mid ')' - 1`
6712 if test $ac_mid -le $ac_hi; then
6713 ac_lo= ac_hi=
6714 break
6715 fi
6716 ac_mid=`expr 2 '*' $ac_mid`
6717fi
6718rm -f conftest.$ac_objext conftest.$ac_ext
6719 done
6720else
6721 echo "$as_me: failed program was:" >&5
6722cat conftest.$ac_ext >&5
6723ac_lo= ac_hi=
6724fi
6725rm -f conftest.$ac_objext conftest.$ac_ext
6726fi
6727rm -f conftest.$ac_objext conftest.$ac_ext
6728# Binary search between lo and hi bounds.
6729while test "x$ac_lo" != "x$ac_hi"; do
6730 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6731 cat >conftest.$ac_ext <<_ACEOF
6732#line $LINENO "configure"
6733#include "confdefs.h"
6734$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006735#ifdef F77_DUMMY_MAIN
6736# ifdef __cplusplus
6737 extern "C"
6738# endif
6739 int F77_DUMMY_MAIN() { return 1; }
6740#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006741int
6742main ()
6743{
6744static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6745test_array [0] = 0
6746
6747 ;
6748 return 0;
6749}
6750_ACEOF
6751rm -f conftest.$ac_objext
6752if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6753 (eval $ac_compile) 2>&5
6754 ac_status=$?
6755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6756 (exit $ac_status); } &&
6757 { ac_try='test -s conftest.$ac_objext'
6758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6759 (eval $ac_try) 2>&5
6760 ac_status=$?
6761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6762 (exit $ac_status); }; }; then
6763 ac_hi=$ac_mid
6764else
6765 echo "$as_me: failed program was:" >&5
6766cat conftest.$ac_ext >&5
6767ac_lo=`expr '(' $ac_mid ')' + 1`
6768fi
6769rm -f conftest.$ac_objext conftest.$ac_ext
6770done
6771case $ac_lo in
6772?*) ac_cv_sizeof_char=$ac_lo;;
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; }; } ;;
6776esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006777else
6778 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006779 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6780echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6781 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006782else
Martin v. Löwis11437992002-04-12 09:54:03 +00006783 cat >conftest.$ac_ext <<_ACEOF
6784#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006785#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006786$ac_includes_default
6787long longval () { return (long) (sizeof (char)); }
6788unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006789#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006790#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00006791#ifdef F77_DUMMY_MAIN
6792# ifdef __cplusplus
6793 extern "C"
6794# endif
6795 int F77_DUMMY_MAIN() { return 1; }
6796#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006797int
6798main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006799{
Martin v. Löwis11437992002-04-12 09:54:03 +00006800
6801 FILE *f = fopen ("conftest.val", "w");
6802 if (! f)
6803 exit (1);
6804 if (((long) (sizeof (char))) < 0)
6805 {
6806 long i = longval ();
6807 if (i != ((long) (sizeof (char))))
6808 exit (1);
6809 fprintf (f, "%ld\n", i);
6810 }
6811 else
6812 {
6813 unsigned long i = ulongval ();
6814 if (i != ((long) (sizeof (char))))
6815 exit (1);
6816 fprintf (f, "%lu\n", i);
6817 }
6818 exit (ferror (f) || fclose (f) != 0);
6819
6820 ;
6821 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006822}
Martin v. Löwis11437992002-04-12 09:54:03 +00006823_ACEOF
6824rm -f conftest$ac_exeext
6825if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6826 (eval $ac_link) 2>&5
6827 ac_status=$?
6828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6829 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6831 (eval $ac_try) 2>&5
6832 ac_status=$?
6833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6834 (exit $ac_status); }; }; then
6835 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006836else
Martin v. Löwis11437992002-04-12 09:54:03 +00006837 echo "$as_me: program exited with status $ac_status" >&5
6838echo "$as_me: failed program was:" >&5
6839cat conftest.$ac_ext >&5
6840( exit $ac_status )
6841{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6842echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6843 { (exit 1); exit 1; }; }
6844fi
Barry Warsawfe33b792003-01-07 22:42:49 +00006845rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006846fi
6847fi
6848rm -f conftest.val
6849else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006850 ac_cv_sizeof_char=0
6851fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006852fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006853echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6854echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6855cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006856#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006857_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006858
6859
Martin v. Löwis11437992002-04-12 09:54:03 +00006860echo "$as_me:$LINENO: checking for short" >&5
6861echo $ECHO_N "checking for short... $ECHO_C" >&6
6862if test "${ac_cv_type_short+set}" = set; then
6863 echo $ECHO_N "(cached) $ECHO_C" >&6
6864else
6865 cat >conftest.$ac_ext <<_ACEOF
6866#line $LINENO "configure"
6867#include "confdefs.h"
6868$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006869#ifdef F77_DUMMY_MAIN
6870# ifdef __cplusplus
6871 extern "C"
6872# endif
6873 int F77_DUMMY_MAIN() { return 1; }
6874#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006875int
6876main ()
6877{
6878if ((short *) 0)
6879 return 0;
6880if (sizeof (short))
6881 return 0;
6882 ;
6883 return 0;
6884}
6885_ACEOF
6886rm -f conftest.$ac_objext
6887if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6888 (eval $ac_compile) 2>&5
6889 ac_status=$?
6890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6891 (exit $ac_status); } &&
6892 { ac_try='test -s conftest.$ac_objext'
6893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6894 (eval $ac_try) 2>&5
6895 ac_status=$?
6896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6897 (exit $ac_status); }; }; then
6898 ac_cv_type_short=yes
6899else
6900 echo "$as_me: failed program was:" >&5
6901cat conftest.$ac_ext >&5
6902ac_cv_type_short=no
6903fi
6904rm -f conftest.$ac_objext conftest.$ac_ext
6905fi
6906echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6907echo "${ECHO_T}$ac_cv_type_short" >&6
6908
6909echo "$as_me:$LINENO: checking size of short" >&5
6910echo $ECHO_N "checking size of short... $ECHO_C" >&6
6911if test "${ac_cv_sizeof_short+set}" = set; then
6912 echo $ECHO_N "(cached) $ECHO_C" >&6
6913else
6914 if test "$ac_cv_type_short" = yes; then
6915 # The cast to unsigned long works around a bug in the HP C Compiler
6916 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6917 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6918 # This bug is HP SR number 8606223364.
6919 if test "$cross_compiling" = yes; then
6920 # Depending upon the size, compute the lo and hi bounds.
6921cat >conftest.$ac_ext <<_ACEOF
6922#line $LINENO "configure"
6923#include "confdefs.h"
6924$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006925#ifdef F77_DUMMY_MAIN
6926# ifdef __cplusplus
6927 extern "C"
6928# endif
6929 int F77_DUMMY_MAIN() { return 1; }
6930#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006931int
6932main ()
6933{
6934static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6935test_array [0] = 0
6936
6937 ;
6938 return 0;
6939}
6940_ACEOF
6941rm -f conftest.$ac_objext
6942if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6943 (eval $ac_compile) 2>&5
6944 ac_status=$?
6945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6946 (exit $ac_status); } &&
6947 { ac_try='test -s conftest.$ac_objext'
6948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6949 (eval $ac_try) 2>&5
6950 ac_status=$?
6951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6952 (exit $ac_status); }; }; then
6953 ac_lo=0 ac_mid=0
6954 while :; do
6955 cat >conftest.$ac_ext <<_ACEOF
6956#line $LINENO "configure"
6957#include "confdefs.h"
6958$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006959#ifdef F77_DUMMY_MAIN
6960# ifdef __cplusplus
6961 extern "C"
6962# endif
6963 int F77_DUMMY_MAIN() { return 1; }
6964#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006965int
6966main ()
6967{
6968static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6969test_array [0] = 0
6970
6971 ;
6972 return 0;
6973}
6974_ACEOF
6975rm -f conftest.$ac_objext
6976if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6977 (eval $ac_compile) 2>&5
6978 ac_status=$?
6979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6980 (exit $ac_status); } &&
6981 { ac_try='test -s conftest.$ac_objext'
6982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6983 (eval $ac_try) 2>&5
6984 ac_status=$?
6985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6986 (exit $ac_status); }; }; then
6987 ac_hi=$ac_mid; break
6988else
6989 echo "$as_me: failed program was:" >&5
6990cat conftest.$ac_ext >&5
6991ac_lo=`expr $ac_mid + 1`
6992 if test $ac_lo -le $ac_mid; then
6993 ac_lo= ac_hi=
6994 break
6995 fi
6996 ac_mid=`expr 2 '*' $ac_mid + 1`
6997fi
6998rm -f conftest.$ac_objext conftest.$ac_ext
6999 done
7000else
7001 echo "$as_me: failed program was:" >&5
7002cat conftest.$ac_ext >&5
7003cat >conftest.$ac_ext <<_ACEOF
7004#line $LINENO "configure"
7005#include "confdefs.h"
7006$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007007#ifdef F77_DUMMY_MAIN
7008# ifdef __cplusplus
7009 extern "C"
7010# endif
7011 int F77_DUMMY_MAIN() { return 1; }
7012#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007013int
7014main ()
7015{
7016static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
7017test_array [0] = 0
7018
7019 ;
7020 return 0;
7021}
7022_ACEOF
7023rm -f conftest.$ac_objext
7024if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7025 (eval $ac_compile) 2>&5
7026 ac_status=$?
7027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7028 (exit $ac_status); } &&
7029 { ac_try='test -s conftest.$ac_objext'
7030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7031 (eval $ac_try) 2>&5
7032 ac_status=$?
7033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7034 (exit $ac_status); }; }; then
7035 ac_hi=-1 ac_mid=-1
7036 while :; do
7037 cat >conftest.$ac_ext <<_ACEOF
7038#line $LINENO "configure"
7039#include "confdefs.h"
7040$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007041#ifdef F77_DUMMY_MAIN
7042# ifdef __cplusplus
7043 extern "C"
7044# endif
7045 int F77_DUMMY_MAIN() { return 1; }
7046#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007047int
7048main ()
7049{
7050static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
7051test_array [0] = 0
7052
7053 ;
7054 return 0;
7055}
7056_ACEOF
7057rm -f conftest.$ac_objext
7058if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7059 (eval $ac_compile) 2>&5
7060 ac_status=$?
7061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7062 (exit $ac_status); } &&
7063 { ac_try='test -s conftest.$ac_objext'
7064 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7065 (eval $ac_try) 2>&5
7066 ac_status=$?
7067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7068 (exit $ac_status); }; }; then
7069 ac_lo=$ac_mid; break
7070else
7071 echo "$as_me: failed program was:" >&5
7072cat conftest.$ac_ext >&5
7073ac_hi=`expr '(' $ac_mid ')' - 1`
7074 if test $ac_mid -le $ac_hi; then
7075 ac_lo= ac_hi=
7076 break
7077 fi
7078 ac_mid=`expr 2 '*' $ac_mid`
7079fi
7080rm -f conftest.$ac_objext conftest.$ac_ext
7081 done
7082else
7083 echo "$as_me: failed program was:" >&5
7084cat conftest.$ac_ext >&5
7085ac_lo= ac_hi=
7086fi
7087rm -f conftest.$ac_objext conftest.$ac_ext
7088fi
7089rm -f conftest.$ac_objext conftest.$ac_ext
7090# Binary search between lo and hi bounds.
7091while test "x$ac_lo" != "x$ac_hi"; do
7092 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7093 cat >conftest.$ac_ext <<_ACEOF
7094#line $LINENO "configure"
7095#include "confdefs.h"
7096$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007097#ifdef F77_DUMMY_MAIN
7098# ifdef __cplusplus
7099 extern "C"
7100# endif
7101 int F77_DUMMY_MAIN() { return 1; }
7102#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007103int
7104main ()
7105{
7106static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7107test_array [0] = 0
7108
7109 ;
7110 return 0;
7111}
7112_ACEOF
7113rm -f conftest.$ac_objext
7114if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7115 (eval $ac_compile) 2>&5
7116 ac_status=$?
7117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7118 (exit $ac_status); } &&
7119 { ac_try='test -s conftest.$ac_objext'
7120 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7121 (eval $ac_try) 2>&5
7122 ac_status=$?
7123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7124 (exit $ac_status); }; }; then
7125 ac_hi=$ac_mid
7126else
7127 echo "$as_me: failed program was:" >&5
7128cat conftest.$ac_ext >&5
7129ac_lo=`expr '(' $ac_mid ')' + 1`
7130fi
7131rm -f conftest.$ac_objext conftest.$ac_ext
7132done
7133case $ac_lo in
7134?*) ac_cv_sizeof_short=$ac_lo;;
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; }; } ;;
7138esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007139else
7140 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007141 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7142echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7143 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007144else
Martin v. Löwis11437992002-04-12 09:54:03 +00007145 cat >conftest.$ac_ext <<_ACEOF
7146#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007147#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007148$ac_includes_default
7149long longval () { return (long) (sizeof (short)); }
7150unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007151#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007152#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00007153#ifdef F77_DUMMY_MAIN
7154# ifdef __cplusplus
7155 extern "C"
7156# endif
7157 int F77_DUMMY_MAIN() { return 1; }
7158#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007159int
7160main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007161{
Martin v. Löwis11437992002-04-12 09:54:03 +00007162
7163 FILE *f = fopen ("conftest.val", "w");
7164 if (! f)
7165 exit (1);
7166 if (((long) (sizeof (short))) < 0)
7167 {
7168 long i = longval ();
7169 if (i != ((long) (sizeof (short))))
7170 exit (1);
7171 fprintf (f, "%ld\n", i);
7172 }
7173 else
7174 {
7175 unsigned long i = ulongval ();
7176 if (i != ((long) (sizeof (short))))
7177 exit (1);
7178 fprintf (f, "%lu\n", i);
7179 }
7180 exit (ferror (f) || fclose (f) != 0);
7181
7182 ;
7183 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007184}
Martin v. Löwis11437992002-04-12 09:54:03 +00007185_ACEOF
7186rm -f conftest$ac_exeext
7187if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7188 (eval $ac_link) 2>&5
7189 ac_status=$?
7190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7191 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7192 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7193 (eval $ac_try) 2>&5
7194 ac_status=$?
7195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7196 (exit $ac_status); }; }; then
7197 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007198else
Martin v. Löwis11437992002-04-12 09:54:03 +00007199 echo "$as_me: program exited with status $ac_status" >&5
7200echo "$as_me: failed program was:" >&5
7201cat conftest.$ac_ext >&5
7202( exit $ac_status )
7203{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
7204echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
7205 { (exit 1); exit 1; }; }
7206fi
Barry Warsawfe33b792003-01-07 22:42:49 +00007207rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007208fi
7209fi
7210rm -f conftest.val
7211else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007212 ac_cv_sizeof_short=0
7213fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007214fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007215echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7216echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7217cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007218#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007219_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007220
7221
Martin v. Löwis11437992002-04-12 09:54:03 +00007222echo "$as_me:$LINENO: checking for float" >&5
7223echo $ECHO_N "checking for float... $ECHO_C" >&6
7224if test "${ac_cv_type_float+set}" = set; then
7225 echo $ECHO_N "(cached) $ECHO_C" >&6
7226else
7227 cat >conftest.$ac_ext <<_ACEOF
7228#line $LINENO "configure"
7229#include "confdefs.h"
7230$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007231#ifdef F77_DUMMY_MAIN
7232# ifdef __cplusplus
7233 extern "C"
7234# endif
7235 int F77_DUMMY_MAIN() { return 1; }
7236#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007237int
7238main ()
7239{
7240if ((float *) 0)
7241 return 0;
7242if (sizeof (float))
7243 return 0;
7244 ;
7245 return 0;
7246}
7247_ACEOF
7248rm -f conftest.$ac_objext
7249if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7250 (eval $ac_compile) 2>&5
7251 ac_status=$?
7252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7253 (exit $ac_status); } &&
7254 { ac_try='test -s conftest.$ac_objext'
7255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7256 (eval $ac_try) 2>&5
7257 ac_status=$?
7258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7259 (exit $ac_status); }; }; then
7260 ac_cv_type_float=yes
7261else
7262 echo "$as_me: failed program was:" >&5
7263cat conftest.$ac_ext >&5
7264ac_cv_type_float=no
7265fi
7266rm -f conftest.$ac_objext conftest.$ac_ext
7267fi
7268echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7269echo "${ECHO_T}$ac_cv_type_float" >&6
7270
7271echo "$as_me:$LINENO: checking size of float" >&5
7272echo $ECHO_N "checking size of float... $ECHO_C" >&6
7273if test "${ac_cv_sizeof_float+set}" = set; then
7274 echo $ECHO_N "(cached) $ECHO_C" >&6
7275else
7276 if test "$ac_cv_type_float" = yes; then
7277 # The cast to unsigned long works around a bug in the HP C Compiler
7278 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7279 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7280 # This bug is HP SR number 8606223364.
7281 if test "$cross_compiling" = yes; then
7282 # Depending upon the size, compute the lo and hi bounds.
7283cat >conftest.$ac_ext <<_ACEOF
7284#line $LINENO "configure"
7285#include "confdefs.h"
7286$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007287#ifdef F77_DUMMY_MAIN
7288# ifdef __cplusplus
7289 extern "C"
7290# endif
7291 int F77_DUMMY_MAIN() { return 1; }
7292#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007293int
7294main ()
7295{
7296static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7297test_array [0] = 0
7298
7299 ;
7300 return 0;
7301}
7302_ACEOF
7303rm -f conftest.$ac_objext
7304if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7305 (eval $ac_compile) 2>&5
7306 ac_status=$?
7307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7308 (exit $ac_status); } &&
7309 { ac_try='test -s conftest.$ac_objext'
7310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7311 (eval $ac_try) 2>&5
7312 ac_status=$?
7313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7314 (exit $ac_status); }; }; then
7315 ac_lo=0 ac_mid=0
7316 while :; do
7317 cat >conftest.$ac_ext <<_ACEOF
7318#line $LINENO "configure"
7319#include "confdefs.h"
7320$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007321#ifdef F77_DUMMY_MAIN
7322# ifdef __cplusplus
7323 extern "C"
7324# endif
7325 int F77_DUMMY_MAIN() { return 1; }
7326#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007327int
7328main ()
7329{
7330static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7331test_array [0] = 0
7332
7333 ;
7334 return 0;
7335}
7336_ACEOF
7337rm -f conftest.$ac_objext
7338if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7339 (eval $ac_compile) 2>&5
7340 ac_status=$?
7341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7342 (exit $ac_status); } &&
7343 { ac_try='test -s conftest.$ac_objext'
7344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7345 (eval $ac_try) 2>&5
7346 ac_status=$?
7347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7348 (exit $ac_status); }; }; then
7349 ac_hi=$ac_mid; break
7350else
7351 echo "$as_me: failed program was:" >&5
7352cat conftest.$ac_ext >&5
7353ac_lo=`expr $ac_mid + 1`
7354 if test $ac_lo -le $ac_mid; then
7355 ac_lo= ac_hi=
7356 break
7357 fi
7358 ac_mid=`expr 2 '*' $ac_mid + 1`
7359fi
7360rm -f conftest.$ac_objext conftest.$ac_ext
7361 done
7362else
7363 echo "$as_me: failed program was:" >&5
7364cat conftest.$ac_ext >&5
7365cat >conftest.$ac_ext <<_ACEOF
7366#line $LINENO "configure"
7367#include "confdefs.h"
7368$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007369#ifdef F77_DUMMY_MAIN
7370# ifdef __cplusplus
7371 extern "C"
7372# endif
7373 int F77_DUMMY_MAIN() { return 1; }
7374#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007375int
7376main ()
7377{
7378static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7379test_array [0] = 0
7380
7381 ;
7382 return 0;
7383}
7384_ACEOF
7385rm -f conftest.$ac_objext
7386if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7387 (eval $ac_compile) 2>&5
7388 ac_status=$?
7389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7390 (exit $ac_status); } &&
7391 { ac_try='test -s conftest.$ac_objext'
7392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7393 (eval $ac_try) 2>&5
7394 ac_status=$?
7395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7396 (exit $ac_status); }; }; then
7397 ac_hi=-1 ac_mid=-1
7398 while :; do
7399 cat >conftest.$ac_ext <<_ACEOF
7400#line $LINENO "configure"
7401#include "confdefs.h"
7402$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007403#ifdef F77_DUMMY_MAIN
7404# ifdef __cplusplus
7405 extern "C"
7406# endif
7407 int F77_DUMMY_MAIN() { return 1; }
7408#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007409int
7410main ()
7411{
7412static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7413test_array [0] = 0
7414
7415 ;
7416 return 0;
7417}
7418_ACEOF
7419rm -f conftest.$ac_objext
7420if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7421 (eval $ac_compile) 2>&5
7422 ac_status=$?
7423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7424 (exit $ac_status); } &&
7425 { ac_try='test -s conftest.$ac_objext'
7426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7427 (eval $ac_try) 2>&5
7428 ac_status=$?
7429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7430 (exit $ac_status); }; }; then
7431 ac_lo=$ac_mid; break
7432else
7433 echo "$as_me: failed program was:" >&5
7434cat conftest.$ac_ext >&5
7435ac_hi=`expr '(' $ac_mid ')' - 1`
7436 if test $ac_mid -le $ac_hi; then
7437 ac_lo= ac_hi=
7438 break
7439 fi
7440 ac_mid=`expr 2 '*' $ac_mid`
7441fi
7442rm -f conftest.$ac_objext conftest.$ac_ext
7443 done
7444else
7445 echo "$as_me: failed program was:" >&5
7446cat conftest.$ac_ext >&5
7447ac_lo= ac_hi=
7448fi
7449rm -f conftest.$ac_objext conftest.$ac_ext
7450fi
7451rm -f conftest.$ac_objext conftest.$ac_ext
7452# Binary search between lo and hi bounds.
7453while test "x$ac_lo" != "x$ac_hi"; do
7454 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7455 cat >conftest.$ac_ext <<_ACEOF
7456#line $LINENO "configure"
7457#include "confdefs.h"
7458$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007459#ifdef F77_DUMMY_MAIN
7460# ifdef __cplusplus
7461 extern "C"
7462# endif
7463 int F77_DUMMY_MAIN() { return 1; }
7464#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007465int
7466main ()
7467{
7468static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7469test_array [0] = 0
7470
7471 ;
7472 return 0;
7473}
7474_ACEOF
7475rm -f conftest.$ac_objext
7476if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7477 (eval $ac_compile) 2>&5
7478 ac_status=$?
7479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7480 (exit $ac_status); } &&
7481 { ac_try='test -s conftest.$ac_objext'
7482 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7483 (eval $ac_try) 2>&5
7484 ac_status=$?
7485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7486 (exit $ac_status); }; }; then
7487 ac_hi=$ac_mid
7488else
7489 echo "$as_me: failed program was:" >&5
7490cat conftest.$ac_ext >&5
7491ac_lo=`expr '(' $ac_mid ')' + 1`
7492fi
7493rm -f conftest.$ac_objext conftest.$ac_ext
7494done
7495case $ac_lo in
7496?*) ac_cv_sizeof_float=$ac_lo;;
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; }; } ;;
7500esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007501else
7502 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007503 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7504echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7505 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007506else
Martin v. Löwis11437992002-04-12 09:54:03 +00007507 cat >conftest.$ac_ext <<_ACEOF
7508#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007509#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007510$ac_includes_default
7511long longval () { return (long) (sizeof (float)); }
7512unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007513#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007514#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00007515#ifdef F77_DUMMY_MAIN
7516# ifdef __cplusplus
7517 extern "C"
7518# endif
7519 int F77_DUMMY_MAIN() { return 1; }
7520#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007521int
7522main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007523{
Martin v. Löwis11437992002-04-12 09:54:03 +00007524
7525 FILE *f = fopen ("conftest.val", "w");
7526 if (! f)
7527 exit (1);
7528 if (((long) (sizeof (float))) < 0)
7529 {
7530 long i = longval ();
7531 if (i != ((long) (sizeof (float))))
7532 exit (1);
7533 fprintf (f, "%ld\n", i);
7534 }
7535 else
7536 {
7537 unsigned long i = ulongval ();
7538 if (i != ((long) (sizeof (float))))
7539 exit (1);
7540 fprintf (f, "%lu\n", i);
7541 }
7542 exit (ferror (f) || fclose (f) != 0);
7543
7544 ;
7545 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007546}
Martin v. Löwis11437992002-04-12 09:54:03 +00007547_ACEOF
7548rm -f conftest$ac_exeext
7549if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7550 (eval $ac_link) 2>&5
7551 ac_status=$?
7552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7553 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7554 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7555 (eval $ac_try) 2>&5
7556 ac_status=$?
7557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7558 (exit $ac_status); }; }; then
7559 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007560else
Martin v. Löwis11437992002-04-12 09:54:03 +00007561 echo "$as_me: program exited with status $ac_status" >&5
7562echo "$as_me: failed program was:" >&5
7563cat conftest.$ac_ext >&5
7564( exit $ac_status )
7565{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7566echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7567 { (exit 1); exit 1; }; }
7568fi
Barry Warsawfe33b792003-01-07 22:42:49 +00007569rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007570fi
7571fi
7572rm -f conftest.val
7573else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007574 ac_cv_sizeof_float=0
7575fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007576fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007577echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7578echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7579cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007580#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007581_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007582
7583
Martin v. Löwis11437992002-04-12 09:54:03 +00007584echo "$as_me:$LINENO: checking for double" >&5
7585echo $ECHO_N "checking for double... $ECHO_C" >&6
7586if test "${ac_cv_type_double+set}" = set; then
7587 echo $ECHO_N "(cached) $ECHO_C" >&6
7588else
7589 cat >conftest.$ac_ext <<_ACEOF
7590#line $LINENO "configure"
7591#include "confdefs.h"
7592$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007593#ifdef F77_DUMMY_MAIN
7594# ifdef __cplusplus
7595 extern "C"
7596# endif
7597 int F77_DUMMY_MAIN() { return 1; }
7598#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007599int
7600main ()
7601{
7602if ((double *) 0)
7603 return 0;
7604if (sizeof (double))
7605 return 0;
7606 ;
7607 return 0;
7608}
7609_ACEOF
7610rm -f conftest.$ac_objext
7611if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7612 (eval $ac_compile) 2>&5
7613 ac_status=$?
7614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7615 (exit $ac_status); } &&
7616 { ac_try='test -s conftest.$ac_objext'
7617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7618 (eval $ac_try) 2>&5
7619 ac_status=$?
7620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7621 (exit $ac_status); }; }; then
7622 ac_cv_type_double=yes
7623else
7624 echo "$as_me: failed program was:" >&5
7625cat conftest.$ac_ext >&5
7626ac_cv_type_double=no
7627fi
7628rm -f conftest.$ac_objext conftest.$ac_ext
7629fi
7630echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7631echo "${ECHO_T}$ac_cv_type_double" >&6
7632
7633echo "$as_me:$LINENO: checking size of double" >&5
7634echo $ECHO_N "checking size of double... $ECHO_C" >&6
7635if test "${ac_cv_sizeof_double+set}" = set; then
7636 echo $ECHO_N "(cached) $ECHO_C" >&6
7637else
7638 if test "$ac_cv_type_double" = yes; then
7639 # The cast to unsigned long works around a bug in the HP C Compiler
7640 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7641 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7642 # This bug is HP SR number 8606223364.
7643 if test "$cross_compiling" = yes; then
7644 # Depending upon the size, compute the lo and hi bounds.
7645cat >conftest.$ac_ext <<_ACEOF
7646#line $LINENO "configure"
7647#include "confdefs.h"
7648$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007649#ifdef F77_DUMMY_MAIN
7650# ifdef __cplusplus
7651 extern "C"
7652# endif
7653 int F77_DUMMY_MAIN() { return 1; }
7654#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007655int
7656main ()
7657{
7658static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7659test_array [0] = 0
7660
7661 ;
7662 return 0;
7663}
7664_ACEOF
7665rm -f conftest.$ac_objext
7666if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7667 (eval $ac_compile) 2>&5
7668 ac_status=$?
7669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7670 (exit $ac_status); } &&
7671 { ac_try='test -s conftest.$ac_objext'
7672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7673 (eval $ac_try) 2>&5
7674 ac_status=$?
7675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7676 (exit $ac_status); }; }; then
7677 ac_lo=0 ac_mid=0
7678 while :; do
7679 cat >conftest.$ac_ext <<_ACEOF
7680#line $LINENO "configure"
7681#include "confdefs.h"
7682$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007683#ifdef F77_DUMMY_MAIN
7684# ifdef __cplusplus
7685 extern "C"
7686# endif
7687 int F77_DUMMY_MAIN() { return 1; }
7688#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007689int
7690main ()
7691{
7692static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7693test_array [0] = 0
7694
7695 ;
7696 return 0;
7697}
7698_ACEOF
7699rm -f conftest.$ac_objext
7700if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7701 (eval $ac_compile) 2>&5
7702 ac_status=$?
7703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7704 (exit $ac_status); } &&
7705 { ac_try='test -s conftest.$ac_objext'
7706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7707 (eval $ac_try) 2>&5
7708 ac_status=$?
7709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7710 (exit $ac_status); }; }; then
7711 ac_hi=$ac_mid; break
7712else
7713 echo "$as_me: failed program was:" >&5
7714cat conftest.$ac_ext >&5
7715ac_lo=`expr $ac_mid + 1`
7716 if test $ac_lo -le $ac_mid; then
7717 ac_lo= ac_hi=
7718 break
7719 fi
7720 ac_mid=`expr 2 '*' $ac_mid + 1`
7721fi
7722rm -f conftest.$ac_objext conftest.$ac_ext
7723 done
7724else
7725 echo "$as_me: failed program was:" >&5
7726cat conftest.$ac_ext >&5
7727cat >conftest.$ac_ext <<_ACEOF
7728#line $LINENO "configure"
7729#include "confdefs.h"
7730$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007731#ifdef F77_DUMMY_MAIN
7732# ifdef __cplusplus
7733 extern "C"
7734# endif
7735 int F77_DUMMY_MAIN() { return 1; }
7736#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007737int
7738main ()
7739{
7740static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7741test_array [0] = 0
7742
7743 ;
7744 return 0;
7745}
7746_ACEOF
7747rm -f conftest.$ac_objext
7748if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7749 (eval $ac_compile) 2>&5
7750 ac_status=$?
7751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7752 (exit $ac_status); } &&
7753 { ac_try='test -s conftest.$ac_objext'
7754 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7755 (eval $ac_try) 2>&5
7756 ac_status=$?
7757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7758 (exit $ac_status); }; }; then
7759 ac_hi=-1 ac_mid=-1
7760 while :; do
7761 cat >conftest.$ac_ext <<_ACEOF
7762#line $LINENO "configure"
7763#include "confdefs.h"
7764$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007765#ifdef F77_DUMMY_MAIN
7766# ifdef __cplusplus
7767 extern "C"
7768# endif
7769 int F77_DUMMY_MAIN() { return 1; }
7770#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007771int
7772main ()
7773{
7774static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7775test_array [0] = 0
7776
7777 ;
7778 return 0;
7779}
7780_ACEOF
7781rm -f conftest.$ac_objext
7782if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7783 (eval $ac_compile) 2>&5
7784 ac_status=$?
7785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7786 (exit $ac_status); } &&
7787 { ac_try='test -s conftest.$ac_objext'
7788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7789 (eval $ac_try) 2>&5
7790 ac_status=$?
7791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7792 (exit $ac_status); }; }; then
7793 ac_lo=$ac_mid; break
7794else
7795 echo "$as_me: failed program was:" >&5
7796cat conftest.$ac_ext >&5
7797ac_hi=`expr '(' $ac_mid ')' - 1`
7798 if test $ac_mid -le $ac_hi; then
7799 ac_lo= ac_hi=
7800 break
7801 fi
7802 ac_mid=`expr 2 '*' $ac_mid`
7803fi
7804rm -f conftest.$ac_objext conftest.$ac_ext
7805 done
7806else
7807 echo "$as_me: failed program was:" >&5
7808cat conftest.$ac_ext >&5
7809ac_lo= ac_hi=
7810fi
7811rm -f conftest.$ac_objext conftest.$ac_ext
7812fi
7813rm -f conftest.$ac_objext conftest.$ac_ext
7814# Binary search between lo and hi bounds.
7815while test "x$ac_lo" != "x$ac_hi"; do
7816 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7817 cat >conftest.$ac_ext <<_ACEOF
7818#line $LINENO "configure"
7819#include "confdefs.h"
7820$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007821#ifdef F77_DUMMY_MAIN
7822# ifdef __cplusplus
7823 extern "C"
7824# endif
7825 int F77_DUMMY_MAIN() { return 1; }
7826#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007827int
7828main ()
7829{
7830static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7831test_array [0] = 0
7832
7833 ;
7834 return 0;
7835}
7836_ACEOF
7837rm -f conftest.$ac_objext
7838if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7839 (eval $ac_compile) 2>&5
7840 ac_status=$?
7841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7842 (exit $ac_status); } &&
7843 { ac_try='test -s conftest.$ac_objext'
7844 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7845 (eval $ac_try) 2>&5
7846 ac_status=$?
7847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7848 (exit $ac_status); }; }; then
7849 ac_hi=$ac_mid
7850else
7851 echo "$as_me: failed program was:" >&5
7852cat conftest.$ac_ext >&5
7853ac_lo=`expr '(' $ac_mid ')' + 1`
7854fi
7855rm -f conftest.$ac_objext conftest.$ac_ext
7856done
7857case $ac_lo in
7858?*) ac_cv_sizeof_double=$ac_lo;;
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; }; } ;;
7862esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007863else
7864 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007865 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7866echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7867 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007868else
Martin v. Löwis11437992002-04-12 09:54:03 +00007869 cat >conftest.$ac_ext <<_ACEOF
7870#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007871#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007872$ac_includes_default
7873long longval () { return (long) (sizeof (double)); }
7874unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007875#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007876#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00007877#ifdef F77_DUMMY_MAIN
7878# ifdef __cplusplus
7879 extern "C"
7880# endif
7881 int F77_DUMMY_MAIN() { return 1; }
7882#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007883int
7884main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007885{
Martin v. Löwis11437992002-04-12 09:54:03 +00007886
7887 FILE *f = fopen ("conftest.val", "w");
7888 if (! f)
7889 exit (1);
7890 if (((long) (sizeof (double))) < 0)
7891 {
7892 long i = longval ();
7893 if (i != ((long) (sizeof (double))))
7894 exit (1);
7895 fprintf (f, "%ld\n", i);
7896 }
7897 else
7898 {
7899 unsigned long i = ulongval ();
7900 if (i != ((long) (sizeof (double))))
7901 exit (1);
7902 fprintf (f, "%lu\n", i);
7903 }
7904 exit (ferror (f) || fclose (f) != 0);
7905
7906 ;
7907 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007908}
Martin v. Löwis11437992002-04-12 09:54:03 +00007909_ACEOF
7910rm -f conftest$ac_exeext
7911if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7912 (eval $ac_link) 2>&5
7913 ac_status=$?
7914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7915 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7916 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7917 (eval $ac_try) 2>&5
7918 ac_status=$?
7919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7920 (exit $ac_status); }; }; then
7921 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007922else
Martin v. Löwis11437992002-04-12 09:54:03 +00007923 echo "$as_me: program exited with status $ac_status" >&5
7924echo "$as_me: failed program was:" >&5
7925cat conftest.$ac_ext >&5
7926( exit $ac_status )
7927{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7928echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7929 { (exit 1); exit 1; }; }
7930fi
Barry Warsawfe33b792003-01-07 22:42:49 +00007931rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007932fi
7933fi
7934rm -f conftest.val
7935else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007936 ac_cv_sizeof_double=0
7937fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007938fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007939echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7940echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7941cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007942#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007943_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007944
7945
Martin v. Löwis11437992002-04-12 09:54:03 +00007946echo "$as_me:$LINENO: checking for fpos_t" >&5
7947echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7948if test "${ac_cv_type_fpos_t+set}" = set; then
7949 echo $ECHO_N "(cached) $ECHO_C" >&6
7950else
7951 cat >conftest.$ac_ext <<_ACEOF
7952#line $LINENO "configure"
7953#include "confdefs.h"
7954$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007955#ifdef F77_DUMMY_MAIN
7956# ifdef __cplusplus
7957 extern "C"
7958# endif
7959 int F77_DUMMY_MAIN() { return 1; }
7960#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007961int
7962main ()
7963{
7964if ((fpos_t *) 0)
7965 return 0;
7966if (sizeof (fpos_t))
7967 return 0;
7968 ;
7969 return 0;
7970}
7971_ACEOF
7972rm -f conftest.$ac_objext
7973if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7974 (eval $ac_compile) 2>&5
7975 ac_status=$?
7976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7977 (exit $ac_status); } &&
7978 { ac_try='test -s conftest.$ac_objext'
7979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7980 (eval $ac_try) 2>&5
7981 ac_status=$?
7982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7983 (exit $ac_status); }; }; then
7984 ac_cv_type_fpos_t=yes
7985else
7986 echo "$as_me: failed program was:" >&5
7987cat conftest.$ac_ext >&5
7988ac_cv_type_fpos_t=no
7989fi
7990rm -f conftest.$ac_objext conftest.$ac_ext
7991fi
7992echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7993echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7994
7995echo "$as_me:$LINENO: checking size of fpos_t" >&5
7996echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7997if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7998 echo $ECHO_N "(cached) $ECHO_C" >&6
7999else
8000 if test "$ac_cv_type_fpos_t" = yes; then
8001 # The cast to unsigned long works around a bug in the HP C Compiler
8002 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8003 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8004 # This bug is HP SR number 8606223364.
8005 if test "$cross_compiling" = yes; then
8006 # Depending upon the size, compute the lo and hi bounds.
8007cat >conftest.$ac_ext <<_ACEOF
8008#line $LINENO "configure"
8009#include "confdefs.h"
8010$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008011#ifdef F77_DUMMY_MAIN
8012# ifdef __cplusplus
8013 extern "C"
8014# endif
8015 int F77_DUMMY_MAIN() { return 1; }
8016#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008017int
8018main ()
8019{
8020static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
8021test_array [0] = 0
8022
8023 ;
8024 return 0;
8025}
8026_ACEOF
8027rm -f conftest.$ac_objext
8028if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8029 (eval $ac_compile) 2>&5
8030 ac_status=$?
8031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8032 (exit $ac_status); } &&
8033 { ac_try='test -s conftest.$ac_objext'
8034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8035 (eval $ac_try) 2>&5
8036 ac_status=$?
8037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8038 (exit $ac_status); }; }; then
8039 ac_lo=0 ac_mid=0
8040 while :; do
8041 cat >conftest.$ac_ext <<_ACEOF
8042#line $LINENO "configure"
8043#include "confdefs.h"
8044$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008045#ifdef F77_DUMMY_MAIN
8046# ifdef __cplusplus
8047 extern "C"
8048# endif
8049 int F77_DUMMY_MAIN() { return 1; }
8050#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008051int
8052main ()
8053{
8054static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8055test_array [0] = 0
8056
8057 ;
8058 return 0;
8059}
8060_ACEOF
8061rm -f conftest.$ac_objext
8062if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8063 (eval $ac_compile) 2>&5
8064 ac_status=$?
8065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8066 (exit $ac_status); } &&
8067 { ac_try='test -s conftest.$ac_objext'
8068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8069 (eval $ac_try) 2>&5
8070 ac_status=$?
8071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8072 (exit $ac_status); }; }; then
8073 ac_hi=$ac_mid; break
8074else
8075 echo "$as_me: failed program was:" >&5
8076cat conftest.$ac_ext >&5
8077ac_lo=`expr $ac_mid + 1`
8078 if test $ac_lo -le $ac_mid; then
8079 ac_lo= ac_hi=
8080 break
8081 fi
8082 ac_mid=`expr 2 '*' $ac_mid + 1`
8083fi
8084rm -f conftest.$ac_objext conftest.$ac_ext
8085 done
8086else
8087 echo "$as_me: failed program was:" >&5
8088cat conftest.$ac_ext >&5
8089cat >conftest.$ac_ext <<_ACEOF
8090#line $LINENO "configure"
8091#include "confdefs.h"
8092$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008093#ifdef F77_DUMMY_MAIN
8094# ifdef __cplusplus
8095 extern "C"
8096# endif
8097 int F77_DUMMY_MAIN() { return 1; }
8098#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008099int
8100main ()
8101{
8102static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
8103test_array [0] = 0
8104
8105 ;
8106 return 0;
8107}
8108_ACEOF
8109rm -f conftest.$ac_objext
8110if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8111 (eval $ac_compile) 2>&5
8112 ac_status=$?
8113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8114 (exit $ac_status); } &&
8115 { ac_try='test -s conftest.$ac_objext'
8116 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8117 (eval $ac_try) 2>&5
8118 ac_status=$?
8119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8120 (exit $ac_status); }; }; then
8121 ac_hi=-1 ac_mid=-1
8122 while :; do
8123 cat >conftest.$ac_ext <<_ACEOF
8124#line $LINENO "configure"
8125#include "confdefs.h"
8126$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008127#ifdef F77_DUMMY_MAIN
8128# ifdef __cplusplus
8129 extern "C"
8130# endif
8131 int F77_DUMMY_MAIN() { return 1; }
8132#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008133int
8134main ()
8135{
8136static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8137test_array [0] = 0
8138
8139 ;
8140 return 0;
8141}
8142_ACEOF
8143rm -f conftest.$ac_objext
8144if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8145 (eval $ac_compile) 2>&5
8146 ac_status=$?
8147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8148 (exit $ac_status); } &&
8149 { ac_try='test -s conftest.$ac_objext'
8150 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8151 (eval $ac_try) 2>&5
8152 ac_status=$?
8153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8154 (exit $ac_status); }; }; then
8155 ac_lo=$ac_mid; break
8156else
8157 echo "$as_me: failed program was:" >&5
8158cat conftest.$ac_ext >&5
8159ac_hi=`expr '(' $ac_mid ')' - 1`
8160 if test $ac_mid -le $ac_hi; then
8161 ac_lo= ac_hi=
8162 break
8163 fi
8164 ac_mid=`expr 2 '*' $ac_mid`
8165fi
8166rm -f conftest.$ac_objext conftest.$ac_ext
8167 done
8168else
8169 echo "$as_me: failed program was:" >&5
8170cat conftest.$ac_ext >&5
8171ac_lo= ac_hi=
8172fi
8173rm -f conftest.$ac_objext conftest.$ac_ext
8174fi
8175rm -f conftest.$ac_objext conftest.$ac_ext
8176# Binary search between lo and hi bounds.
8177while test "x$ac_lo" != "x$ac_hi"; do
8178 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8179 cat >conftest.$ac_ext <<_ACEOF
8180#line $LINENO "configure"
8181#include "confdefs.h"
8182$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008183#ifdef F77_DUMMY_MAIN
8184# ifdef __cplusplus
8185 extern "C"
8186# endif
8187 int F77_DUMMY_MAIN() { return 1; }
8188#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008189int
8190main ()
8191{
8192static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8193test_array [0] = 0
8194
8195 ;
8196 return 0;
8197}
8198_ACEOF
8199rm -f conftest.$ac_objext
8200if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8201 (eval $ac_compile) 2>&5
8202 ac_status=$?
8203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8204 (exit $ac_status); } &&
8205 { ac_try='test -s conftest.$ac_objext'
8206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8207 (eval $ac_try) 2>&5
8208 ac_status=$?
8209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8210 (exit $ac_status); }; }; then
8211 ac_hi=$ac_mid
8212else
8213 echo "$as_me: failed program was:" >&5
8214cat conftest.$ac_ext >&5
8215ac_lo=`expr '(' $ac_mid ')' + 1`
8216fi
8217rm -f conftest.$ac_objext conftest.$ac_ext
8218done
8219case $ac_lo in
8220?*) ac_cv_sizeof_fpos_t=$ac_lo;;
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; }; } ;;
8224esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008225else
8226 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008227 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8228echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8229 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008230else
Martin v. Löwis11437992002-04-12 09:54:03 +00008231 cat >conftest.$ac_ext <<_ACEOF
8232#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008233#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008234$ac_includes_default
8235long longval () { return (long) (sizeof (fpos_t)); }
8236unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008237#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008238#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00008239#ifdef F77_DUMMY_MAIN
8240# ifdef __cplusplus
8241 extern "C"
8242# endif
8243 int F77_DUMMY_MAIN() { return 1; }
8244#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008245int
8246main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008247{
Martin v. Löwis11437992002-04-12 09:54:03 +00008248
8249 FILE *f = fopen ("conftest.val", "w");
8250 if (! f)
8251 exit (1);
8252 if (((long) (sizeof (fpos_t))) < 0)
8253 {
8254 long i = longval ();
8255 if (i != ((long) (sizeof (fpos_t))))
8256 exit (1);
8257 fprintf (f, "%ld\n", i);
8258 }
8259 else
8260 {
8261 unsigned long i = ulongval ();
8262 if (i != ((long) (sizeof (fpos_t))))
8263 exit (1);
8264 fprintf (f, "%lu\n", i);
8265 }
8266 exit (ferror (f) || fclose (f) != 0);
8267
8268 ;
8269 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008270}
Martin v. Löwis11437992002-04-12 09:54:03 +00008271_ACEOF
8272rm -f conftest$ac_exeext
8273if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8274 (eval $ac_link) 2>&5
8275 ac_status=$?
8276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8277 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8279 (eval $ac_try) 2>&5
8280 ac_status=$?
8281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8282 (exit $ac_status); }; }; then
8283 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008284else
Martin v. Löwis11437992002-04-12 09:54:03 +00008285 echo "$as_me: program exited with status $ac_status" >&5
8286echo "$as_me: failed program was:" >&5
8287cat conftest.$ac_ext >&5
8288( exit $ac_status )
8289{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8290echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
8291 { (exit 1); exit 1; }; }
8292fi
Barry Warsawfe33b792003-01-07 22:42:49 +00008293rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008294fi
8295fi
8296rm -f conftest.val
8297else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008298 ac_cv_sizeof_fpos_t=0
8299fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008300fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008301echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8302echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8303cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008304#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008305_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008306
Michael W. Hudson54241132001-12-07 15:38:26 +00008307
8308
Martin v. Löwis11437992002-04-12 09:54:03 +00008309echo "$as_me:$LINENO: checking for long long support" >&5
8310echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008311have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008312cat >conftest.$ac_ext <<_ACEOF
8313#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008314#include "confdefs.h"
8315
Barry Warsawfe33b792003-01-07 22:42:49 +00008316#ifdef F77_DUMMY_MAIN
8317# ifdef __cplusplus
8318 extern "C"
8319# endif
8320 int F77_DUMMY_MAIN() { return 1; }
8321#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008322int
8323main ()
8324{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008325long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008326 ;
8327 return 0;
8328}
8329_ACEOF
8330rm -f conftest.$ac_objext
8331if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8332 (eval $ac_compile) 2>&5
8333 ac_status=$?
8334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8335 (exit $ac_status); } &&
8336 { ac_try='test -s conftest.$ac_objext'
8337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8338 (eval $ac_try) 2>&5
8339 ac_status=$?
8340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8341 (exit $ac_status); }; }; then
8342
8343
8344cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008345#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008346_ACEOF
8347
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008348 have_long_long=yes
8349
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008350else
Martin v. Löwis11437992002-04-12 09:54:03 +00008351 echo "$as_me: failed program was:" >&5
8352cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008353fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008354rm -f conftest.$ac_objext conftest.$ac_ext
8355echo "$as_me:$LINENO: result: $have_long_long" >&5
8356echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008357if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008358echo "$as_me:$LINENO: checking for long long" >&5
8359echo $ECHO_N "checking for long long... $ECHO_C" >&6
8360if test "${ac_cv_type_long_long+set}" = set; then
8361 echo $ECHO_N "(cached) $ECHO_C" >&6
8362else
8363 cat >conftest.$ac_ext <<_ACEOF
8364#line $LINENO "configure"
8365#include "confdefs.h"
8366$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008367#ifdef F77_DUMMY_MAIN
8368# ifdef __cplusplus
8369 extern "C"
8370# endif
8371 int F77_DUMMY_MAIN() { return 1; }
8372#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008373int
8374main ()
8375{
8376if ((long long *) 0)
8377 return 0;
8378if (sizeof (long long))
8379 return 0;
8380 ;
8381 return 0;
8382}
8383_ACEOF
8384rm -f conftest.$ac_objext
8385if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8386 (eval $ac_compile) 2>&5
8387 ac_status=$?
8388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8389 (exit $ac_status); } &&
8390 { ac_try='test -s conftest.$ac_objext'
8391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8392 (eval $ac_try) 2>&5
8393 ac_status=$?
8394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8395 (exit $ac_status); }; }; then
8396 ac_cv_type_long_long=yes
8397else
8398 echo "$as_me: failed program was:" >&5
8399cat conftest.$ac_ext >&5
8400ac_cv_type_long_long=no
8401fi
8402rm -f conftest.$ac_objext conftest.$ac_ext
8403fi
8404echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8405echo "${ECHO_T}$ac_cv_type_long_long" >&6
8406
8407echo "$as_me:$LINENO: checking size of long long" >&5
8408echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8409if test "${ac_cv_sizeof_long_long+set}" = set; then
8410 echo $ECHO_N "(cached) $ECHO_C" >&6
8411else
8412 if test "$ac_cv_type_long_long" = yes; then
8413 # The cast to unsigned long works around a bug in the HP C Compiler
8414 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8415 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8416 # This bug is HP SR number 8606223364.
8417 if test "$cross_compiling" = yes; then
8418 # Depending upon the size, compute the lo and hi bounds.
8419cat >conftest.$ac_ext <<_ACEOF
8420#line $LINENO "configure"
8421#include "confdefs.h"
8422$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008423#ifdef F77_DUMMY_MAIN
8424# ifdef __cplusplus
8425 extern "C"
8426# endif
8427 int F77_DUMMY_MAIN() { return 1; }
8428#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008429int
8430main ()
8431{
8432static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8433test_array [0] = 0
8434
8435 ;
8436 return 0;
8437}
8438_ACEOF
8439rm -f conftest.$ac_objext
8440if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8441 (eval $ac_compile) 2>&5
8442 ac_status=$?
8443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8444 (exit $ac_status); } &&
8445 { ac_try='test -s conftest.$ac_objext'
8446 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8447 (eval $ac_try) 2>&5
8448 ac_status=$?
8449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8450 (exit $ac_status); }; }; then
8451 ac_lo=0 ac_mid=0
8452 while :; do
8453 cat >conftest.$ac_ext <<_ACEOF
8454#line $LINENO "configure"
8455#include "confdefs.h"
8456$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008457#ifdef F77_DUMMY_MAIN
8458# ifdef __cplusplus
8459 extern "C"
8460# endif
8461 int F77_DUMMY_MAIN() { return 1; }
8462#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008463int
8464main ()
8465{
8466static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8467test_array [0] = 0
8468
8469 ;
8470 return 0;
8471}
8472_ACEOF
8473rm -f conftest.$ac_objext
8474if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8475 (eval $ac_compile) 2>&5
8476 ac_status=$?
8477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8478 (exit $ac_status); } &&
8479 { ac_try='test -s conftest.$ac_objext'
8480 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8481 (eval $ac_try) 2>&5
8482 ac_status=$?
8483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8484 (exit $ac_status); }; }; then
8485 ac_hi=$ac_mid; break
8486else
8487 echo "$as_me: failed program was:" >&5
8488cat conftest.$ac_ext >&5
8489ac_lo=`expr $ac_mid + 1`
8490 if test $ac_lo -le $ac_mid; then
8491 ac_lo= ac_hi=
8492 break
8493 fi
8494 ac_mid=`expr 2 '*' $ac_mid + 1`
8495fi
8496rm -f conftest.$ac_objext conftest.$ac_ext
8497 done
8498else
8499 echo "$as_me: failed program was:" >&5
8500cat conftest.$ac_ext >&5
8501cat >conftest.$ac_ext <<_ACEOF
8502#line $LINENO "configure"
8503#include "confdefs.h"
8504$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008505#ifdef F77_DUMMY_MAIN
8506# ifdef __cplusplus
8507 extern "C"
8508# endif
8509 int F77_DUMMY_MAIN() { return 1; }
8510#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008511int
8512main ()
8513{
8514static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8515test_array [0] = 0
8516
8517 ;
8518 return 0;
8519}
8520_ACEOF
8521rm -f conftest.$ac_objext
8522if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8523 (eval $ac_compile) 2>&5
8524 ac_status=$?
8525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8526 (exit $ac_status); } &&
8527 { ac_try='test -s conftest.$ac_objext'
8528 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8529 (eval $ac_try) 2>&5
8530 ac_status=$?
8531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8532 (exit $ac_status); }; }; then
8533 ac_hi=-1 ac_mid=-1
8534 while :; do
8535 cat >conftest.$ac_ext <<_ACEOF
8536#line $LINENO "configure"
8537#include "confdefs.h"
8538$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008539#ifdef F77_DUMMY_MAIN
8540# ifdef __cplusplus
8541 extern "C"
8542# endif
8543 int F77_DUMMY_MAIN() { return 1; }
8544#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008545int
8546main ()
8547{
8548static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8549test_array [0] = 0
8550
8551 ;
8552 return 0;
8553}
8554_ACEOF
8555rm -f conftest.$ac_objext
8556if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8557 (eval $ac_compile) 2>&5
8558 ac_status=$?
8559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8560 (exit $ac_status); } &&
8561 { ac_try='test -s conftest.$ac_objext'
8562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8563 (eval $ac_try) 2>&5
8564 ac_status=$?
8565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8566 (exit $ac_status); }; }; then
8567 ac_lo=$ac_mid; break
8568else
8569 echo "$as_me: failed program was:" >&5
8570cat conftest.$ac_ext >&5
8571ac_hi=`expr '(' $ac_mid ')' - 1`
8572 if test $ac_mid -le $ac_hi; then
8573 ac_lo= ac_hi=
8574 break
8575 fi
8576 ac_mid=`expr 2 '*' $ac_mid`
8577fi
8578rm -f conftest.$ac_objext conftest.$ac_ext
8579 done
8580else
8581 echo "$as_me: failed program was:" >&5
8582cat conftest.$ac_ext >&5
8583ac_lo= ac_hi=
8584fi
8585rm -f conftest.$ac_objext conftest.$ac_ext
8586fi
8587rm -f conftest.$ac_objext conftest.$ac_ext
8588# Binary search between lo and hi bounds.
8589while test "x$ac_lo" != "x$ac_hi"; do
8590 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8591 cat >conftest.$ac_ext <<_ACEOF
8592#line $LINENO "configure"
8593#include "confdefs.h"
8594$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008595#ifdef F77_DUMMY_MAIN
8596# ifdef __cplusplus
8597 extern "C"
8598# endif
8599 int F77_DUMMY_MAIN() { return 1; }
8600#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008601int
8602main ()
8603{
8604static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8605test_array [0] = 0
8606
8607 ;
8608 return 0;
8609}
8610_ACEOF
8611rm -f conftest.$ac_objext
8612if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8613 (eval $ac_compile) 2>&5
8614 ac_status=$?
8615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8616 (exit $ac_status); } &&
8617 { ac_try='test -s conftest.$ac_objext'
8618 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8619 (eval $ac_try) 2>&5
8620 ac_status=$?
8621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8622 (exit $ac_status); }; }; then
8623 ac_hi=$ac_mid
8624else
8625 echo "$as_me: failed program was:" >&5
8626cat conftest.$ac_ext >&5
8627ac_lo=`expr '(' $ac_mid ')' + 1`
8628fi
8629rm -f conftest.$ac_objext conftest.$ac_ext
8630done
8631case $ac_lo in
8632?*) ac_cv_sizeof_long_long=$ac_lo;;
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; }; } ;;
8636esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008637else
8638 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008639 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8640echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8641 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008642else
Martin v. Löwis11437992002-04-12 09:54:03 +00008643 cat >conftest.$ac_ext <<_ACEOF
8644#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008645#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008646$ac_includes_default
8647long longval () { return (long) (sizeof (long long)); }
8648unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008649#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008650#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00008651#ifdef F77_DUMMY_MAIN
8652# ifdef __cplusplus
8653 extern "C"
8654# endif
8655 int F77_DUMMY_MAIN() { return 1; }
8656#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008657int
8658main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008659{
Martin v. Löwis11437992002-04-12 09:54:03 +00008660
8661 FILE *f = fopen ("conftest.val", "w");
8662 if (! f)
8663 exit (1);
8664 if (((long) (sizeof (long long))) < 0)
8665 {
8666 long i = longval ();
8667 if (i != ((long) (sizeof (long long))))
8668 exit (1);
8669 fprintf (f, "%ld\n", i);
8670 }
8671 else
8672 {
8673 unsigned long i = ulongval ();
8674 if (i != ((long) (sizeof (long long))))
8675 exit (1);
8676 fprintf (f, "%lu\n", i);
8677 }
8678 exit (ferror (f) || fclose (f) != 0);
8679
8680 ;
8681 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008682}
Martin v. Löwis11437992002-04-12 09:54:03 +00008683_ACEOF
8684rm -f conftest$ac_exeext
8685if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8686 (eval $ac_link) 2>&5
8687 ac_status=$?
8688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8689 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8691 (eval $ac_try) 2>&5
8692 ac_status=$?
8693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8694 (exit $ac_status); }; }; then
8695 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008696else
Martin v. Löwis11437992002-04-12 09:54:03 +00008697 echo "$as_me: program exited with status $ac_status" >&5
8698echo "$as_me: failed program was:" >&5
8699cat conftest.$ac_ext >&5
8700( exit $ac_status )
8701{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8702echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8703 { (exit 1); exit 1; }; }
8704fi
Barry Warsawfe33b792003-01-07 22:42:49 +00008705rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008706fi
8707fi
8708rm -f conftest.val
8709else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008710 ac_cv_sizeof_long_long=0
8711fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008712fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008713echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8714echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8715cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008716#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008717_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008718
Michael W. Hudson54241132001-12-07 15:38:26 +00008719
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008720fi
8721
Martin v. Löwis11437992002-04-12 09:54:03 +00008722echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8723echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008724have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008725cat >conftest.$ac_ext <<_ACEOF
8726#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008727#include "confdefs.h"
8728
Barry Warsawfe33b792003-01-07 22:42:49 +00008729#ifdef F77_DUMMY_MAIN
8730# ifdef __cplusplus
8731 extern "C"
8732# endif
8733 int F77_DUMMY_MAIN() { return 1; }
8734#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008735int
8736main ()
8737{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008738uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008739 ;
8740 return 0;
8741}
8742_ACEOF
8743rm -f conftest.$ac_objext
8744if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8745 (eval $ac_compile) 2>&5
8746 ac_status=$?
8747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8748 (exit $ac_status); } &&
8749 { ac_try='test -s conftest.$ac_objext'
8750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8751 (eval $ac_try) 2>&5
8752 ac_status=$?
8753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8754 (exit $ac_status); }; }; then
8755
8756
8757cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008758#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008759_ACEOF
8760
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008761 have_uintptr_t=yes
8762
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008763else
Martin v. Löwis11437992002-04-12 09:54:03 +00008764 echo "$as_me: failed program was:" >&5
8765cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008766fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008767rm -f conftest.$ac_objext conftest.$ac_ext
8768echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8769echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008770if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008771echo "$as_me:$LINENO: checking for uintptr_t" >&5
8772echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8773if test "${ac_cv_type_uintptr_t+set}" = set; then
8774 echo $ECHO_N "(cached) $ECHO_C" >&6
8775else
8776 cat >conftest.$ac_ext <<_ACEOF
8777#line $LINENO "configure"
8778#include "confdefs.h"
8779$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008780#ifdef F77_DUMMY_MAIN
8781# ifdef __cplusplus
8782 extern "C"
8783# endif
8784 int F77_DUMMY_MAIN() { return 1; }
8785#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008786int
8787main ()
8788{
8789if ((uintptr_t *) 0)
8790 return 0;
8791if (sizeof (uintptr_t))
8792 return 0;
8793 ;
8794 return 0;
8795}
8796_ACEOF
8797rm -f conftest.$ac_objext
8798if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8799 (eval $ac_compile) 2>&5
8800 ac_status=$?
8801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8802 (exit $ac_status); } &&
8803 { ac_try='test -s conftest.$ac_objext'
8804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8805 (eval $ac_try) 2>&5
8806 ac_status=$?
8807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8808 (exit $ac_status); }; }; then
8809 ac_cv_type_uintptr_t=yes
8810else
8811 echo "$as_me: failed program was:" >&5
8812cat conftest.$ac_ext >&5
8813ac_cv_type_uintptr_t=no
8814fi
8815rm -f conftest.$ac_objext conftest.$ac_ext
8816fi
8817echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8818echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8819
8820echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8821echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8822if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8823 echo $ECHO_N "(cached) $ECHO_C" >&6
8824else
8825 if test "$ac_cv_type_uintptr_t" = yes; then
8826 # The cast to unsigned long works around a bug in the HP C Compiler
8827 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8828 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8829 # This bug is HP SR number 8606223364.
8830 if test "$cross_compiling" = yes; then
8831 # Depending upon the size, compute the lo and hi bounds.
8832cat >conftest.$ac_ext <<_ACEOF
8833#line $LINENO "configure"
8834#include "confdefs.h"
8835$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008836#ifdef F77_DUMMY_MAIN
8837# ifdef __cplusplus
8838 extern "C"
8839# endif
8840 int F77_DUMMY_MAIN() { return 1; }
8841#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008842int
8843main ()
8844{
8845static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8846test_array [0] = 0
8847
8848 ;
8849 return 0;
8850}
8851_ACEOF
8852rm -f conftest.$ac_objext
8853if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8854 (eval $ac_compile) 2>&5
8855 ac_status=$?
8856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8857 (exit $ac_status); } &&
8858 { ac_try='test -s conftest.$ac_objext'
8859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8860 (eval $ac_try) 2>&5
8861 ac_status=$?
8862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8863 (exit $ac_status); }; }; then
8864 ac_lo=0 ac_mid=0
8865 while :; do
8866 cat >conftest.$ac_ext <<_ACEOF
8867#line $LINENO "configure"
8868#include "confdefs.h"
8869$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008870#ifdef F77_DUMMY_MAIN
8871# ifdef __cplusplus
8872 extern "C"
8873# endif
8874 int F77_DUMMY_MAIN() { return 1; }
8875#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008876int
8877main ()
8878{
8879static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8880test_array [0] = 0
8881
8882 ;
8883 return 0;
8884}
8885_ACEOF
8886rm -f conftest.$ac_objext
8887if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8888 (eval $ac_compile) 2>&5
8889 ac_status=$?
8890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8891 (exit $ac_status); } &&
8892 { ac_try='test -s conftest.$ac_objext'
8893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8894 (eval $ac_try) 2>&5
8895 ac_status=$?
8896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8897 (exit $ac_status); }; }; then
8898 ac_hi=$ac_mid; break
8899else
8900 echo "$as_me: failed program was:" >&5
8901cat conftest.$ac_ext >&5
8902ac_lo=`expr $ac_mid + 1`
8903 if test $ac_lo -le $ac_mid; then
8904 ac_lo= ac_hi=
8905 break
8906 fi
8907 ac_mid=`expr 2 '*' $ac_mid + 1`
8908fi
8909rm -f conftest.$ac_objext conftest.$ac_ext
8910 done
8911else
8912 echo "$as_me: failed program was:" >&5
8913cat conftest.$ac_ext >&5
8914cat >conftest.$ac_ext <<_ACEOF
8915#line $LINENO "configure"
8916#include "confdefs.h"
8917$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008918#ifdef F77_DUMMY_MAIN
8919# ifdef __cplusplus
8920 extern "C"
8921# endif
8922 int F77_DUMMY_MAIN() { return 1; }
8923#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008924int
8925main ()
8926{
8927static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8928test_array [0] = 0
8929
8930 ;
8931 return 0;
8932}
8933_ACEOF
8934rm -f conftest.$ac_objext
8935if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8936 (eval $ac_compile) 2>&5
8937 ac_status=$?
8938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8939 (exit $ac_status); } &&
8940 { ac_try='test -s conftest.$ac_objext'
8941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8942 (eval $ac_try) 2>&5
8943 ac_status=$?
8944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8945 (exit $ac_status); }; }; then
8946 ac_hi=-1 ac_mid=-1
8947 while :; do
8948 cat >conftest.$ac_ext <<_ACEOF
8949#line $LINENO "configure"
8950#include "confdefs.h"
8951$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008952#ifdef F77_DUMMY_MAIN
8953# ifdef __cplusplus
8954 extern "C"
8955# endif
8956 int F77_DUMMY_MAIN() { return 1; }
8957#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008958int
8959main ()
8960{
8961static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8962test_array [0] = 0
8963
8964 ;
8965 return 0;
8966}
8967_ACEOF
8968rm -f conftest.$ac_objext
8969if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8970 (eval $ac_compile) 2>&5
8971 ac_status=$?
8972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8973 (exit $ac_status); } &&
8974 { ac_try='test -s conftest.$ac_objext'
8975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8976 (eval $ac_try) 2>&5
8977 ac_status=$?
8978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8979 (exit $ac_status); }; }; then
8980 ac_lo=$ac_mid; break
8981else
8982 echo "$as_me: failed program was:" >&5
8983cat conftest.$ac_ext >&5
8984ac_hi=`expr '(' $ac_mid ')' - 1`
8985 if test $ac_mid -le $ac_hi; then
8986 ac_lo= ac_hi=
8987 break
8988 fi
8989 ac_mid=`expr 2 '*' $ac_mid`
8990fi
8991rm -f conftest.$ac_objext conftest.$ac_ext
8992 done
8993else
8994 echo "$as_me: failed program was:" >&5
8995cat conftest.$ac_ext >&5
8996ac_lo= ac_hi=
8997fi
8998rm -f conftest.$ac_objext conftest.$ac_ext
8999fi
9000rm -f conftest.$ac_objext conftest.$ac_ext
9001# Binary search between lo and hi bounds.
9002while test "x$ac_lo" != "x$ac_hi"; do
9003 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9004 cat >conftest.$ac_ext <<_ACEOF
9005#line $LINENO "configure"
9006#include "confdefs.h"
9007$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00009008#ifdef F77_DUMMY_MAIN
9009# ifdef __cplusplus
9010 extern "C"
9011# endif
9012 int F77_DUMMY_MAIN() { return 1; }
9013#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009014int
9015main ()
9016{
9017static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
9018test_array [0] = 0
9019
9020 ;
9021 return 0;
9022}
9023_ACEOF
9024rm -f conftest.$ac_objext
9025if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9026 (eval $ac_compile) 2>&5
9027 ac_status=$?
9028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9029 (exit $ac_status); } &&
9030 { ac_try='test -s conftest.$ac_objext'
9031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9032 (eval $ac_try) 2>&5
9033 ac_status=$?
9034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9035 (exit $ac_status); }; }; then
9036 ac_hi=$ac_mid
9037else
9038 echo "$as_me: failed program was:" >&5
9039cat conftest.$ac_ext >&5
9040ac_lo=`expr '(' $ac_mid ')' + 1`
9041fi
9042rm -f conftest.$ac_objext conftest.$ac_ext
9043done
9044case $ac_lo in
9045?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
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; }; } ;;
9049esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009050else
9051 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009052 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
9053echo "$as_me: error: cannot run test program while cross compiling" >&2;}
9054 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009055else
Martin v. Löwis11437992002-04-12 09:54:03 +00009056 cat >conftest.$ac_ext <<_ACEOF
9057#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009058#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009059$ac_includes_default
9060long longval () { return (long) (sizeof (uintptr_t)); }
9061unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009062#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009063#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00009064#ifdef F77_DUMMY_MAIN
9065# ifdef __cplusplus
9066 extern "C"
9067# endif
9068 int F77_DUMMY_MAIN() { return 1; }
9069#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009070int
9071main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009072{
Martin v. Löwis11437992002-04-12 09:54:03 +00009073
9074 FILE *f = fopen ("conftest.val", "w");
9075 if (! f)
9076 exit (1);
9077 if (((long) (sizeof (uintptr_t))) < 0)
9078 {
9079 long i = longval ();
9080 if (i != ((long) (sizeof (uintptr_t))))
9081 exit (1);
9082 fprintf (f, "%ld\n", i);
9083 }
9084 else
9085 {
9086 unsigned long i = ulongval ();
9087 if (i != ((long) (sizeof (uintptr_t))))
9088 exit (1);
9089 fprintf (f, "%lu\n", i);
9090 }
9091 exit (ferror (f) || fclose (f) != 0);
9092
9093 ;
9094 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009095}
Martin v. Löwis11437992002-04-12 09:54:03 +00009096_ACEOF
9097rm -f conftest$ac_exeext
9098if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9099 (eval $ac_link) 2>&5
9100 ac_status=$?
9101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9102 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9103 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9104 (eval $ac_try) 2>&5
9105 ac_status=$?
9106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9107 (exit $ac_status); }; }; then
9108 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009109else
Martin v. Löwis11437992002-04-12 09:54:03 +00009110 echo "$as_me: program exited with status $ac_status" >&5
9111echo "$as_me: failed program was:" >&5
9112cat conftest.$ac_ext >&5
9113( exit $ac_status )
9114{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
9115echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
9116 { (exit 1); exit 1; }; }
9117fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009118rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009119fi
9120fi
9121rm -f conftest.val
9122else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009123 ac_cv_sizeof_uintptr_t=0
9124fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009125fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009126echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
9127echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
9128cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009129#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009130_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009131
Michael W. Hudson54241132001-12-07 15:38:26 +00009132
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009133fi
9134
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009135# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009136echo "$as_me:$LINENO: checking size of off_t" >&5
9137echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
9138if test "${ac_cv_sizeof_off_t+set}" = set; then
9139 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009140else
9141 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009142 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009143else
Martin v. Löwis11437992002-04-12 09:54:03 +00009144 cat >conftest.$ac_ext <<_ACEOF
9145#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009146#include "confdefs.h"
9147#include <stdio.h>
9148#include <sys/types.h>
9149main()
9150{
9151 FILE *f=fopen("conftestval", "w");
9152 if (!f) exit(1);
9153 fprintf(f, "%d\n", sizeof(off_t));
9154 exit(0);
9155}
Martin v. Löwis11437992002-04-12 09:54:03 +00009156_ACEOF
9157rm -f conftest$ac_exeext
9158if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9159 (eval $ac_link) 2>&5
9160 ac_status=$?
9161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9162 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9163 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9164 (eval $ac_try) 2>&5
9165 ac_status=$?
9166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9167 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009168 ac_cv_sizeof_off_t=`cat conftestval`
9169else
Martin v. Löwis11437992002-04-12 09:54:03 +00009170 echo "$as_me: program exited with status $ac_status" >&5
9171echo "$as_me: failed program was:" >&5
9172cat conftest.$ac_ext >&5
9173( exit $ac_status )
9174ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009175fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009176rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009177fi
9178
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009179fi
9180
Martin v. Löwis11437992002-04-12 09:54:03 +00009181echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
9182echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
9183
9184cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009185#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009186_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009187
Michael W. Hudson54241132001-12-07 15:38:26 +00009188
Martin v. Löwis11437992002-04-12 09:54:03 +00009189echo "$as_me:$LINENO: checking whether to enable large file support" >&5
9190echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009191if test "$have_long_long" = yes -a \
9192 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
9193 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009194
Martin v. Löwis11437992002-04-12 09:54:03 +00009195cat >>confdefs.h <<\_ACEOF
9196#define HAVE_LARGEFILE_SUPPORT 1
9197_ACEOF
9198
9199 echo "$as_me:$LINENO: result: yes" >&5
9200echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009201else
Martin v. Löwis11437992002-04-12 09:54:03 +00009202 echo "$as_me:$LINENO: result: no" >&5
9203echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009204fi
9205
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009206# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009207echo "$as_me:$LINENO: checking size of time_t" >&5
9208echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
9209if test "${ac_cv_sizeof_time_t+set}" = set; then
9210 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009211else
9212 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009213 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009214else
Martin v. Löwis11437992002-04-12 09:54:03 +00009215 cat >conftest.$ac_ext <<_ACEOF
9216#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009217#include "confdefs.h"
9218#include <stdio.h>
9219#include <time.h>
9220main()
9221{
9222 FILE *f=fopen("conftestval", "w");
9223 if (!f) exit(1);
9224 fprintf(f, "%d\n", sizeof(time_t));
9225 exit(0);
9226}
Martin v. Löwis11437992002-04-12 09:54:03 +00009227_ACEOF
9228rm -f conftest$ac_exeext
9229if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9230 (eval $ac_link) 2>&5
9231 ac_status=$?
9232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9233 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9235 (eval $ac_try) 2>&5
9236 ac_status=$?
9237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9238 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009239 ac_cv_sizeof_time_t=`cat conftestval`
9240else
Martin v. Löwis11437992002-04-12 09:54:03 +00009241 echo "$as_me: program exited with status $ac_status" >&5
9242echo "$as_me: failed program was:" >&5
9243cat conftest.$ac_ext >&5
9244( exit $ac_status )
9245ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009246fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009247rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009248fi
9249
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009250fi
9251
Martin v. Löwis11437992002-04-12 09:54:03 +00009252echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9253echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9254
9255cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009256#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009257_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009258
Michael W. Hudson54241132001-12-07 15:38:26 +00009259
9260
Trent Mick635f6fb2000-08-23 21:33:05 +00009261# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009262ac_save_cc="$CC"
9263if test "$ac_cv_kpthread" = "yes"
9264then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009265elif test "$ac_cv_kthread" = "yes"
9266then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009267elif test "$ac_cv_pthread" = "yes"
9268then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009269fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009270echo "$as_me:$LINENO: checking for pthread_t" >&5
9271echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009272have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009273cat >conftest.$ac_ext <<_ACEOF
9274#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009275#include "confdefs.h"
9276#include <pthread.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00009277#ifdef F77_DUMMY_MAIN
9278# ifdef __cplusplus
9279 extern "C"
9280# endif
9281 int F77_DUMMY_MAIN() { return 1; }
9282#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009283int
9284main ()
9285{
Guido van Rossum12580492000-09-24 16:47:19 +00009286pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009287 ;
9288 return 0;
9289}
9290_ACEOF
9291rm -f conftest.$ac_objext
9292if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9293 (eval $ac_compile) 2>&5
9294 ac_status=$?
9295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9296 (exit $ac_status); } &&
9297 { ac_try='test -s conftest.$ac_objext'
9298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9299 (eval $ac_try) 2>&5
9300 ac_status=$?
9301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9302 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009303 have_pthread_t=yes
9304else
Martin v. Löwis11437992002-04-12 09:54:03 +00009305 echo "$as_me: failed program was:" >&5
9306cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00009307fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009308rm -f conftest.$ac_objext conftest.$ac_ext
9309echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9310echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009311if test "$have_pthread_t" = yes ; then
9312 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009313 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9314echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9315 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9316 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009317else
9318 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009319 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009320else
Martin v. Löwis11437992002-04-12 09:54:03 +00009321 cat >conftest.$ac_ext <<_ACEOF
9322#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009323#include "confdefs.h"
9324#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009325#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +00009326 main()
9327 {
9328 FILE *f=fopen("conftestval", "w");
9329 if (!f) exit(1);
9330 fprintf(f, "%d\n", sizeof(pthread_t));
9331 exit(0);
9332 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009333_ACEOF
9334rm -f conftest$ac_exeext
9335if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9336 (eval $ac_link) 2>&5
9337 ac_status=$?
9338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9339 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9341 (eval $ac_try) 2>&5
9342 ac_status=$?
9343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9344 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009345 ac_cv_sizeof_pthread_t=`cat conftestval`
9346else
Martin v. Löwis11437992002-04-12 09:54:03 +00009347 echo "$as_me: program exited with status $ac_status" >&5
9348echo "$as_me: failed program was:" >&5
9349cat conftest.$ac_ext >&5
9350( exit $ac_status )
9351ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009352fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009353rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009354fi
9355
Trent Mick635f6fb2000-08-23 21:33:05 +00009356fi
9357
Martin v. Löwis11437992002-04-12 09:54:03 +00009358 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9359echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9360
9361cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009362#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009363_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009364
9365fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009366CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009367
Martin v. Löwis11437992002-04-12 09:54:03 +00009368echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9369echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009370# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9371if test "${enable_toolbox_glue+set}" = set; then
9372 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009373
Martin v. Löwis11437992002-04-12 09:54:03 +00009374fi;
Jack Jansene578a632001-08-15 01:27:14 +00009375
9376if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009377then
Jack Jansene578a632001-08-15 01:27:14 +00009378 case $ac_sys_system/$ac_sys_release in
9379 Darwin/*)
9380 enable_toolbox_glue="yes";;
9381 *)
9382 enable_toolbox_glue="no";;
9383 esac
9384fi
9385case "$enable_toolbox_glue" in
9386yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009387 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009388 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009389 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009390
9391cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009392#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009393_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009394
9395 ;;
9396*)
9397 extra_frameworks=""
9398 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009399 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009400 ;;
9401esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009402echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9403echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009404
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009405
9406case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009407 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009408 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009409 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00009410 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9411 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009412 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009413 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009414 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00009415 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9416 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009417esac
9418
Martin v. Löwis11437992002-04-12 09:54:03 +00009419echo "$as_me:$LINENO: checking for --enable-framework" >&5
9420echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009421if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009422then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009423 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009424 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009425 # in the build location.
Jack Jansenea0c3822002-08-01 21:57:49 +00009426 LDFLAGS="$LDFLAGS -Wl,-F."
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009427
Martin v. Löwis11437992002-04-12 09:54:03 +00009428cat >>confdefs.h <<\_ACEOF
9429#define WITH_NEXT_FRAMEWORK 1
9430_ACEOF
9431
9432 echo "$as_me:$LINENO: result: yes" >&5
9433echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009434else
Martin v. Löwis11437992002-04-12 09:54:03 +00009435 echo "$as_me:$LINENO: result: no" >&5
9436echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009437fi
9438
Martin v. Löwis11437992002-04-12 09:54:03 +00009439echo "$as_me:$LINENO: checking for dyld" >&5
9440echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009441case $ac_sys_system/$ac_sys_release in
9442 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009443
Martin v. Löwis11437992002-04-12 09:54:03 +00009444cat >>confdefs.h <<\_ACEOF
9445#define WITH_DYLD 1
9446_ACEOF
9447
9448 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9449echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009450 ;;
9451 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009452 echo "$as_me:$LINENO: result: no" >&5
9453echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009454 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009455esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009456
Guido van Rossum0a516c91994-09-12 10:58:40 +00009457# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009458
Michael W. Hudson54241132001-12-07 15:38:26 +00009459
9460
9461
9462
Guido van Rossum0a516c91994-09-12 10:58:40 +00009463# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009464# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009465echo "$as_me:$LINENO: checking SO" >&5
9466echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009467if test -z "$SO"
9468then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009469 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009470 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009471 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009472 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009473 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009474fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009475echo "$as_me:$LINENO: result: $SO" >&5
9476echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009477# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00009478# -- "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 +00009479# (Shared libraries in this instance are shared modules to be loaded into
9480# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009481echo "$as_me:$LINENO: checking LDSHARED" >&5
9482echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009483if test -z "$LDSHARED"
9484then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009485 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009486 AIX*)
9487 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009488 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009489 ;;
9490 BeOS*)
9491 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009492 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009493 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009494 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009495 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009496 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009497 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00009498 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009499 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009500 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +00009501 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009502 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009503 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
9504 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009505 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009506 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9507 if test "$enable_framework" ; then
9508 # Link against the framework. All externals should be defined.
9509 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9510 else
9511 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009512 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009513 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009514 Darwin/*)
9515 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9516 if test "$enable_framework" ; then
9517 # Link against the framework. All externals should be defined.
9518 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9519 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009520 # No framework, use the Python app as bundle-loader
9521 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009522 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009523 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009524 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00009525 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009526 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009527 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009528 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009529 then
9530 LDSHARED="cc -shared ${LDFLAGS}"
9531 else
9532 LDSHARED="ld -Bshareable ${LDFLAGS}"
9533 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009534 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009535 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009536 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009537 then LDSHARED='$(CC) -shared'
9538 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009539 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009540 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +00009541 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009542 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009543 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009544 *) LDSHARED="ld";;
9545 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009546fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009547echo "$as_me:$LINENO: result: $LDSHARED" >&5
9548echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009549BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009550# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009551# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009552echo "$as_me:$LINENO: checking CCSHARED" >&5
9553echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009554if test -z "$CCSHARED"
9555then
Guido van Rossum07397971997-04-29 21:49:50 +00009556 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009557 SunOS*) if test "$GCC" = yes;
9558 then CCSHARED="-fPIC";
9559 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009560 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009561 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009562 else CCSHARED="+z";
9563 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009564 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009565 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009566 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009567 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009568 if test "$GCC" = "yes"
9569 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009570 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009571 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009572 SCO_SV*)
9573 if test "$GCC" = "yes"
9574 then CCSHARED="-fPIC"
9575 else CCSHARED="-Kpic -belf"
9576 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009577 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009578 IRIX*/6*) case $CC in
9579 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009580 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009581 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009582 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009583 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009584fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009585echo "$as_me:$LINENO: result: $CCSHARED" >&5
9586echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009587# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009588# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009589echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9590echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009591if test -z "$LINKFORSHARED"
9592then
Guido van Rossum07397971997-04-29 21:49:50 +00009593 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009594 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009595 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009596 LINKFORSHARED="-Wl,-E -Wl,+s";;
9597# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009598 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009599 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009600 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009601 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009602 # -u __dummy makes the linker aware of the objc runtime
9603 # in System.framework; otherwise, __objcInit (referenced in
9604 # crt1.o) gets erroneously defined as common, which breaks dynamic
9605 # loading of any modules which reference it in System.framework.
9606 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9607 # not used by the core itself but which needs to be in the core so
9608 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00009609 # -prebind is no longer used, because it actually seems to give a
9610 # slowdown in stead of a speedup, maybe due to the large number of
9611 # dynamic loads Python does.
9612 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009613 if test "$enable_framework"
9614 then
9615 LINKFORSHARED="$LINKFORSHARED -framework Python"
9616 fi
9617 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009618 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009619 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009620 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009621 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009622 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9623 then
9624 LINKFORSHARED="-Wl,--export-dynamic"
9625 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009626 SunOS/5*) case $CC in
9627 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009628 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009629 then
9630 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009631 fi;;
9632 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009633 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009634fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009635echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9636echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009637
Michael W. Hudson54241132001-12-07 15:38:26 +00009638
Martin v. Löwis11437992002-04-12 09:54:03 +00009639echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9640echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009641if test ! "$LIBRARY" = "$LDLIBRARY"
9642then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009643 case $ac_sys_system in
9644 CYGWIN*)
9645 # Cygwin needs CCSHARED when building extension DLLs
9646 # but not when building the interpreter DLL.
9647 CFLAGSFORSHARED='';;
9648 *)
9649 CFLAGSFORSHARED='$(CCSHARED)'
9650 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009651fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009652echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9653echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009654
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009655# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9656# library (with --enable-shared).
9657# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009658# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9659# if it is not required, since it creates a dependency of the shared library
9660# to LIBS. This, in turn, means that applications linking the shared libpython
9661# don't need to link LIBS explicitly. The default should be only changed
9662# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009663
9664echo "$as_me:$LINENO: checking SHLIBS" >&5
9665echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9666case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009667 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009668 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009669esac
9670echo "$as_me:$LINENO: result: $SHLIBS" >&5
9671echo "${ECHO_T}$SHLIBS" >&6
9672
9673
Guido van Rossum627b2d71993-12-24 10:39:16 +00009674# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009675
9676echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9677echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9678if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9679 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009680else
Martin v. Löwis11437992002-04-12 09:54:03 +00009681 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009682LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009683cat >conftest.$ac_ext <<_ACEOF
9684#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009685#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009686
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009687/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009688#ifdef __cplusplus
9689extern "C"
9690#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009691/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009692 builtin and then its argument prototype would still apply. */
9693char dlopen ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009694#ifdef F77_DUMMY_MAIN
9695# ifdef __cplusplus
9696 extern "C"
9697# endif
9698 int F77_DUMMY_MAIN() { return 1; }
9699#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009700int
9701main ()
9702{
9703dlopen ();
9704 ;
9705 return 0;
9706}
9707_ACEOF
9708rm -f conftest.$ac_objext conftest$ac_exeext
9709if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9710 (eval $ac_link) 2>&5
9711 ac_status=$?
9712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9713 (exit $ac_status); } &&
9714 { ac_try='test -s conftest$ac_exeext'
9715 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9716 (eval $ac_try) 2>&5
9717 ac_status=$?
9718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9719 (exit $ac_status); }; }; then
9720 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009721else
Martin v. Löwis11437992002-04-12 09:54:03 +00009722 echo "$as_me: failed program was:" >&5
9723cat conftest.$ac_ext >&5
9724ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009725fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009726rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9727LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009728fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009729echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9730echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9731if test $ac_cv_lib_dl_dlopen = yes; then
9732 cat >>confdefs.h <<_ACEOF
9733#define HAVE_LIBDL 1
9734_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009735
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009736 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009737
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009738fi
9739 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009740
9741echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9742echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9743if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9744 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009745else
Martin v. Löwis11437992002-04-12 09:54:03 +00009746 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009747LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009748cat >conftest.$ac_ext <<_ACEOF
9749#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009750#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009751
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009752/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009753#ifdef __cplusplus
9754extern "C"
9755#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009756/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009757 builtin and then its argument prototype would still apply. */
9758char shl_load ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009759#ifdef F77_DUMMY_MAIN
9760# ifdef __cplusplus
9761 extern "C"
9762# endif
9763 int F77_DUMMY_MAIN() { return 1; }
9764#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009765int
9766main ()
9767{
9768shl_load ();
9769 ;
9770 return 0;
9771}
9772_ACEOF
9773rm -f conftest.$ac_objext conftest$ac_exeext
9774if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9775 (eval $ac_link) 2>&5
9776 ac_status=$?
9777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9778 (exit $ac_status); } &&
9779 { ac_try='test -s conftest$ac_exeext'
9780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9781 (eval $ac_try) 2>&5
9782 ac_status=$?
9783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9784 (exit $ac_status); }; }; then
9785 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009786else
Martin v. Löwis11437992002-04-12 09:54:03 +00009787 echo "$as_me: failed program was:" >&5
9788cat conftest.$ac_ext >&5
9789ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009790fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009791rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9792LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009793fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009794echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9795echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9796if test $ac_cv_lib_dld_shl_load = yes; then
9797 cat >>confdefs.h <<_ACEOF
9798#define HAVE_LIBDLD 1
9799_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009800
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009801 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009802
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009803fi
9804 # Dynamic linking for HP-UX
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009805echo "$as_me:$LINENO: checking for library containing sem_init" >&5
9806echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9807if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009808 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009809else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009810 ac_func_search_save_LIBS=$LIBS
9811ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009812cat >conftest.$ac_ext <<_ACEOF
9813#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009814#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009815
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009816/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009817#ifdef __cplusplus
9818extern "C"
9819#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009820/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009821 builtin and then its argument prototype would still apply. */
9822char sem_init ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009823#ifdef F77_DUMMY_MAIN
9824# ifdef __cplusplus
9825 extern "C"
9826# endif
9827 int F77_DUMMY_MAIN() { return 1; }
9828#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009829int
9830main ()
9831{
9832sem_init ();
9833 ;
9834 return 0;
9835}
9836_ACEOF
9837rm -f conftest.$ac_objext conftest$ac_exeext
9838if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9839 (eval $ac_link) 2>&5
9840 ac_status=$?
9841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9842 (exit $ac_status); } &&
9843 { ac_try='test -s conftest$ac_exeext'
9844 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9845 (eval $ac_try) 2>&5
9846 ac_status=$?
9847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9848 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009849 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009850else
Martin v. Löwis11437992002-04-12 09:54:03 +00009851 echo "$as_me: failed program was:" >&5
9852cat conftest.$ac_ext >&5
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009853fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009854rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009855if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009856 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009857 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9858 cat >conftest.$ac_ext <<_ACEOF
9859#line $LINENO "configure"
9860#include "confdefs.h"
9861
9862/* Override any gcc2 internal prototype to avoid an error. */
9863#ifdef __cplusplus
9864extern "C"
9865#endif
9866/* We use char because int might match the return type of a gcc2
9867 builtin and then its argument prototype would still apply. */
9868char sem_init ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009869#ifdef F77_DUMMY_MAIN
9870# ifdef __cplusplus
9871 extern "C"
9872# endif
9873 int F77_DUMMY_MAIN() { return 1; }
9874#endif
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009875int
9876main ()
9877{
9878sem_init ();
9879 ;
9880 return 0;
9881}
Martin v. Löwis11437992002-04-12 09:54:03 +00009882_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009883rm -f conftest.$ac_objext conftest$ac_exeext
9884if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9885 (eval $ac_link) 2>&5
9886 ac_status=$?
9887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9888 (exit $ac_status); } &&
9889 { ac_try='test -s conftest$ac_exeext'
9890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9891 (eval $ac_try) 2>&5
9892 ac_status=$?
9893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9894 (exit $ac_status); }; }; then
9895 ac_cv_search_sem_init="-l$ac_lib"
9896break
9897else
9898 echo "$as_me: failed program was:" >&5
9899cat conftest.$ac_ext >&5
9900fi
9901rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9902 done
9903fi
9904LIBS=$ac_func_search_save_LIBS
9905fi
9906echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9907echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9908if test "$ac_cv_search_sem_init" != no; then
9909 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009910
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009911fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009912 # 'Real Time' functions on Solaris
9913 # posix4 on Solaris 2.6
9914 # pthread (first!) on Linux
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009915
9916# checks for system dependent C++ extensions support
9917case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009918 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9919echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9920 cat >conftest.$ac_ext <<_ACEOF
9921#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009922#include "confdefs.h"
9923#include "/usr/lpp/xlC/include/load.h"
Barry Warsawfe33b792003-01-07 22:42:49 +00009924#ifdef F77_DUMMY_MAIN
9925# ifdef __cplusplus
9926 extern "C"
9927# endif
9928 int F77_DUMMY_MAIN() { return 1; }
9929#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009930int
9931main ()
9932{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009933loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009934 ;
9935 return 0;
9936}
9937_ACEOF
9938rm -f conftest.$ac_objext conftest$ac_exeext
9939if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9940 (eval $ac_link) 2>&5
9941 ac_status=$?
9942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9943 (exit $ac_status); } &&
9944 { ac_try='test -s conftest$ac_exeext'
9945 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9946 (eval $ac_try) 2>&5
9947 ac_status=$?
9948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9949 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009950
Martin v. Löwis11437992002-04-12 09:54:03 +00009951cat >>confdefs.h <<\_ACEOF
9952#define AIX_GENUINE_CPLUSPLUS 1
9953_ACEOF
9954
9955 echo "$as_me:$LINENO: result: yes" >&5
9956echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009957else
Martin v. Löwis11437992002-04-12 09:54:03 +00009958 echo "$as_me: failed program was:" >&5
9959cat conftest.$ac_ext >&5
9960echo "$as_me:$LINENO: result: no" >&5
9961echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009962fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009963rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009964 *) ;;
9965esac
9966
Guido van Rossum70c7f481998-03-26 18:44:10 +00009967# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Martin v. Löwise1172582002-11-13 08:51:19 +00009968# However on SGI IRIX 4, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009969# BeOS' sockets are stashed in libnet.
9970case "$ac_sys_system" in
9971IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009972*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009973echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9974echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9975if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9976 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009977else
Martin v. Löwis11437992002-04-12 09:54:03 +00009978 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009979LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009980cat >conftest.$ac_ext <<_ACEOF
9981#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009982#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009983
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009984/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009985#ifdef __cplusplus
9986extern "C"
9987#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009988/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009989 builtin and then its argument prototype would still apply. */
9990char t_open ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009991#ifdef F77_DUMMY_MAIN
9992# ifdef __cplusplus
9993 extern "C"
9994# endif
9995 int F77_DUMMY_MAIN() { return 1; }
9996#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009997int
9998main ()
9999{
10000t_open ();
10001 ;
10002 return 0;
10003}
10004_ACEOF
10005rm -f conftest.$ac_objext conftest$ac_exeext
10006if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10007 (eval $ac_link) 2>&5
10008 ac_status=$?
10009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10010 (exit $ac_status); } &&
10011 { ac_try='test -s conftest$ac_exeext'
10012 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10013 (eval $ac_try) 2>&5
10014 ac_status=$?
10015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10016 (exit $ac_status); }; }; then
10017 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010018else
Martin v. Löwis11437992002-04-12 09:54:03 +000010019 echo "$as_me: failed program was:" >&5
10020cat conftest.$ac_ext >&5
10021ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010022fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010023rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10024LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010025fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010026echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
10027echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
10028if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010029 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010030fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010031 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +000010032echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
10033echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
10034if test "${ac_cv_lib_socket_socket+set}" = set; then
10035 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010036else
Martin v. Löwis11437992002-04-12 09:54:03 +000010037 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010038LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010039cat >conftest.$ac_ext <<_ACEOF
10040#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010041#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010042
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010043/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010044#ifdef __cplusplus
10045extern "C"
10046#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010047/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010048 builtin and then its argument prototype would still apply. */
10049char socket ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010050#ifdef F77_DUMMY_MAIN
10051# ifdef __cplusplus
10052 extern "C"
10053# endif
10054 int F77_DUMMY_MAIN() { return 1; }
10055#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010056int
10057main ()
10058{
10059socket ();
10060 ;
10061 return 0;
10062}
10063_ACEOF
10064rm -f conftest.$ac_objext conftest$ac_exeext
10065if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10066 (eval $ac_link) 2>&5
10067 ac_status=$?
10068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10069 (exit $ac_status); } &&
10070 { ac_try='test -s conftest$ac_exeext'
10071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10072 (eval $ac_try) 2>&5
10073 ac_status=$?
10074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10075 (exit $ac_status); }; }; then
10076 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010077else
Martin v. Löwis11437992002-04-12 09:54:03 +000010078 echo "$as_me: failed program was:" >&5
10079cat conftest.$ac_ext >&5
10080ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010082rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10083LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010084fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010085echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
10086echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
10087if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000010088 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010089fi
10090 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000010091;;
10092esac
10093case "$ac_sys_system" in
10094BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010095echo "$as_me:$LINENO: checking for socket in -lnet" >&5
10096echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
10097if test "${ac_cv_lib_net_socket+set}" = set; then
10098 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010099else
Martin v. Löwis11437992002-04-12 09:54:03 +000010100 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010101LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010102cat >conftest.$ac_ext <<_ACEOF
10103#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010104#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010105
Guido van Rossumad678af1998-10-02 14:42:15 +000010106/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010107#ifdef __cplusplus
10108extern "C"
10109#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010110/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010111 builtin and then its argument prototype would still apply. */
10112char socket ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010113#ifdef F77_DUMMY_MAIN
10114# ifdef __cplusplus
10115 extern "C"
10116# endif
10117 int F77_DUMMY_MAIN() { return 1; }
10118#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010119int
10120main ()
10121{
10122socket ();
10123 ;
10124 return 0;
10125}
10126_ACEOF
10127rm -f conftest.$ac_objext conftest$ac_exeext
10128if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10129 (eval $ac_link) 2>&5
10130 ac_status=$?
10131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10132 (exit $ac_status); } &&
10133 { ac_try='test -s conftest$ac_exeext'
10134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10135 (eval $ac_try) 2>&5
10136 ac_status=$?
10137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10138 (exit $ac_status); }; }; then
10139 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010140else
Martin v. Löwis11437992002-04-12 09:54:03 +000010141 echo "$as_me: failed program was:" >&5
10142cat conftest.$ac_ext >&5
10143ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010144fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010145rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10146LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010147fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010148echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
10149echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
10150if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010151 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010152fi
10153 # BeOS
10154;;
10155esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000010156
Martin v. Löwis11437992002-04-12 09:54:03 +000010157echo "$as_me:$LINENO: checking for --with-libs" >&5
10158echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
10159
Guido van Rossuma68acba1996-07-31 17:36:39 +000010160# Check whether --with-libs or --without-libs was given.
10161if test "${with_libs+set}" = set; then
10162 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000010163
10164echo "$as_me:$LINENO: result: $withval" >&5
10165echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000010166LIBS="$withval $LIBS"
10167
10168else
Martin v. Löwis11437992002-04-12 09:54:03 +000010169 echo "$as_me:$LINENO: result: no" >&5
10170echo "${ECHO_T}no" >&6
10171fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000010172
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010173# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010174
10175
Martin v. Löwis11437992002-04-12 09:54:03 +000010176echo "$as_me:$LINENO: checking for --with-signal-module" >&5
10177echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
10178
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010179# Check whether --with-signal-module or --without-signal-module was given.
10180if test "${with_signal_module+set}" = set; then
10181 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010182
Martin v. Löwis11437992002-04-12 09:54:03 +000010183fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010184
10185if test -z "$with_signal_module"
10186then with_signal_module="yes"
10187fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010188echo "$as_me:$LINENO: result: $with_signal_module" >&5
10189echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010190
10191if test "${with_signal_module}" = "yes"; then
10192 USE_SIGNAL_MODULE=""
10193 SIGNAL_OBJS=""
10194else
10195 USE_SIGNAL_MODULE="#"
10196 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10197fi
10198
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010199# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010200
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010201USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010202
Martin v. Löwis11437992002-04-12 09:54:03 +000010203echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
10204echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
10205
Guido van Rossumec2f0731997-01-22 20:54:01 +000010206
10207# Check whether --with-dec-threads or --without-dec-threads was given.
10208if test "${with_dec_threads+set}" = set; then
10209 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000010210
10211echo "$as_me:$LINENO: result: $withval" >&5
10212echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000010213LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000010214if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000010215 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000010216fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010217else
Martin v. Löwis11437992002-04-12 09:54:03 +000010218 echo "$as_me:$LINENO: result: no" >&5
10219echo "${ECHO_T}no" >&6
10220fi;
10221
10222# Templates for things AC_DEFINEd more than once.
10223# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010224
10225
Martin v. Löwis11437992002-04-12 09:54:03 +000010226
10227
10228
10229
10230
10231echo "$as_me:$LINENO: checking for --with-threads" >&5
10232echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
10233
Guido van Rossumec2f0731997-01-22 20:54:01 +000010234# Check whether --with-threads or --without-threads was given.
10235if test "${with_threads+set}" = set; then
10236 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000010237
Martin v. Löwis11437992002-04-12 09:54:03 +000010238fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000010239
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010240# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010241
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010242# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010243if test "${with_thread+set}" = set; then
10244 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010245 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000010246fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010247
10248if test -z "$with_threads"
10249then with_threads="yes"
10250fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010251echo "$as_me:$LINENO: result: $with_threads" >&5
10252echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010253
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010254
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010255if test "$with_threads" = "no"
10256then
10257 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010258elif test "$ac_cv_pthread_is_default" = yes
10259then
Martin v. Löwis11437992002-04-12 09:54:03 +000010260 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010261#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010262_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010263
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010264 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010265 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010266#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010267_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010268
10269 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010270 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010271elif test "$ac_cv_kpthread" = "yes"
10272then
10273 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010274 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010275#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010276_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010277
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010278 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010279 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010280elif test "$ac_cv_kthread" = "yes"
10281then
10282 CC="$CC -Kthread"
10283 cat >>confdefs.h <<\_ACEOF
10284#define WITH_THREAD 1
10285_ACEOF
10286
10287 posix_threads=yes
10288 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010289elif test "$ac_cv_pthread" = "yes"
10290then
10291 CC="$CC -pthread"
10292 cat >>confdefs.h <<\_ACEOF
10293#define WITH_THREAD 1
10294_ACEOF
10295
10296 posix_threads=yes
10297 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010298else
10299 if test ! -z "$with_threads" -a -d "$with_threads"
10300 then LDFLAGS="$LDFLAGS -L$with_threads"
10301 fi
10302 if test ! -z "$withval" -a -d "$withval"
10303 then LDFLAGS="$LDFLAGS -L$withval"
10304 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010305
10306 # According to the POSIX spec, a pthreads implementation must
10307 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010308 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10309echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10310 cat >conftest.$ac_ext <<_ACEOF
10311#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010312#include "confdefs.h"
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010313
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010314#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010315#ifdef _POSIX_THREADS
10316yes
10317#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010318
10319_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010320if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000010321 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010322 unistd_defines_pthreads=yes
10323else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010324 unistd_defines_pthreads=no
10325fi
10326rm -f conftest*
10327
Martin v. Löwis11437992002-04-12 09:54:03 +000010328 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10329echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010330
Martin v. Löwis11437992002-04-12 09:54:03 +000010331 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010332#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010333_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010334
Martin v. Löwis11437992002-04-12 09:54:03 +000010335 if test "${ac_cv_header_cthreads_h+set}" = set; then
10336 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10337echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10338if test "${ac_cv_header_cthreads_h+set}" = set; then
10339 echo $ECHO_N "(cached) $ECHO_C" >&6
10340fi
10341echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10342echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010343else
Martin v. Löwis11437992002-04-12 09:54:03 +000010344 # Is the header compilable?
10345echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10346echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10347cat >conftest.$ac_ext <<_ACEOF
10348#line $LINENO "configure"
10349#include "confdefs.h"
10350$ac_includes_default
10351#include <cthreads.h>
10352_ACEOF
10353rm -f conftest.$ac_objext
10354if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10355 (eval $ac_compile) 2>&5
10356 ac_status=$?
10357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10358 (exit $ac_status); } &&
10359 { ac_try='test -s conftest.$ac_objext'
10360 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10361 (eval $ac_try) 2>&5
10362 ac_status=$?
10363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10364 (exit $ac_status); }; }; then
10365 ac_header_compiler=yes
10366else
10367 echo "$as_me: failed program was:" >&5
10368cat conftest.$ac_ext >&5
10369ac_header_compiler=no
10370fi
10371rm -f conftest.$ac_objext conftest.$ac_ext
10372echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10373echo "${ECHO_T}$ac_header_compiler" >&6
10374
10375# Is the header present?
10376echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10377echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10378cat >conftest.$ac_ext <<_ACEOF
10379#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010380#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010381#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010382_ACEOF
10383if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10384 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10385 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010386 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010387 rm -f conftest.er1
10388 cat conftest.err >&5
10389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10390 (exit $ac_status); } >/dev/null; then
10391 if test -s conftest.err; then
10392 ac_cpp_err=$ac_c_preproc_warn_flag
10393 else
10394 ac_cpp_err=
10395 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010396else
Martin v. Löwis11437992002-04-12 09:54:03 +000010397 ac_cpp_err=yes
10398fi
10399if test -z "$ac_cpp_err"; then
10400 ac_header_preproc=yes
10401else
10402 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +000010403 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010404 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010405fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010406rm -f conftest.err conftest.$ac_ext
10407echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10408echo "${ECHO_T}$ac_header_preproc" >&6
10409
10410# So? What about this header?
10411case $ac_header_compiler:$ac_header_preproc in
10412 yes:no )
10413 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10414echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10415 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10416echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10417 no:yes )
10418 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10419echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10420 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10421echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10422 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10423echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10424esac
10425echo "$as_me:$LINENO: checking for cthreads.h" >&5
10426echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10427if test "${ac_cv_header_cthreads_h+set}" = set; then
10428 echo $ECHO_N "(cached) $ECHO_C" >&6
10429else
10430 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010431fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010432echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10433echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10434
10435fi
10436if test $ac_cv_header_cthreads_h = yes; then
10437 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010438#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010439_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010440
Martin v. Löwis11437992002-04-12 09:54:03 +000010441 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010442#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010443_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010444
Martin v. Löwis11437992002-04-12 09:54:03 +000010445
10446cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010447#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010448_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010449
10450 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010451 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010452else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010453
Martin v. Löwis11437992002-04-12 09:54:03 +000010454 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10455 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10456echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10457if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10458 echo $ECHO_N "(cached) $ECHO_C" >&6
10459fi
10460echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10461echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010462else
Martin v. Löwis11437992002-04-12 09:54:03 +000010463 # Is the header compilable?
10464echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10465echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10466cat >conftest.$ac_ext <<_ACEOF
10467#line $LINENO "configure"
10468#include "confdefs.h"
10469$ac_includes_default
10470#include <mach/cthreads.h>
10471_ACEOF
10472rm -f conftest.$ac_objext
10473if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10474 (eval $ac_compile) 2>&5
10475 ac_status=$?
10476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10477 (exit $ac_status); } &&
10478 { ac_try='test -s conftest.$ac_objext'
10479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10480 (eval $ac_try) 2>&5
10481 ac_status=$?
10482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10483 (exit $ac_status); }; }; then
10484 ac_header_compiler=yes
10485else
10486 echo "$as_me: failed program was:" >&5
10487cat conftest.$ac_ext >&5
10488ac_header_compiler=no
10489fi
10490rm -f conftest.$ac_objext conftest.$ac_ext
10491echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10492echo "${ECHO_T}$ac_header_compiler" >&6
10493
10494# Is the header present?
10495echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10496echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10497cat >conftest.$ac_ext <<_ACEOF
10498#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010499#include "confdefs.h"
10500#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010501_ACEOF
10502if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10503 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10504 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010505 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010506 rm -f conftest.er1
10507 cat conftest.err >&5
10508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10509 (exit $ac_status); } >/dev/null; then
10510 if test -s conftest.err; then
10511 ac_cpp_err=$ac_c_preproc_warn_flag
10512 else
10513 ac_cpp_err=
10514 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010515else
Martin v. Löwis11437992002-04-12 09:54:03 +000010516 ac_cpp_err=yes
10517fi
10518if test -z "$ac_cpp_err"; then
10519 ac_header_preproc=yes
10520else
10521 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010522 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010523 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010524fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010525rm -f conftest.err conftest.$ac_ext
10526echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10527echo "${ECHO_T}$ac_header_preproc" >&6
10528
10529# So? What about this header?
10530case $ac_header_compiler:$ac_header_preproc in
10531 yes:no )
10532 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10533echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10534 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10535echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10536 no:yes )
10537 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10538echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10539 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10540echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10541 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10542echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10543esac
10544echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10545echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10546if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10547 echo $ECHO_N "(cached) $ECHO_C" >&6
10548else
10549 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010550fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010551echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10552echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10553
10554fi
10555if test $ac_cv_header_mach_cthreads_h = yes; then
10556 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010557#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010558_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010559
Martin v. Löwis11437992002-04-12 09:54:03 +000010560 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010561#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010562_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010563
Martin v. Löwis11437992002-04-12 09:54:03 +000010564
10565cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010566#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010567_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010568
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010569 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010570else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010571
Martin v. Löwis11437992002-04-12 09:54:03 +000010572 echo "$as_me:$LINENO: checking for --with-pth" >&5
10573echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10574
10575# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010576if test "${with_pth+set}" = set; then
10577 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010578 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010579echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010580 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010581#define WITH_THREAD 1
10582_ACEOF
10583
10584
10585cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010586#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010587_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010588
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010589 LIBS="-lpth $LIBS"
10590 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010591else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010592 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010593echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010594
10595 # Just looking for pthread_create in libpthread is not enough:
10596 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10597 # So we really have to include pthread.h, and then link.
10598 _libs=$LIBS
10599 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010600 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10601echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10602 cat >conftest.$ac_ext <<_ACEOF
10603#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010604#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010605#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010606
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010607void * start_routine (void *arg) { exit (0); }
Barry Warsawfe33b792003-01-07 22:42:49 +000010608#ifdef F77_DUMMY_MAIN
10609# ifdef __cplusplus
10610 extern "C"
10611# endif
10612 int F77_DUMMY_MAIN() { return 1; }
10613#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010614int
10615main ()
10616{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010617
10618pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010619 ;
10620 return 0;
10621}
10622_ACEOF
10623rm -f conftest.$ac_objext conftest$ac_exeext
10624if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10625 (eval $ac_link) 2>&5
10626 ac_status=$?
10627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10628 (exit $ac_status); } &&
10629 { ac_try='test -s conftest$ac_exeext'
10630 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10631 (eval $ac_try) 2>&5
10632 ac_status=$?
10633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10634 (exit $ac_status); }; }; then
10635
10636 echo "$as_me:$LINENO: result: yes" >&5
10637echo "${ECHO_T}yes" >&6
10638 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010639#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010640_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010641
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010642 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010643 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010644else
Martin v. Löwis11437992002-04-12 09:54:03 +000010645 echo "$as_me: failed program was:" >&5
10646cat conftest.$ac_ext >&5
10647
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010648 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010649 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10650echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10651if test "${ac_cv_func_pthread_detach+set}" = set; then
10652 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010653else
Martin v. Löwis11437992002-04-12 09:54:03 +000010654 cat >conftest.$ac_ext <<_ACEOF
10655#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010656#include "confdefs.h"
10657/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010658 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010659#include <assert.h>
10660/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010661#ifdef __cplusplus
10662extern "C"
10663#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010664/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010665 builtin and then its argument prototype would still apply. */
10666char pthread_detach ();
10667char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010668
Barry Warsawfe33b792003-01-07 22:42:49 +000010669#ifdef F77_DUMMY_MAIN
10670# ifdef __cplusplus
10671 extern "C"
10672# endif
10673 int F77_DUMMY_MAIN() { return 1; }
10674#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010675int
10676main ()
10677{
Guido van Rossumad678af1998-10-02 14:42:15 +000010678/* The GNU C library defines this for functions which it implements
10679 to always fail with ENOSYS. Some functions are actually named
10680 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010681#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010682choke me
10683#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010684f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +000010685#endif
10686
Martin v. Löwis11437992002-04-12 09:54:03 +000010687 ;
10688 return 0;
10689}
10690_ACEOF
10691rm -f conftest.$ac_objext conftest$ac_exeext
10692if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10693 (eval $ac_link) 2>&5
10694 ac_status=$?
10695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10696 (exit $ac_status); } &&
10697 { ac_try='test -s conftest$ac_exeext'
10698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10699 (eval $ac_try) 2>&5
10700 ac_status=$?
10701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10702 (exit $ac_status); }; }; then
10703 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010704else
Martin v. Löwis11437992002-04-12 09:54:03 +000010705 echo "$as_me: failed program was:" >&5
10706cat conftest.$ac_ext >&5
10707ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010708fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010709rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010710fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010711echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10712echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10713if test $ac_cv_func_pthread_detach = yes; then
10714 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010715#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010716_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010717
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010718 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010719 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010720else
Guido van Rossumad678af1998-10-02 14:42:15 +000010721
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010722 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10723 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10724echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10725if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10726 echo $ECHO_N "(cached) $ECHO_C" >&6
10727fi
10728echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10729echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10730else
10731 # Is the header compilable?
10732echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10733echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10734cat >conftest.$ac_ext <<_ACEOF
10735#line $LINENO "configure"
10736#include "confdefs.h"
10737$ac_includes_default
10738#include <atheos/threads.h>
10739_ACEOF
10740rm -f conftest.$ac_objext
10741if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10742 (eval $ac_compile) 2>&5
10743 ac_status=$?
10744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10745 (exit $ac_status); } &&
10746 { ac_try='test -s conftest.$ac_objext'
10747 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10748 (eval $ac_try) 2>&5
10749 ac_status=$?
10750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10751 (exit $ac_status); }; }; then
10752 ac_header_compiler=yes
10753else
10754 echo "$as_me: failed program was:" >&5
10755cat conftest.$ac_ext >&5
10756ac_header_compiler=no
10757fi
10758rm -f conftest.$ac_objext conftest.$ac_ext
10759echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10760echo "${ECHO_T}$ac_header_compiler" >&6
10761
10762# Is the header present?
10763echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10764echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10765cat >conftest.$ac_ext <<_ACEOF
10766#line $LINENO "configure"
10767#include "confdefs.h"
10768#include <atheos/threads.h>
10769_ACEOF
10770if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10771 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10772 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010773 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010774 rm -f conftest.er1
10775 cat conftest.err >&5
10776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10777 (exit $ac_status); } >/dev/null; then
10778 if test -s conftest.err; then
10779 ac_cpp_err=$ac_c_preproc_warn_flag
10780 else
10781 ac_cpp_err=
10782 fi
10783else
10784 ac_cpp_err=yes
10785fi
10786if test -z "$ac_cpp_err"; then
10787 ac_header_preproc=yes
10788else
10789 echo "$as_me: failed program was:" >&5
10790 cat conftest.$ac_ext >&5
10791 ac_header_preproc=no
10792fi
10793rm -f conftest.err conftest.$ac_ext
10794echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10795echo "${ECHO_T}$ac_header_preproc" >&6
10796
10797# So? What about this header?
10798case $ac_header_compiler:$ac_header_preproc in
10799 yes:no )
10800 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10801echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10802 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10803echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10804 no:yes )
10805 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10806echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10807 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10808echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10809 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10810echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10811esac
10812echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10813echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10814if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10815 echo $ECHO_N "(cached) $ECHO_C" >&6
10816else
10817 ac_cv_header_atheos_threads_h=$ac_header_preproc
10818fi
10819echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10820echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10821
10822fi
10823if test $ac_cv_header_atheos_threads_h = yes; then
10824 cat >>confdefs.h <<\_ACEOF
10825#define WITH_THREAD 1
10826_ACEOF
10827
10828
10829cat >>confdefs.h <<\_ACEOF
10830#define ATHEOS_THREADS 1
10831_ACEOF
10832
10833 THREADOBJ="Python/thread.o"
10834else
10835
Martin v. Löwis11437992002-04-12 09:54:03 +000010836 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10837 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10838echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10839if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10840 echo $ECHO_N "(cached) $ECHO_C" >&6
10841fi
10842echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10843echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010844else
Martin v. Löwis11437992002-04-12 09:54:03 +000010845 # Is the header compilable?
10846echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10847echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10848cat >conftest.$ac_ext <<_ACEOF
10849#line $LINENO "configure"
10850#include "confdefs.h"
10851$ac_includes_default
10852#include <kernel/OS.h>
10853_ACEOF
10854rm -f conftest.$ac_objext
10855if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10856 (eval $ac_compile) 2>&5
10857 ac_status=$?
10858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10859 (exit $ac_status); } &&
10860 { ac_try='test -s conftest.$ac_objext'
10861 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10862 (eval $ac_try) 2>&5
10863 ac_status=$?
10864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10865 (exit $ac_status); }; }; then
10866 ac_header_compiler=yes
10867else
10868 echo "$as_me: failed program was:" >&5
10869cat conftest.$ac_ext >&5
10870ac_header_compiler=no
10871fi
10872rm -f conftest.$ac_objext conftest.$ac_ext
10873echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10874echo "${ECHO_T}$ac_header_compiler" >&6
10875
10876# Is the header present?
10877echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10878echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10879cat >conftest.$ac_ext <<_ACEOF
10880#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010881#include "confdefs.h"
10882#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010883_ACEOF
10884if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10885 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10886 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010887 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010888 rm -f conftest.er1
10889 cat conftest.err >&5
10890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10891 (exit $ac_status); } >/dev/null; then
10892 if test -s conftest.err; then
10893 ac_cpp_err=$ac_c_preproc_warn_flag
10894 else
10895 ac_cpp_err=
10896 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010897else
Martin v. Löwis11437992002-04-12 09:54:03 +000010898 ac_cpp_err=yes
10899fi
10900if test -z "$ac_cpp_err"; then
10901 ac_header_preproc=yes
10902else
10903 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010904 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010905 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010906fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010907rm -f conftest.err conftest.$ac_ext
10908echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10909echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010910
Martin v. Löwis11437992002-04-12 09:54:03 +000010911# So? What about this header?
10912case $ac_header_compiler:$ac_header_preproc in
10913 yes:no )
10914 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10915echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10916 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10917echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10918 no:yes )
10919 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10920echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10921 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10922echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10923 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10924echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10925esac
10926echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10927echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10928if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10929 echo $ECHO_N "(cached) $ECHO_C" >&6
10930else
10931 ac_cv_header_kernel_OS_h=$ac_header_preproc
10932fi
10933echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10934echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10935
10936fi
10937if test $ac_cv_header_kernel_OS_h = yes; then
10938 cat >>confdefs.h <<\_ACEOF
10939#define WITH_THREAD 1
10940_ACEOF
10941
10942
10943cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010944#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010945_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010946
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010947 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010948else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010949
Martin v. Löwis11437992002-04-12 09:54:03 +000010950 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10951echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10952if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10953 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010954else
Martin v. Löwis11437992002-04-12 09:54:03 +000010955 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010956LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010957cat >conftest.$ac_ext <<_ACEOF
10958#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010959#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010960
Greg Steinadf63d62000-07-05 10:38:09 +000010961/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010962#ifdef __cplusplus
10963extern "C"
10964#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010965/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010966 builtin and then its argument prototype would still apply. */
10967char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010968#ifdef F77_DUMMY_MAIN
10969# ifdef __cplusplus
10970 extern "C"
10971# endif
10972 int F77_DUMMY_MAIN() { return 1; }
10973#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010974int
10975main ()
10976{
10977pthread_create ();
10978 ;
10979 return 0;
10980}
10981_ACEOF
10982rm -f conftest.$ac_objext conftest$ac_exeext
10983if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10984 (eval $ac_link) 2>&5
10985 ac_status=$?
10986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10987 (exit $ac_status); } &&
10988 { ac_try='test -s conftest$ac_exeext'
10989 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10990 (eval $ac_try) 2>&5
10991 ac_status=$?
10992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10993 (exit $ac_status); }; }; then
10994 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010995else
Martin v. Löwis11437992002-04-12 09:54:03 +000010996 echo "$as_me: failed program was:" >&5
10997cat conftest.$ac_ext >&5
10998ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010999fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011000rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11001LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011002fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011003echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
11004echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
11005if test $ac_cv_lib_pthreads_pthread_create = yes; then
11006 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011007#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011008_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011009
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011010 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011011 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011012 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000011013else
Greg Steinadf63d62000-07-05 10:38:09 +000011014
Martin v. Löwis11437992002-04-12 09:54:03 +000011015 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
11016echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
11017if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
11018 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000011019else
Martin v. Löwis11437992002-04-12 09:54:03 +000011020 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011021LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011022cat >conftest.$ac_ext <<_ACEOF
11023#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000011024#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011025
Guido van Rossum49545951997-12-02 19:28:29 +000011026/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011027#ifdef __cplusplus
11028extern "C"
11029#endif
Guido van Rossum49545951997-12-02 19:28:29 +000011030/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011031 builtin and then its argument prototype would still apply. */
11032char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011033#ifdef F77_DUMMY_MAIN
11034# ifdef __cplusplus
11035 extern "C"
11036# endif
11037 int F77_DUMMY_MAIN() { return 1; }
11038#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011039int
11040main ()
11041{
11042pthread_create ();
11043 ;
11044 return 0;
11045}
11046_ACEOF
11047rm -f conftest.$ac_objext conftest$ac_exeext
11048if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11049 (eval $ac_link) 2>&5
11050 ac_status=$?
11051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11052 (exit $ac_status); } &&
11053 { ac_try='test -s conftest$ac_exeext'
11054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11055 (eval $ac_try) 2>&5
11056 ac_status=$?
11057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11058 (exit $ac_status); }; }; then
11059 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000011060else
Martin v. Löwis11437992002-04-12 09:54:03 +000011061 echo "$as_me: failed program was:" >&5
11062cat conftest.$ac_ext >&5
11063ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000011064fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011065rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11066LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000011067fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011068echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
11069echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
11070if test $ac_cv_lib_c_r_pthread_create = yes; then
11071 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011072#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011073_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011074
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011075 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011076 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011077 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011078else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011079
Martin v. Löwis11437992002-04-12 09:54:03 +000011080 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
11081echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
11082if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
11083 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011084else
Martin v. Löwis11437992002-04-12 09:54:03 +000011085 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011086LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011087cat >conftest.$ac_ext <<_ACEOF
11088#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011089#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011090
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011091/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011092#ifdef __cplusplus
11093extern "C"
11094#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011095/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011096 builtin and then its argument prototype would still apply. */
11097char __d6_pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011098#ifdef F77_DUMMY_MAIN
11099# ifdef __cplusplus
11100 extern "C"
11101# endif
11102 int F77_DUMMY_MAIN() { return 1; }
11103#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011104int
11105main ()
11106{
11107__d6_pthread_create ();
11108 ;
11109 return 0;
11110}
11111_ACEOF
11112rm -f conftest.$ac_objext conftest$ac_exeext
11113if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11114 (eval $ac_link) 2>&5
11115 ac_status=$?
11116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11117 (exit $ac_status); } &&
11118 { ac_try='test -s conftest$ac_exeext'
11119 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11120 (eval $ac_try) 2>&5
11121 ac_status=$?
11122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11123 (exit $ac_status); }; }; then
11124 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011125else
Martin v. Löwis11437992002-04-12 09:54:03 +000011126 echo "$as_me: failed program was:" >&5
11127cat conftest.$ac_ext >&5
11128ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011129fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011130rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11131LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011132fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011133echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
11134echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
11135if test $ac_cv_lib_thread___d6_pthread_create = yes; then
11136 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011137#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011138_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011139
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011140 echo Systems with __d6_pthread_create are not supported anymore.
11141 echo See README
11142 exit 1
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011143 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011144 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011145 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000011146else
Guido van Rossum49545951997-12-02 19:28:29 +000011147
Martin v. Löwis11437992002-04-12 09:54:03 +000011148 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
11149echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
11150if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
11151 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011152else
Martin v. Löwis11437992002-04-12 09:54:03 +000011153 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011154LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011155cat >conftest.$ac_ext <<_ACEOF
11156#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011157#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011158
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011159/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011160#ifdef __cplusplus
11161extern "C"
11162#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011163/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011164 builtin and then its argument prototype would still apply. */
11165char __pthread_create_system ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011166#ifdef F77_DUMMY_MAIN
11167# ifdef __cplusplus
11168 extern "C"
11169# endif
11170 int F77_DUMMY_MAIN() { return 1; }
11171#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011172int
11173main ()
11174{
11175__pthread_create_system ();
11176 ;
11177 return 0;
11178}
11179_ACEOF
11180rm -f conftest.$ac_objext conftest$ac_exeext
11181if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11182 (eval $ac_link) 2>&5
11183 ac_status=$?
11184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11185 (exit $ac_status); } &&
11186 { ac_try='test -s conftest$ac_exeext'
11187 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11188 (eval $ac_try) 2>&5
11189 ac_status=$?
11190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11191 (exit $ac_status); }; }; then
11192 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011193else
Martin v. Löwis11437992002-04-12 09:54:03 +000011194 echo "$as_me: failed program was:" >&5
11195cat conftest.$ac_ext >&5
11196ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011197fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011198rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11199LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011200fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011201echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11202echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
11203if test $ac_cv_lib_pthread___pthread_create_system = yes; then
11204 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011205#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011206_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011207
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011208 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011209 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011210 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011211else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011212
Martin v. Löwis11437992002-04-12 09:54:03 +000011213 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
11214echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
11215if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
11216 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000011217else
Martin v. Löwis11437992002-04-12 09:54:03 +000011218 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011219LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011220cat >conftest.$ac_ext <<_ACEOF
11221#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011222#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011223
Guido van Rossumb93a8621998-05-07 13:27:32 +000011224/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011225#ifdef __cplusplus
11226extern "C"
11227#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000011228/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011229 builtin and then its argument prototype would still apply. */
11230char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011231#ifdef F77_DUMMY_MAIN
11232# ifdef __cplusplus
11233 extern "C"
11234# endif
11235 int F77_DUMMY_MAIN() { return 1; }
11236#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011237int
11238main ()
11239{
11240pthread_create ();
11241 ;
11242 return 0;
11243}
11244_ACEOF
11245rm -f conftest.$ac_objext conftest$ac_exeext
11246if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11247 (eval $ac_link) 2>&5
11248 ac_status=$?
11249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11250 (exit $ac_status); } &&
11251 { ac_try='test -s conftest$ac_exeext'
11252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11253 (eval $ac_try) 2>&5
11254 ac_status=$?
11255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11256 (exit $ac_status); }; }; then
11257 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000011258else
Martin v. Löwis11437992002-04-12 09:54:03 +000011259 echo "$as_me: failed program was:" >&5
11260cat conftest.$ac_ext >&5
11261ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011262fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011263rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11264LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011265fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011266echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
11267echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
11268if test $ac_cv_lib_cma_pthread_create = yes; then
11269 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011270#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011271_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011272
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011273 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011274 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011275 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011276else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011277
Martin v. Löwis130fb172001-07-19 11:00:41 +000011278 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000011279fi
11280
Guido van Rossum627b2d71993-12-24 10:39:16 +000011281
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011282fi
11283
Guido van Rossum0be3e491997-05-22 20:33:33 +000011284fi
11285
Guido van Rossum49545951997-12-02 19:28:29 +000011286fi
11287
Guido van Rossumb93a8621998-05-07 13:27:32 +000011288fi
11289
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011290fi
11291
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011292
Michael W. Hudson54241132001-12-07 15:38:26 +000011293fi
11294
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011295
11296fi
11297
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011298fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011299rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11300fi;
11301fi
11302
11303
11304fi
11305
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011306
Michael W. Hudson54241132001-12-07 15:38:26 +000011307
Martin v. Löwis11437992002-04-12 09:54:03 +000011308 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11309echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11310if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11311 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011312else
Martin v. Löwis11437992002-04-12 09:54:03 +000011313 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011314LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011315cat >conftest.$ac_ext <<_ACEOF
11316#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011317#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011318
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011319/* 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
Guido van Rossum48bdbfc1996-05-28 22:53:48 +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 usconfig ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011326#ifdef F77_DUMMY_MAIN
11327# ifdef __cplusplus
11328 extern "C"
11329# endif
11330 int F77_DUMMY_MAIN() { return 1; }
11331#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011332int
11333main ()
11334{
11335usconfig ();
11336 ;
11337 return 0;
11338}
11339_ACEOF
11340rm -f conftest.$ac_objext conftest$ac_exeext
11341if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11342 (eval $ac_link) 2>&5
11343 ac_status=$?
11344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11345 (exit $ac_status); } &&
11346 { ac_try='test -s conftest$ac_exeext'
11347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11348 (eval $ac_try) 2>&5
11349 ac_status=$?
11350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11351 (exit $ac_status); }; }; then
11352 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011353else
Martin v. Löwis11437992002-04-12 09:54:03 +000011354 echo "$as_me: failed program was:" >&5
11355cat conftest.$ac_ext >&5
11356ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011357fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011358rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11359LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011360fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011361echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11362echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11363if test $ac_cv_lib_mpc_usconfig = yes; then
11364 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011365#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011366_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011367
Martin v. Löwis130fb172001-07-19 11:00:41 +000011368 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011369 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011370 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011371fi
11372
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011373
Neal Norwitza978ab02002-11-02 16:58:05 +000011374 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011375 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11376echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11377if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11378 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011379else
Martin v. Löwis11437992002-04-12 09:54:03 +000011380 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011381LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011382cat >conftest.$ac_ext <<_ACEOF
11383#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011384#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011385
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011386/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011387#ifdef __cplusplus
11388extern "C"
11389#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011390/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011391 builtin and then its argument prototype would still apply. */
11392char thr_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011393#ifdef F77_DUMMY_MAIN
11394# ifdef __cplusplus
11395 extern "C"
11396# endif
11397 int F77_DUMMY_MAIN() { return 1; }
11398#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011399int
11400main ()
11401{
11402thr_create ();
11403 ;
11404 return 0;
11405}
11406_ACEOF
11407rm -f conftest.$ac_objext conftest$ac_exeext
11408if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11409 (eval $ac_link) 2>&5
11410 ac_status=$?
11411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11412 (exit $ac_status); } &&
11413 { ac_try='test -s conftest$ac_exeext'
11414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11415 (eval $ac_try) 2>&5
11416 ac_status=$?
11417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11418 (exit $ac_status); }; }; then
11419 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011420else
Martin v. Löwis11437992002-04-12 09:54:03 +000011421 echo "$as_me: failed program was:" >&5
11422cat conftest.$ac_ext >&5
11423ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011424fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011425rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11426LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011427fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011428echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11429echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11430if test $ac_cv_lib_thread_thr_create = yes; then
11431 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011432#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011433_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011434
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011435 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011436 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011437 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011438fi
11439
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011440 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011441
Martin v. Löwis130fb172001-07-19 11:00:41 +000011442 if test "$USE_THREAD_MODULE" != "#"
11443 then
11444 # If the above checks didn't disable threads, (at least) OSF1
11445 # needs this '-threads' argument during linking.
11446 case $ac_sys_system in
11447 OSF1) LDLAST=-threads;;
11448 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011449 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011450fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011451
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011452if test "$posix_threads" = "yes"; then
11453 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011454
11455cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011456#define _POSIX_THREADS 1
11457_ACEOF
11458
11459 fi
11460
11461 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11462 case $ac_sys_system/$ac_sys_release in
11463 SunOS/5.6)
11464cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011465#define HAVE_PTHREAD_DESTRUCTOR 1
11466_ACEOF
11467
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011468 ;;
11469 SunOS/5.8)
11470cat >>confdefs.h <<\_ACEOF
11471#define HAVE_BROKEN_POSIX_SEMAPHORES 1
11472_ACEOF
11473
11474 ;;
11475 esac
11476
11477 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11478echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11479 if test "${ac_cv_pthread_system_supported+set}" = set; then
11480 echo $ECHO_N "(cached) $ECHO_C" >&6
11481else
11482 if test "$cross_compiling" = yes; then
11483 ac_cv_pthread_system_supported=no
11484else
11485 cat >conftest.$ac_ext <<_ACEOF
11486#line $LINENO "configure"
11487#include "confdefs.h"
11488#include <pthread.h>
11489 void *foo(void *parm) {
11490 return NULL;
11491 }
11492 main() {
11493 pthread_attr_t attr;
11494 pthread_t id;
11495 if (pthread_attr_init(&attr)) exit(-1);
11496 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
11497 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
11498 exit(0);
11499 }
11500_ACEOF
11501rm -f conftest$ac_exeext
11502if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11503 (eval $ac_link) 2>&5
11504 ac_status=$?
11505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11506 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11507 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11508 (eval $ac_try) 2>&5
11509 ac_status=$?
11510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11511 (exit $ac_status); }; }; then
11512 ac_cv_pthread_system_supported=yes
11513else
11514 echo "$as_me: program exited with status $ac_status" >&5
11515echo "$as_me: failed program was:" >&5
11516cat conftest.$ac_ext >&5
11517( exit $ac_status )
11518ac_cv_pthread_system_supported=no
11519fi
11520rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11521fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011522
Guido van Rossum627b2d71993-12-24 10:39:16 +000011523fi
11524
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011525 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11526echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
11527 if test "$ac_cv_pthread_system_supported" = "yes"; then
11528
11529cat >>confdefs.h <<\_ACEOF
11530#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
11531_ACEOF
11532
11533 fi
11534
11535for ac_func in pthread_sigmask
11536do
11537as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11538echo "$as_me:$LINENO: checking for $ac_func" >&5
11539echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11540if eval "test \"\${$as_ac_var+set}\" = set"; then
11541 echo $ECHO_N "(cached) $ECHO_C" >&6
11542else
11543 cat >conftest.$ac_ext <<_ACEOF
11544#line $LINENO "configure"
11545#include "confdefs.h"
11546/* System header to define __stub macros and hopefully few prototypes,
11547 which can conflict with char $ac_func (); below. */
11548#include <assert.h>
11549/* Override any gcc2 internal prototype to avoid an error. */
11550#ifdef __cplusplus
11551extern "C"
11552#endif
11553/* We use char because int might match the return type of a gcc2
11554 builtin and then its argument prototype would still apply. */
11555char $ac_func ();
11556char (*f) ();
11557
11558#ifdef F77_DUMMY_MAIN
11559# ifdef __cplusplus
11560 extern "C"
11561# endif
11562 int F77_DUMMY_MAIN() { return 1; }
11563#endif
11564int
11565main ()
11566{
11567/* The GNU C library defines this for functions which it implements
11568 to always fail with ENOSYS. Some functions are actually named
11569 something starting with __ and the normal name is an alias. */
11570#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11571choke me
11572#else
11573f = $ac_func;
11574#endif
11575
11576 ;
11577 return 0;
11578}
11579_ACEOF
11580rm -f conftest.$ac_objext conftest$ac_exeext
11581if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11582 (eval $ac_link) 2>&5
11583 ac_status=$?
11584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11585 (exit $ac_status); } &&
11586 { ac_try='test -s conftest$ac_exeext'
11587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11588 (eval $ac_try) 2>&5
11589 ac_status=$?
11590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11591 (exit $ac_status); }; }; then
11592 eval "$as_ac_var=yes"
11593else
11594 echo "$as_me: failed program was:" >&5
11595cat conftest.$ac_ext >&5
11596eval "$as_ac_var=no"
11597fi
11598rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11599fi
11600echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11601echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11602if test `eval echo '${'$as_ac_var'}'` = yes; then
11603 cat >>confdefs.h <<_ACEOF
11604#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11605_ACEOF
11606
11607fi
11608done
11609
11610fi
11611
11612
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011613# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011614
11615
11616echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11617echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011618# Check whether --enable-ipv6 or --disable-ipv6 was given.
11619if test "${enable_ipv6+set}" = set; then
11620 enableval="$enable_ipv6"
11621 case "$enableval" in
11622 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011623 echo "$as_me:$LINENO: result: no" >&5
11624echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011625 ipv6=no
11626 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011627 *) echo "$as_me:$LINENO: result: yes" >&5
11628echo "${ECHO_T}yes" >&6
11629 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011630#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011631_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011632
11633 ipv6=yes
11634 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011635 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011636else
Martin v. Löwis11437992002-04-12 09:54:03 +000011637
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011638 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011639 echo "$as_me:$LINENO: result: no" >&5
11640echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011641 ipv6=no
11642
11643else
Martin v. Löwis11437992002-04-12 09:54:03 +000011644 cat >conftest.$ac_ext <<_ACEOF
11645#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011646#include "confdefs.h"
11647 /* AF_INET6 available check */
11648#include <sys/types.h>
11649#include <sys/socket.h>
11650main()
11651{
11652 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11653 exit(1);
11654 else
11655 exit(0);
11656}
11657
Martin v. Löwis11437992002-04-12 09:54:03 +000011658_ACEOF
11659rm -f conftest$ac_exeext
11660if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11661 (eval $ac_link) 2>&5
11662 ac_status=$?
11663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11664 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11665 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11666 (eval $ac_try) 2>&5
11667 ac_status=$?
11668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11669 (exit $ac_status); }; }; then
11670 echo "$as_me:$LINENO: result: yes" >&5
11671echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011672 ipv6=yes
11673else
Martin v. Löwis11437992002-04-12 09:54:03 +000011674 echo "$as_me: program exited with status $ac_status" >&5
11675echo "$as_me: failed program was:" >&5
11676cat conftest.$ac_ext >&5
11677( exit $ac_status )
11678echo "$as_me:$LINENO: result: no" >&5
11679echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011680 ipv6=no
11681fi
Barry Warsawfe33b792003-01-07 22:42:49 +000011682rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011683fi
11684
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011685if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011686 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11687echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11688 cat >conftest.$ac_ext <<_ACEOF
11689#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011690#include "confdefs.h"
11691#include <sys/types.h>
11692#include <netinet/in.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000011693#ifdef F77_DUMMY_MAIN
11694# ifdef __cplusplus
11695 extern "C"
11696# endif
11697 int F77_DUMMY_MAIN() { return 1; }
11698#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011699int
11700main ()
11701{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011702struct sockaddr_in6 x;
11703x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011704 ;
11705 return 0;
11706}
11707_ACEOF
11708rm -f conftest.$ac_objext
11709if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11710 (eval $ac_compile) 2>&5
11711 ac_status=$?
11712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11713 (exit $ac_status); } &&
11714 { ac_try='test -s conftest.$ac_objext'
11715 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11716 (eval $ac_try) 2>&5
11717 ac_status=$?
11718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11719 (exit $ac_status); }; }; then
11720 echo "$as_me:$LINENO: result: yes" >&5
11721echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011722 ipv6=yes
11723else
Martin v. Löwis11437992002-04-12 09:54:03 +000011724 echo "$as_me: failed program was:" >&5
11725cat conftest.$ac_ext >&5
11726echo "$as_me:$LINENO: result: no" >&5
11727echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011728 ipv6=no
11729fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011730rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011731fi
11732
11733if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011734 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011735#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011736_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011737
11738fi
11739
Martin v. Löwis11437992002-04-12 09:54:03 +000011740fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011741
11742ipv6type=unknown
11743ipv6lib=none
11744ipv6trylibc=no
11745
11746if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011747 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11748echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011749 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11750 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011751 case $i in
11752 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011753 cat >conftest.$ac_ext <<_ACEOF
11754#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011755#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011756
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011757#include <netinet/in.h>
11758#ifdef IPV6_INRIA_VERSION
11759yes
11760#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011761_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011762if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011763 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011764 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011765fi
11766rm -f conftest*
11767
11768 ;;
11769 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011770 cat >conftest.$ac_ext <<_ACEOF
11771#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011772#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011773
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011774#include <netinet/in.h>
11775#ifdef __KAME__
11776yes
11777#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011778_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011779if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011780 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011781 ipv6type=$i;
11782 ipv6lib=inet6
11783 ipv6libdir=/usr/local/v6/lib
11784 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011785fi
11786rm -f conftest*
11787
11788 ;;
11789 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011790 cat >conftest.$ac_ext <<_ACEOF
11791#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011792#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011793
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011794#include <features.h>
11795#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11796yes
11797#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011798_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011799if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011800 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011801 ipv6type=$i;
11802 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011803fi
11804rm -f conftest*
11805
11806 ;;
11807 linux-inet6)
11808 if test -d /usr/inet6; then
11809 ipv6type=$i
11810 ipv6lib=inet6
11811 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011812 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011813 fi
11814 ;;
11815 solaris)
11816 if test -f /etc/netconfig; then
11817 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11818 ipv6type=$i
11819 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011820 fi
11821 fi
11822 ;;
11823 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011824 cat >conftest.$ac_ext <<_ACEOF
11825#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011826#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011827
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011828#include <sys/param.h>
11829#ifdef _TOSHIBA_INET6
11830yes
11831#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011832_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011833if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011834 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011835 ipv6type=$i;
11836 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011837 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011838fi
11839rm -f conftest*
11840
11841 ;;
11842 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011843 cat >conftest.$ac_ext <<_ACEOF
11844#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011845#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011846
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011847#include </usr/local/v6/include/sys/v6config.h>
11848#ifdef __V6D__
11849yes
11850#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011851_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011852if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011853 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011854 ipv6type=$i;
11855 ipv6lib=v6;
11856 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011857 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011858fi
11859rm -f conftest*
11860
11861 ;;
11862 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011863 cat >conftest.$ac_ext <<_ACEOF
11864#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011865#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011866
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011867#include <sys/param.h>
11868#ifdef _ZETA_MINAMI_INET6
11869yes
11870#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011871_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011872if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011873 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011874 ipv6type=$i;
11875 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011876 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011877fi
11878rm -f conftest*
11879
11880 ;;
11881 esac
11882 if test "$ipv6type" != "unknown"; then
11883 break
11884 fi
11885 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011886 echo "$as_me:$LINENO: result: $ipv6type" >&5
11887echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011888fi
11889
11890if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11891 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11892 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11893 echo "using lib$ipv6lib"
11894 else
11895 if test $ipv6trylibc = "yes"; then
11896 echo "using libc"
11897 else
11898 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11899 echo "You need to fetch lib$ipv6lib.a from appropriate"
11900 echo 'ipv6 kit and compile beforehand.'
11901 exit 1
11902 fi
11903 fi
11904fi
11905
Jack Jansen7b8c7542002-04-14 20:12:41 +000011906# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000011907echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
11908echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000011909
11910# Check whether --with-universal-newlines or --without-universal-newlines was given.
11911if test "${with_universal_newlines+set}" = set; then
11912 withval="$with_universal_newlines"
11913
11914fi;
11915
11916if test -z "$with_universal_newlines"
11917then with_universal_newlines="yes"
11918fi
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011919if test "$with_universal_newlines" = "no"
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011920then
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011921 echo --without-universal-newlines is unsupported, see README
11922 exit 1
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011923else
Martin v. Löwise8aea582002-04-16 05:51:02 +000011924
11925cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011926#define WITH_UNIVERSAL_NEWLINES 1
11927_ACEOF
11928
11929fi
11930echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11931echo "${ECHO_T}$with_universal_newlines" >&6
11932
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011933# Check for --with-doc-strings
11934echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11935echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11936
11937# Check whether --with-doc-strings or --without-doc-strings was given.
11938if test "${with_doc_strings+set}" = set; then
11939 withval="$with_doc_strings"
11940
11941fi;
11942
11943if test -z "$with_doc_strings"
11944then with_doc_strings="yes"
11945fi
11946if test "$with_doc_strings" != "no"
11947then
11948
11949cat >>confdefs.h <<\_ACEOF
11950#define WITH_DOC_STRINGS 1
11951_ACEOF
11952
11953fi
11954echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11955echo "${ECHO_T}$with_doc_strings" >&6
11956
Neil Schemenauera35c6882001-02-27 04:45:05 +000011957# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011958echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11959echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11960
Neil Schemenauera35c6882001-02-27 04:45:05 +000011961# Check whether --with-pymalloc or --without-pymalloc was given.
11962if test "${with_pymalloc+set}" = set; then
11963 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011964
Martin v. Löwis11437992002-04-12 09:54:03 +000011965fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011966
Neil Schemenauer16c22972002-03-22 15:34:49 +000011967if test -z "$with_pymalloc"
11968then with_pymalloc="yes"
11969fi
11970if test "$with_pymalloc" != "no"
11971then
Martin v. Löwis11437992002-04-12 09:54:03 +000011972
11973cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011974#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011975_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011976
11977fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011978echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11979echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011980
Barry Warsawef82cd72000-06-30 16:21:01 +000011981# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011982echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11983echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11984
Barry Warsawef82cd72000-06-30 16:21:01 +000011985# Check whether --with-wctype-functions or --without-wctype-functions was given.
11986if test "${with_wctype_functions+set}" = set; then
11987 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011988
Barry Warsawef82cd72000-06-30 16:21:01 +000011989if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011990then
11991
11992cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011993#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011994_ACEOF
11995
11996 echo "$as_me:$LINENO: result: yes" >&5
11997echo "${ECHO_T}yes" >&6
11998else echo "$as_me:$LINENO: result: no" >&5
11999echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000012000fi
12001else
Martin v. Löwis11437992002-04-12 09:54:03 +000012002 echo "$as_me:$LINENO: result: no" >&5
12003echo "${ECHO_T}no" >&6
12004fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000012005
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012006# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000012007
Guido van Rossum98935bf2001-09-05 19:13:16 +000012008DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000012009
Martin v. Löwis11437992002-04-12 09:54:03 +000012010echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
12011echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
12012
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012013# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012014if test "${with_sgi_dl+set}" = set; then
12015 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000012016
12017echo "$as_me:$LINENO: result: $withval" >&5
12018echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000012019echo --with-sgi-dl is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000012020exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012021
12022cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012023#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012024_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000012025
Guido van Rossume97ee181999-12-20 21:27:22 +000012026DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012027dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000012028if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000012029then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000012030else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
12031echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
12032 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012033fi
12034DLINCLDIR=${dldir}
12035LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000012036else
Martin v. Löwis11437992002-04-12 09:54:03 +000012037 echo "$as_me:$LINENO: result: no" >&5
12038echo "${ECHO_T}no" >&6
12039fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000012040
Martin v. Löwis11437992002-04-12 09:54:03 +000012041echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
12042echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000012043
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012044# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012045if test "${with_dl_dld+set}" = set; then
12046 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000012047
12048echo "$as_me:$LINENO: result: $withval" >&5
12049echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000012050echo --with-dl-dld is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000012051exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012052
12053cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012054#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012055_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000012056
Guido van Rossume97ee181999-12-20 21:27:22 +000012057DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012058dldir=`echo "$withval" | sed 's/,.*//'`
12059dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000012060if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000012061then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012062else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&5
12063echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&2;}
12064 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012065fi
12066DLINCLDIR=${dldir}
12067LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000012068else
Martin v. Löwis11437992002-04-12 09:54:03 +000012069 echo "$as_me:$LINENO: result: no" >&5
12070echo "${ECHO_T}no" >&6
12071fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000012072
Guido van Rossume97ee181999-12-20 21:27:22 +000012073# the dlopen() function means we might want to use dynload_shlib.o. some
12074# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012075
Thomas Wouters3a584202000-08-05 23:28:51 +000012076for ac_func in dlopen
12077do
Martin v. Löwis11437992002-04-12 09:54:03 +000012078as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12079echo "$as_me:$LINENO: checking for $ac_func" >&5
12080echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12081if eval "test \"\${$as_ac_var+set}\" = set"; then
12082 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012083else
Martin v. Löwis11437992002-04-12 09:54:03 +000012084 cat >conftest.$ac_ext <<_ACEOF
12085#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000012086#include "confdefs.h"
12087/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012088 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000012089#include <assert.h>
12090/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012091#ifdef __cplusplus
12092extern "C"
12093#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012094/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012095 builtin and then its argument prototype would still apply. */
12096char $ac_func ();
12097char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000012098
Barry Warsawfe33b792003-01-07 22:42:49 +000012099#ifdef F77_DUMMY_MAIN
12100# ifdef __cplusplus
12101 extern "C"
12102# endif
12103 int F77_DUMMY_MAIN() { return 1; }
12104#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012105int
12106main ()
12107{
Guido van Rossume97ee181999-12-20 21:27:22 +000012108/* The GNU C library defines this for functions which it implements
12109 to always fail with ENOSYS. Some functions are actually named
12110 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012111#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000012112choke me
12113#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012114f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000012115#endif
12116
Martin v. Löwis11437992002-04-12 09:54:03 +000012117 ;
12118 return 0;
12119}
12120_ACEOF
12121rm -f conftest.$ac_objext conftest$ac_exeext
12122if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12123 (eval $ac_link) 2>&5
12124 ac_status=$?
12125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12126 (exit $ac_status); } &&
12127 { ac_try='test -s conftest$ac_exeext'
12128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12129 (eval $ac_try) 2>&5
12130 ac_status=$?
12131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12132 (exit $ac_status); }; }; then
12133 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012134else
Martin v. Löwis11437992002-04-12 09:54:03 +000012135 echo "$as_me: failed program was:" >&5
12136cat conftest.$ac_ext >&5
12137eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012138fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012139rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012140fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012141echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12142echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12143if test `eval echo '${'$as_ac_var'}'` = yes; then
12144 cat >>confdefs.h <<_ACEOF
12145#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12146_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012147
Guido van Rossume97ee181999-12-20 21:27:22 +000012148fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012149done
Guido van Rossume97ee181999-12-20 21:27:22 +000012150
Michael W. Hudson54241132001-12-07 15:38:26 +000012151
Guido van Rossume97ee181999-12-20 21:27:22 +000012152# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12153# loading of modules.
12154
Martin v. Löwis11437992002-04-12 09:54:03 +000012155echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
12156echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012157if test -z "$DYNLOADFILE"
12158then
12159 case $ac_sys_system/$ac_sys_release in
12160 AIX*) DYNLOADFILE="dynload_aix.o";;
12161 BeOS*) DYNLOADFILE="dynload_beos.o";;
12162 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000012163 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012164 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000012165 *)
12166 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
12167 # out any dynamic loading
12168 if test "$ac_cv_func_dlopen" = yes
12169 then DYNLOADFILE="dynload_shlib.o"
12170 else DYNLOADFILE="dynload_stub.o"
12171 fi
12172 ;;
12173 esac
12174fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012175echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
12176echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012177if test "$DYNLOADFILE" != "dynload_stub.o"
12178then
Martin v. Löwis11437992002-04-12 09:54:03 +000012179
12180cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012181#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012182_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012183
12184fi
12185
Neil Schemenauer4e425612001-06-19 15:44:15 +000012186# MACHDEP_OBJS can be set to platform-specific object files needed by Python
12187
Michael W. Hudson54241132001-12-07 15:38:26 +000012188
Martin v. Löwis11437992002-04-12 09:54:03 +000012189echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
12190echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012191if test -z "$MACHDEP_OBJS"
12192then
Jack Jansene578a632001-08-15 01:27:14 +000012193 MACHDEP_OBJS=$extra_machdep_objs
12194else
12195 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000012196fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012197echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
12198echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012199
Guido van Rossum627b2d71993-12-24 10:39:16 +000012200# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
Martin v. Löwis9c36c292002-12-21 18:34:06 +000012274
Martin v. Löwisd5843682002-11-21 20:41:28 +000012275for ac_func in alarm chown clock confstr ctermid execv \
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012276 fchdir fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012277 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
12278 getpriority getpwent getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000012279 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000012280 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000012281 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000012282 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000012283 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012284 sigaction siginterrupt sigrelse strftime strptime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000012285 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012286 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000012287do
Martin v. Löwis11437992002-04-12 09:54:03 +000012288as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12289echo "$as_me:$LINENO: checking for $ac_func" >&5
12290echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12291if eval "test \"\${$as_ac_var+set}\" = set"; then
12292 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012293else
Martin v. Löwis11437992002-04-12 09:54:03 +000012294 cat >conftest.$ac_ext <<_ACEOF
12295#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012296#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012297/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012298 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012299#include <assert.h>
12300/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012301#ifdef __cplusplus
12302extern "C"
12303#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012304/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012305 builtin and then its argument prototype would still apply. */
12306char $ac_func ();
12307char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012308
Barry Warsawfe33b792003-01-07 22:42:49 +000012309#ifdef F77_DUMMY_MAIN
12310# ifdef __cplusplus
12311 extern "C"
12312# endif
12313 int F77_DUMMY_MAIN() { return 1; }
12314#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012315int
12316main ()
12317{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012318/* The GNU C library defines this for functions which it implements
12319 to always fail with ENOSYS. Some functions are actually named
12320 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012321#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012322choke me
12323#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012324f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012325#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012326
Martin v. Löwis11437992002-04-12 09:54:03 +000012327 ;
12328 return 0;
12329}
12330_ACEOF
12331rm -f conftest.$ac_objext conftest$ac_exeext
12332if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12333 (eval $ac_link) 2>&5
12334 ac_status=$?
12335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12336 (exit $ac_status); } &&
12337 { ac_try='test -s conftest$ac_exeext'
12338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12339 (eval $ac_try) 2>&5
12340 ac_status=$?
12341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12342 (exit $ac_status); }; }; then
12343 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012344else
Martin v. Löwis11437992002-04-12 09:54:03 +000012345 echo "$as_me: failed program was:" >&5
12346cat conftest.$ac_ext >&5
12347eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012348fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012349rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012350fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012351echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12352echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12353if test `eval echo '${'$as_ac_var'}'` = yes; then
12354 cat >>confdefs.h <<_ACEOF
12355#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12356_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012357
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012358fi
12359done
12360
Michael W. Hudson54241132001-12-07 15:38:26 +000012361
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012362# For some functions, having a definition is not sufficient, since
12363# we want to take their address.
12364echo "$as_me:$LINENO: checking for chroot" >&5
12365echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12366cat >conftest.$ac_ext <<_ACEOF
12367#line $LINENO "configure"
12368#include "confdefs.h"
12369#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012370#ifdef F77_DUMMY_MAIN
12371# ifdef __cplusplus
12372 extern "C"
12373# endif
12374 int F77_DUMMY_MAIN() { return 1; }
12375#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012376int
12377main ()
12378{
12379void *x=chroot
12380 ;
12381 return 0;
12382}
12383_ACEOF
12384rm -f conftest.$ac_objext
12385if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12386 (eval $ac_compile) 2>&5
12387 ac_status=$?
12388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12389 (exit $ac_status); } &&
12390 { ac_try='test -s conftest.$ac_objext'
12391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12392 (eval $ac_try) 2>&5
12393 ac_status=$?
12394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12395 (exit $ac_status); }; }; then
12396
12397cat >>confdefs.h <<\_ACEOF
12398#define HAVE_CHROOT 1
12399_ACEOF
12400
12401 echo "$as_me:$LINENO: result: yes" >&5
12402echo "${ECHO_T}yes" >&6
12403else
12404 echo "$as_me: failed program was:" >&5
12405cat conftest.$ac_ext >&5
12406echo "$as_me:$LINENO: result: no" >&5
12407echo "${ECHO_T}no" >&6
12408
12409fi
12410rm -f conftest.$ac_objext conftest.$ac_ext
12411echo "$as_me:$LINENO: checking for link" >&5
12412echo $ECHO_N "checking for link... $ECHO_C" >&6
12413cat >conftest.$ac_ext <<_ACEOF
12414#line $LINENO "configure"
12415#include "confdefs.h"
12416#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012417#ifdef F77_DUMMY_MAIN
12418# ifdef __cplusplus
12419 extern "C"
12420# endif
12421 int F77_DUMMY_MAIN() { return 1; }
12422#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012423int
12424main ()
12425{
12426void *x=link
12427 ;
12428 return 0;
12429}
12430_ACEOF
12431rm -f conftest.$ac_objext
12432if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12433 (eval $ac_compile) 2>&5
12434 ac_status=$?
12435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12436 (exit $ac_status); } &&
12437 { ac_try='test -s conftest.$ac_objext'
12438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12439 (eval $ac_try) 2>&5
12440 ac_status=$?
12441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12442 (exit $ac_status); }; }; then
12443
12444cat >>confdefs.h <<\_ACEOF
12445#define HAVE_LINK 1
12446_ACEOF
12447
12448 echo "$as_me:$LINENO: result: yes" >&5
12449echo "${ECHO_T}yes" >&6
12450else
12451 echo "$as_me: failed program was:" >&5
12452cat conftest.$ac_ext >&5
12453echo "$as_me:$LINENO: result: no" >&5
12454echo "${ECHO_T}no" >&6
12455
12456fi
12457rm -f conftest.$ac_objext conftest.$ac_ext
12458echo "$as_me:$LINENO: checking for symlink" >&5
12459echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12460cat >conftest.$ac_ext <<_ACEOF
12461#line $LINENO "configure"
12462#include "confdefs.h"
12463#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012464#ifdef F77_DUMMY_MAIN
12465# ifdef __cplusplus
12466 extern "C"
12467# endif
12468 int F77_DUMMY_MAIN() { return 1; }
12469#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012470int
12471main ()
12472{
12473void *x=symlink
12474 ;
12475 return 0;
12476}
12477_ACEOF
12478rm -f conftest.$ac_objext
12479if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12480 (eval $ac_compile) 2>&5
12481 ac_status=$?
12482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12483 (exit $ac_status); } &&
12484 { ac_try='test -s conftest.$ac_objext'
12485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12486 (eval $ac_try) 2>&5
12487 ac_status=$?
12488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12489 (exit $ac_status); }; }; then
12490
12491cat >>confdefs.h <<\_ACEOF
12492#define HAVE_SYMLINK 1
12493_ACEOF
12494
12495 echo "$as_me:$LINENO: result: yes" >&5
12496echo "${ECHO_T}yes" >&6
12497else
12498 echo "$as_me: failed program was:" >&5
12499cat conftest.$ac_ext >&5
12500echo "$as_me:$LINENO: result: no" >&5
12501echo "${ECHO_T}no" >&6
12502
12503fi
12504rm -f conftest.$ac_objext conftest.$ac_ext
12505
Martin v. Löwisd5843682002-11-21 20:41:28 +000012506# On some systems (eg. FreeBSD 5), we would find a definition of the
12507# functions ctermid_r, setgroups in the library, but no prototype
12508# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12509# address to avoid compiler warnings and potential miscompilations
12510# because of the missing prototypes.
12511
12512echo "$as_me:$LINENO: checking for ctermid_r" >&5
12513echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
12514cat >conftest.$ac_ext <<_ACEOF
12515#line $LINENO "configure"
12516#include "confdefs.h"
12517
12518#include "confdefs.h"
12519#include <stdio.h>
12520
Barry Warsawfe33b792003-01-07 22:42:49 +000012521#ifdef F77_DUMMY_MAIN
12522# ifdef __cplusplus
12523 extern "C"
12524# endif
12525 int F77_DUMMY_MAIN() { return 1; }
12526#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012527int
12528main ()
12529{
12530void* p = ctermid_r
12531 ;
12532 return 0;
12533}
12534_ACEOF
12535rm -f conftest.$ac_objext
12536if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12537 (eval $ac_compile) 2>&5
12538 ac_status=$?
12539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12540 (exit $ac_status); } &&
12541 { ac_try='test -s conftest.$ac_objext'
12542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12543 (eval $ac_try) 2>&5
12544 ac_status=$?
12545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12546 (exit $ac_status); }; }; then
12547
12548cat >>confdefs.h <<\_ACEOF
12549#define HAVE_CTERMID_R 1
12550_ACEOF
12551
12552 echo "$as_me:$LINENO: result: yes" >&5
12553echo "${ECHO_T}yes" >&6
12554else
12555 echo "$as_me: failed program was:" >&5
12556cat conftest.$ac_ext >&5
12557echo "$as_me:$LINENO: result: no" >&5
12558echo "${ECHO_T}no" >&6
12559
12560fi
12561rm -f conftest.$ac_objext conftest.$ac_ext
12562
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012563echo "$as_me:$LINENO: checking for flock" >&5
12564echo $ECHO_N "checking for flock... $ECHO_C" >&6
12565cat >conftest.$ac_ext <<_ACEOF
12566#line $LINENO "configure"
12567#include "confdefs.h"
12568
12569#include "confdefs.h"
12570#include <sys/file.h>
12571
12572#ifdef F77_DUMMY_MAIN
12573# ifdef __cplusplus
12574 extern "C"
12575# endif
12576 int F77_DUMMY_MAIN() { return 1; }
12577#endif
12578int
12579main ()
12580{
12581void* p = flock
12582 ;
12583 return 0;
12584}
12585_ACEOF
12586rm -f conftest.$ac_objext
12587if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12588 (eval $ac_compile) 2>&5
12589 ac_status=$?
12590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12591 (exit $ac_status); } &&
12592 { ac_try='test -s conftest.$ac_objext'
12593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12594 (eval $ac_try) 2>&5
12595 ac_status=$?
12596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12597 (exit $ac_status); }; }; then
12598
12599cat >>confdefs.h <<\_ACEOF
12600#define HAVE_FLOCK 1
12601_ACEOF
12602
12603 echo "$as_me:$LINENO: result: yes" >&5
12604echo "${ECHO_T}yes" >&6
12605else
12606 echo "$as_me: failed program was:" >&5
12607cat conftest.$ac_ext >&5
12608echo "$as_me:$LINENO: result: no" >&5
12609echo "${ECHO_T}no" >&6
12610
12611fi
12612rm -f conftest.$ac_objext conftest.$ac_ext
12613
12614echo "$as_me:$LINENO: checking for getpagesize" >&5
12615echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
12616cat >conftest.$ac_ext <<_ACEOF
12617#line $LINENO "configure"
12618#include "confdefs.h"
12619
12620#include "confdefs.h"
12621#include <unistd.h>
12622
12623#ifdef F77_DUMMY_MAIN
12624# ifdef __cplusplus
12625 extern "C"
12626# endif
12627 int F77_DUMMY_MAIN() { return 1; }
12628#endif
12629int
12630main ()
12631{
12632void* p = getpagesize
12633 ;
12634 return 0;
12635}
12636_ACEOF
12637rm -f conftest.$ac_objext
12638if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12639 (eval $ac_compile) 2>&5
12640 ac_status=$?
12641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12642 (exit $ac_status); } &&
12643 { ac_try='test -s conftest.$ac_objext'
12644 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12645 (eval $ac_try) 2>&5
12646 ac_status=$?
12647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12648 (exit $ac_status); }; }; then
12649
12650cat >>confdefs.h <<\_ACEOF
12651#define HAVE_GETPAGESIZE 1
12652_ACEOF
12653
12654 echo "$as_me:$LINENO: result: yes" >&5
12655echo "${ECHO_T}yes" >&6
12656else
12657 echo "$as_me: failed program was:" >&5
12658cat conftest.$ac_ext >&5
12659echo "$as_me:$LINENO: result: no" >&5
12660echo "${ECHO_T}no" >&6
12661
12662fi
12663rm -f conftest.$ac_objext conftest.$ac_ext
12664
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012665for ac_prog in true
12666do
12667 # Extract the first word of "$ac_prog", so it can be a program name with args.
12668set dummy $ac_prog; ac_word=$2
12669echo "$as_me:$LINENO: checking for $ac_word" >&5
12670echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12671if test "${ac_cv_prog_TRUE+set}" = set; then
12672 echo $ECHO_N "(cached) $ECHO_C" >&6
12673else
12674 if test -n "$TRUE"; then
12675 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12676else
12677as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12678for as_dir in $PATH
12679do
12680 IFS=$as_save_IFS
12681 test -z "$as_dir" && as_dir=.
12682 for ac_exec_ext in '' $ac_executable_extensions; do
12683 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12684 ac_cv_prog_TRUE="$ac_prog"
12685 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12686 break 2
12687 fi
12688done
12689done
12690
12691fi
12692fi
12693TRUE=$ac_cv_prog_TRUE
12694if test -n "$TRUE"; then
12695 echo "$as_me:$LINENO: result: $TRUE" >&5
12696echo "${ECHO_T}$TRUE" >&6
12697else
12698 echo "$as_me:$LINENO: result: no" >&5
12699echo "${ECHO_T}no" >&6
12700fi
12701
12702 test -n "$TRUE" && break
12703done
12704test -n "$TRUE" || TRUE="/bin/true"
12705
12706
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012707echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
12708echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
12709if test "${ac_cv_lib_c_inet_aton+set}" = set; then
12710 echo $ECHO_N "(cached) $ECHO_C" >&6
12711else
12712 ac_check_lib_save_LIBS=$LIBS
12713LIBS="-lc $LIBS"
12714cat >conftest.$ac_ext <<_ACEOF
12715#line $LINENO "configure"
12716#include "confdefs.h"
12717
12718/* Override any gcc2 internal prototype to avoid an error. */
12719#ifdef __cplusplus
12720extern "C"
12721#endif
12722/* We use char because int might match the return type of a gcc2
12723 builtin and then its argument prototype would still apply. */
12724char inet_aton ();
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{
12734inet_aton ();
12735 ;
12736 return 0;
12737}
12738_ACEOF
12739rm -f conftest.$ac_objext conftest$ac_exeext
12740if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12741 (eval $ac_link) 2>&5
12742 ac_status=$?
12743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12744 (exit $ac_status); } &&
12745 { ac_try='test -s conftest$ac_exeext'
12746 { (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 ac_cv_lib_c_inet_aton=yes
12752else
12753 echo "$as_me: failed program was:" >&5
12754cat conftest.$ac_ext >&5
12755ac_cv_lib_c_inet_aton=no
12756fi
12757rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12758LIBS=$ac_check_lib_save_LIBS
12759fi
12760echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
12761echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
12762if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012763 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012764else
12765
12766echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
12767echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
12768if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
12769 echo $ECHO_N "(cached) $ECHO_C" >&6
12770else
12771 ac_check_lib_save_LIBS=$LIBS
12772LIBS="-lresolv $LIBS"
12773cat >conftest.$ac_ext <<_ACEOF
12774#line $LINENO "configure"
12775#include "confdefs.h"
12776
12777/* Override any gcc2 internal prototype to avoid an error. */
12778#ifdef __cplusplus
12779extern "C"
12780#endif
12781/* We use char because int might match the return type of a gcc2
12782 builtin and then its argument prototype would still apply. */
12783char inet_aton ();
12784#ifdef F77_DUMMY_MAIN
12785# ifdef __cplusplus
12786 extern "C"
12787# endif
12788 int F77_DUMMY_MAIN() { return 1; }
12789#endif
12790int
12791main ()
12792{
12793inet_aton ();
12794 ;
12795 return 0;
12796}
12797_ACEOF
12798rm -f conftest.$ac_objext conftest$ac_exeext
12799if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12800 (eval $ac_link) 2>&5
12801 ac_status=$?
12802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12803 (exit $ac_status); } &&
12804 { ac_try='test -s conftest$ac_exeext'
12805 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12806 (eval $ac_try) 2>&5
12807 ac_status=$?
12808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12809 (exit $ac_status); }; }; then
12810 ac_cv_lib_resolv_inet_aton=yes
12811else
12812 echo "$as_me: failed program was:" >&5
12813cat conftest.$ac_ext >&5
12814ac_cv_lib_resolv_inet_aton=no
12815fi
12816rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12817LIBS=$ac_check_lib_save_LIBS
12818fi
12819echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
12820echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
12821if test $ac_cv_lib_resolv_inet_aton = yes; then
12822 cat >>confdefs.h <<_ACEOF
12823#define HAVE_LIBRESOLV 1
12824_ACEOF
12825
12826 LIBS="-lresolv $LIBS"
12827
12828fi
12829
12830
12831fi
12832
12833
Martin v. Löwise9416172003-05-03 10:12:45 +000012834echo "$as_me:$LINENO: checking for hstrerror" >&5
12835echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
12836cat >conftest.$ac_ext <<_ACEOF
12837#line $LINENO "configure"
12838#include "confdefs.h"
12839
12840#include "confdefs.h"
12841#include <netdb.h>
12842
12843#ifdef F77_DUMMY_MAIN
12844# ifdef __cplusplus
12845 extern "C"
12846# endif
12847 int F77_DUMMY_MAIN() { return 1; }
12848#endif
12849int
12850main ()
12851{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012852void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012853 ;
12854 return 0;
12855}
12856_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012857rm -f conftest.$ac_objext conftest$ac_exeext
12858if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12859 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000012860 ac_status=$?
12861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12862 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012863 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000012864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12865 (eval $ac_try) 2>&5
12866 ac_status=$?
12867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12868 (exit $ac_status); }; }; then
12869
12870cat >>confdefs.h <<\_ACEOF
12871#define HAVE_HSTRERROR 1
12872_ACEOF
12873
12874 echo "$as_me:$LINENO: result: yes" >&5
12875echo "${ECHO_T}yes" >&6
12876else
12877 echo "$as_me: failed program was:" >&5
12878cat conftest.$ac_ext >&5
12879echo "$as_me:$LINENO: result: no" >&5
12880echo "${ECHO_T}no" >&6
12881
12882fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012883rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012884
12885echo "$as_me:$LINENO: checking for inet_aton" >&5
12886echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
12887cat >conftest.$ac_ext <<_ACEOF
12888#line $LINENO "configure"
12889#include "confdefs.h"
12890
12891#include "confdefs.h"
12892#include <sys/socket.h>
12893#include <netinet/in.h>
12894#include <arpa/inet.h>
12895
12896#ifdef F77_DUMMY_MAIN
12897# ifdef __cplusplus
12898 extern "C"
12899# endif
12900 int F77_DUMMY_MAIN() { return 1; }
12901#endif
12902int
12903main ()
12904{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012905void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012906 ;
12907 return 0;
12908}
12909_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012910rm -f conftest.$ac_objext conftest$ac_exeext
12911if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12912 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000012913 ac_status=$?
12914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12915 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012916 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000012917 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12918 (eval $ac_try) 2>&5
12919 ac_status=$?
12920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12921 (exit $ac_status); }; }; then
12922
12923cat >>confdefs.h <<\_ACEOF
12924#define HAVE_INET_ATON 1
12925_ACEOF
12926
12927 echo "$as_me:$LINENO: result: yes" >&5
12928echo "${ECHO_T}yes" >&6
12929else
12930 echo "$as_me: failed program was:" >&5
12931cat conftest.$ac_ext >&5
12932echo "$as_me:$LINENO: result: no" >&5
12933echo "${ECHO_T}no" >&6
12934
12935fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012936rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012937
12938echo "$as_me:$LINENO: checking for inet_pton" >&5
12939echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
12940cat >conftest.$ac_ext <<_ACEOF
12941#line $LINENO "configure"
12942#include "confdefs.h"
12943
12944#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012945#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012946#include <sys/socket.h>
12947#include <netinet/in.h>
12948#include <arpa/inet.h>
12949
12950#ifdef F77_DUMMY_MAIN
12951# ifdef __cplusplus
12952 extern "C"
12953# endif
12954 int F77_DUMMY_MAIN() { return 1; }
12955#endif
12956int
12957main ()
12958{
12959void* p = inet_pton
12960 ;
12961 return 0;
12962}
12963_ACEOF
12964rm -f conftest.$ac_objext
12965if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12966 (eval $ac_compile) 2>&5
12967 ac_status=$?
12968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12969 (exit $ac_status); } &&
12970 { ac_try='test -s conftest.$ac_objext'
12971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12972 (eval $ac_try) 2>&5
12973 ac_status=$?
12974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12975 (exit $ac_status); }; }; then
12976
12977cat >>confdefs.h <<\_ACEOF
12978#define HAVE_INET_PTON 1
12979_ACEOF
12980
12981 echo "$as_me:$LINENO: result: yes" >&5
12982echo "${ECHO_T}yes" >&6
12983else
12984 echo "$as_me: failed program was:" >&5
12985cat conftest.$ac_ext >&5
12986echo "$as_me:$LINENO: result: no" >&5
12987echo "${ECHO_T}no" >&6
12988
12989fi
12990rm -f conftest.$ac_objext conftest.$ac_ext
12991
Martin v. Löwisd5843682002-11-21 20:41:28 +000012992echo "$as_me:$LINENO: checking for setgroups" >&5
12993echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
12994cat >conftest.$ac_ext <<_ACEOF
12995#line $LINENO "configure"
12996#include "confdefs.h"
12997
12998#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012999#include <unistd.h>
Martin v. Löwisd5843682002-11-21 20:41:28 +000013000
Barry Warsawfe33b792003-01-07 22:42:49 +000013001#ifdef F77_DUMMY_MAIN
13002# ifdef __cplusplus
13003 extern "C"
13004# endif
13005 int F77_DUMMY_MAIN() { return 1; }
13006#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000013007int
13008main ()
13009{
13010void* p = setgroups
13011 ;
13012 return 0;
13013}
13014_ACEOF
13015rm -f conftest.$ac_objext
13016if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13017 (eval $ac_compile) 2>&5
13018 ac_status=$?
13019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13020 (exit $ac_status); } &&
13021 { ac_try='test -s conftest.$ac_objext'
13022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13023 (eval $ac_try) 2>&5
13024 ac_status=$?
13025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13026 (exit $ac_status); }; }; then
13027
13028cat >>confdefs.h <<\_ACEOF
13029#define HAVE_SETGROUPS 1
13030_ACEOF
13031
13032 echo "$as_me:$LINENO: result: yes" >&5
13033echo "${ECHO_T}yes" >&6
13034else
13035 echo "$as_me: failed program was:" >&5
13036cat conftest.$ac_ext >&5
13037echo "$as_me:$LINENO: result: no" >&5
13038echo "${ECHO_T}no" >&6
13039
13040fi
13041rm -f conftest.$ac_objext conftest.$ac_ext
13042
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013043# check for openpty and forkpty
13044
Martin v. Löwis11437992002-04-12 09:54:03 +000013045
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013046for ac_func in openpty
13047do
Martin v. Löwis11437992002-04-12 09:54:03 +000013048as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13049echo "$as_me:$LINENO: checking for $ac_func" >&5
13050echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13051if eval "test \"\${$as_ac_var+set}\" = set"; then
13052 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013053else
Martin v. Löwis11437992002-04-12 09:54:03 +000013054 cat >conftest.$ac_ext <<_ACEOF
13055#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013056#include "confdefs.h"
13057/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013058 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013059#include <assert.h>
13060/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013061#ifdef __cplusplus
13062extern "C"
13063#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013064/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013065 builtin and then its argument prototype would still apply. */
13066char $ac_func ();
13067char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013068
Barry Warsawfe33b792003-01-07 22:42:49 +000013069#ifdef F77_DUMMY_MAIN
13070# ifdef __cplusplus
13071 extern "C"
13072# endif
13073 int F77_DUMMY_MAIN() { return 1; }
13074#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013075int
13076main ()
13077{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013078/* The GNU C library defines this for functions which it implements
13079 to always fail with ENOSYS. Some functions are actually named
13080 something starting with __ and the normal name is an alias. */
13081#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13082choke me
13083#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013084f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013085#endif
13086
Martin v. Löwis11437992002-04-12 09:54:03 +000013087 ;
13088 return 0;
13089}
13090_ACEOF
13091rm -f conftest.$ac_objext conftest$ac_exeext
13092if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13093 (eval $ac_link) 2>&5
13094 ac_status=$?
13095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13096 (exit $ac_status); } &&
13097 { ac_try='test -s conftest$ac_exeext'
13098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13099 (eval $ac_try) 2>&5
13100 ac_status=$?
13101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13102 (exit $ac_status); }; }; then
13103 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013104else
Martin v. Löwis11437992002-04-12 09:54:03 +000013105 echo "$as_me: failed program was:" >&5
13106cat conftest.$ac_ext >&5
13107eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013108fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013109rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013110fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013111echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13112echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13113if test `eval echo '${'$as_ac_var'}'` = yes; then
13114 cat >>confdefs.h <<_ACEOF
13115#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13116_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013117
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013118else
Martin v. Löwis11437992002-04-12 09:54:03 +000013119 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
13120echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
13121if test "${ac_cv_lib_util_openpty+set}" = set; then
13122 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013123else
Martin v. Löwis11437992002-04-12 09:54:03 +000013124 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013125LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013126cat >conftest.$ac_ext <<_ACEOF
13127#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013128#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013129
Fred Drake8cef4cf2000-06-28 16:40:38 +000013130/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013131#ifdef __cplusplus
13132extern "C"
13133#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013134/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013135 builtin and then its argument prototype would still apply. */
13136char openpty ();
Barry Warsawfe33b792003-01-07 22:42:49 +000013137#ifdef F77_DUMMY_MAIN
13138# ifdef __cplusplus
13139 extern "C"
13140# endif
13141 int F77_DUMMY_MAIN() { return 1; }
13142#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013143int
13144main ()
13145{
13146openpty ();
13147 ;
13148 return 0;
13149}
13150_ACEOF
13151rm -f conftest.$ac_objext conftest$ac_exeext
13152if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13153 (eval $ac_link) 2>&5
13154 ac_status=$?
13155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13156 (exit $ac_status); } &&
13157 { ac_try='test -s conftest$ac_exeext'
13158 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13159 (eval $ac_try) 2>&5
13160 ac_status=$?
13161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13162 (exit $ac_status); }; }; then
13163 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013164else
Martin v. Löwis11437992002-04-12 09:54:03 +000013165 echo "$as_me: failed program was:" >&5
13166cat conftest.$ac_ext >&5
13167ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013168fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013169rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13170LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013171fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013172echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
13173echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
13174if test $ac_cv_lib_util_openpty = yes; then
13175 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013176#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013177_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013178 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013179fi
13180
13181fi
13182done
13183
Martin v. Löwis11437992002-04-12 09:54:03 +000013184
Fred Drake8cef4cf2000-06-28 16:40:38 +000013185for ac_func in forkpty
13186do
Martin v. Löwis11437992002-04-12 09:54:03 +000013187as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13188echo "$as_me:$LINENO: checking for $ac_func" >&5
13189echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13190if eval "test \"\${$as_ac_var+set}\" = set"; then
13191 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013192else
Martin v. Löwis11437992002-04-12 09:54:03 +000013193 cat >conftest.$ac_ext <<_ACEOF
13194#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013195#include "confdefs.h"
13196/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013197 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000013198#include <assert.h>
13199/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013200#ifdef __cplusplus
13201extern "C"
13202#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013203/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013204 builtin and then its argument prototype would still apply. */
13205char $ac_func ();
13206char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000013207
Barry Warsawfe33b792003-01-07 22:42:49 +000013208#ifdef F77_DUMMY_MAIN
13209# ifdef __cplusplus
13210 extern "C"
13211# endif
13212 int F77_DUMMY_MAIN() { return 1; }
13213#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013214int
13215main ()
13216{
Fred Drake8cef4cf2000-06-28 16:40:38 +000013217/* The GNU C library defines this for functions which it implements
13218 to always fail with ENOSYS. Some functions are actually named
13219 something starting with __ and the normal name is an alias. */
13220#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13221choke me
13222#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013223f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000013224#endif
13225
Martin v. Löwis11437992002-04-12 09:54:03 +000013226 ;
13227 return 0;
13228}
13229_ACEOF
13230rm -f conftest.$ac_objext conftest$ac_exeext
13231if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13232 (eval $ac_link) 2>&5
13233 ac_status=$?
13234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13235 (exit $ac_status); } &&
13236 { ac_try='test -s conftest$ac_exeext'
13237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13238 (eval $ac_try) 2>&5
13239 ac_status=$?
13240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13241 (exit $ac_status); }; }; then
13242 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013243else
Martin v. Löwis11437992002-04-12 09:54:03 +000013244 echo "$as_me: failed program was:" >&5
13245cat conftest.$ac_ext >&5
13246eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013247fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013248rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013249fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013250echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13251echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13252if test `eval echo '${'$as_ac_var'}'` = yes; then
13253 cat >>confdefs.h <<_ACEOF
13254#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13255_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013256
Fred Drake8cef4cf2000-06-28 16:40:38 +000013257else
Martin v. Löwis11437992002-04-12 09:54:03 +000013258 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
13259echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
13260if test "${ac_cv_lib_util_forkpty+set}" = set; then
13261 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013262else
Martin v. Löwis11437992002-04-12 09:54:03 +000013263 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013264LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013265cat >conftest.$ac_ext <<_ACEOF
13266#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013267#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013268
Fred Drake8cef4cf2000-06-28 16:40:38 +000013269/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013270#ifdef __cplusplus
13271extern "C"
13272#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013273/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013274 builtin and then its argument prototype would still apply. */
13275char forkpty ();
Barry Warsawfe33b792003-01-07 22:42:49 +000013276#ifdef F77_DUMMY_MAIN
13277# ifdef __cplusplus
13278 extern "C"
13279# endif
13280 int F77_DUMMY_MAIN() { return 1; }
13281#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013282int
13283main ()
13284{
13285forkpty ();
13286 ;
13287 return 0;
13288}
13289_ACEOF
13290rm -f conftest.$ac_objext conftest$ac_exeext
13291if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13292 (eval $ac_link) 2>&5
13293 ac_status=$?
13294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13295 (exit $ac_status); } &&
13296 { ac_try='test -s conftest$ac_exeext'
13297 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13298 (eval $ac_try) 2>&5
13299 ac_status=$?
13300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13301 (exit $ac_status); }; }; then
13302 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013303else
Martin v. Löwis11437992002-04-12 09:54:03 +000013304 echo "$as_me: failed program was:" >&5
13305cat conftest.$ac_ext >&5
13306ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013307fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013308rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13309LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013310fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013311echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
13312echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
13313if test $ac_cv_lib_util_forkpty = yes; then
13314 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013315#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013316_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013317 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013318fi
13319
13320fi
13321done
13322
Jack Jansendd19cf82001-12-06 22:36:17 +000013323
Michael W. Hudson54241132001-12-07 15:38:26 +000013324# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013325
13326
13327
13328
13329
13330
Fred Drake8cef4cf2000-06-28 16:40:38 +000013331for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
13332do
Martin v. Löwis11437992002-04-12 09:54:03 +000013333as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13334echo "$as_me:$LINENO: checking for $ac_func" >&5
13335echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13336if eval "test \"\${$as_ac_var+set}\" = set"; then
13337 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013338else
Martin v. Löwis11437992002-04-12 09:54:03 +000013339 cat >conftest.$ac_ext <<_ACEOF
13340#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013341#include "confdefs.h"
13342/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013343 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013344#include <assert.h>
13345/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013346#ifdef __cplusplus
13347extern "C"
13348#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013349/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013350 builtin and then its argument prototype would still apply. */
13351char $ac_func ();
13352char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013353
Barry Warsawfe33b792003-01-07 22:42:49 +000013354#ifdef F77_DUMMY_MAIN
13355# ifdef __cplusplus
13356 extern "C"
13357# endif
13358 int F77_DUMMY_MAIN() { return 1; }
13359#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013360int
13361main ()
13362{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013363/* The GNU C library defines this for functions which it implements
13364 to always fail with ENOSYS. Some functions are actually named
13365 something starting with __ and the normal name is an alias. */
13366#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13367choke me
13368#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013369f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013370#endif
13371
Martin v. Löwis11437992002-04-12 09:54:03 +000013372 ;
13373 return 0;
13374}
13375_ACEOF
13376rm -f conftest.$ac_objext conftest$ac_exeext
13377if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13378 (eval $ac_link) 2>&5
13379 ac_status=$?
13380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13381 (exit $ac_status); } &&
13382 { ac_try='test -s conftest$ac_exeext'
13383 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13384 (eval $ac_try) 2>&5
13385 ac_status=$?
13386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13387 (exit $ac_status); }; }; then
13388 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013389else
Martin v. Löwis11437992002-04-12 09:54:03 +000013390 echo "$as_me: failed program was:" >&5
13391cat conftest.$ac_ext >&5
13392eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013393fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013394rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013395fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013396echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13397echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13398if test `eval echo '${'$as_ac_var'}'` = yes; then
13399 cat >>confdefs.h <<_ACEOF
13400#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13401_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000013402
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013403fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000013404done
13405
Michael W. Hudson54241132001-12-07 15:38:26 +000013406
Martin v. Löwis11437992002-04-12 09:54:03 +000013407
13408
13409
13410
13411
Martin v. Löwis1142de32002-03-29 16:28:31 +000013412for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000013413do
Martin v. Löwis11437992002-04-12 09:54:03 +000013414as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13415echo "$as_me:$LINENO: checking for $ac_func" >&5
13416echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13417if eval "test \"\${$as_ac_var+set}\" = set"; then
13418 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013419else
Martin v. Löwis11437992002-04-12 09:54:03 +000013420 cat >conftest.$ac_ext <<_ACEOF
13421#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013422#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013423/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013424 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013425#include <assert.h>
13426/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013427#ifdef __cplusplus
13428extern "C"
13429#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013430/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013431 builtin and then its argument prototype would still apply. */
13432char $ac_func ();
13433char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013434
Barry Warsawfe33b792003-01-07 22:42:49 +000013435#ifdef F77_DUMMY_MAIN
13436# ifdef __cplusplus
13437 extern "C"
13438# endif
13439 int F77_DUMMY_MAIN() { return 1; }
13440#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013441int
13442main ()
13443{
Guido van Rossum627b2d71993-12-24 10:39:16 +000013444/* The GNU C library defines this for functions which it implements
13445 to always fail with ENOSYS. Some functions are actually named
13446 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013447#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013448choke me
13449#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013450f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013451#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013452
Martin v. Löwis11437992002-04-12 09:54:03 +000013453 ;
13454 return 0;
13455}
13456_ACEOF
13457rm -f conftest.$ac_objext conftest$ac_exeext
13458if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13459 (eval $ac_link) 2>&5
13460 ac_status=$?
13461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13462 (exit $ac_status); } &&
13463 { ac_try='test -s conftest$ac_exeext'
13464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13465 (eval $ac_try) 2>&5
13466 ac_status=$?
13467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13468 (exit $ac_status); }; }; then
13469 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013470else
Martin v. Löwis11437992002-04-12 09:54:03 +000013471 echo "$as_me: failed program was:" >&5
13472cat conftest.$ac_ext >&5
13473eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013474fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013475rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000013476fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013477echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13478echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13479if test `eval echo '${'$as_ac_var'}'` = yes; then
13480 cat >>confdefs.h <<_ACEOF
13481#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13482_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000013483
Martin v. Löwis1142de32002-03-29 16:28:31 +000013484else
Martin v. Löwis11437992002-04-12 09:54:03 +000013485 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013486fi
13487done
13488
13489
Martin v. Löwis11437992002-04-12 09:54:03 +000013490
Martin v. Löwis1142de32002-03-29 16:28:31 +000013491for ac_func in getpgrp
13492do
Martin v. Löwis11437992002-04-12 09:54:03 +000013493as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13494echo "$as_me:$LINENO: checking for $ac_func" >&5
13495echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13496if eval "test \"\${$as_ac_var+set}\" = set"; then
13497 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000013498else
Martin v. Löwis11437992002-04-12 09:54:03 +000013499 cat >conftest.$ac_ext <<_ACEOF
13500#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013501#include "confdefs.h"
13502/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013503 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000013504#include <assert.h>
13505/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013506#ifdef __cplusplus
13507extern "C"
13508#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013509/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013510 builtin and then its argument prototype would still apply. */
13511char $ac_func ();
13512char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000013513
Barry Warsawfe33b792003-01-07 22:42:49 +000013514#ifdef F77_DUMMY_MAIN
13515# ifdef __cplusplus
13516 extern "C"
13517# endif
13518 int F77_DUMMY_MAIN() { return 1; }
13519#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013520int
13521main ()
13522{
Martin v. Löwis1142de32002-03-29 16:28:31 +000013523/* The GNU C library defines this for functions which it implements
13524 to always fail with ENOSYS. Some functions are actually named
13525 something starting with __ and the normal name is an alias. */
13526#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13527choke me
13528#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013529f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000013530#endif
13531
Martin v. Löwis11437992002-04-12 09:54:03 +000013532 ;
13533 return 0;
13534}
13535_ACEOF
13536rm -f conftest.$ac_objext conftest$ac_exeext
13537if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13538 (eval $ac_link) 2>&5
13539 ac_status=$?
13540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13541 (exit $ac_status); } &&
13542 { ac_try='test -s conftest$ac_exeext'
13543 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13544 (eval $ac_try) 2>&5
13545 ac_status=$?
13546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13547 (exit $ac_status); }; }; then
13548 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013549else
Martin v. Löwis11437992002-04-12 09:54:03 +000013550 echo "$as_me: failed program was:" >&5
13551cat conftest.$ac_ext >&5
13552eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013553fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013554rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013555fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013556echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13557echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13558if test `eval echo '${'$as_ac_var'}'` = yes; then
13559 cat >>confdefs.h <<_ACEOF
13560#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13561_ACEOF
13562 cat >conftest.$ac_ext <<_ACEOF
13563#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013564#include "confdefs.h"
13565#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000013566#ifdef F77_DUMMY_MAIN
13567# ifdef __cplusplus
13568 extern "C"
13569# endif
13570 int F77_DUMMY_MAIN() { return 1; }
13571#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013572int
13573main ()
13574{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013575getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013576 ;
13577 return 0;
13578}
13579_ACEOF
13580rm -f conftest.$ac_objext
13581if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13582 (eval $ac_compile) 2>&5
13583 ac_status=$?
13584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13585 (exit $ac_status); } &&
13586 { ac_try='test -s conftest.$ac_objext'
13587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13588 (eval $ac_try) 2>&5
13589 ac_status=$?
13590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13591 (exit $ac_status); }; }; then
13592
13593cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013594#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013595_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013596
Martin v. Löwis11437992002-04-12 09:54:03 +000013597
Guido van Rossumf78abae1997-01-21 22:02:36 +000013598else
Martin v. Löwis11437992002-04-12 09:54:03 +000013599 echo "$as_me: failed program was:" >&5
13600cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013601fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013602rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013603
Guido van Rossum627b2d71993-12-24 10:39:16 +000013604fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013605done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013606
Jack Jansen150753c2003-03-29 22:07:47 +000013607
13608for ac_func in setpgrp
13609do
13610as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13611echo "$as_me:$LINENO: checking for $ac_func" >&5
13612echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13613if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013614 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013615else
Martin v. Löwis11437992002-04-12 09:54:03 +000013616 cat >conftest.$ac_ext <<_ACEOF
13617#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013618#include "confdefs.h"
Jack Jansen150753c2003-03-29 22:07:47 +000013619/* System header to define __stub macros and hopefully few prototypes,
13620 which can conflict with char $ac_func (); below. */
13621#include <assert.h>
13622/* Override any gcc2 internal prototype to avoid an error. */
13623#ifdef __cplusplus
13624extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000013625#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013626/* We use char because int might match the return type of a gcc2
13627 builtin and then its argument prototype would still apply. */
13628char $ac_func ();
13629char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013630
Barry Warsawfe33b792003-01-07 22:42:49 +000013631#ifdef F77_DUMMY_MAIN
13632# ifdef __cplusplus
13633 extern "C"
13634# endif
13635 int F77_DUMMY_MAIN() { return 1; }
13636#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013637int
13638main ()
13639{
Jack Jansen150753c2003-03-29 22:07:47 +000013640/* The GNU C library defines this for functions which it implements
13641 to always fail with ENOSYS. Some functions are actually named
13642 something starting with __ and the normal name is an alias. */
13643#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13644choke me
13645#else
13646f = $ac_func;
13647#endif
13648
Martin v. Löwis11437992002-04-12 09:54:03 +000013649 ;
13650 return 0;
13651}
13652_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013653rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000013654if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13655 (eval $ac_link) 2>&5
13656 ac_status=$?
13657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013658 (exit $ac_status); } &&
13659 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013660 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13661 (eval $ac_try) 2>&5
13662 ac_status=$?
13663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13664 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000013665 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013666else
Jack Jansen150753c2003-03-29 22:07:47 +000013667 echo "$as_me: failed program was:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013668cat conftest.$ac_ext >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013669eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013670fi
Jack Jansen150753c2003-03-29 22:07:47 +000013671rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013672fi
Jack Jansen150753c2003-03-29 22:07:47 +000013673echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13674echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13675if test `eval echo '${'$as_ac_var'}'` = yes; then
13676 cat >>confdefs.h <<_ACEOF
13677#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13678_ACEOF
13679 cat >conftest.$ac_ext <<_ACEOF
13680#line $LINENO "configure"
13681#include "confdefs.h"
13682#include <unistd.h>
13683#ifdef F77_DUMMY_MAIN
13684# ifdef __cplusplus
13685 extern "C"
13686# endif
13687 int F77_DUMMY_MAIN() { return 1; }
13688#endif
13689int
13690main ()
13691{
13692setpgrp(0,0);
13693 ;
13694 return 0;
13695}
13696_ACEOF
13697rm -f conftest.$ac_objext
13698if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13699 (eval $ac_compile) 2>&5
13700 ac_status=$?
13701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13702 (exit $ac_status); } &&
13703 { ac_try='test -s conftest.$ac_objext'
13704 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13705 (eval $ac_try) 2>&5
13706 ac_status=$?
13707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13708 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013709
13710cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013711#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013712_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013713
Jack Jansen150753c2003-03-29 22:07:47 +000013714
13715else
13716 echo "$as_me: failed program was:" >&5
13717cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013718fi
Jack Jansen150753c2003-03-29 22:07:47 +000013719rm -f conftest.$ac_objext conftest.$ac_ext
13720
13721fi
13722done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013723
Martin v. Löwis11437992002-04-12 09:54:03 +000013724
Thomas Wouters3a584202000-08-05 23:28:51 +000013725for ac_func in gettimeofday
13726do
Martin v. Löwis11437992002-04-12 09:54:03 +000013727as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13728echo "$as_me:$LINENO: checking for $ac_func" >&5
13729echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13730if eval "test \"\${$as_ac_var+set}\" = set"; then
13731 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013732else
Martin v. Löwis11437992002-04-12 09:54:03 +000013733 cat >conftest.$ac_ext <<_ACEOF
13734#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013735#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013736/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013737 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013738#include <assert.h>
13739/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013740#ifdef __cplusplus
13741extern "C"
13742#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013743/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013744 builtin and then its argument prototype would still apply. */
13745char $ac_func ();
13746char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013747
Barry Warsawfe33b792003-01-07 22:42:49 +000013748#ifdef F77_DUMMY_MAIN
13749# ifdef __cplusplus
13750 extern "C"
13751# endif
13752 int F77_DUMMY_MAIN() { return 1; }
13753#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013754int
13755main ()
13756{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013757/* The GNU C library defines this for functions which it implements
13758 to always fail with ENOSYS. Some functions are actually named
13759 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013760#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013761choke me
13762#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013763f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013764#endif
13765
Martin v. Löwis11437992002-04-12 09:54:03 +000013766 ;
13767 return 0;
13768}
13769_ACEOF
13770rm -f conftest.$ac_objext conftest$ac_exeext
13771if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13772 (eval $ac_link) 2>&5
13773 ac_status=$?
13774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13775 (exit $ac_status); } &&
13776 { ac_try='test -s conftest$ac_exeext'
13777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13778 (eval $ac_try) 2>&5
13779 ac_status=$?
13780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13781 (exit $ac_status); }; }; then
13782 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013783else
Martin v. Löwis11437992002-04-12 09:54:03 +000013784 echo "$as_me: failed program was:" >&5
13785cat conftest.$ac_ext >&5
13786eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013787fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013788rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013789fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013790echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13791echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13792if test `eval echo '${'$as_ac_var'}'` = yes; then
13793 cat >>confdefs.h <<_ACEOF
13794#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13795_ACEOF
13796 cat >conftest.$ac_ext <<_ACEOF
13797#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013798#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013799#include <sys/time.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000013800#ifdef F77_DUMMY_MAIN
13801# ifdef __cplusplus
13802 extern "C"
13803# endif
13804 int F77_DUMMY_MAIN() { return 1; }
13805#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013806int
13807main ()
13808{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013809gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013810 ;
13811 return 0;
13812}
13813_ACEOF
13814rm -f conftest.$ac_objext
13815if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13816 (eval $ac_compile) 2>&5
13817 ac_status=$?
13818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13819 (exit $ac_status); } &&
13820 { ac_try='test -s conftest.$ac_objext'
13821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13822 (eval $ac_try) 2>&5
13823 ac_status=$?
13824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13825 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013826 :
13827else
Martin v. Löwis11437992002-04-12 09:54:03 +000013828 echo "$as_me: failed program was:" >&5
13829cat conftest.$ac_ext >&5
13830
13831cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013832#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013833_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013834
Martin v. Löwis11437992002-04-12 09:54:03 +000013835
Guido van Rossum627b2d71993-12-24 10:39:16 +000013836fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013837rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013838
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013839fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013840done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013841
Michael W. Hudson54241132001-12-07 15:38:26 +000013842
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013843echo "$as_me:$LINENO: checking for major" >&5
13844echo $ECHO_N "checking for major... $ECHO_C" >&6
13845cat >conftest.$ac_ext <<_ACEOF
13846#line $LINENO "configure"
13847#include "confdefs.h"
13848
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013849#if defined(MAJOR_IN_MKDEV)
13850#include <sys/mkdev.h>
13851#elif defined(MAJOR_IN_SYSMACROS)
13852#include <sys/sysmacros.h>
13853#else
13854#include <sys/types.h>
13855#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013856
Barry Warsawfe33b792003-01-07 22:42:49 +000013857#ifdef F77_DUMMY_MAIN
13858# ifdef __cplusplus
13859 extern "C"
13860# endif
13861 int F77_DUMMY_MAIN() { return 1; }
13862#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013863int
13864main ()
13865{
13866
13867 makedev(major(0),minor(0));
13868
13869 ;
13870 return 0;
13871}
13872_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000013873rm -f conftest.$ac_objext conftest$ac_exeext
13874if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13875 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013876 ac_status=$?
13877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13878 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000013879 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013880 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13881 (eval $ac_try) 2>&5
13882 ac_status=$?
13883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13884 (exit $ac_status); }; }; then
13885
13886
13887cat >>confdefs.h <<\_ACEOF
13888#define HAVE_DEVICE_MACROS 1
13889_ACEOF
13890
13891 echo "$as_me:$LINENO: result: yes" >&5
13892echo "${ECHO_T}yes" >&6
13893
13894else
13895 echo "$as_me: failed program was:" >&5
13896cat conftest.$ac_ext >&5
13897
13898 echo "$as_me:$LINENO: result: no" >&5
13899echo "${ECHO_T}no" >&6
13900
13901fi
Martin v. Löwise3271202002-11-07 07:42:30 +000013902rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013903
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013904# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013905# for [no]getaddrinfo in netdb.h.
13906echo "$as_me:$LINENO: checking for getaddrinfo" >&5
13907echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
13908cat >conftest.$ac_ext <<_ACEOF
13909#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013910#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013911
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013912#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013913#include <sys/socket.h>
13914#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013915#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013916
Barry Warsawfe33b792003-01-07 22:42:49 +000013917#ifdef F77_DUMMY_MAIN
13918# ifdef __cplusplus
13919 extern "C"
13920# endif
13921 int F77_DUMMY_MAIN() { return 1; }
13922#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013923int
13924main ()
13925{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013926
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013927getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013928
Martin v. Löwis11437992002-04-12 09:54:03 +000013929 ;
13930 return 0;
13931}
13932_ACEOF
13933rm -f conftest.$ac_objext conftest$ac_exeext
13934if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13935 (eval $ac_link) 2>&5
13936 ac_status=$?
13937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13938 (exit $ac_status); } &&
13939 { ac_try='test -s conftest$ac_exeext'
13940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13941 (eval $ac_try) 2>&5
13942 ac_status=$?
13943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13944 (exit $ac_status); }; }; then
13945
13946echo "$as_me:$LINENO: result: yes" >&5
13947echo "${ECHO_T}yes" >&6
13948echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
13949echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013950if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013951 echo "$as_me:$LINENO: result: buggy" >&5
13952echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013953buggygetaddrinfo=yes
13954else
Martin v. Löwis11437992002-04-12 09:54:03 +000013955 cat >conftest.$ac_ext <<_ACEOF
13956#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013957#include "confdefs.h"
13958
13959#include <sys/types.h>
13960#include <netdb.h>
13961#include <string.h>
13962#include <sys/socket.h>
13963#include <netinet/in.h>
13964
13965main()
13966{
13967 int passive, gaierr, inet4 = 0, inet6 = 0;
13968 struct addrinfo hints, *ai, *aitop;
13969 char straddr[INET6_ADDRSTRLEN], strport[16];
13970
13971 for (passive = 0; passive <= 1; passive++) {
13972 memset(&hints, 0, sizeof(hints));
13973 hints.ai_family = AF_UNSPEC;
13974 hints.ai_flags = passive ? AI_PASSIVE : 0;
13975 hints.ai_socktype = SOCK_STREAM;
13976 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13977 (void)gai_strerror(gaierr);
13978 goto bad;
13979 }
13980 for (ai = aitop; ai; ai = ai->ai_next) {
13981 if (ai->ai_addr == NULL ||
13982 ai->ai_addrlen == 0 ||
13983 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13984 straddr, sizeof(straddr), strport, sizeof(strport),
13985 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13986 goto bad;
13987 }
13988 switch (ai->ai_family) {
13989 case AF_INET:
13990 if (strcmp(strport, "54321") != 0) {
13991 goto bad;
13992 }
13993 if (passive) {
13994 if (strcmp(straddr, "0.0.0.0") != 0) {
13995 goto bad;
13996 }
13997 } else {
13998 if (strcmp(straddr, "127.0.0.1") != 0) {
13999 goto bad;
14000 }
14001 }
14002 inet4++;
14003 break;
14004 case AF_INET6:
14005 if (strcmp(strport, "54321") != 0) {
14006 goto bad;
14007 }
14008 if (passive) {
14009 if (strcmp(straddr, "::") != 0) {
14010 goto bad;
14011 }
14012 } else {
14013 if (strcmp(straddr, "::1") != 0) {
14014 goto bad;
14015 }
14016 }
14017 inet6++;
14018 break;
14019 case AF_UNSPEC:
14020 goto bad;
14021 break;
14022 default:
14023 /* another family support? */
14024 break;
14025 }
14026 }
14027 }
14028
14029 if (!(inet4 == 0 || inet4 == 2))
14030 goto bad;
14031 if (!(inet6 == 0 || inet6 == 2))
14032 goto bad;
14033
14034 if (aitop)
14035 freeaddrinfo(aitop);
14036 exit(0);
14037
14038 bad:
14039 if (aitop)
14040 freeaddrinfo(aitop);
14041 exit(1);
14042}
14043
Martin v. Löwis11437992002-04-12 09:54:03 +000014044_ACEOF
14045rm -f conftest$ac_exeext
14046if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14047 (eval $ac_link) 2>&5
14048 ac_status=$?
14049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14050 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14052 (eval $ac_try) 2>&5
14053 ac_status=$?
14054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14055 (exit $ac_status); }; }; then
14056 echo "$as_me:$LINENO: result: good" >&5
14057echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014058buggygetaddrinfo=no
14059else
Martin v. Löwis11437992002-04-12 09:54:03 +000014060 echo "$as_me: program exited with status $ac_status" >&5
14061echo "$as_me: failed program was:" >&5
14062cat conftest.$ac_ext >&5
14063( exit $ac_status )
14064echo "$as_me:$LINENO: result: buggy" >&5
14065echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014066buggygetaddrinfo=yes
14067fi
Barry Warsawfe33b792003-01-07 22:42:49 +000014068rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014069fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014070else
Martin v. Löwis11437992002-04-12 09:54:03 +000014071 echo "$as_me: failed program was:" >&5
14072cat conftest.$ac_ext >&5
14073
14074echo "$as_me:$LINENO: result: no" >&5
14075echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014076buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014077
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014078fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014079rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014080
14081if test "$buggygetaddrinfo" = "yes"; then
14082 if test "$ipv6" = "yes"; then
14083 echo 'Fatal: You must get working getaddrinfo() function.'
14084 echo ' or you can specify "--disable-ipv6"'.
14085 exit 1
14086 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014087else
Martin v. Löwis11437992002-04-12 09:54:03 +000014088
14089cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014090#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014091_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014092
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014093fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014094
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014095for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014096do
Martin v. Löwis11437992002-04-12 09:54:03 +000014097as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14098echo "$as_me:$LINENO: checking for $ac_func" >&5
14099echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14100if eval "test \"\${$as_ac_var+set}\" = set"; then
14101 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014102else
Martin v. Löwis11437992002-04-12 09:54:03 +000014103 cat >conftest.$ac_ext <<_ACEOF
14104#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014105#include "confdefs.h"
14106/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014107 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014108#include <assert.h>
14109/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014110#ifdef __cplusplus
14111extern "C"
14112#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014113/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014114 builtin and then its argument prototype would still apply. */
14115char $ac_func ();
14116char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014117
Barry Warsawfe33b792003-01-07 22:42:49 +000014118#ifdef F77_DUMMY_MAIN
14119# ifdef __cplusplus
14120 extern "C"
14121# endif
14122 int F77_DUMMY_MAIN() { return 1; }
14123#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014124int
14125main ()
14126{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014127/* The GNU C library defines this for functions which it implements
14128 to always fail with ENOSYS. Some functions are actually named
14129 something starting with __ and the normal name is an alias. */
14130#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14131choke me
14132#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014133f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014134#endif
14135
Martin v. Löwis11437992002-04-12 09:54:03 +000014136 ;
14137 return 0;
14138}
14139_ACEOF
14140rm -f conftest.$ac_objext conftest$ac_exeext
14141if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14142 (eval $ac_link) 2>&5
14143 ac_status=$?
14144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14145 (exit $ac_status); } &&
14146 { ac_try='test -s conftest$ac_exeext'
14147 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14148 (eval $ac_try) 2>&5
14149 ac_status=$?
14150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14151 (exit $ac_status); }; }; then
14152 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014153else
Martin v. Löwis11437992002-04-12 09:54:03 +000014154 echo "$as_me: failed program was:" >&5
14155cat conftest.$ac_ext >&5
14156eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014157fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014158rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014159fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014160echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14161echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14162if test `eval echo '${'$as_ac_var'}'` = yes; then
14163 cat >>confdefs.h <<_ACEOF
14164#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14165_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014166
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014167fi
14168done
14169
Michael W. Hudson54241132001-12-07 15:38:26 +000014170
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014171# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000014172echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
14173echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14174if test "${ac_cv_header_time+set}" = set; then
14175 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014176else
Martin v. Löwis11437992002-04-12 09:54:03 +000014177 cat >conftest.$ac_ext <<_ACEOF
14178#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014179#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014180#include <sys/types.h>
14181#include <sys/time.h>
14182#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014183
Barry Warsawfe33b792003-01-07 22:42:49 +000014184#ifdef F77_DUMMY_MAIN
14185# ifdef __cplusplus
14186 extern "C"
14187# endif
14188 int F77_DUMMY_MAIN() { return 1; }
14189#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014190int
14191main ()
14192{
14193if ((struct tm *) 0)
14194return 0;
14195 ;
14196 return 0;
14197}
14198_ACEOF
14199rm -f conftest.$ac_objext
14200if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14201 (eval $ac_compile) 2>&5
14202 ac_status=$?
14203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14204 (exit $ac_status); } &&
14205 { ac_try='test -s conftest.$ac_objext'
14206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14207 (eval $ac_try) 2>&5
14208 ac_status=$?
14209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14210 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014211 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014212else
Martin v. Löwis11437992002-04-12 09:54:03 +000014213 echo "$as_me: failed program was:" >&5
14214cat conftest.$ac_ext >&5
14215ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014216fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014217rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014218fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014219echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
14220echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014221if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014222
14223cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014224#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014225_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014226
14227fi
14228
Martin v. Löwis11437992002-04-12 09:54:03 +000014229echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
14230echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
14231if test "${ac_cv_struct_tm+set}" = set; then
14232 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014233else
Martin v. Löwis11437992002-04-12 09:54:03 +000014234 cat >conftest.$ac_ext <<_ACEOF
14235#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014236#include "confdefs.h"
14237#include <sys/types.h>
14238#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014239
Barry Warsawfe33b792003-01-07 22:42:49 +000014240#ifdef F77_DUMMY_MAIN
14241# ifdef __cplusplus
14242 extern "C"
14243# endif
14244 int F77_DUMMY_MAIN() { return 1; }
14245#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014246int
14247main ()
14248{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014249struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000014250 ;
14251 return 0;
14252}
14253_ACEOF
14254rm -f conftest.$ac_objext
14255if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14256 (eval $ac_compile) 2>&5
14257 ac_status=$?
14258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14259 (exit $ac_status); } &&
14260 { ac_try='test -s conftest.$ac_objext'
14261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14262 (eval $ac_try) 2>&5
14263 ac_status=$?
14264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14265 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014266 ac_cv_struct_tm=time.h
14267else
Martin v. Löwis11437992002-04-12 09:54:03 +000014268 echo "$as_me: failed program was:" >&5
14269cat conftest.$ac_ext >&5
14270ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014271fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014272rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014273fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014274echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
14275echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014276if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014277
14278cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014279#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014280_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014281
14282fi
14283
Martin v. Löwis11437992002-04-12 09:54:03 +000014284echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
14285echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
14286if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
14287 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014288else
Martin v. Löwis11437992002-04-12 09:54:03 +000014289 cat >conftest.$ac_ext <<_ACEOF
14290#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014291#include "confdefs.h"
14292#include <sys/types.h>
14293#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000014294
14295
Barry Warsawfe33b792003-01-07 22:42:49 +000014296#ifdef F77_DUMMY_MAIN
14297# ifdef __cplusplus
14298 extern "C"
14299# endif
14300 int F77_DUMMY_MAIN() { return 1; }
14301#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014302int
14303main ()
14304{
14305static struct tm ac_aggr;
14306if (ac_aggr.tm_zone)
14307return 0;
14308 ;
14309 return 0;
14310}
14311_ACEOF
14312rm -f conftest.$ac_objext
14313if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14314 (eval $ac_compile) 2>&5
14315 ac_status=$?
14316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14317 (exit $ac_status); } &&
14318 { ac_try='test -s conftest.$ac_objext'
14319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14320 (eval $ac_try) 2>&5
14321 ac_status=$?
14322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14323 (exit $ac_status); }; }; then
14324 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014325else
Martin v. Löwis11437992002-04-12 09:54:03 +000014326 echo "$as_me: failed program was:" >&5
14327cat conftest.$ac_ext >&5
14328ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014329fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014330rm -f conftest.$ac_objext conftest.$ac_ext
14331fi
14332echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
14333echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
14334if test $ac_cv_member_struct_tm_tm_zone = yes; then
14335
14336cat >>confdefs.h <<_ACEOF
14337#define HAVE_STRUCT_TM_TM_ZONE 1
14338_ACEOF
14339
14340
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014341fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014342
Martin v. Löwis11437992002-04-12 09:54:03 +000014343if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14344
14345cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014346#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014347_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014348
14349else
Martin v. Löwis11437992002-04-12 09:54:03 +000014350 echo "$as_me:$LINENO: checking for tzname" >&5
14351echo $ECHO_N "checking for tzname... $ECHO_C" >&6
14352if test "${ac_cv_var_tzname+set}" = set; then
14353 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014354else
Martin v. Löwis11437992002-04-12 09:54:03 +000014355 cat >conftest.$ac_ext <<_ACEOF
14356#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014357#include "confdefs.h"
14358#include <time.h>
14359#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014360extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014361#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014362
Barry Warsawfe33b792003-01-07 22:42:49 +000014363#ifdef F77_DUMMY_MAIN
14364# ifdef __cplusplus
14365 extern "C"
14366# endif
14367 int F77_DUMMY_MAIN() { return 1; }
14368#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014369int
14370main ()
14371{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014372atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000014373 ;
14374 return 0;
14375}
14376_ACEOF
14377rm -f conftest.$ac_objext conftest$ac_exeext
14378if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14379 (eval $ac_link) 2>&5
14380 ac_status=$?
14381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14382 (exit $ac_status); } &&
14383 { ac_try='test -s conftest$ac_exeext'
14384 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14385 (eval $ac_try) 2>&5
14386 ac_status=$?
14387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14388 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014389 ac_cv_var_tzname=yes
14390else
Martin v. Löwis11437992002-04-12 09:54:03 +000014391 echo "$as_me: failed program was:" >&5
14392cat conftest.$ac_ext >&5
14393ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014394fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014395rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000014396fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014397echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
14398echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014399 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014400
14401cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014402#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014403_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014404
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014405 fi
14406fi
14407
Martin v. Löwis11437992002-04-12 09:54:03 +000014408echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
14409echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
14410if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
14411 echo $ECHO_N "(cached) $ECHO_C" >&6
14412else
14413 cat >conftest.$ac_ext <<_ACEOF
14414#line $LINENO "configure"
14415#include "confdefs.h"
14416$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014417#ifdef F77_DUMMY_MAIN
14418# ifdef __cplusplus
14419 extern "C"
14420# endif
14421 int F77_DUMMY_MAIN() { return 1; }
14422#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014423int
14424main ()
14425{
14426static struct stat ac_aggr;
14427if (ac_aggr.st_rdev)
14428return 0;
14429 ;
14430 return 0;
14431}
14432_ACEOF
14433rm -f conftest.$ac_objext
14434if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14435 (eval $ac_compile) 2>&5
14436 ac_status=$?
14437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14438 (exit $ac_status); } &&
14439 { ac_try='test -s conftest.$ac_objext'
14440 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14441 (eval $ac_try) 2>&5
14442 ac_status=$?
14443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14444 (exit $ac_status); }; }; then
14445 ac_cv_member_struct_stat_st_rdev=yes
14446else
14447 echo "$as_me: failed program was:" >&5
14448cat conftest.$ac_ext >&5
14449ac_cv_member_struct_stat_st_rdev=no
14450fi
14451rm -f conftest.$ac_objext conftest.$ac_ext
14452fi
14453echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
14454echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
14455if test $ac_cv_member_struct_stat_st_rdev = yes; then
14456
14457cat >>confdefs.h <<_ACEOF
14458#define HAVE_STRUCT_STAT_ST_RDEV 1
14459_ACEOF
14460
14461
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014462fi
14463
Martin v. Löwis11437992002-04-12 09:54:03 +000014464echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
14465echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
14466if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
14467 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014468else
Martin v. Löwis11437992002-04-12 09:54:03 +000014469 cat >conftest.$ac_ext <<_ACEOF
14470#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014471#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014472$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014473#ifdef F77_DUMMY_MAIN
14474# ifdef __cplusplus
14475 extern "C"
14476# endif
14477 int F77_DUMMY_MAIN() { return 1; }
14478#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014479int
14480main ()
14481{
14482static struct stat ac_aggr;
14483if (ac_aggr.st_blksize)
14484return 0;
14485 ;
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
14501 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014502else
Martin v. Löwis11437992002-04-12 09:54:03 +000014503 echo "$as_me: failed program was:" >&5
14504cat conftest.$ac_ext >&5
14505ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014506fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014507rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014508fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014509echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
14510echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
14511if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014512
Martin v. Löwis11437992002-04-12 09:54:03 +000014513cat >>confdefs.h <<_ACEOF
14514#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
14515_ACEOF
14516
14517
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014518fi
14519
Martin v. Löwis11437992002-04-12 09:54:03 +000014520echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
14521echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
14522if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
14523 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014524else
Martin v. Löwis11437992002-04-12 09:54:03 +000014525 cat >conftest.$ac_ext <<_ACEOF
14526#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014527#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014528$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014529#ifdef F77_DUMMY_MAIN
14530# ifdef __cplusplus
14531 extern "C"
14532# endif
14533 int F77_DUMMY_MAIN() { return 1; }
14534#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014535int
14536main ()
14537{
14538static struct stat ac_aggr;
14539if (ac_aggr.st_blocks)
14540return 0;
14541 ;
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 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014558else
Martin v. Löwis11437992002-04-12 09:54:03 +000014559 echo "$as_me: failed program was:" >&5
14560cat conftest.$ac_ext >&5
14561ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014562fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014563rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014564fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014565echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
14566echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
14567if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014568
Martin v. Löwis11437992002-04-12 09:54:03 +000014569cat >>confdefs.h <<_ACEOF
14570#define HAVE_STRUCT_STAT_ST_BLOCKS 1
14571_ACEOF
14572
14573
14574cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014575#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014576_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014577
14578else
Martin v. Löwis11437992002-04-12 09:54:03 +000014579 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014580fi
14581
Michael W. Hudson54241132001-12-07 15:38:26 +000014582
Martin v. Löwis11437992002-04-12 09:54:03 +000014583
14584echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
14585echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
14586if test "${ac_cv_header_time_altzone+set}" = set; then
14587 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014588else
Martin v. Löwis11437992002-04-12 09:54:03 +000014589 cat >conftest.$ac_ext <<_ACEOF
14590#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014591#include "confdefs.h"
14592#include <time.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014593#ifdef F77_DUMMY_MAIN
14594# ifdef __cplusplus
14595 extern "C"
14596# endif
14597 int F77_DUMMY_MAIN() { return 1; }
14598#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014599int
14600main ()
14601{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014602return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000014603 ;
14604 return 0;
14605}
14606_ACEOF
14607rm -f conftest.$ac_objext
14608if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14609 (eval $ac_compile) 2>&5
14610 ac_status=$?
14611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14612 (exit $ac_status); } &&
14613 { ac_try='test -s conftest.$ac_objext'
14614 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14615 (eval $ac_try) 2>&5
14616 ac_status=$?
14617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14618 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014619 ac_cv_header_time_altzone=yes
14620else
Martin v. Löwis11437992002-04-12 09:54:03 +000014621 echo "$as_me: failed program was:" >&5
14622cat conftest.$ac_ext >&5
14623ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000014624fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014625rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014626fi
14627
Martin v. Löwis11437992002-04-12 09:54:03 +000014628echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
14629echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014630if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014631
14632cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014633#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014634_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014635
14636fi
14637
Guido van Rossumda88dad1995-01-26 00:46:29 +000014638was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014639echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
14640echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
14641cat >conftest.$ac_ext <<_ACEOF
14642#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014643#include "confdefs.h"
14644
14645#include <sys/types.h>
14646#include <sys/select.h>
14647#include <sys/time.h>
14648
Barry Warsawfe33b792003-01-07 22:42:49 +000014649#ifdef F77_DUMMY_MAIN
14650# ifdef __cplusplus
14651 extern "C"
14652# endif
14653 int F77_DUMMY_MAIN() { return 1; }
14654#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014655int
14656main ()
14657{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014658;
Martin v. Löwis11437992002-04-12 09:54:03 +000014659 ;
14660 return 0;
14661}
14662_ACEOF
14663rm -f conftest.$ac_objext
14664if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14665 (eval $ac_compile) 2>&5
14666 ac_status=$?
14667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14668 (exit $ac_status); } &&
14669 { ac_try='test -s conftest.$ac_objext'
14670 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14671 (eval $ac_try) 2>&5
14672 ac_status=$?
14673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14674 (exit $ac_status); }; }; then
14675
14676
14677cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014678#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014679_ACEOF
14680
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014681 was_it_defined=yes
14682
Guido van Rossumf78abae1997-01-21 22:02:36 +000014683else
Martin v. Löwis11437992002-04-12 09:54:03 +000014684 echo "$as_me: failed program was:" >&5
14685cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014686fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014687rm -f conftest.$ac_objext conftest.$ac_ext
14688echo "$as_me:$LINENO: result: $was_it_defined" >&5
14689echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000014690
Martin v. Löwis11437992002-04-12 09:54:03 +000014691echo "$as_me:$LINENO: checking for addrinfo" >&5
14692echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
14693if test "${ac_cv_struct_addrinfo+set}" = set; then
14694 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014695else
Martin v. Löwis11437992002-04-12 09:54:03 +000014696 cat >conftest.$ac_ext <<_ACEOF
14697#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014698#include "confdefs.h"
14699
14700# include <netdb.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014701#ifdef F77_DUMMY_MAIN
14702# ifdef __cplusplus
14703 extern "C"
14704# endif
14705 int F77_DUMMY_MAIN() { return 1; }
14706#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014707int
14708main ()
14709{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014710struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000014711 ;
14712 return 0;
14713}
14714_ACEOF
14715rm -f conftest.$ac_objext
14716if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14717 (eval $ac_compile) 2>&5
14718 ac_status=$?
14719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14720 (exit $ac_status); } &&
14721 { ac_try='test -s conftest.$ac_objext'
14722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14723 (eval $ac_try) 2>&5
14724 ac_status=$?
14725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14726 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014727 ac_cv_struct_addrinfo=yes
14728else
Martin v. Löwis11437992002-04-12 09:54:03 +000014729 echo "$as_me: failed program was:" >&5
14730cat conftest.$ac_ext >&5
14731ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014732fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014733rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014734fi
14735
Martin v. Löwis11437992002-04-12 09:54:03 +000014736echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
14737echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014738if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014739
14740cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014741#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014742_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014743
14744fi
14745
Martin v. Löwis11437992002-04-12 09:54:03 +000014746echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
14747echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
14748if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
14749 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014750else
Martin v. Löwis11437992002-04-12 09:54:03 +000014751 cat >conftest.$ac_ext <<_ACEOF
14752#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014753#include "confdefs.h"
14754
14755# include <sys/types.h>
14756# include <sys/socket.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014757#ifdef F77_DUMMY_MAIN
14758# ifdef __cplusplus
14759 extern "C"
14760# endif
14761 int F77_DUMMY_MAIN() { return 1; }
14762#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014763int
14764main ()
14765{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014766struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000014767 ;
14768 return 0;
14769}
14770_ACEOF
14771rm -f conftest.$ac_objext
14772if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14773 (eval $ac_compile) 2>&5
14774 ac_status=$?
14775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14776 (exit $ac_status); } &&
14777 { ac_try='test -s conftest.$ac_objext'
14778 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14779 (eval $ac_try) 2>&5
14780 ac_status=$?
14781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14782 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014783 ac_cv_struct_sockaddr_storage=yes
14784else
Martin v. Löwis11437992002-04-12 09:54:03 +000014785 echo "$as_me: failed program was:" >&5
14786cat conftest.$ac_ext >&5
14787ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014788fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014789rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014790fi
14791
Martin v. Löwis11437992002-04-12 09:54:03 +000014792echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
14793echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014794if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014795
14796cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014797#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014798_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014799
14800fi
14801
Guido van Rossum627b2d71993-12-24 10:39:16 +000014802# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000014803
Michael W. Hudson54241132001-12-07 15:38:26 +000014804
Martin v. Löwis11437992002-04-12 09:54:03 +000014805echo "$as_me:$LINENO: checking whether char is unsigned" >&5
14806echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
14807if test "${ac_cv_c_char_unsigned+set}" = set; then
14808 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000014809else
Martin v. Löwis11437992002-04-12 09:54:03 +000014810 cat >conftest.$ac_ext <<_ACEOF
14811#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000014812#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014813$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014814#ifdef F77_DUMMY_MAIN
14815# ifdef __cplusplus
14816 extern "C"
14817# endif
14818 int F77_DUMMY_MAIN() { return 1; }
14819#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014820int
14821main ()
14822{
14823static int test_array [1 - 2 * !(((char) -1) < 0)];
14824test_array [0] = 0
14825
14826 ;
14827 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000014828}
Martin v. Löwis11437992002-04-12 09:54:03 +000014829_ACEOF
14830rm -f conftest.$ac_objext
14831if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14832 (eval $ac_compile) 2>&5
14833 ac_status=$?
14834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14835 (exit $ac_status); } &&
14836 { ac_try='test -s conftest.$ac_objext'
14837 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14838 (eval $ac_try) 2>&5
14839 ac_status=$?
14840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14841 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000014842 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014843else
14844 echo "$as_me: failed program was:" >&5
14845cat conftest.$ac_ext >&5
14846ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014847fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014848rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014849fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014850echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
14851echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014852if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014853 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014854#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014855_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014856
14857fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000014858
Barry Warsawfe33b792003-01-07 22:42:49 +000014859echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
14860echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
14861if test "${ac_cv_prog_cc_stdc+set}" = set; then
14862 echo $ECHO_N "(cached) $ECHO_C" >&6
14863else
14864 ac_cv_prog_cc_stdc=no
14865ac_save_CC=$CC
14866cat >conftest.$ac_ext <<_ACEOF
14867#line $LINENO "configure"
14868#include "confdefs.h"
14869#include <stdarg.h>
14870#include <stdio.h>
14871#include <sys/types.h>
14872#include <sys/stat.h>
14873/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
14874struct buf { int x; };
14875FILE * (*rcsopen) (struct buf *, struct stat *, int);
14876static char *e (p, i)
14877 char **p;
14878 int i;
14879{
14880 return p[i];
14881}
14882static char *f (char * (*g) (char **, int), char **p, ...)
14883{
14884 char *s;
14885 va_list v;
14886 va_start (v,p);
14887 s = g (p, va_arg (v,int));
14888 va_end (v);
14889 return s;
14890}
14891int test (int i, double x);
14892struct s1 {int (*f) (int a);};
14893struct s2 {int (*f) (double a);};
14894int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
14895int argc;
14896char **argv;
14897#ifdef F77_DUMMY_MAIN
14898# ifdef __cplusplus
14899 extern "C"
14900# endif
14901 int F77_DUMMY_MAIN() { return 1; }
14902#endif
14903int
14904main ()
14905{
14906return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
14907 ;
14908 return 0;
14909}
14910_ACEOF
14911# Don't try gcc -ansi; that turns off useful extensions and
14912# breaks some systems' header files.
14913# AIX -qlanglvl=ansi
14914# Ultrix and OSF/1 -std1
14915# HP-UX 10.20 and later -Ae
14916# HP-UX older versions -Aa -D_HPUX_SOURCE
14917# SVR4 -Xc -D__EXTENSIONS__
14918for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
14919do
14920 CC="$ac_save_CC $ac_arg"
14921 rm -f conftest.$ac_objext
14922if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14923 (eval $ac_compile) 2>&5
14924 ac_status=$?
14925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14926 (exit $ac_status); } &&
14927 { ac_try='test -s conftest.$ac_objext'
14928 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14929 (eval $ac_try) 2>&5
14930 ac_status=$?
14931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14932 (exit $ac_status); }; }; then
14933 ac_cv_prog_cc_stdc=$ac_arg
14934break
14935else
14936 echo "$as_me: failed program was:" >&5
14937cat conftest.$ac_ext >&5
14938fi
14939rm -f conftest.$ac_objext
14940done
14941rm -f conftest.$ac_ext conftest.$ac_objext
14942CC=$ac_save_CC
14943
14944fi
14945
14946case "x$ac_cv_prog_cc_stdc" in
14947 x|xno)
14948 echo "$as_me:$LINENO: result: none needed" >&5
14949echo "${ECHO_T}none needed" >&6 ;;
14950 *)
14951 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
14952echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
14953 CC="$CC $ac_cv_prog_cc_stdc" ;;
14954esac
14955
Martin v. Löwis11437992002-04-12 09:54:03 +000014956echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
14957echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14958if test "${ac_cv_c_const+set}" = set; then
14959 echo $ECHO_N "(cached) $ECHO_C" >&6
14960else
14961 cat >conftest.$ac_ext <<_ACEOF
14962#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014963#include "confdefs.h"
14964
Barry Warsawfe33b792003-01-07 22:42:49 +000014965#ifdef F77_DUMMY_MAIN
14966# ifdef __cplusplus
14967 extern "C"
14968# endif
14969 int F77_DUMMY_MAIN() { return 1; }
14970#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014971int
14972main ()
14973{
14974/* FIXME: Include the comments suggested by Paul. */
14975#ifndef __cplusplus
14976 /* Ultrix mips cc rejects this. */
14977 typedef int charset[2];
14978 const charset x;
14979 /* SunOS 4.1.1 cc rejects this. */
14980 char const *const *ccp;
14981 char **p;
14982 /* NEC SVR4.0.2 mips cc rejects this. */
14983 struct point {int x, y;};
14984 static struct point const zero = {0,0};
14985 /* AIX XL C 1.02.0.0 rejects this.
14986 It does not let you subtract one const X* pointer from another in
14987 an arm of an if-expression whose if-part is not a constant
14988 expression */
14989 const char *g = "string";
14990 ccp = &g + (g ? g-g : 0);
14991 /* HPUX 7.0 cc rejects these. */
14992 ++ccp;
14993 p = (char**) ccp;
14994 ccp = (char const *const *) p;
14995 { /* SCO 3.2v4 cc rejects this. */
14996 char *t;
14997 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014998
Martin v. Löwis11437992002-04-12 09:54:03 +000014999 *t++ = 0;
15000 }
15001 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
15002 int x[] = {25, 17};
15003 const int *foo = &x[0];
15004 ++foo;
15005 }
15006 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15007 typedef const int *iptr;
15008 iptr p = 0;
15009 ++p;
15010 }
15011 { /* AIX XL C 1.02.0.0 rejects this saying
15012 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15013 struct s { int j; const int *ap[3]; };
15014 struct s *b; b->j = 5;
15015 }
15016 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15017 const int foo = 10;
15018 }
15019#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000015020
Martin v. Löwis11437992002-04-12 09:54:03 +000015021 ;
15022 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000015023}
Martin v. Löwis11437992002-04-12 09:54:03 +000015024_ACEOF
15025rm -f conftest.$ac_objext
15026if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15027 (eval $ac_compile) 2>&5
15028 ac_status=$?
15029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15030 (exit $ac_status); } &&
15031 { ac_try='test -s conftest.$ac_objext'
15032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15033 (eval $ac_try) 2>&5
15034 ac_status=$?
15035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15036 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015037 ac_cv_c_const=yes
15038else
Martin v. Löwis11437992002-04-12 09:54:03 +000015039 echo "$as_me: failed program was:" >&5
15040cat conftest.$ac_ext >&5
15041ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015042fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015043rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015044fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015045echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
15046echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015047if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015048
15049cat >>confdefs.h <<\_ACEOF
15050#define const
15051_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015052
15053fi
15054
Michael W. Hudson54241132001-12-07 15:38:26 +000015055
Guido van Rossumda88dad1995-01-26 00:46:29 +000015056works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015057echo "$as_me:$LINENO: checking for working volatile" >&5
15058echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
15059cat >conftest.$ac_ext <<_ACEOF
15060#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015061#include "confdefs.h"
15062
Barry Warsawfe33b792003-01-07 22:42:49 +000015063#ifdef F77_DUMMY_MAIN
15064# ifdef __cplusplus
15065 extern "C"
15066# endif
15067 int F77_DUMMY_MAIN() { return 1; }
15068#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015069int
15070main ()
15071{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015072volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015073 ;
15074 return 0;
15075}
15076_ACEOF
15077rm -f conftest.$ac_objext
15078if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15079 (eval $ac_compile) 2>&5
15080 ac_status=$?
15081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15082 (exit $ac_status); } &&
15083 { ac_try='test -s conftest.$ac_objext'
15084 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15085 (eval $ac_try) 2>&5
15086 ac_status=$?
15087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15088 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015089 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015090else
Martin v. Löwis11437992002-04-12 09:54:03 +000015091 echo "$as_me: failed program was:" >&5
15092cat conftest.$ac_ext >&5
15093
15094cat >>confdefs.h <<\_ACEOF
15095#define volatile
15096_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015097
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015098
Guido van Rossum627b2d71993-12-24 10:39:16 +000015099fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015100rm -f conftest.$ac_objext conftest.$ac_ext
15101echo "$as_me:$LINENO: result: $works" >&5
15102echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015103
Guido van Rossumda88dad1995-01-26 00:46:29 +000015104works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015105echo "$as_me:$LINENO: checking for working signed char" >&5
15106echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
15107cat >conftest.$ac_ext <<_ACEOF
15108#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015109#include "confdefs.h"
15110
Barry Warsawfe33b792003-01-07 22:42:49 +000015111#ifdef F77_DUMMY_MAIN
15112# ifdef __cplusplus
15113 extern "C"
15114# endif
15115 int F77_DUMMY_MAIN() { return 1; }
15116#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015117int
15118main ()
15119{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015120signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000015121 ;
15122 return 0;
15123}
15124_ACEOF
15125rm -f conftest.$ac_objext
15126if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15127 (eval $ac_compile) 2>&5
15128 ac_status=$?
15129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15130 (exit $ac_status); } &&
15131 { ac_try='test -s conftest.$ac_objext'
15132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15133 (eval $ac_try) 2>&5
15134 ac_status=$?
15135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15136 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015137 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015138else
Martin v. Löwis11437992002-04-12 09:54:03 +000015139 echo "$as_me: failed program was:" >&5
15140cat conftest.$ac_ext >&5
15141
15142cat >>confdefs.h <<\_ACEOF
15143#define signed
15144_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000015145
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015146
Guido van Rossum7f43da71994-08-01 12:15:30 +000015147fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015148rm -f conftest.$ac_objext conftest.$ac_ext
15149echo "$as_me:$LINENO: result: $works" >&5
15150echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015151
Guido van Rossumda88dad1995-01-26 00:46:29 +000015152have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015153echo "$as_me:$LINENO: checking for prototypes" >&5
15154echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
15155cat >conftest.$ac_ext <<_ACEOF
15156#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015157#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015158int foo(int x) { return 0; }
Barry Warsawfe33b792003-01-07 22:42:49 +000015159#ifdef F77_DUMMY_MAIN
15160# ifdef __cplusplus
15161 extern "C"
15162# endif
15163 int F77_DUMMY_MAIN() { return 1; }
15164#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015165int
15166main ()
15167{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015168return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000015169 ;
15170 return 0;
15171}
15172_ACEOF
15173rm -f conftest.$ac_objext
15174if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15175 (eval $ac_compile) 2>&5
15176 ac_status=$?
15177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15178 (exit $ac_status); } &&
15179 { ac_try='test -s conftest.$ac_objext'
15180 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15181 (eval $ac_try) 2>&5
15182 ac_status=$?
15183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15184 (exit $ac_status); }; }; then
15185
15186
15187cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015188#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015189_ACEOF
15190
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015191 have_prototypes=yes
15192
Guido van Rossumf78abae1997-01-21 22:02:36 +000015193else
Martin v. Löwis11437992002-04-12 09:54:03 +000015194 echo "$as_me: failed program was:" >&5
15195cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000015196fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015197rm -f conftest.$ac_objext conftest.$ac_ext
15198echo "$as_me:$LINENO: result: $have_prototypes" >&5
15199echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015200
Guido van Rossumda88dad1995-01-26 00:46:29 +000015201works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015202echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
15203echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
15204cat >conftest.$ac_ext <<_ACEOF
15205#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015206#include "confdefs.h"
15207
15208#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000015209int foo(int x, ...) {
15210 va_list va;
15211 va_start(va, x);
15212 va_arg(va, int);
15213 va_arg(va, char *);
15214 va_arg(va, double);
15215 return 0;
15216}
Guido van Rossum7f43da71994-08-01 12:15:30 +000015217
Barry Warsawfe33b792003-01-07 22:42:49 +000015218#ifdef F77_DUMMY_MAIN
15219# ifdef __cplusplus
15220 extern "C"
15221# endif
15222 int F77_DUMMY_MAIN() { return 1; }
15223#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015224int
15225main ()
15226{
Guido van Rossum90eea071996-08-30 20:58:57 +000015227return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000015228 ;
15229 return 0;
15230}
15231_ACEOF
15232rm -f conftest.$ac_objext
15233if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15234 (eval $ac_compile) 2>&5
15235 ac_status=$?
15236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15237 (exit $ac_status); } &&
15238 { ac_try='test -s conftest.$ac_objext'
15239 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15240 (eval $ac_try) 2>&5
15241 ac_status=$?
15242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15243 (exit $ac_status); }; }; then
15244
15245
15246cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015247#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015248_ACEOF
15249
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015250 works=yes
15251
Guido van Rossumf78abae1997-01-21 22:02:36 +000015252else
Martin v. Löwis11437992002-04-12 09:54:03 +000015253 echo "$as_me: failed program was:" >&5
15254cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000015255fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015256rm -f conftest.$ac_objext conftest.$ac_ext
15257echo "$as_me:$LINENO: result: $works" >&5
15258echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015259
Guido van Rossumda88dad1995-01-26 00:46:29 +000015260if test "$have_prototypes" = yes; then
15261bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015262echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
15263echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
15264cat >conftest.$ac_ext <<_ACEOF
15265#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015266#include "confdefs.h"
15267#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000015268#ifdef F77_DUMMY_MAIN
15269# ifdef __cplusplus
15270 extern "C"
15271# endif
15272 int F77_DUMMY_MAIN() { return 1; }
15273#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015274int
15275main ()
15276{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015277char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000015278 ;
15279 return 0;
15280}
15281_ACEOF
15282rm -f conftest.$ac_objext
15283if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15284 (eval $ac_compile) 2>&5
15285 ac_status=$?
15286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15287 (exit $ac_status); } &&
15288 { ac_try='test -s conftest.$ac_objext'
15289 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15290 (eval $ac_try) 2>&5
15291 ac_status=$?
15292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15293 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000015294 :
15295else
Martin v. Löwis11437992002-04-12 09:54:03 +000015296 echo "$as_me: failed program was:" >&5
15297cat conftest.$ac_ext >&5
15298
15299cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015300#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015301_ACEOF
15302
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015303 bad_prototypes=yes
15304
Guido van Rossum627b2d71993-12-24 10:39:16 +000015305fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015306rm -f conftest.$ac_objext conftest.$ac_ext
15307echo "$as_me:$LINENO: result: $bad_prototypes" >&5
15308echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015309fi
15310
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015311# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000015312echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
15313echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
15314cat >conftest.$ac_ext <<_ACEOF
15315#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015316#include "confdefs.h"
15317#include <sys/types.h>
15318#include <sys/socket.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000015319#ifdef F77_DUMMY_MAIN
15320# ifdef __cplusplus
15321 extern "C"
15322# endif
15323 int F77_DUMMY_MAIN() { return 1; }
15324#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015325int
15326main ()
15327{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015328struct sockaddr x;
15329x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015330 ;
15331 return 0;
15332}
15333_ACEOF
15334rm -f conftest.$ac_objext
15335if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15336 (eval $ac_compile) 2>&5
15337 ac_status=$?
15338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15339 (exit $ac_status); } &&
15340 { ac_try='test -s conftest.$ac_objext'
15341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15342 (eval $ac_try) 2>&5
15343 ac_status=$?
15344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15345 (exit $ac_status); }; }; then
15346 echo "$as_me:$LINENO: result: yes" >&5
15347echo "${ECHO_T}yes" >&6
15348
15349cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015350#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015351_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015352
15353else
Martin v. Löwis11437992002-04-12 09:54:03 +000015354 echo "$as_me: failed program was:" >&5
15355cat conftest.$ac_ext >&5
15356echo "$as_me:$LINENO: result: no" >&5
15357echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015358fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015359rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015360
Guido van Rossumda88dad1995-01-26 00:46:29 +000015361va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015362echo "$as_me:$LINENO: checking whether va_list is an array" >&5
15363echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
15364cat >conftest.$ac_ext <<_ACEOF
15365#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015366#include "confdefs.h"
15367
15368#ifdef HAVE_STDARG_PROTOTYPES
15369#include <stdarg.h>
15370#else
15371#include <varargs.h>
15372#endif
15373
Barry Warsawfe33b792003-01-07 22:42:49 +000015374#ifdef F77_DUMMY_MAIN
15375# ifdef __cplusplus
15376 extern "C"
15377# endif
15378 int F77_DUMMY_MAIN() { return 1; }
15379#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015380int
15381main ()
15382{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015383va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000015384 ;
15385 return 0;
15386}
15387_ACEOF
15388rm -f conftest.$ac_objext
15389if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15390 (eval $ac_compile) 2>&5
15391 ac_status=$?
15392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15393 (exit $ac_status); } &&
15394 { ac_try='test -s conftest.$ac_objext'
15395 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15396 (eval $ac_try) 2>&5
15397 ac_status=$?
15398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15399 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015400 :
15401else
Martin v. Löwis11437992002-04-12 09:54:03 +000015402 echo "$as_me: failed program was:" >&5
15403cat conftest.$ac_ext >&5
15404
15405
15406cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015407#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015408_ACEOF
15409
Guido van Rossumda88dad1995-01-26 00:46:29 +000015410 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015411
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015412fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015413rm -f conftest.$ac_objext conftest.$ac_ext
15414echo "$as_me:$LINENO: result: $va_list_is_array" >&5
15415echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015416
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015417# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000015418
15419
15420
15421echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
15422echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
15423if test "${ac_cv_func_gethostbyname_r+set}" = set; then
15424 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015425else
Martin v. Löwis11437992002-04-12 09:54:03 +000015426 cat >conftest.$ac_ext <<_ACEOF
15427#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015428#include "confdefs.h"
15429/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015430 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015431#include <assert.h>
15432/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015433#ifdef __cplusplus
15434extern "C"
15435#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015436/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015437 builtin and then its argument prototype would still apply. */
15438char gethostbyname_r ();
15439char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015440
Barry Warsawfe33b792003-01-07 22:42:49 +000015441#ifdef F77_DUMMY_MAIN
15442# ifdef __cplusplus
15443 extern "C"
15444# endif
15445 int F77_DUMMY_MAIN() { return 1; }
15446#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015447int
15448main ()
15449{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015450/* The GNU C library defines this for functions which it implements
15451 to always fail with ENOSYS. Some functions are actually named
15452 something starting with __ and the normal name is an alias. */
15453#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
15454choke me
15455#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015456f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015457#endif
15458
Martin v. Löwis11437992002-04-12 09:54:03 +000015459 ;
15460 return 0;
15461}
15462_ACEOF
15463rm -f conftest.$ac_objext conftest$ac_exeext
15464if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15465 (eval $ac_link) 2>&5
15466 ac_status=$?
15467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15468 (exit $ac_status); } &&
15469 { ac_try='test -s conftest$ac_exeext'
15470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15471 (eval $ac_try) 2>&5
15472 ac_status=$?
15473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15474 (exit $ac_status); }; }; then
15475 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015476else
Martin v. Löwis11437992002-04-12 09:54:03 +000015477 echo "$as_me: failed program was:" >&5
15478cat conftest.$ac_ext >&5
15479ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015480fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015481rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015482fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015483echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
15484echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
15485if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015486
Martin v. Löwis11437992002-04-12 09:54:03 +000015487 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015488#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015489_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015490
Martin v. Löwis11437992002-04-12 09:54:03 +000015491 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
15492echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015493 OLD_CFLAGS=$CFLAGS
15494 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015495 cat >conftest.$ac_ext <<_ACEOF
15496#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015497#include "confdefs.h"
15498
15499# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015500
Barry Warsawfe33b792003-01-07 22:42:49 +000015501#ifdef F77_DUMMY_MAIN
15502# ifdef __cplusplus
15503 extern "C"
15504# endif
15505 int F77_DUMMY_MAIN() { return 1; }
15506#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015507int
15508main ()
15509{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015510
15511 char *name;
15512 struct hostent *he, *res;
15513 char buffer[2048];
15514 int buflen = 2048;
15515 int h_errnop;
15516
15517 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015518
15519 ;
15520 return 0;
15521}
15522_ACEOF
15523rm -f conftest.$ac_objext
15524if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15525 (eval $ac_compile) 2>&5
15526 ac_status=$?
15527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15528 (exit $ac_status); } &&
15529 { ac_try='test -s conftest.$ac_objext'
15530 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15531 (eval $ac_try) 2>&5
15532 ac_status=$?
15533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15534 (exit $ac_status); }; }; then
15535
15536 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015537#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015538_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015539
Martin v. Löwis11437992002-04-12 09:54:03 +000015540
15541cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015542#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015543_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015544
Martin v. Löwis11437992002-04-12 09:54:03 +000015545 echo "$as_me:$LINENO: result: yes" >&5
15546echo "${ECHO_T}yes" >&6
15547
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015548else
Martin v. Löwis11437992002-04-12 09:54:03 +000015549 echo "$as_me: failed program was:" >&5
15550cat conftest.$ac_ext >&5
15551
15552 echo "$as_me:$LINENO: result: no" >&5
15553echo "${ECHO_T}no" >&6
15554 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
15555echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
15556 cat >conftest.$ac_ext <<_ACEOF
15557#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015558#include "confdefs.h"
15559
15560# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015561
Barry Warsawfe33b792003-01-07 22:42:49 +000015562#ifdef F77_DUMMY_MAIN
15563# ifdef __cplusplus
15564 extern "C"
15565# endif
15566 int F77_DUMMY_MAIN() { return 1; }
15567#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015568int
15569main ()
15570{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015571
15572 char *name;
15573 struct hostent *he;
15574 char buffer[2048];
15575 int buflen = 2048;
15576 int h_errnop;
15577
15578 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015579
15580 ;
15581 return 0;
15582}
15583_ACEOF
15584rm -f conftest.$ac_objext
15585if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15586 (eval $ac_compile) 2>&5
15587 ac_status=$?
15588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15589 (exit $ac_status); } &&
15590 { ac_try='test -s conftest.$ac_objext'
15591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15592 (eval $ac_try) 2>&5
15593 ac_status=$?
15594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15595 (exit $ac_status); }; }; then
15596
15597 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015598#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015599_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015600
Martin v. Löwis11437992002-04-12 09:54:03 +000015601
15602cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015603#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015604_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015605
Martin v. Löwis11437992002-04-12 09:54:03 +000015606 echo "$as_me:$LINENO: result: yes" >&5
15607echo "${ECHO_T}yes" >&6
15608
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015609else
Martin v. Löwis11437992002-04-12 09:54:03 +000015610 echo "$as_me: failed program was:" >&5
15611cat conftest.$ac_ext >&5
15612
15613 echo "$as_me:$LINENO: result: no" >&5
15614echo "${ECHO_T}no" >&6
15615 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
15616echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
15617 cat >conftest.$ac_ext <<_ACEOF
15618#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015619#include "confdefs.h"
15620
15621# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015622
Barry Warsawfe33b792003-01-07 22:42:49 +000015623#ifdef F77_DUMMY_MAIN
15624# ifdef __cplusplus
15625 extern "C"
15626# endif
15627 int F77_DUMMY_MAIN() { return 1; }
15628#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015629int
15630main ()
15631{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015632
15633 char *name;
15634 struct hostent *he;
15635 struct hostent_data data;
15636
15637 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000015638
15639 ;
15640 return 0;
15641}
15642_ACEOF
15643rm -f conftest.$ac_objext
15644if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15645 (eval $ac_compile) 2>&5
15646 ac_status=$?
15647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15648 (exit $ac_status); } &&
15649 { ac_try='test -s conftest.$ac_objext'
15650 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15651 (eval $ac_try) 2>&5
15652 ac_status=$?
15653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15654 (exit $ac_status); }; }; then
15655
15656 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015657#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015658_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015659
Martin v. Löwis11437992002-04-12 09:54:03 +000015660
15661cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015662#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015663_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015664
Martin v. Löwis11437992002-04-12 09:54:03 +000015665 echo "$as_me:$LINENO: result: yes" >&5
15666echo "${ECHO_T}yes" >&6
15667
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015668else
Martin v. Löwis11437992002-04-12 09:54:03 +000015669 echo "$as_me: failed program was:" >&5
15670cat conftest.$ac_ext >&5
15671
15672 echo "$as_me:$LINENO: result: no" >&5
15673echo "${ECHO_T}no" >&6
15674
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015675fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015676rm -f conftest.$ac_objext conftest.$ac_ext
15677
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015678fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015679rm -f conftest.$ac_objext conftest.$ac_ext
15680
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015681fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015682rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015683 CFLAGS=$OLD_CFLAGS
15684
15685else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015686
Martin v. Löwis11437992002-04-12 09:54:03 +000015687
15688for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000015689do
Martin v. Löwis11437992002-04-12 09:54:03 +000015690as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15691echo "$as_me:$LINENO: checking for $ac_func" >&5
15692echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15693if eval "test \"\${$as_ac_var+set}\" = set"; then
15694 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015695else
Martin v. Löwis11437992002-04-12 09:54:03 +000015696 cat >conftest.$ac_ext <<_ACEOF
15697#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015698#include "confdefs.h"
15699/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015700 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015701#include <assert.h>
15702/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015703#ifdef __cplusplus
15704extern "C"
15705#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015706/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015707 builtin and then its argument prototype would still apply. */
15708char $ac_func ();
15709char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015710
Barry Warsawfe33b792003-01-07 22:42:49 +000015711#ifdef F77_DUMMY_MAIN
15712# ifdef __cplusplus
15713 extern "C"
15714# endif
15715 int F77_DUMMY_MAIN() { return 1; }
15716#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015717int
15718main ()
15719{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015720/* The GNU C library defines this for functions which it implements
15721 to always fail with ENOSYS. Some functions are actually named
15722 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015723#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015724choke me
15725#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015726f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015727#endif
15728
Martin v. Löwis11437992002-04-12 09:54:03 +000015729 ;
15730 return 0;
15731}
15732_ACEOF
15733rm -f conftest.$ac_objext conftest$ac_exeext
15734if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15735 (eval $ac_link) 2>&5
15736 ac_status=$?
15737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15738 (exit $ac_status); } &&
15739 { ac_try='test -s conftest$ac_exeext'
15740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15741 (eval $ac_try) 2>&5
15742 ac_status=$?
15743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15744 (exit $ac_status); }; }; then
15745 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015746else
Martin v. Löwis11437992002-04-12 09:54:03 +000015747 echo "$as_me: failed program was:" >&5
15748cat conftest.$ac_ext >&5
15749eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015750fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015751rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015752fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015753echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15754echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15755if test `eval echo '${'$as_ac_var'}'` = yes; then
15756 cat >>confdefs.h <<_ACEOF
15757#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15758_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015759
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015760fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015761done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015762
Michael W. Hudson54241132001-12-07 15:38:26 +000015763
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015764fi
15765
Michael W. Hudson54241132001-12-07 15:38:26 +000015766
15767
15768
15769
15770
15771
Guido van Rossum627b2d71993-12-24 10:39:16 +000015772# checks for system services
15773# (none yet)
15774
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015775# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000015776echo "$as_me:$LINENO: checking for __fpu_control" >&5
15777echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
15778if test "${ac_cv_func___fpu_control+set}" = set; then
15779 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015780else
Martin v. Löwis11437992002-04-12 09:54:03 +000015781 cat >conftest.$ac_ext <<_ACEOF
15782#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015783#include "confdefs.h"
15784/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015785 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015786#include <assert.h>
15787/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015788#ifdef __cplusplus
15789extern "C"
15790#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015791/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015792 builtin and then its argument prototype would still apply. */
15793char __fpu_control ();
15794char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015795
Barry Warsawfe33b792003-01-07 22:42:49 +000015796#ifdef F77_DUMMY_MAIN
15797# ifdef __cplusplus
15798 extern "C"
15799# endif
15800 int F77_DUMMY_MAIN() { return 1; }
15801#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015802int
15803main ()
15804{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015805/* The GNU C library defines this for functions which it implements
15806 to always fail with ENOSYS. Some functions are actually named
15807 something starting with __ and the normal name is an alias. */
15808#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
15809choke me
15810#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015811f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015812#endif
15813
Martin v. Löwis11437992002-04-12 09:54:03 +000015814 ;
15815 return 0;
15816}
15817_ACEOF
15818rm -f conftest.$ac_objext conftest$ac_exeext
15819if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15820 (eval $ac_link) 2>&5
15821 ac_status=$?
15822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15823 (exit $ac_status); } &&
15824 { ac_try='test -s conftest$ac_exeext'
15825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15826 (eval $ac_try) 2>&5
15827 ac_status=$?
15828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15829 (exit $ac_status); }; }; then
15830 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015831else
Martin v. Löwis11437992002-04-12 09:54:03 +000015832 echo "$as_me: failed program was:" >&5
15833cat conftest.$ac_ext >&5
15834ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015835fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015836rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015837fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015838echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
15839echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
15840if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015841 :
15842else
Martin v. Löwis11437992002-04-12 09:54:03 +000015843
15844echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
15845echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
15846if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
15847 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015848else
Martin v. Löwis11437992002-04-12 09:54:03 +000015849 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015850LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015851cat >conftest.$ac_ext <<_ACEOF
15852#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015853#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015854
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015855/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015856#ifdef __cplusplus
15857extern "C"
15858#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015859/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015860 builtin and then its argument prototype would still apply. */
15861char __fpu_control ();
Barry Warsawfe33b792003-01-07 22:42:49 +000015862#ifdef F77_DUMMY_MAIN
15863# ifdef __cplusplus
15864 extern "C"
15865# endif
15866 int F77_DUMMY_MAIN() { return 1; }
15867#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015868int
15869main ()
15870{
15871__fpu_control ();
15872 ;
15873 return 0;
15874}
15875_ACEOF
15876rm -f conftest.$ac_objext conftest$ac_exeext
15877if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15878 (eval $ac_link) 2>&5
15879 ac_status=$?
15880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15881 (exit $ac_status); } &&
15882 { ac_try='test -s conftest$ac_exeext'
15883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15884 (eval $ac_try) 2>&5
15885 ac_status=$?
15886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15887 (exit $ac_status); }; }; then
15888 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015889else
Martin v. Löwis11437992002-04-12 09:54:03 +000015890 echo "$as_me: failed program was:" >&5
15891cat conftest.$ac_ext >&5
15892ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015893fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015894rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15895LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015896fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015897echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
15898echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
15899if test $ac_cv_lib_ieee___fpu_control = yes; then
15900 cat >>confdefs.h <<_ACEOF
15901#define HAVE_LIBIEEE 1
15902_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015903
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015904 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015905
Guido van Rossum627b2d71993-12-24 10:39:16 +000015906fi
15907
Michael W. Hudson54241132001-12-07 15:38:26 +000015908
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015909fi
15910
Michael W. Hudson54241132001-12-07 15:38:26 +000015911
Guido van Rossum7f253911997-05-09 02:42:48 +000015912# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000015913echo "$as_me:$LINENO: checking for --with-fpectl" >&5
15914echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
15915
Guido van Rossum7f253911997-05-09 02:42:48 +000015916# Check whether --with-fpectl or --without-fpectl was given.
15917if test "${with_fpectl+set}" = set; then
15918 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000015919
Guido van Rossum7f253911997-05-09 02:42:48 +000015920if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015921then
15922
15923cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000015924#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015925_ACEOF
15926
15927 echo "$as_me:$LINENO: result: yes" >&5
15928echo "${ECHO_T}yes" >&6
15929else echo "$as_me:$LINENO: result: no" >&5
15930echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015931fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015932else
Martin v. Löwis11437992002-04-12 09:54:03 +000015933 echo "$as_me:$LINENO: result: no" >&5
15934echo "${ECHO_T}no" >&6
15935fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000015936
Guido van Rossum7f43da71994-08-01 12:15:30 +000015937# check for --with-libm=...
15938
Guido van Rossum563e7081996-09-10 18:20:48 +000015939case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000015940Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015941BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000015942*) LIBM=-lm
15943esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015944echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
15945echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
15946
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015947# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015948if test "${with_libm+set}" = set; then
15949 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000015950
Guido van Rossum7f253911997-05-09 02:42:48 +000015951if test "$withval" = no
15952then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000015953 echo "$as_me:$LINENO: result: force LIBM empty" >&5
15954echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015955elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015956then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015957 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
15958echo "${ECHO_T}set LIBM=\"$withval\"" >&6
15959else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
15960echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
15961 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015962fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015963else
Martin v. Löwis11437992002-04-12 09:54:03 +000015964 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
15965echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
15966fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015967
15968# check for --with-libc=...
15969
Martin v. Löwis11437992002-04-12 09:54:03 +000015970echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
15971echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
15972
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015973# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015974if test "${with_libc+set}" = set; then
15975 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000015976
Guido van Rossum7f253911997-05-09 02:42:48 +000015977if test "$withval" = no
15978then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000015979 echo "$as_me:$LINENO: result: force LIBC empty" >&5
15980echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015981elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015982then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015983 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
15984echo "${ECHO_T}set LIBC=\"$withval\"" >&6
15985else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
15986echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
15987 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015988fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015989else
Martin v. Löwis11437992002-04-12 09:54:03 +000015990 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
15991echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
15992fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015993
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015994# check for hypot() in math library
15995LIBS_SAVE=$LIBS
15996LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000015997
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015998for ac_func in hypot
15999do
Martin v. Löwis11437992002-04-12 09:54:03 +000016000as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16001echo "$as_me:$LINENO: checking for $ac_func" >&5
16002echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16003if eval "test \"\${$as_ac_var+set}\" = set"; then
16004 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016005else
Martin v. Löwis11437992002-04-12 09:54:03 +000016006 cat >conftest.$ac_ext <<_ACEOF
16007#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016008#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016009/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000016010 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016011#include <assert.h>
16012/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016013#ifdef __cplusplus
16014extern "C"
16015#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016016/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016017 builtin and then its argument prototype would still apply. */
16018char $ac_func ();
16019char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016020
Barry Warsawfe33b792003-01-07 22:42:49 +000016021#ifdef F77_DUMMY_MAIN
16022# ifdef __cplusplus
16023 extern "C"
16024# endif
16025 int F77_DUMMY_MAIN() { return 1; }
16026#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016027int
16028main ()
16029{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016030/* The GNU C library defines this for functions which it implements
16031 to always fail with ENOSYS. Some functions are actually named
16032 something starting with __ and the normal name is an alias. */
16033#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16034choke me
16035#else
Martin v. Löwis11437992002-04-12 09:54:03 +000016036f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016037#endif
16038
Martin v. Löwis11437992002-04-12 09:54:03 +000016039 ;
16040 return 0;
16041}
16042_ACEOF
16043rm -f conftest.$ac_objext conftest$ac_exeext
16044if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16045 (eval $ac_link) 2>&5
16046 ac_status=$?
16047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16048 (exit $ac_status); } &&
16049 { ac_try='test -s conftest$ac_exeext'
16050 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16051 (eval $ac_try) 2>&5
16052 ac_status=$?
16053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16054 (exit $ac_status); }; }; then
16055 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016056else
Martin v. Löwis11437992002-04-12 09:54:03 +000016057 echo "$as_me: failed program was:" >&5
16058cat conftest.$ac_ext >&5
16059eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016060fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016061rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016062fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016063echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16064echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16065if test `eval echo '${'$as_ac_var'}'` = yes; then
16066 cat >>confdefs.h <<_ACEOF
16067#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16068_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000016069
Michael W. Hudson54241132001-12-07 15:38:26 +000016070else
Martin v. Löwis11437992002-04-12 09:54:03 +000016071 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016072fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016073done
16074
Michael W. Hudson54241132001-12-07 15:38:26 +000016075
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016076LIBS=$LIBS_SAVE
16077
Guido van Rossumef2255b2000-03-10 22:30:29 +000016078# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000016079if test "${ac_cv_header_wchar_h+set}" = set; then
16080 echo "$as_me:$LINENO: checking for wchar.h" >&5
16081echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16082if test "${ac_cv_header_wchar_h+set}" = set; then
16083 echo $ECHO_N "(cached) $ECHO_C" >&6
16084fi
16085echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16086echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000016087else
Martin v. Löwis11437992002-04-12 09:54:03 +000016088 # Is the header compilable?
16089echo "$as_me:$LINENO: checking wchar.h usability" >&5
16090echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
16091cat >conftest.$ac_ext <<_ACEOF
16092#line $LINENO "configure"
16093#include "confdefs.h"
16094$ac_includes_default
16095#include <wchar.h>
16096_ACEOF
16097rm -f conftest.$ac_objext
16098if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16099 (eval $ac_compile) 2>&5
16100 ac_status=$?
16101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16102 (exit $ac_status); } &&
16103 { ac_try='test -s conftest.$ac_objext'
16104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16105 (eval $ac_try) 2>&5
16106 ac_status=$?
16107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16108 (exit $ac_status); }; }; then
16109 ac_header_compiler=yes
16110else
16111 echo "$as_me: failed program was:" >&5
16112cat conftest.$ac_ext >&5
16113ac_header_compiler=no
16114fi
16115rm -f conftest.$ac_objext conftest.$ac_ext
16116echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16117echo "${ECHO_T}$ac_header_compiler" >&6
16118
16119# Is the header present?
16120echo "$as_me:$LINENO: checking wchar.h presence" >&5
16121echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
16122cat >conftest.$ac_ext <<_ACEOF
16123#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016124#include "confdefs.h"
16125#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016126_ACEOF
16127if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16128 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16129 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000016130 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016131 rm -f conftest.er1
16132 cat conftest.err >&5
16133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16134 (exit $ac_status); } >/dev/null; then
16135 if test -s conftest.err; then
16136 ac_cpp_err=$ac_c_preproc_warn_flag
16137 else
16138 ac_cpp_err=
16139 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016140else
Martin v. Löwis11437992002-04-12 09:54:03 +000016141 ac_cpp_err=yes
16142fi
16143if test -z "$ac_cpp_err"; then
16144 ac_header_preproc=yes
16145else
16146 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000016147 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016148 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016149fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016150rm -f conftest.err conftest.$ac_ext
16151echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16152echo "${ECHO_T}$ac_header_preproc" >&6
16153
16154# So? What about this header?
16155case $ac_header_compiler:$ac_header_preproc in
16156 yes:no )
16157 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
16158echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16159 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
16160echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
16161 no:yes )
16162 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
16163echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
16164 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
16165echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
16166 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
16167echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
16168esac
16169echo "$as_me:$LINENO: checking for wchar.h" >&5
16170echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16171if test "${ac_cv_header_wchar_h+set}" = set; then
16172 echo $ECHO_N "(cached) $ECHO_C" >&6
16173else
16174 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000016175fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016176echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16177echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
16178
16179fi
16180if test $ac_cv_header_wchar_h = yes; then
16181
16182
16183cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016184#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016185_ACEOF
16186
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016187 wchar_h="yes"
16188
Guido van Rossumef2255b2000-03-10 22:30:29 +000016189else
Martin v. Löwis11437992002-04-12 09:54:03 +000016190 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016191
16192fi
16193
Michael W. Hudson54241132001-12-07 15:38:26 +000016194
Martin v. Löwis11437992002-04-12 09:54:03 +000016195
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016196# determine wchar_t size
16197if test "$wchar_h" = yes
16198then
Martin v. Löwis11437992002-04-12 09:54:03 +000016199 echo "$as_me:$LINENO: checking for wchar_t" >&5
16200echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
16201if test "${ac_cv_type_wchar_t+set}" = set; then
16202 echo $ECHO_N "(cached) $ECHO_C" >&6
16203else
16204 cat >conftest.$ac_ext <<_ACEOF
16205#line $LINENO "configure"
16206#include "confdefs.h"
16207#include <wchar.h>
16208
Barry Warsawfe33b792003-01-07 22:42:49 +000016209#ifdef F77_DUMMY_MAIN
16210# ifdef __cplusplus
16211 extern "C"
16212# endif
16213 int F77_DUMMY_MAIN() { return 1; }
16214#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016215int
16216main ()
16217{
16218if ((wchar_t *) 0)
16219 return 0;
16220if (sizeof (wchar_t))
16221 return 0;
16222 ;
16223 return 0;
16224}
16225_ACEOF
16226rm -f conftest.$ac_objext
16227if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16228 (eval $ac_compile) 2>&5
16229 ac_status=$?
16230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16231 (exit $ac_status); } &&
16232 { ac_try='test -s conftest.$ac_objext'
16233 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16234 (eval $ac_try) 2>&5
16235 ac_status=$?
16236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16237 (exit $ac_status); }; }; then
16238 ac_cv_type_wchar_t=yes
16239else
16240 echo "$as_me: failed program was:" >&5
16241cat conftest.$ac_ext >&5
16242ac_cv_type_wchar_t=no
16243fi
16244rm -f conftest.$ac_objext conftest.$ac_ext
16245fi
16246echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
16247echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
16248
16249echo "$as_me:$LINENO: checking size of wchar_t" >&5
16250echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
16251if test "${ac_cv_sizeof_wchar_t+set}" = set; then
16252 echo $ECHO_N "(cached) $ECHO_C" >&6
16253else
16254 if test "$ac_cv_type_wchar_t" = yes; then
16255 # The cast to unsigned long works around a bug in the HP C Compiler
16256 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16257 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16258 # This bug is HP SR number 8606223364.
16259 if test "$cross_compiling" = yes; then
16260 # Depending upon the size, compute the lo and hi bounds.
16261cat >conftest.$ac_ext <<_ACEOF
16262#line $LINENO "configure"
16263#include "confdefs.h"
16264#include <wchar.h>
16265
Barry Warsawfe33b792003-01-07 22:42:49 +000016266#ifdef F77_DUMMY_MAIN
16267# ifdef __cplusplus
16268 extern "C"
16269# endif
16270 int F77_DUMMY_MAIN() { return 1; }
16271#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016272int
16273main ()
16274{
16275static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
16276test_array [0] = 0
16277
16278 ;
16279 return 0;
16280}
16281_ACEOF
16282rm -f conftest.$ac_objext
16283if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16284 (eval $ac_compile) 2>&5
16285 ac_status=$?
16286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16287 (exit $ac_status); } &&
16288 { ac_try='test -s conftest.$ac_objext'
16289 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16290 (eval $ac_try) 2>&5
16291 ac_status=$?
16292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16293 (exit $ac_status); }; }; then
16294 ac_lo=0 ac_mid=0
16295 while :; do
16296 cat >conftest.$ac_ext <<_ACEOF
16297#line $LINENO "configure"
16298#include "confdefs.h"
16299#include <wchar.h>
16300
Barry Warsawfe33b792003-01-07 22:42:49 +000016301#ifdef F77_DUMMY_MAIN
16302# ifdef __cplusplus
16303 extern "C"
16304# endif
16305 int F77_DUMMY_MAIN() { return 1; }
16306#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016307int
16308main ()
16309{
16310static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16311test_array [0] = 0
16312
16313 ;
16314 return 0;
16315}
16316_ACEOF
16317rm -f conftest.$ac_objext
16318if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16319 (eval $ac_compile) 2>&5
16320 ac_status=$?
16321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16322 (exit $ac_status); } &&
16323 { ac_try='test -s conftest.$ac_objext'
16324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16325 (eval $ac_try) 2>&5
16326 ac_status=$?
16327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16328 (exit $ac_status); }; }; then
16329 ac_hi=$ac_mid; break
16330else
16331 echo "$as_me: failed program was:" >&5
16332cat conftest.$ac_ext >&5
16333ac_lo=`expr $ac_mid + 1`
16334 if test $ac_lo -le $ac_mid; then
16335 ac_lo= ac_hi=
16336 break
16337 fi
16338 ac_mid=`expr 2 '*' $ac_mid + 1`
16339fi
16340rm -f conftest.$ac_objext conftest.$ac_ext
16341 done
16342else
16343 echo "$as_me: failed program was:" >&5
16344cat conftest.$ac_ext >&5
16345cat >conftest.$ac_ext <<_ACEOF
16346#line $LINENO "configure"
16347#include "confdefs.h"
16348#include <wchar.h>
16349
Barry Warsawfe33b792003-01-07 22:42:49 +000016350#ifdef F77_DUMMY_MAIN
16351# ifdef __cplusplus
16352 extern "C"
16353# endif
16354 int F77_DUMMY_MAIN() { return 1; }
16355#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016356int
16357main ()
16358{
16359static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
16360test_array [0] = 0
16361
16362 ;
16363 return 0;
16364}
16365_ACEOF
16366rm -f conftest.$ac_objext
16367if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16368 (eval $ac_compile) 2>&5
16369 ac_status=$?
16370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16371 (exit $ac_status); } &&
16372 { ac_try='test -s conftest.$ac_objext'
16373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16374 (eval $ac_try) 2>&5
16375 ac_status=$?
16376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16377 (exit $ac_status); }; }; then
16378 ac_hi=-1 ac_mid=-1
16379 while :; do
16380 cat >conftest.$ac_ext <<_ACEOF
16381#line $LINENO "configure"
16382#include "confdefs.h"
16383#include <wchar.h>
16384
Barry Warsawfe33b792003-01-07 22:42:49 +000016385#ifdef F77_DUMMY_MAIN
16386# ifdef __cplusplus
16387 extern "C"
16388# endif
16389 int F77_DUMMY_MAIN() { return 1; }
16390#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016391int
16392main ()
16393{
16394static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
16395test_array [0] = 0
16396
16397 ;
16398 return 0;
16399}
16400_ACEOF
16401rm -f conftest.$ac_objext
16402if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16403 (eval $ac_compile) 2>&5
16404 ac_status=$?
16405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16406 (exit $ac_status); } &&
16407 { ac_try='test -s conftest.$ac_objext'
16408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16409 (eval $ac_try) 2>&5
16410 ac_status=$?
16411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16412 (exit $ac_status); }; }; then
16413 ac_lo=$ac_mid; break
16414else
16415 echo "$as_me: failed program was:" >&5
16416cat conftest.$ac_ext >&5
16417ac_hi=`expr '(' $ac_mid ')' - 1`
16418 if test $ac_mid -le $ac_hi; then
16419 ac_lo= ac_hi=
16420 break
16421 fi
16422 ac_mid=`expr 2 '*' $ac_mid`
16423fi
16424rm -f conftest.$ac_objext conftest.$ac_ext
16425 done
16426else
16427 echo "$as_me: failed program was:" >&5
16428cat conftest.$ac_ext >&5
16429ac_lo= ac_hi=
16430fi
16431rm -f conftest.$ac_objext conftest.$ac_ext
16432fi
16433rm -f conftest.$ac_objext conftest.$ac_ext
16434# Binary search between lo and hi bounds.
16435while test "x$ac_lo" != "x$ac_hi"; do
16436 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
16437 cat >conftest.$ac_ext <<_ACEOF
16438#line $LINENO "configure"
16439#include "confdefs.h"
16440#include <wchar.h>
16441
Barry Warsawfe33b792003-01-07 22:42:49 +000016442#ifdef F77_DUMMY_MAIN
16443# ifdef __cplusplus
16444 extern "C"
16445# endif
16446 int F77_DUMMY_MAIN() { return 1; }
16447#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016448int
16449main ()
16450{
16451static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16452test_array [0] = 0
16453
16454 ;
16455 return 0;
16456}
16457_ACEOF
16458rm -f conftest.$ac_objext
16459if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16460 (eval $ac_compile) 2>&5
16461 ac_status=$?
16462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16463 (exit $ac_status); } &&
16464 { ac_try='test -s conftest.$ac_objext'
16465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16466 (eval $ac_try) 2>&5
16467 ac_status=$?
16468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16469 (exit $ac_status); }; }; then
16470 ac_hi=$ac_mid
16471else
16472 echo "$as_me: failed program was:" >&5
16473cat conftest.$ac_ext >&5
16474ac_lo=`expr '(' $ac_mid ')' + 1`
16475fi
16476rm -f conftest.$ac_objext conftest.$ac_ext
16477done
16478case $ac_lo in
16479?*) ac_cv_sizeof_wchar_t=$ac_lo;;
16480'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
16481echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
16482 { (exit 1); exit 1; }; } ;;
16483esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016484else
16485 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016486 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
16487echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16488 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000016489else
Martin v. Löwis11437992002-04-12 09:54:03 +000016490 cat >conftest.$ac_ext <<_ACEOF
16491#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016492#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016493#include <wchar.h>
16494
16495long longval () { return (long) (sizeof (wchar_t)); }
16496unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000016497#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016498#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000016499#ifdef F77_DUMMY_MAIN
16500# ifdef __cplusplus
16501 extern "C"
16502# endif
16503 int F77_DUMMY_MAIN() { return 1; }
16504#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016505int
16506main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016507{
Martin v. Löwis11437992002-04-12 09:54:03 +000016508
16509 FILE *f = fopen ("conftest.val", "w");
16510 if (! f)
16511 exit (1);
16512 if (((long) (sizeof (wchar_t))) < 0)
16513 {
16514 long i = longval ();
16515 if (i != ((long) (sizeof (wchar_t))))
16516 exit (1);
16517 fprintf (f, "%ld\n", i);
16518 }
16519 else
16520 {
16521 unsigned long i = ulongval ();
16522 if (i != ((long) (sizeof (wchar_t))))
16523 exit (1);
16524 fprintf (f, "%lu\n", i);
16525 }
16526 exit (ferror (f) || fclose (f) != 0);
16527
16528 ;
16529 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000016530}
Martin v. Löwis11437992002-04-12 09:54:03 +000016531_ACEOF
16532rm -f conftest$ac_exeext
16533if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16534 (eval $ac_link) 2>&5
16535 ac_status=$?
16536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16537 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16539 (eval $ac_try) 2>&5
16540 ac_status=$?
16541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16542 (exit $ac_status); }; }; then
16543 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000016544else
Martin v. Löwis11437992002-04-12 09:54:03 +000016545 echo "$as_me: program exited with status $ac_status" >&5
16546echo "$as_me: failed program was:" >&5
16547cat conftest.$ac_ext >&5
16548( exit $ac_status )
16549{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
16550echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
16551 { (exit 1); exit 1; }; }
16552fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016553rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016554fi
16555fi
16556rm -f conftest.val
16557else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016558 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000016559fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016560fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016561echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
16562echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
16563cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016564#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016565_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016566
Michael W. Hudson54241132001-12-07 15:38:26 +000016567
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016568fi
16569
Martin v. Löwis11437992002-04-12 09:54:03 +000016570echo "$as_me:$LINENO: checking what type to use for unicode" >&5
16571echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016572# Check whether --enable-unicode or --disable-unicode was given.
16573if test "${enable_unicode+set}" = set; then
16574 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000016575
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016576else
16577 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000016578fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016579
16580if test $enable_unicode = yes
16581then
Martin v. Löwisfd917792001-06-27 20:22:04 +000016582 # Without any arguments, Py_UNICODE defaults to two-byte mode
16583 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016584fi
16585
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016586
16587
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016588case "$enable_unicode" in
16589ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000016590 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016591#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000016592_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016593
16594 ;;
16595ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000016596 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016597#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000016598_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016599
16600 ;;
16601esac
16602
Michael W. Hudson54241132001-12-07 15:38:26 +000016603
Martin v. Löwis11437992002-04-12 09:54:03 +000016604
16605
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016606
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016607if test "$enable_unicode" = "no"
16608then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016609 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000016610 echo "$as_me:$LINENO: result: not used" >&5
16611echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016612else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016613 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000016614
16615cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016616#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016617_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016618
16619 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
16620 then
16621 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016622
Martin v. Löwis11437992002-04-12 09:54:03 +000016623cat >>confdefs.h <<\_ACEOF
16624#define HAVE_USABLE_WCHAR_T 1
16625_ACEOF
16626
16627 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016628#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016629_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016630
16631 elif test "$ac_cv_sizeof_short" = "$unicode_size"
16632 then
16633 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000016634 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016635#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000016636_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016637
16638 elif test "$ac_cv_sizeof_long" = "$unicode_size"
16639 then
16640 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000016641 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016642#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000016643_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016644
16645 else
16646 PY_UNICODE_TYPE="no type found"
16647 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016648 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
16649echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016650fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016651
16652# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000016653echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
16654echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
16655if test "${ac_cv_c_bigendian+set}" = set; then
16656 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000016657else
Martin v. Löwis11437992002-04-12 09:54:03 +000016658 # See if sys/param.h defines the BYTE_ORDER macro.
16659cat >conftest.$ac_ext <<_ACEOF
16660#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016661#include "confdefs.h"
16662#include <sys/types.h>
16663#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000016664
Barry Warsawfe33b792003-01-07 22:42:49 +000016665#ifdef F77_DUMMY_MAIN
16666# ifdef __cplusplus
16667 extern "C"
16668# endif
16669 int F77_DUMMY_MAIN() { return 1; }
16670#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016671int
16672main ()
16673{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016674#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
16675 bogus endian macros
16676#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016677
16678 ;
16679 return 0;
16680}
16681_ACEOF
16682rm -f conftest.$ac_objext
16683if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16684 (eval $ac_compile) 2>&5
16685 ac_status=$?
16686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16687 (exit $ac_status); } &&
16688 { ac_try='test -s conftest.$ac_objext'
16689 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16690 (eval $ac_try) 2>&5
16691 ac_status=$?
16692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16693 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016694 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000016695cat >conftest.$ac_ext <<_ACEOF
16696#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016697#include "confdefs.h"
16698#include <sys/types.h>
16699#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000016700
Barry Warsawfe33b792003-01-07 22:42:49 +000016701#ifdef F77_DUMMY_MAIN
16702# ifdef __cplusplus
16703 extern "C"
16704# endif
16705 int F77_DUMMY_MAIN() { return 1; }
16706#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016707int
16708main ()
16709{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016710#if BYTE_ORDER != BIG_ENDIAN
16711 not big endian
16712#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016713
16714 ;
16715 return 0;
16716}
16717_ACEOF
16718rm -f conftest.$ac_objext
16719if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16720 (eval $ac_compile) 2>&5
16721 ac_status=$?
16722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16723 (exit $ac_status); } &&
16724 { ac_try='test -s conftest.$ac_objext'
16725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16726 (eval $ac_try) 2>&5
16727 ac_status=$?
16728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16729 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016730 ac_cv_c_bigendian=yes
16731else
Martin v. Löwis11437992002-04-12 09:54:03 +000016732 echo "$as_me: failed program was:" >&5
16733cat conftest.$ac_ext >&5
16734ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016735fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016736rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016737else
Martin v. Löwis11437992002-04-12 09:54:03 +000016738 echo "$as_me: failed program was:" >&5
16739cat conftest.$ac_ext >&5
16740# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000016741if test "$cross_compiling" = yes; then
Barry Warsawfe33b792003-01-07 22:42:49 +000016742 # try to guess the endianess by grep'ing values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000016743 ac_cv_c_bigendian=unknown
16744 cat >conftest.$ac_ext <<_ACEOF
16745#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016746#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016747short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16748short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16749void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
16750short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16751short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16752void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Barry Warsawfe33b792003-01-07 22:42:49 +000016753#ifdef F77_DUMMY_MAIN
16754# ifdef __cplusplus
16755 extern "C"
16756# endif
16757 int F77_DUMMY_MAIN() { return 1; }
16758#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016759int
16760main ()
16761{
16762 _ascii (); _ebcdic ();
16763 ;
16764 return 0;
16765}
16766_ACEOF
16767rm -f conftest.$ac_objext
16768if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16769 (eval $ac_compile) 2>&5
16770 ac_status=$?
16771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16772 (exit $ac_status); } &&
16773 { ac_try='test -s conftest.$ac_objext'
16774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16775 (eval $ac_try) 2>&5
16776 ac_status=$?
16777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16778 (exit $ac_status); }; }; then
Barry Warsawfe33b792003-01-07 22:42:49 +000016779 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016780 ac_cv_c_bigendian=yes
16781fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016782if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016783 if test "$ac_cv_c_bigendian" = unknown; then
16784 ac_cv_c_bigendian=no
16785 else
16786 # finding both strings is unlikely to happen, but who knows?
16787 ac_cv_c_bigendian=unknown
16788 fi
16789fi
16790else
16791 echo "$as_me: failed program was:" >&5
16792cat conftest.$ac_ext >&5
16793fi
16794rm -f conftest.$ac_objext conftest.$ac_ext
16795else
16796 cat >conftest.$ac_ext <<_ACEOF
16797#line $LINENO "configure"
16798#include "confdefs.h"
16799int
16800main ()
16801{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016802 /* Are we little or big endian? From Harbison&Steele. */
16803 union
16804 {
16805 long l;
16806 char c[sizeof (long)];
16807 } u;
16808 u.l = 1;
16809 exit (u.c[sizeof (long) - 1] == 1);
16810}
Martin v. Löwis11437992002-04-12 09:54:03 +000016811_ACEOF
16812rm -f conftest$ac_exeext
16813if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16814 (eval $ac_link) 2>&5
16815 ac_status=$?
16816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16817 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16819 (eval $ac_try) 2>&5
16820 ac_status=$?
16821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16822 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016823 ac_cv_c_bigendian=no
16824else
Martin v. Löwis11437992002-04-12 09:54:03 +000016825 echo "$as_me: program exited with status $ac_status" >&5
16826echo "$as_me: failed program was:" >&5
16827cat conftest.$ac_ext >&5
16828( exit $ac_status )
16829ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000016830fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016831rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016832fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016833fi
16834rm -f conftest.$ac_objext conftest.$ac_ext
16835fi
16836echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
16837echo "${ECHO_T}$ac_cv_c_bigendian" >&6
16838case $ac_cv_c_bigendian in
16839 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000016840
Martin v. Löwis11437992002-04-12 09:54:03 +000016841cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016842#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016843_ACEOF
16844 ;;
16845 no)
16846 ;;
16847 *)
Barry Warsawfe33b792003-01-07 22:42:49 +000016848 { { echo "$as_me:$LINENO: error: unknown endianess
Martin v. Löwis11437992002-04-12 09:54:03 +000016849presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Barry Warsawfe33b792003-01-07 22:42:49 +000016850echo "$as_me: error: unknown endianess
Martin v. Löwis11437992002-04-12 09:54:03 +000016851presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
16852 { (exit 1); exit 1; }; } ;;
16853esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000016854
Michael W. Hudson54241132001-12-07 15:38:26 +000016855
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016856# Check whether right shifting a negative integer extends the sign bit
16857# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000016858echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
16859echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
16860if test "${ac_cv_rshift_extends_sign+set}" = set; then
16861 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016862else
Martin v. Löwis11437992002-04-12 09:54:03 +000016863
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016864if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000016865 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016866else
Martin v. Löwis11437992002-04-12 09:54:03 +000016867 cat >conftest.$ac_ext <<_ACEOF
16868#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016869#include "confdefs.h"
16870
16871int main()
16872{
Vladimir Marangozova6180282000-07-12 05:05:06 +000016873 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016874}
16875
Martin v. Löwis11437992002-04-12 09:54:03 +000016876_ACEOF
16877rm -f conftest$ac_exeext
16878if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16879 (eval $ac_link) 2>&5
16880 ac_status=$?
16881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16882 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16884 (eval $ac_try) 2>&5
16885 ac_status=$?
16886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16887 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000016888 ac_cv_rshift_extends_sign=yes
16889else
Martin v. Löwis11437992002-04-12 09:54:03 +000016890 echo "$as_me: program exited with status $ac_status" >&5
16891echo "$as_me: failed program was:" >&5
16892cat conftest.$ac_ext >&5
16893( exit $ac_status )
16894ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000016895fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016896rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016897fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000016898fi
16899
Martin v. Löwis11437992002-04-12 09:54:03 +000016900echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
16901echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016902if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016903then
Martin v. Löwis11437992002-04-12 09:54:03 +000016904
16905cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016906#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016907_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016908
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016909fi
16910
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016911# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016912echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
16913echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
16914if test "${ac_cv_have_getc_unlocked+set}" = set; then
16915 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016916else
Martin v. Löwis11437992002-04-12 09:54:03 +000016917
16918cat >conftest.$ac_ext <<_ACEOF
16919#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016920#include "confdefs.h"
16921#include <stdio.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000016922#ifdef F77_DUMMY_MAIN
16923# ifdef __cplusplus
16924 extern "C"
16925# endif
16926 int F77_DUMMY_MAIN() { return 1; }
16927#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016928int
16929main ()
16930{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016931
16932 FILE *f = fopen("/dev/null", "r");
16933 flockfile(f);
16934 getc_unlocked(f);
16935 funlockfile(f);
16936
Martin v. Löwis11437992002-04-12 09:54:03 +000016937 ;
16938 return 0;
16939}
16940_ACEOF
16941rm -f conftest.$ac_objext conftest$ac_exeext
16942if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16943 (eval $ac_link) 2>&5
16944 ac_status=$?
16945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16946 (exit $ac_status); } &&
16947 { ac_try='test -s conftest$ac_exeext'
16948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16949 (eval $ac_try) 2>&5
16950 ac_status=$?
16951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16952 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016953 ac_cv_have_getc_unlocked=yes
16954else
Martin v. Löwis11437992002-04-12 09:54:03 +000016955 echo "$as_me: failed program was:" >&5
16956cat conftest.$ac_ext >&5
16957ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016958fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016959rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016960fi
16961
Martin v. Löwis11437992002-04-12 09:54:03 +000016962echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
16963echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016964if test "$ac_cv_have_getc_unlocked" = yes
16965then
Martin v. Löwis11437992002-04-12 09:54:03 +000016966
16967cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016968#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016969_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016970
16971fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016972
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000016973# check for readline 2.2
16974cat >conftest.$ac_ext <<_ACEOF
16975#line $LINENO "configure"
16976#include "confdefs.h"
16977#include <readline/readline.h>
16978_ACEOF
16979if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16980 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16981 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000016982 egrep -v '^ *\+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000016983 rm -f conftest.er1
16984 cat conftest.err >&5
16985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16986 (exit $ac_status); } >/dev/null; then
16987 if test -s conftest.err; then
16988 ac_cpp_err=$ac_c_preproc_warn_flag
16989 else
16990 ac_cpp_err=
16991 fi
16992else
16993 ac_cpp_err=yes
16994fi
16995if test -z "$ac_cpp_err"; then
16996 have_readline=yes
16997else
16998 echo "$as_me: failed program was:" >&5
16999 cat conftest.$ac_ext >&5
17000 have_readline=no
17001fi
17002rm -f conftest.err conftest.$ac_ext
17003if test $have_readline = yes
17004then
17005 cat >conftest.$ac_ext <<_ACEOF
17006#line $LINENO "configure"
17007#include "confdefs.h"
17008#include <readline/readline.h>
17009
17010_ACEOF
17011if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000017012 egrep "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017013
17014cat >>confdefs.h <<\_ACEOF
17015#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
17016_ACEOF
17017
17018fi
17019rm -f conftest*
17020
17021fi
17022
Martin v. Löwis0daad592001-09-30 21:09:59 +000017023# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000017024echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
17025echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
17026if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
17027 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000017028else
Martin v. Löwis11437992002-04-12 09:54:03 +000017029 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000017030LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017031cat >conftest.$ac_ext <<_ACEOF
17032#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000017033#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000017034
Guido van Rossum353ae582001-07-10 16:45:32 +000017035/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017036#ifdef __cplusplus
17037extern "C"
17038#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000017039/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017040 builtin and then its argument prototype would still apply. */
17041char rl_pre_input_hook ();
Barry Warsawfe33b792003-01-07 22:42:49 +000017042#ifdef F77_DUMMY_MAIN
17043# ifdef __cplusplus
17044 extern "C"
17045# endif
17046 int F77_DUMMY_MAIN() { return 1; }
17047#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017048int
17049main ()
17050{
17051rl_pre_input_hook ();
17052 ;
17053 return 0;
17054}
17055_ACEOF
17056rm -f conftest.$ac_objext conftest$ac_exeext
17057if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17058 (eval $ac_link) 2>&5
17059 ac_status=$?
17060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17061 (exit $ac_status); } &&
17062 { ac_try='test -s 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
17068 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000017069else
Martin v. Löwis11437992002-04-12 09:54:03 +000017070 echo "$as_me: failed program was:" >&5
17071cat conftest.$ac_ext >&5
17072ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000017073fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017074rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17075LIBS=$ac_check_lib_save_LIBS
17076fi
17077echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
17078echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
17079if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017080
Martin v. Löwis11437992002-04-12 09:54:03 +000017081cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017082#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017083_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017084
Martin v. Löwis0daad592001-09-30 21:09:59 +000017085fi
17086
Michael W. Hudson54241132001-12-07 15:38:26 +000017087
Martin v. Löwis0daad592001-09-30 21:09:59 +000017088# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000017089echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
17090echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
17091if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
17092 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000017093else
Martin v. Löwis11437992002-04-12 09:54:03 +000017094 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000017095LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017096cat >conftest.$ac_ext <<_ACEOF
17097#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000017098#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000017099
Martin v. Löwis0daad592001-09-30 21:09:59 +000017100/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017101#ifdef __cplusplus
17102extern "C"
17103#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000017104/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017105 builtin and then its argument prototype would still apply. */
17106char rl_completion_matches ();
Barry Warsawfe33b792003-01-07 22:42:49 +000017107#ifdef F77_DUMMY_MAIN
17108# ifdef __cplusplus
17109 extern "C"
17110# endif
17111 int F77_DUMMY_MAIN() { return 1; }
17112#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017113int
17114main ()
17115{
17116rl_completion_matches ();
17117 ;
17118 return 0;
17119}
17120_ACEOF
17121rm -f conftest.$ac_objext conftest$ac_exeext
17122if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17123 (eval $ac_link) 2>&5
17124 ac_status=$?
17125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17126 (exit $ac_status); } &&
17127 { ac_try='test -s conftest$ac_exeext'
17128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17129 (eval $ac_try) 2>&5
17130 ac_status=$?
17131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17132 (exit $ac_status); }; }; then
17133 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000017134else
Martin v. Löwis11437992002-04-12 09:54:03 +000017135 echo "$as_me: failed program was:" >&5
17136cat conftest.$ac_ext >&5
17137ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000017138fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017139rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17140LIBS=$ac_check_lib_save_LIBS
17141fi
17142echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
17143echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
17144if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017145
Martin v. Löwis11437992002-04-12 09:54:03 +000017146cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017147#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017148_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017149
Guido van Rossum353ae582001-07-10 16:45:32 +000017150fi
17151
Jack Jansendd19cf82001-12-06 22:36:17 +000017152
Martin v. Löwis11437992002-04-12 09:54:03 +000017153echo "$as_me:$LINENO: checking for broken nice()" >&5
17154echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
17155if test "${ac_cv_broken_nice+set}" = set; then
17156 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017157else
Martin v. Löwis11437992002-04-12 09:54:03 +000017158
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017159if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017160 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017161else
Martin v. Löwis11437992002-04-12 09:54:03 +000017162 cat >conftest.$ac_ext <<_ACEOF
17163#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017164#include "confdefs.h"
17165
17166int main()
17167{
17168 int val1 = nice(1);
17169 if (val1 != -1 && val1 == nice(2))
17170 exit(0);
17171 exit(1);
17172}
17173
Martin v. Löwis11437992002-04-12 09:54:03 +000017174_ACEOF
17175rm -f conftest$ac_exeext
17176if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17177 (eval $ac_link) 2>&5
17178 ac_status=$?
17179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17180 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17182 (eval $ac_try) 2>&5
17183 ac_status=$?
17184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17185 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017186 ac_cv_broken_nice=yes
17187else
Martin v. Löwis11437992002-04-12 09:54:03 +000017188 echo "$as_me: program exited with status $ac_status" >&5
17189echo "$as_me: failed program was:" >&5
17190cat conftest.$ac_ext >&5
17191( exit $ac_status )
17192ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017193fi
Barry Warsawfe33b792003-01-07 22:42:49 +000017194rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017195fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017196fi
17197
Martin v. Löwis11437992002-04-12 09:54:03 +000017198echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
17199echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017200if test "$ac_cv_broken_nice" = yes
17201then
Martin v. Löwis11437992002-04-12 09:54:03 +000017202
17203cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017204#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017205_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017206
17207fi
17208
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017209# tzset(3) exists and works like we expect it to
17210echo "$as_me:$LINENO: checking for working tzset()" >&5
17211echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
17212if test "${ac_cv_working_tzset+set}" = set; then
17213 echo $ECHO_N "(cached) $ECHO_C" >&6
17214else
17215
17216if test "$cross_compiling" = yes; then
17217 ac_cv_working_tzset=no
17218else
17219 cat >conftest.$ac_ext <<_ACEOF
17220#line $LINENO "configure"
17221#include "confdefs.h"
17222
17223#include <stdlib.h>
17224#include <time.h>
17225int main()
17226{
17227 int gmt_hour;
17228 int eastern_hour;
17229 time_t now;
17230 now = time((time_t*)NULL);
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017231 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017232 tzset();
17233 gmt_hour = localtime(&now)->tm_hour;
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017234 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017235 tzset();
17236 eastern_hour = localtime(&now)->tm_hour;
17237 if (eastern_hour == gmt_hour)
17238 exit(1);
17239 exit(0);
17240}
17241
17242_ACEOF
17243rm -f conftest$ac_exeext
17244if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17245 (eval $ac_link) 2>&5
17246 ac_status=$?
17247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17248 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17250 (eval $ac_try) 2>&5
17251 ac_status=$?
17252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17253 (exit $ac_status); }; }; then
17254 ac_cv_working_tzset=yes
17255else
17256 echo "$as_me: program exited with status $ac_status" >&5
17257echo "$as_me: failed program was:" >&5
17258cat conftest.$ac_ext >&5
17259( exit $ac_status )
17260ac_cv_working_tzset=no
17261fi
17262rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17263fi
17264fi
17265
17266echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
17267echo "${ECHO_T}$ac_cv_working_tzset" >&6
17268if test "$ac_cv_working_tzset" = yes
17269then
17270
17271cat >>confdefs.h <<\_ACEOF
17272#define HAVE_WORKING_TZSET 1
17273_ACEOF
17274
17275fi
17276
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017277# Look for subsecond timestamps in struct stat
17278echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
17279echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
17280if test "${ac_cv_stat_tv_nsec+set}" = set; then
17281 echo $ECHO_N "(cached) $ECHO_C" >&6
17282else
17283 cat >conftest.$ac_ext <<_ACEOF
17284#line $LINENO "configure"
17285#include "confdefs.h"
17286#include <sys/stat.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öwis94717ed2002-09-09 14:24:16 +000017293int
17294main ()
17295{
17296
17297struct stat st;
17298st.st_mtim.tv_nsec = 1;
17299
17300 ;
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
Martin v. Löwisa32c9942002-09-09 16:17:47 +000017316 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017317else
17318 echo "$as_me: failed program was:" >&5
17319cat conftest.$ac_ext >&5
17320ac_cv_stat_tv_nsec=no
17321fi
17322rm -f conftest.$ac_objext conftest.$ac_ext
17323fi
17324
17325echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
17326echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
17327if test "$ac_cv_stat_tv_nsec" = yes
17328then
17329
17330cat >>confdefs.h <<\_ACEOF
17331#define HAVE_STAT_TV_NSEC 1
17332_ACEOF
17333
17334fi
17335
Jack Jansen666b1e72001-10-31 12:11:48 +000017336# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000017337echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
17338echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
17339if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
17340 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017341else
Martin v. Löwis11437992002-04-12 09:54:03 +000017342 cat >conftest.$ac_ext <<_ACEOF
17343#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000017344#include "confdefs.h"
17345#include <curses.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000017346#ifdef F77_DUMMY_MAIN
17347# ifdef __cplusplus
17348 extern "C"
17349# endif
17350 int F77_DUMMY_MAIN() { return 1; }
17351#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017352int
17353main ()
17354{
Jack Jansen666b1e72001-10-31 12:11:48 +000017355
17356 int rtn;
17357 rtn = mvwdelch(0,0,0);
17358
Martin v. Löwis11437992002-04-12 09:54:03 +000017359 ;
17360 return 0;
17361}
17362_ACEOF
17363rm -f conftest.$ac_objext
17364if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17365 (eval $ac_compile) 2>&5
17366 ac_status=$?
17367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17368 (exit $ac_status); } &&
17369 { ac_try='test -s conftest.$ac_objext'
17370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17371 (eval $ac_try) 2>&5
17372 ac_status=$?
17373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17374 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017375 ac_cv_mvwdelch_is_expression=yes
17376else
Martin v. Löwis11437992002-04-12 09:54:03 +000017377 echo "$as_me: failed program was:" >&5
17378cat conftest.$ac_ext >&5
17379ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017380fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017381rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017382fi
17383
Martin v. Löwis11437992002-04-12 09:54:03 +000017384echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
17385echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017386
17387if test "$ac_cv_mvwdelch_is_expression" = yes
17388then
Martin v. Löwis11437992002-04-12 09:54:03 +000017389
17390cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017391#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017392_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017393
17394fi
17395
Martin v. Löwis11437992002-04-12 09:54:03 +000017396echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
17397echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
17398if test "${ac_cv_window_has_flags+set}" = set; then
17399 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017400else
Martin v. Löwis11437992002-04-12 09:54:03 +000017401 cat >conftest.$ac_ext <<_ACEOF
17402#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000017403#include "confdefs.h"
17404#include <curses.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000017405#ifdef F77_DUMMY_MAIN
17406# ifdef __cplusplus
17407 extern "C"
17408# endif
17409 int F77_DUMMY_MAIN() { return 1; }
17410#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017411int
17412main ()
17413{
Jack Jansen666b1e72001-10-31 12:11:48 +000017414
17415 WINDOW *w;
17416 w->_flags = 0;
17417
Martin v. Löwis11437992002-04-12 09:54:03 +000017418 ;
17419 return 0;
17420}
17421_ACEOF
17422rm -f conftest.$ac_objext
17423if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17424 (eval $ac_compile) 2>&5
17425 ac_status=$?
17426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17427 (exit $ac_status); } &&
17428 { ac_try='test -s conftest.$ac_objext'
17429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17430 (eval $ac_try) 2>&5
17431 ac_status=$?
17432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17433 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017434 ac_cv_window_has_flags=yes
17435else
Martin v. Löwis11437992002-04-12 09:54:03 +000017436 echo "$as_me: failed program was:" >&5
17437cat conftest.$ac_ext >&5
17438ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017439fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017440rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017441fi
17442
Martin v. Löwis11437992002-04-12 09:54:03 +000017443echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
17444echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017445
Jack Jansen666b1e72001-10-31 12:11:48 +000017446
17447if test "$ac_cv_window_has_flags" = yes
17448then
Martin v. Löwis11437992002-04-12 09:54:03 +000017449
17450cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017451#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017452_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017453
17454fi
17455
Martin v. Löwis24a880b2002-12-31 12:55:15 +000017456echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
17457echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
17458
17459if test -e /dev/ptmx
17460then
17461 echo "$as_me:$LINENO: result: yes" >&5
17462echo "${ECHO_T}yes" >&6
17463
17464cat >>confdefs.h <<\_ACEOF
17465#define HAVE_DEV_PTMX 1
17466_ACEOF
17467
17468else
17469 echo "$as_me:$LINENO: result: no" >&5
17470echo "${ECHO_T}no" >&6
17471fi
17472
Neal Norwitz865400f2003-03-21 01:42:58 +000017473echo "$as_me:$LINENO: checking for /dev/ptc" >&5
17474echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
17475
17476if test -e /dev/ptc
17477then
17478 echo "$as_me:$LINENO: result: yes" >&5
17479echo "${ECHO_T}yes" >&6
17480
17481cat >>confdefs.h <<\_ACEOF
17482#define HAVE_DEV_PTC 1
17483_ACEOF
17484
17485else
17486 echo "$as_me:$LINENO: result: no" >&5
17487echo "${ECHO_T}no" >&6
17488fi
17489
Martin v. Löwis11437992002-04-12 09:54:03 +000017490echo "$as_me:$LINENO: checking for socklen_t" >&5
17491echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
17492if test "${ac_cv_type_socklen_t+set}" = set; then
17493 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000017494else
Martin v. Löwis11437992002-04-12 09:54:03 +000017495 cat >conftest.$ac_ext <<_ACEOF
17496#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000017497#include "confdefs.h"
Martin v. Löwis01c04012002-11-11 14:58:44 +000017498
17499#ifdef HAVE_SYS_TYPES_H
17500#include <sys/types.h>
17501#endif
17502#ifdef HAVE_SYS_SOCKET_H
17503#include <sys/socket.h>
17504#endif
17505
17506
Barry Warsawfe33b792003-01-07 22:42:49 +000017507#ifdef F77_DUMMY_MAIN
17508# ifdef __cplusplus
17509 extern "C"
17510# endif
17511 int F77_DUMMY_MAIN() { return 1; }
17512#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017513int
17514main ()
17515{
17516if ((socklen_t *) 0)
17517 return 0;
17518if (sizeof (socklen_t))
17519 return 0;
17520 ;
17521 return 0;
17522}
17523_ACEOF
17524rm -f conftest.$ac_objext
17525if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17526 (eval $ac_compile) 2>&5
17527 ac_status=$?
17528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17529 (exit $ac_status); } &&
17530 { ac_try='test -s conftest.$ac_objext'
17531 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17532 (eval $ac_try) 2>&5
17533 ac_status=$?
17534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17535 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000017536 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000017537else
Martin v. Löwis11437992002-04-12 09:54:03 +000017538 echo "$as_me: failed program was:" >&5
17539cat conftest.$ac_ext >&5
17540ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000017541fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017542rm -f conftest.$ac_objext conftest.$ac_ext
17543fi
17544echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
17545echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
17546if test $ac_cv_type_socklen_t = yes; then
17547 :
17548else
Guido van Rossum95713eb2000-05-18 20:53:31 +000017549
Martin v. Löwis01c04012002-11-11 14:58:44 +000017550cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017551#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000017552_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017553
17554fi
17555
Michael W. Hudson54241132001-12-07 15:38:26 +000017556
Michael W. Hudson54241132001-12-07 15:38:26 +000017557
17558
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000017559for h in `(cd $srcdir;echo Python/thread_*.h)`
17560do
17561 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
17562done
17563
Michael W. Hudson54241132001-12-07 15:38:26 +000017564
Jack Jansen0b06be72002-06-21 14:48:38 +000017565SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000017566echo "$as_me:$LINENO: checking for build directories" >&5
17567echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017568for dir in $SRCDIRS; do
17569 if test ! -d $dir; then
17570 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000017571 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017572done
Martin v. Löwis11437992002-04-12 09:54:03 +000017573echo "$as_me:$LINENO: result: done" >&5
17574echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000017575
Guido van Rossum627b2d71993-12-24 10:39:16 +000017576# generate output files
Barry Warsawfe33b792003-01-07 22:42:49 +000017577ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017578
Martin v. Löwis11437992002-04-12 09:54:03 +000017579cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017580# This file is a shell script that caches the results of configure
17581# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017582# scripts and configure runs, see configure's option --config-cache.
17583# It is not useful on other systems. If it contains results you don't
17584# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017585#
Martin v. Löwis11437992002-04-12 09:54:03 +000017586# config.status only pays attention to the cache file if you give it
17587# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017588#
Barry Warsawfe33b792003-01-07 22:42:49 +000017589# `ac_cv_env_foo' variables (set or unset) will be overriden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017590# loading this file, other *unset* `ac_cv_foo' will be assigned the
17591# following values.
17592
17593_ACEOF
17594
Guido van Rossumf78abae1997-01-21 22:02:36 +000017595# The following way of writing the cache mishandles newlines in values,
17596# but we know of no workaround that is simple, portable, and efficient.
17597# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017598# Ultrix sh set writes to stderr and can't be redirected directly,
17599# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000017600{
17601 (set) 2>&1 |
17602 case `(ac_space=' '; set | grep ac_space) 2>&1` in
17603 *ac_space=\ *)
17604 # `set' does not quote correctly, so add quotes (double-quote
17605 # substitution turns \\\\ into \\, and sed turns \\ into \).
17606 sed -n \
17607 "s/'/'\\\\''/g;
17608 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17609 ;;
17610 *)
17611 # `set' quotes correctly as required by POSIX, so do not add quotes.
17612 sed -n \
17613 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17614 ;;
17615 esac;
17616} |
17617 sed '
17618 t clear
17619 : clear
17620 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17621 t end
17622 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17623 : end' >>confcache
17624if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017625 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017626 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17627 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017628 else
17629 echo "not updating unwritable cache $cache_file"
17630 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017631fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017632rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017633
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017634test "x$prefix" = xNONE && prefix=$ac_default_prefix
17635# Let make expand exec_prefix.
17636test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017637
Martin v. Löwis11437992002-04-12 09:54:03 +000017638# VPATH may cause trouble with some makes, so we remove $(srcdir),
17639# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17640# trailing colons and then remove the whole line if VPATH becomes empty
17641# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000017642if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017643 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17644s/:*\$(srcdir):*/:/;
17645s/:*\${srcdir}:*/:/;
17646s/:*@srcdir@:*/:/;
17647s/^\([^=]*=[ ]*\):*/\1/;
17648s/:*$//;
17649s/^[^=]*=[ ]*$//;
17650}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017651fi
17652
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017653DEFS=-DHAVE_CONFIG_H
17654
Martin v. Löwis11437992002-04-12 09:54:03 +000017655
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017656: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000017657ac_clean_files_save=$ac_clean_files
17658ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17659{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
17660echo "$as_me: creating $CONFIG_STATUS" >&6;}
17661cat >$CONFIG_STATUS <<_ACEOF
17662#! $SHELL
17663# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017664# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017665# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017666# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017667
Martin v. Löwis11437992002-04-12 09:54:03 +000017668debug=false
17669SHELL=\${CONFIG_SHELL-$SHELL}
17670_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000017671
Martin v. Löwis11437992002-04-12 09:54:03 +000017672cat >>$CONFIG_STATUS <<\_ACEOF
Barry Warsawfe33b792003-01-07 22:42:49 +000017673
Martin v. Löwis11437992002-04-12 09:54:03 +000017674## --------------------- ##
17675## M4sh Initialization. ##
17676## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017677
Martin v. Löwis11437992002-04-12 09:54:03 +000017678# Be Bourne compatible
17679if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17680 emulate sh
17681 NULLCMD=:
17682elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17683 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000017684fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017685
Barry Warsawfe33b792003-01-07 22:42:49 +000017686# NLS nuisances.
Martin v. Löwis11437992002-04-12 09:54:03 +000017687# Support unset when possible.
17688if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17689 as_unset=unset
17690else
17691 as_unset=false
17692fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017693
Barry Warsawfe33b792003-01-07 22:42:49 +000017694(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
17695 { $as_unset LANG || test "${LANG+set}" != set; } ||
17696 { LANG=C; export LANG; }
17697(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
17698 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
17699 { LC_ALL=C; export LC_ALL; }
17700(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
17701 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
17702 { LC_TIME=C; export LC_TIME; }
17703(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
17704 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
17705 { LC_CTYPE=C; export LC_CTYPE; }
17706(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
17707 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
17708 { LANGUAGE=C; export LANGUAGE; }
17709(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
17710 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
17711 { LC_COLLATE=C; export LC_COLLATE; }
17712(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
17713 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
17714 { LC_NUMERIC=C; export LC_NUMERIC; }
17715(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
17716 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
17717 { LC_MESSAGES=C; export LC_MESSAGES; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017718
17719
17720# Name of the executable.
Barry Warsawfe33b792003-01-07 22:42:49 +000017721as_me=`(basename "$0") 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017722$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17723 X"$0" : 'X\(//\)$' \| \
17724 X"$0" : 'X\(/\)$' \| \
17725 . : '\(.\)' 2>/dev/null ||
17726echo X/"$0" |
17727 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
17728 /^X\/\(\/\/\)$/{ s//\1/; q; }
17729 /^X\/\(\/\).*/{ s//\1/; q; }
17730 s/.*/./; q'`
17731
17732# PATH needs CR, and LINENO needs CR and PATH.
17733# Avoid depending upon Character Ranges.
17734as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17735as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17736as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17737as_cr_digits='0123456789'
17738as_cr_alnum=$as_cr_Letters$as_cr_digits
17739
17740# The user is always right.
17741if test "${PATH_SEPARATOR+set}" != set; then
17742 echo "#! /bin/sh" >conftest.sh
17743 echo "exit 0" >>conftest.sh
17744 chmod +x conftest.sh
Barry Warsawfe33b792003-01-07 22:42:49 +000017745 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017746 PATH_SEPARATOR=';'
17747 else
17748 PATH_SEPARATOR=:
17749 fi
17750 rm -f conftest.sh
17751fi
17752
17753
17754 as_lineno_1=$LINENO
17755 as_lineno_2=$LINENO
17756 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17757 test "x$as_lineno_1" != "x$as_lineno_2" &&
17758 test "x$as_lineno_3" = "x$as_lineno_2" || {
17759 # Find who we are. Look in the path if we contain no path at all
17760 # relative or not.
17761 case $0 in
17762 *[\\/]* ) as_myself=$0 ;;
17763 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17764for as_dir in $PATH
17765do
17766 IFS=$as_save_IFS
17767 test -z "$as_dir" && as_dir=.
17768 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17769done
17770
17771 ;;
17772 esac
17773 # We did not find ourselves, most probably we were run as `sh COMMAND'
17774 # in which case we are not to be found in the path.
17775 if test "x$as_myself" = x; then
17776 as_myself=$0
17777 fi
17778 if test ! -f "$as_myself"; then
17779 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
17780echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
17781 { (exit 1); exit 1; }; }
17782 fi
17783 case $CONFIG_SHELL in
17784 '')
17785 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17786for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
17787do
17788 IFS=$as_save_IFS
17789 test -z "$as_dir" && as_dir=.
17790 for as_base in sh bash ksh sh5; do
17791 case $as_dir in
17792 /*)
17793 if ("$as_dir/$as_base" -c '
17794 as_lineno_1=$LINENO
17795 as_lineno_2=$LINENO
17796 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17797 test "x$as_lineno_1" != "x$as_lineno_2" &&
17798 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
17799 CONFIG_SHELL=$as_dir/$as_base
17800 export CONFIG_SHELL
17801 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
17802 fi;;
17803 esac
17804 done
17805done
17806;;
Jack Jansendd19cf82001-12-06 22:36:17 +000017807 esac
17808
Martin v. Löwis11437992002-04-12 09:54:03 +000017809 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
17810 # uniformly replaced by the line number. The first 'sed' inserts a
17811 # line-number line before each line; the second 'sed' does the real
17812 # work. The second script uses 'N' to pair each line-number line
17813 # with the numbered line, and appends trailing '-' during
17814 # substitution so that $LINENO is not a special case at line end.
17815 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
17816 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
17817 sed '=' <$as_myself |
17818 sed '
17819 N
17820 s,$,-,
17821 : loop
17822 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
17823 t loop
17824 s,-$,,
17825 s,^['$as_cr_digits']*\n,,
17826 ' >$as_me.lineno &&
17827 chmod +x $as_me.lineno ||
17828 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
17829echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
17830 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017831
Martin v. Löwis11437992002-04-12 09:54:03 +000017832 # Don't try to exec as it changes $[0], causing all sort of problems
17833 # (the dirname of $[0] is not the place where we might find the
17834 # original and so on. Autoconf is especially sensible to this).
17835 . ./$as_me.lineno
17836 # Exit status is that of the last command.
17837 exit
17838}
17839
17840
17841case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
17842 *c*,-n*) ECHO_N= ECHO_C='
17843' ECHO_T=' ' ;;
17844 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
17845 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
17846esac
17847
17848if expr a : '\(a\)' >/dev/null 2>&1; then
17849 as_expr=expr
17850else
17851 as_expr=false
17852fi
17853
17854rm -f conf$$ conf$$.exe conf$$.file
17855echo >conf$$.file
17856if ln -s conf$$.file conf$$ 2>/dev/null; then
17857 # We could just check for DJGPP; but this test a) works b) is more generic
17858 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17859 if test -f conf$$.exe; then
17860 # Don't use ln at all; we don't have any links
17861 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017862 else
Martin v. Löwis11437992002-04-12 09:54:03 +000017863 as_ln_s='ln -s'
17864 fi
17865elif ln conf$$.file conf$$ 2>/dev/null; then
17866 as_ln_s=ln
17867else
17868 as_ln_s='cp -p'
17869fi
17870rm -f conf$$ conf$$.exe conf$$.file
17871
17872as_executable_p="test -f"
17873
17874# Sed expression to map a string onto a valid CPP name.
17875as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
17876
17877# Sed expression to map a string onto a valid variable name.
17878as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
17879
17880
17881# IFS
17882# We need space, tab and new line, in precisely that order.
17883as_nl='
17884'
17885IFS=" $as_nl"
17886
17887# CDPATH.
Barry Warsawfe33b792003-01-07 22:42:49 +000017888$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017889
17890exec 6>&1
17891
17892# Open the log real soon, to keep \$[0] and so on meaningful, and to
17893# report actual input values of CONFIG_FILES etc. instead of their
17894# values after options handling. Logging --version etc. is OK.
17895exec 5>>config.log
17896{
17897 echo
17898 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17899## Running $as_me. ##
17900_ASBOX
17901} >&5
17902cat >&5 <<_CSEOF
17903
Martin v. Löwis88afe662002-10-26 13:47:44 +000017904This file was extended by python $as_me 2.3, which was
Barry Warsawfe33b792003-01-07 22:42:49 +000017905generated by GNU Autoconf 2.53. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017906
17907 CONFIG_FILES = $CONFIG_FILES
17908 CONFIG_HEADERS = $CONFIG_HEADERS
17909 CONFIG_LINKS = $CONFIG_LINKS
17910 CONFIG_COMMANDS = $CONFIG_COMMANDS
17911 $ $0 $@
17912
17913_CSEOF
17914echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
17915echo >&5
17916_ACEOF
17917
17918# Files that config.status was made for.
17919if test -n "$ac_config_files"; then
17920 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17921fi
17922
17923if test -n "$ac_config_headers"; then
17924 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17925fi
17926
17927if test -n "$ac_config_links"; then
17928 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17929fi
17930
17931if test -n "$ac_config_commands"; then
17932 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17933fi
17934
17935cat >>$CONFIG_STATUS <<\_ACEOF
17936
17937ac_cs_usage="\
17938\`$as_me' instantiates files from templates according to the
17939current configuration.
17940
17941Usage: $0 [OPTIONS] [FILE]...
17942
17943 -h, --help print this help, then exit
17944 -V, --version print version number, then exit
17945 -d, --debug don't remove temporary files
17946 --recheck update $as_me by reconfiguring in the same conditions
17947 --file=FILE[:TEMPLATE]
17948 instantiate the configuration file FILE
17949 --header=FILE[:TEMPLATE]
17950 instantiate the configuration header FILE
17951
17952Configuration files:
17953$config_files
17954
17955Configuration headers:
17956$config_headers
17957
17958Report bugs to <bug-autoconf@gnu.org>."
17959_ACEOF
17960
17961cat >>$CONFIG_STATUS <<_ACEOF
17962ac_cs_version="\\
Martin v. Löwis88afe662002-10-26 13:47:44 +000017963python config.status 2.3
Barry Warsawfe33b792003-01-07 22:42:49 +000017964configured by $0, generated by GNU Autoconf 2.53,
Martin v. Löwis11437992002-04-12 09:54:03 +000017965 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17966
17967Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17968Free Software Foundation, Inc.
17969This config.status script is free software; the Free Software Foundation
17970gives unlimited permission to copy, distribute and modify it."
17971srcdir=$srcdir
17972INSTALL="$INSTALL"
17973_ACEOF
17974
17975cat >>$CONFIG_STATUS <<\_ACEOF
17976# If no file are specified by the user, then we need to provide default
17977# value. By we need to know if files were specified by the user.
17978ac_need_defaults=:
17979while test $# != 0
17980do
17981 case $1 in
17982 --*=*)
17983 ac_option=`expr "x$1" : 'x\([^=]*\)='`
17984 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Barry Warsawfe33b792003-01-07 22:42:49 +000017985 shift
17986 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17987 shift
Martin v. Löwis11437992002-04-12 09:54:03 +000017988 ;;
Barry Warsawfe33b792003-01-07 22:42:49 +000017989 -*);;
Martin v. Löwis11437992002-04-12 09:54:03 +000017990 *) # This is not an option, so the user has probably given explicit
17991 # arguments.
17992 ac_need_defaults=false;;
17993 esac
17994
Barry Warsawfe33b792003-01-07 22:42:49 +000017995 case $1 in
Martin v. Löwis11437992002-04-12 09:54:03 +000017996 # Handling of the options.
17997_ACEOF
17998cat >>$CONFIG_STATUS <<_ACEOF
17999 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18000 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18001 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18002_ACEOF
18003cat >>$CONFIG_STATUS <<\_ACEOF
18004 --version | --vers* | -V )
18005 echo "$ac_cs_version"; exit 0 ;;
18006 --he | --h)
18007 # Conflict between --help and --header
18008 { { echo "$as_me:$LINENO: error: ambiguous option: $1
18009Try \`$0 --help' for more information." >&5
18010echo "$as_me: error: ambiguous option: $1
18011Try \`$0 --help' for more information." >&2;}
18012 { (exit 1); exit 1; }; };;
18013 --help | --hel | -h )
18014 echo "$ac_cs_usage"; exit 0 ;;
18015 --debug | --d* | -d )
18016 debug=: ;;
18017 --file | --fil | --fi | --f )
Barry Warsawfe33b792003-01-07 22:42:49 +000018018 shift
18019 CONFIG_FILES="$CONFIG_FILES $1"
Martin v. Löwis11437992002-04-12 09:54:03 +000018020 ac_need_defaults=false;;
18021 --header | --heade | --head | --hea )
Barry Warsawfe33b792003-01-07 22:42:49 +000018022 shift
18023 CONFIG_HEADERS="$CONFIG_HEADERS $1"
Martin v. Löwis11437992002-04-12 09:54:03 +000018024 ac_need_defaults=false;;
18025
18026 # This is an error.
18027 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
18028Try \`$0 --help' for more information." >&5
18029echo "$as_me: error: unrecognized option: $1
18030Try \`$0 --help' for more information." >&2;}
18031 { (exit 1); exit 1; }; } ;;
18032
18033 *) ac_config_targets="$ac_config_targets $1" ;;
18034
18035 esac
18036 shift
18037done
18038
18039_ACEOF
18040
18041
18042
18043
18044
18045cat >>$CONFIG_STATUS <<\_ACEOF
18046for ac_config_target in $ac_config_targets
18047do
18048 case "$ac_config_target" in
18049 # Handling of arguments.
18050 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
18051 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
18052 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18053 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
18054echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18055 { (exit 1); exit 1; }; };;
18056 esac
18057done
18058
18059# If the user did not use the arguments to specify the items to instantiate,
18060# then the envvar interface is used. Set only those that are not.
18061# We use the long form for the default assignment because of an extremely
18062# bizarre bug on SunOS 4.1.3.
18063if $ac_need_defaults; then
18064 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18065 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18066fi
18067
18068# Create a temporary directory, and hook for its removal unless debugging.
18069$debug ||
18070{
18071 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18072 trap '{ (exit 1); exit 1; }' 1 2 13 15
18073}
18074
18075# Create a (secure) tmp directory for tmp files.
18076: ${TMPDIR=/tmp}
18077{
18078 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18079 test -n "$tmp" && test -d "$tmp"
18080} ||
18081{
18082 tmp=$TMPDIR/cs$$-$RANDOM
18083 (umask 077 && mkdir $tmp)
18084} ||
18085{
18086 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18087 { (exit 1); exit 1; }
18088}
18089
18090_ACEOF
18091
18092cat >>$CONFIG_STATUS <<_ACEOF
18093
18094#
18095# CONFIG_FILES section.
18096#
18097
18098# No need to generate the scripts if there are no CONFIG_FILES.
18099# This happens for instance when ./config.status config.h
18100if test -n "\$CONFIG_FILES"; then
18101 # Protect against being on the right side of a sed subst in config.status.
18102 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18103 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18104s,@SHELL@,$SHELL,;t t
18105s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18106s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18107s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18108s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18109s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18110s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18111s,@exec_prefix@,$exec_prefix,;t t
18112s,@prefix@,$prefix,;t t
18113s,@program_transform_name@,$program_transform_name,;t t
18114s,@bindir@,$bindir,;t t
18115s,@sbindir@,$sbindir,;t t
18116s,@libexecdir@,$libexecdir,;t t
18117s,@datadir@,$datadir,;t t
18118s,@sysconfdir@,$sysconfdir,;t t
18119s,@sharedstatedir@,$sharedstatedir,;t t
18120s,@localstatedir@,$localstatedir,;t t
18121s,@libdir@,$libdir,;t t
18122s,@includedir@,$includedir,;t t
18123s,@oldincludedir@,$oldincludedir,;t t
18124s,@infodir@,$infodir,;t t
18125s,@mandir@,$mandir,;t t
18126s,@build_alias@,$build_alias,;t t
18127s,@host_alias@,$host_alias,;t t
18128s,@target_alias@,$target_alias,;t t
18129s,@DEFS@,$DEFS,;t t
18130s,@ECHO_C@,$ECHO_C,;t t
18131s,@ECHO_N@,$ECHO_N,;t t
18132s,@ECHO_T@,$ECHO_T,;t t
18133s,@LIBS@,$LIBS,;t t
18134s,@VERSION@,$VERSION,;t t
18135s,@SOVERSION@,$SOVERSION,;t t
18136s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
18137s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
18138s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
18139s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
18140s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
18141s,@MACHDEP@,$MACHDEP,;t t
18142s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000018143s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000018144s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018145s,@CXX@,$CXX,;t t
18146s,@MAINOBJ@,$MAINOBJ,;t t
18147s,@EXEEXT@,$EXEEXT,;t t
18148s,@CC@,$CC,;t t
18149s,@CFLAGS@,$CFLAGS,;t t
18150s,@LDFLAGS@,$LDFLAGS,;t t
18151s,@CPPFLAGS@,$CPPFLAGS,;t t
18152s,@ac_ct_CC@,$ac_ct_CC,;t t
18153s,@OBJEXT@,$OBJEXT,;t t
18154s,@CPP@,$CPP,;t t
18155s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
18156s,@LIBRARY@,$LIBRARY,;t t
18157s,@LDLIBRARY@,$LDLIBRARY,;t t
18158s,@DLLLIBRARY@,$DLLLIBRARY,;t t
18159s,@BLDLIBRARY@,$BLDLIBRARY,;t t
18160s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
18161s,@INSTSONAME@,$INSTSONAME,;t t
18162s,@RUNSHARED@,$RUNSHARED,;t t
18163s,@LINKCC@,$LINKCC,;t t
18164s,@RANLIB@,$RANLIB,;t t
18165s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18166s,@AR@,$AR,;t t
18167s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18168s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18169s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18170s,@LN@,$LN,;t t
18171s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000018172s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018173s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
18174s,@SO@,$SO,;t t
18175s,@LDSHARED@,$LDSHARED,;t t
18176s,@BLDSHARED@,$BLDSHARED,;t t
18177s,@CCSHARED@,$CCSHARED,;t t
18178s,@LINKFORSHARED@,$LINKFORSHARED,;t t
18179s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018180s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018181s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
18182s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
18183s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
18184s,@LDLAST@,$LDLAST,;t t
18185s,@THREADOBJ@,$THREADOBJ,;t t
18186s,@DLINCLDIR@,$DLINCLDIR,;t t
18187s,@DYNLOADFILE@,$DYNLOADFILE,;t t
18188s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018189s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018190s,@LIBOBJS@,$LIBOBJS,;t t
18191s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
18192s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
18193s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
18194s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
18195s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
18196s,@LIBM@,$LIBM,;t t
18197s,@LIBC@,$LIBC,;t t
18198s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
18199s,@THREADHEADERS@,$THREADHEADERS,;t t
18200s,@SRCDIRS@,$SRCDIRS,;t t
18201CEOF
18202
18203_ACEOF
18204
18205 cat >>$CONFIG_STATUS <<\_ACEOF
18206 # Split the substitutions into bite-sized pieces for seds with
18207 # small command number limits, like on Digital OSF/1 and HP-UX.
18208 ac_max_sed_lines=48
18209 ac_sed_frag=1 # Number of current file.
18210 ac_beg=1 # First line for current file.
18211 ac_end=$ac_max_sed_lines # Line after last line for current file.
18212 ac_more_lines=:
18213 ac_sed_cmds=
18214 while $ac_more_lines; do
18215 if test $ac_beg -gt 1; then
18216 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18217 else
18218 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18219 fi
18220 if test ! -s $tmp/subs.frag; then
18221 ac_more_lines=false
18222 else
18223 # The purpose of the label and of the branching condition is to
18224 # speed up the sed processing (if there are no `@' at all, there
18225 # is no need to browse any of the substitutions).
18226 # These are the two extra sed commands mentioned above.
18227 (echo ':t
18228 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18229 if test -z "$ac_sed_cmds"; then
18230 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18231 else
18232 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18233 fi
18234 ac_sed_frag=`expr $ac_sed_frag + 1`
18235 ac_beg=$ac_end
18236 ac_end=`expr $ac_end + $ac_max_sed_lines`
18237 fi
18238 done
18239 if test -z "$ac_sed_cmds"; then
18240 ac_sed_cmds=cat
18241 fi
18242fi # test -n "$CONFIG_FILES"
18243
18244_ACEOF
18245cat >>$CONFIG_STATUS <<\_ACEOF
18246for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18247 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18248 case $ac_file in
18249 - | *:- | *:-:* ) # input from stdin
18250 cat >$tmp/stdin
18251 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18252 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18253 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18254 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18255 * ) ac_file_in=$ac_file.in ;;
18256 esac
18257
18258 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18259 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18260$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18261 X"$ac_file" : 'X\(//\)[^/]' \| \
18262 X"$ac_file" : 'X\(//\)$' \| \
18263 X"$ac_file" : 'X\(/\)' \| \
18264 . : '\(.\)' 2>/dev/null ||
18265echo X"$ac_file" |
18266 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18267 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18268 /^X\(\/\/\)$/{ s//\1/; q; }
18269 /^X\(\/\).*/{ s//\1/; q; }
18270 s/.*/./; q'`
Barry Warsawfe33b792003-01-07 22:42:49 +000018271 { case "$ac_dir" in
18272 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18273 *) as_incr_dir=.;;
18274esac
18275as_dummy="$ac_dir"
18276for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18277 case $as_mkdir_dir in
18278 # Skip DOS drivespec
18279 ?:) as_incr_dir=$as_mkdir_dir ;;
18280 *)
18281 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18282 test -d "$as_incr_dir" ||
18283 mkdir "$as_incr_dir" ||
18284 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18285echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18286 { (exit 1); exit 1; }; }
18287 ;;
18288 esac
18289done; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018290
18291 ac_builddir=.
18292
18293if test "$ac_dir" != .; then
18294 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18295 # A "../" for each directory in $ac_dir_suffix.
18296 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18297else
18298 ac_dir_suffix= ac_top_builddir=
18299fi
18300
18301case $srcdir in
18302 .) # No --srcdir option. We are building in place.
18303 ac_srcdir=.
18304 if test -z "$ac_top_builddir"; then
18305 ac_top_srcdir=.
18306 else
18307 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18308 fi ;;
18309 [\\/]* | ?:[\\/]* ) # Absolute path.
18310 ac_srcdir=$srcdir$ac_dir_suffix;
18311 ac_top_srcdir=$srcdir ;;
18312 *) # Relative path.
18313 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18314 ac_top_srcdir=$ac_top_builddir$srcdir ;;
18315esac
18316# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18317# absolute.
18318ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwis858f8172003-05-24 12:35:47 +000018319ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000018320ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18321ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18322
18323
18324 case $INSTALL in
18325 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18326 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
18327 esac
18328
18329 if test x"$ac_file" != x-; then
18330 { echo "$as_me:$LINENO: creating $ac_file" >&5
18331echo "$as_me: creating $ac_file" >&6;}
18332 rm -f "$ac_file"
18333 fi
18334 # Let's still pretend it is `configure' which instantiates (i.e., don't
18335 # use $as_me), people would be surprised to read:
18336 # /* config.h. Generated by config.status. */
18337 if test x"$ac_file" = x-; then
18338 configure_input=
18339 else
18340 configure_input="$ac_file. "
18341 fi
18342 configure_input=$configure_input"Generated from `echo $ac_file_in |
18343 sed 's,.*/,,'` by configure."
18344
18345 # First look for the input files in the build tree, otherwise in the
18346 # src tree.
18347 ac_file_inputs=`IFS=:
18348 for f in $ac_file_in; do
18349 case $f in
18350 -) echo $tmp/stdin ;;
18351 [\\/$]*)
18352 # Absolute (can't be DOS-style, as IFS=:)
18353 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18354echo "$as_me: error: cannot find input file: $f" >&2;}
18355 { (exit 1); exit 1; }; }
18356 echo $f;;
18357 *) # Relative
18358 if test -f "$f"; then
18359 # Build tree
18360 echo $f
18361 elif test -f "$srcdir/$f"; then
18362 # Source tree
18363 echo $srcdir/$f
18364 else
18365 # /dev/null tree
18366 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18367echo "$as_me: error: cannot find input file: $f" >&2;}
18368 { (exit 1); exit 1; }; }
18369 fi;;
18370 esac
18371 done` || { (exit 1); exit 1; }
18372_ACEOF
18373cat >>$CONFIG_STATUS <<_ACEOF
18374 sed "$ac_vpsub
18375$extrasub
18376_ACEOF
18377cat >>$CONFIG_STATUS <<\_ACEOF
18378:t
18379/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18380s,@configure_input@,$configure_input,;t t
18381s,@srcdir@,$ac_srcdir,;t t
18382s,@abs_srcdir@,$ac_abs_srcdir,;t t
18383s,@top_srcdir@,$ac_top_srcdir,;t t
18384s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18385s,@builddir@,$ac_builddir,;t t
18386s,@abs_builddir@,$ac_abs_builddir,;t t
18387s,@top_builddir@,$ac_top_builddir,;t t
18388s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
18389s,@INSTALL@,$ac_INSTALL,;t t
18390" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18391 rm -f $tmp/stdin
18392 if test x"$ac_file" != x-; then
18393 mv $tmp/out $ac_file
18394 else
18395 cat $tmp/out
18396 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018397 fi
18398
Martin v. Löwis11437992002-04-12 09:54:03 +000018399done
18400_ACEOF
18401cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018402
Martin v. Löwis11437992002-04-12 09:54:03 +000018403#
18404# CONFIG_HEADER section.
18405#
Guido van Rossum627b2d71993-12-24 10:39:16 +000018406
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018407# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18408# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000018409#
18410# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000018411ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18412ac_dB='[ ].*$,\1#\2'
18413ac_dC=' '
18414ac_dD=',;t'
18415# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18416ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18417ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018418ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000018419ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018420
Martin v. Löwis11437992002-04-12 09:54:03 +000018421for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000018422 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000018423 case $ac_file in
18424 - | *:- | *:-:* ) # input from stdin
18425 cat >$tmp/stdin
18426 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18427 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18428 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18429 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18430 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018431 esac
18432
Martin v. Löwis11437992002-04-12 09:54:03 +000018433 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
18434echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000018435
Martin v. Löwis11437992002-04-12 09:54:03 +000018436 # First look for the input files in the build tree, otherwise in the
18437 # src tree.
18438 ac_file_inputs=`IFS=:
18439 for f in $ac_file_in; do
18440 case $f in
18441 -) echo $tmp/stdin ;;
18442 [\\/$]*)
18443 # Absolute (can't be DOS-style, as IFS=:)
18444 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18445echo "$as_me: error: cannot find input file: $f" >&2;}
18446 { (exit 1); exit 1; }; }
18447 echo $f;;
18448 *) # Relative
18449 if test -f "$f"; then
18450 # Build tree
18451 echo $f
18452 elif test -f "$srcdir/$f"; then
18453 # Source tree
18454 echo $srcdir/$f
18455 else
18456 # /dev/null tree
18457 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18458echo "$as_me: error: cannot find input file: $f" >&2;}
18459 { (exit 1); exit 1; }; }
18460 fi;;
18461 esac
18462 done` || { (exit 1); exit 1; }
18463 # Remove the trailing spaces.
18464 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018465
Martin v. Löwis11437992002-04-12 09:54:03 +000018466_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018467
Martin v. Löwis11437992002-04-12 09:54:03 +000018468# Transform confdefs.h into two sed scripts, `conftest.defines' and
18469# `conftest.undefs', that substitutes the proper values into
18470# config.h.in to produce config.h. The first handles `#define'
18471# templates, and the second `#undef' templates.
18472# And first: Protect against being on the right side of a sed subst in
18473# config.status. Protect against being in an unquoted here document
18474# in config.status.
18475rm -f conftest.defines conftest.undefs
18476# Using a here document instead of a string reduces the quoting nightmare.
18477# Putting comments in sed scripts is not portable.
18478#
18479# `end' is used to avoid that the second main sed command (meant for
18480# 0-ary CPP macros) applies to n-ary macro definitions.
18481# See the Autoconf documentation for `clear'.
18482cat >confdef2sed.sed <<\_ACEOF
18483s/[\\&,]/\\&/g
18484s,[\\$`],\\&,g
18485t clear
18486: clear
18487s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
18488t end
18489s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
18490: end
18491_ACEOF
18492# If some macros were called several times there might be several times
18493# the same #defines, which is useless. Nevertheless, we may not want to
18494# sort them, since we want the *last* AC-DEFINE to be honored.
18495uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
18496sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
18497rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018498
18499# This sed command replaces #undef with comments. This is necessary, for
18500# example, in the case of _POSIX_SOURCE, which is predefined and required
18501# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000018502cat >>conftest.undefs <<\_ACEOF
18503s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
18504_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018505
Martin v. Löwis11437992002-04-12 09:54:03 +000018506# Break up conftest.defines because some shells have a limit on the size
18507# of here documents, and old seds have small limits too (100 cmds).
18508echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Barry Warsawfe33b792003-01-07 22:42:49 +000018509echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018510echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
18511echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018512rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000018513while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000018514do
Martin v. Löwis11437992002-04-12 09:54:03 +000018515 # Write a limited-size here document to $tmp/defines.sed.
18516 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
18517 # Speed up: don't consider the non `#define' lines.
18518 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
18519 # Work around the forget-to-reset-the-flag bug.
18520 echo 't clr' >>$CONFIG_STATUS
18521 echo ': clr' >>$CONFIG_STATUS
18522 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018523 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018524 sed -f $tmp/defines.sed $tmp/in >$tmp/out
18525 rm -f $tmp/in
18526 mv $tmp/out $tmp/in
18527' >>$CONFIG_STATUS
18528 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
18529 rm -f conftest.defines
18530 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000018531done
Martin v. Löwis11437992002-04-12 09:54:03 +000018532rm -f conftest.defines
Barry Warsawfe33b792003-01-07 22:42:49 +000018533echo ' fi # egrep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018534echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018535
Martin v. Löwis11437992002-04-12 09:54:03 +000018536# Break up conftest.undefs because some shells have a limit on the size
18537# of here documents, and old seds have small limits too (100 cmds).
18538echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
18539rm -f conftest.tail
18540while grep . conftest.undefs >/dev/null
18541do
18542 # Write a limited-size here document to $tmp/undefs.sed.
18543 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
18544 # Speed up: don't consider the non `#undef'
18545 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
18546 # Work around the forget-to-reset-the-flag bug.
18547 echo 't clr' >>$CONFIG_STATUS
18548 echo ': clr' >>$CONFIG_STATUS
18549 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
18550 echo 'CEOF
18551 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
18552 rm -f $tmp/in
18553 mv $tmp/out $tmp/in
18554' >>$CONFIG_STATUS
18555 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
18556 rm -f conftest.undefs
18557 mv conftest.tail conftest.undefs
18558done
18559rm -f conftest.undefs
18560
18561cat >>$CONFIG_STATUS <<\_ACEOF
18562 # Let's still pretend it is `configure' which instantiates (i.e., don't
18563 # use $as_me), people would be surprised to read:
18564 # /* config.h. Generated by config.status. */
18565 if test x"$ac_file" = x-; then
18566 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000018567 else
Martin v. Löwis11437992002-04-12 09:54:03 +000018568 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000018569 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018570 cat $tmp/in >>$tmp/config.h
18571 rm -f $tmp/in
18572 if test x"$ac_file" != x-; then
18573 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
18574 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
18575echo "$as_me: $ac_file is unchanged" >&6;}
18576 else
18577 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18578$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18579 X"$ac_file" : 'X\(//\)[^/]' \| \
18580 X"$ac_file" : 'X\(//\)$' \| \
18581 X"$ac_file" : 'X\(/\)' \| \
18582 . : '\(.\)' 2>/dev/null ||
18583echo X"$ac_file" |
18584 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18585 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18586 /^X\(\/\/\)$/{ s//\1/; q; }
18587 /^X\(\/\).*/{ s//\1/; q; }
18588 s/.*/./; q'`
Barry Warsawfe33b792003-01-07 22:42:49 +000018589 { case "$ac_dir" in
18590 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18591 *) as_incr_dir=.;;
18592esac
18593as_dummy="$ac_dir"
18594for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18595 case $as_mkdir_dir in
18596 # Skip DOS drivespec
18597 ?:) as_incr_dir=$as_mkdir_dir ;;
18598 *)
18599 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18600 test -d "$as_incr_dir" ||
18601 mkdir "$as_incr_dir" ||
18602 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18603echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18604 { (exit 1); exit 1; }; }
18605 ;;
18606 esac
18607done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018608
Martin v. Löwis11437992002-04-12 09:54:03 +000018609 rm -f $ac_file
18610 mv $tmp/config.h $ac_file
18611 fi
18612 else
18613 cat $tmp/config.h
18614 rm -f $tmp/config.h
18615 fi
18616done
18617_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000018618
Martin v. Löwis11437992002-04-12 09:54:03 +000018619cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018620
Martin v. Löwis11437992002-04-12 09:54:03 +000018621{ (exit 0); exit 0; }
18622_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018623chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018624ac_clean_files=$ac_clean_files_save
18625
18626
18627# configure is writing to config.log, and then calls config.status.
18628# config.status does its own redirection, appending to config.log.
18629# Unfortunately, on DOS this fails, as config.log is still kept open
18630# by configure, so config.status won't be able to write to it; its
18631# output is simply discarded. So we exec the FD to /dev/null,
18632# effectively closing config.log, so it can be properly (re)opened and
18633# appended to by config.status. When coming back to configure, we
18634# need to make the FD available again.
18635if test "$no_create" != yes; then
18636 ac_cs_success=:
18637 exec 5>/dev/null
18638 $SHELL $CONFIG_STATUS || ac_cs_success=false
18639 exec 5>>config.log
18640 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18641 # would make configure fail if this is the last instruction.
18642 $ac_cs_success || { (exit 1); exit 1; }
18643fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018644
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018645
18646echo "creating Setup"
18647if test ! -f Modules/Setup
18648then
18649 cp $srcdir/Modules/Setup.dist Modules/Setup
18650fi
18651
18652echo "creating Setup.local"
18653if test ! -f Modules/Setup.local
18654then
18655 echo "# Edit this file for local setup changes" >Modules/Setup.local
18656fi
18657
18658echo "creating Makefile"
18659$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
18660 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000018661 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018662mv config.c Modules