blob: 1c253bc14aa4b89cd3eda8a99cd52986f2b9921d [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Neal Norwitzb44f1652003-05-26 14:11:55 +00002# From configure.in Revision: 1.412 .
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 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00003651 OSF*)
3652 BASECFLAGS="$BASECFLAGS -ieee -std"
3653 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003654 SCO_SV*)
3655 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3656 ;;
3657 esac
3658 ;;
3659esac
3660
Fred Drakee1ceaa02001-12-04 20:55:47 +00003661if test "$Py_DEBUG" = 'true'; then
3662 :
3663else
3664 OPT="-DNDEBUG $OPT"
3665fi
3666
Guido van Rossum563e7081996-09-10 18:20:48 +00003667if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003668then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003669 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003670fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003671
Martin v. Löwis11437992002-04-12 09:54:03 +00003672echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3673echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3674if test "${ac_cv_opt_olimit_ok+set}" = set; then
3675 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003676else
3677 ac_save_cc="$CC"
3678CC="$CC -OPT:Olimit=0"
3679if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003680 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003681else
Martin v. Löwis11437992002-04-12 09:54:03 +00003682 cat >conftest.$ac_ext <<_ACEOF
3683#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003684#include "confdefs.h"
3685int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003686_ACEOF
3687rm -f conftest$ac_exeext
3688if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3689 (eval $ac_link) 2>&5
3690 ac_status=$?
3691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3692 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3694 (eval $ac_try) 2>&5
3695 ac_status=$?
3696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3697 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003698 ac_cv_opt_olimit_ok=yes
3699else
Martin v. Löwis11437992002-04-12 09:54:03 +00003700 echo "$as_me: program exited with status $ac_status" >&5
3701echo "$as_me: failed program was:" >&5
3702cat conftest.$ac_ext >&5
3703( exit $ac_status )
3704ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003705fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003706rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003707fi
Guido van Rossum91922671997-10-09 20:24:13 +00003708CC="$ac_save_cc"
3709fi
3710
Martin v. Löwis11437992002-04-12 09:54:03 +00003711echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3712echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003713if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003714 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003715 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3716 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3717 # environment?
3718 Darwin*)
3719 ;;
3720 *)
3721 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3722 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003723 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003724else
Martin v. Löwis11437992002-04-12 09:54:03 +00003725 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3726echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3727 if test "${ac_cv_olimit_ok+set}" = set; then
3728 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003729else
3730 ac_save_cc="$CC"
3731 CC="$CC -Olimit 1500"
3732 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003733 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003734else
Martin v. Löwis11437992002-04-12 09:54:03 +00003735 cat >conftest.$ac_ext <<_ACEOF
3736#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003737#include "confdefs.h"
3738int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003739_ACEOF
3740rm -f conftest$ac_exeext
3741if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3742 (eval $ac_link) 2>&5
3743 ac_status=$?
3744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3745 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3746 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3747 (eval $ac_try) 2>&5
3748 ac_status=$?
3749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3750 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003751 ac_cv_olimit_ok=yes
3752else
Martin v. Löwis11437992002-04-12 09:54:03 +00003753 echo "$as_me: program exited with status $ac_status" >&5
3754echo "$as_me: failed program was:" >&5
3755cat conftest.$ac_ext >&5
3756( exit $ac_status )
3757ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003758fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003759rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003760fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003761 CC="$ac_save_cc"
3762fi
3763
Martin v. Löwis11437992002-04-12 09:54:03 +00003764 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3765echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003766 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003767 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003768 fi
3769fi
3770
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003771# On some compilers, pthreads are available without further options
3772# (e.g. MacOS X). On some of these systems, the compiler will not
3773# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3774# So we have to see first whether pthreads are available without
3775# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003776echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3777echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3778if test "${ac_cv_pthread_is_default+set}" = set; then
3779 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003780else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003781 if test "$cross_compiling" = yes; then
3782 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003783else
Martin v. Löwis11437992002-04-12 09:54:03 +00003784 cat >conftest.$ac_ext <<_ACEOF
3785#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003786#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003787
Martin v. Löwis130fb172001-07-19 11:00:41 +00003788#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003789
3790void* routine(void* p){return NULL;}
3791
3792int main(){
3793 pthread_t p;
3794 if(pthread_create(&p,NULL,routine,NULL)!=0)
3795 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003796 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003797 return 0;
3798}
3799
Martin v. Löwis11437992002-04-12 09:54:03 +00003800_ACEOF
3801rm -f conftest$ac_exeext
3802if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3803 (eval $ac_link) 2>&5
3804 ac_status=$?
3805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3806 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3807 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3808 (eval $ac_try) 2>&5
3809 ac_status=$?
3810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3811 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003812 ac_cv_pthread_is_default=yes
3813else
Martin v. Löwis11437992002-04-12 09:54:03 +00003814 echo "$as_me: program exited with status $ac_status" >&5
3815echo "$as_me: failed program was:" >&5
3816cat conftest.$ac_ext >&5
3817( exit $ac_status )
3818ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003819fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003820rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003821fi
3822
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003823fi
3824
Martin v. Löwis11437992002-04-12 09:54:03 +00003825echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3826echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003827
Michael W. Hudson54241132001-12-07 15:38:26 +00003828
Martin v. Löwis11437992002-04-12 09:54:03 +00003829if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003830then
3831 ac_cv_kpthread=no
3832else
3833# -Kpthread, if available, provides the right #defines
3834# and linker options to make pthread_create available
3835# Some compilers won't report that they do not support -Kpthread,
3836# so we need to run a program to see whether it really made the
3837# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003838echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3839echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3840if test "${ac_cv_kpthread+set}" = set; then
3841 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003842else
3843 ac_save_cc="$CC"
3844CC="$CC -Kpthread"
3845if test "$cross_compiling" = yes; then
3846 ac_cv_kpthread=no
3847else
Martin v. Löwis11437992002-04-12 09:54:03 +00003848 cat >conftest.$ac_ext <<_ACEOF
3849#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003850#include "confdefs.h"
3851
3852#include <pthread.h>
3853
3854void* routine(void* p){return NULL;}
3855
3856int main(){
3857 pthread_t p;
3858 if(pthread_create(&p,NULL,routine,NULL)!=0)
3859 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003860 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003861 return 0;
3862}
3863
Martin v. Löwis11437992002-04-12 09:54:03 +00003864_ACEOF
3865rm -f conftest$ac_exeext
3866if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3867 (eval $ac_link) 2>&5
3868 ac_status=$?
3869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3870 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3872 (eval $ac_try) 2>&5
3873 ac_status=$?
3874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3875 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003876 ac_cv_kpthread=yes
3877else
Martin v. Löwis11437992002-04-12 09:54:03 +00003878 echo "$as_me: program exited with status $ac_status" >&5
3879echo "$as_me: failed program was:" >&5
3880cat conftest.$ac_ext >&5
3881( exit $ac_status )
3882ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003883fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003884rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003885fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003886CC="$ac_save_cc"
3887fi
3888
Martin v. Löwis11437992002-04-12 09:54:03 +00003889echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3890echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003891fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003892
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003893if test $ac_cv_kpthread = no
3894then
3895# -Kthread, if available, provides the right #defines
3896# and linker options to make pthread_create available
3897# Some compilers won't report that they do not support -Kthread,
3898# so we need to run a program to see whether it really made the
3899# function available.
3900echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
3901echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
3902if test "${ac_cv_kthread+set}" = set; then
3903 echo $ECHO_N "(cached) $ECHO_C" >&6
3904else
3905 ac_save_cc="$CC"
3906CC="$CC -Kthread"
3907if test "$cross_compiling" = yes; then
3908 ac_cv_kthread=no
3909else
3910 cat >conftest.$ac_ext <<_ACEOF
3911#line $LINENO "configure"
3912#include "confdefs.h"
3913
3914#include <pthread.h>
3915
3916void* routine(void* p){return NULL;}
3917
3918int main(){
3919 pthread_t p;
3920 if(pthread_create(&p,NULL,routine,NULL)!=0)
3921 return 1;
3922 (void)pthread_detach(p);
3923 return 0;
3924}
3925
3926_ACEOF
3927rm -f conftest$ac_exeext
3928if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3929 (eval $ac_link) 2>&5
3930 ac_status=$?
3931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3932 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3934 (eval $ac_try) 2>&5
3935 ac_status=$?
3936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3937 (exit $ac_status); }; }; then
3938 ac_cv_kthread=yes
3939else
3940 echo "$as_me: program exited with status $ac_status" >&5
3941echo "$as_me: failed program was:" >&5
3942cat conftest.$ac_ext >&5
3943( exit $ac_status )
3944ac_cv_kthread=no
3945fi
3946rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3947fi
3948CC="$ac_save_cc"
3949fi
3950
3951echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
3952echo "${ECHO_T}$ac_cv_kthread" >&6
3953fi
3954
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00003955if test $ac_cv_kthread = no
3956then
3957# -pthread, if available, provides the right #defines
3958# and linker options to make pthread_create available
3959# Some compilers won't report that they do not support -pthread,
3960# so we need to run a program to see whether it really made the
3961# function available.
3962echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
3963echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
3964if test "${ac_cv_thread+set}" = set; then
3965 echo $ECHO_N "(cached) $ECHO_C" >&6
3966else
3967 ac_save_cc="$CC"
3968CC="$CC -pthread"
3969if test "$cross_compiling" = yes; then
3970 ac_cv_pthread=no
3971else
3972 cat >conftest.$ac_ext <<_ACEOF
3973#line $LINENO "configure"
3974#include "confdefs.h"
3975
3976#include <pthread.h>
3977
3978void* routine(void* p){return NULL;}
3979
3980int main(){
3981 pthread_t p;
3982 if(pthread_create(&p,NULL,routine,NULL)!=0)
3983 return 1;
3984 (void)pthread_detach(p);
3985 return 0;
3986}
3987
3988_ACEOF
3989rm -f conftest$ac_exeext
3990if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3991 (eval $ac_link) 2>&5
3992 ac_status=$?
3993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3994 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3996 (eval $ac_try) 2>&5
3997 ac_status=$?
3998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3999 (exit $ac_status); }; }; then
4000 ac_cv_pthread=yes
4001else
4002 echo "$as_me: program exited with status $ac_status" >&5
4003echo "$as_me: failed program was:" >&5
4004cat conftest.$ac_ext >&5
4005( exit $ac_status )
4006ac_cv_pthread=no
4007fi
4008rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4009fi
4010CC="$ac_save_cc"
4011fi
4012
4013echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4014echo "${ECHO_T}$ac_cv_pthread" >&6
4015fi
4016
Michael W. Hudson54241132001-12-07 15:38:26 +00004017
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004018# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00004019echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4020echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4021if test "${ac_cv_header_stdc+set}" = set; then
4022 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004023else
Martin v. Löwis11437992002-04-12 09:54:03 +00004024 cat >conftest.$ac_ext <<_ACEOF
4025#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004026#include "confdefs.h"
4027#include <stdlib.h>
4028#include <stdarg.h>
4029#include <string.h>
4030#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004031
4032_ACEOF
4033if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4034 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4035 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004036 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004037 rm -f conftest.er1
4038 cat conftest.err >&5
4039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4040 (exit $ac_status); } >/dev/null; then
4041 if test -s conftest.err; then
4042 ac_cpp_err=$ac_c_preproc_warn_flag
4043 else
4044 ac_cpp_err=
4045 fi
4046else
4047 ac_cpp_err=yes
4048fi
4049if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004050 ac_cv_header_stdc=yes
4051else
Martin v. Löwis11437992002-04-12 09:54:03 +00004052 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00004053 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004054 ac_cv_header_stdc=no
4055fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004056rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004057
4058if test $ac_cv_header_stdc = yes; then
4059 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004060 cat >conftest.$ac_ext <<_ACEOF
4061#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004062#include "confdefs.h"
4063#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004064
4065_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004066if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00004067 egrep "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004068 :
4069else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004070 ac_cv_header_stdc=no
4071fi
4072rm -f conftest*
4073
4074fi
4075
4076if test $ac_cv_header_stdc = yes; then
4077 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004078 cat >conftest.$ac_ext <<_ACEOF
4079#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004080#include "confdefs.h"
4081#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004082
4083_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004084if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00004085 egrep "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004086 :
4087else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004088 ac_cv_header_stdc=no
4089fi
4090rm -f conftest*
4091
4092fi
4093
4094if test $ac_cv_header_stdc = yes; then
4095 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004096 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004097 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004098else
Martin v. Löwis11437992002-04-12 09:54:03 +00004099 cat >conftest.$ac_ext <<_ACEOF
4100#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004101#include "confdefs.h"
4102#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004103#if ((' ' & 0x0FF) == 0x020)
4104# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4105# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4106#else
4107# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4108 || ('j' <= (c) && (c) <= 'r') \
4109 || ('s' <= (c) && (c) <= 'z'))
4110# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4111#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004112
Martin v. Löwis11437992002-04-12 09:54:03 +00004113#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4114int
4115main ()
4116{
4117 int i;
4118 for (i = 0; i < 256; i++)
4119 if (XOR (islower (i), ISLOWER (i))
4120 || toupper (i) != TOUPPER (i))
4121 exit(2);
4122 exit (0);
4123}
4124_ACEOF
4125rm -f conftest$ac_exeext
4126if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4127 (eval $ac_link) 2>&5
4128 ac_status=$?
4129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4130 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4132 (eval $ac_try) 2>&5
4133 ac_status=$?
4134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4135 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004136 :
4137else
Martin v. Löwis11437992002-04-12 09:54:03 +00004138 echo "$as_me: program exited with status $ac_status" >&5
4139echo "$as_me: failed program was:" >&5
4140cat conftest.$ac_ext >&5
4141( exit $ac_status )
4142ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004143fi
Barry Warsawfe33b792003-01-07 22:42:49 +00004144rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004145fi
4146fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004147fi
4148echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4149echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004150if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004151
4152cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004153#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004154_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004155
4156fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004157
Martin v. Löwis11437992002-04-12 09:54:03 +00004158
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
4192
4193
4194
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004195
Barry Warsawfe33b792003-01-07 22:42:49 +00004196
Neal Norwitz82251032003-05-23 14:35:24 +00004197
Martin v. Löwis11437992002-04-12 09:54:03 +00004198for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004199libintl.h locale.h ncurses.h poll.h pthread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004200signal.h stdarg.h stddef.h stdlib.h stropts.h termios.h thread.h \
4201unistd.h utime.h \
Neal Norwitz82251032003-05-23 14:35:24 +00004202sys/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 +00004203sys/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 +00004204sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Barry Warsawfe33b792003-01-07 22:42:49 +00004205sys/resource.h netpacket/packet.h sysexits.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004206do
Martin v. Löwis11437992002-04-12 09:54:03 +00004207as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4208if eval "test \"\${$as_ac_Header+set}\" = set"; then
4209 echo "$as_me:$LINENO: checking for $ac_header" >&5
4210echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4211if eval "test \"\${$as_ac_Header+set}\" = set"; then
4212 echo $ECHO_N "(cached) $ECHO_C" >&6
4213fi
4214echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4215echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004216else
Martin v. Löwis11437992002-04-12 09:54:03 +00004217 # Is the header compilable?
4218echo "$as_me:$LINENO: checking $ac_header usability" >&5
4219echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4220cat >conftest.$ac_ext <<_ACEOF
4221#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004222#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004223$ac_includes_default
4224#include <$ac_header>
4225_ACEOF
4226rm -f conftest.$ac_objext
4227if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4228 (eval $ac_compile) 2>&5
4229 ac_status=$?
4230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4231 (exit $ac_status); } &&
4232 { ac_try='test -s conftest.$ac_objext'
4233 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4234 (eval $ac_try) 2>&5
4235 ac_status=$?
4236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4237 (exit $ac_status); }; }; then
4238 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004239else
Martin v. Löwis11437992002-04-12 09:54:03 +00004240 echo "$as_me: failed program was:" >&5
4241cat conftest.$ac_ext >&5
4242ac_header_compiler=no
4243fi
4244rm -f conftest.$ac_objext conftest.$ac_ext
4245echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4246echo "${ECHO_T}$ac_header_compiler" >&6
4247
4248# Is the header present?
4249echo "$as_me:$LINENO: checking $ac_header presence" >&5
4250echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4251cat >conftest.$ac_ext <<_ACEOF
4252#line $LINENO "configure"
4253#include "confdefs.h"
4254#include <$ac_header>
4255_ACEOF
4256if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4257 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4258 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004259 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004260 rm -f conftest.er1
4261 cat conftest.err >&5
4262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4263 (exit $ac_status); } >/dev/null; then
4264 if test -s conftest.err; then
4265 ac_cpp_err=$ac_c_preproc_warn_flag
4266 else
4267 ac_cpp_err=
4268 fi
4269else
4270 ac_cpp_err=yes
4271fi
4272if test -z "$ac_cpp_err"; then
4273 ac_header_preproc=yes
4274else
4275 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004276 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004277 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004278fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004279rm -f conftest.err conftest.$ac_ext
4280echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4281echo "${ECHO_T}$ac_header_preproc" >&6
4282
4283# So? What about this header?
4284case $ac_header_compiler:$ac_header_preproc in
4285 yes:no )
4286 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4287echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4288 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4289echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4290 no:yes )
4291 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4292echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4293 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4294echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4295 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4296echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4297esac
4298echo "$as_me:$LINENO: checking for $ac_header" >&5
4299echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4300if eval "test \"\${$as_ac_Header+set}\" = set"; then
4301 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004302else
Martin v. Löwis11437992002-04-12 09:54:03 +00004303 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004304fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004305echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4306echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4307
4308fi
4309if test `eval echo '${'$as_ac_Header'}'` = yes; then
4310 cat >>confdefs.h <<_ACEOF
4311#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4312_ACEOF
4313
4314fi
4315
Guido van Rossum627b2d71993-12-24 10:39:16 +00004316done
4317
Martin v. Löwis11437992002-04-12 09:54:03 +00004318
4319
4320
4321
4322
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004323ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004324for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4325 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4326echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4327echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4328if eval "test \"\${$as_ac_Header+set}\" = set"; then
4329 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004330else
Martin v. Löwis11437992002-04-12 09:54:03 +00004331 cat >conftest.$ac_ext <<_ACEOF
4332#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004333#include "confdefs.h"
4334#include <sys/types.h>
4335#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004336
Barry Warsawfe33b792003-01-07 22:42:49 +00004337#ifdef F77_DUMMY_MAIN
4338# ifdef __cplusplus
4339 extern "C"
4340# endif
4341 int F77_DUMMY_MAIN() { return 1; }
4342#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004343int
4344main ()
4345{
4346if ((DIR *) 0)
4347return 0;
4348 ;
4349 return 0;
4350}
4351_ACEOF
4352rm -f conftest.$ac_objext
4353if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4354 (eval $ac_compile) 2>&5
4355 ac_status=$?
4356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4357 (exit $ac_status); } &&
4358 { ac_try='test -s conftest.$ac_objext'
4359 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4360 (eval $ac_try) 2>&5
4361 ac_status=$?
4362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4363 (exit $ac_status); }; }; then
4364 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004365else
Martin v. Löwis11437992002-04-12 09:54:03 +00004366 echo "$as_me: failed program was:" >&5
4367cat conftest.$ac_ext >&5
4368eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004369fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004370rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004371fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004372echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4373echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4374if test `eval echo '${'$as_ac_Header'}'` = yes; then
4375 cat >>confdefs.h <<_ACEOF
4376#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4377_ACEOF
4378
4379ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004380fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004381
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004382done
4383# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4384if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004385 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4386echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4387if test "${ac_cv_search_opendir+set}" = set; then
4388 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004389else
Martin v. Löwis11437992002-04-12 09:54:03 +00004390 ac_func_search_save_LIBS=$LIBS
4391ac_cv_search_opendir=no
4392cat >conftest.$ac_ext <<_ACEOF
4393#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004394#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004395
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004396/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004397#ifdef __cplusplus
4398extern "C"
4399#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004400/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004401 builtin and then its argument prototype would still apply. */
4402char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004403#ifdef F77_DUMMY_MAIN
4404# ifdef __cplusplus
4405 extern "C"
4406# endif
4407 int F77_DUMMY_MAIN() { return 1; }
4408#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004409int
4410main ()
4411{
4412opendir ();
4413 ;
4414 return 0;
4415}
4416_ACEOF
4417rm -f conftest.$ac_objext conftest$ac_exeext
4418if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4419 (eval $ac_link) 2>&5
4420 ac_status=$?
4421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4422 (exit $ac_status); } &&
4423 { ac_try='test -s conftest$ac_exeext'
4424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4425 (eval $ac_try) 2>&5
4426 ac_status=$?
4427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4428 (exit $ac_status); }; }; then
4429 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004430else
Martin v. Löwis11437992002-04-12 09:54:03 +00004431 echo "$as_me: failed program was:" >&5
4432cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004433fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004434rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4435if test "$ac_cv_search_opendir" = no; then
4436 for ac_lib in dir; do
4437 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4438 cat >conftest.$ac_ext <<_ACEOF
4439#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004440#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004441
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004442/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004443#ifdef __cplusplus
4444extern "C"
4445#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004446/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004447 builtin and then its argument prototype would still apply. */
4448char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004449#ifdef F77_DUMMY_MAIN
4450# ifdef __cplusplus
4451 extern "C"
4452# endif
4453 int F77_DUMMY_MAIN() { return 1; }
4454#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004455int
4456main ()
4457{
4458opendir ();
4459 ;
4460 return 0;
4461}
4462_ACEOF
4463rm -f conftest.$ac_objext conftest$ac_exeext
4464if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4465 (eval $ac_link) 2>&5
4466 ac_status=$?
4467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4468 (exit $ac_status); } &&
4469 { ac_try='test -s conftest$ac_exeext'
4470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4471 (eval $ac_try) 2>&5
4472 ac_status=$?
4473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4474 (exit $ac_status); }; }; then
4475 ac_cv_search_opendir="-l$ac_lib"
4476break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004477else
Martin v. Löwis11437992002-04-12 09:54:03 +00004478 echo "$as_me: failed program was:" >&5
4479cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004480fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004481rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4482 done
4483fi
4484LIBS=$ac_func_search_save_LIBS
4485fi
4486echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4487echo "${ECHO_T}$ac_cv_search_opendir" >&6
4488if test "$ac_cv_search_opendir" != no; then
4489 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004490
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004491fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004492
Michael W. Hudson54241132001-12-07 15:38:26 +00004493else
Martin v. Löwis11437992002-04-12 09:54:03 +00004494 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4495echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4496if test "${ac_cv_search_opendir+set}" = set; then
4497 echo $ECHO_N "(cached) $ECHO_C" >&6
4498else
4499 ac_func_search_save_LIBS=$LIBS
4500ac_cv_search_opendir=no
4501cat >conftest.$ac_ext <<_ACEOF
4502#line $LINENO "configure"
4503#include "confdefs.h"
4504
4505/* Override any gcc2 internal prototype to avoid an error. */
4506#ifdef __cplusplus
4507extern "C"
4508#endif
4509/* We use char because int might match the return type of a gcc2
4510 builtin and then its argument prototype would still apply. */
4511char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004512#ifdef F77_DUMMY_MAIN
4513# ifdef __cplusplus
4514 extern "C"
4515# endif
4516 int F77_DUMMY_MAIN() { return 1; }
4517#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004518int
4519main ()
4520{
4521opendir ();
4522 ;
4523 return 0;
4524}
4525_ACEOF
4526rm -f conftest.$ac_objext conftest$ac_exeext
4527if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4528 (eval $ac_link) 2>&5
4529 ac_status=$?
4530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4531 (exit $ac_status); } &&
4532 { ac_try='test -s conftest$ac_exeext'
4533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4534 (eval $ac_try) 2>&5
4535 ac_status=$?
4536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4537 (exit $ac_status); }; }; then
4538 ac_cv_search_opendir="none required"
4539else
4540 echo "$as_me: failed program was:" >&5
4541cat conftest.$ac_ext >&5
4542fi
4543rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4544if test "$ac_cv_search_opendir" = no; then
4545 for ac_lib in x; do
4546 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4547 cat >conftest.$ac_ext <<_ACEOF
4548#line $LINENO "configure"
4549#include "confdefs.h"
4550
4551/* Override any gcc2 internal prototype to avoid an error. */
4552#ifdef __cplusplus
4553extern "C"
4554#endif
4555/* We use char because int might match the return type of a gcc2
4556 builtin and then its argument prototype would still apply. */
4557char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004558#ifdef F77_DUMMY_MAIN
4559# ifdef __cplusplus
4560 extern "C"
4561# endif
4562 int F77_DUMMY_MAIN() { return 1; }
4563#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004564int
4565main ()
4566{
4567opendir ();
4568 ;
4569 return 0;
4570}
4571_ACEOF
4572rm -f conftest.$ac_objext conftest$ac_exeext
4573if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4574 (eval $ac_link) 2>&5
4575 ac_status=$?
4576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4577 (exit $ac_status); } &&
4578 { ac_try='test -s conftest$ac_exeext'
4579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4580 (eval $ac_try) 2>&5
4581 ac_status=$?
4582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4583 (exit $ac_status); }; }; then
4584 ac_cv_search_opendir="-l$ac_lib"
4585break
4586else
4587 echo "$as_me: failed program was:" >&5
4588cat conftest.$ac_ext >&5
4589fi
4590rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4591 done
4592fi
4593LIBS=$ac_func_search_save_LIBS
4594fi
4595echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4596echo "${ECHO_T}$ac_cv_search_opendir" >&6
4597if test "$ac_cv_search_opendir" != no; then
4598 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4599
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004600fi
4601
4602fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004603
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004604echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4605echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4606if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4607 echo $ECHO_N "(cached) $ECHO_C" >&6
4608else
4609 cat >conftest.$ac_ext <<_ACEOF
4610#line $LINENO "configure"
4611#include "confdefs.h"
4612#include <sys/types.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00004613#ifdef F77_DUMMY_MAIN
4614# ifdef __cplusplus
4615 extern "C"
4616# endif
4617 int F77_DUMMY_MAIN() { return 1; }
4618#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004619int
4620main ()
4621{
4622return makedev(0, 0);
4623 ;
4624 return 0;
4625}
4626_ACEOF
4627rm -f conftest.$ac_objext conftest$ac_exeext
4628if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4629 (eval $ac_link) 2>&5
4630 ac_status=$?
4631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4632 (exit $ac_status); } &&
4633 { ac_try='test -s conftest$ac_exeext'
4634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4635 (eval $ac_try) 2>&5
4636 ac_status=$?
4637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4638 (exit $ac_status); }; }; then
4639 ac_cv_header_sys_types_h_makedev=yes
4640else
4641 echo "$as_me: failed program was:" >&5
4642cat conftest.$ac_ext >&5
4643ac_cv_header_sys_types_h_makedev=no
4644fi
4645rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4646
4647fi
4648echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4649echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4650
4651if test $ac_cv_header_sys_types_h_makedev = no; then
4652if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4653 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4654echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4655if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4656 echo $ECHO_N "(cached) $ECHO_C" >&6
4657fi
4658echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4659echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4660else
4661 # Is the header compilable?
4662echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4663echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4664cat >conftest.$ac_ext <<_ACEOF
4665#line $LINENO "configure"
4666#include "confdefs.h"
4667$ac_includes_default
4668#include <sys/mkdev.h>
4669_ACEOF
4670rm -f conftest.$ac_objext
4671if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4672 (eval $ac_compile) 2>&5
4673 ac_status=$?
4674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4675 (exit $ac_status); } &&
4676 { ac_try='test -s conftest.$ac_objext'
4677 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4678 (eval $ac_try) 2>&5
4679 ac_status=$?
4680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4681 (exit $ac_status); }; }; then
4682 ac_header_compiler=yes
4683else
4684 echo "$as_me: failed program was:" >&5
4685cat conftest.$ac_ext >&5
4686ac_header_compiler=no
4687fi
4688rm -f conftest.$ac_objext conftest.$ac_ext
4689echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4690echo "${ECHO_T}$ac_header_compiler" >&6
4691
4692# Is the header present?
4693echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4694echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4695cat >conftest.$ac_ext <<_ACEOF
4696#line $LINENO "configure"
4697#include "confdefs.h"
4698#include <sys/mkdev.h>
4699_ACEOF
4700if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4701 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4702 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004703 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004704 rm -f conftest.er1
4705 cat conftest.err >&5
4706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4707 (exit $ac_status); } >/dev/null; then
4708 if test -s conftest.err; then
4709 ac_cpp_err=$ac_c_preproc_warn_flag
4710 else
4711 ac_cpp_err=
4712 fi
4713else
4714 ac_cpp_err=yes
4715fi
4716if test -z "$ac_cpp_err"; then
4717 ac_header_preproc=yes
4718else
4719 echo "$as_me: failed program was:" >&5
4720 cat conftest.$ac_ext >&5
4721 ac_header_preproc=no
4722fi
4723rm -f conftest.err conftest.$ac_ext
4724echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4725echo "${ECHO_T}$ac_header_preproc" >&6
4726
4727# So? What about this header?
4728case $ac_header_compiler:$ac_header_preproc in
4729 yes:no )
4730 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4731echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4732 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4733echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4734 no:yes )
4735 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4736echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4737 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4738echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4739 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4740echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4741esac
4742echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4743echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4744if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4745 echo $ECHO_N "(cached) $ECHO_C" >&6
4746else
4747 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4748fi
4749echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4750echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4751
4752fi
4753if test $ac_cv_header_sys_mkdev_h = yes; then
4754
4755cat >>confdefs.h <<\_ACEOF
4756#define MAJOR_IN_MKDEV 1
4757_ACEOF
4758
4759fi
4760
4761
4762
4763 if test $ac_cv_header_sys_mkdev_h = no; then
4764 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4765 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4766echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4767if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4768 echo $ECHO_N "(cached) $ECHO_C" >&6
4769fi
4770echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4771echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4772else
4773 # Is the header compilable?
4774echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4775echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4776cat >conftest.$ac_ext <<_ACEOF
4777#line $LINENO "configure"
4778#include "confdefs.h"
4779$ac_includes_default
4780#include <sys/sysmacros.h>
4781_ACEOF
4782rm -f conftest.$ac_objext
4783if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4784 (eval $ac_compile) 2>&5
4785 ac_status=$?
4786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4787 (exit $ac_status); } &&
4788 { ac_try='test -s conftest.$ac_objext'
4789 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4790 (eval $ac_try) 2>&5
4791 ac_status=$?
4792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4793 (exit $ac_status); }; }; then
4794 ac_header_compiler=yes
4795else
4796 echo "$as_me: failed program was:" >&5
4797cat conftest.$ac_ext >&5
4798ac_header_compiler=no
4799fi
4800rm -f conftest.$ac_objext conftest.$ac_ext
4801echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4802echo "${ECHO_T}$ac_header_compiler" >&6
4803
4804# Is the header present?
4805echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
4806echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
4807cat >conftest.$ac_ext <<_ACEOF
4808#line $LINENO "configure"
4809#include "confdefs.h"
4810#include <sys/sysmacros.h>
4811_ACEOF
4812if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4813 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4814 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004815 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004816 rm -f conftest.er1
4817 cat conftest.err >&5
4818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4819 (exit $ac_status); } >/dev/null; then
4820 if test -s conftest.err; then
4821 ac_cpp_err=$ac_c_preproc_warn_flag
4822 else
4823 ac_cpp_err=
4824 fi
4825else
4826 ac_cpp_err=yes
4827fi
4828if test -z "$ac_cpp_err"; then
4829 ac_header_preproc=yes
4830else
4831 echo "$as_me: failed program was:" >&5
4832 cat conftest.$ac_ext >&5
4833 ac_header_preproc=no
4834fi
4835rm -f conftest.err conftest.$ac_ext
4836echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4837echo "${ECHO_T}$ac_header_preproc" >&6
4838
4839# So? What about this header?
4840case $ac_header_compiler:$ac_header_preproc in
4841 yes:no )
4842 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
4843echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4844 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4845echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4846 no:yes )
4847 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
4848echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
4849 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
4850echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
4851 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4852echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4853esac
4854echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4855echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4856if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4857 echo $ECHO_N "(cached) $ECHO_C" >&6
4858else
4859 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
4860fi
4861echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4862echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4863
4864fi
4865if test $ac_cv_header_sys_sysmacros_h = yes; then
4866
4867cat >>confdefs.h <<\_ACEOF
4868#define MAJOR_IN_SYSMACROS 1
4869_ACEOF
4870
4871fi
4872
4873
4874 fi
4875fi
4876
Michael W. Hudson54241132001-12-07 15:38:26 +00004877
Guido van Rossum627b2d71993-12-24 10:39:16 +00004878# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004879was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004880echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4881echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4882cat >conftest.$ac_ext <<_ACEOF
4883#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004884#include "confdefs.h"
4885#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004886
4887_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004888if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00004889 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004890 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004891else
Martin v. Löwis11437992002-04-12 09:54:03 +00004892
4893
4894cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004895#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004896_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004897
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004898
Guido van Rossum627b2d71993-12-24 10:39:16 +00004899fi
4900rm -f conftest*
4901
Martin v. Löwis11437992002-04-12 09:54:03 +00004902echo "$as_me:$LINENO: result: $was_it_defined" >&5
4903echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004904
Neal Norwitz11690112002-07-30 01:08:28 +00004905# Check whether using makedev requires defining _OSF_SOURCE
4906echo "$as_me:$LINENO: checking for makedev" >&5
4907echo $ECHO_N "checking for makedev... $ECHO_C" >&6
4908cat >conftest.$ac_ext <<_ACEOF
4909#line $LINENO "configure"
4910#include "confdefs.h"
Neal Norwitz6eb37f02003-02-23 23:28:15 +00004911#include <sys/types.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00004912#ifdef F77_DUMMY_MAIN
4913# ifdef __cplusplus
4914 extern "C"
4915# endif
4916 int F77_DUMMY_MAIN() { return 1; }
4917#endif
Neal Norwitz11690112002-07-30 01:08:28 +00004918int
4919main ()
4920{
4921 makedev(0, 0)
4922 ;
4923 return 0;
4924}
4925_ACEOF
4926rm -f conftest.$ac_objext conftest$ac_exeext
4927if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4928 (eval $ac_link) 2>&5
4929 ac_status=$?
4930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4931 (exit $ac_status); } &&
4932 { ac_try='test -s conftest$ac_exeext'
4933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4934 (eval $ac_try) 2>&5
4935 ac_status=$?
4936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4937 (exit $ac_status); }; }; then
4938 ac_cv_has_makedev=yes
4939else
4940 echo "$as_me: failed program was:" >&5
4941cat conftest.$ac_ext >&5
4942ac_cv_has_makedev=no
4943fi
4944rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4945if test "$ac_cv_has_makedev" = "no"; then
4946 # we didn't link, try if _OSF_SOURCE will allow us to link
4947 cat >conftest.$ac_ext <<_ACEOF
4948#line $LINENO "configure"
4949#include "confdefs.h"
4950
Neal Norwitz6eb37f02003-02-23 23:28:15 +00004951#define _OSF_SOURCE 1
4952#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00004953
Barry Warsawfe33b792003-01-07 22:42:49 +00004954#ifdef F77_DUMMY_MAIN
4955# ifdef __cplusplus
4956 extern "C"
4957# endif
4958 int F77_DUMMY_MAIN() { return 1; }
4959#endif
Neal Norwitz11690112002-07-30 01:08:28 +00004960int
4961main ()
4962{
4963 makedev(0, 0)
4964 ;
4965 return 0;
4966}
4967_ACEOF
4968rm -f conftest.$ac_objext conftest$ac_exeext
4969if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4970 (eval $ac_link) 2>&5
4971 ac_status=$?
4972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4973 (exit $ac_status); } &&
4974 { ac_try='test -s conftest$ac_exeext'
4975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4976 (eval $ac_try) 2>&5
4977 ac_status=$?
4978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4979 (exit $ac_status); }; }; then
4980 ac_cv_has_makedev=yes
4981else
4982 echo "$as_me: failed program was:" >&5
4983cat conftest.$ac_ext >&5
4984ac_cv_has_makedev=no
4985fi
4986rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4987 if test "$ac_cv_has_makedev" = "yes"; then
4988
4989cat >>confdefs.h <<\_ACEOF
4990#define _OSF_SOURCE 1
4991_ACEOF
4992
4993 fi
4994fi
4995echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
4996echo "${ECHO_T}$ac_cv_has_makedev" >&6
4997if test "$ac_cv_has_makedev" = "yes"; then
4998
4999cat >>confdefs.h <<\_ACEOF
5000#define HAVE_MAKEDEV 1
5001_ACEOF
5002
5003fi
5004
Martin v. Löwis399a6892002-10-04 10:22:02 +00005005# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5006# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5007# defined, but the compiler does not support pragma redefine_extname,
5008# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5009# structures (such as rlimit64) without declaring them. As a
5010# work-around, disable LFS on such configurations
5011
5012use_lfs=yes
5013echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5014echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
5015cat >conftest.$ac_ext <<_ACEOF
5016#line $LINENO "configure"
5017#include "confdefs.h"
5018
5019#define _LARGEFILE_SOURCE 1
5020#define _FILE_OFFSET_BITS 64
5021#include <sys/resource.h>
5022
Barry Warsawfe33b792003-01-07 22:42:49 +00005023#ifdef F77_DUMMY_MAIN
5024# ifdef __cplusplus
5025 extern "C"
5026# endif
5027 int F77_DUMMY_MAIN() { return 1; }
5028#endif
Martin v. Löwis399a6892002-10-04 10:22:02 +00005029int
5030main ()
5031{
5032struct rlimit foo;
5033 ;
5034 return 0;
5035}
5036_ACEOF
5037rm -f conftest.$ac_objext
5038if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5039 (eval $ac_compile) 2>&5
5040 ac_status=$?
5041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5042 (exit $ac_status); } &&
5043 { ac_try='test -s conftest.$ac_objext'
5044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5045 (eval $ac_try) 2>&5
5046 ac_status=$?
5047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5048 (exit $ac_status); }; }; then
5049 sol_lfs_bug=no
5050else
5051 echo "$as_me: failed program was:" >&5
5052cat conftest.$ac_ext >&5
5053sol_lfs_bug=yes
5054fi
5055rm -f conftest.$ac_objext conftest.$ac_ext
5056echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5057echo "${ECHO_T}$sol_lfs_bug" >&6
5058if test "$sol_lfs_bug" = "yes"; then
5059 use_lfs=no
5060fi
5061
5062if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005063# Two defines needed to enable largefile support on various platforms
5064# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005065
Martin v. Löwis11437992002-04-12 09:54:03 +00005066cat >>confdefs.h <<\_ACEOF
5067#define _LARGEFILE_SOURCE 1
5068_ACEOF
5069
5070
5071cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005072#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005073_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005074
Martin v. Löwis399a6892002-10-04 10:22:02 +00005075fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005076
Guido van Rossum84e7b241996-08-19 21:59:00 +00005077# Add some code to confdefs.h so that the test for off_t works on SCO
5078cat >> confdefs.h <<\EOF
5079#if defined(SCO_DS)
5080#undef _OFF_T
5081#endif
5082EOF
5083
Guido van Rossumef2255b2000-03-10 22:30:29 +00005084# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005085echo "$as_me:$LINENO: checking for mode_t" >&5
5086echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5087if test "${ac_cv_type_mode_t+set}" = set; then
5088 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005089else
Martin v. Löwis11437992002-04-12 09:54:03 +00005090 cat >conftest.$ac_ext <<_ACEOF
5091#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005092#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005093$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005094#ifdef F77_DUMMY_MAIN
5095# ifdef __cplusplus
5096 extern "C"
5097# endif
5098 int F77_DUMMY_MAIN() { return 1; }
5099#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005100int
5101main ()
5102{
5103if ((mode_t *) 0)
5104 return 0;
5105if (sizeof (mode_t))
5106 return 0;
5107 ;
5108 return 0;
5109}
5110_ACEOF
5111rm -f conftest.$ac_objext
5112if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5113 (eval $ac_compile) 2>&5
5114 ac_status=$?
5115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5116 (exit $ac_status); } &&
5117 { ac_try='test -s conftest.$ac_objext'
5118 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5119 (eval $ac_try) 2>&5
5120 ac_status=$?
5121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5122 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005123 ac_cv_type_mode_t=yes
5124else
Martin v. Löwis11437992002-04-12 09:54:03 +00005125 echo "$as_me: failed program was:" >&5
5126cat conftest.$ac_ext >&5
5127ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005128fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005129rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005130fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005131echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5132echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5133if test $ac_cv_type_mode_t = yes; then
5134 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005135else
Martin v. Löwis11437992002-04-12 09:54:03 +00005136
5137cat >>confdefs.h <<_ACEOF
5138#define mode_t int
5139_ACEOF
5140
5141fi
5142
5143echo "$as_me:$LINENO: checking for off_t" >&5
5144echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5145if test "${ac_cv_type_off_t+set}" = set; then
5146 echo $ECHO_N "(cached) $ECHO_C" >&6
5147else
5148 cat >conftest.$ac_ext <<_ACEOF
5149#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005150#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005151$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005152#ifdef F77_DUMMY_MAIN
5153# ifdef __cplusplus
5154 extern "C"
5155# endif
5156 int F77_DUMMY_MAIN() { return 1; }
5157#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005158int
5159main ()
5160{
5161if ((off_t *) 0)
5162 return 0;
5163if (sizeof (off_t))
5164 return 0;
5165 ;
5166 return 0;
5167}
5168_ACEOF
5169rm -f conftest.$ac_objext
5170if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5171 (eval $ac_compile) 2>&5
5172 ac_status=$?
5173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5174 (exit $ac_status); } &&
5175 { ac_try='test -s conftest.$ac_objext'
5176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5177 (eval $ac_try) 2>&5
5178 ac_status=$?
5179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5180 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005181 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005182else
Martin v. Löwis11437992002-04-12 09:54:03 +00005183 echo "$as_me: failed program was:" >&5
5184cat conftest.$ac_ext >&5
5185ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005186fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005187rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005188fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005189echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5190echo "${ECHO_T}$ac_cv_type_off_t" >&6
5191if test $ac_cv_type_off_t = yes; then
5192 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005193else
Martin v. Löwis11437992002-04-12 09:54:03 +00005194
5195cat >>confdefs.h <<_ACEOF
5196#define off_t long
5197_ACEOF
5198
5199fi
5200
5201echo "$as_me:$LINENO: checking for pid_t" >&5
5202echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5203if test "${ac_cv_type_pid_t+set}" = set; then
5204 echo $ECHO_N "(cached) $ECHO_C" >&6
5205else
5206 cat >conftest.$ac_ext <<_ACEOF
5207#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005208#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005209$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005210#ifdef F77_DUMMY_MAIN
5211# ifdef __cplusplus
5212 extern "C"
5213# endif
5214 int F77_DUMMY_MAIN() { return 1; }
5215#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005216int
5217main ()
5218{
5219if ((pid_t *) 0)
5220 return 0;
5221if (sizeof (pid_t))
5222 return 0;
5223 ;
5224 return 0;
5225}
5226_ACEOF
5227rm -f conftest.$ac_objext
5228if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5229 (eval $ac_compile) 2>&5
5230 ac_status=$?
5231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5232 (exit $ac_status); } &&
5233 { ac_try='test -s conftest.$ac_objext'
5234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5235 (eval $ac_try) 2>&5
5236 ac_status=$?
5237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5238 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005239 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005240else
Martin v. Löwis11437992002-04-12 09:54:03 +00005241 echo "$as_me: failed program was:" >&5
5242cat conftest.$ac_ext >&5
5243ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005244fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005245rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005246fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005247echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5248echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5249if test $ac_cv_type_pid_t = yes; then
5250 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005251else
Martin v. Löwis11437992002-04-12 09:54:03 +00005252
5253cat >>confdefs.h <<_ACEOF
5254#define pid_t int
5255_ACEOF
5256
5257fi
5258
5259echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5260echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5261if test "${ac_cv_type_signal+set}" = set; then
5262 echo $ECHO_N "(cached) $ECHO_C" >&6
5263else
5264 cat >conftest.$ac_ext <<_ACEOF
5265#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005266#include "confdefs.h"
5267#include <sys/types.h>
5268#include <signal.h>
5269#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005270# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005271#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005272#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005273extern "C" void (*signal (int, void (*)(int)))(int);
5274#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005275void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005276#endif
5277
Barry Warsawfe33b792003-01-07 22:42:49 +00005278#ifdef F77_DUMMY_MAIN
5279# ifdef __cplusplus
5280 extern "C"
5281# endif
5282 int F77_DUMMY_MAIN() { return 1; }
5283#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005284int
5285main ()
5286{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005287int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005288 ;
5289 return 0;
5290}
5291_ACEOF
5292rm -f conftest.$ac_objext
5293if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5294 (eval $ac_compile) 2>&5
5295 ac_status=$?
5296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5297 (exit $ac_status); } &&
5298 { ac_try='test -s conftest.$ac_objext'
5299 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5300 (eval $ac_try) 2>&5
5301 ac_status=$?
5302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5303 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005304 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005305else
Martin v. Löwis11437992002-04-12 09:54:03 +00005306 echo "$as_me: failed program was:" >&5
5307cat conftest.$ac_ext >&5
5308ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005309fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005310rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005311fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005312echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5313echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005314
Martin v. Löwis11437992002-04-12 09:54:03 +00005315cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005316#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005317_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005318
Michael W. Hudson54241132001-12-07 15:38:26 +00005319
Martin v. Löwis11437992002-04-12 09:54:03 +00005320echo "$as_me:$LINENO: checking for size_t" >&5
5321echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5322if test "${ac_cv_type_size_t+set}" = set; then
5323 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005324else
Martin v. Löwis11437992002-04-12 09:54:03 +00005325 cat >conftest.$ac_ext <<_ACEOF
5326#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005327#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005328$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005329#ifdef F77_DUMMY_MAIN
5330# ifdef __cplusplus
5331 extern "C"
5332# endif
5333 int F77_DUMMY_MAIN() { return 1; }
5334#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005335int
5336main ()
5337{
5338if ((size_t *) 0)
5339 return 0;
5340if (sizeof (size_t))
5341 return 0;
5342 ;
5343 return 0;
5344}
5345_ACEOF
5346rm -f conftest.$ac_objext
5347if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5348 (eval $ac_compile) 2>&5
5349 ac_status=$?
5350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5351 (exit $ac_status); } &&
5352 { ac_try='test -s conftest.$ac_objext'
5353 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5354 (eval $ac_try) 2>&5
5355 ac_status=$?
5356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5357 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005358 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005359else
Martin v. Löwis11437992002-04-12 09:54:03 +00005360 echo "$as_me: failed program was:" >&5
5361cat conftest.$ac_ext >&5
5362ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005363fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005364rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005365fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005366echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5367echo "${ECHO_T}$ac_cv_type_size_t" >&6
5368if test $ac_cv_type_size_t = yes; then
5369 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005370else
Martin v. Löwis11437992002-04-12 09:54:03 +00005371
5372cat >>confdefs.h <<_ACEOF
5373#define size_t unsigned
5374_ACEOF
5375
5376fi
5377
5378echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5379echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5380if test "${ac_cv_type_uid_t+set}" = set; then
5381 echo $ECHO_N "(cached) $ECHO_C" >&6
5382else
5383 cat >conftest.$ac_ext <<_ACEOF
5384#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005385#include "confdefs.h"
5386#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005387
5388_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005389if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00005390 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005391 ac_cv_type_uid_t=yes
5392else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005393 ac_cv_type_uid_t=no
5394fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005395rm -f conftest*
5396
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005397fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005398echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5399echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005400if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005401
Martin v. Löwis11437992002-04-12 09:54:03 +00005402cat >>confdefs.h <<\_ACEOF
5403#define uid_t int
5404_ACEOF
5405
5406
5407cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005408#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005409_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005410
5411fi
5412
Jack Jansendd19cf82001-12-06 22:36:17 +00005413
Michael W. Hudson54241132001-12-07 15:38:26 +00005414# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00005415echo "$as_me:$LINENO: checking for int" >&5
5416echo $ECHO_N "checking for int... $ECHO_C" >&6
5417if test "${ac_cv_type_int+set}" = set; then
5418 echo $ECHO_N "(cached) $ECHO_C" >&6
5419else
5420 cat >conftest.$ac_ext <<_ACEOF
5421#line $LINENO "configure"
5422#include "confdefs.h"
5423$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005424#ifdef F77_DUMMY_MAIN
5425# ifdef __cplusplus
5426 extern "C"
5427# endif
5428 int F77_DUMMY_MAIN() { return 1; }
5429#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005430int
5431main ()
5432{
5433if ((int *) 0)
5434 return 0;
5435if (sizeof (int))
5436 return 0;
5437 ;
5438 return 0;
5439}
5440_ACEOF
5441rm -f conftest.$ac_objext
5442if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5443 (eval $ac_compile) 2>&5
5444 ac_status=$?
5445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5446 (exit $ac_status); } &&
5447 { ac_try='test -s conftest.$ac_objext'
5448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5449 (eval $ac_try) 2>&5
5450 ac_status=$?
5451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5452 (exit $ac_status); }; }; then
5453 ac_cv_type_int=yes
5454else
5455 echo "$as_me: failed program was:" >&5
5456cat conftest.$ac_ext >&5
5457ac_cv_type_int=no
5458fi
5459rm -f conftest.$ac_objext conftest.$ac_ext
5460fi
5461echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5462echo "${ECHO_T}$ac_cv_type_int" >&6
5463
5464echo "$as_me:$LINENO: checking size of int" >&5
5465echo $ECHO_N "checking size of int... $ECHO_C" >&6
5466if test "${ac_cv_sizeof_int+set}" = set; then
5467 echo $ECHO_N "(cached) $ECHO_C" >&6
5468else
5469 if test "$ac_cv_type_int" = yes; then
5470 # The cast to unsigned long works around a bug in the HP C Compiler
5471 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5472 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5473 # This bug is HP SR number 8606223364.
5474 if test "$cross_compiling" = yes; then
5475 # Depending upon the size, compute the lo and hi bounds.
5476cat >conftest.$ac_ext <<_ACEOF
5477#line $LINENO "configure"
5478#include "confdefs.h"
5479$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005480#ifdef F77_DUMMY_MAIN
5481# ifdef __cplusplus
5482 extern "C"
5483# endif
5484 int F77_DUMMY_MAIN() { return 1; }
5485#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005486int
5487main ()
5488{
5489static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5490test_array [0] = 0
5491
5492 ;
5493 return 0;
5494}
5495_ACEOF
5496rm -f conftest.$ac_objext
5497if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5498 (eval $ac_compile) 2>&5
5499 ac_status=$?
5500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5501 (exit $ac_status); } &&
5502 { ac_try='test -s conftest.$ac_objext'
5503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5504 (eval $ac_try) 2>&5
5505 ac_status=$?
5506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5507 (exit $ac_status); }; }; then
5508 ac_lo=0 ac_mid=0
5509 while :; do
5510 cat >conftest.$ac_ext <<_ACEOF
5511#line $LINENO "configure"
5512#include "confdefs.h"
5513$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005514#ifdef F77_DUMMY_MAIN
5515# ifdef __cplusplus
5516 extern "C"
5517# endif
5518 int F77_DUMMY_MAIN() { return 1; }
5519#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005520int
5521main ()
5522{
5523static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5524test_array [0] = 0
5525
5526 ;
5527 return 0;
5528}
5529_ACEOF
5530rm -f conftest.$ac_objext
5531if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5532 (eval $ac_compile) 2>&5
5533 ac_status=$?
5534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5535 (exit $ac_status); } &&
5536 { ac_try='test -s conftest.$ac_objext'
5537 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5538 (eval $ac_try) 2>&5
5539 ac_status=$?
5540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5541 (exit $ac_status); }; }; then
5542 ac_hi=$ac_mid; break
5543else
5544 echo "$as_me: failed program was:" >&5
5545cat conftest.$ac_ext >&5
5546ac_lo=`expr $ac_mid + 1`
5547 if test $ac_lo -le $ac_mid; then
5548 ac_lo= ac_hi=
5549 break
5550 fi
5551 ac_mid=`expr 2 '*' $ac_mid + 1`
5552fi
5553rm -f conftest.$ac_objext conftest.$ac_ext
5554 done
5555else
5556 echo "$as_me: failed program was:" >&5
5557cat conftest.$ac_ext >&5
5558cat >conftest.$ac_ext <<_ACEOF
5559#line $LINENO "configure"
5560#include "confdefs.h"
5561$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005562#ifdef F77_DUMMY_MAIN
5563# ifdef __cplusplus
5564 extern "C"
5565# endif
5566 int F77_DUMMY_MAIN() { return 1; }
5567#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005568int
5569main ()
5570{
5571static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5572test_array [0] = 0
5573
5574 ;
5575 return 0;
5576}
5577_ACEOF
5578rm -f conftest.$ac_objext
5579if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5580 (eval $ac_compile) 2>&5
5581 ac_status=$?
5582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5583 (exit $ac_status); } &&
5584 { ac_try='test -s conftest.$ac_objext'
5585 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5586 (eval $ac_try) 2>&5
5587 ac_status=$?
5588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5589 (exit $ac_status); }; }; then
5590 ac_hi=-1 ac_mid=-1
5591 while :; do
5592 cat >conftest.$ac_ext <<_ACEOF
5593#line $LINENO "configure"
5594#include "confdefs.h"
5595$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005596#ifdef F77_DUMMY_MAIN
5597# ifdef __cplusplus
5598 extern "C"
5599# endif
5600 int F77_DUMMY_MAIN() { return 1; }
5601#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005602int
5603main ()
5604{
5605static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5606test_array [0] = 0
5607
5608 ;
5609 return 0;
5610}
5611_ACEOF
5612rm -f conftest.$ac_objext
5613if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5614 (eval $ac_compile) 2>&5
5615 ac_status=$?
5616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5617 (exit $ac_status); } &&
5618 { ac_try='test -s conftest.$ac_objext'
5619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5620 (eval $ac_try) 2>&5
5621 ac_status=$?
5622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5623 (exit $ac_status); }; }; then
5624 ac_lo=$ac_mid; break
5625else
5626 echo "$as_me: failed program was:" >&5
5627cat conftest.$ac_ext >&5
5628ac_hi=`expr '(' $ac_mid ')' - 1`
5629 if test $ac_mid -le $ac_hi; then
5630 ac_lo= ac_hi=
5631 break
5632 fi
5633 ac_mid=`expr 2 '*' $ac_mid`
5634fi
5635rm -f conftest.$ac_objext conftest.$ac_ext
5636 done
5637else
5638 echo "$as_me: failed program was:" >&5
5639cat conftest.$ac_ext >&5
5640ac_lo= ac_hi=
5641fi
5642rm -f conftest.$ac_objext conftest.$ac_ext
5643fi
5644rm -f conftest.$ac_objext conftest.$ac_ext
5645# Binary search between lo and hi bounds.
5646while test "x$ac_lo" != "x$ac_hi"; do
5647 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5648 cat >conftest.$ac_ext <<_ACEOF
5649#line $LINENO "configure"
5650#include "confdefs.h"
5651$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005652#ifdef F77_DUMMY_MAIN
5653# ifdef __cplusplus
5654 extern "C"
5655# endif
5656 int F77_DUMMY_MAIN() { return 1; }
5657#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005658int
5659main ()
5660{
5661static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5662test_array [0] = 0
5663
5664 ;
5665 return 0;
5666}
5667_ACEOF
5668rm -f conftest.$ac_objext
5669if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5670 (eval $ac_compile) 2>&5
5671 ac_status=$?
5672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5673 (exit $ac_status); } &&
5674 { ac_try='test -s conftest.$ac_objext'
5675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5676 (eval $ac_try) 2>&5
5677 ac_status=$?
5678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5679 (exit $ac_status); }; }; then
5680 ac_hi=$ac_mid
5681else
5682 echo "$as_me: failed program was:" >&5
5683cat conftest.$ac_ext >&5
5684ac_lo=`expr '(' $ac_mid ')' + 1`
5685fi
5686rm -f conftest.$ac_objext conftest.$ac_ext
5687done
5688case $ac_lo in
5689?*) ac_cv_sizeof_int=$ac_lo;;
5690'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5691echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5692 { (exit 1); exit 1; }; } ;;
5693esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005694else
5695 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005696 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5697echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5698 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005699else
Martin v. Löwis11437992002-04-12 09:54:03 +00005700 cat >conftest.$ac_ext <<_ACEOF
5701#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005702#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005703$ac_includes_default
5704long longval () { return (long) (sizeof (int)); }
5705unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005706#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005707#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00005708#ifdef F77_DUMMY_MAIN
5709# ifdef __cplusplus
5710 extern "C"
5711# endif
5712 int F77_DUMMY_MAIN() { return 1; }
5713#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005714int
5715main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005716{
Martin v. Löwis11437992002-04-12 09:54:03 +00005717
5718 FILE *f = fopen ("conftest.val", "w");
5719 if (! f)
5720 exit (1);
5721 if (((long) (sizeof (int))) < 0)
5722 {
5723 long i = longval ();
5724 if (i != ((long) (sizeof (int))))
5725 exit (1);
5726 fprintf (f, "%ld\n", i);
5727 }
5728 else
5729 {
5730 unsigned long i = ulongval ();
5731 if (i != ((long) (sizeof (int))))
5732 exit (1);
5733 fprintf (f, "%lu\n", i);
5734 }
5735 exit (ferror (f) || fclose (f) != 0);
5736
5737 ;
5738 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005739}
Martin v. Löwis11437992002-04-12 09:54:03 +00005740_ACEOF
5741rm -f conftest$ac_exeext
5742if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5743 (eval $ac_link) 2>&5
5744 ac_status=$?
5745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5746 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5747 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5748 (eval $ac_try) 2>&5
5749 ac_status=$?
5750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5751 (exit $ac_status); }; }; then
5752 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005753else
Martin v. Löwis11437992002-04-12 09:54:03 +00005754 echo "$as_me: program exited with status $ac_status" >&5
5755echo "$as_me: failed program was:" >&5
5756cat conftest.$ac_ext >&5
5757( exit $ac_status )
5758{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5759echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5760 { (exit 1); exit 1; }; }
5761fi
Barry Warsawfe33b792003-01-07 22:42:49 +00005762rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005763fi
5764fi
5765rm -f conftest.val
5766else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005767 ac_cv_sizeof_int=0
5768fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005769fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005770echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5771echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5772cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005773#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005774_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005775
5776
Martin v. Löwis11437992002-04-12 09:54:03 +00005777echo "$as_me:$LINENO: checking for long" >&5
5778echo $ECHO_N "checking for long... $ECHO_C" >&6
5779if test "${ac_cv_type_long+set}" = set; then
5780 echo $ECHO_N "(cached) $ECHO_C" >&6
5781else
5782 cat >conftest.$ac_ext <<_ACEOF
5783#line $LINENO "configure"
5784#include "confdefs.h"
5785$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005786#ifdef F77_DUMMY_MAIN
5787# ifdef __cplusplus
5788 extern "C"
5789# endif
5790 int F77_DUMMY_MAIN() { return 1; }
5791#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005792int
5793main ()
5794{
5795if ((long *) 0)
5796 return 0;
5797if (sizeof (long))
5798 return 0;
5799 ;
5800 return 0;
5801}
5802_ACEOF
5803rm -f conftest.$ac_objext
5804if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5805 (eval $ac_compile) 2>&5
5806 ac_status=$?
5807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5808 (exit $ac_status); } &&
5809 { ac_try='test -s conftest.$ac_objext'
5810 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5811 (eval $ac_try) 2>&5
5812 ac_status=$?
5813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5814 (exit $ac_status); }; }; then
5815 ac_cv_type_long=yes
5816else
5817 echo "$as_me: failed program was:" >&5
5818cat conftest.$ac_ext >&5
5819ac_cv_type_long=no
5820fi
5821rm -f conftest.$ac_objext conftest.$ac_ext
5822fi
5823echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5824echo "${ECHO_T}$ac_cv_type_long" >&6
5825
5826echo "$as_me:$LINENO: checking size of long" >&5
5827echo $ECHO_N "checking size of long... $ECHO_C" >&6
5828if test "${ac_cv_sizeof_long+set}" = set; then
5829 echo $ECHO_N "(cached) $ECHO_C" >&6
5830else
5831 if test "$ac_cv_type_long" = yes; then
5832 # The cast to unsigned long works around a bug in the HP C Compiler
5833 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5834 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5835 # This bug is HP SR number 8606223364.
5836 if test "$cross_compiling" = yes; then
5837 # Depending upon the size, compute the lo and hi bounds.
5838cat >conftest.$ac_ext <<_ACEOF
5839#line $LINENO "configure"
5840#include "confdefs.h"
5841$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005842#ifdef F77_DUMMY_MAIN
5843# ifdef __cplusplus
5844 extern "C"
5845# endif
5846 int F77_DUMMY_MAIN() { return 1; }
5847#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005848int
5849main ()
5850{
5851static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5852test_array [0] = 0
5853
5854 ;
5855 return 0;
5856}
5857_ACEOF
5858rm -f conftest.$ac_objext
5859if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5860 (eval $ac_compile) 2>&5
5861 ac_status=$?
5862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5863 (exit $ac_status); } &&
5864 { ac_try='test -s conftest.$ac_objext'
5865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5866 (eval $ac_try) 2>&5
5867 ac_status=$?
5868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5869 (exit $ac_status); }; }; then
5870 ac_lo=0 ac_mid=0
5871 while :; do
5872 cat >conftest.$ac_ext <<_ACEOF
5873#line $LINENO "configure"
5874#include "confdefs.h"
5875$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005876#ifdef F77_DUMMY_MAIN
5877# ifdef __cplusplus
5878 extern "C"
5879# endif
5880 int F77_DUMMY_MAIN() { return 1; }
5881#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005882int
5883main ()
5884{
5885static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5886test_array [0] = 0
5887
5888 ;
5889 return 0;
5890}
5891_ACEOF
5892rm -f conftest.$ac_objext
5893if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5894 (eval $ac_compile) 2>&5
5895 ac_status=$?
5896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5897 (exit $ac_status); } &&
5898 { ac_try='test -s conftest.$ac_objext'
5899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5900 (eval $ac_try) 2>&5
5901 ac_status=$?
5902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5903 (exit $ac_status); }; }; then
5904 ac_hi=$ac_mid; break
5905else
5906 echo "$as_me: failed program was:" >&5
5907cat conftest.$ac_ext >&5
5908ac_lo=`expr $ac_mid + 1`
5909 if test $ac_lo -le $ac_mid; then
5910 ac_lo= ac_hi=
5911 break
5912 fi
5913 ac_mid=`expr 2 '*' $ac_mid + 1`
5914fi
5915rm -f conftest.$ac_objext conftest.$ac_ext
5916 done
5917else
5918 echo "$as_me: failed program was:" >&5
5919cat conftest.$ac_ext >&5
5920cat >conftest.$ac_ext <<_ACEOF
5921#line $LINENO "configure"
5922#include "confdefs.h"
5923$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005924#ifdef F77_DUMMY_MAIN
5925# ifdef __cplusplus
5926 extern "C"
5927# endif
5928 int F77_DUMMY_MAIN() { return 1; }
5929#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005930int
5931main ()
5932{
5933static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5934test_array [0] = 0
5935
5936 ;
5937 return 0;
5938}
5939_ACEOF
5940rm -f conftest.$ac_objext
5941if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5942 (eval $ac_compile) 2>&5
5943 ac_status=$?
5944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5945 (exit $ac_status); } &&
5946 { ac_try='test -s conftest.$ac_objext'
5947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5948 (eval $ac_try) 2>&5
5949 ac_status=$?
5950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5951 (exit $ac_status); }; }; then
5952 ac_hi=-1 ac_mid=-1
5953 while :; do
5954 cat >conftest.$ac_ext <<_ACEOF
5955#line $LINENO "configure"
5956#include "confdefs.h"
5957$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005958#ifdef F77_DUMMY_MAIN
5959# ifdef __cplusplus
5960 extern "C"
5961# endif
5962 int F77_DUMMY_MAIN() { return 1; }
5963#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005964int
5965main ()
5966{
5967static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5968test_array [0] = 0
5969
5970 ;
5971 return 0;
5972}
5973_ACEOF
5974rm -f conftest.$ac_objext
5975if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5976 (eval $ac_compile) 2>&5
5977 ac_status=$?
5978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5979 (exit $ac_status); } &&
5980 { ac_try='test -s conftest.$ac_objext'
5981 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5982 (eval $ac_try) 2>&5
5983 ac_status=$?
5984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5985 (exit $ac_status); }; }; then
5986 ac_lo=$ac_mid; break
5987else
5988 echo "$as_me: failed program was:" >&5
5989cat conftest.$ac_ext >&5
5990ac_hi=`expr '(' $ac_mid ')' - 1`
5991 if test $ac_mid -le $ac_hi; then
5992 ac_lo= ac_hi=
5993 break
5994 fi
5995 ac_mid=`expr 2 '*' $ac_mid`
5996fi
5997rm -f conftest.$ac_objext conftest.$ac_ext
5998 done
5999else
6000 echo "$as_me: failed program was:" >&5
6001cat conftest.$ac_ext >&5
6002ac_lo= ac_hi=
6003fi
6004rm -f conftest.$ac_objext conftest.$ac_ext
6005fi
6006rm -f conftest.$ac_objext conftest.$ac_ext
6007# Binary search between lo and hi bounds.
6008while test "x$ac_lo" != "x$ac_hi"; do
6009 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6010 cat >conftest.$ac_ext <<_ACEOF
6011#line $LINENO "configure"
6012#include "confdefs.h"
6013$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006014#ifdef F77_DUMMY_MAIN
6015# ifdef __cplusplus
6016 extern "C"
6017# endif
6018 int F77_DUMMY_MAIN() { return 1; }
6019#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006020int
6021main ()
6022{
6023static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6024test_array [0] = 0
6025
6026 ;
6027 return 0;
6028}
6029_ACEOF
6030rm -f conftest.$ac_objext
6031if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6032 (eval $ac_compile) 2>&5
6033 ac_status=$?
6034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6035 (exit $ac_status); } &&
6036 { ac_try='test -s conftest.$ac_objext'
6037 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6038 (eval $ac_try) 2>&5
6039 ac_status=$?
6040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6041 (exit $ac_status); }; }; then
6042 ac_hi=$ac_mid
6043else
6044 echo "$as_me: failed program was:" >&5
6045cat conftest.$ac_ext >&5
6046ac_lo=`expr '(' $ac_mid ')' + 1`
6047fi
6048rm -f conftest.$ac_objext conftest.$ac_ext
6049done
6050case $ac_lo in
6051?*) ac_cv_sizeof_long=$ac_lo;;
6052'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
6053echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
6054 { (exit 1); exit 1; }; } ;;
6055esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006056else
6057 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006058 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6059echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6060 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006061else
Martin v. Löwis11437992002-04-12 09:54:03 +00006062 cat >conftest.$ac_ext <<_ACEOF
6063#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006064#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006065$ac_includes_default
6066long longval () { return (long) (sizeof (long)); }
6067unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006068#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006069#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00006070#ifdef F77_DUMMY_MAIN
6071# ifdef __cplusplus
6072 extern "C"
6073# endif
6074 int F77_DUMMY_MAIN() { return 1; }
6075#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006076int
6077main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006078{
Martin v. Löwis11437992002-04-12 09:54:03 +00006079
6080 FILE *f = fopen ("conftest.val", "w");
6081 if (! f)
6082 exit (1);
6083 if (((long) (sizeof (long))) < 0)
6084 {
6085 long i = longval ();
6086 if (i != ((long) (sizeof (long))))
6087 exit (1);
6088 fprintf (f, "%ld\n", i);
6089 }
6090 else
6091 {
6092 unsigned long i = ulongval ();
6093 if (i != ((long) (sizeof (long))))
6094 exit (1);
6095 fprintf (f, "%lu\n", i);
6096 }
6097 exit (ferror (f) || fclose (f) != 0);
6098
6099 ;
6100 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006101}
Martin v. Löwis11437992002-04-12 09:54:03 +00006102_ACEOF
6103rm -f conftest$ac_exeext
6104if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6105 (eval $ac_link) 2>&5
6106 ac_status=$?
6107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6108 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6109 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6110 (eval $ac_try) 2>&5
6111 ac_status=$?
6112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6113 (exit $ac_status); }; }; then
6114 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006115else
Martin v. Löwis11437992002-04-12 09:54:03 +00006116 echo "$as_me: program exited with status $ac_status" >&5
6117echo "$as_me: failed program was:" >&5
6118cat conftest.$ac_ext >&5
6119( exit $ac_status )
6120{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
6121echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
6122 { (exit 1); exit 1; }; }
6123fi
Barry Warsawfe33b792003-01-07 22:42:49 +00006124rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006125fi
6126fi
6127rm -f conftest.val
6128else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006129 ac_cv_sizeof_long=0
6130fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006131fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006132echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6133echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6134cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006135#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006136_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006137
6138
Martin v. Löwis11437992002-04-12 09:54:03 +00006139echo "$as_me:$LINENO: checking for void *" >&5
6140echo $ECHO_N "checking for void *... $ECHO_C" >&6
6141if test "${ac_cv_type_void_p+set}" = set; then
6142 echo $ECHO_N "(cached) $ECHO_C" >&6
6143else
6144 cat >conftest.$ac_ext <<_ACEOF
6145#line $LINENO "configure"
6146#include "confdefs.h"
6147$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006148#ifdef F77_DUMMY_MAIN
6149# ifdef __cplusplus
6150 extern "C"
6151# endif
6152 int F77_DUMMY_MAIN() { return 1; }
6153#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006154int
6155main ()
6156{
6157if ((void * *) 0)
6158 return 0;
6159if (sizeof (void *))
6160 return 0;
6161 ;
6162 return 0;
6163}
6164_ACEOF
6165rm -f conftest.$ac_objext
6166if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6167 (eval $ac_compile) 2>&5
6168 ac_status=$?
6169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6170 (exit $ac_status); } &&
6171 { ac_try='test -s conftest.$ac_objext'
6172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6173 (eval $ac_try) 2>&5
6174 ac_status=$?
6175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6176 (exit $ac_status); }; }; then
6177 ac_cv_type_void_p=yes
6178else
6179 echo "$as_me: failed program was:" >&5
6180cat conftest.$ac_ext >&5
6181ac_cv_type_void_p=no
6182fi
6183rm -f conftest.$ac_objext conftest.$ac_ext
6184fi
6185echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
6186echo "${ECHO_T}$ac_cv_type_void_p" >&6
6187
6188echo "$as_me:$LINENO: checking size of void *" >&5
6189echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6190if test "${ac_cv_sizeof_void_p+set}" = set; then
6191 echo $ECHO_N "(cached) $ECHO_C" >&6
6192else
6193 if test "$ac_cv_type_void_p" = yes; then
6194 # The cast to unsigned long works around a bug in the HP C Compiler
6195 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6196 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6197 # This bug is HP SR number 8606223364.
6198 if test "$cross_compiling" = yes; then
6199 # Depending upon the size, compute the lo and hi bounds.
6200cat >conftest.$ac_ext <<_ACEOF
6201#line $LINENO "configure"
6202#include "confdefs.h"
6203$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006204#ifdef F77_DUMMY_MAIN
6205# ifdef __cplusplus
6206 extern "C"
6207# endif
6208 int F77_DUMMY_MAIN() { return 1; }
6209#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006210int
6211main ()
6212{
6213static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
6214test_array [0] = 0
6215
6216 ;
6217 return 0;
6218}
6219_ACEOF
6220rm -f conftest.$ac_objext
6221if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6222 (eval $ac_compile) 2>&5
6223 ac_status=$?
6224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6225 (exit $ac_status); } &&
6226 { ac_try='test -s conftest.$ac_objext'
6227 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6228 (eval $ac_try) 2>&5
6229 ac_status=$?
6230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6231 (exit $ac_status); }; }; then
6232 ac_lo=0 ac_mid=0
6233 while :; do
6234 cat >conftest.$ac_ext <<_ACEOF
6235#line $LINENO "configure"
6236#include "confdefs.h"
6237$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006238#ifdef F77_DUMMY_MAIN
6239# ifdef __cplusplus
6240 extern "C"
6241# endif
6242 int F77_DUMMY_MAIN() { return 1; }
6243#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006244int
6245main ()
6246{
6247static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6248test_array [0] = 0
6249
6250 ;
6251 return 0;
6252}
6253_ACEOF
6254rm -f conftest.$ac_objext
6255if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6256 (eval $ac_compile) 2>&5
6257 ac_status=$?
6258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6259 (exit $ac_status); } &&
6260 { ac_try='test -s conftest.$ac_objext'
6261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6262 (eval $ac_try) 2>&5
6263 ac_status=$?
6264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6265 (exit $ac_status); }; }; then
6266 ac_hi=$ac_mid; break
6267else
6268 echo "$as_me: failed program was:" >&5
6269cat conftest.$ac_ext >&5
6270ac_lo=`expr $ac_mid + 1`
6271 if test $ac_lo -le $ac_mid; then
6272 ac_lo= ac_hi=
6273 break
6274 fi
6275 ac_mid=`expr 2 '*' $ac_mid + 1`
6276fi
6277rm -f conftest.$ac_objext conftest.$ac_ext
6278 done
6279else
6280 echo "$as_me: failed program was:" >&5
6281cat conftest.$ac_ext >&5
6282cat >conftest.$ac_ext <<_ACEOF
6283#line $LINENO "configure"
6284#include "confdefs.h"
6285$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006286#ifdef F77_DUMMY_MAIN
6287# ifdef __cplusplus
6288 extern "C"
6289# endif
6290 int F77_DUMMY_MAIN() { return 1; }
6291#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006292int
6293main ()
6294{
6295static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6296test_array [0] = 0
6297
6298 ;
6299 return 0;
6300}
6301_ACEOF
6302rm -f conftest.$ac_objext
6303if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6304 (eval $ac_compile) 2>&5
6305 ac_status=$?
6306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6307 (exit $ac_status); } &&
6308 { ac_try='test -s conftest.$ac_objext'
6309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6310 (eval $ac_try) 2>&5
6311 ac_status=$?
6312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6313 (exit $ac_status); }; }; then
6314 ac_hi=-1 ac_mid=-1
6315 while :; do
6316 cat >conftest.$ac_ext <<_ACEOF
6317#line $LINENO "configure"
6318#include "confdefs.h"
6319$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006320#ifdef F77_DUMMY_MAIN
6321# ifdef __cplusplus
6322 extern "C"
6323# endif
6324 int F77_DUMMY_MAIN() { return 1; }
6325#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006326int
6327main ()
6328{
6329static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6330test_array [0] = 0
6331
6332 ;
6333 return 0;
6334}
6335_ACEOF
6336rm -f conftest.$ac_objext
6337if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6338 (eval $ac_compile) 2>&5
6339 ac_status=$?
6340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6341 (exit $ac_status); } &&
6342 { ac_try='test -s conftest.$ac_objext'
6343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6344 (eval $ac_try) 2>&5
6345 ac_status=$?
6346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6347 (exit $ac_status); }; }; then
6348 ac_lo=$ac_mid; break
6349else
6350 echo "$as_me: failed program was:" >&5
6351cat conftest.$ac_ext >&5
6352ac_hi=`expr '(' $ac_mid ')' - 1`
6353 if test $ac_mid -le $ac_hi; then
6354 ac_lo= ac_hi=
6355 break
6356 fi
6357 ac_mid=`expr 2 '*' $ac_mid`
6358fi
6359rm -f conftest.$ac_objext conftest.$ac_ext
6360 done
6361else
6362 echo "$as_me: failed program was:" >&5
6363cat conftest.$ac_ext >&5
6364ac_lo= ac_hi=
6365fi
6366rm -f conftest.$ac_objext conftest.$ac_ext
6367fi
6368rm -f conftest.$ac_objext conftest.$ac_ext
6369# Binary search between lo and hi bounds.
6370while test "x$ac_lo" != "x$ac_hi"; do
6371 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6372 cat >conftest.$ac_ext <<_ACEOF
6373#line $LINENO "configure"
6374#include "confdefs.h"
6375$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006376#ifdef F77_DUMMY_MAIN
6377# ifdef __cplusplus
6378 extern "C"
6379# endif
6380 int F77_DUMMY_MAIN() { return 1; }
6381#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006382int
6383main ()
6384{
6385static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6386test_array [0] = 0
6387
6388 ;
6389 return 0;
6390}
6391_ACEOF
6392rm -f conftest.$ac_objext
6393if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6394 (eval $ac_compile) 2>&5
6395 ac_status=$?
6396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6397 (exit $ac_status); } &&
6398 { ac_try='test -s conftest.$ac_objext'
6399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6400 (eval $ac_try) 2>&5
6401 ac_status=$?
6402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6403 (exit $ac_status); }; }; then
6404 ac_hi=$ac_mid
6405else
6406 echo "$as_me: failed program was:" >&5
6407cat conftest.$ac_ext >&5
6408ac_lo=`expr '(' $ac_mid ')' + 1`
6409fi
6410rm -f conftest.$ac_objext conftest.$ac_ext
6411done
6412case $ac_lo in
6413?*) ac_cv_sizeof_void_p=$ac_lo;;
6414'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6415echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6416 { (exit 1); exit 1; }; } ;;
6417esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006418else
6419 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006420 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6421echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6422 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006423else
Martin v. Löwis11437992002-04-12 09:54:03 +00006424 cat >conftest.$ac_ext <<_ACEOF
6425#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00006426#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006427$ac_includes_default
6428long longval () { return (long) (sizeof (void *)); }
6429unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006430#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006431#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00006432#ifdef F77_DUMMY_MAIN
6433# ifdef __cplusplus
6434 extern "C"
6435# endif
6436 int F77_DUMMY_MAIN() { return 1; }
6437#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006438int
6439main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006440{
Martin v. Löwis11437992002-04-12 09:54:03 +00006441
6442 FILE *f = fopen ("conftest.val", "w");
6443 if (! f)
6444 exit (1);
6445 if (((long) (sizeof (void *))) < 0)
6446 {
6447 long i = longval ();
6448 if (i != ((long) (sizeof (void *))))
6449 exit (1);
6450 fprintf (f, "%ld\n", i);
6451 }
6452 else
6453 {
6454 unsigned long i = ulongval ();
6455 if (i != ((long) (sizeof (void *))))
6456 exit (1);
6457 fprintf (f, "%lu\n", i);
6458 }
6459 exit (ferror (f) || fclose (f) != 0);
6460
6461 ;
6462 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006463}
Martin v. Löwis11437992002-04-12 09:54:03 +00006464_ACEOF
6465rm -f conftest$ac_exeext
6466if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6467 (eval $ac_link) 2>&5
6468 ac_status=$?
6469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6470 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6472 (eval $ac_try) 2>&5
6473 ac_status=$?
6474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6475 (exit $ac_status); }; }; then
6476 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006477else
Martin v. Löwis11437992002-04-12 09:54:03 +00006478 echo "$as_me: program exited with status $ac_status" >&5
6479echo "$as_me: failed program was:" >&5
6480cat conftest.$ac_ext >&5
6481( exit $ac_status )
6482{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6483echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6484 { (exit 1); exit 1; }; }
6485fi
Barry Warsawfe33b792003-01-07 22:42:49 +00006486rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006487fi
6488fi
6489rm -f conftest.val
6490else
Guido van Rossumad678af1998-10-02 14:42:15 +00006491 ac_cv_sizeof_void_p=0
6492fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006493fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006494echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6495echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6496cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006497#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006498_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006499
6500
Martin v. Löwis11437992002-04-12 09:54:03 +00006501echo "$as_me:$LINENO: checking for char" >&5
6502echo $ECHO_N "checking for char... $ECHO_C" >&6
6503if test "${ac_cv_type_char+set}" = set; then
6504 echo $ECHO_N "(cached) $ECHO_C" >&6
6505else
6506 cat >conftest.$ac_ext <<_ACEOF
6507#line $LINENO "configure"
6508#include "confdefs.h"
6509$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006510#ifdef F77_DUMMY_MAIN
6511# ifdef __cplusplus
6512 extern "C"
6513# endif
6514 int F77_DUMMY_MAIN() { return 1; }
6515#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006516int
6517main ()
6518{
6519if ((char *) 0)
6520 return 0;
6521if (sizeof (char))
6522 return 0;
6523 ;
6524 return 0;
6525}
6526_ACEOF
6527rm -f conftest.$ac_objext
6528if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6529 (eval $ac_compile) 2>&5
6530 ac_status=$?
6531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6532 (exit $ac_status); } &&
6533 { ac_try='test -s conftest.$ac_objext'
6534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6535 (eval $ac_try) 2>&5
6536 ac_status=$?
6537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6538 (exit $ac_status); }; }; then
6539 ac_cv_type_char=yes
6540else
6541 echo "$as_me: failed program was:" >&5
6542cat conftest.$ac_ext >&5
6543ac_cv_type_char=no
6544fi
6545rm -f conftest.$ac_objext conftest.$ac_ext
6546fi
6547echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
6548echo "${ECHO_T}$ac_cv_type_char" >&6
6549
6550echo "$as_me:$LINENO: checking size of char" >&5
6551echo $ECHO_N "checking size of char... $ECHO_C" >&6
6552if test "${ac_cv_sizeof_char+set}" = set; then
6553 echo $ECHO_N "(cached) $ECHO_C" >&6
6554else
6555 if test "$ac_cv_type_char" = yes; then
6556 # The cast to unsigned long works around a bug in the HP C Compiler
6557 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6558 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6559 # This bug is HP SR number 8606223364.
6560 if test "$cross_compiling" = yes; then
6561 # Depending upon the size, compute the lo and hi bounds.
6562cat >conftest.$ac_ext <<_ACEOF
6563#line $LINENO "configure"
6564#include "confdefs.h"
6565$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006566#ifdef F77_DUMMY_MAIN
6567# ifdef __cplusplus
6568 extern "C"
6569# endif
6570 int F77_DUMMY_MAIN() { return 1; }
6571#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006572int
6573main ()
6574{
6575static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
6576test_array [0] = 0
6577
6578 ;
6579 return 0;
6580}
6581_ACEOF
6582rm -f conftest.$ac_objext
6583if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6584 (eval $ac_compile) 2>&5
6585 ac_status=$?
6586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6587 (exit $ac_status); } &&
6588 { ac_try='test -s conftest.$ac_objext'
6589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6590 (eval $ac_try) 2>&5
6591 ac_status=$?
6592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6593 (exit $ac_status); }; }; then
6594 ac_lo=0 ac_mid=0
6595 while :; do
6596 cat >conftest.$ac_ext <<_ACEOF
6597#line $LINENO "configure"
6598#include "confdefs.h"
6599$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006600#ifdef F77_DUMMY_MAIN
6601# ifdef __cplusplus
6602 extern "C"
6603# endif
6604 int F77_DUMMY_MAIN() { return 1; }
6605#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006606int
6607main ()
6608{
6609static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6610test_array [0] = 0
6611
6612 ;
6613 return 0;
6614}
6615_ACEOF
6616rm -f conftest.$ac_objext
6617if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6618 (eval $ac_compile) 2>&5
6619 ac_status=$?
6620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6621 (exit $ac_status); } &&
6622 { ac_try='test -s conftest.$ac_objext'
6623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6624 (eval $ac_try) 2>&5
6625 ac_status=$?
6626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6627 (exit $ac_status); }; }; then
6628 ac_hi=$ac_mid; break
6629else
6630 echo "$as_me: failed program was:" >&5
6631cat conftest.$ac_ext >&5
6632ac_lo=`expr $ac_mid + 1`
6633 if test $ac_lo -le $ac_mid; then
6634 ac_lo= ac_hi=
6635 break
6636 fi
6637 ac_mid=`expr 2 '*' $ac_mid + 1`
6638fi
6639rm -f conftest.$ac_objext conftest.$ac_ext
6640 done
6641else
6642 echo "$as_me: failed program was:" >&5
6643cat conftest.$ac_ext >&5
6644cat >conftest.$ac_ext <<_ACEOF
6645#line $LINENO "configure"
6646#include "confdefs.h"
6647$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006648#ifdef F77_DUMMY_MAIN
6649# ifdef __cplusplus
6650 extern "C"
6651# endif
6652 int F77_DUMMY_MAIN() { return 1; }
6653#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006654int
6655main ()
6656{
6657static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
6658test_array [0] = 0
6659
6660 ;
6661 return 0;
6662}
6663_ACEOF
6664rm -f conftest.$ac_objext
6665if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6666 (eval $ac_compile) 2>&5
6667 ac_status=$?
6668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6669 (exit $ac_status); } &&
6670 { ac_try='test -s conftest.$ac_objext'
6671 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6672 (eval $ac_try) 2>&5
6673 ac_status=$?
6674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6675 (exit $ac_status); }; }; then
6676 ac_hi=-1 ac_mid=-1
6677 while :; do
6678 cat >conftest.$ac_ext <<_ACEOF
6679#line $LINENO "configure"
6680#include "confdefs.h"
6681$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006682#ifdef F77_DUMMY_MAIN
6683# ifdef __cplusplus
6684 extern "C"
6685# endif
6686 int F77_DUMMY_MAIN() { return 1; }
6687#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006688int
6689main ()
6690{
6691static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
6692test_array [0] = 0
6693
6694 ;
6695 return 0;
6696}
6697_ACEOF
6698rm -f conftest.$ac_objext
6699if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6700 (eval $ac_compile) 2>&5
6701 ac_status=$?
6702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6703 (exit $ac_status); } &&
6704 { ac_try='test -s conftest.$ac_objext'
6705 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6706 (eval $ac_try) 2>&5
6707 ac_status=$?
6708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6709 (exit $ac_status); }; }; then
6710 ac_lo=$ac_mid; break
6711else
6712 echo "$as_me: failed program was:" >&5
6713cat conftest.$ac_ext >&5
6714ac_hi=`expr '(' $ac_mid ')' - 1`
6715 if test $ac_mid -le $ac_hi; then
6716 ac_lo= ac_hi=
6717 break
6718 fi
6719 ac_mid=`expr 2 '*' $ac_mid`
6720fi
6721rm -f conftest.$ac_objext conftest.$ac_ext
6722 done
6723else
6724 echo "$as_me: failed program was:" >&5
6725cat conftest.$ac_ext >&5
6726ac_lo= ac_hi=
6727fi
6728rm -f conftest.$ac_objext conftest.$ac_ext
6729fi
6730rm -f conftest.$ac_objext conftest.$ac_ext
6731# Binary search between lo and hi bounds.
6732while test "x$ac_lo" != "x$ac_hi"; do
6733 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6734 cat >conftest.$ac_ext <<_ACEOF
6735#line $LINENO "configure"
6736#include "confdefs.h"
6737$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006738#ifdef F77_DUMMY_MAIN
6739# ifdef __cplusplus
6740 extern "C"
6741# endif
6742 int F77_DUMMY_MAIN() { return 1; }
6743#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006744int
6745main ()
6746{
6747static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6748test_array [0] = 0
6749
6750 ;
6751 return 0;
6752}
6753_ACEOF
6754rm -f conftest.$ac_objext
6755if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6756 (eval $ac_compile) 2>&5
6757 ac_status=$?
6758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6759 (exit $ac_status); } &&
6760 { ac_try='test -s conftest.$ac_objext'
6761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6762 (eval $ac_try) 2>&5
6763 ac_status=$?
6764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6765 (exit $ac_status); }; }; then
6766 ac_hi=$ac_mid
6767else
6768 echo "$as_me: failed program was:" >&5
6769cat conftest.$ac_ext >&5
6770ac_lo=`expr '(' $ac_mid ')' + 1`
6771fi
6772rm -f conftest.$ac_objext conftest.$ac_ext
6773done
6774case $ac_lo in
6775?*) ac_cv_sizeof_char=$ac_lo;;
6776'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6777echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6778 { (exit 1); exit 1; }; } ;;
6779esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006780else
6781 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006782 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6783echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6784 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006785else
Martin v. Löwis11437992002-04-12 09:54:03 +00006786 cat >conftest.$ac_ext <<_ACEOF
6787#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006788#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006789$ac_includes_default
6790long longval () { return (long) (sizeof (char)); }
6791unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006792#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006793#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00006794#ifdef F77_DUMMY_MAIN
6795# ifdef __cplusplus
6796 extern "C"
6797# endif
6798 int F77_DUMMY_MAIN() { return 1; }
6799#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006800int
6801main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006802{
Martin v. Löwis11437992002-04-12 09:54:03 +00006803
6804 FILE *f = fopen ("conftest.val", "w");
6805 if (! f)
6806 exit (1);
6807 if (((long) (sizeof (char))) < 0)
6808 {
6809 long i = longval ();
6810 if (i != ((long) (sizeof (char))))
6811 exit (1);
6812 fprintf (f, "%ld\n", i);
6813 }
6814 else
6815 {
6816 unsigned long i = ulongval ();
6817 if (i != ((long) (sizeof (char))))
6818 exit (1);
6819 fprintf (f, "%lu\n", i);
6820 }
6821 exit (ferror (f) || fclose (f) != 0);
6822
6823 ;
6824 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006825}
Martin v. Löwis11437992002-04-12 09:54:03 +00006826_ACEOF
6827rm -f conftest$ac_exeext
6828if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6829 (eval $ac_link) 2>&5
6830 ac_status=$?
6831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6832 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6834 (eval $ac_try) 2>&5
6835 ac_status=$?
6836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6837 (exit $ac_status); }; }; then
6838 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006839else
Martin v. Löwis11437992002-04-12 09:54:03 +00006840 echo "$as_me: program exited with status $ac_status" >&5
6841echo "$as_me: failed program was:" >&5
6842cat conftest.$ac_ext >&5
6843( exit $ac_status )
6844{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6845echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6846 { (exit 1); exit 1; }; }
6847fi
Barry Warsawfe33b792003-01-07 22:42:49 +00006848rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006849fi
6850fi
6851rm -f conftest.val
6852else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006853 ac_cv_sizeof_char=0
6854fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006855fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006856echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6857echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6858cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006859#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006860_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006861
6862
Martin v. Löwis11437992002-04-12 09:54:03 +00006863echo "$as_me:$LINENO: checking for short" >&5
6864echo $ECHO_N "checking for short... $ECHO_C" >&6
6865if test "${ac_cv_type_short+set}" = set; then
6866 echo $ECHO_N "(cached) $ECHO_C" >&6
6867else
6868 cat >conftest.$ac_ext <<_ACEOF
6869#line $LINENO "configure"
6870#include "confdefs.h"
6871$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006872#ifdef F77_DUMMY_MAIN
6873# ifdef __cplusplus
6874 extern "C"
6875# endif
6876 int F77_DUMMY_MAIN() { return 1; }
6877#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006878int
6879main ()
6880{
6881if ((short *) 0)
6882 return 0;
6883if (sizeof (short))
6884 return 0;
6885 ;
6886 return 0;
6887}
6888_ACEOF
6889rm -f conftest.$ac_objext
6890if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6891 (eval $ac_compile) 2>&5
6892 ac_status=$?
6893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6894 (exit $ac_status); } &&
6895 { ac_try='test -s conftest.$ac_objext'
6896 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6897 (eval $ac_try) 2>&5
6898 ac_status=$?
6899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6900 (exit $ac_status); }; }; then
6901 ac_cv_type_short=yes
6902else
6903 echo "$as_me: failed program was:" >&5
6904cat conftest.$ac_ext >&5
6905ac_cv_type_short=no
6906fi
6907rm -f conftest.$ac_objext conftest.$ac_ext
6908fi
6909echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6910echo "${ECHO_T}$ac_cv_type_short" >&6
6911
6912echo "$as_me:$LINENO: checking size of short" >&5
6913echo $ECHO_N "checking size of short... $ECHO_C" >&6
6914if test "${ac_cv_sizeof_short+set}" = set; then
6915 echo $ECHO_N "(cached) $ECHO_C" >&6
6916else
6917 if test "$ac_cv_type_short" = yes; then
6918 # The cast to unsigned long works around a bug in the HP C Compiler
6919 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6920 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6921 # This bug is HP SR number 8606223364.
6922 if test "$cross_compiling" = yes; then
6923 # Depending upon the size, compute the lo and hi bounds.
6924cat >conftest.$ac_ext <<_ACEOF
6925#line $LINENO "configure"
6926#include "confdefs.h"
6927$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006928#ifdef F77_DUMMY_MAIN
6929# ifdef __cplusplus
6930 extern "C"
6931# endif
6932 int F77_DUMMY_MAIN() { return 1; }
6933#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006934int
6935main ()
6936{
6937static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6938test_array [0] = 0
6939
6940 ;
6941 return 0;
6942}
6943_ACEOF
6944rm -f conftest.$ac_objext
6945if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6946 (eval $ac_compile) 2>&5
6947 ac_status=$?
6948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6949 (exit $ac_status); } &&
6950 { ac_try='test -s conftest.$ac_objext'
6951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6952 (eval $ac_try) 2>&5
6953 ac_status=$?
6954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6955 (exit $ac_status); }; }; then
6956 ac_lo=0 ac_mid=0
6957 while :; do
6958 cat >conftest.$ac_ext <<_ACEOF
6959#line $LINENO "configure"
6960#include "confdefs.h"
6961$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006962#ifdef F77_DUMMY_MAIN
6963# ifdef __cplusplus
6964 extern "C"
6965# endif
6966 int F77_DUMMY_MAIN() { return 1; }
6967#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006968int
6969main ()
6970{
6971static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6972test_array [0] = 0
6973
6974 ;
6975 return 0;
6976}
6977_ACEOF
6978rm -f conftest.$ac_objext
6979if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6980 (eval $ac_compile) 2>&5
6981 ac_status=$?
6982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6983 (exit $ac_status); } &&
6984 { ac_try='test -s conftest.$ac_objext'
6985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6986 (eval $ac_try) 2>&5
6987 ac_status=$?
6988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6989 (exit $ac_status); }; }; then
6990 ac_hi=$ac_mid; break
6991else
6992 echo "$as_me: failed program was:" >&5
6993cat conftest.$ac_ext >&5
6994ac_lo=`expr $ac_mid + 1`
6995 if test $ac_lo -le $ac_mid; then
6996 ac_lo= ac_hi=
6997 break
6998 fi
6999 ac_mid=`expr 2 '*' $ac_mid + 1`
7000fi
7001rm -f conftest.$ac_objext conftest.$ac_ext
7002 done
7003else
7004 echo "$as_me: failed program was:" >&5
7005cat conftest.$ac_ext >&5
7006cat >conftest.$ac_ext <<_ACEOF
7007#line $LINENO "configure"
7008#include "confdefs.h"
7009$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007010#ifdef F77_DUMMY_MAIN
7011# ifdef __cplusplus
7012 extern "C"
7013# endif
7014 int F77_DUMMY_MAIN() { return 1; }
7015#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007016int
7017main ()
7018{
7019static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
7020test_array [0] = 0
7021
7022 ;
7023 return 0;
7024}
7025_ACEOF
7026rm -f conftest.$ac_objext
7027if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7028 (eval $ac_compile) 2>&5
7029 ac_status=$?
7030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7031 (exit $ac_status); } &&
7032 { ac_try='test -s conftest.$ac_objext'
7033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7034 (eval $ac_try) 2>&5
7035 ac_status=$?
7036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7037 (exit $ac_status); }; }; then
7038 ac_hi=-1 ac_mid=-1
7039 while :; do
7040 cat >conftest.$ac_ext <<_ACEOF
7041#line $LINENO "configure"
7042#include "confdefs.h"
7043$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007044#ifdef F77_DUMMY_MAIN
7045# ifdef __cplusplus
7046 extern "C"
7047# endif
7048 int F77_DUMMY_MAIN() { return 1; }
7049#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007050int
7051main ()
7052{
7053static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
7054test_array [0] = 0
7055
7056 ;
7057 return 0;
7058}
7059_ACEOF
7060rm -f conftest.$ac_objext
7061if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7062 (eval $ac_compile) 2>&5
7063 ac_status=$?
7064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7065 (exit $ac_status); } &&
7066 { ac_try='test -s conftest.$ac_objext'
7067 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7068 (eval $ac_try) 2>&5
7069 ac_status=$?
7070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7071 (exit $ac_status); }; }; then
7072 ac_lo=$ac_mid; break
7073else
7074 echo "$as_me: failed program was:" >&5
7075cat conftest.$ac_ext >&5
7076ac_hi=`expr '(' $ac_mid ')' - 1`
7077 if test $ac_mid -le $ac_hi; then
7078 ac_lo= ac_hi=
7079 break
7080 fi
7081 ac_mid=`expr 2 '*' $ac_mid`
7082fi
7083rm -f conftest.$ac_objext conftest.$ac_ext
7084 done
7085else
7086 echo "$as_me: failed program was:" >&5
7087cat conftest.$ac_ext >&5
7088ac_lo= ac_hi=
7089fi
7090rm -f conftest.$ac_objext conftest.$ac_ext
7091fi
7092rm -f conftest.$ac_objext conftest.$ac_ext
7093# Binary search between lo and hi bounds.
7094while test "x$ac_lo" != "x$ac_hi"; do
7095 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7096 cat >conftest.$ac_ext <<_ACEOF
7097#line $LINENO "configure"
7098#include "confdefs.h"
7099$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007100#ifdef F77_DUMMY_MAIN
7101# ifdef __cplusplus
7102 extern "C"
7103# endif
7104 int F77_DUMMY_MAIN() { return 1; }
7105#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007106int
7107main ()
7108{
7109static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7110test_array [0] = 0
7111
7112 ;
7113 return 0;
7114}
7115_ACEOF
7116rm -f conftest.$ac_objext
7117if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7118 (eval $ac_compile) 2>&5
7119 ac_status=$?
7120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7121 (exit $ac_status); } &&
7122 { ac_try='test -s conftest.$ac_objext'
7123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7124 (eval $ac_try) 2>&5
7125 ac_status=$?
7126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7127 (exit $ac_status); }; }; then
7128 ac_hi=$ac_mid
7129else
7130 echo "$as_me: failed program was:" >&5
7131cat conftest.$ac_ext >&5
7132ac_lo=`expr '(' $ac_mid ')' + 1`
7133fi
7134rm -f conftest.$ac_objext conftest.$ac_ext
7135done
7136case $ac_lo in
7137?*) ac_cv_sizeof_short=$ac_lo;;
7138'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
7139echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
7140 { (exit 1); exit 1; }; } ;;
7141esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007142else
7143 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007144 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7145echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7146 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007147else
Martin v. Löwis11437992002-04-12 09:54:03 +00007148 cat >conftest.$ac_ext <<_ACEOF
7149#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007150#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007151$ac_includes_default
7152long longval () { return (long) (sizeof (short)); }
7153unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007154#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007155#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00007156#ifdef F77_DUMMY_MAIN
7157# ifdef __cplusplus
7158 extern "C"
7159# endif
7160 int F77_DUMMY_MAIN() { return 1; }
7161#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007162int
7163main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007164{
Martin v. Löwis11437992002-04-12 09:54:03 +00007165
7166 FILE *f = fopen ("conftest.val", "w");
7167 if (! f)
7168 exit (1);
7169 if (((long) (sizeof (short))) < 0)
7170 {
7171 long i = longval ();
7172 if (i != ((long) (sizeof (short))))
7173 exit (1);
7174 fprintf (f, "%ld\n", i);
7175 }
7176 else
7177 {
7178 unsigned long i = ulongval ();
7179 if (i != ((long) (sizeof (short))))
7180 exit (1);
7181 fprintf (f, "%lu\n", i);
7182 }
7183 exit (ferror (f) || fclose (f) != 0);
7184
7185 ;
7186 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007187}
Martin v. Löwis11437992002-04-12 09:54:03 +00007188_ACEOF
7189rm -f conftest$ac_exeext
7190if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7191 (eval $ac_link) 2>&5
7192 ac_status=$?
7193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7194 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7195 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7196 (eval $ac_try) 2>&5
7197 ac_status=$?
7198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7199 (exit $ac_status); }; }; then
7200 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007201else
Martin v. Löwis11437992002-04-12 09:54:03 +00007202 echo "$as_me: program exited with status $ac_status" >&5
7203echo "$as_me: failed program was:" >&5
7204cat conftest.$ac_ext >&5
7205( exit $ac_status )
7206{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
7207echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
7208 { (exit 1); exit 1; }; }
7209fi
Barry Warsawfe33b792003-01-07 22:42:49 +00007210rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007211fi
7212fi
7213rm -f conftest.val
7214else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007215 ac_cv_sizeof_short=0
7216fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007217fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007218echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7219echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7220cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007221#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007222_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007223
7224
Martin v. Löwis11437992002-04-12 09:54:03 +00007225echo "$as_me:$LINENO: checking for float" >&5
7226echo $ECHO_N "checking for float... $ECHO_C" >&6
7227if test "${ac_cv_type_float+set}" = set; then
7228 echo $ECHO_N "(cached) $ECHO_C" >&6
7229else
7230 cat >conftest.$ac_ext <<_ACEOF
7231#line $LINENO "configure"
7232#include "confdefs.h"
7233$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007234#ifdef F77_DUMMY_MAIN
7235# ifdef __cplusplus
7236 extern "C"
7237# endif
7238 int F77_DUMMY_MAIN() { return 1; }
7239#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007240int
7241main ()
7242{
7243if ((float *) 0)
7244 return 0;
7245if (sizeof (float))
7246 return 0;
7247 ;
7248 return 0;
7249}
7250_ACEOF
7251rm -f conftest.$ac_objext
7252if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7253 (eval $ac_compile) 2>&5
7254 ac_status=$?
7255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7256 (exit $ac_status); } &&
7257 { ac_try='test -s conftest.$ac_objext'
7258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7259 (eval $ac_try) 2>&5
7260 ac_status=$?
7261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7262 (exit $ac_status); }; }; then
7263 ac_cv_type_float=yes
7264else
7265 echo "$as_me: failed program was:" >&5
7266cat conftest.$ac_ext >&5
7267ac_cv_type_float=no
7268fi
7269rm -f conftest.$ac_objext conftest.$ac_ext
7270fi
7271echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7272echo "${ECHO_T}$ac_cv_type_float" >&6
7273
7274echo "$as_me:$LINENO: checking size of float" >&5
7275echo $ECHO_N "checking size of float... $ECHO_C" >&6
7276if test "${ac_cv_sizeof_float+set}" = set; then
7277 echo $ECHO_N "(cached) $ECHO_C" >&6
7278else
7279 if test "$ac_cv_type_float" = yes; then
7280 # The cast to unsigned long works around a bug in the HP C Compiler
7281 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7282 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7283 # This bug is HP SR number 8606223364.
7284 if test "$cross_compiling" = yes; then
7285 # Depending upon the size, compute the lo and hi bounds.
7286cat >conftest.$ac_ext <<_ACEOF
7287#line $LINENO "configure"
7288#include "confdefs.h"
7289$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007290#ifdef F77_DUMMY_MAIN
7291# ifdef __cplusplus
7292 extern "C"
7293# endif
7294 int F77_DUMMY_MAIN() { return 1; }
7295#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007296int
7297main ()
7298{
7299static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7300test_array [0] = 0
7301
7302 ;
7303 return 0;
7304}
7305_ACEOF
7306rm -f conftest.$ac_objext
7307if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7308 (eval $ac_compile) 2>&5
7309 ac_status=$?
7310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7311 (exit $ac_status); } &&
7312 { ac_try='test -s conftest.$ac_objext'
7313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7314 (eval $ac_try) 2>&5
7315 ac_status=$?
7316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7317 (exit $ac_status); }; }; then
7318 ac_lo=0 ac_mid=0
7319 while :; do
7320 cat >conftest.$ac_ext <<_ACEOF
7321#line $LINENO "configure"
7322#include "confdefs.h"
7323$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007324#ifdef F77_DUMMY_MAIN
7325# ifdef __cplusplus
7326 extern "C"
7327# endif
7328 int F77_DUMMY_MAIN() { return 1; }
7329#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007330int
7331main ()
7332{
7333static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7334test_array [0] = 0
7335
7336 ;
7337 return 0;
7338}
7339_ACEOF
7340rm -f conftest.$ac_objext
7341if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7342 (eval $ac_compile) 2>&5
7343 ac_status=$?
7344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7345 (exit $ac_status); } &&
7346 { ac_try='test -s conftest.$ac_objext'
7347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7348 (eval $ac_try) 2>&5
7349 ac_status=$?
7350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7351 (exit $ac_status); }; }; then
7352 ac_hi=$ac_mid; break
7353else
7354 echo "$as_me: failed program was:" >&5
7355cat conftest.$ac_ext >&5
7356ac_lo=`expr $ac_mid + 1`
7357 if test $ac_lo -le $ac_mid; then
7358 ac_lo= ac_hi=
7359 break
7360 fi
7361 ac_mid=`expr 2 '*' $ac_mid + 1`
7362fi
7363rm -f conftest.$ac_objext conftest.$ac_ext
7364 done
7365else
7366 echo "$as_me: failed program was:" >&5
7367cat conftest.$ac_ext >&5
7368cat >conftest.$ac_ext <<_ACEOF
7369#line $LINENO "configure"
7370#include "confdefs.h"
7371$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007372#ifdef F77_DUMMY_MAIN
7373# ifdef __cplusplus
7374 extern "C"
7375# endif
7376 int F77_DUMMY_MAIN() { return 1; }
7377#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007378int
7379main ()
7380{
7381static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7382test_array [0] = 0
7383
7384 ;
7385 return 0;
7386}
7387_ACEOF
7388rm -f conftest.$ac_objext
7389if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7390 (eval $ac_compile) 2>&5
7391 ac_status=$?
7392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7393 (exit $ac_status); } &&
7394 { ac_try='test -s conftest.$ac_objext'
7395 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7396 (eval $ac_try) 2>&5
7397 ac_status=$?
7398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7399 (exit $ac_status); }; }; then
7400 ac_hi=-1 ac_mid=-1
7401 while :; do
7402 cat >conftest.$ac_ext <<_ACEOF
7403#line $LINENO "configure"
7404#include "confdefs.h"
7405$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007406#ifdef F77_DUMMY_MAIN
7407# ifdef __cplusplus
7408 extern "C"
7409# endif
7410 int F77_DUMMY_MAIN() { return 1; }
7411#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007412int
7413main ()
7414{
7415static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7416test_array [0] = 0
7417
7418 ;
7419 return 0;
7420}
7421_ACEOF
7422rm -f conftest.$ac_objext
7423if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7424 (eval $ac_compile) 2>&5
7425 ac_status=$?
7426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7427 (exit $ac_status); } &&
7428 { ac_try='test -s conftest.$ac_objext'
7429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7430 (eval $ac_try) 2>&5
7431 ac_status=$?
7432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7433 (exit $ac_status); }; }; then
7434 ac_lo=$ac_mid; break
7435else
7436 echo "$as_me: failed program was:" >&5
7437cat conftest.$ac_ext >&5
7438ac_hi=`expr '(' $ac_mid ')' - 1`
7439 if test $ac_mid -le $ac_hi; then
7440 ac_lo= ac_hi=
7441 break
7442 fi
7443 ac_mid=`expr 2 '*' $ac_mid`
7444fi
7445rm -f conftest.$ac_objext conftest.$ac_ext
7446 done
7447else
7448 echo "$as_me: failed program was:" >&5
7449cat conftest.$ac_ext >&5
7450ac_lo= ac_hi=
7451fi
7452rm -f conftest.$ac_objext conftest.$ac_ext
7453fi
7454rm -f conftest.$ac_objext conftest.$ac_ext
7455# Binary search between lo and hi bounds.
7456while test "x$ac_lo" != "x$ac_hi"; do
7457 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7458 cat >conftest.$ac_ext <<_ACEOF
7459#line $LINENO "configure"
7460#include "confdefs.h"
7461$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007462#ifdef F77_DUMMY_MAIN
7463# ifdef __cplusplus
7464 extern "C"
7465# endif
7466 int F77_DUMMY_MAIN() { return 1; }
7467#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007468int
7469main ()
7470{
7471static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7472test_array [0] = 0
7473
7474 ;
7475 return 0;
7476}
7477_ACEOF
7478rm -f conftest.$ac_objext
7479if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7480 (eval $ac_compile) 2>&5
7481 ac_status=$?
7482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7483 (exit $ac_status); } &&
7484 { ac_try='test -s conftest.$ac_objext'
7485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7486 (eval $ac_try) 2>&5
7487 ac_status=$?
7488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7489 (exit $ac_status); }; }; then
7490 ac_hi=$ac_mid
7491else
7492 echo "$as_me: failed program was:" >&5
7493cat conftest.$ac_ext >&5
7494ac_lo=`expr '(' $ac_mid ')' + 1`
7495fi
7496rm -f conftest.$ac_objext conftest.$ac_ext
7497done
7498case $ac_lo in
7499?*) ac_cv_sizeof_float=$ac_lo;;
7500'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7501echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7502 { (exit 1); exit 1; }; } ;;
7503esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007504else
7505 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007506 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7507echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7508 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007509else
Martin v. Löwis11437992002-04-12 09:54:03 +00007510 cat >conftest.$ac_ext <<_ACEOF
7511#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007512#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007513$ac_includes_default
7514long longval () { return (long) (sizeof (float)); }
7515unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007516#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007517#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00007518#ifdef F77_DUMMY_MAIN
7519# ifdef __cplusplus
7520 extern "C"
7521# endif
7522 int F77_DUMMY_MAIN() { return 1; }
7523#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007524int
7525main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007526{
Martin v. Löwis11437992002-04-12 09:54:03 +00007527
7528 FILE *f = fopen ("conftest.val", "w");
7529 if (! f)
7530 exit (1);
7531 if (((long) (sizeof (float))) < 0)
7532 {
7533 long i = longval ();
7534 if (i != ((long) (sizeof (float))))
7535 exit (1);
7536 fprintf (f, "%ld\n", i);
7537 }
7538 else
7539 {
7540 unsigned long i = ulongval ();
7541 if (i != ((long) (sizeof (float))))
7542 exit (1);
7543 fprintf (f, "%lu\n", i);
7544 }
7545 exit (ferror (f) || fclose (f) != 0);
7546
7547 ;
7548 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007549}
Martin v. Löwis11437992002-04-12 09:54:03 +00007550_ACEOF
7551rm -f conftest$ac_exeext
7552if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7553 (eval $ac_link) 2>&5
7554 ac_status=$?
7555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7556 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7558 (eval $ac_try) 2>&5
7559 ac_status=$?
7560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7561 (exit $ac_status); }; }; then
7562 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007563else
Martin v. Löwis11437992002-04-12 09:54:03 +00007564 echo "$as_me: program exited with status $ac_status" >&5
7565echo "$as_me: failed program was:" >&5
7566cat conftest.$ac_ext >&5
7567( exit $ac_status )
7568{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7569echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7570 { (exit 1); exit 1; }; }
7571fi
Barry Warsawfe33b792003-01-07 22:42:49 +00007572rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007573fi
7574fi
7575rm -f conftest.val
7576else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007577 ac_cv_sizeof_float=0
7578fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007579fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007580echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7581echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7582cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007583#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007584_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007585
7586
Martin v. Löwis11437992002-04-12 09:54:03 +00007587echo "$as_me:$LINENO: checking for double" >&5
7588echo $ECHO_N "checking for double... $ECHO_C" >&6
7589if test "${ac_cv_type_double+set}" = set; then
7590 echo $ECHO_N "(cached) $ECHO_C" >&6
7591else
7592 cat >conftest.$ac_ext <<_ACEOF
7593#line $LINENO "configure"
7594#include "confdefs.h"
7595$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007596#ifdef F77_DUMMY_MAIN
7597# ifdef __cplusplus
7598 extern "C"
7599# endif
7600 int F77_DUMMY_MAIN() { return 1; }
7601#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007602int
7603main ()
7604{
7605if ((double *) 0)
7606 return 0;
7607if (sizeof (double))
7608 return 0;
7609 ;
7610 return 0;
7611}
7612_ACEOF
7613rm -f conftest.$ac_objext
7614if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7615 (eval $ac_compile) 2>&5
7616 ac_status=$?
7617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7618 (exit $ac_status); } &&
7619 { ac_try='test -s conftest.$ac_objext'
7620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7621 (eval $ac_try) 2>&5
7622 ac_status=$?
7623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7624 (exit $ac_status); }; }; then
7625 ac_cv_type_double=yes
7626else
7627 echo "$as_me: failed program was:" >&5
7628cat conftest.$ac_ext >&5
7629ac_cv_type_double=no
7630fi
7631rm -f conftest.$ac_objext conftest.$ac_ext
7632fi
7633echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7634echo "${ECHO_T}$ac_cv_type_double" >&6
7635
7636echo "$as_me:$LINENO: checking size of double" >&5
7637echo $ECHO_N "checking size of double... $ECHO_C" >&6
7638if test "${ac_cv_sizeof_double+set}" = set; then
7639 echo $ECHO_N "(cached) $ECHO_C" >&6
7640else
7641 if test "$ac_cv_type_double" = yes; then
7642 # The cast to unsigned long works around a bug in the HP C Compiler
7643 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7644 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7645 # This bug is HP SR number 8606223364.
7646 if test "$cross_compiling" = yes; then
7647 # Depending upon the size, compute the lo and hi bounds.
7648cat >conftest.$ac_ext <<_ACEOF
7649#line $LINENO "configure"
7650#include "confdefs.h"
7651$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007652#ifdef F77_DUMMY_MAIN
7653# ifdef __cplusplus
7654 extern "C"
7655# endif
7656 int F77_DUMMY_MAIN() { return 1; }
7657#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007658int
7659main ()
7660{
7661static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7662test_array [0] = 0
7663
7664 ;
7665 return 0;
7666}
7667_ACEOF
7668rm -f conftest.$ac_objext
7669if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7670 (eval $ac_compile) 2>&5
7671 ac_status=$?
7672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7673 (exit $ac_status); } &&
7674 { ac_try='test -s conftest.$ac_objext'
7675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7676 (eval $ac_try) 2>&5
7677 ac_status=$?
7678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7679 (exit $ac_status); }; }; then
7680 ac_lo=0 ac_mid=0
7681 while :; do
7682 cat >conftest.$ac_ext <<_ACEOF
7683#line $LINENO "configure"
7684#include "confdefs.h"
7685$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007686#ifdef F77_DUMMY_MAIN
7687# ifdef __cplusplus
7688 extern "C"
7689# endif
7690 int F77_DUMMY_MAIN() { return 1; }
7691#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007692int
7693main ()
7694{
7695static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7696test_array [0] = 0
7697
7698 ;
7699 return 0;
7700}
7701_ACEOF
7702rm -f conftest.$ac_objext
7703if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7704 (eval $ac_compile) 2>&5
7705 ac_status=$?
7706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7707 (exit $ac_status); } &&
7708 { ac_try='test -s conftest.$ac_objext'
7709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7710 (eval $ac_try) 2>&5
7711 ac_status=$?
7712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7713 (exit $ac_status); }; }; then
7714 ac_hi=$ac_mid; break
7715else
7716 echo "$as_me: failed program was:" >&5
7717cat conftest.$ac_ext >&5
7718ac_lo=`expr $ac_mid + 1`
7719 if test $ac_lo -le $ac_mid; then
7720 ac_lo= ac_hi=
7721 break
7722 fi
7723 ac_mid=`expr 2 '*' $ac_mid + 1`
7724fi
7725rm -f conftest.$ac_objext conftest.$ac_ext
7726 done
7727else
7728 echo "$as_me: failed program was:" >&5
7729cat conftest.$ac_ext >&5
7730cat >conftest.$ac_ext <<_ACEOF
7731#line $LINENO "configure"
7732#include "confdefs.h"
7733$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007734#ifdef F77_DUMMY_MAIN
7735# ifdef __cplusplus
7736 extern "C"
7737# endif
7738 int F77_DUMMY_MAIN() { return 1; }
7739#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007740int
7741main ()
7742{
7743static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7744test_array [0] = 0
7745
7746 ;
7747 return 0;
7748}
7749_ACEOF
7750rm -f conftest.$ac_objext
7751if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7752 (eval $ac_compile) 2>&5
7753 ac_status=$?
7754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7755 (exit $ac_status); } &&
7756 { ac_try='test -s conftest.$ac_objext'
7757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7758 (eval $ac_try) 2>&5
7759 ac_status=$?
7760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7761 (exit $ac_status); }; }; then
7762 ac_hi=-1 ac_mid=-1
7763 while :; do
7764 cat >conftest.$ac_ext <<_ACEOF
7765#line $LINENO "configure"
7766#include "confdefs.h"
7767$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007768#ifdef F77_DUMMY_MAIN
7769# ifdef __cplusplus
7770 extern "C"
7771# endif
7772 int F77_DUMMY_MAIN() { return 1; }
7773#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007774int
7775main ()
7776{
7777static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7778test_array [0] = 0
7779
7780 ;
7781 return 0;
7782}
7783_ACEOF
7784rm -f conftest.$ac_objext
7785if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7786 (eval $ac_compile) 2>&5
7787 ac_status=$?
7788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7789 (exit $ac_status); } &&
7790 { ac_try='test -s conftest.$ac_objext'
7791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7792 (eval $ac_try) 2>&5
7793 ac_status=$?
7794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7795 (exit $ac_status); }; }; then
7796 ac_lo=$ac_mid; break
7797else
7798 echo "$as_me: failed program was:" >&5
7799cat conftest.$ac_ext >&5
7800ac_hi=`expr '(' $ac_mid ')' - 1`
7801 if test $ac_mid -le $ac_hi; then
7802 ac_lo= ac_hi=
7803 break
7804 fi
7805 ac_mid=`expr 2 '*' $ac_mid`
7806fi
7807rm -f conftest.$ac_objext conftest.$ac_ext
7808 done
7809else
7810 echo "$as_me: failed program was:" >&5
7811cat conftest.$ac_ext >&5
7812ac_lo= ac_hi=
7813fi
7814rm -f conftest.$ac_objext conftest.$ac_ext
7815fi
7816rm -f conftest.$ac_objext conftest.$ac_ext
7817# Binary search between lo and hi bounds.
7818while test "x$ac_lo" != "x$ac_hi"; do
7819 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7820 cat >conftest.$ac_ext <<_ACEOF
7821#line $LINENO "configure"
7822#include "confdefs.h"
7823$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007824#ifdef F77_DUMMY_MAIN
7825# ifdef __cplusplus
7826 extern "C"
7827# endif
7828 int F77_DUMMY_MAIN() { return 1; }
7829#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007830int
7831main ()
7832{
7833static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7834test_array [0] = 0
7835
7836 ;
7837 return 0;
7838}
7839_ACEOF
7840rm -f conftest.$ac_objext
7841if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7842 (eval $ac_compile) 2>&5
7843 ac_status=$?
7844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7845 (exit $ac_status); } &&
7846 { ac_try='test -s conftest.$ac_objext'
7847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7848 (eval $ac_try) 2>&5
7849 ac_status=$?
7850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7851 (exit $ac_status); }; }; then
7852 ac_hi=$ac_mid
7853else
7854 echo "$as_me: failed program was:" >&5
7855cat conftest.$ac_ext >&5
7856ac_lo=`expr '(' $ac_mid ')' + 1`
7857fi
7858rm -f conftest.$ac_objext conftest.$ac_ext
7859done
7860case $ac_lo in
7861?*) ac_cv_sizeof_double=$ac_lo;;
7862'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7863echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7864 { (exit 1); exit 1; }; } ;;
7865esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007866else
7867 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007868 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7869echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7870 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007871else
Martin v. Löwis11437992002-04-12 09:54:03 +00007872 cat >conftest.$ac_ext <<_ACEOF
7873#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007874#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007875$ac_includes_default
7876long longval () { return (long) (sizeof (double)); }
7877unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007878#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007879#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00007880#ifdef F77_DUMMY_MAIN
7881# ifdef __cplusplus
7882 extern "C"
7883# endif
7884 int F77_DUMMY_MAIN() { return 1; }
7885#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007886int
7887main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007888{
Martin v. Löwis11437992002-04-12 09:54:03 +00007889
7890 FILE *f = fopen ("conftest.val", "w");
7891 if (! f)
7892 exit (1);
7893 if (((long) (sizeof (double))) < 0)
7894 {
7895 long i = longval ();
7896 if (i != ((long) (sizeof (double))))
7897 exit (1);
7898 fprintf (f, "%ld\n", i);
7899 }
7900 else
7901 {
7902 unsigned long i = ulongval ();
7903 if (i != ((long) (sizeof (double))))
7904 exit (1);
7905 fprintf (f, "%lu\n", i);
7906 }
7907 exit (ferror (f) || fclose (f) != 0);
7908
7909 ;
7910 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007911}
Martin v. Löwis11437992002-04-12 09:54:03 +00007912_ACEOF
7913rm -f conftest$ac_exeext
7914if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7915 (eval $ac_link) 2>&5
7916 ac_status=$?
7917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7918 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7919 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7920 (eval $ac_try) 2>&5
7921 ac_status=$?
7922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7923 (exit $ac_status); }; }; then
7924 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007925else
Martin v. Löwis11437992002-04-12 09:54:03 +00007926 echo "$as_me: program exited with status $ac_status" >&5
7927echo "$as_me: failed program was:" >&5
7928cat conftest.$ac_ext >&5
7929( exit $ac_status )
7930{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7931echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7932 { (exit 1); exit 1; }; }
7933fi
Barry Warsawfe33b792003-01-07 22:42:49 +00007934rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007935fi
7936fi
7937rm -f conftest.val
7938else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007939 ac_cv_sizeof_double=0
7940fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007941fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007942echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7943echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7944cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007945#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007946_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007947
7948
Martin v. Löwis11437992002-04-12 09:54:03 +00007949echo "$as_me:$LINENO: checking for fpos_t" >&5
7950echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7951if test "${ac_cv_type_fpos_t+set}" = set; then
7952 echo $ECHO_N "(cached) $ECHO_C" >&6
7953else
7954 cat >conftest.$ac_ext <<_ACEOF
7955#line $LINENO "configure"
7956#include "confdefs.h"
7957$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007958#ifdef F77_DUMMY_MAIN
7959# ifdef __cplusplus
7960 extern "C"
7961# endif
7962 int F77_DUMMY_MAIN() { return 1; }
7963#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007964int
7965main ()
7966{
7967if ((fpos_t *) 0)
7968 return 0;
7969if (sizeof (fpos_t))
7970 return 0;
7971 ;
7972 return 0;
7973}
7974_ACEOF
7975rm -f conftest.$ac_objext
7976if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7977 (eval $ac_compile) 2>&5
7978 ac_status=$?
7979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7980 (exit $ac_status); } &&
7981 { ac_try='test -s conftest.$ac_objext'
7982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7983 (eval $ac_try) 2>&5
7984 ac_status=$?
7985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7986 (exit $ac_status); }; }; then
7987 ac_cv_type_fpos_t=yes
7988else
7989 echo "$as_me: failed program was:" >&5
7990cat conftest.$ac_ext >&5
7991ac_cv_type_fpos_t=no
7992fi
7993rm -f conftest.$ac_objext conftest.$ac_ext
7994fi
7995echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7996echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7997
7998echo "$as_me:$LINENO: checking size of fpos_t" >&5
7999echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
8000if test "${ac_cv_sizeof_fpos_t+set}" = set; then
8001 echo $ECHO_N "(cached) $ECHO_C" >&6
8002else
8003 if test "$ac_cv_type_fpos_t" = yes; then
8004 # The cast to unsigned long works around a bug in the HP C Compiler
8005 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8006 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8007 # This bug is HP SR number 8606223364.
8008 if test "$cross_compiling" = yes; then
8009 # Depending upon the size, compute the lo and hi bounds.
8010cat >conftest.$ac_ext <<_ACEOF
8011#line $LINENO "configure"
8012#include "confdefs.h"
8013$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008014#ifdef F77_DUMMY_MAIN
8015# ifdef __cplusplus
8016 extern "C"
8017# endif
8018 int F77_DUMMY_MAIN() { return 1; }
8019#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008020int
8021main ()
8022{
8023static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
8024test_array [0] = 0
8025
8026 ;
8027 return 0;
8028}
8029_ACEOF
8030rm -f conftest.$ac_objext
8031if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8032 (eval $ac_compile) 2>&5
8033 ac_status=$?
8034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8035 (exit $ac_status); } &&
8036 { ac_try='test -s conftest.$ac_objext'
8037 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8038 (eval $ac_try) 2>&5
8039 ac_status=$?
8040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8041 (exit $ac_status); }; }; then
8042 ac_lo=0 ac_mid=0
8043 while :; do
8044 cat >conftest.$ac_ext <<_ACEOF
8045#line $LINENO "configure"
8046#include "confdefs.h"
8047$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008048#ifdef F77_DUMMY_MAIN
8049# ifdef __cplusplus
8050 extern "C"
8051# endif
8052 int F77_DUMMY_MAIN() { return 1; }
8053#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008054int
8055main ()
8056{
8057static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8058test_array [0] = 0
8059
8060 ;
8061 return 0;
8062}
8063_ACEOF
8064rm -f conftest.$ac_objext
8065if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8066 (eval $ac_compile) 2>&5
8067 ac_status=$?
8068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8069 (exit $ac_status); } &&
8070 { ac_try='test -s conftest.$ac_objext'
8071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8072 (eval $ac_try) 2>&5
8073 ac_status=$?
8074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8075 (exit $ac_status); }; }; then
8076 ac_hi=$ac_mid; break
8077else
8078 echo "$as_me: failed program was:" >&5
8079cat conftest.$ac_ext >&5
8080ac_lo=`expr $ac_mid + 1`
8081 if test $ac_lo -le $ac_mid; then
8082 ac_lo= ac_hi=
8083 break
8084 fi
8085 ac_mid=`expr 2 '*' $ac_mid + 1`
8086fi
8087rm -f conftest.$ac_objext conftest.$ac_ext
8088 done
8089else
8090 echo "$as_me: failed program was:" >&5
8091cat conftest.$ac_ext >&5
8092cat >conftest.$ac_ext <<_ACEOF
8093#line $LINENO "configure"
8094#include "confdefs.h"
8095$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008096#ifdef F77_DUMMY_MAIN
8097# ifdef __cplusplus
8098 extern "C"
8099# endif
8100 int F77_DUMMY_MAIN() { return 1; }
8101#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008102int
8103main ()
8104{
8105static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
8106test_array [0] = 0
8107
8108 ;
8109 return 0;
8110}
8111_ACEOF
8112rm -f conftest.$ac_objext
8113if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8114 (eval $ac_compile) 2>&5
8115 ac_status=$?
8116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8117 (exit $ac_status); } &&
8118 { ac_try='test -s conftest.$ac_objext'
8119 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8120 (eval $ac_try) 2>&5
8121 ac_status=$?
8122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8123 (exit $ac_status); }; }; then
8124 ac_hi=-1 ac_mid=-1
8125 while :; do
8126 cat >conftest.$ac_ext <<_ACEOF
8127#line $LINENO "configure"
8128#include "confdefs.h"
8129$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008130#ifdef F77_DUMMY_MAIN
8131# ifdef __cplusplus
8132 extern "C"
8133# endif
8134 int F77_DUMMY_MAIN() { return 1; }
8135#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008136int
8137main ()
8138{
8139static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8140test_array [0] = 0
8141
8142 ;
8143 return 0;
8144}
8145_ACEOF
8146rm -f conftest.$ac_objext
8147if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8148 (eval $ac_compile) 2>&5
8149 ac_status=$?
8150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8151 (exit $ac_status); } &&
8152 { ac_try='test -s conftest.$ac_objext'
8153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8154 (eval $ac_try) 2>&5
8155 ac_status=$?
8156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8157 (exit $ac_status); }; }; then
8158 ac_lo=$ac_mid; break
8159else
8160 echo "$as_me: failed program was:" >&5
8161cat conftest.$ac_ext >&5
8162ac_hi=`expr '(' $ac_mid ')' - 1`
8163 if test $ac_mid -le $ac_hi; then
8164 ac_lo= ac_hi=
8165 break
8166 fi
8167 ac_mid=`expr 2 '*' $ac_mid`
8168fi
8169rm -f conftest.$ac_objext conftest.$ac_ext
8170 done
8171else
8172 echo "$as_me: failed program was:" >&5
8173cat conftest.$ac_ext >&5
8174ac_lo= ac_hi=
8175fi
8176rm -f conftest.$ac_objext conftest.$ac_ext
8177fi
8178rm -f conftest.$ac_objext conftest.$ac_ext
8179# Binary search between lo and hi bounds.
8180while test "x$ac_lo" != "x$ac_hi"; do
8181 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8182 cat >conftest.$ac_ext <<_ACEOF
8183#line $LINENO "configure"
8184#include "confdefs.h"
8185$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008186#ifdef F77_DUMMY_MAIN
8187# ifdef __cplusplus
8188 extern "C"
8189# endif
8190 int F77_DUMMY_MAIN() { return 1; }
8191#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008192int
8193main ()
8194{
8195static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8196test_array [0] = 0
8197
8198 ;
8199 return 0;
8200}
8201_ACEOF
8202rm -f conftest.$ac_objext
8203if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8204 (eval $ac_compile) 2>&5
8205 ac_status=$?
8206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8207 (exit $ac_status); } &&
8208 { ac_try='test -s conftest.$ac_objext'
8209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8210 (eval $ac_try) 2>&5
8211 ac_status=$?
8212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8213 (exit $ac_status); }; }; then
8214 ac_hi=$ac_mid
8215else
8216 echo "$as_me: failed program was:" >&5
8217cat conftest.$ac_ext >&5
8218ac_lo=`expr '(' $ac_mid ')' + 1`
8219fi
8220rm -f conftest.$ac_objext conftest.$ac_ext
8221done
8222case $ac_lo in
8223?*) ac_cv_sizeof_fpos_t=$ac_lo;;
8224'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8225echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
8226 { (exit 1); exit 1; }; } ;;
8227esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008228else
8229 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008230 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8231echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8232 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008233else
Martin v. Löwis11437992002-04-12 09:54:03 +00008234 cat >conftest.$ac_ext <<_ACEOF
8235#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008236#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008237$ac_includes_default
8238long longval () { return (long) (sizeof (fpos_t)); }
8239unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008240#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008241#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00008242#ifdef F77_DUMMY_MAIN
8243# ifdef __cplusplus
8244 extern "C"
8245# endif
8246 int F77_DUMMY_MAIN() { return 1; }
8247#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008248int
8249main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008250{
Martin v. Löwis11437992002-04-12 09:54:03 +00008251
8252 FILE *f = fopen ("conftest.val", "w");
8253 if (! f)
8254 exit (1);
8255 if (((long) (sizeof (fpos_t))) < 0)
8256 {
8257 long i = longval ();
8258 if (i != ((long) (sizeof (fpos_t))))
8259 exit (1);
8260 fprintf (f, "%ld\n", i);
8261 }
8262 else
8263 {
8264 unsigned long i = ulongval ();
8265 if (i != ((long) (sizeof (fpos_t))))
8266 exit (1);
8267 fprintf (f, "%lu\n", i);
8268 }
8269 exit (ferror (f) || fclose (f) != 0);
8270
8271 ;
8272 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008273}
Martin v. Löwis11437992002-04-12 09:54:03 +00008274_ACEOF
8275rm -f conftest$ac_exeext
8276if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8277 (eval $ac_link) 2>&5
8278 ac_status=$?
8279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8280 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8282 (eval $ac_try) 2>&5
8283 ac_status=$?
8284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8285 (exit $ac_status); }; }; then
8286 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008287else
Martin v. Löwis11437992002-04-12 09:54:03 +00008288 echo "$as_me: program exited with status $ac_status" >&5
8289echo "$as_me: failed program was:" >&5
8290cat conftest.$ac_ext >&5
8291( exit $ac_status )
8292{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8293echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
8294 { (exit 1); exit 1; }; }
8295fi
Barry Warsawfe33b792003-01-07 22:42:49 +00008296rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008297fi
8298fi
8299rm -f conftest.val
8300else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008301 ac_cv_sizeof_fpos_t=0
8302fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008303fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008304echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8305echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8306cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008307#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008308_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008309
Michael W. Hudson54241132001-12-07 15:38:26 +00008310
8311
Martin v. Löwis11437992002-04-12 09:54:03 +00008312echo "$as_me:$LINENO: checking for long long support" >&5
8313echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008314have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008315cat >conftest.$ac_ext <<_ACEOF
8316#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008317#include "confdefs.h"
8318
Barry Warsawfe33b792003-01-07 22:42:49 +00008319#ifdef F77_DUMMY_MAIN
8320# ifdef __cplusplus
8321 extern "C"
8322# endif
8323 int F77_DUMMY_MAIN() { return 1; }
8324#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008325int
8326main ()
8327{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008328long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008329 ;
8330 return 0;
8331}
8332_ACEOF
8333rm -f conftest.$ac_objext
8334if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8335 (eval $ac_compile) 2>&5
8336 ac_status=$?
8337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8338 (exit $ac_status); } &&
8339 { ac_try='test -s conftest.$ac_objext'
8340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8341 (eval $ac_try) 2>&5
8342 ac_status=$?
8343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8344 (exit $ac_status); }; }; then
8345
8346
8347cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008348#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008349_ACEOF
8350
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008351 have_long_long=yes
8352
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008353else
Martin v. Löwis11437992002-04-12 09:54:03 +00008354 echo "$as_me: failed program was:" >&5
8355cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008356fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008357rm -f conftest.$ac_objext conftest.$ac_ext
8358echo "$as_me:$LINENO: result: $have_long_long" >&5
8359echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008360if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008361echo "$as_me:$LINENO: checking for long long" >&5
8362echo $ECHO_N "checking for long long... $ECHO_C" >&6
8363if test "${ac_cv_type_long_long+set}" = set; then
8364 echo $ECHO_N "(cached) $ECHO_C" >&6
8365else
8366 cat >conftest.$ac_ext <<_ACEOF
8367#line $LINENO "configure"
8368#include "confdefs.h"
8369$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008370#ifdef F77_DUMMY_MAIN
8371# ifdef __cplusplus
8372 extern "C"
8373# endif
8374 int F77_DUMMY_MAIN() { return 1; }
8375#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008376int
8377main ()
8378{
8379if ((long long *) 0)
8380 return 0;
8381if (sizeof (long long))
8382 return 0;
8383 ;
8384 return 0;
8385}
8386_ACEOF
8387rm -f conftest.$ac_objext
8388if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8389 (eval $ac_compile) 2>&5
8390 ac_status=$?
8391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8392 (exit $ac_status); } &&
8393 { ac_try='test -s conftest.$ac_objext'
8394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8395 (eval $ac_try) 2>&5
8396 ac_status=$?
8397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8398 (exit $ac_status); }; }; then
8399 ac_cv_type_long_long=yes
8400else
8401 echo "$as_me: failed program was:" >&5
8402cat conftest.$ac_ext >&5
8403ac_cv_type_long_long=no
8404fi
8405rm -f conftest.$ac_objext conftest.$ac_ext
8406fi
8407echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8408echo "${ECHO_T}$ac_cv_type_long_long" >&6
8409
8410echo "$as_me:$LINENO: checking size of long long" >&5
8411echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8412if test "${ac_cv_sizeof_long_long+set}" = set; then
8413 echo $ECHO_N "(cached) $ECHO_C" >&6
8414else
8415 if test "$ac_cv_type_long_long" = yes; then
8416 # The cast to unsigned long works around a bug in the HP C Compiler
8417 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8418 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8419 # This bug is HP SR number 8606223364.
8420 if test "$cross_compiling" = yes; then
8421 # Depending upon the size, compute the lo and hi bounds.
8422cat >conftest.$ac_ext <<_ACEOF
8423#line $LINENO "configure"
8424#include "confdefs.h"
8425$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008426#ifdef F77_DUMMY_MAIN
8427# ifdef __cplusplus
8428 extern "C"
8429# endif
8430 int F77_DUMMY_MAIN() { return 1; }
8431#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008432int
8433main ()
8434{
8435static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8436test_array [0] = 0
8437
8438 ;
8439 return 0;
8440}
8441_ACEOF
8442rm -f conftest.$ac_objext
8443if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8444 (eval $ac_compile) 2>&5
8445 ac_status=$?
8446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8447 (exit $ac_status); } &&
8448 { ac_try='test -s conftest.$ac_objext'
8449 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8450 (eval $ac_try) 2>&5
8451 ac_status=$?
8452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8453 (exit $ac_status); }; }; then
8454 ac_lo=0 ac_mid=0
8455 while :; do
8456 cat >conftest.$ac_ext <<_ACEOF
8457#line $LINENO "configure"
8458#include "confdefs.h"
8459$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008460#ifdef F77_DUMMY_MAIN
8461# ifdef __cplusplus
8462 extern "C"
8463# endif
8464 int F77_DUMMY_MAIN() { return 1; }
8465#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008466int
8467main ()
8468{
8469static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8470test_array [0] = 0
8471
8472 ;
8473 return 0;
8474}
8475_ACEOF
8476rm -f conftest.$ac_objext
8477if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8478 (eval $ac_compile) 2>&5
8479 ac_status=$?
8480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8481 (exit $ac_status); } &&
8482 { ac_try='test -s conftest.$ac_objext'
8483 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8484 (eval $ac_try) 2>&5
8485 ac_status=$?
8486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8487 (exit $ac_status); }; }; then
8488 ac_hi=$ac_mid; break
8489else
8490 echo "$as_me: failed program was:" >&5
8491cat conftest.$ac_ext >&5
8492ac_lo=`expr $ac_mid + 1`
8493 if test $ac_lo -le $ac_mid; then
8494 ac_lo= ac_hi=
8495 break
8496 fi
8497 ac_mid=`expr 2 '*' $ac_mid + 1`
8498fi
8499rm -f conftest.$ac_objext conftest.$ac_ext
8500 done
8501else
8502 echo "$as_me: failed program was:" >&5
8503cat conftest.$ac_ext >&5
8504cat >conftest.$ac_ext <<_ACEOF
8505#line $LINENO "configure"
8506#include "confdefs.h"
8507$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008508#ifdef F77_DUMMY_MAIN
8509# ifdef __cplusplus
8510 extern "C"
8511# endif
8512 int F77_DUMMY_MAIN() { return 1; }
8513#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008514int
8515main ()
8516{
8517static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8518test_array [0] = 0
8519
8520 ;
8521 return 0;
8522}
8523_ACEOF
8524rm -f conftest.$ac_objext
8525if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8526 (eval $ac_compile) 2>&5
8527 ac_status=$?
8528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8529 (exit $ac_status); } &&
8530 { ac_try='test -s conftest.$ac_objext'
8531 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8532 (eval $ac_try) 2>&5
8533 ac_status=$?
8534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8535 (exit $ac_status); }; }; then
8536 ac_hi=-1 ac_mid=-1
8537 while :; do
8538 cat >conftest.$ac_ext <<_ACEOF
8539#line $LINENO "configure"
8540#include "confdefs.h"
8541$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008542#ifdef F77_DUMMY_MAIN
8543# ifdef __cplusplus
8544 extern "C"
8545# endif
8546 int F77_DUMMY_MAIN() { return 1; }
8547#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008548int
8549main ()
8550{
8551static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8552test_array [0] = 0
8553
8554 ;
8555 return 0;
8556}
8557_ACEOF
8558rm -f conftest.$ac_objext
8559if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8560 (eval $ac_compile) 2>&5
8561 ac_status=$?
8562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8563 (exit $ac_status); } &&
8564 { ac_try='test -s conftest.$ac_objext'
8565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8566 (eval $ac_try) 2>&5
8567 ac_status=$?
8568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8569 (exit $ac_status); }; }; then
8570 ac_lo=$ac_mid; break
8571else
8572 echo "$as_me: failed program was:" >&5
8573cat conftest.$ac_ext >&5
8574ac_hi=`expr '(' $ac_mid ')' - 1`
8575 if test $ac_mid -le $ac_hi; then
8576 ac_lo= ac_hi=
8577 break
8578 fi
8579 ac_mid=`expr 2 '*' $ac_mid`
8580fi
8581rm -f conftest.$ac_objext conftest.$ac_ext
8582 done
8583else
8584 echo "$as_me: failed program was:" >&5
8585cat conftest.$ac_ext >&5
8586ac_lo= ac_hi=
8587fi
8588rm -f conftest.$ac_objext conftest.$ac_ext
8589fi
8590rm -f conftest.$ac_objext conftest.$ac_ext
8591# Binary search between lo and hi bounds.
8592while test "x$ac_lo" != "x$ac_hi"; do
8593 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8594 cat >conftest.$ac_ext <<_ACEOF
8595#line $LINENO "configure"
8596#include "confdefs.h"
8597$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008598#ifdef F77_DUMMY_MAIN
8599# ifdef __cplusplus
8600 extern "C"
8601# endif
8602 int F77_DUMMY_MAIN() { return 1; }
8603#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008604int
8605main ()
8606{
8607static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8608test_array [0] = 0
8609
8610 ;
8611 return 0;
8612}
8613_ACEOF
8614rm -f conftest.$ac_objext
8615if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8616 (eval $ac_compile) 2>&5
8617 ac_status=$?
8618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8619 (exit $ac_status); } &&
8620 { ac_try='test -s conftest.$ac_objext'
8621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8622 (eval $ac_try) 2>&5
8623 ac_status=$?
8624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8625 (exit $ac_status); }; }; then
8626 ac_hi=$ac_mid
8627else
8628 echo "$as_me: failed program was:" >&5
8629cat conftest.$ac_ext >&5
8630ac_lo=`expr '(' $ac_mid ')' + 1`
8631fi
8632rm -f conftest.$ac_objext conftest.$ac_ext
8633done
8634case $ac_lo in
8635?*) ac_cv_sizeof_long_long=$ac_lo;;
8636'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8637echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8638 { (exit 1); exit 1; }; } ;;
8639esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008640else
8641 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008642 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8643echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8644 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008645else
Martin v. Löwis11437992002-04-12 09:54:03 +00008646 cat >conftest.$ac_ext <<_ACEOF
8647#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008648#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008649$ac_includes_default
8650long longval () { return (long) (sizeof (long long)); }
8651unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008652#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008653#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00008654#ifdef F77_DUMMY_MAIN
8655# ifdef __cplusplus
8656 extern "C"
8657# endif
8658 int F77_DUMMY_MAIN() { return 1; }
8659#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008660int
8661main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008662{
Martin v. Löwis11437992002-04-12 09:54:03 +00008663
8664 FILE *f = fopen ("conftest.val", "w");
8665 if (! f)
8666 exit (1);
8667 if (((long) (sizeof (long long))) < 0)
8668 {
8669 long i = longval ();
8670 if (i != ((long) (sizeof (long long))))
8671 exit (1);
8672 fprintf (f, "%ld\n", i);
8673 }
8674 else
8675 {
8676 unsigned long i = ulongval ();
8677 if (i != ((long) (sizeof (long long))))
8678 exit (1);
8679 fprintf (f, "%lu\n", i);
8680 }
8681 exit (ferror (f) || fclose (f) != 0);
8682
8683 ;
8684 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008685}
Martin v. Löwis11437992002-04-12 09:54:03 +00008686_ACEOF
8687rm -f conftest$ac_exeext
8688if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8689 (eval $ac_link) 2>&5
8690 ac_status=$?
8691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8692 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8694 (eval $ac_try) 2>&5
8695 ac_status=$?
8696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8697 (exit $ac_status); }; }; then
8698 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008699else
Martin v. Löwis11437992002-04-12 09:54:03 +00008700 echo "$as_me: program exited with status $ac_status" >&5
8701echo "$as_me: failed program was:" >&5
8702cat conftest.$ac_ext >&5
8703( exit $ac_status )
8704{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8705echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8706 { (exit 1); exit 1; }; }
8707fi
Barry Warsawfe33b792003-01-07 22:42:49 +00008708rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008709fi
8710fi
8711rm -f conftest.val
8712else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008713 ac_cv_sizeof_long_long=0
8714fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008715fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008716echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8717echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8718cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008719#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008720_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008721
Michael W. Hudson54241132001-12-07 15:38:26 +00008722
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008723fi
8724
Martin v. Löwis11437992002-04-12 09:54:03 +00008725echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8726echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008727have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008728cat >conftest.$ac_ext <<_ACEOF
8729#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008730#include "confdefs.h"
8731
Barry Warsawfe33b792003-01-07 22:42:49 +00008732#ifdef F77_DUMMY_MAIN
8733# ifdef __cplusplus
8734 extern "C"
8735# endif
8736 int F77_DUMMY_MAIN() { return 1; }
8737#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008738int
8739main ()
8740{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008741uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008742 ;
8743 return 0;
8744}
8745_ACEOF
8746rm -f conftest.$ac_objext
8747if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8748 (eval $ac_compile) 2>&5
8749 ac_status=$?
8750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8751 (exit $ac_status); } &&
8752 { ac_try='test -s conftest.$ac_objext'
8753 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8754 (eval $ac_try) 2>&5
8755 ac_status=$?
8756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8757 (exit $ac_status); }; }; then
8758
8759
8760cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008761#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008762_ACEOF
8763
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008764 have_uintptr_t=yes
8765
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008766else
Martin v. Löwis11437992002-04-12 09:54:03 +00008767 echo "$as_me: failed program was:" >&5
8768cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008769fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008770rm -f conftest.$ac_objext conftest.$ac_ext
8771echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8772echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008773if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008774echo "$as_me:$LINENO: checking for uintptr_t" >&5
8775echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8776if test "${ac_cv_type_uintptr_t+set}" = set; then
8777 echo $ECHO_N "(cached) $ECHO_C" >&6
8778else
8779 cat >conftest.$ac_ext <<_ACEOF
8780#line $LINENO "configure"
8781#include "confdefs.h"
8782$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008783#ifdef F77_DUMMY_MAIN
8784# ifdef __cplusplus
8785 extern "C"
8786# endif
8787 int F77_DUMMY_MAIN() { return 1; }
8788#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008789int
8790main ()
8791{
8792if ((uintptr_t *) 0)
8793 return 0;
8794if (sizeof (uintptr_t))
8795 return 0;
8796 ;
8797 return 0;
8798}
8799_ACEOF
8800rm -f conftest.$ac_objext
8801if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8802 (eval $ac_compile) 2>&5
8803 ac_status=$?
8804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8805 (exit $ac_status); } &&
8806 { ac_try='test -s conftest.$ac_objext'
8807 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8808 (eval $ac_try) 2>&5
8809 ac_status=$?
8810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8811 (exit $ac_status); }; }; then
8812 ac_cv_type_uintptr_t=yes
8813else
8814 echo "$as_me: failed program was:" >&5
8815cat conftest.$ac_ext >&5
8816ac_cv_type_uintptr_t=no
8817fi
8818rm -f conftest.$ac_objext conftest.$ac_ext
8819fi
8820echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8821echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8822
8823echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8824echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8825if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8826 echo $ECHO_N "(cached) $ECHO_C" >&6
8827else
8828 if test "$ac_cv_type_uintptr_t" = yes; then
8829 # The cast to unsigned long works around a bug in the HP C Compiler
8830 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8831 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8832 # This bug is HP SR number 8606223364.
8833 if test "$cross_compiling" = yes; then
8834 # Depending upon the size, compute the lo and hi bounds.
8835cat >conftest.$ac_ext <<_ACEOF
8836#line $LINENO "configure"
8837#include "confdefs.h"
8838$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008839#ifdef F77_DUMMY_MAIN
8840# ifdef __cplusplus
8841 extern "C"
8842# endif
8843 int F77_DUMMY_MAIN() { return 1; }
8844#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008845int
8846main ()
8847{
8848static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8849test_array [0] = 0
8850
8851 ;
8852 return 0;
8853}
8854_ACEOF
8855rm -f conftest.$ac_objext
8856if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8857 (eval $ac_compile) 2>&5
8858 ac_status=$?
8859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8860 (exit $ac_status); } &&
8861 { ac_try='test -s conftest.$ac_objext'
8862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8863 (eval $ac_try) 2>&5
8864 ac_status=$?
8865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8866 (exit $ac_status); }; }; then
8867 ac_lo=0 ac_mid=0
8868 while :; do
8869 cat >conftest.$ac_ext <<_ACEOF
8870#line $LINENO "configure"
8871#include "confdefs.h"
8872$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008873#ifdef F77_DUMMY_MAIN
8874# ifdef __cplusplus
8875 extern "C"
8876# endif
8877 int F77_DUMMY_MAIN() { return 1; }
8878#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008879int
8880main ()
8881{
8882static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8883test_array [0] = 0
8884
8885 ;
8886 return 0;
8887}
8888_ACEOF
8889rm -f conftest.$ac_objext
8890if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8891 (eval $ac_compile) 2>&5
8892 ac_status=$?
8893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8894 (exit $ac_status); } &&
8895 { ac_try='test -s conftest.$ac_objext'
8896 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8897 (eval $ac_try) 2>&5
8898 ac_status=$?
8899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8900 (exit $ac_status); }; }; then
8901 ac_hi=$ac_mid; break
8902else
8903 echo "$as_me: failed program was:" >&5
8904cat conftest.$ac_ext >&5
8905ac_lo=`expr $ac_mid + 1`
8906 if test $ac_lo -le $ac_mid; then
8907 ac_lo= ac_hi=
8908 break
8909 fi
8910 ac_mid=`expr 2 '*' $ac_mid + 1`
8911fi
8912rm -f conftest.$ac_objext conftest.$ac_ext
8913 done
8914else
8915 echo "$as_me: failed program was:" >&5
8916cat conftest.$ac_ext >&5
8917cat >conftest.$ac_ext <<_ACEOF
8918#line $LINENO "configure"
8919#include "confdefs.h"
8920$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008921#ifdef F77_DUMMY_MAIN
8922# ifdef __cplusplus
8923 extern "C"
8924# endif
8925 int F77_DUMMY_MAIN() { return 1; }
8926#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008927int
8928main ()
8929{
8930static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8931test_array [0] = 0
8932
8933 ;
8934 return 0;
8935}
8936_ACEOF
8937rm -f conftest.$ac_objext
8938if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8939 (eval $ac_compile) 2>&5
8940 ac_status=$?
8941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8942 (exit $ac_status); } &&
8943 { ac_try='test -s conftest.$ac_objext'
8944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8945 (eval $ac_try) 2>&5
8946 ac_status=$?
8947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8948 (exit $ac_status); }; }; then
8949 ac_hi=-1 ac_mid=-1
8950 while :; do
8951 cat >conftest.$ac_ext <<_ACEOF
8952#line $LINENO "configure"
8953#include "confdefs.h"
8954$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008955#ifdef F77_DUMMY_MAIN
8956# ifdef __cplusplus
8957 extern "C"
8958# endif
8959 int F77_DUMMY_MAIN() { return 1; }
8960#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008961int
8962main ()
8963{
8964static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8965test_array [0] = 0
8966
8967 ;
8968 return 0;
8969}
8970_ACEOF
8971rm -f conftest.$ac_objext
8972if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8973 (eval $ac_compile) 2>&5
8974 ac_status=$?
8975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8976 (exit $ac_status); } &&
8977 { ac_try='test -s conftest.$ac_objext'
8978 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8979 (eval $ac_try) 2>&5
8980 ac_status=$?
8981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8982 (exit $ac_status); }; }; then
8983 ac_lo=$ac_mid; break
8984else
8985 echo "$as_me: failed program was:" >&5
8986cat conftest.$ac_ext >&5
8987ac_hi=`expr '(' $ac_mid ')' - 1`
8988 if test $ac_mid -le $ac_hi; then
8989 ac_lo= ac_hi=
8990 break
8991 fi
8992 ac_mid=`expr 2 '*' $ac_mid`
8993fi
8994rm -f conftest.$ac_objext conftest.$ac_ext
8995 done
8996else
8997 echo "$as_me: failed program was:" >&5
8998cat conftest.$ac_ext >&5
8999ac_lo= ac_hi=
9000fi
9001rm -f conftest.$ac_objext conftest.$ac_ext
9002fi
9003rm -f conftest.$ac_objext conftest.$ac_ext
9004# Binary search between lo and hi bounds.
9005while test "x$ac_lo" != "x$ac_hi"; do
9006 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9007 cat >conftest.$ac_ext <<_ACEOF
9008#line $LINENO "configure"
9009#include "confdefs.h"
9010$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00009011#ifdef F77_DUMMY_MAIN
9012# ifdef __cplusplus
9013 extern "C"
9014# endif
9015 int F77_DUMMY_MAIN() { return 1; }
9016#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009017int
9018main ()
9019{
9020static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
9021test_array [0] = 0
9022
9023 ;
9024 return 0;
9025}
9026_ACEOF
9027rm -f conftest.$ac_objext
9028if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9029 (eval $ac_compile) 2>&5
9030 ac_status=$?
9031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9032 (exit $ac_status); } &&
9033 { ac_try='test -s conftest.$ac_objext'
9034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9035 (eval $ac_try) 2>&5
9036 ac_status=$?
9037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9038 (exit $ac_status); }; }; then
9039 ac_hi=$ac_mid
9040else
9041 echo "$as_me: failed program was:" >&5
9042cat conftest.$ac_ext >&5
9043ac_lo=`expr '(' $ac_mid ')' + 1`
9044fi
9045rm -f conftest.$ac_objext conftest.$ac_ext
9046done
9047case $ac_lo in
9048?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
9049'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
9050echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
9051 { (exit 1); exit 1; }; } ;;
9052esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009053else
9054 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009055 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
9056echo "$as_me: error: cannot run test program while cross compiling" >&2;}
9057 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009058else
Martin v. Löwis11437992002-04-12 09:54:03 +00009059 cat >conftest.$ac_ext <<_ACEOF
9060#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009061#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009062$ac_includes_default
9063long longval () { return (long) (sizeof (uintptr_t)); }
9064unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009065#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009066#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00009067#ifdef F77_DUMMY_MAIN
9068# ifdef __cplusplus
9069 extern "C"
9070# endif
9071 int F77_DUMMY_MAIN() { return 1; }
9072#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009073int
9074main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009075{
Martin v. Löwis11437992002-04-12 09:54:03 +00009076
9077 FILE *f = fopen ("conftest.val", "w");
9078 if (! f)
9079 exit (1);
9080 if (((long) (sizeof (uintptr_t))) < 0)
9081 {
9082 long i = longval ();
9083 if (i != ((long) (sizeof (uintptr_t))))
9084 exit (1);
9085 fprintf (f, "%ld\n", i);
9086 }
9087 else
9088 {
9089 unsigned long i = ulongval ();
9090 if (i != ((long) (sizeof (uintptr_t))))
9091 exit (1);
9092 fprintf (f, "%lu\n", i);
9093 }
9094 exit (ferror (f) || fclose (f) != 0);
9095
9096 ;
9097 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009098}
Martin v. Löwis11437992002-04-12 09:54:03 +00009099_ACEOF
9100rm -f conftest$ac_exeext
9101if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9102 (eval $ac_link) 2>&5
9103 ac_status=$?
9104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9105 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9106 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9107 (eval $ac_try) 2>&5
9108 ac_status=$?
9109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9110 (exit $ac_status); }; }; then
9111 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009112else
Martin v. Löwis11437992002-04-12 09:54:03 +00009113 echo "$as_me: program exited with status $ac_status" >&5
9114echo "$as_me: failed program was:" >&5
9115cat conftest.$ac_ext >&5
9116( exit $ac_status )
9117{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
9118echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
9119 { (exit 1); exit 1; }; }
9120fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009121rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009122fi
9123fi
9124rm -f conftest.val
9125else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009126 ac_cv_sizeof_uintptr_t=0
9127fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009128fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009129echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
9130echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
9131cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009132#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009133_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009134
Michael W. Hudson54241132001-12-07 15:38:26 +00009135
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009136fi
9137
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009138# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009139echo "$as_me:$LINENO: checking size of off_t" >&5
9140echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
9141if test "${ac_cv_sizeof_off_t+set}" = set; then
9142 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009143else
9144 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009145 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009146else
Martin v. Löwis11437992002-04-12 09:54:03 +00009147 cat >conftest.$ac_ext <<_ACEOF
9148#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009149#include "confdefs.h"
9150#include <stdio.h>
9151#include <sys/types.h>
9152main()
9153{
9154 FILE *f=fopen("conftestval", "w");
9155 if (!f) exit(1);
9156 fprintf(f, "%d\n", sizeof(off_t));
9157 exit(0);
9158}
Martin v. Löwis11437992002-04-12 09:54:03 +00009159_ACEOF
9160rm -f conftest$ac_exeext
9161if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9162 (eval $ac_link) 2>&5
9163 ac_status=$?
9164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9165 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9167 (eval $ac_try) 2>&5
9168 ac_status=$?
9169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9170 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009171 ac_cv_sizeof_off_t=`cat conftestval`
9172else
Martin v. Löwis11437992002-04-12 09:54:03 +00009173 echo "$as_me: program exited with status $ac_status" >&5
9174echo "$as_me: failed program was:" >&5
9175cat conftest.$ac_ext >&5
9176( exit $ac_status )
9177ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009178fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009179rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009180fi
9181
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009182fi
9183
Martin v. Löwis11437992002-04-12 09:54:03 +00009184echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
9185echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
9186
9187cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009188#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009189_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009190
Michael W. Hudson54241132001-12-07 15:38:26 +00009191
Martin v. Löwis11437992002-04-12 09:54:03 +00009192echo "$as_me:$LINENO: checking whether to enable large file support" >&5
9193echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009194if test "$have_long_long" = yes -a \
9195 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
9196 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009197
Martin v. Löwis11437992002-04-12 09:54:03 +00009198cat >>confdefs.h <<\_ACEOF
9199#define HAVE_LARGEFILE_SUPPORT 1
9200_ACEOF
9201
9202 echo "$as_me:$LINENO: result: yes" >&5
9203echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009204else
Martin v. Löwis11437992002-04-12 09:54:03 +00009205 echo "$as_me:$LINENO: result: no" >&5
9206echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009207fi
9208
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009209# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009210echo "$as_me:$LINENO: checking size of time_t" >&5
9211echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
9212if test "${ac_cv_sizeof_time_t+set}" = set; then
9213 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009214else
9215 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009216 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009217else
Martin v. Löwis11437992002-04-12 09:54:03 +00009218 cat >conftest.$ac_ext <<_ACEOF
9219#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009220#include "confdefs.h"
9221#include <stdio.h>
9222#include <time.h>
9223main()
9224{
9225 FILE *f=fopen("conftestval", "w");
9226 if (!f) exit(1);
9227 fprintf(f, "%d\n", sizeof(time_t));
9228 exit(0);
9229}
Martin v. Löwis11437992002-04-12 09:54:03 +00009230_ACEOF
9231rm -f conftest$ac_exeext
9232if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9233 (eval $ac_link) 2>&5
9234 ac_status=$?
9235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9236 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9238 (eval $ac_try) 2>&5
9239 ac_status=$?
9240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9241 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009242 ac_cv_sizeof_time_t=`cat conftestval`
9243else
Martin v. Löwis11437992002-04-12 09:54:03 +00009244 echo "$as_me: program exited with status $ac_status" >&5
9245echo "$as_me: failed program was:" >&5
9246cat conftest.$ac_ext >&5
9247( exit $ac_status )
9248ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009249fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009250rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009251fi
9252
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009253fi
9254
Martin v. Löwis11437992002-04-12 09:54:03 +00009255echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9256echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9257
9258cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009259#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009260_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009261
Michael W. Hudson54241132001-12-07 15:38:26 +00009262
9263
Trent Mick635f6fb2000-08-23 21:33:05 +00009264# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009265ac_save_cc="$CC"
9266if test "$ac_cv_kpthread" = "yes"
9267then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009268elif test "$ac_cv_kthread" = "yes"
9269then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009270elif test "$ac_cv_pthread" = "yes"
9271then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009272fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009273echo "$as_me:$LINENO: checking for pthread_t" >&5
9274echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009275have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009276cat >conftest.$ac_ext <<_ACEOF
9277#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009278#include "confdefs.h"
9279#include <pthread.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00009280#ifdef F77_DUMMY_MAIN
9281# ifdef __cplusplus
9282 extern "C"
9283# endif
9284 int F77_DUMMY_MAIN() { return 1; }
9285#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009286int
9287main ()
9288{
Guido van Rossum12580492000-09-24 16:47:19 +00009289pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009290 ;
9291 return 0;
9292}
9293_ACEOF
9294rm -f conftest.$ac_objext
9295if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9296 (eval $ac_compile) 2>&5
9297 ac_status=$?
9298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9299 (exit $ac_status); } &&
9300 { ac_try='test -s conftest.$ac_objext'
9301 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9302 (eval $ac_try) 2>&5
9303 ac_status=$?
9304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9305 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009306 have_pthread_t=yes
9307else
Martin v. Löwis11437992002-04-12 09:54:03 +00009308 echo "$as_me: failed program was:" >&5
9309cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00009310fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009311rm -f conftest.$ac_objext conftest.$ac_ext
9312echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9313echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009314if test "$have_pthread_t" = yes ; then
9315 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009316 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9317echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9318 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9319 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009320else
9321 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009322 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009323else
Martin v. Löwis11437992002-04-12 09:54:03 +00009324 cat >conftest.$ac_ext <<_ACEOF
9325#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009326#include "confdefs.h"
9327#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009328#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +00009329 main()
9330 {
9331 FILE *f=fopen("conftestval", "w");
9332 if (!f) exit(1);
9333 fprintf(f, "%d\n", sizeof(pthread_t));
9334 exit(0);
9335 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009336_ACEOF
9337rm -f conftest$ac_exeext
9338if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9339 (eval $ac_link) 2>&5
9340 ac_status=$?
9341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9342 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9344 (eval $ac_try) 2>&5
9345 ac_status=$?
9346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9347 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009348 ac_cv_sizeof_pthread_t=`cat conftestval`
9349else
Martin v. Löwis11437992002-04-12 09:54:03 +00009350 echo "$as_me: program exited with status $ac_status" >&5
9351echo "$as_me: failed program was:" >&5
9352cat conftest.$ac_ext >&5
9353( exit $ac_status )
9354ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009355fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009356rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009357fi
9358
Trent Mick635f6fb2000-08-23 21:33:05 +00009359fi
9360
Martin v. Löwis11437992002-04-12 09:54:03 +00009361 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9362echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9363
9364cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009365#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009366_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009367
9368fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009369CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009370
Martin v. Löwis11437992002-04-12 09:54:03 +00009371echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9372echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009373# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9374if test "${enable_toolbox_glue+set}" = set; then
9375 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009376
Martin v. Löwis11437992002-04-12 09:54:03 +00009377fi;
Jack Jansene578a632001-08-15 01:27:14 +00009378
9379if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009380then
Jack Jansene578a632001-08-15 01:27:14 +00009381 case $ac_sys_system/$ac_sys_release in
9382 Darwin/*)
9383 enable_toolbox_glue="yes";;
9384 *)
9385 enable_toolbox_glue="no";;
9386 esac
9387fi
9388case "$enable_toolbox_glue" in
9389yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009390 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009391 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009392 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009393
9394cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009395#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009396_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009397
9398 ;;
9399*)
9400 extra_frameworks=""
9401 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009402 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009403 ;;
9404esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009405echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9406echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009407
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009408
9409case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009410 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009411 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009412 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00009413 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9414 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009415 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009416 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009417 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00009418 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9419 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009420esac
9421
Martin v. Löwis11437992002-04-12 09:54:03 +00009422echo "$as_me:$LINENO: checking for --enable-framework" >&5
9423echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009424if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009425then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009426 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009427 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009428 # in the build location.
Jack Jansenea0c3822002-08-01 21:57:49 +00009429 LDFLAGS="$LDFLAGS -Wl,-F."
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009430
Martin v. Löwis11437992002-04-12 09:54:03 +00009431cat >>confdefs.h <<\_ACEOF
9432#define WITH_NEXT_FRAMEWORK 1
9433_ACEOF
9434
9435 echo "$as_me:$LINENO: result: yes" >&5
9436echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009437else
Martin v. Löwis11437992002-04-12 09:54:03 +00009438 echo "$as_me:$LINENO: result: no" >&5
9439echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009440fi
9441
Martin v. Löwis11437992002-04-12 09:54:03 +00009442echo "$as_me:$LINENO: checking for dyld" >&5
9443echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009444case $ac_sys_system/$ac_sys_release in
9445 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009446
Martin v. Löwis11437992002-04-12 09:54:03 +00009447cat >>confdefs.h <<\_ACEOF
9448#define WITH_DYLD 1
9449_ACEOF
9450
9451 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9452echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009453 ;;
9454 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009455 echo "$as_me:$LINENO: result: no" >&5
9456echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009457 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009458esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009459
Guido van Rossum0a516c91994-09-12 10:58:40 +00009460# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009461
Michael W. Hudson54241132001-12-07 15:38:26 +00009462
9463
9464
9465
Guido van Rossum0a516c91994-09-12 10:58:40 +00009466# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009467# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009468echo "$as_me:$LINENO: checking SO" >&5
9469echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009470if test -z "$SO"
9471then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009472 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009473 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009474 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009475 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009476 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009477fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009478echo "$as_me:$LINENO: result: $SO" >&5
9479echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009480# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00009481# -- "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 +00009482# (Shared libraries in this instance are shared modules to be loaded into
9483# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009484echo "$as_me:$LINENO: checking LDSHARED" >&5
9485echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009486if test -z "$LDSHARED"
9487then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009488 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009489 AIX*)
9490 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009491 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009492 ;;
9493 BeOS*)
9494 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009495 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009496 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009497 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009498 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009499 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009500 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +00009501 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009502 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009503 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +00009504 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009505 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009506 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
9507 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009508 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009509 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9510 if test "$enable_framework" ; then
9511 # Link against the framework. All externals should be defined.
9512 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9513 else
9514 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009515 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009516 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009517 Darwin/*)
9518 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9519 if test "$enable_framework" ; then
9520 # Link against the framework. All externals should be defined.
9521 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9522 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009523 # No framework, use the Python app as bundle-loader
9524 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009525 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009526 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009527 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00009528 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009529 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009530 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009531 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009532 then
9533 LDSHARED="cc -shared ${LDFLAGS}"
9534 else
9535 LDSHARED="ld -Bshareable ${LDFLAGS}"
9536 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009537 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009538 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009539 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009540 then LDSHARED='$(CC) -shared'
9541 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009542 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009543 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +00009544 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009545 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009546 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009547 *) LDSHARED="ld";;
9548 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009549fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009550echo "$as_me:$LINENO: result: $LDSHARED" >&5
9551echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009552BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009553# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009554# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009555echo "$as_me:$LINENO: checking CCSHARED" >&5
9556echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009557if test -z "$CCSHARED"
9558then
Guido van Rossum07397971997-04-29 21:49:50 +00009559 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009560 SunOS*) if test "$GCC" = yes;
9561 then CCSHARED="-fPIC";
9562 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009563 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009564 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009565 else CCSHARED="+z";
9566 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009567 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009568 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009569 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009570 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009571 if test "$GCC" = "yes"
9572 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009573 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009574 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009575 SCO_SV*)
9576 if test "$GCC" = "yes"
9577 then CCSHARED="-fPIC"
9578 else CCSHARED="-Kpic -belf"
9579 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009580 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009581 IRIX*/6*) case $CC in
9582 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009583 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009584 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009585 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009586 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009587fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009588echo "$as_me:$LINENO: result: $CCSHARED" >&5
9589echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009590# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009591# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009592echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9593echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009594if test -z "$LINKFORSHARED"
9595then
Guido van Rossum07397971997-04-29 21:49:50 +00009596 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009597 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009598 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009599 LINKFORSHARED="-Wl,-E -Wl,+s";;
9600# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009601 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009602 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009603 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009604 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009605 # -u __dummy makes the linker aware of the objc runtime
9606 # in System.framework; otherwise, __objcInit (referenced in
9607 # crt1.o) gets erroneously defined as common, which breaks dynamic
9608 # loading of any modules which reference it in System.framework.
9609 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9610 # not used by the core itself but which needs to be in the core so
9611 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00009612 # -prebind is no longer used, because it actually seems to give a
9613 # slowdown in stead of a speedup, maybe due to the large number of
9614 # dynamic loads Python does.
9615 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009616 if test "$enable_framework"
9617 then
9618 LINKFORSHARED="$LINKFORSHARED -framework Python"
9619 fi
9620 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009621 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009622 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009623 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009624 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009625 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9626 then
9627 LINKFORSHARED="-Wl,--export-dynamic"
9628 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009629 SunOS/5*) case $CC in
9630 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009631 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009632 then
9633 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009634 fi;;
9635 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009636 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009637fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009638echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9639echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009640
Michael W. Hudson54241132001-12-07 15:38:26 +00009641
Martin v. Löwis11437992002-04-12 09:54:03 +00009642echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9643echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009644if test ! "$LIBRARY" = "$LDLIBRARY"
9645then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009646 case $ac_sys_system in
9647 CYGWIN*)
9648 # Cygwin needs CCSHARED when building extension DLLs
9649 # but not when building the interpreter DLL.
9650 CFLAGSFORSHARED='';;
9651 *)
9652 CFLAGSFORSHARED='$(CCSHARED)'
9653 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009654fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009655echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9656echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009657
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009658# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9659# library (with --enable-shared).
9660# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009661# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9662# if it is not required, since it creates a dependency of the shared library
9663# to LIBS. This, in turn, means that applications linking the shared libpython
9664# don't need to link LIBS explicitly. The default should be only changed
9665# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009666
9667echo "$as_me:$LINENO: checking SHLIBS" >&5
9668echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9669case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009670 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009671 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009672esac
9673echo "$as_me:$LINENO: result: $SHLIBS" >&5
9674echo "${ECHO_T}$SHLIBS" >&6
9675
9676
Guido van Rossum627b2d71993-12-24 10:39:16 +00009677# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009678
9679echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9680echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9681if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9682 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009683else
Martin v. Löwis11437992002-04-12 09:54:03 +00009684 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009685LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009686cat >conftest.$ac_ext <<_ACEOF
9687#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009688#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009689
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009690/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009691#ifdef __cplusplus
9692extern "C"
9693#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009694/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009695 builtin and then its argument prototype would still apply. */
9696char dlopen ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009697#ifdef F77_DUMMY_MAIN
9698# ifdef __cplusplus
9699 extern "C"
9700# endif
9701 int F77_DUMMY_MAIN() { return 1; }
9702#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009703int
9704main ()
9705{
9706dlopen ();
9707 ;
9708 return 0;
9709}
9710_ACEOF
9711rm -f conftest.$ac_objext conftest$ac_exeext
9712if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9713 (eval $ac_link) 2>&5
9714 ac_status=$?
9715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9716 (exit $ac_status); } &&
9717 { ac_try='test -s conftest$ac_exeext'
9718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9719 (eval $ac_try) 2>&5
9720 ac_status=$?
9721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9722 (exit $ac_status); }; }; then
9723 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009724else
Martin v. Löwis11437992002-04-12 09:54:03 +00009725 echo "$as_me: failed program was:" >&5
9726cat conftest.$ac_ext >&5
9727ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009728fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009729rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9730LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009731fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009732echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9733echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9734if test $ac_cv_lib_dl_dlopen = yes; then
9735 cat >>confdefs.h <<_ACEOF
9736#define HAVE_LIBDL 1
9737_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009738
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009739 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009740
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009741fi
9742 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009743
9744echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9745echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9746if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9747 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009748else
Martin v. Löwis11437992002-04-12 09:54:03 +00009749 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009750LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009751cat >conftest.$ac_ext <<_ACEOF
9752#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009753#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009754
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009755/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009756#ifdef __cplusplus
9757extern "C"
9758#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009759/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009760 builtin and then its argument prototype would still apply. */
9761char shl_load ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009762#ifdef F77_DUMMY_MAIN
9763# ifdef __cplusplus
9764 extern "C"
9765# endif
9766 int F77_DUMMY_MAIN() { return 1; }
9767#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009768int
9769main ()
9770{
9771shl_load ();
9772 ;
9773 return 0;
9774}
9775_ACEOF
9776rm -f conftest.$ac_objext conftest$ac_exeext
9777if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9778 (eval $ac_link) 2>&5
9779 ac_status=$?
9780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9781 (exit $ac_status); } &&
9782 { ac_try='test -s conftest$ac_exeext'
9783 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9784 (eval $ac_try) 2>&5
9785 ac_status=$?
9786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9787 (exit $ac_status); }; }; then
9788 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009789else
Martin v. Löwis11437992002-04-12 09:54:03 +00009790 echo "$as_me: failed program was:" >&5
9791cat conftest.$ac_ext >&5
9792ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009793fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009794rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9795LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009796fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009797echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9798echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9799if test $ac_cv_lib_dld_shl_load = yes; then
9800 cat >>confdefs.h <<_ACEOF
9801#define HAVE_LIBDLD 1
9802_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009803
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009804 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009805
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009806fi
9807 # Dynamic linking for HP-UX
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009808echo "$as_me:$LINENO: checking for library containing sem_init" >&5
9809echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9810if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009811 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009812else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009813 ac_func_search_save_LIBS=$LIBS
9814ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009815cat >conftest.$ac_ext <<_ACEOF
9816#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009817#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009818
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009819/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009820#ifdef __cplusplus
9821extern "C"
9822#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009823/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009824 builtin and then its argument prototype would still apply. */
9825char sem_init ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009826#ifdef F77_DUMMY_MAIN
9827# ifdef __cplusplus
9828 extern "C"
9829# endif
9830 int F77_DUMMY_MAIN() { return 1; }
9831#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009832int
9833main ()
9834{
9835sem_init ();
9836 ;
9837 return 0;
9838}
9839_ACEOF
9840rm -f conftest.$ac_objext conftest$ac_exeext
9841if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9842 (eval $ac_link) 2>&5
9843 ac_status=$?
9844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9845 (exit $ac_status); } &&
9846 { ac_try='test -s conftest$ac_exeext'
9847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9848 (eval $ac_try) 2>&5
9849 ac_status=$?
9850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9851 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009852 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009853else
Martin v. Löwis11437992002-04-12 09:54:03 +00009854 echo "$as_me: failed program was:" >&5
9855cat conftest.$ac_ext >&5
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009856fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009857rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009858if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009859 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009860 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9861 cat >conftest.$ac_ext <<_ACEOF
9862#line $LINENO "configure"
9863#include "confdefs.h"
9864
9865/* Override any gcc2 internal prototype to avoid an error. */
9866#ifdef __cplusplus
9867extern "C"
9868#endif
9869/* We use char because int might match the return type of a gcc2
9870 builtin and then its argument prototype would still apply. */
9871char sem_init ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009872#ifdef F77_DUMMY_MAIN
9873# ifdef __cplusplus
9874 extern "C"
9875# endif
9876 int F77_DUMMY_MAIN() { return 1; }
9877#endif
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009878int
9879main ()
9880{
9881sem_init ();
9882 ;
9883 return 0;
9884}
Martin v. Löwis11437992002-04-12 09:54:03 +00009885_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009886rm -f conftest.$ac_objext conftest$ac_exeext
9887if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9888 (eval $ac_link) 2>&5
9889 ac_status=$?
9890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9891 (exit $ac_status); } &&
9892 { ac_try='test -s conftest$ac_exeext'
9893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9894 (eval $ac_try) 2>&5
9895 ac_status=$?
9896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9897 (exit $ac_status); }; }; then
9898 ac_cv_search_sem_init="-l$ac_lib"
9899break
9900else
9901 echo "$as_me: failed program was:" >&5
9902cat conftest.$ac_ext >&5
9903fi
9904rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9905 done
9906fi
9907LIBS=$ac_func_search_save_LIBS
9908fi
9909echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9910echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9911if test "$ac_cv_search_sem_init" != no; then
9912 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009913
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009914fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009915 # 'Real Time' functions on Solaris
9916 # posix4 on Solaris 2.6
9917 # pthread (first!) on Linux
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009918
9919# checks for system dependent C++ extensions support
9920case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009921 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9922echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9923 cat >conftest.$ac_ext <<_ACEOF
9924#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009925#include "confdefs.h"
9926#include "/usr/lpp/xlC/include/load.h"
Barry Warsawfe33b792003-01-07 22:42:49 +00009927#ifdef F77_DUMMY_MAIN
9928# ifdef __cplusplus
9929 extern "C"
9930# endif
9931 int F77_DUMMY_MAIN() { return 1; }
9932#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009933int
9934main ()
9935{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009936loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009937 ;
9938 return 0;
9939}
9940_ACEOF
9941rm -f conftest.$ac_objext conftest$ac_exeext
9942if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9943 (eval $ac_link) 2>&5
9944 ac_status=$?
9945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9946 (exit $ac_status); } &&
9947 { ac_try='test -s conftest$ac_exeext'
9948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9949 (eval $ac_try) 2>&5
9950 ac_status=$?
9951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9952 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009953
Martin v. Löwis11437992002-04-12 09:54:03 +00009954cat >>confdefs.h <<\_ACEOF
9955#define AIX_GENUINE_CPLUSPLUS 1
9956_ACEOF
9957
9958 echo "$as_me:$LINENO: result: yes" >&5
9959echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009960else
Martin v. Löwis11437992002-04-12 09:54:03 +00009961 echo "$as_me: failed program was:" >&5
9962cat conftest.$ac_ext >&5
9963echo "$as_me:$LINENO: result: no" >&5
9964echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009965fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009966rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009967 *) ;;
9968esac
9969
Guido van Rossum70c7f481998-03-26 18:44:10 +00009970# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Martin v. Löwise1172582002-11-13 08:51:19 +00009971# However on SGI IRIX 4, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009972# BeOS' sockets are stashed in libnet.
9973case "$ac_sys_system" in
9974IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009975*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009976echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9977echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9978if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9979 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009980else
Martin v. Löwis11437992002-04-12 09:54:03 +00009981 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009982LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009983cat >conftest.$ac_ext <<_ACEOF
9984#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009985#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009986
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009987/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009988#ifdef __cplusplus
9989extern "C"
9990#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009991/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009992 builtin and then its argument prototype would still apply. */
9993char t_open ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009994#ifdef F77_DUMMY_MAIN
9995# ifdef __cplusplus
9996 extern "C"
9997# endif
9998 int F77_DUMMY_MAIN() { return 1; }
9999#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010000int
10001main ()
10002{
10003t_open ();
10004 ;
10005 return 0;
10006}
10007_ACEOF
10008rm -f conftest.$ac_objext conftest$ac_exeext
10009if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10010 (eval $ac_link) 2>&5
10011 ac_status=$?
10012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10013 (exit $ac_status); } &&
10014 { ac_try='test -s conftest$ac_exeext'
10015 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10016 (eval $ac_try) 2>&5
10017 ac_status=$?
10018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10019 (exit $ac_status); }; }; then
10020 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010021else
Martin v. Löwis11437992002-04-12 09:54:03 +000010022 echo "$as_me: failed program was:" >&5
10023cat conftest.$ac_ext >&5
10024ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010025fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010026rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10027LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010028fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010029echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
10030echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
10031if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010032 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010033fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010034 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +000010035echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
10036echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
10037if test "${ac_cv_lib_socket_socket+set}" = set; then
10038 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010039else
Martin v. Löwis11437992002-04-12 09:54:03 +000010040 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010041LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010042cat >conftest.$ac_ext <<_ACEOF
10043#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010044#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010045
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010046/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010047#ifdef __cplusplus
10048extern "C"
10049#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010050/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010051 builtin and then its argument prototype would still apply. */
10052char socket ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010053#ifdef F77_DUMMY_MAIN
10054# ifdef __cplusplus
10055 extern "C"
10056# endif
10057 int F77_DUMMY_MAIN() { return 1; }
10058#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010059int
10060main ()
10061{
10062socket ();
10063 ;
10064 return 0;
10065}
10066_ACEOF
10067rm -f conftest.$ac_objext conftest$ac_exeext
10068if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10069 (eval $ac_link) 2>&5
10070 ac_status=$?
10071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10072 (exit $ac_status); } &&
10073 { ac_try='test -s conftest$ac_exeext'
10074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10075 (eval $ac_try) 2>&5
10076 ac_status=$?
10077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10078 (exit $ac_status); }; }; then
10079 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010080else
Martin v. Löwis11437992002-04-12 09:54:03 +000010081 echo "$as_me: failed program was:" >&5
10082cat conftest.$ac_ext >&5
10083ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010084fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010085rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10086LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010087fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010088echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
10089echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
10090if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000010091 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010092fi
10093 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000010094;;
10095esac
10096case "$ac_sys_system" in
10097BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010098echo "$as_me:$LINENO: checking for socket in -lnet" >&5
10099echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
10100if test "${ac_cv_lib_net_socket+set}" = set; then
10101 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010102else
Martin v. Löwis11437992002-04-12 09:54:03 +000010103 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010104LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010105cat >conftest.$ac_ext <<_ACEOF
10106#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010107#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010108
Guido van Rossumad678af1998-10-02 14:42:15 +000010109/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010110#ifdef __cplusplus
10111extern "C"
10112#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010113/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010114 builtin and then its argument prototype would still apply. */
10115char socket ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010116#ifdef F77_DUMMY_MAIN
10117# ifdef __cplusplus
10118 extern "C"
10119# endif
10120 int F77_DUMMY_MAIN() { return 1; }
10121#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010122int
10123main ()
10124{
10125socket ();
10126 ;
10127 return 0;
10128}
10129_ACEOF
10130rm -f conftest.$ac_objext conftest$ac_exeext
10131if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10132 (eval $ac_link) 2>&5
10133 ac_status=$?
10134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10135 (exit $ac_status); } &&
10136 { ac_try='test -s conftest$ac_exeext'
10137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10138 (eval $ac_try) 2>&5
10139 ac_status=$?
10140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10141 (exit $ac_status); }; }; then
10142 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010143else
Martin v. Löwis11437992002-04-12 09:54:03 +000010144 echo "$as_me: failed program was:" >&5
10145cat conftest.$ac_ext >&5
10146ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010147fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010148rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10149LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010150fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010151echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
10152echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
10153if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010154 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010155fi
10156 # BeOS
10157;;
10158esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000010159
Martin v. Löwis11437992002-04-12 09:54:03 +000010160echo "$as_me:$LINENO: checking for --with-libs" >&5
10161echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
10162
Guido van Rossuma68acba1996-07-31 17:36:39 +000010163# Check whether --with-libs or --without-libs was given.
10164if test "${with_libs+set}" = set; then
10165 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000010166
10167echo "$as_me:$LINENO: result: $withval" >&5
10168echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000010169LIBS="$withval $LIBS"
10170
10171else
Martin v. Löwis11437992002-04-12 09:54:03 +000010172 echo "$as_me:$LINENO: result: no" >&5
10173echo "${ECHO_T}no" >&6
10174fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000010175
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010176# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010177
10178
Martin v. Löwis11437992002-04-12 09:54:03 +000010179echo "$as_me:$LINENO: checking for --with-signal-module" >&5
10180echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
10181
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010182# Check whether --with-signal-module or --without-signal-module was given.
10183if test "${with_signal_module+set}" = set; then
10184 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010185
Martin v. Löwis11437992002-04-12 09:54:03 +000010186fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010187
10188if test -z "$with_signal_module"
10189then with_signal_module="yes"
10190fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010191echo "$as_me:$LINENO: result: $with_signal_module" >&5
10192echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010193
10194if test "${with_signal_module}" = "yes"; then
10195 USE_SIGNAL_MODULE=""
10196 SIGNAL_OBJS=""
10197else
10198 USE_SIGNAL_MODULE="#"
10199 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10200fi
10201
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010202# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010203
Barry Warsawc0d24d82000-06-29 16:12:00 +000010204USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010205
Martin v. Löwis11437992002-04-12 09:54:03 +000010206echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
10207echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
10208
Guido van Rossumec2f0731997-01-22 20:54:01 +000010209
10210# Check whether --with-dec-threads or --without-dec-threads was given.
10211if test "${with_dec_threads+set}" = set; then
10212 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000010213
10214echo "$as_me:$LINENO: result: $withval" >&5
10215echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000010216LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000010217if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000010218 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000010219fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010220else
Martin v. Löwis11437992002-04-12 09:54:03 +000010221 echo "$as_me:$LINENO: result: no" >&5
10222echo "${ECHO_T}no" >&6
10223fi;
10224
10225# Templates for things AC_DEFINEd more than once.
10226# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010227
10228
Martin v. Löwis11437992002-04-12 09:54:03 +000010229
10230
10231
10232
10233
10234echo "$as_me:$LINENO: checking for --with-threads" >&5
10235echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
10236
Guido van Rossumec2f0731997-01-22 20:54:01 +000010237# Check whether --with-threads or --without-threads was given.
10238if test "${with_threads+set}" = set; then
10239 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000010240
Martin v. Löwis11437992002-04-12 09:54:03 +000010241fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000010242
Barry Warsawc0d24d82000-06-29 16:12:00 +000010243# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010244
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010245# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010246if test "${with_thread+set}" = set; then
10247 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010248 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000010249fi;
Barry Warsawc0d24d82000-06-29 16:12:00 +000010250
10251if test -z "$with_threads"
10252then with_threads="yes"
10253fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010254echo "$as_me:$LINENO: result: $with_threads" >&5
10255echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d82000-06-29 16:12:00 +000010256
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010257
Barry Warsawc0d24d82000-06-29 16:12:00 +000010258if test "$with_threads" = "no"
10259then
10260 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010261elif test "$ac_cv_pthread_is_default" = yes
10262then
Martin v. Löwis11437992002-04-12 09:54:03 +000010263 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010264#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010265_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010266
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010267 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010268 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010269#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010270_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010271
10272 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010273 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010274elif test "$ac_cv_kpthread" = "yes"
10275then
10276 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010277 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010278#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010279_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010280
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010281 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010282 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010283elif test "$ac_cv_kthread" = "yes"
10284then
10285 CC="$CC -Kthread"
10286 cat >>confdefs.h <<\_ACEOF
10287#define WITH_THREAD 1
10288_ACEOF
10289
10290 posix_threads=yes
10291 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010292elif test "$ac_cv_pthread" = "yes"
10293then
10294 CC="$CC -pthread"
10295 cat >>confdefs.h <<\_ACEOF
10296#define WITH_THREAD 1
10297_ACEOF
10298
10299 posix_threads=yes
10300 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010301else
10302 if test ! -z "$with_threads" -a -d "$with_threads"
10303 then LDFLAGS="$LDFLAGS -L$with_threads"
10304 fi
10305 if test ! -z "$withval" -a -d "$withval"
10306 then LDFLAGS="$LDFLAGS -L$withval"
10307 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010308
10309 # According to the POSIX spec, a pthreads implementation must
10310 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010311 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10312echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10313 cat >conftest.$ac_ext <<_ACEOF
10314#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010315#include "confdefs.h"
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010316
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010317#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010318#ifdef _POSIX_THREADS
10319yes
10320#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010321
10322_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010323if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000010324 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010325 unistd_defines_pthreads=yes
10326else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010327 unistd_defines_pthreads=no
10328fi
10329rm -f conftest*
10330
Martin v. Löwis11437992002-04-12 09:54:03 +000010331 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10332echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010333
Martin v. Löwis11437992002-04-12 09:54:03 +000010334 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010335#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010336_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010337
Martin v. Löwis11437992002-04-12 09:54:03 +000010338 if test "${ac_cv_header_cthreads_h+set}" = set; then
10339 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10340echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10341if test "${ac_cv_header_cthreads_h+set}" = set; then
10342 echo $ECHO_N "(cached) $ECHO_C" >&6
10343fi
10344echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10345echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010346else
Martin v. Löwis11437992002-04-12 09:54:03 +000010347 # Is the header compilable?
10348echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10349echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10350cat >conftest.$ac_ext <<_ACEOF
10351#line $LINENO "configure"
10352#include "confdefs.h"
10353$ac_includes_default
10354#include <cthreads.h>
10355_ACEOF
10356rm -f conftest.$ac_objext
10357if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10358 (eval $ac_compile) 2>&5
10359 ac_status=$?
10360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10361 (exit $ac_status); } &&
10362 { ac_try='test -s conftest.$ac_objext'
10363 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10364 (eval $ac_try) 2>&5
10365 ac_status=$?
10366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10367 (exit $ac_status); }; }; then
10368 ac_header_compiler=yes
10369else
10370 echo "$as_me: failed program was:" >&5
10371cat conftest.$ac_ext >&5
10372ac_header_compiler=no
10373fi
10374rm -f conftest.$ac_objext conftest.$ac_ext
10375echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10376echo "${ECHO_T}$ac_header_compiler" >&6
10377
10378# Is the header present?
10379echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10380echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10381cat >conftest.$ac_ext <<_ACEOF
10382#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010383#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010384#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010385_ACEOF
10386if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10387 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10388 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010389 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010390 rm -f conftest.er1
10391 cat conftest.err >&5
10392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10393 (exit $ac_status); } >/dev/null; then
10394 if test -s conftest.err; then
10395 ac_cpp_err=$ac_c_preproc_warn_flag
10396 else
10397 ac_cpp_err=
10398 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010399else
Martin v. Löwis11437992002-04-12 09:54:03 +000010400 ac_cpp_err=yes
10401fi
10402if test -z "$ac_cpp_err"; then
10403 ac_header_preproc=yes
10404else
10405 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +000010406 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010407 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010408fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010409rm -f conftest.err conftest.$ac_ext
10410echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10411echo "${ECHO_T}$ac_header_preproc" >&6
10412
10413# So? What about this header?
10414case $ac_header_compiler:$ac_header_preproc in
10415 yes:no )
10416 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10417echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10418 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10419echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10420 no:yes )
10421 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10422echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10423 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10424echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10425 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10426echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10427esac
10428echo "$as_me:$LINENO: checking for cthreads.h" >&5
10429echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10430if test "${ac_cv_header_cthreads_h+set}" = set; then
10431 echo $ECHO_N "(cached) $ECHO_C" >&6
10432else
10433 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010434fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010435echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10436echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10437
10438fi
10439if test $ac_cv_header_cthreads_h = yes; then
10440 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010441#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010442_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010443
Martin v. Löwis11437992002-04-12 09:54:03 +000010444 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010445#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010446_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010447
Martin v. Löwis11437992002-04-12 09:54:03 +000010448
10449cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010450#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010451_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010452
10453 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010454 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010455else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010456
Martin v. Löwis11437992002-04-12 09:54:03 +000010457 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10458 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10459echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10460if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10461 echo $ECHO_N "(cached) $ECHO_C" >&6
10462fi
10463echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10464echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010465else
Martin v. Löwis11437992002-04-12 09:54:03 +000010466 # Is the header compilable?
10467echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10468echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10469cat >conftest.$ac_ext <<_ACEOF
10470#line $LINENO "configure"
10471#include "confdefs.h"
10472$ac_includes_default
10473#include <mach/cthreads.h>
10474_ACEOF
10475rm -f conftest.$ac_objext
10476if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10477 (eval $ac_compile) 2>&5
10478 ac_status=$?
10479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10480 (exit $ac_status); } &&
10481 { ac_try='test -s conftest.$ac_objext'
10482 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10483 (eval $ac_try) 2>&5
10484 ac_status=$?
10485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10486 (exit $ac_status); }; }; then
10487 ac_header_compiler=yes
10488else
10489 echo "$as_me: failed program was:" >&5
10490cat conftest.$ac_ext >&5
10491ac_header_compiler=no
10492fi
10493rm -f conftest.$ac_objext conftest.$ac_ext
10494echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10495echo "${ECHO_T}$ac_header_compiler" >&6
10496
10497# Is the header present?
10498echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10499echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10500cat >conftest.$ac_ext <<_ACEOF
10501#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010502#include "confdefs.h"
10503#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010504_ACEOF
10505if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10506 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10507 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010508 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010509 rm -f conftest.er1
10510 cat conftest.err >&5
10511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10512 (exit $ac_status); } >/dev/null; then
10513 if test -s conftest.err; then
10514 ac_cpp_err=$ac_c_preproc_warn_flag
10515 else
10516 ac_cpp_err=
10517 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010518else
Martin v. Löwis11437992002-04-12 09:54:03 +000010519 ac_cpp_err=yes
10520fi
10521if test -z "$ac_cpp_err"; then
10522 ac_header_preproc=yes
10523else
10524 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010525 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010526 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010527fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010528rm -f conftest.err conftest.$ac_ext
10529echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10530echo "${ECHO_T}$ac_header_preproc" >&6
10531
10532# So? What about this header?
10533case $ac_header_compiler:$ac_header_preproc in
10534 yes:no )
10535 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10536echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10537 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10538echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10539 no:yes )
10540 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10541echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10542 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10543echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10544 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10545echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10546esac
10547echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10548echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10549if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10550 echo $ECHO_N "(cached) $ECHO_C" >&6
10551else
10552 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010553fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010554echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10555echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10556
10557fi
10558if test $ac_cv_header_mach_cthreads_h = yes; then
10559 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010560#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010561_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010562
Martin v. Löwis11437992002-04-12 09:54:03 +000010563 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010564#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010565_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010566
Martin v. Löwis11437992002-04-12 09:54:03 +000010567
10568cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010569#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010570_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010571
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010572 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010573else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010574
Martin v. Löwis11437992002-04-12 09:54:03 +000010575 echo "$as_me:$LINENO: checking for --with-pth" >&5
10576echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10577
10578# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010579if test "${with_pth+set}" = set; then
10580 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010581 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010582echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010583 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010584#define WITH_THREAD 1
10585_ACEOF
10586
10587
10588cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010589#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010590_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010591
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010592 LIBS="-lpth $LIBS"
10593 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010594else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010595 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010596echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010597
10598 # Just looking for pthread_create in libpthread is not enough:
10599 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10600 # So we really have to include pthread.h, and then link.
10601 _libs=$LIBS
10602 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010603 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10604echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10605 cat >conftest.$ac_ext <<_ACEOF
10606#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010607#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010608#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010609
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010610void * start_routine (void *arg) { exit (0); }
Barry Warsawfe33b792003-01-07 22:42:49 +000010611#ifdef F77_DUMMY_MAIN
10612# ifdef __cplusplus
10613 extern "C"
10614# endif
10615 int F77_DUMMY_MAIN() { return 1; }
10616#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010617int
10618main ()
10619{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010620
10621pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010622 ;
10623 return 0;
10624}
10625_ACEOF
10626rm -f conftest.$ac_objext conftest$ac_exeext
10627if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10628 (eval $ac_link) 2>&5
10629 ac_status=$?
10630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10631 (exit $ac_status); } &&
10632 { ac_try='test -s conftest$ac_exeext'
10633 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10634 (eval $ac_try) 2>&5
10635 ac_status=$?
10636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10637 (exit $ac_status); }; }; then
10638
10639 echo "$as_me:$LINENO: result: yes" >&5
10640echo "${ECHO_T}yes" >&6
10641 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010642#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010643_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010644
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010645 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010646 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010647else
Martin v. Löwis11437992002-04-12 09:54:03 +000010648 echo "$as_me: failed program was:" >&5
10649cat conftest.$ac_ext >&5
10650
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010651 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010652 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10653echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10654if test "${ac_cv_func_pthread_detach+set}" = set; then
10655 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010656else
Martin v. Löwis11437992002-04-12 09:54:03 +000010657 cat >conftest.$ac_ext <<_ACEOF
10658#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010659#include "confdefs.h"
10660/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010661 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010662#include <assert.h>
10663/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010664#ifdef __cplusplus
10665extern "C"
10666#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010667/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010668 builtin and then its argument prototype would still apply. */
10669char pthread_detach ();
10670char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010671
Barry Warsawfe33b792003-01-07 22:42:49 +000010672#ifdef F77_DUMMY_MAIN
10673# ifdef __cplusplus
10674 extern "C"
10675# endif
10676 int F77_DUMMY_MAIN() { return 1; }
10677#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010678int
10679main ()
10680{
Guido van Rossumad678af1998-10-02 14:42:15 +000010681/* The GNU C library defines this for functions which it implements
10682 to always fail with ENOSYS. Some functions are actually named
10683 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010684#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010685choke me
10686#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010687f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +000010688#endif
10689
Martin v. Löwis11437992002-04-12 09:54:03 +000010690 ;
10691 return 0;
10692}
10693_ACEOF
10694rm -f conftest.$ac_objext conftest$ac_exeext
10695if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10696 (eval $ac_link) 2>&5
10697 ac_status=$?
10698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10699 (exit $ac_status); } &&
10700 { ac_try='test -s conftest$ac_exeext'
10701 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10702 (eval $ac_try) 2>&5
10703 ac_status=$?
10704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10705 (exit $ac_status); }; }; then
10706 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010707else
Martin v. Löwis11437992002-04-12 09:54:03 +000010708 echo "$as_me: failed program was:" >&5
10709cat conftest.$ac_ext >&5
10710ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010711fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010712rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010713fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010714echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10715echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10716if test $ac_cv_func_pthread_detach = yes; then
10717 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010718#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010719_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010720
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010721 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010722 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010723else
Guido van Rossumad678af1998-10-02 14:42:15 +000010724
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010725 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10726 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10727echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10728if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10729 echo $ECHO_N "(cached) $ECHO_C" >&6
10730fi
10731echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10732echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10733else
10734 # Is the header compilable?
10735echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10736echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10737cat >conftest.$ac_ext <<_ACEOF
10738#line $LINENO "configure"
10739#include "confdefs.h"
10740$ac_includes_default
10741#include <atheos/threads.h>
10742_ACEOF
10743rm -f conftest.$ac_objext
10744if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10745 (eval $ac_compile) 2>&5
10746 ac_status=$?
10747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10748 (exit $ac_status); } &&
10749 { ac_try='test -s conftest.$ac_objext'
10750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10751 (eval $ac_try) 2>&5
10752 ac_status=$?
10753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10754 (exit $ac_status); }; }; then
10755 ac_header_compiler=yes
10756else
10757 echo "$as_me: failed program was:" >&5
10758cat conftest.$ac_ext >&5
10759ac_header_compiler=no
10760fi
10761rm -f conftest.$ac_objext conftest.$ac_ext
10762echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10763echo "${ECHO_T}$ac_header_compiler" >&6
10764
10765# Is the header present?
10766echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10767echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10768cat >conftest.$ac_ext <<_ACEOF
10769#line $LINENO "configure"
10770#include "confdefs.h"
10771#include <atheos/threads.h>
10772_ACEOF
10773if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10774 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10775 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010776 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010777 rm -f conftest.er1
10778 cat conftest.err >&5
10779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10780 (exit $ac_status); } >/dev/null; then
10781 if test -s conftest.err; then
10782 ac_cpp_err=$ac_c_preproc_warn_flag
10783 else
10784 ac_cpp_err=
10785 fi
10786else
10787 ac_cpp_err=yes
10788fi
10789if test -z "$ac_cpp_err"; then
10790 ac_header_preproc=yes
10791else
10792 echo "$as_me: failed program was:" >&5
10793 cat conftest.$ac_ext >&5
10794 ac_header_preproc=no
10795fi
10796rm -f conftest.err conftest.$ac_ext
10797echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10798echo "${ECHO_T}$ac_header_preproc" >&6
10799
10800# So? What about this header?
10801case $ac_header_compiler:$ac_header_preproc in
10802 yes:no )
10803 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10804echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10805 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10806echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10807 no:yes )
10808 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10809echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10810 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10811echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10812 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10813echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10814esac
10815echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10816echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10817if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10818 echo $ECHO_N "(cached) $ECHO_C" >&6
10819else
10820 ac_cv_header_atheos_threads_h=$ac_header_preproc
10821fi
10822echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10823echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10824
10825fi
10826if test $ac_cv_header_atheos_threads_h = yes; then
10827 cat >>confdefs.h <<\_ACEOF
10828#define WITH_THREAD 1
10829_ACEOF
10830
10831
10832cat >>confdefs.h <<\_ACEOF
10833#define ATHEOS_THREADS 1
10834_ACEOF
10835
10836 THREADOBJ="Python/thread.o"
10837else
10838
Martin v. Löwis11437992002-04-12 09:54:03 +000010839 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10840 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10841echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10842if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10843 echo $ECHO_N "(cached) $ECHO_C" >&6
10844fi
10845echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10846echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010847else
Martin v. Löwis11437992002-04-12 09:54:03 +000010848 # Is the header compilable?
10849echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10850echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10851cat >conftest.$ac_ext <<_ACEOF
10852#line $LINENO "configure"
10853#include "confdefs.h"
10854$ac_includes_default
10855#include <kernel/OS.h>
10856_ACEOF
10857rm -f conftest.$ac_objext
10858if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10859 (eval $ac_compile) 2>&5
10860 ac_status=$?
10861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10862 (exit $ac_status); } &&
10863 { ac_try='test -s conftest.$ac_objext'
10864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10865 (eval $ac_try) 2>&5
10866 ac_status=$?
10867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10868 (exit $ac_status); }; }; then
10869 ac_header_compiler=yes
10870else
10871 echo "$as_me: failed program was:" >&5
10872cat conftest.$ac_ext >&5
10873ac_header_compiler=no
10874fi
10875rm -f conftest.$ac_objext conftest.$ac_ext
10876echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10877echo "${ECHO_T}$ac_header_compiler" >&6
10878
10879# Is the header present?
10880echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10881echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10882cat >conftest.$ac_ext <<_ACEOF
10883#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010884#include "confdefs.h"
10885#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010886_ACEOF
10887if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10888 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10889 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010890 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010891 rm -f conftest.er1
10892 cat conftest.err >&5
10893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10894 (exit $ac_status); } >/dev/null; then
10895 if test -s conftest.err; then
10896 ac_cpp_err=$ac_c_preproc_warn_flag
10897 else
10898 ac_cpp_err=
10899 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010900else
Martin v. Löwis11437992002-04-12 09:54:03 +000010901 ac_cpp_err=yes
10902fi
10903if test -z "$ac_cpp_err"; then
10904 ac_header_preproc=yes
10905else
10906 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010907 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010908 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010909fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010910rm -f conftest.err conftest.$ac_ext
10911echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10912echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010913
Martin v. Löwis11437992002-04-12 09:54:03 +000010914# So? What about this header?
10915case $ac_header_compiler:$ac_header_preproc in
10916 yes:no )
10917 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10918echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10919 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10920echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10921 no:yes )
10922 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10923echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10924 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10925echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10926 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10927echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10928esac
10929echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10930echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10931if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10932 echo $ECHO_N "(cached) $ECHO_C" >&6
10933else
10934 ac_cv_header_kernel_OS_h=$ac_header_preproc
10935fi
10936echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10937echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10938
10939fi
10940if test $ac_cv_header_kernel_OS_h = yes; then
10941 cat >>confdefs.h <<\_ACEOF
10942#define WITH_THREAD 1
10943_ACEOF
10944
10945
10946cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010947#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010948_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010949
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010950 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010951else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010952
Martin v. Löwis11437992002-04-12 09:54:03 +000010953 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10954echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10955if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10956 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010957else
Martin v. Löwis11437992002-04-12 09:54:03 +000010958 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010959LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010960cat >conftest.$ac_ext <<_ACEOF
10961#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010962#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010963
Greg Steinadf63d62000-07-05 10:38:09 +000010964/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010965#ifdef __cplusplus
10966extern "C"
10967#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010968/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010969 builtin and then its argument prototype would still apply. */
10970char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010971#ifdef F77_DUMMY_MAIN
10972# ifdef __cplusplus
10973 extern "C"
10974# endif
10975 int F77_DUMMY_MAIN() { return 1; }
10976#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010977int
10978main ()
10979{
10980pthread_create ();
10981 ;
10982 return 0;
10983}
10984_ACEOF
10985rm -f conftest.$ac_objext conftest$ac_exeext
10986if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10987 (eval $ac_link) 2>&5
10988 ac_status=$?
10989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10990 (exit $ac_status); } &&
10991 { ac_try='test -s conftest$ac_exeext'
10992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10993 (eval $ac_try) 2>&5
10994 ac_status=$?
10995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10996 (exit $ac_status); }; }; then
10997 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010998else
Martin v. Löwis11437992002-04-12 09:54:03 +000010999 echo "$as_me: failed program was:" >&5
11000cat conftest.$ac_ext >&5
11001ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000011002fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011003rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11004LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011005fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011006echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
11007echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
11008if test $ac_cv_lib_pthreads_pthread_create = yes; then
11009 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011010#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011011_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011012
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011013 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011014 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011015 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000011016else
Greg Steinadf63d62000-07-05 10:38:09 +000011017
Martin v. Löwis11437992002-04-12 09:54:03 +000011018 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
11019echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
11020if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
11021 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000011022else
Martin v. Löwis11437992002-04-12 09:54:03 +000011023 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011024LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011025cat >conftest.$ac_ext <<_ACEOF
11026#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000011027#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011028
Guido van Rossum49545951997-12-02 19:28:29 +000011029/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011030#ifdef __cplusplus
11031extern "C"
11032#endif
Guido van Rossum49545951997-12-02 19:28:29 +000011033/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011034 builtin and then its argument prototype would still apply. */
11035char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011036#ifdef F77_DUMMY_MAIN
11037# ifdef __cplusplus
11038 extern "C"
11039# endif
11040 int F77_DUMMY_MAIN() { return 1; }
11041#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011042int
11043main ()
11044{
11045pthread_create ();
11046 ;
11047 return 0;
11048}
11049_ACEOF
11050rm -f conftest.$ac_objext conftest$ac_exeext
11051if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11052 (eval $ac_link) 2>&5
11053 ac_status=$?
11054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11055 (exit $ac_status); } &&
11056 { ac_try='test -s conftest$ac_exeext'
11057 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11058 (eval $ac_try) 2>&5
11059 ac_status=$?
11060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11061 (exit $ac_status); }; }; then
11062 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000011063else
Martin v. Löwis11437992002-04-12 09:54:03 +000011064 echo "$as_me: failed program was:" >&5
11065cat conftest.$ac_ext >&5
11066ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000011067fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011068rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11069LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000011070fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011071echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
11072echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
11073if test $ac_cv_lib_c_r_pthread_create = yes; then
11074 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011075#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011076_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011077
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011078 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011079 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011080 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011081else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011082
Martin v. Löwis11437992002-04-12 09:54:03 +000011083 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
11084echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
11085if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
11086 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011087else
Martin v. Löwis11437992002-04-12 09:54:03 +000011088 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011089LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011090cat >conftest.$ac_ext <<_ACEOF
11091#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011092#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011093
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011094/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011095#ifdef __cplusplus
11096extern "C"
11097#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011098/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011099 builtin and then its argument prototype would still apply. */
11100char __d6_pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011101#ifdef F77_DUMMY_MAIN
11102# ifdef __cplusplus
11103 extern "C"
11104# endif
11105 int F77_DUMMY_MAIN() { return 1; }
11106#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011107int
11108main ()
11109{
11110__d6_pthread_create ();
11111 ;
11112 return 0;
11113}
11114_ACEOF
11115rm -f conftest.$ac_objext conftest$ac_exeext
11116if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11117 (eval $ac_link) 2>&5
11118 ac_status=$?
11119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11120 (exit $ac_status); } &&
11121 { ac_try='test -s conftest$ac_exeext'
11122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11123 (eval $ac_try) 2>&5
11124 ac_status=$?
11125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11126 (exit $ac_status); }; }; then
11127 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011128else
Martin v. Löwis11437992002-04-12 09:54:03 +000011129 echo "$as_me: failed program was:" >&5
11130cat conftest.$ac_ext >&5
11131ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011132fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011133rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11134LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011135fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011136echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
11137echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
11138if test $ac_cv_lib_thread___d6_pthread_create = yes; then
11139 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011140#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011141_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011142
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011143 echo Systems with __d6_pthread_create are not supported anymore.
11144 echo See README
11145 exit 1
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011146 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011147 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011148 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000011149else
Guido van Rossum49545951997-12-02 19:28:29 +000011150
Martin v. Löwis11437992002-04-12 09:54:03 +000011151 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
11152echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
11153if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
11154 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011155else
Martin v. Löwis11437992002-04-12 09:54:03 +000011156 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011157LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011158cat >conftest.$ac_ext <<_ACEOF
11159#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011160#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011161
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011162/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011163#ifdef __cplusplus
11164extern "C"
11165#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011166/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011167 builtin and then its argument prototype would still apply. */
11168char __pthread_create_system ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011169#ifdef F77_DUMMY_MAIN
11170# ifdef __cplusplus
11171 extern "C"
11172# endif
11173 int F77_DUMMY_MAIN() { return 1; }
11174#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011175int
11176main ()
11177{
11178__pthread_create_system ();
11179 ;
11180 return 0;
11181}
11182_ACEOF
11183rm -f conftest.$ac_objext conftest$ac_exeext
11184if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11185 (eval $ac_link) 2>&5
11186 ac_status=$?
11187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11188 (exit $ac_status); } &&
11189 { ac_try='test -s conftest$ac_exeext'
11190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11191 (eval $ac_try) 2>&5
11192 ac_status=$?
11193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11194 (exit $ac_status); }; }; then
11195 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011196else
Martin v. Löwis11437992002-04-12 09:54:03 +000011197 echo "$as_me: failed program was:" >&5
11198cat conftest.$ac_ext >&5
11199ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011200fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011201rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11202LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011203fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011204echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11205echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
11206if test $ac_cv_lib_pthread___pthread_create_system = yes; then
11207 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011208#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011209_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011210
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011211 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011212 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011213 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011214else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011215
Martin v. Löwis11437992002-04-12 09:54:03 +000011216 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
11217echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
11218if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
11219 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000011220else
Martin v. Löwis11437992002-04-12 09:54:03 +000011221 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011222LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011223cat >conftest.$ac_ext <<_ACEOF
11224#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011225#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011226
Guido van Rossumb93a8621998-05-07 13:27:32 +000011227/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011228#ifdef __cplusplus
11229extern "C"
11230#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000011231/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011232 builtin and then its argument prototype would still apply. */
11233char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011234#ifdef F77_DUMMY_MAIN
11235# ifdef __cplusplus
11236 extern "C"
11237# endif
11238 int F77_DUMMY_MAIN() { return 1; }
11239#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011240int
11241main ()
11242{
11243pthread_create ();
11244 ;
11245 return 0;
11246}
11247_ACEOF
11248rm -f conftest.$ac_objext conftest$ac_exeext
11249if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11250 (eval $ac_link) 2>&5
11251 ac_status=$?
11252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11253 (exit $ac_status); } &&
11254 { ac_try='test -s conftest$ac_exeext'
11255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11256 (eval $ac_try) 2>&5
11257 ac_status=$?
11258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11259 (exit $ac_status); }; }; then
11260 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000011261else
Martin v. Löwis11437992002-04-12 09:54:03 +000011262 echo "$as_me: failed program was:" >&5
11263cat conftest.$ac_ext >&5
11264ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011265fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011266rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11267LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011268fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011269echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
11270echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
11271if test $ac_cv_lib_cma_pthread_create = yes; then
11272 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011273#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011274_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011275
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011276 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011277 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011278 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011279else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011280
Martin v. Löwis130fb172001-07-19 11:00:41 +000011281 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000011282fi
11283
Guido van Rossum627b2d71993-12-24 10:39:16 +000011284
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011285fi
11286
Guido van Rossum0be3e491997-05-22 20:33:33 +000011287fi
11288
Guido van Rossum49545951997-12-02 19:28:29 +000011289fi
11290
Guido van Rossumb93a8621998-05-07 13:27:32 +000011291fi
11292
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011293fi
11294
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011295
Michael W. Hudson54241132001-12-07 15:38:26 +000011296fi
11297
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011298
11299fi
11300
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011301fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011302rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11303fi;
11304fi
11305
11306
11307fi
11308
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011309
Michael W. Hudson54241132001-12-07 15:38:26 +000011310
Martin v. Löwis11437992002-04-12 09:54:03 +000011311 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11312echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11313if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11314 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011315else
Martin v. Löwis11437992002-04-12 09:54:03 +000011316 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011317LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011318cat >conftest.$ac_ext <<_ACEOF
11319#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011320#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011321
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011322/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011323#ifdef __cplusplus
11324extern "C"
11325#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011326/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011327 builtin and then its argument prototype would still apply. */
11328char usconfig ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011329#ifdef F77_DUMMY_MAIN
11330# ifdef __cplusplus
11331 extern "C"
11332# endif
11333 int F77_DUMMY_MAIN() { return 1; }
11334#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011335int
11336main ()
11337{
11338usconfig ();
11339 ;
11340 return 0;
11341}
11342_ACEOF
11343rm -f conftest.$ac_objext conftest$ac_exeext
11344if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11345 (eval $ac_link) 2>&5
11346 ac_status=$?
11347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11348 (exit $ac_status); } &&
11349 { ac_try='test -s conftest$ac_exeext'
11350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11351 (eval $ac_try) 2>&5
11352 ac_status=$?
11353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11354 (exit $ac_status); }; }; then
11355 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011356else
Martin v. Löwis11437992002-04-12 09:54:03 +000011357 echo "$as_me: failed program was:" >&5
11358cat conftest.$ac_ext >&5
11359ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011360fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011361rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11362LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011363fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011364echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11365echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11366if test $ac_cv_lib_mpc_usconfig = yes; then
11367 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011368#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011369_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011370
Martin v. Löwis130fb172001-07-19 11:00:41 +000011371 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011372 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011373 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011374fi
11375
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011376
Neal Norwitza978ab02002-11-02 16:58:05 +000011377 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011378 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11379echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11380if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11381 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011382else
Martin v. Löwis11437992002-04-12 09:54:03 +000011383 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011384LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011385cat >conftest.$ac_ext <<_ACEOF
11386#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011387#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011388
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011389/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011390#ifdef __cplusplus
11391extern "C"
11392#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011393/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011394 builtin and then its argument prototype would still apply. */
11395char thr_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011396#ifdef F77_DUMMY_MAIN
11397# ifdef __cplusplus
11398 extern "C"
11399# endif
11400 int F77_DUMMY_MAIN() { return 1; }
11401#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011402int
11403main ()
11404{
11405thr_create ();
11406 ;
11407 return 0;
11408}
11409_ACEOF
11410rm -f conftest.$ac_objext conftest$ac_exeext
11411if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11412 (eval $ac_link) 2>&5
11413 ac_status=$?
11414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11415 (exit $ac_status); } &&
11416 { ac_try='test -s conftest$ac_exeext'
11417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11418 (eval $ac_try) 2>&5
11419 ac_status=$?
11420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11421 (exit $ac_status); }; }; then
11422 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011423else
Martin v. Löwis11437992002-04-12 09:54:03 +000011424 echo "$as_me: failed program was:" >&5
11425cat conftest.$ac_ext >&5
11426ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011427fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011428rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11429LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011430fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011431echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11432echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11433if test $ac_cv_lib_thread_thr_create = yes; then
11434 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011435#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011436_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011437
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011438 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011439 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011440 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011441fi
11442
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011443 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011444
Martin v. Löwis130fb172001-07-19 11:00:41 +000011445 if test "$USE_THREAD_MODULE" != "#"
11446 then
11447 # If the above checks didn't disable threads, (at least) OSF1
11448 # needs this '-threads' argument during linking.
11449 case $ac_sys_system in
11450 OSF1) LDLAST=-threads;;
11451 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011452 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011453fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011454
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011455if test "$posix_threads" = "yes"; then
11456 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011457
11458cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011459#define _POSIX_THREADS 1
11460_ACEOF
11461
11462 fi
11463
11464 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11465 case $ac_sys_system/$ac_sys_release in
11466 SunOS/5.6)
11467cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011468#define HAVE_PTHREAD_DESTRUCTOR 1
11469_ACEOF
11470
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011471 ;;
11472 SunOS/5.8)
11473cat >>confdefs.h <<\_ACEOF
11474#define HAVE_BROKEN_POSIX_SEMAPHORES 1
11475_ACEOF
11476
11477 ;;
11478 esac
11479
11480 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11481echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11482 if test "${ac_cv_pthread_system_supported+set}" = set; then
11483 echo $ECHO_N "(cached) $ECHO_C" >&6
11484else
11485 if test "$cross_compiling" = yes; then
11486 ac_cv_pthread_system_supported=no
11487else
11488 cat >conftest.$ac_ext <<_ACEOF
11489#line $LINENO "configure"
11490#include "confdefs.h"
11491#include <pthread.h>
11492 void *foo(void *parm) {
11493 return NULL;
11494 }
11495 main() {
11496 pthread_attr_t attr;
11497 pthread_t id;
11498 if (pthread_attr_init(&attr)) exit(-1);
11499 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
11500 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
11501 exit(0);
11502 }
11503_ACEOF
11504rm -f conftest$ac_exeext
11505if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11506 (eval $ac_link) 2>&5
11507 ac_status=$?
11508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11509 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11510 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11511 (eval $ac_try) 2>&5
11512 ac_status=$?
11513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11514 (exit $ac_status); }; }; then
11515 ac_cv_pthread_system_supported=yes
11516else
11517 echo "$as_me: program exited with status $ac_status" >&5
11518echo "$as_me: failed program was:" >&5
11519cat conftest.$ac_ext >&5
11520( exit $ac_status )
11521ac_cv_pthread_system_supported=no
11522fi
11523rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11524fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011525
Guido van Rossum627b2d71993-12-24 10:39:16 +000011526fi
11527
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011528 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11529echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
11530 if test "$ac_cv_pthread_system_supported" = "yes"; then
11531
11532cat >>confdefs.h <<\_ACEOF
11533#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
11534_ACEOF
11535
11536 fi
11537
11538for ac_func in pthread_sigmask
11539do
11540as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11541echo "$as_me:$LINENO: checking for $ac_func" >&5
11542echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11543if eval "test \"\${$as_ac_var+set}\" = set"; then
11544 echo $ECHO_N "(cached) $ECHO_C" >&6
11545else
11546 cat >conftest.$ac_ext <<_ACEOF
11547#line $LINENO "configure"
11548#include "confdefs.h"
11549/* System header to define __stub macros and hopefully few prototypes,
11550 which can conflict with char $ac_func (); below. */
11551#include <assert.h>
11552/* Override any gcc2 internal prototype to avoid an error. */
11553#ifdef __cplusplus
11554extern "C"
11555#endif
11556/* We use char because int might match the return type of a gcc2
11557 builtin and then its argument prototype would still apply. */
11558char $ac_func ();
11559char (*f) ();
11560
11561#ifdef F77_DUMMY_MAIN
11562# ifdef __cplusplus
11563 extern "C"
11564# endif
11565 int F77_DUMMY_MAIN() { return 1; }
11566#endif
11567int
11568main ()
11569{
11570/* The GNU C library defines this for functions which it implements
11571 to always fail with ENOSYS. Some functions are actually named
11572 something starting with __ and the normal name is an alias. */
11573#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11574choke me
11575#else
11576f = $ac_func;
11577#endif
11578
11579 ;
11580 return 0;
11581}
11582_ACEOF
11583rm -f conftest.$ac_objext conftest$ac_exeext
11584if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11585 (eval $ac_link) 2>&5
11586 ac_status=$?
11587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11588 (exit $ac_status); } &&
11589 { ac_try='test -s conftest$ac_exeext'
11590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11591 (eval $ac_try) 2>&5
11592 ac_status=$?
11593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11594 (exit $ac_status); }; }; then
11595 eval "$as_ac_var=yes"
11596else
11597 echo "$as_me: failed program was:" >&5
11598cat conftest.$ac_ext >&5
11599eval "$as_ac_var=no"
11600fi
11601rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11602fi
11603echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11604echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11605if test `eval echo '${'$as_ac_var'}'` = yes; then
11606 cat >>confdefs.h <<_ACEOF
11607#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11608_ACEOF
11609
11610fi
11611done
11612
11613fi
11614
11615
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011616# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011617
11618
11619echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11620echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011621# Check whether --enable-ipv6 or --disable-ipv6 was given.
11622if test "${enable_ipv6+set}" = set; then
11623 enableval="$enable_ipv6"
11624 case "$enableval" in
11625 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011626 echo "$as_me:$LINENO: result: no" >&5
11627echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011628 ipv6=no
11629 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011630 *) echo "$as_me:$LINENO: result: yes" >&5
11631echo "${ECHO_T}yes" >&6
11632 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011633#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011634_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011635
11636 ipv6=yes
11637 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011638 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011639else
Martin v. Löwis11437992002-04-12 09:54:03 +000011640
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011641 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011642 echo "$as_me:$LINENO: result: no" >&5
11643echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011644 ipv6=no
11645
11646else
Martin v. Löwis11437992002-04-12 09:54:03 +000011647 cat >conftest.$ac_ext <<_ACEOF
11648#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011649#include "confdefs.h"
11650 /* AF_INET6 available check */
11651#include <sys/types.h>
11652#include <sys/socket.h>
11653main()
11654{
11655 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11656 exit(1);
11657 else
11658 exit(0);
11659}
11660
Martin v. Löwis11437992002-04-12 09:54:03 +000011661_ACEOF
11662rm -f conftest$ac_exeext
11663if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11664 (eval $ac_link) 2>&5
11665 ac_status=$?
11666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11667 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11669 (eval $ac_try) 2>&5
11670 ac_status=$?
11671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11672 (exit $ac_status); }; }; then
11673 echo "$as_me:$LINENO: result: yes" >&5
11674echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011675 ipv6=yes
11676else
Martin v. Löwis11437992002-04-12 09:54:03 +000011677 echo "$as_me: program exited with status $ac_status" >&5
11678echo "$as_me: failed program was:" >&5
11679cat conftest.$ac_ext >&5
11680( exit $ac_status )
11681echo "$as_me:$LINENO: result: no" >&5
11682echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011683 ipv6=no
11684fi
Barry Warsawfe33b792003-01-07 22:42:49 +000011685rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011686fi
11687
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011688if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011689 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11690echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11691 cat >conftest.$ac_ext <<_ACEOF
11692#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011693#include "confdefs.h"
11694#include <sys/types.h>
11695#include <netinet/in.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000011696#ifdef F77_DUMMY_MAIN
11697# ifdef __cplusplus
11698 extern "C"
11699# endif
11700 int F77_DUMMY_MAIN() { return 1; }
11701#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011702int
11703main ()
11704{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011705struct sockaddr_in6 x;
11706x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011707 ;
11708 return 0;
11709}
11710_ACEOF
11711rm -f conftest.$ac_objext
11712if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11713 (eval $ac_compile) 2>&5
11714 ac_status=$?
11715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11716 (exit $ac_status); } &&
11717 { ac_try='test -s conftest.$ac_objext'
11718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11719 (eval $ac_try) 2>&5
11720 ac_status=$?
11721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11722 (exit $ac_status); }; }; then
11723 echo "$as_me:$LINENO: result: yes" >&5
11724echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011725 ipv6=yes
11726else
Martin v. Löwis11437992002-04-12 09:54:03 +000011727 echo "$as_me: failed program was:" >&5
11728cat conftest.$ac_ext >&5
11729echo "$as_me:$LINENO: result: no" >&5
11730echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011731 ipv6=no
11732fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011733rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011734fi
11735
11736if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011737 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011738#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011739_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011740
11741fi
11742
Martin v. Löwis11437992002-04-12 09:54:03 +000011743fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011744
11745ipv6type=unknown
11746ipv6lib=none
11747ipv6trylibc=no
11748
11749if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011750 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11751echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011752 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11753 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011754 case $i in
11755 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011756 cat >conftest.$ac_ext <<_ACEOF
11757#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011758#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011759
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011760#include <netinet/in.h>
11761#ifdef IPV6_INRIA_VERSION
11762yes
11763#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011764_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011765if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011766 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011767 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011768fi
11769rm -f conftest*
11770
11771 ;;
11772 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011773 cat >conftest.$ac_ext <<_ACEOF
11774#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011775#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011776
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011777#include <netinet/in.h>
11778#ifdef __KAME__
11779yes
11780#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011781_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011782if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011783 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011784 ipv6type=$i;
11785 ipv6lib=inet6
11786 ipv6libdir=/usr/local/v6/lib
11787 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011788fi
11789rm -f conftest*
11790
11791 ;;
11792 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011793 cat >conftest.$ac_ext <<_ACEOF
11794#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011795#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011796
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011797#include <features.h>
11798#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11799yes
11800#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011801_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011802if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011803 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011804 ipv6type=$i;
11805 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011806fi
11807rm -f conftest*
11808
11809 ;;
11810 linux-inet6)
11811 if test -d /usr/inet6; then
11812 ipv6type=$i
11813 ipv6lib=inet6
11814 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011815 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011816 fi
11817 ;;
11818 solaris)
11819 if test -f /etc/netconfig; then
11820 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11821 ipv6type=$i
11822 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011823 fi
11824 fi
11825 ;;
11826 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011827 cat >conftest.$ac_ext <<_ACEOF
11828#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011829#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011830
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011831#include <sys/param.h>
11832#ifdef _TOSHIBA_INET6
11833yes
11834#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011835_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011836if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011837 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011838 ipv6type=$i;
11839 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011840 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011841fi
11842rm -f conftest*
11843
11844 ;;
11845 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011846 cat >conftest.$ac_ext <<_ACEOF
11847#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011848#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011849
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011850#include </usr/local/v6/include/sys/v6config.h>
11851#ifdef __V6D__
11852yes
11853#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011854_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011855if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011856 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011857 ipv6type=$i;
11858 ipv6lib=v6;
11859 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011860 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011861fi
11862rm -f conftest*
11863
11864 ;;
11865 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011866 cat >conftest.$ac_ext <<_ACEOF
11867#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011868#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011869
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011870#include <sys/param.h>
11871#ifdef _ZETA_MINAMI_INET6
11872yes
11873#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011874_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011875if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011876 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011877 ipv6type=$i;
11878 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011879 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011880fi
11881rm -f conftest*
11882
11883 ;;
11884 esac
11885 if test "$ipv6type" != "unknown"; then
11886 break
11887 fi
11888 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011889 echo "$as_me:$LINENO: result: $ipv6type" >&5
11890echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011891fi
11892
11893if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11894 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11895 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11896 echo "using lib$ipv6lib"
11897 else
11898 if test $ipv6trylibc = "yes"; then
11899 echo "using libc"
11900 else
11901 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11902 echo "You need to fetch lib$ipv6lib.a from appropriate"
11903 echo 'ipv6 kit and compile beforehand.'
11904 exit 1
11905 fi
11906 fi
11907fi
11908
Jack Jansen7b8c7542002-04-14 20:12:41 +000011909# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000011910echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
11911echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000011912
11913# Check whether --with-universal-newlines or --without-universal-newlines was given.
11914if test "${with_universal_newlines+set}" = set; then
11915 withval="$with_universal_newlines"
11916
11917fi;
11918
11919if test -z "$with_universal_newlines"
11920then with_universal_newlines="yes"
11921fi
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011922if test "$with_universal_newlines" = "no"
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011923then
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011924 echo --without-universal-newlines is unsupported, see README
11925 exit 1
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011926else
Martin v. Löwise8aea582002-04-16 05:51:02 +000011927
11928cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011929#define WITH_UNIVERSAL_NEWLINES 1
11930_ACEOF
11931
11932fi
11933echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11934echo "${ECHO_T}$with_universal_newlines" >&6
11935
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011936# Check for --with-doc-strings
11937echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11938echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11939
11940# Check whether --with-doc-strings or --without-doc-strings was given.
11941if test "${with_doc_strings+set}" = set; then
11942 withval="$with_doc_strings"
11943
11944fi;
11945
11946if test -z "$with_doc_strings"
11947then with_doc_strings="yes"
11948fi
11949if test "$with_doc_strings" != "no"
11950then
11951
11952cat >>confdefs.h <<\_ACEOF
11953#define WITH_DOC_STRINGS 1
11954_ACEOF
11955
11956fi
11957echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11958echo "${ECHO_T}$with_doc_strings" >&6
11959
Neil Schemenauera35c6882001-02-27 04:45:05 +000011960# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011961echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11962echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11963
Neil Schemenauera35c6882001-02-27 04:45:05 +000011964# Check whether --with-pymalloc or --without-pymalloc was given.
11965if test "${with_pymalloc+set}" = set; then
11966 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011967
Martin v. Löwis11437992002-04-12 09:54:03 +000011968fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011969
Neil Schemenauer16c22972002-03-22 15:34:49 +000011970if test -z "$with_pymalloc"
11971then with_pymalloc="yes"
11972fi
11973if test "$with_pymalloc" != "no"
11974then
Martin v. Löwis11437992002-04-12 09:54:03 +000011975
11976cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011977#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011978_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011979
11980fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011981echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11982echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011983
Barry Warsawef82cd72000-06-30 16:21:01 +000011984# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011985echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11986echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11987
Barry Warsawef82cd72000-06-30 16:21:01 +000011988# Check whether --with-wctype-functions or --without-wctype-functions was given.
11989if test "${with_wctype_functions+set}" = set; then
11990 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011991
Barry Warsawef82cd72000-06-30 16:21:01 +000011992if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011993then
11994
11995cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011996#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011997_ACEOF
11998
11999 echo "$as_me:$LINENO: result: yes" >&5
12000echo "${ECHO_T}yes" >&6
12001else echo "$as_me:$LINENO: result: no" >&5
12002echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000012003fi
12004else
Martin v. Löwis11437992002-04-12 09:54:03 +000012005 echo "$as_me:$LINENO: result: no" >&5
12006echo "${ECHO_T}no" >&6
12007fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000012008
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012009# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000012010
Guido van Rossum98935bf2001-09-05 19:13:16 +000012011DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000012012
Martin v. Löwis11437992002-04-12 09:54:03 +000012013echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
12014echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
12015
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012016# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012017if test "${with_sgi_dl+set}" = set; then
12018 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000012019
12020echo "$as_me:$LINENO: result: $withval" >&5
12021echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000012022echo --with-sgi-dl is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000012023exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012024
12025cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012026#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012027_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000012028
Guido van Rossume97ee181999-12-20 21:27:22 +000012029DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012030dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000012031if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000012032then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000012033else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
12034echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
12035 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012036fi
12037DLINCLDIR=${dldir}
12038LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000012039else
Martin v. Löwis11437992002-04-12 09:54:03 +000012040 echo "$as_me:$LINENO: result: no" >&5
12041echo "${ECHO_T}no" >&6
12042fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000012043
Martin v. Löwis11437992002-04-12 09:54:03 +000012044echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
12045echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000012046
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012047# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012048if test "${with_dl_dld+set}" = set; then
12049 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000012050
12051echo "$as_me:$LINENO: result: $withval" >&5
12052echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000012053echo --with-dl-dld is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000012054exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012055
12056cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012057#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012058_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000012059
Guido van Rossume97ee181999-12-20 21:27:22 +000012060DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012061dldir=`echo "$withval" | sed 's/,.*//'`
12062dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000012063if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000012064then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012065else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&5
12066echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&2;}
12067 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012068fi
12069DLINCLDIR=${dldir}
12070LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000012071else
Martin v. Löwis11437992002-04-12 09:54:03 +000012072 echo "$as_me:$LINENO: result: no" >&5
12073echo "${ECHO_T}no" >&6
12074fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000012075
Guido van Rossume97ee181999-12-20 21:27:22 +000012076# the dlopen() function means we might want to use dynload_shlib.o. some
12077# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012078
Thomas Wouters3a584202000-08-05 23:28:51 +000012079for ac_func in dlopen
12080do
Martin v. Löwis11437992002-04-12 09:54:03 +000012081as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12082echo "$as_me:$LINENO: checking for $ac_func" >&5
12083echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12084if eval "test \"\${$as_ac_var+set}\" = set"; then
12085 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012086else
Martin v. Löwis11437992002-04-12 09:54:03 +000012087 cat >conftest.$ac_ext <<_ACEOF
12088#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000012089#include "confdefs.h"
12090/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012091 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000012092#include <assert.h>
12093/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012094#ifdef __cplusplus
12095extern "C"
12096#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012097/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012098 builtin and then its argument prototype would still apply. */
12099char $ac_func ();
12100char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000012101
Barry Warsawfe33b792003-01-07 22:42:49 +000012102#ifdef F77_DUMMY_MAIN
12103# ifdef __cplusplus
12104 extern "C"
12105# endif
12106 int F77_DUMMY_MAIN() { return 1; }
12107#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012108int
12109main ()
12110{
Guido van Rossume97ee181999-12-20 21:27:22 +000012111/* The GNU C library defines this for functions which it implements
12112 to always fail with ENOSYS. Some functions are actually named
12113 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012114#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000012115choke me
12116#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012117f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000012118#endif
12119
Martin v. Löwis11437992002-04-12 09:54:03 +000012120 ;
12121 return 0;
12122}
12123_ACEOF
12124rm -f conftest.$ac_objext conftest$ac_exeext
12125if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12126 (eval $ac_link) 2>&5
12127 ac_status=$?
12128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12129 (exit $ac_status); } &&
12130 { ac_try='test -s conftest$ac_exeext'
12131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12132 (eval $ac_try) 2>&5
12133 ac_status=$?
12134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12135 (exit $ac_status); }; }; then
12136 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012137else
Martin v. Löwis11437992002-04-12 09:54:03 +000012138 echo "$as_me: failed program was:" >&5
12139cat conftest.$ac_ext >&5
12140eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012141fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012142rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012143fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012144echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12145echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12146if test `eval echo '${'$as_ac_var'}'` = yes; then
12147 cat >>confdefs.h <<_ACEOF
12148#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12149_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012150
Guido van Rossume97ee181999-12-20 21:27:22 +000012151fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012152done
Guido van Rossume97ee181999-12-20 21:27:22 +000012153
Michael W. Hudson54241132001-12-07 15:38:26 +000012154
Guido van Rossume97ee181999-12-20 21:27:22 +000012155# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12156# loading of modules.
12157
Martin v. Löwis11437992002-04-12 09:54:03 +000012158echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
12159echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012160if test -z "$DYNLOADFILE"
12161then
12162 case $ac_sys_system/$ac_sys_release in
12163 AIX*) DYNLOADFILE="dynload_aix.o";;
12164 BeOS*) DYNLOADFILE="dynload_beos.o";;
12165 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000012166 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012167 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000012168 *)
12169 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
12170 # out any dynamic loading
12171 if test "$ac_cv_func_dlopen" = yes
12172 then DYNLOADFILE="dynload_shlib.o"
12173 else DYNLOADFILE="dynload_stub.o"
12174 fi
12175 ;;
12176 esac
12177fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012178echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
12179echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012180if test "$DYNLOADFILE" != "dynload_stub.o"
12181then
Martin v. Löwis11437992002-04-12 09:54:03 +000012182
12183cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012184#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012185_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012186
12187fi
12188
Neil Schemenauer4e425612001-06-19 15:44:15 +000012189# MACHDEP_OBJS can be set to platform-specific object files needed by Python
12190
Michael W. Hudson54241132001-12-07 15:38:26 +000012191
Martin v. Löwis11437992002-04-12 09:54:03 +000012192echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
12193echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012194if test -z "$MACHDEP_OBJS"
12195then
Jack Jansene578a632001-08-15 01:27:14 +000012196 MACHDEP_OBJS=$extra_machdep_objs
12197else
12198 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000012199fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012200echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
12201echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012202
Guido van Rossum627b2d71993-12-24 10:39:16 +000012203# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012204
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
12274
12275
12276
Martin v. Löwis9c36c292002-12-21 18:34:06 +000012277
Martin v. Löwisd5843682002-11-21 20:41:28 +000012278for ac_func in alarm chown clock confstr ctermid execv \
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012279 fchdir fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012280 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
12281 getpriority getpwent getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000012282 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000012283 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000012284 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000012285 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000012286 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012287 sigaction siginterrupt sigrelse strftime strptime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000012288 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012289 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000012290do
Martin v. Löwis11437992002-04-12 09:54:03 +000012291as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12292echo "$as_me:$LINENO: checking for $ac_func" >&5
12293echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12294if eval "test \"\${$as_ac_var+set}\" = set"; then
12295 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012296else
Martin v. Löwis11437992002-04-12 09:54:03 +000012297 cat >conftest.$ac_ext <<_ACEOF
12298#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012299#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012300/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012301 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012302#include <assert.h>
12303/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012304#ifdef __cplusplus
12305extern "C"
12306#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012307/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012308 builtin and then its argument prototype would still apply. */
12309char $ac_func ();
12310char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012311
Barry Warsawfe33b792003-01-07 22:42:49 +000012312#ifdef F77_DUMMY_MAIN
12313# ifdef __cplusplus
12314 extern "C"
12315# endif
12316 int F77_DUMMY_MAIN() { return 1; }
12317#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012318int
12319main ()
12320{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012321/* The GNU C library defines this for functions which it implements
12322 to always fail with ENOSYS. Some functions are actually named
12323 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012324#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012325choke me
12326#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012327f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012328#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012329
Martin v. Löwis11437992002-04-12 09:54:03 +000012330 ;
12331 return 0;
12332}
12333_ACEOF
12334rm -f conftest.$ac_objext conftest$ac_exeext
12335if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12336 (eval $ac_link) 2>&5
12337 ac_status=$?
12338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12339 (exit $ac_status); } &&
12340 { ac_try='test -s conftest$ac_exeext'
12341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12342 (eval $ac_try) 2>&5
12343 ac_status=$?
12344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12345 (exit $ac_status); }; }; then
12346 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012347else
Martin v. Löwis11437992002-04-12 09:54:03 +000012348 echo "$as_me: failed program was:" >&5
12349cat conftest.$ac_ext >&5
12350eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012351fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012352rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012353fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012354echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12355echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12356if test `eval echo '${'$as_ac_var'}'` = yes; then
12357 cat >>confdefs.h <<_ACEOF
12358#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12359_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012360
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012361fi
12362done
12363
Michael W. Hudson54241132001-12-07 15:38:26 +000012364
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012365# For some functions, having a definition is not sufficient, since
12366# we want to take their address.
12367echo "$as_me:$LINENO: checking for chroot" >&5
12368echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12369cat >conftest.$ac_ext <<_ACEOF
12370#line $LINENO "configure"
12371#include "confdefs.h"
12372#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012373#ifdef F77_DUMMY_MAIN
12374# ifdef __cplusplus
12375 extern "C"
12376# endif
12377 int F77_DUMMY_MAIN() { return 1; }
12378#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012379int
12380main ()
12381{
12382void *x=chroot
12383 ;
12384 return 0;
12385}
12386_ACEOF
12387rm -f conftest.$ac_objext
12388if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12389 (eval $ac_compile) 2>&5
12390 ac_status=$?
12391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12392 (exit $ac_status); } &&
12393 { ac_try='test -s conftest.$ac_objext'
12394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12395 (eval $ac_try) 2>&5
12396 ac_status=$?
12397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12398 (exit $ac_status); }; }; then
12399
12400cat >>confdefs.h <<\_ACEOF
12401#define HAVE_CHROOT 1
12402_ACEOF
12403
12404 echo "$as_me:$LINENO: result: yes" >&5
12405echo "${ECHO_T}yes" >&6
12406else
12407 echo "$as_me: failed program was:" >&5
12408cat conftest.$ac_ext >&5
12409echo "$as_me:$LINENO: result: no" >&5
12410echo "${ECHO_T}no" >&6
12411
12412fi
12413rm -f conftest.$ac_objext conftest.$ac_ext
12414echo "$as_me:$LINENO: checking for link" >&5
12415echo $ECHO_N "checking for link... $ECHO_C" >&6
12416cat >conftest.$ac_ext <<_ACEOF
12417#line $LINENO "configure"
12418#include "confdefs.h"
12419#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012420#ifdef F77_DUMMY_MAIN
12421# ifdef __cplusplus
12422 extern "C"
12423# endif
12424 int F77_DUMMY_MAIN() { return 1; }
12425#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012426int
12427main ()
12428{
12429void *x=link
12430 ;
12431 return 0;
12432}
12433_ACEOF
12434rm -f conftest.$ac_objext
12435if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12436 (eval $ac_compile) 2>&5
12437 ac_status=$?
12438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12439 (exit $ac_status); } &&
12440 { ac_try='test -s conftest.$ac_objext'
12441 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12442 (eval $ac_try) 2>&5
12443 ac_status=$?
12444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12445 (exit $ac_status); }; }; then
12446
12447cat >>confdefs.h <<\_ACEOF
12448#define HAVE_LINK 1
12449_ACEOF
12450
12451 echo "$as_me:$LINENO: result: yes" >&5
12452echo "${ECHO_T}yes" >&6
12453else
12454 echo "$as_me: failed program was:" >&5
12455cat conftest.$ac_ext >&5
12456echo "$as_me:$LINENO: result: no" >&5
12457echo "${ECHO_T}no" >&6
12458
12459fi
12460rm -f conftest.$ac_objext conftest.$ac_ext
12461echo "$as_me:$LINENO: checking for symlink" >&5
12462echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12463cat >conftest.$ac_ext <<_ACEOF
12464#line $LINENO "configure"
12465#include "confdefs.h"
12466#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012467#ifdef F77_DUMMY_MAIN
12468# ifdef __cplusplus
12469 extern "C"
12470# endif
12471 int F77_DUMMY_MAIN() { return 1; }
12472#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012473int
12474main ()
12475{
12476void *x=symlink
12477 ;
12478 return 0;
12479}
12480_ACEOF
12481rm -f conftest.$ac_objext
12482if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12483 (eval $ac_compile) 2>&5
12484 ac_status=$?
12485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12486 (exit $ac_status); } &&
12487 { ac_try='test -s conftest.$ac_objext'
12488 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12489 (eval $ac_try) 2>&5
12490 ac_status=$?
12491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12492 (exit $ac_status); }; }; then
12493
12494cat >>confdefs.h <<\_ACEOF
12495#define HAVE_SYMLINK 1
12496_ACEOF
12497
12498 echo "$as_me:$LINENO: result: yes" >&5
12499echo "${ECHO_T}yes" >&6
12500else
12501 echo "$as_me: failed program was:" >&5
12502cat conftest.$ac_ext >&5
12503echo "$as_me:$LINENO: result: no" >&5
12504echo "${ECHO_T}no" >&6
12505
12506fi
12507rm -f conftest.$ac_objext conftest.$ac_ext
12508
Martin v. Löwisd5843682002-11-21 20:41:28 +000012509# On some systems (eg. FreeBSD 5), we would find a definition of the
12510# functions ctermid_r, setgroups in the library, but no prototype
12511# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12512# address to avoid compiler warnings and potential miscompilations
12513# because of the missing prototypes.
12514
12515echo "$as_me:$LINENO: checking for ctermid_r" >&5
12516echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
12517cat >conftest.$ac_ext <<_ACEOF
12518#line $LINENO "configure"
12519#include "confdefs.h"
12520
12521#include "confdefs.h"
12522#include <stdio.h>
12523
Barry Warsawfe33b792003-01-07 22:42:49 +000012524#ifdef F77_DUMMY_MAIN
12525# ifdef __cplusplus
12526 extern "C"
12527# endif
12528 int F77_DUMMY_MAIN() { return 1; }
12529#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012530int
12531main ()
12532{
12533void* p = ctermid_r
12534 ;
12535 return 0;
12536}
12537_ACEOF
12538rm -f conftest.$ac_objext
12539if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12540 (eval $ac_compile) 2>&5
12541 ac_status=$?
12542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12543 (exit $ac_status); } &&
12544 { ac_try='test -s conftest.$ac_objext'
12545 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12546 (eval $ac_try) 2>&5
12547 ac_status=$?
12548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12549 (exit $ac_status); }; }; then
12550
12551cat >>confdefs.h <<\_ACEOF
12552#define HAVE_CTERMID_R 1
12553_ACEOF
12554
12555 echo "$as_me:$LINENO: result: yes" >&5
12556echo "${ECHO_T}yes" >&6
12557else
12558 echo "$as_me: failed program was:" >&5
12559cat conftest.$ac_ext >&5
12560echo "$as_me:$LINENO: result: no" >&5
12561echo "${ECHO_T}no" >&6
12562
12563fi
12564rm -f conftest.$ac_objext conftest.$ac_ext
12565
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012566echo "$as_me:$LINENO: checking for flock" >&5
12567echo $ECHO_N "checking for flock... $ECHO_C" >&6
12568cat >conftest.$ac_ext <<_ACEOF
12569#line $LINENO "configure"
12570#include "confdefs.h"
12571
12572#include "confdefs.h"
12573#include <sys/file.h>
12574
12575#ifdef F77_DUMMY_MAIN
12576# ifdef __cplusplus
12577 extern "C"
12578# endif
12579 int F77_DUMMY_MAIN() { return 1; }
12580#endif
12581int
12582main ()
12583{
12584void* p = flock
12585 ;
12586 return 0;
12587}
12588_ACEOF
12589rm -f conftest.$ac_objext
12590if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12591 (eval $ac_compile) 2>&5
12592 ac_status=$?
12593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12594 (exit $ac_status); } &&
12595 { ac_try='test -s conftest.$ac_objext'
12596 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12597 (eval $ac_try) 2>&5
12598 ac_status=$?
12599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12600 (exit $ac_status); }; }; then
12601
12602cat >>confdefs.h <<\_ACEOF
12603#define HAVE_FLOCK 1
12604_ACEOF
12605
12606 echo "$as_me:$LINENO: result: yes" >&5
12607echo "${ECHO_T}yes" >&6
12608else
12609 echo "$as_me: failed program was:" >&5
12610cat conftest.$ac_ext >&5
12611echo "$as_me:$LINENO: result: no" >&5
12612echo "${ECHO_T}no" >&6
12613
12614fi
12615rm -f conftest.$ac_objext conftest.$ac_ext
12616
12617echo "$as_me:$LINENO: checking for getpagesize" >&5
12618echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
12619cat >conftest.$ac_ext <<_ACEOF
12620#line $LINENO "configure"
12621#include "confdefs.h"
12622
12623#include "confdefs.h"
12624#include <unistd.h>
12625
12626#ifdef F77_DUMMY_MAIN
12627# ifdef __cplusplus
12628 extern "C"
12629# endif
12630 int F77_DUMMY_MAIN() { return 1; }
12631#endif
12632int
12633main ()
12634{
12635void* p = getpagesize
12636 ;
12637 return 0;
12638}
12639_ACEOF
12640rm -f conftest.$ac_objext
12641if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12642 (eval $ac_compile) 2>&5
12643 ac_status=$?
12644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12645 (exit $ac_status); } &&
12646 { ac_try='test -s conftest.$ac_objext'
12647 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12648 (eval $ac_try) 2>&5
12649 ac_status=$?
12650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12651 (exit $ac_status); }; }; then
12652
12653cat >>confdefs.h <<\_ACEOF
12654#define HAVE_GETPAGESIZE 1
12655_ACEOF
12656
12657 echo "$as_me:$LINENO: result: yes" >&5
12658echo "${ECHO_T}yes" >&6
12659else
12660 echo "$as_me: failed program was:" >&5
12661cat conftest.$ac_ext >&5
12662echo "$as_me:$LINENO: result: no" >&5
12663echo "${ECHO_T}no" >&6
12664
12665fi
12666rm -f conftest.$ac_objext conftest.$ac_ext
12667
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012668for ac_prog in true
12669do
12670 # Extract the first word of "$ac_prog", so it can be a program name with args.
12671set dummy $ac_prog; ac_word=$2
12672echo "$as_me:$LINENO: checking for $ac_word" >&5
12673echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12674if test "${ac_cv_prog_TRUE+set}" = set; then
12675 echo $ECHO_N "(cached) $ECHO_C" >&6
12676else
12677 if test -n "$TRUE"; then
12678 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12679else
12680as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12681for as_dir in $PATH
12682do
12683 IFS=$as_save_IFS
12684 test -z "$as_dir" && as_dir=.
12685 for ac_exec_ext in '' $ac_executable_extensions; do
12686 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12687 ac_cv_prog_TRUE="$ac_prog"
12688 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12689 break 2
12690 fi
12691done
12692done
12693
12694fi
12695fi
12696TRUE=$ac_cv_prog_TRUE
12697if test -n "$TRUE"; then
12698 echo "$as_me:$LINENO: result: $TRUE" >&5
12699echo "${ECHO_T}$TRUE" >&6
12700else
12701 echo "$as_me:$LINENO: result: no" >&5
12702echo "${ECHO_T}no" >&6
12703fi
12704
12705 test -n "$TRUE" && break
12706done
12707test -n "$TRUE" || TRUE="/bin/true"
12708
12709
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012710echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
12711echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
12712if test "${ac_cv_lib_c_inet_aton+set}" = set; then
12713 echo $ECHO_N "(cached) $ECHO_C" >&6
12714else
12715 ac_check_lib_save_LIBS=$LIBS
12716LIBS="-lc $LIBS"
12717cat >conftest.$ac_ext <<_ACEOF
12718#line $LINENO "configure"
12719#include "confdefs.h"
12720
12721/* Override any gcc2 internal prototype to avoid an error. */
12722#ifdef __cplusplus
12723extern "C"
12724#endif
12725/* We use char because int might match the return type of a gcc2
12726 builtin and then its argument prototype would still apply. */
12727char inet_aton ();
12728#ifdef F77_DUMMY_MAIN
12729# ifdef __cplusplus
12730 extern "C"
12731# endif
12732 int F77_DUMMY_MAIN() { return 1; }
12733#endif
12734int
12735main ()
12736{
12737inet_aton ();
12738 ;
12739 return 0;
12740}
12741_ACEOF
12742rm -f conftest.$ac_objext conftest$ac_exeext
12743if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12744 (eval $ac_link) 2>&5
12745 ac_status=$?
12746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12747 (exit $ac_status); } &&
12748 { ac_try='test -s conftest$ac_exeext'
12749 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12750 (eval $ac_try) 2>&5
12751 ac_status=$?
12752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12753 (exit $ac_status); }; }; then
12754 ac_cv_lib_c_inet_aton=yes
12755else
12756 echo "$as_me: failed program was:" >&5
12757cat conftest.$ac_ext >&5
12758ac_cv_lib_c_inet_aton=no
12759fi
12760rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12761LIBS=$ac_check_lib_save_LIBS
12762fi
12763echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
12764echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
12765if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012766 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012767else
12768
12769echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
12770echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
12771if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
12772 echo $ECHO_N "(cached) $ECHO_C" >&6
12773else
12774 ac_check_lib_save_LIBS=$LIBS
12775LIBS="-lresolv $LIBS"
12776cat >conftest.$ac_ext <<_ACEOF
12777#line $LINENO "configure"
12778#include "confdefs.h"
12779
12780/* Override any gcc2 internal prototype to avoid an error. */
12781#ifdef __cplusplus
12782extern "C"
12783#endif
12784/* We use char because int might match the return type of a gcc2
12785 builtin and then its argument prototype would still apply. */
12786char inet_aton ();
12787#ifdef F77_DUMMY_MAIN
12788# ifdef __cplusplus
12789 extern "C"
12790# endif
12791 int F77_DUMMY_MAIN() { return 1; }
12792#endif
12793int
12794main ()
12795{
12796inet_aton ();
12797 ;
12798 return 0;
12799}
12800_ACEOF
12801rm -f conftest.$ac_objext conftest$ac_exeext
12802if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12803 (eval $ac_link) 2>&5
12804 ac_status=$?
12805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12806 (exit $ac_status); } &&
12807 { ac_try='test -s conftest$ac_exeext'
12808 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12809 (eval $ac_try) 2>&5
12810 ac_status=$?
12811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12812 (exit $ac_status); }; }; then
12813 ac_cv_lib_resolv_inet_aton=yes
12814else
12815 echo "$as_me: failed program was:" >&5
12816cat conftest.$ac_ext >&5
12817ac_cv_lib_resolv_inet_aton=no
12818fi
12819rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12820LIBS=$ac_check_lib_save_LIBS
12821fi
12822echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
12823echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
12824if test $ac_cv_lib_resolv_inet_aton = yes; then
12825 cat >>confdefs.h <<_ACEOF
12826#define HAVE_LIBRESOLV 1
12827_ACEOF
12828
12829 LIBS="-lresolv $LIBS"
12830
12831fi
12832
12833
12834fi
12835
12836
Martin v. Löwise9416172003-05-03 10:12:45 +000012837echo "$as_me:$LINENO: checking for hstrerror" >&5
12838echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
12839cat >conftest.$ac_ext <<_ACEOF
12840#line $LINENO "configure"
12841#include "confdefs.h"
12842
12843#include "confdefs.h"
12844#include <netdb.h>
12845
12846#ifdef F77_DUMMY_MAIN
12847# ifdef __cplusplus
12848 extern "C"
12849# endif
12850 int F77_DUMMY_MAIN() { return 1; }
12851#endif
12852int
12853main ()
12854{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012855void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012856 ;
12857 return 0;
12858}
12859_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012860rm -f conftest.$ac_objext conftest$ac_exeext
12861if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12862 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000012863 ac_status=$?
12864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12865 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012866 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000012867 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12868 (eval $ac_try) 2>&5
12869 ac_status=$?
12870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12871 (exit $ac_status); }; }; then
12872
12873cat >>confdefs.h <<\_ACEOF
12874#define HAVE_HSTRERROR 1
12875_ACEOF
12876
12877 echo "$as_me:$LINENO: result: yes" >&5
12878echo "${ECHO_T}yes" >&6
12879else
12880 echo "$as_me: failed program was:" >&5
12881cat conftest.$ac_ext >&5
12882echo "$as_me:$LINENO: result: no" >&5
12883echo "${ECHO_T}no" >&6
12884
12885fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012886rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012887
12888echo "$as_me:$LINENO: checking for inet_aton" >&5
12889echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
12890cat >conftest.$ac_ext <<_ACEOF
12891#line $LINENO "configure"
12892#include "confdefs.h"
12893
12894#include "confdefs.h"
12895#include <sys/socket.h>
12896#include <netinet/in.h>
12897#include <arpa/inet.h>
12898
12899#ifdef F77_DUMMY_MAIN
12900# ifdef __cplusplus
12901 extern "C"
12902# endif
12903 int F77_DUMMY_MAIN() { return 1; }
12904#endif
12905int
12906main ()
12907{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012908void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012909 ;
12910 return 0;
12911}
12912_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012913rm -f conftest.$ac_objext conftest$ac_exeext
12914if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12915 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000012916 ac_status=$?
12917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12918 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012919 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000012920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12921 (eval $ac_try) 2>&5
12922 ac_status=$?
12923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12924 (exit $ac_status); }; }; then
12925
12926cat >>confdefs.h <<\_ACEOF
12927#define HAVE_INET_ATON 1
12928_ACEOF
12929
12930 echo "$as_me:$LINENO: result: yes" >&5
12931echo "${ECHO_T}yes" >&6
12932else
12933 echo "$as_me: failed program was:" >&5
12934cat conftest.$ac_ext >&5
12935echo "$as_me:$LINENO: result: no" >&5
12936echo "${ECHO_T}no" >&6
12937
12938fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012939rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012940
12941echo "$as_me:$LINENO: checking for inet_pton" >&5
12942echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
12943cat >conftest.$ac_ext <<_ACEOF
12944#line $LINENO "configure"
12945#include "confdefs.h"
12946
12947#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012948#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012949#include <sys/socket.h>
12950#include <netinet/in.h>
12951#include <arpa/inet.h>
12952
12953#ifdef F77_DUMMY_MAIN
12954# ifdef __cplusplus
12955 extern "C"
12956# endif
12957 int F77_DUMMY_MAIN() { return 1; }
12958#endif
12959int
12960main ()
12961{
12962void* p = inet_pton
12963 ;
12964 return 0;
12965}
12966_ACEOF
12967rm -f conftest.$ac_objext
12968if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12969 (eval $ac_compile) 2>&5
12970 ac_status=$?
12971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12972 (exit $ac_status); } &&
12973 { ac_try='test -s conftest.$ac_objext'
12974 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12975 (eval $ac_try) 2>&5
12976 ac_status=$?
12977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12978 (exit $ac_status); }; }; then
12979
12980cat >>confdefs.h <<\_ACEOF
12981#define HAVE_INET_PTON 1
12982_ACEOF
12983
12984 echo "$as_me:$LINENO: result: yes" >&5
12985echo "${ECHO_T}yes" >&6
12986else
12987 echo "$as_me: failed program was:" >&5
12988cat conftest.$ac_ext >&5
12989echo "$as_me:$LINENO: result: no" >&5
12990echo "${ECHO_T}no" >&6
12991
12992fi
12993rm -f conftest.$ac_objext conftest.$ac_ext
12994
Martin v. Löwisd5843682002-11-21 20:41:28 +000012995echo "$as_me:$LINENO: checking for setgroups" >&5
12996echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
12997cat >conftest.$ac_ext <<_ACEOF
12998#line $LINENO "configure"
12999#include "confdefs.h"
13000
13001#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013002#include <unistd.h>
Martin v. Löwisd5843682002-11-21 20:41:28 +000013003
Barry Warsawfe33b792003-01-07 22:42:49 +000013004#ifdef F77_DUMMY_MAIN
13005# ifdef __cplusplus
13006 extern "C"
13007# endif
13008 int F77_DUMMY_MAIN() { return 1; }
13009#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000013010int
13011main ()
13012{
13013void* p = setgroups
13014 ;
13015 return 0;
13016}
13017_ACEOF
13018rm -f conftest.$ac_objext
13019if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13020 (eval $ac_compile) 2>&5
13021 ac_status=$?
13022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13023 (exit $ac_status); } &&
13024 { ac_try='test -s conftest.$ac_objext'
13025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13026 (eval $ac_try) 2>&5
13027 ac_status=$?
13028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13029 (exit $ac_status); }; }; then
13030
13031cat >>confdefs.h <<\_ACEOF
13032#define HAVE_SETGROUPS 1
13033_ACEOF
13034
13035 echo "$as_me:$LINENO: result: yes" >&5
13036echo "${ECHO_T}yes" >&6
13037else
13038 echo "$as_me: failed program was:" >&5
13039cat conftest.$ac_ext >&5
13040echo "$as_me:$LINENO: result: no" >&5
13041echo "${ECHO_T}no" >&6
13042
13043fi
13044rm -f conftest.$ac_objext conftest.$ac_ext
13045
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013046# check for openpty and forkpty
13047
Martin v. Löwis11437992002-04-12 09:54:03 +000013048
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013049for ac_func in openpty
13050do
Martin v. Löwis11437992002-04-12 09:54:03 +000013051as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13052echo "$as_me:$LINENO: checking for $ac_func" >&5
13053echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13054if eval "test \"\${$as_ac_var+set}\" = set"; then
13055 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013056else
Martin v. Löwis11437992002-04-12 09:54:03 +000013057 cat >conftest.$ac_ext <<_ACEOF
13058#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013059#include "confdefs.h"
13060/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013061 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013062#include <assert.h>
13063/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013064#ifdef __cplusplus
13065extern "C"
13066#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013067/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013068 builtin and then its argument prototype would still apply. */
13069char $ac_func ();
13070char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013071
Barry Warsawfe33b792003-01-07 22:42:49 +000013072#ifdef F77_DUMMY_MAIN
13073# ifdef __cplusplus
13074 extern "C"
13075# endif
13076 int F77_DUMMY_MAIN() { return 1; }
13077#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013078int
13079main ()
13080{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013081/* The GNU C library defines this for functions which it implements
13082 to always fail with ENOSYS. Some functions are actually named
13083 something starting with __ and the normal name is an alias. */
13084#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13085choke me
13086#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013087f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013088#endif
13089
Martin v. Löwis11437992002-04-12 09:54:03 +000013090 ;
13091 return 0;
13092}
13093_ACEOF
13094rm -f conftest.$ac_objext conftest$ac_exeext
13095if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13096 (eval $ac_link) 2>&5
13097 ac_status=$?
13098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13099 (exit $ac_status); } &&
13100 { ac_try='test -s conftest$ac_exeext'
13101 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13102 (eval $ac_try) 2>&5
13103 ac_status=$?
13104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13105 (exit $ac_status); }; }; then
13106 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013107else
Martin v. Löwis11437992002-04-12 09:54:03 +000013108 echo "$as_me: failed program was:" >&5
13109cat conftest.$ac_ext >&5
13110eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013111fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013112rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013113fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013114echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13115echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13116if test `eval echo '${'$as_ac_var'}'` = yes; then
13117 cat >>confdefs.h <<_ACEOF
13118#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13119_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013120
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013121else
Martin v. Löwis11437992002-04-12 09:54:03 +000013122 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
13123echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
13124if test "${ac_cv_lib_util_openpty+set}" = set; then
13125 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013126else
Martin v. Löwis11437992002-04-12 09:54:03 +000013127 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013128LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013129cat >conftest.$ac_ext <<_ACEOF
13130#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013131#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013132
Fred Drake8cef4cf2000-06-28 16:40:38 +000013133/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013134#ifdef __cplusplus
13135extern "C"
13136#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013137/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013138 builtin and then its argument prototype would still apply. */
13139char openpty ();
Barry Warsawfe33b792003-01-07 22:42:49 +000013140#ifdef F77_DUMMY_MAIN
13141# ifdef __cplusplus
13142 extern "C"
13143# endif
13144 int F77_DUMMY_MAIN() { return 1; }
13145#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013146int
13147main ()
13148{
13149openpty ();
13150 ;
13151 return 0;
13152}
13153_ACEOF
13154rm -f conftest.$ac_objext conftest$ac_exeext
13155if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13156 (eval $ac_link) 2>&5
13157 ac_status=$?
13158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13159 (exit $ac_status); } &&
13160 { ac_try='test -s conftest$ac_exeext'
13161 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13162 (eval $ac_try) 2>&5
13163 ac_status=$?
13164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13165 (exit $ac_status); }; }; then
13166 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013167else
Martin v. Löwis11437992002-04-12 09:54:03 +000013168 echo "$as_me: failed program was:" >&5
13169cat conftest.$ac_ext >&5
13170ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013171fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013172rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13173LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013174fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013175echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
13176echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
13177if test $ac_cv_lib_util_openpty = yes; then
13178 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013179#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013180_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013181 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013182fi
13183
13184fi
13185done
13186
Martin v. Löwis11437992002-04-12 09:54:03 +000013187
Fred Drake8cef4cf2000-06-28 16:40:38 +000013188for ac_func in forkpty
13189do
Martin v. Löwis11437992002-04-12 09:54:03 +000013190as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13191echo "$as_me:$LINENO: checking for $ac_func" >&5
13192echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13193if eval "test \"\${$as_ac_var+set}\" = set"; then
13194 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013195else
Martin v. Löwis11437992002-04-12 09:54:03 +000013196 cat >conftest.$ac_ext <<_ACEOF
13197#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013198#include "confdefs.h"
13199/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013200 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000013201#include <assert.h>
13202/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013203#ifdef __cplusplus
13204extern "C"
13205#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013206/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013207 builtin and then its argument prototype would still apply. */
13208char $ac_func ();
13209char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000013210
Barry Warsawfe33b792003-01-07 22:42:49 +000013211#ifdef F77_DUMMY_MAIN
13212# ifdef __cplusplus
13213 extern "C"
13214# endif
13215 int F77_DUMMY_MAIN() { return 1; }
13216#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013217int
13218main ()
13219{
Fred Drake8cef4cf2000-06-28 16:40:38 +000013220/* The GNU C library defines this for functions which it implements
13221 to always fail with ENOSYS. Some functions are actually named
13222 something starting with __ and the normal name is an alias. */
13223#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13224choke me
13225#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013226f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000013227#endif
13228
Martin v. Löwis11437992002-04-12 09:54:03 +000013229 ;
13230 return 0;
13231}
13232_ACEOF
13233rm -f conftest.$ac_objext conftest$ac_exeext
13234if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13235 (eval $ac_link) 2>&5
13236 ac_status=$?
13237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13238 (exit $ac_status); } &&
13239 { ac_try='test -s conftest$ac_exeext'
13240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13241 (eval $ac_try) 2>&5
13242 ac_status=$?
13243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13244 (exit $ac_status); }; }; then
13245 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013246else
Martin v. Löwis11437992002-04-12 09:54:03 +000013247 echo "$as_me: failed program was:" >&5
13248cat conftest.$ac_ext >&5
13249eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013250fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013251rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013252fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013253echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13254echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13255if test `eval echo '${'$as_ac_var'}'` = yes; then
13256 cat >>confdefs.h <<_ACEOF
13257#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13258_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013259
Fred Drake8cef4cf2000-06-28 16:40:38 +000013260else
Martin v. Löwis11437992002-04-12 09:54:03 +000013261 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
13262echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
13263if test "${ac_cv_lib_util_forkpty+set}" = set; then
13264 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013265else
Martin v. Löwis11437992002-04-12 09:54:03 +000013266 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013267LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013268cat >conftest.$ac_ext <<_ACEOF
13269#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013270#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013271
Fred Drake8cef4cf2000-06-28 16:40:38 +000013272/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013273#ifdef __cplusplus
13274extern "C"
13275#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013276/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013277 builtin and then its argument prototype would still apply. */
13278char forkpty ();
Barry Warsawfe33b792003-01-07 22:42:49 +000013279#ifdef F77_DUMMY_MAIN
13280# ifdef __cplusplus
13281 extern "C"
13282# endif
13283 int F77_DUMMY_MAIN() { return 1; }
13284#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013285int
13286main ()
13287{
13288forkpty ();
13289 ;
13290 return 0;
13291}
13292_ACEOF
13293rm -f conftest.$ac_objext conftest$ac_exeext
13294if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13295 (eval $ac_link) 2>&5
13296 ac_status=$?
13297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13298 (exit $ac_status); } &&
13299 { ac_try='test -s conftest$ac_exeext'
13300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13301 (eval $ac_try) 2>&5
13302 ac_status=$?
13303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13304 (exit $ac_status); }; }; then
13305 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013306else
Martin v. Löwis11437992002-04-12 09:54:03 +000013307 echo "$as_me: failed program was:" >&5
13308cat conftest.$ac_ext >&5
13309ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013310fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013311rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13312LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013313fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013314echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
13315echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
13316if test $ac_cv_lib_util_forkpty = yes; then
13317 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013318#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013319_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013320 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013321fi
13322
13323fi
13324done
13325
Jack Jansendd19cf82001-12-06 22:36:17 +000013326
Michael W. Hudson54241132001-12-07 15:38:26 +000013327# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013328
13329
13330
13331
13332
13333
Fred Drake8cef4cf2000-06-28 16:40:38 +000013334for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
13335do
Martin v. Löwis11437992002-04-12 09:54:03 +000013336as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13337echo "$as_me:$LINENO: checking for $ac_func" >&5
13338echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13339if eval "test \"\${$as_ac_var+set}\" = set"; then
13340 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013341else
Martin v. Löwis11437992002-04-12 09:54:03 +000013342 cat >conftest.$ac_ext <<_ACEOF
13343#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013344#include "confdefs.h"
13345/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013346 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013347#include <assert.h>
13348/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013349#ifdef __cplusplus
13350extern "C"
13351#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013352/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013353 builtin and then its argument prototype would still apply. */
13354char $ac_func ();
13355char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013356
Barry Warsawfe33b792003-01-07 22:42:49 +000013357#ifdef F77_DUMMY_MAIN
13358# ifdef __cplusplus
13359 extern "C"
13360# endif
13361 int F77_DUMMY_MAIN() { return 1; }
13362#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013363int
13364main ()
13365{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013366/* The GNU C library defines this for functions which it implements
13367 to always fail with ENOSYS. Some functions are actually named
13368 something starting with __ and the normal name is an alias. */
13369#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13370choke me
13371#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013372f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013373#endif
13374
Martin v. Löwis11437992002-04-12 09:54:03 +000013375 ;
13376 return 0;
13377}
13378_ACEOF
13379rm -f conftest.$ac_objext conftest$ac_exeext
13380if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13381 (eval $ac_link) 2>&5
13382 ac_status=$?
13383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13384 (exit $ac_status); } &&
13385 { ac_try='test -s conftest$ac_exeext'
13386 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13387 (eval $ac_try) 2>&5
13388 ac_status=$?
13389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13390 (exit $ac_status); }; }; then
13391 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013392else
Martin v. Löwis11437992002-04-12 09:54:03 +000013393 echo "$as_me: failed program was:" >&5
13394cat conftest.$ac_ext >&5
13395eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013396fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013397rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013398fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013399echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13400echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13401if test `eval echo '${'$as_ac_var'}'` = yes; then
13402 cat >>confdefs.h <<_ACEOF
13403#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13404_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000013405
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013406fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000013407done
13408
Michael W. Hudson54241132001-12-07 15:38:26 +000013409
Martin v. Löwis11437992002-04-12 09:54:03 +000013410
13411
13412
13413
13414
Martin v. Löwis1142de32002-03-29 16:28:31 +000013415for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000013416do
Martin v. Löwis11437992002-04-12 09:54:03 +000013417as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13418echo "$as_me:$LINENO: checking for $ac_func" >&5
13419echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13420if eval "test \"\${$as_ac_var+set}\" = set"; then
13421 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013422else
Martin v. Löwis11437992002-04-12 09:54:03 +000013423 cat >conftest.$ac_ext <<_ACEOF
13424#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013425#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013426/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013427 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013428#include <assert.h>
13429/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013430#ifdef __cplusplus
13431extern "C"
13432#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013433/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013434 builtin and then its argument prototype would still apply. */
13435char $ac_func ();
13436char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013437
Barry Warsawfe33b792003-01-07 22:42:49 +000013438#ifdef F77_DUMMY_MAIN
13439# ifdef __cplusplus
13440 extern "C"
13441# endif
13442 int F77_DUMMY_MAIN() { return 1; }
13443#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013444int
13445main ()
13446{
Guido van Rossum627b2d71993-12-24 10:39:16 +000013447/* The GNU C library defines this for functions which it implements
13448 to always fail with ENOSYS. Some functions are actually named
13449 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013450#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013451choke me
13452#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013453f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013454#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013455
Martin v. Löwis11437992002-04-12 09:54:03 +000013456 ;
13457 return 0;
13458}
13459_ACEOF
13460rm -f conftest.$ac_objext conftest$ac_exeext
13461if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13462 (eval $ac_link) 2>&5
13463 ac_status=$?
13464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13465 (exit $ac_status); } &&
13466 { ac_try='test -s conftest$ac_exeext'
13467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13468 (eval $ac_try) 2>&5
13469 ac_status=$?
13470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13471 (exit $ac_status); }; }; then
13472 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013473else
Martin v. Löwis11437992002-04-12 09:54:03 +000013474 echo "$as_me: failed program was:" >&5
13475cat conftest.$ac_ext >&5
13476eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013477fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013478rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000013479fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013480echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13481echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13482if test `eval echo '${'$as_ac_var'}'` = yes; then
13483 cat >>confdefs.h <<_ACEOF
13484#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13485_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000013486
Martin v. Löwis1142de32002-03-29 16:28:31 +000013487else
Martin v. Löwis11437992002-04-12 09:54:03 +000013488 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013489fi
13490done
13491
13492
Martin v. Löwis11437992002-04-12 09:54:03 +000013493
Martin v. Löwis1142de32002-03-29 16:28:31 +000013494for ac_func in getpgrp
13495do
Martin v. Löwis11437992002-04-12 09:54:03 +000013496as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13497echo "$as_me:$LINENO: checking for $ac_func" >&5
13498echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13499if eval "test \"\${$as_ac_var+set}\" = set"; then
13500 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000013501else
Martin v. Löwis11437992002-04-12 09:54:03 +000013502 cat >conftest.$ac_ext <<_ACEOF
13503#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013504#include "confdefs.h"
13505/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013506 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000013507#include <assert.h>
13508/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013509#ifdef __cplusplus
13510extern "C"
13511#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013512/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013513 builtin and then its argument prototype would still apply. */
13514char $ac_func ();
13515char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000013516
Barry Warsawfe33b792003-01-07 22:42:49 +000013517#ifdef F77_DUMMY_MAIN
13518# ifdef __cplusplus
13519 extern "C"
13520# endif
13521 int F77_DUMMY_MAIN() { return 1; }
13522#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013523int
13524main ()
13525{
Martin v. Löwis1142de32002-03-29 16:28:31 +000013526/* The GNU C library defines this for functions which it implements
13527 to always fail with ENOSYS. Some functions are actually named
13528 something starting with __ and the normal name is an alias. */
13529#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13530choke me
13531#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013532f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000013533#endif
13534
Martin v. Löwis11437992002-04-12 09:54:03 +000013535 ;
13536 return 0;
13537}
13538_ACEOF
13539rm -f conftest.$ac_objext conftest$ac_exeext
13540if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13541 (eval $ac_link) 2>&5
13542 ac_status=$?
13543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13544 (exit $ac_status); } &&
13545 { ac_try='test -s conftest$ac_exeext'
13546 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13547 (eval $ac_try) 2>&5
13548 ac_status=$?
13549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13550 (exit $ac_status); }; }; then
13551 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013552else
Martin v. Löwis11437992002-04-12 09:54:03 +000013553 echo "$as_me: failed program was:" >&5
13554cat conftest.$ac_ext >&5
13555eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013556fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013557rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013558fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013559echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13560echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13561if test `eval echo '${'$as_ac_var'}'` = yes; then
13562 cat >>confdefs.h <<_ACEOF
13563#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13564_ACEOF
13565 cat >conftest.$ac_ext <<_ACEOF
13566#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013567#include "confdefs.h"
13568#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000013569#ifdef F77_DUMMY_MAIN
13570# ifdef __cplusplus
13571 extern "C"
13572# endif
13573 int F77_DUMMY_MAIN() { return 1; }
13574#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013575int
13576main ()
13577{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013578getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013579 ;
13580 return 0;
13581}
13582_ACEOF
13583rm -f conftest.$ac_objext
13584if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13585 (eval $ac_compile) 2>&5
13586 ac_status=$?
13587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13588 (exit $ac_status); } &&
13589 { ac_try='test -s conftest.$ac_objext'
13590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13591 (eval $ac_try) 2>&5
13592 ac_status=$?
13593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13594 (exit $ac_status); }; }; then
13595
13596cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013597#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013598_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013599
Martin v. Löwis11437992002-04-12 09:54:03 +000013600
Guido van Rossumf78abae1997-01-21 22:02:36 +000013601else
Martin v. Löwis11437992002-04-12 09:54:03 +000013602 echo "$as_me: failed program was:" >&5
13603cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013604fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013605rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013606
Guido van Rossum627b2d71993-12-24 10:39:16 +000013607fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013608done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013609
Jack Jansen150753c2003-03-29 22:07:47 +000013610
13611for ac_func in setpgrp
13612do
13613as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13614echo "$as_me:$LINENO: checking for $ac_func" >&5
13615echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13616if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013617 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013618else
Martin v. Löwis11437992002-04-12 09:54:03 +000013619 cat >conftest.$ac_ext <<_ACEOF
13620#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013621#include "confdefs.h"
Jack Jansen150753c2003-03-29 22:07:47 +000013622/* System header to define __stub macros and hopefully few prototypes,
13623 which can conflict with char $ac_func (); below. */
13624#include <assert.h>
13625/* Override any gcc2 internal prototype to avoid an error. */
13626#ifdef __cplusplus
13627extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000013628#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013629/* We use char because int might match the return type of a gcc2
13630 builtin and then its argument prototype would still apply. */
13631char $ac_func ();
13632char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013633
Barry Warsawfe33b792003-01-07 22:42:49 +000013634#ifdef F77_DUMMY_MAIN
13635# ifdef __cplusplus
13636 extern "C"
13637# endif
13638 int F77_DUMMY_MAIN() { return 1; }
13639#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013640int
13641main ()
13642{
Jack Jansen150753c2003-03-29 22:07:47 +000013643/* The GNU C library defines this for functions which it implements
13644 to always fail with ENOSYS. Some functions are actually named
13645 something starting with __ and the normal name is an alias. */
13646#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13647choke me
13648#else
13649f = $ac_func;
13650#endif
13651
Martin v. Löwis11437992002-04-12 09:54:03 +000013652 ;
13653 return 0;
13654}
13655_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013656rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000013657if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13658 (eval $ac_link) 2>&5
13659 ac_status=$?
13660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013661 (exit $ac_status); } &&
13662 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13664 (eval $ac_try) 2>&5
13665 ac_status=$?
13666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13667 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000013668 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013669else
Jack Jansen150753c2003-03-29 22:07:47 +000013670 echo "$as_me: failed program was:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013671cat conftest.$ac_ext >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013672eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013673fi
Jack Jansen150753c2003-03-29 22:07:47 +000013674rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013675fi
Jack Jansen150753c2003-03-29 22:07:47 +000013676echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13677echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13678if test `eval echo '${'$as_ac_var'}'` = yes; then
13679 cat >>confdefs.h <<_ACEOF
13680#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13681_ACEOF
13682 cat >conftest.$ac_ext <<_ACEOF
13683#line $LINENO "configure"
13684#include "confdefs.h"
13685#include <unistd.h>
13686#ifdef F77_DUMMY_MAIN
13687# ifdef __cplusplus
13688 extern "C"
13689# endif
13690 int F77_DUMMY_MAIN() { return 1; }
13691#endif
13692int
13693main ()
13694{
13695setpgrp(0,0);
13696 ;
13697 return 0;
13698}
13699_ACEOF
13700rm -f conftest.$ac_objext
13701if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13702 (eval $ac_compile) 2>&5
13703 ac_status=$?
13704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13705 (exit $ac_status); } &&
13706 { ac_try='test -s conftest.$ac_objext'
13707 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13708 (eval $ac_try) 2>&5
13709 ac_status=$?
13710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13711 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013712
13713cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013714#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013715_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013716
Jack Jansen150753c2003-03-29 22:07:47 +000013717
13718else
13719 echo "$as_me: failed program was:" >&5
13720cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013721fi
Jack Jansen150753c2003-03-29 22:07:47 +000013722rm -f conftest.$ac_objext conftest.$ac_ext
13723
13724fi
13725done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013726
Martin v. Löwis11437992002-04-12 09:54:03 +000013727
Thomas Wouters3a584202000-08-05 23:28:51 +000013728for ac_func in gettimeofday
13729do
Martin v. Löwis11437992002-04-12 09:54:03 +000013730as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13731echo "$as_me:$LINENO: checking for $ac_func" >&5
13732echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13733if eval "test \"\${$as_ac_var+set}\" = set"; then
13734 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013735else
Martin v. Löwis11437992002-04-12 09:54:03 +000013736 cat >conftest.$ac_ext <<_ACEOF
13737#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013738#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013739/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013740 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013741#include <assert.h>
13742/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013743#ifdef __cplusplus
13744extern "C"
13745#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013746/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013747 builtin and then its argument prototype would still apply. */
13748char $ac_func ();
13749char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013750
Barry Warsawfe33b792003-01-07 22:42:49 +000013751#ifdef F77_DUMMY_MAIN
13752# ifdef __cplusplus
13753 extern "C"
13754# endif
13755 int F77_DUMMY_MAIN() { return 1; }
13756#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013757int
13758main ()
13759{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013760/* The GNU C library defines this for functions which it implements
13761 to always fail with ENOSYS. Some functions are actually named
13762 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013763#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013764choke me
13765#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013766f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013767#endif
13768
Martin v. Löwis11437992002-04-12 09:54:03 +000013769 ;
13770 return 0;
13771}
13772_ACEOF
13773rm -f conftest.$ac_objext conftest$ac_exeext
13774if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13775 (eval $ac_link) 2>&5
13776 ac_status=$?
13777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13778 (exit $ac_status); } &&
13779 { ac_try='test -s conftest$ac_exeext'
13780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13781 (eval $ac_try) 2>&5
13782 ac_status=$?
13783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13784 (exit $ac_status); }; }; then
13785 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013786else
Martin v. Löwis11437992002-04-12 09:54:03 +000013787 echo "$as_me: failed program was:" >&5
13788cat conftest.$ac_ext >&5
13789eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013790fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013791rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013792fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013793echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13794echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13795if test `eval echo '${'$as_ac_var'}'` = yes; then
13796 cat >>confdefs.h <<_ACEOF
13797#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13798_ACEOF
13799 cat >conftest.$ac_ext <<_ACEOF
13800#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013801#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013802#include <sys/time.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000013803#ifdef F77_DUMMY_MAIN
13804# ifdef __cplusplus
13805 extern "C"
13806# endif
13807 int F77_DUMMY_MAIN() { return 1; }
13808#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013809int
13810main ()
13811{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013812gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013813 ;
13814 return 0;
13815}
13816_ACEOF
13817rm -f conftest.$ac_objext
13818if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13819 (eval $ac_compile) 2>&5
13820 ac_status=$?
13821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13822 (exit $ac_status); } &&
13823 { ac_try='test -s conftest.$ac_objext'
13824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13825 (eval $ac_try) 2>&5
13826 ac_status=$?
13827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13828 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013829 :
13830else
Martin v. Löwis11437992002-04-12 09:54:03 +000013831 echo "$as_me: failed program was:" >&5
13832cat conftest.$ac_ext >&5
13833
13834cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013835#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013836_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013837
Martin v. Löwis11437992002-04-12 09:54:03 +000013838
Guido van Rossum627b2d71993-12-24 10:39:16 +000013839fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013840rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013841
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013842fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013843done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013844
Michael W. Hudson54241132001-12-07 15:38:26 +000013845
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013846echo "$as_me:$LINENO: checking for major" >&5
13847echo $ECHO_N "checking for major... $ECHO_C" >&6
13848cat >conftest.$ac_ext <<_ACEOF
13849#line $LINENO "configure"
13850#include "confdefs.h"
13851
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013852#if defined(MAJOR_IN_MKDEV)
13853#include <sys/mkdev.h>
13854#elif defined(MAJOR_IN_SYSMACROS)
13855#include <sys/sysmacros.h>
13856#else
13857#include <sys/types.h>
13858#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013859
Barry Warsawfe33b792003-01-07 22:42:49 +000013860#ifdef F77_DUMMY_MAIN
13861# ifdef __cplusplus
13862 extern "C"
13863# endif
13864 int F77_DUMMY_MAIN() { return 1; }
13865#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013866int
13867main ()
13868{
13869
13870 makedev(major(0),minor(0));
13871
13872 ;
13873 return 0;
13874}
13875_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000013876rm -f conftest.$ac_objext conftest$ac_exeext
13877if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13878 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013879 ac_status=$?
13880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13881 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000013882 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13884 (eval $ac_try) 2>&5
13885 ac_status=$?
13886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13887 (exit $ac_status); }; }; then
13888
13889
13890cat >>confdefs.h <<\_ACEOF
13891#define HAVE_DEVICE_MACROS 1
13892_ACEOF
13893
13894 echo "$as_me:$LINENO: result: yes" >&5
13895echo "${ECHO_T}yes" >&6
13896
13897else
13898 echo "$as_me: failed program was:" >&5
13899cat conftest.$ac_ext >&5
13900
13901 echo "$as_me:$LINENO: result: no" >&5
13902echo "${ECHO_T}no" >&6
13903
13904fi
Martin v. Löwise3271202002-11-07 07:42:30 +000013905rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013906
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013907# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013908# for [no]getaddrinfo in netdb.h.
13909echo "$as_me:$LINENO: checking for getaddrinfo" >&5
13910echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
13911cat >conftest.$ac_ext <<_ACEOF
13912#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013913#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013914
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013915#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013916#include <sys/socket.h>
13917#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013918#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013919
Barry Warsawfe33b792003-01-07 22:42:49 +000013920#ifdef F77_DUMMY_MAIN
13921# ifdef __cplusplus
13922 extern "C"
13923# endif
13924 int F77_DUMMY_MAIN() { return 1; }
13925#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013926int
13927main ()
13928{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013929
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013930getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013931
Martin v. Löwis11437992002-04-12 09:54:03 +000013932 ;
13933 return 0;
13934}
13935_ACEOF
13936rm -f conftest.$ac_objext conftest$ac_exeext
13937if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13938 (eval $ac_link) 2>&5
13939 ac_status=$?
13940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13941 (exit $ac_status); } &&
13942 { ac_try='test -s conftest$ac_exeext'
13943 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13944 (eval $ac_try) 2>&5
13945 ac_status=$?
13946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13947 (exit $ac_status); }; }; then
13948
13949echo "$as_me:$LINENO: result: yes" >&5
13950echo "${ECHO_T}yes" >&6
13951echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
13952echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013953if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013954 echo "$as_me:$LINENO: result: buggy" >&5
13955echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013956buggygetaddrinfo=yes
13957else
Martin v. Löwis11437992002-04-12 09:54:03 +000013958 cat >conftest.$ac_ext <<_ACEOF
13959#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013960#include "confdefs.h"
13961
13962#include <sys/types.h>
13963#include <netdb.h>
13964#include <string.h>
13965#include <sys/socket.h>
13966#include <netinet/in.h>
13967
13968main()
13969{
13970 int passive, gaierr, inet4 = 0, inet6 = 0;
13971 struct addrinfo hints, *ai, *aitop;
13972 char straddr[INET6_ADDRSTRLEN], strport[16];
13973
13974 for (passive = 0; passive <= 1; passive++) {
13975 memset(&hints, 0, sizeof(hints));
13976 hints.ai_family = AF_UNSPEC;
13977 hints.ai_flags = passive ? AI_PASSIVE : 0;
13978 hints.ai_socktype = SOCK_STREAM;
13979 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13980 (void)gai_strerror(gaierr);
13981 goto bad;
13982 }
13983 for (ai = aitop; ai; ai = ai->ai_next) {
13984 if (ai->ai_addr == NULL ||
13985 ai->ai_addrlen == 0 ||
13986 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13987 straddr, sizeof(straddr), strport, sizeof(strport),
13988 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13989 goto bad;
13990 }
13991 switch (ai->ai_family) {
13992 case AF_INET:
13993 if (strcmp(strport, "54321") != 0) {
13994 goto bad;
13995 }
13996 if (passive) {
13997 if (strcmp(straddr, "0.0.0.0") != 0) {
13998 goto bad;
13999 }
14000 } else {
14001 if (strcmp(straddr, "127.0.0.1") != 0) {
14002 goto bad;
14003 }
14004 }
14005 inet4++;
14006 break;
14007 case AF_INET6:
14008 if (strcmp(strport, "54321") != 0) {
14009 goto bad;
14010 }
14011 if (passive) {
14012 if (strcmp(straddr, "::") != 0) {
14013 goto bad;
14014 }
14015 } else {
14016 if (strcmp(straddr, "::1") != 0) {
14017 goto bad;
14018 }
14019 }
14020 inet6++;
14021 break;
14022 case AF_UNSPEC:
14023 goto bad;
14024 break;
14025 default:
14026 /* another family support? */
14027 break;
14028 }
14029 }
14030 }
14031
14032 if (!(inet4 == 0 || inet4 == 2))
14033 goto bad;
14034 if (!(inet6 == 0 || inet6 == 2))
14035 goto bad;
14036
14037 if (aitop)
14038 freeaddrinfo(aitop);
14039 exit(0);
14040
14041 bad:
14042 if (aitop)
14043 freeaddrinfo(aitop);
14044 exit(1);
14045}
14046
Martin v. Löwis11437992002-04-12 09:54:03 +000014047_ACEOF
14048rm -f conftest$ac_exeext
14049if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14050 (eval $ac_link) 2>&5
14051 ac_status=$?
14052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14053 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14055 (eval $ac_try) 2>&5
14056 ac_status=$?
14057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14058 (exit $ac_status); }; }; then
14059 echo "$as_me:$LINENO: result: good" >&5
14060echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014061buggygetaddrinfo=no
14062else
Martin v. Löwis11437992002-04-12 09:54:03 +000014063 echo "$as_me: program exited with status $ac_status" >&5
14064echo "$as_me: failed program was:" >&5
14065cat conftest.$ac_ext >&5
14066( exit $ac_status )
14067echo "$as_me:$LINENO: result: buggy" >&5
14068echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014069buggygetaddrinfo=yes
14070fi
Barry Warsawfe33b792003-01-07 22:42:49 +000014071rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014072fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014073else
Martin v. Löwis11437992002-04-12 09:54:03 +000014074 echo "$as_me: failed program was:" >&5
14075cat conftest.$ac_ext >&5
14076
14077echo "$as_me:$LINENO: result: no" >&5
14078echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014079buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014080
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014082rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014083
14084if test "$buggygetaddrinfo" = "yes"; then
14085 if test "$ipv6" = "yes"; then
14086 echo 'Fatal: You must get working getaddrinfo() function.'
14087 echo ' or you can specify "--disable-ipv6"'.
14088 exit 1
14089 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014090else
Martin v. Löwis11437992002-04-12 09:54:03 +000014091
14092cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014093#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014094_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014095
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014096fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014097
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014098for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014099do
Martin v. Löwis11437992002-04-12 09:54:03 +000014100as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14101echo "$as_me:$LINENO: checking for $ac_func" >&5
14102echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14103if eval "test \"\${$as_ac_var+set}\" = set"; then
14104 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014105else
Martin v. Löwis11437992002-04-12 09:54:03 +000014106 cat >conftest.$ac_ext <<_ACEOF
14107#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014108#include "confdefs.h"
14109/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014110 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014111#include <assert.h>
14112/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014113#ifdef __cplusplus
14114extern "C"
14115#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014116/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014117 builtin and then its argument prototype would still apply. */
14118char $ac_func ();
14119char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014120
Barry Warsawfe33b792003-01-07 22:42:49 +000014121#ifdef F77_DUMMY_MAIN
14122# ifdef __cplusplus
14123 extern "C"
14124# endif
14125 int F77_DUMMY_MAIN() { return 1; }
14126#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014127int
14128main ()
14129{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014130/* The GNU C library defines this for functions which it implements
14131 to always fail with ENOSYS. Some functions are actually named
14132 something starting with __ and the normal name is an alias. */
14133#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14134choke me
14135#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014136f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014137#endif
14138
Martin v. Löwis11437992002-04-12 09:54:03 +000014139 ;
14140 return 0;
14141}
14142_ACEOF
14143rm -f conftest.$ac_objext conftest$ac_exeext
14144if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14145 (eval $ac_link) 2>&5
14146 ac_status=$?
14147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14148 (exit $ac_status); } &&
14149 { ac_try='test -s conftest$ac_exeext'
14150 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14151 (eval $ac_try) 2>&5
14152 ac_status=$?
14153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14154 (exit $ac_status); }; }; then
14155 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014156else
Martin v. Löwis11437992002-04-12 09:54:03 +000014157 echo "$as_me: failed program was:" >&5
14158cat conftest.$ac_ext >&5
14159eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014160fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014161rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014162fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014163echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14164echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14165if test `eval echo '${'$as_ac_var'}'` = yes; then
14166 cat >>confdefs.h <<_ACEOF
14167#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14168_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014169
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014170fi
14171done
14172
Michael W. Hudson54241132001-12-07 15:38:26 +000014173
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014174# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000014175echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
14176echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14177if test "${ac_cv_header_time+set}" = set; then
14178 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014179else
Martin v. Löwis11437992002-04-12 09:54:03 +000014180 cat >conftest.$ac_ext <<_ACEOF
14181#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014182#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014183#include <sys/types.h>
14184#include <sys/time.h>
14185#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014186
Barry Warsawfe33b792003-01-07 22:42:49 +000014187#ifdef F77_DUMMY_MAIN
14188# ifdef __cplusplus
14189 extern "C"
14190# endif
14191 int F77_DUMMY_MAIN() { return 1; }
14192#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014193int
14194main ()
14195{
14196if ((struct tm *) 0)
14197return 0;
14198 ;
14199 return 0;
14200}
14201_ACEOF
14202rm -f conftest.$ac_objext
14203if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14204 (eval $ac_compile) 2>&5
14205 ac_status=$?
14206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14207 (exit $ac_status); } &&
14208 { ac_try='test -s conftest.$ac_objext'
14209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14210 (eval $ac_try) 2>&5
14211 ac_status=$?
14212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14213 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014214 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014215else
Martin v. Löwis11437992002-04-12 09:54:03 +000014216 echo "$as_me: failed program was:" >&5
14217cat conftest.$ac_ext >&5
14218ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014219fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014220rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014221fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014222echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
14223echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014224if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014225
14226cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014227#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014228_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014229
14230fi
14231
Martin v. Löwis11437992002-04-12 09:54:03 +000014232echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
14233echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
14234if test "${ac_cv_struct_tm+set}" = set; then
14235 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014236else
Martin v. Löwis11437992002-04-12 09:54:03 +000014237 cat >conftest.$ac_ext <<_ACEOF
14238#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014239#include "confdefs.h"
14240#include <sys/types.h>
14241#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014242
Barry Warsawfe33b792003-01-07 22:42:49 +000014243#ifdef F77_DUMMY_MAIN
14244# ifdef __cplusplus
14245 extern "C"
14246# endif
14247 int F77_DUMMY_MAIN() { return 1; }
14248#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014249int
14250main ()
14251{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014252struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000014253 ;
14254 return 0;
14255}
14256_ACEOF
14257rm -f conftest.$ac_objext
14258if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14259 (eval $ac_compile) 2>&5
14260 ac_status=$?
14261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14262 (exit $ac_status); } &&
14263 { ac_try='test -s conftest.$ac_objext'
14264 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14265 (eval $ac_try) 2>&5
14266 ac_status=$?
14267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14268 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014269 ac_cv_struct_tm=time.h
14270else
Martin v. Löwis11437992002-04-12 09:54:03 +000014271 echo "$as_me: failed program was:" >&5
14272cat conftest.$ac_ext >&5
14273ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014274fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014275rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014276fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014277echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
14278echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014279if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014280
14281cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014282#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014283_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014284
14285fi
14286
Martin v. Löwis11437992002-04-12 09:54:03 +000014287echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
14288echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
14289if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
14290 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014291else
Martin v. Löwis11437992002-04-12 09:54:03 +000014292 cat >conftest.$ac_ext <<_ACEOF
14293#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014294#include "confdefs.h"
14295#include <sys/types.h>
14296#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000014297
14298
Barry Warsawfe33b792003-01-07 22:42:49 +000014299#ifdef F77_DUMMY_MAIN
14300# ifdef __cplusplus
14301 extern "C"
14302# endif
14303 int F77_DUMMY_MAIN() { return 1; }
14304#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014305int
14306main ()
14307{
14308static struct tm ac_aggr;
14309if (ac_aggr.tm_zone)
14310return 0;
14311 ;
14312 return 0;
14313}
14314_ACEOF
14315rm -f conftest.$ac_objext
14316if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14317 (eval $ac_compile) 2>&5
14318 ac_status=$?
14319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14320 (exit $ac_status); } &&
14321 { ac_try='test -s conftest.$ac_objext'
14322 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14323 (eval $ac_try) 2>&5
14324 ac_status=$?
14325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14326 (exit $ac_status); }; }; then
14327 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014328else
Martin v. Löwis11437992002-04-12 09:54:03 +000014329 echo "$as_me: failed program was:" >&5
14330cat conftest.$ac_ext >&5
14331ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014332fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014333rm -f conftest.$ac_objext conftest.$ac_ext
14334fi
14335echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
14336echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
14337if test $ac_cv_member_struct_tm_tm_zone = yes; then
14338
14339cat >>confdefs.h <<_ACEOF
14340#define HAVE_STRUCT_TM_TM_ZONE 1
14341_ACEOF
14342
14343
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014344fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014345
Martin v. Löwis11437992002-04-12 09:54:03 +000014346if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14347
14348cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014349#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014350_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014351
14352else
Martin v. Löwis11437992002-04-12 09:54:03 +000014353 echo "$as_me:$LINENO: checking for tzname" >&5
14354echo $ECHO_N "checking for tzname... $ECHO_C" >&6
14355if test "${ac_cv_var_tzname+set}" = set; then
14356 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014357else
Martin v. Löwis11437992002-04-12 09:54:03 +000014358 cat >conftest.$ac_ext <<_ACEOF
14359#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014360#include "confdefs.h"
14361#include <time.h>
14362#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014363extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014364#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014365
Barry Warsawfe33b792003-01-07 22:42:49 +000014366#ifdef F77_DUMMY_MAIN
14367# ifdef __cplusplus
14368 extern "C"
14369# endif
14370 int F77_DUMMY_MAIN() { return 1; }
14371#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014372int
14373main ()
14374{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014375atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000014376 ;
14377 return 0;
14378}
14379_ACEOF
14380rm -f conftest.$ac_objext conftest$ac_exeext
14381if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14382 (eval $ac_link) 2>&5
14383 ac_status=$?
14384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14385 (exit $ac_status); } &&
14386 { ac_try='test -s conftest$ac_exeext'
14387 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14388 (eval $ac_try) 2>&5
14389 ac_status=$?
14390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14391 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014392 ac_cv_var_tzname=yes
14393else
Martin v. Löwis11437992002-04-12 09:54:03 +000014394 echo "$as_me: failed program was:" >&5
14395cat conftest.$ac_ext >&5
14396ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014397fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014398rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000014399fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014400echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
14401echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014402 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014403
14404cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014405#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014406_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014407
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014408 fi
14409fi
14410
Martin v. Löwis11437992002-04-12 09:54:03 +000014411echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
14412echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
14413if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
14414 echo $ECHO_N "(cached) $ECHO_C" >&6
14415else
14416 cat >conftest.$ac_ext <<_ACEOF
14417#line $LINENO "configure"
14418#include "confdefs.h"
14419$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014420#ifdef F77_DUMMY_MAIN
14421# ifdef __cplusplus
14422 extern "C"
14423# endif
14424 int F77_DUMMY_MAIN() { return 1; }
14425#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014426int
14427main ()
14428{
14429static struct stat ac_aggr;
14430if (ac_aggr.st_rdev)
14431return 0;
14432 ;
14433 return 0;
14434}
14435_ACEOF
14436rm -f conftest.$ac_objext
14437if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14438 (eval $ac_compile) 2>&5
14439 ac_status=$?
14440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14441 (exit $ac_status); } &&
14442 { ac_try='test -s conftest.$ac_objext'
14443 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14444 (eval $ac_try) 2>&5
14445 ac_status=$?
14446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14447 (exit $ac_status); }; }; then
14448 ac_cv_member_struct_stat_st_rdev=yes
14449else
14450 echo "$as_me: failed program was:" >&5
14451cat conftest.$ac_ext >&5
14452ac_cv_member_struct_stat_st_rdev=no
14453fi
14454rm -f conftest.$ac_objext conftest.$ac_ext
14455fi
14456echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
14457echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
14458if test $ac_cv_member_struct_stat_st_rdev = yes; then
14459
14460cat >>confdefs.h <<_ACEOF
14461#define HAVE_STRUCT_STAT_ST_RDEV 1
14462_ACEOF
14463
14464
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014465fi
14466
Martin v. Löwis11437992002-04-12 09:54:03 +000014467echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
14468echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
14469if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
14470 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014471else
Martin v. Löwis11437992002-04-12 09:54:03 +000014472 cat >conftest.$ac_ext <<_ACEOF
14473#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014474#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014475$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014476#ifdef F77_DUMMY_MAIN
14477# ifdef __cplusplus
14478 extern "C"
14479# endif
14480 int F77_DUMMY_MAIN() { return 1; }
14481#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014482int
14483main ()
14484{
14485static struct stat ac_aggr;
14486if (ac_aggr.st_blksize)
14487return 0;
14488 ;
14489 return 0;
14490}
14491_ACEOF
14492rm -f conftest.$ac_objext
14493if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14494 (eval $ac_compile) 2>&5
14495 ac_status=$?
14496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14497 (exit $ac_status); } &&
14498 { ac_try='test -s conftest.$ac_objext'
14499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14500 (eval $ac_try) 2>&5
14501 ac_status=$?
14502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14503 (exit $ac_status); }; }; then
14504 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014505else
Martin v. Löwis11437992002-04-12 09:54:03 +000014506 echo "$as_me: failed program was:" >&5
14507cat conftest.$ac_ext >&5
14508ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014509fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014510rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014511fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014512echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
14513echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
14514if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014515
Martin v. Löwis11437992002-04-12 09:54:03 +000014516cat >>confdefs.h <<_ACEOF
14517#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
14518_ACEOF
14519
14520
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014521fi
14522
Martin v. Löwis11437992002-04-12 09:54:03 +000014523echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
14524echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
14525if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
14526 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014527else
Martin v. Löwis11437992002-04-12 09:54:03 +000014528 cat >conftest.$ac_ext <<_ACEOF
14529#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014530#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014531$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014532#ifdef F77_DUMMY_MAIN
14533# ifdef __cplusplus
14534 extern "C"
14535# endif
14536 int F77_DUMMY_MAIN() { return 1; }
14537#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014538int
14539main ()
14540{
14541static struct stat ac_aggr;
14542if (ac_aggr.st_blocks)
14543return 0;
14544 ;
14545 return 0;
14546}
14547_ACEOF
14548rm -f conftest.$ac_objext
14549if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14550 (eval $ac_compile) 2>&5
14551 ac_status=$?
14552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14553 (exit $ac_status); } &&
14554 { ac_try='test -s conftest.$ac_objext'
14555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14556 (eval $ac_try) 2>&5
14557 ac_status=$?
14558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14559 (exit $ac_status); }; }; then
14560 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014561else
Martin v. Löwis11437992002-04-12 09:54:03 +000014562 echo "$as_me: failed program was:" >&5
14563cat conftest.$ac_ext >&5
14564ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014565fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014566rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014567fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014568echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
14569echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
14570if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014571
Martin v. Löwis11437992002-04-12 09:54:03 +000014572cat >>confdefs.h <<_ACEOF
14573#define HAVE_STRUCT_STAT_ST_BLOCKS 1
14574_ACEOF
14575
14576
14577cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014578#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014579_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014580
14581else
Martin v. Löwis11437992002-04-12 09:54:03 +000014582 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014583fi
14584
Michael W. Hudson54241132001-12-07 15:38:26 +000014585
Martin v. Löwis11437992002-04-12 09:54:03 +000014586
14587echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
14588echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
14589if test "${ac_cv_header_time_altzone+set}" = set; then
14590 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014591else
Martin v. Löwis11437992002-04-12 09:54:03 +000014592 cat >conftest.$ac_ext <<_ACEOF
14593#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014594#include "confdefs.h"
14595#include <time.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014596#ifdef F77_DUMMY_MAIN
14597# ifdef __cplusplus
14598 extern "C"
14599# endif
14600 int F77_DUMMY_MAIN() { return 1; }
14601#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014602int
14603main ()
14604{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014605return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000014606 ;
14607 return 0;
14608}
14609_ACEOF
14610rm -f conftest.$ac_objext
14611if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14612 (eval $ac_compile) 2>&5
14613 ac_status=$?
14614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14615 (exit $ac_status); } &&
14616 { ac_try='test -s conftest.$ac_objext'
14617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14618 (eval $ac_try) 2>&5
14619 ac_status=$?
14620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14621 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014622 ac_cv_header_time_altzone=yes
14623else
Martin v. Löwis11437992002-04-12 09:54:03 +000014624 echo "$as_me: failed program was:" >&5
14625cat conftest.$ac_ext >&5
14626ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000014627fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014628rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014629fi
14630
Martin v. Löwis11437992002-04-12 09:54:03 +000014631echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
14632echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014633if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014634
14635cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014636#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014637_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014638
14639fi
14640
Guido van Rossumda88dad1995-01-26 00:46:29 +000014641was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014642echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
14643echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
14644cat >conftest.$ac_ext <<_ACEOF
14645#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014646#include "confdefs.h"
14647
14648#include <sys/types.h>
14649#include <sys/select.h>
14650#include <sys/time.h>
14651
Barry Warsawfe33b792003-01-07 22:42:49 +000014652#ifdef F77_DUMMY_MAIN
14653# ifdef __cplusplus
14654 extern "C"
14655# endif
14656 int F77_DUMMY_MAIN() { return 1; }
14657#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014658int
14659main ()
14660{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014661;
Martin v. Löwis11437992002-04-12 09:54:03 +000014662 ;
14663 return 0;
14664}
14665_ACEOF
14666rm -f conftest.$ac_objext
14667if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14668 (eval $ac_compile) 2>&5
14669 ac_status=$?
14670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14671 (exit $ac_status); } &&
14672 { ac_try='test -s conftest.$ac_objext'
14673 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14674 (eval $ac_try) 2>&5
14675 ac_status=$?
14676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14677 (exit $ac_status); }; }; then
14678
14679
14680cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014681#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014682_ACEOF
14683
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014684 was_it_defined=yes
14685
Guido van Rossumf78abae1997-01-21 22:02:36 +000014686else
Martin v. Löwis11437992002-04-12 09:54:03 +000014687 echo "$as_me: failed program was:" >&5
14688cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014689fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014690rm -f conftest.$ac_objext conftest.$ac_ext
14691echo "$as_me:$LINENO: result: $was_it_defined" >&5
14692echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000014693
Martin v. Löwis11437992002-04-12 09:54:03 +000014694echo "$as_me:$LINENO: checking for addrinfo" >&5
14695echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
14696if test "${ac_cv_struct_addrinfo+set}" = set; then
14697 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014698else
Martin v. Löwis11437992002-04-12 09:54:03 +000014699 cat >conftest.$ac_ext <<_ACEOF
14700#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014701#include "confdefs.h"
14702
14703# include <netdb.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014704#ifdef F77_DUMMY_MAIN
14705# ifdef __cplusplus
14706 extern "C"
14707# endif
14708 int F77_DUMMY_MAIN() { return 1; }
14709#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014710int
14711main ()
14712{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014713struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000014714 ;
14715 return 0;
14716}
14717_ACEOF
14718rm -f conftest.$ac_objext
14719if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14720 (eval $ac_compile) 2>&5
14721 ac_status=$?
14722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14723 (exit $ac_status); } &&
14724 { ac_try='test -s conftest.$ac_objext'
14725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14726 (eval $ac_try) 2>&5
14727 ac_status=$?
14728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14729 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014730 ac_cv_struct_addrinfo=yes
14731else
Martin v. Löwis11437992002-04-12 09:54:03 +000014732 echo "$as_me: failed program was:" >&5
14733cat conftest.$ac_ext >&5
14734ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014735fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014736rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014737fi
14738
Martin v. Löwis11437992002-04-12 09:54:03 +000014739echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
14740echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014741if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014742
14743cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014744#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014745_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014746
14747fi
14748
Martin v. Löwis11437992002-04-12 09:54:03 +000014749echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
14750echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
14751if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
14752 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014753else
Martin v. Löwis11437992002-04-12 09:54:03 +000014754 cat >conftest.$ac_ext <<_ACEOF
14755#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014756#include "confdefs.h"
14757
14758# include <sys/types.h>
14759# include <sys/socket.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014760#ifdef F77_DUMMY_MAIN
14761# ifdef __cplusplus
14762 extern "C"
14763# endif
14764 int F77_DUMMY_MAIN() { return 1; }
14765#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014766int
14767main ()
14768{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014769struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000014770 ;
14771 return 0;
14772}
14773_ACEOF
14774rm -f conftest.$ac_objext
14775if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14776 (eval $ac_compile) 2>&5
14777 ac_status=$?
14778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14779 (exit $ac_status); } &&
14780 { ac_try='test -s conftest.$ac_objext'
14781 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14782 (eval $ac_try) 2>&5
14783 ac_status=$?
14784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14785 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014786 ac_cv_struct_sockaddr_storage=yes
14787else
Martin v. Löwis11437992002-04-12 09:54:03 +000014788 echo "$as_me: failed program was:" >&5
14789cat conftest.$ac_ext >&5
14790ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014791fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014792rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014793fi
14794
Martin v. Löwis11437992002-04-12 09:54:03 +000014795echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
14796echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014797if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014798
14799cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014800#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014801_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014802
14803fi
14804
Guido van Rossum627b2d71993-12-24 10:39:16 +000014805# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000014806
Michael W. Hudson54241132001-12-07 15:38:26 +000014807
Martin v. Löwis11437992002-04-12 09:54:03 +000014808echo "$as_me:$LINENO: checking whether char is unsigned" >&5
14809echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
14810if test "${ac_cv_c_char_unsigned+set}" = set; then
14811 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000014812else
Martin v. Löwis11437992002-04-12 09:54:03 +000014813 cat >conftest.$ac_ext <<_ACEOF
14814#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000014815#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014816$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014817#ifdef F77_DUMMY_MAIN
14818# ifdef __cplusplus
14819 extern "C"
14820# endif
14821 int F77_DUMMY_MAIN() { return 1; }
14822#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014823int
14824main ()
14825{
14826static int test_array [1 - 2 * !(((char) -1) < 0)];
14827test_array [0] = 0
14828
14829 ;
14830 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000014831}
Martin v. Löwis11437992002-04-12 09:54:03 +000014832_ACEOF
14833rm -f conftest.$ac_objext
14834if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14835 (eval $ac_compile) 2>&5
14836 ac_status=$?
14837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14838 (exit $ac_status); } &&
14839 { ac_try='test -s conftest.$ac_objext'
14840 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14841 (eval $ac_try) 2>&5
14842 ac_status=$?
14843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14844 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000014845 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014846else
14847 echo "$as_me: failed program was:" >&5
14848cat conftest.$ac_ext >&5
14849ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014850fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014851rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014852fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014853echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
14854echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014855if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014856 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014857#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014858_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014859
14860fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000014861
Barry Warsawfe33b792003-01-07 22:42:49 +000014862echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
14863echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
14864if test "${ac_cv_prog_cc_stdc+set}" = set; then
14865 echo $ECHO_N "(cached) $ECHO_C" >&6
14866else
14867 ac_cv_prog_cc_stdc=no
14868ac_save_CC=$CC
14869cat >conftest.$ac_ext <<_ACEOF
14870#line $LINENO "configure"
14871#include "confdefs.h"
14872#include <stdarg.h>
14873#include <stdio.h>
14874#include <sys/types.h>
14875#include <sys/stat.h>
14876/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
14877struct buf { int x; };
14878FILE * (*rcsopen) (struct buf *, struct stat *, int);
14879static char *e (p, i)
14880 char **p;
14881 int i;
14882{
14883 return p[i];
14884}
14885static char *f (char * (*g) (char **, int), char **p, ...)
14886{
14887 char *s;
14888 va_list v;
14889 va_start (v,p);
14890 s = g (p, va_arg (v,int));
14891 va_end (v);
14892 return s;
14893}
14894int test (int i, double x);
14895struct s1 {int (*f) (int a);};
14896struct s2 {int (*f) (double a);};
14897int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
14898int argc;
14899char **argv;
14900#ifdef F77_DUMMY_MAIN
14901# ifdef __cplusplus
14902 extern "C"
14903# endif
14904 int F77_DUMMY_MAIN() { return 1; }
14905#endif
14906int
14907main ()
14908{
14909return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
14910 ;
14911 return 0;
14912}
14913_ACEOF
14914# Don't try gcc -ansi; that turns off useful extensions and
14915# breaks some systems' header files.
14916# AIX -qlanglvl=ansi
14917# Ultrix and OSF/1 -std1
14918# HP-UX 10.20 and later -Ae
14919# HP-UX older versions -Aa -D_HPUX_SOURCE
14920# SVR4 -Xc -D__EXTENSIONS__
14921for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
14922do
14923 CC="$ac_save_CC $ac_arg"
14924 rm -f conftest.$ac_objext
14925if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14926 (eval $ac_compile) 2>&5
14927 ac_status=$?
14928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14929 (exit $ac_status); } &&
14930 { ac_try='test -s conftest.$ac_objext'
14931 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14932 (eval $ac_try) 2>&5
14933 ac_status=$?
14934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14935 (exit $ac_status); }; }; then
14936 ac_cv_prog_cc_stdc=$ac_arg
14937break
14938else
14939 echo "$as_me: failed program was:" >&5
14940cat conftest.$ac_ext >&5
14941fi
14942rm -f conftest.$ac_objext
14943done
14944rm -f conftest.$ac_ext conftest.$ac_objext
14945CC=$ac_save_CC
14946
14947fi
14948
14949case "x$ac_cv_prog_cc_stdc" in
14950 x|xno)
14951 echo "$as_me:$LINENO: result: none needed" >&5
14952echo "${ECHO_T}none needed" >&6 ;;
14953 *)
14954 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
14955echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
14956 CC="$CC $ac_cv_prog_cc_stdc" ;;
14957esac
14958
Martin v. Löwis11437992002-04-12 09:54:03 +000014959echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
14960echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14961if test "${ac_cv_c_const+set}" = set; then
14962 echo $ECHO_N "(cached) $ECHO_C" >&6
14963else
14964 cat >conftest.$ac_ext <<_ACEOF
14965#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014966#include "confdefs.h"
14967
Barry Warsawfe33b792003-01-07 22:42:49 +000014968#ifdef F77_DUMMY_MAIN
14969# ifdef __cplusplus
14970 extern "C"
14971# endif
14972 int F77_DUMMY_MAIN() { return 1; }
14973#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014974int
14975main ()
14976{
14977/* FIXME: Include the comments suggested by Paul. */
14978#ifndef __cplusplus
14979 /* Ultrix mips cc rejects this. */
14980 typedef int charset[2];
14981 const charset x;
14982 /* SunOS 4.1.1 cc rejects this. */
14983 char const *const *ccp;
14984 char **p;
14985 /* NEC SVR4.0.2 mips cc rejects this. */
14986 struct point {int x, y;};
14987 static struct point const zero = {0,0};
14988 /* AIX XL C 1.02.0.0 rejects this.
14989 It does not let you subtract one const X* pointer from another in
14990 an arm of an if-expression whose if-part is not a constant
14991 expression */
14992 const char *g = "string";
14993 ccp = &g + (g ? g-g : 0);
14994 /* HPUX 7.0 cc rejects these. */
14995 ++ccp;
14996 p = (char**) ccp;
14997 ccp = (char const *const *) p;
14998 { /* SCO 3.2v4 cc rejects this. */
14999 char *t;
15000 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015001
Martin v. Löwis11437992002-04-12 09:54:03 +000015002 *t++ = 0;
15003 }
15004 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
15005 int x[] = {25, 17};
15006 const int *foo = &x[0];
15007 ++foo;
15008 }
15009 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15010 typedef const int *iptr;
15011 iptr p = 0;
15012 ++p;
15013 }
15014 { /* AIX XL C 1.02.0.0 rejects this saying
15015 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15016 struct s { int j; const int *ap[3]; };
15017 struct s *b; b->j = 5;
15018 }
15019 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15020 const int foo = 10;
15021 }
15022#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000015023
Martin v. Löwis11437992002-04-12 09:54:03 +000015024 ;
15025 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000015026}
Martin v. Löwis11437992002-04-12 09:54:03 +000015027_ACEOF
15028rm -f conftest.$ac_objext
15029if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15030 (eval $ac_compile) 2>&5
15031 ac_status=$?
15032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15033 (exit $ac_status); } &&
15034 { ac_try='test -s conftest.$ac_objext'
15035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15036 (eval $ac_try) 2>&5
15037 ac_status=$?
15038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15039 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015040 ac_cv_c_const=yes
15041else
Martin v. Löwis11437992002-04-12 09:54:03 +000015042 echo "$as_me: failed program was:" >&5
15043cat conftest.$ac_ext >&5
15044ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015045fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015046rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015047fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015048echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
15049echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015050if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015051
15052cat >>confdefs.h <<\_ACEOF
15053#define const
15054_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015055
15056fi
15057
Michael W. Hudson54241132001-12-07 15:38:26 +000015058
Guido van Rossumda88dad1995-01-26 00:46:29 +000015059works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015060echo "$as_me:$LINENO: checking for working volatile" >&5
15061echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
15062cat >conftest.$ac_ext <<_ACEOF
15063#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015064#include "confdefs.h"
15065
Barry Warsawfe33b792003-01-07 22:42:49 +000015066#ifdef F77_DUMMY_MAIN
15067# ifdef __cplusplus
15068 extern "C"
15069# endif
15070 int F77_DUMMY_MAIN() { return 1; }
15071#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015072int
15073main ()
15074{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015075volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015076 ;
15077 return 0;
15078}
15079_ACEOF
15080rm -f conftest.$ac_objext
15081if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15082 (eval $ac_compile) 2>&5
15083 ac_status=$?
15084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15085 (exit $ac_status); } &&
15086 { ac_try='test -s conftest.$ac_objext'
15087 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15088 (eval $ac_try) 2>&5
15089 ac_status=$?
15090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15091 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015092 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015093else
Martin v. Löwis11437992002-04-12 09:54:03 +000015094 echo "$as_me: failed program was:" >&5
15095cat conftest.$ac_ext >&5
15096
15097cat >>confdefs.h <<\_ACEOF
15098#define volatile
15099_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015100
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015101
Guido van Rossum627b2d71993-12-24 10:39:16 +000015102fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015103rm -f conftest.$ac_objext conftest.$ac_ext
15104echo "$as_me:$LINENO: result: $works" >&5
15105echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015106
Guido van Rossumda88dad1995-01-26 00:46:29 +000015107works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015108echo "$as_me:$LINENO: checking for working signed char" >&5
15109echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
15110cat >conftest.$ac_ext <<_ACEOF
15111#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015112#include "confdefs.h"
15113
Barry Warsawfe33b792003-01-07 22:42:49 +000015114#ifdef F77_DUMMY_MAIN
15115# ifdef __cplusplus
15116 extern "C"
15117# endif
15118 int F77_DUMMY_MAIN() { return 1; }
15119#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015120int
15121main ()
15122{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015123signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000015124 ;
15125 return 0;
15126}
15127_ACEOF
15128rm -f conftest.$ac_objext
15129if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15130 (eval $ac_compile) 2>&5
15131 ac_status=$?
15132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15133 (exit $ac_status); } &&
15134 { ac_try='test -s conftest.$ac_objext'
15135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15136 (eval $ac_try) 2>&5
15137 ac_status=$?
15138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15139 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015140 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015141else
Martin v. Löwis11437992002-04-12 09:54:03 +000015142 echo "$as_me: failed program was:" >&5
15143cat conftest.$ac_ext >&5
15144
15145cat >>confdefs.h <<\_ACEOF
15146#define signed
15147_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000015148
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015149
Guido van Rossum7f43da71994-08-01 12:15:30 +000015150fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015151rm -f conftest.$ac_objext conftest.$ac_ext
15152echo "$as_me:$LINENO: result: $works" >&5
15153echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015154
Guido van Rossumda88dad1995-01-26 00:46:29 +000015155have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015156echo "$as_me:$LINENO: checking for prototypes" >&5
15157echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
15158cat >conftest.$ac_ext <<_ACEOF
15159#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015160#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015161int foo(int x) { return 0; }
Barry Warsawfe33b792003-01-07 22:42:49 +000015162#ifdef F77_DUMMY_MAIN
15163# ifdef __cplusplus
15164 extern "C"
15165# endif
15166 int F77_DUMMY_MAIN() { return 1; }
15167#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015168int
15169main ()
15170{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015171return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000015172 ;
15173 return 0;
15174}
15175_ACEOF
15176rm -f conftest.$ac_objext
15177if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15178 (eval $ac_compile) 2>&5
15179 ac_status=$?
15180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15181 (exit $ac_status); } &&
15182 { ac_try='test -s conftest.$ac_objext'
15183 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15184 (eval $ac_try) 2>&5
15185 ac_status=$?
15186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15187 (exit $ac_status); }; }; then
15188
15189
15190cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015191#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015192_ACEOF
15193
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015194 have_prototypes=yes
15195
Guido van Rossumf78abae1997-01-21 22:02:36 +000015196else
Martin v. Löwis11437992002-04-12 09:54:03 +000015197 echo "$as_me: failed program was:" >&5
15198cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000015199fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015200rm -f conftest.$ac_objext conftest.$ac_ext
15201echo "$as_me:$LINENO: result: $have_prototypes" >&5
15202echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015203
Guido van Rossumda88dad1995-01-26 00:46:29 +000015204works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015205echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
15206echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
15207cat >conftest.$ac_ext <<_ACEOF
15208#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015209#include "confdefs.h"
15210
15211#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000015212int foo(int x, ...) {
15213 va_list va;
15214 va_start(va, x);
15215 va_arg(va, int);
15216 va_arg(va, char *);
15217 va_arg(va, double);
15218 return 0;
15219}
Guido van Rossum7f43da71994-08-01 12:15:30 +000015220
Barry Warsawfe33b792003-01-07 22:42:49 +000015221#ifdef F77_DUMMY_MAIN
15222# ifdef __cplusplus
15223 extern "C"
15224# endif
15225 int F77_DUMMY_MAIN() { return 1; }
15226#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015227int
15228main ()
15229{
Guido van Rossum90eea071996-08-30 20:58:57 +000015230return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000015231 ;
15232 return 0;
15233}
15234_ACEOF
15235rm -f conftest.$ac_objext
15236if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15237 (eval $ac_compile) 2>&5
15238 ac_status=$?
15239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15240 (exit $ac_status); } &&
15241 { ac_try='test -s conftest.$ac_objext'
15242 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15243 (eval $ac_try) 2>&5
15244 ac_status=$?
15245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15246 (exit $ac_status); }; }; then
15247
15248
15249cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015250#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015251_ACEOF
15252
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015253 works=yes
15254
Guido van Rossumf78abae1997-01-21 22:02:36 +000015255else
Martin v. Löwis11437992002-04-12 09:54:03 +000015256 echo "$as_me: failed program was:" >&5
15257cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000015258fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015259rm -f conftest.$ac_objext conftest.$ac_ext
15260echo "$as_me:$LINENO: result: $works" >&5
15261echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015262
Guido van Rossumda88dad1995-01-26 00:46:29 +000015263if test "$have_prototypes" = yes; then
15264bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015265echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
15266echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
15267cat >conftest.$ac_ext <<_ACEOF
15268#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015269#include "confdefs.h"
15270#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000015271#ifdef F77_DUMMY_MAIN
15272# ifdef __cplusplus
15273 extern "C"
15274# endif
15275 int F77_DUMMY_MAIN() { return 1; }
15276#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015277int
15278main ()
15279{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015280char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000015281 ;
15282 return 0;
15283}
15284_ACEOF
15285rm -f conftest.$ac_objext
15286if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15287 (eval $ac_compile) 2>&5
15288 ac_status=$?
15289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15290 (exit $ac_status); } &&
15291 { ac_try='test -s conftest.$ac_objext'
15292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15293 (eval $ac_try) 2>&5
15294 ac_status=$?
15295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15296 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000015297 :
15298else
Martin v. Löwis11437992002-04-12 09:54:03 +000015299 echo "$as_me: failed program was:" >&5
15300cat conftest.$ac_ext >&5
15301
15302cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015303#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015304_ACEOF
15305
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015306 bad_prototypes=yes
15307
Guido van Rossum627b2d71993-12-24 10:39:16 +000015308fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015309rm -f conftest.$ac_objext conftest.$ac_ext
15310echo "$as_me:$LINENO: result: $bad_prototypes" >&5
15311echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015312fi
15313
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015314# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000015315echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
15316echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
15317cat >conftest.$ac_ext <<_ACEOF
15318#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015319#include "confdefs.h"
15320#include <sys/types.h>
15321#include <sys/socket.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000015322#ifdef F77_DUMMY_MAIN
15323# ifdef __cplusplus
15324 extern "C"
15325# endif
15326 int F77_DUMMY_MAIN() { return 1; }
15327#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015328int
15329main ()
15330{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015331struct sockaddr x;
15332x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015333 ;
15334 return 0;
15335}
15336_ACEOF
15337rm -f conftest.$ac_objext
15338if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15339 (eval $ac_compile) 2>&5
15340 ac_status=$?
15341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15342 (exit $ac_status); } &&
15343 { ac_try='test -s conftest.$ac_objext'
15344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15345 (eval $ac_try) 2>&5
15346 ac_status=$?
15347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15348 (exit $ac_status); }; }; then
15349 echo "$as_me:$LINENO: result: yes" >&5
15350echo "${ECHO_T}yes" >&6
15351
15352cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015353#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015354_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015355
15356else
Martin v. Löwis11437992002-04-12 09:54:03 +000015357 echo "$as_me: failed program was:" >&5
15358cat conftest.$ac_ext >&5
15359echo "$as_me:$LINENO: result: no" >&5
15360echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015361fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015362rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015363
Guido van Rossumda88dad1995-01-26 00:46:29 +000015364va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015365echo "$as_me:$LINENO: checking whether va_list is an array" >&5
15366echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
15367cat >conftest.$ac_ext <<_ACEOF
15368#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015369#include "confdefs.h"
15370
15371#ifdef HAVE_STDARG_PROTOTYPES
15372#include <stdarg.h>
15373#else
15374#include <varargs.h>
15375#endif
15376
Barry Warsawfe33b792003-01-07 22:42:49 +000015377#ifdef F77_DUMMY_MAIN
15378# ifdef __cplusplus
15379 extern "C"
15380# endif
15381 int F77_DUMMY_MAIN() { return 1; }
15382#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015383int
15384main ()
15385{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015386va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000015387 ;
15388 return 0;
15389}
15390_ACEOF
15391rm -f conftest.$ac_objext
15392if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15393 (eval $ac_compile) 2>&5
15394 ac_status=$?
15395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15396 (exit $ac_status); } &&
15397 { ac_try='test -s conftest.$ac_objext'
15398 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15399 (eval $ac_try) 2>&5
15400 ac_status=$?
15401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15402 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015403 :
15404else
Martin v. Löwis11437992002-04-12 09:54:03 +000015405 echo "$as_me: failed program was:" >&5
15406cat conftest.$ac_ext >&5
15407
15408
15409cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015410#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015411_ACEOF
15412
Guido van Rossumda88dad1995-01-26 00:46:29 +000015413 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015414
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015415fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015416rm -f conftest.$ac_objext conftest.$ac_ext
15417echo "$as_me:$LINENO: result: $va_list_is_array" >&5
15418echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015419
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015420# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000015421
15422
15423
15424echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
15425echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
15426if test "${ac_cv_func_gethostbyname_r+set}" = set; then
15427 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015428else
Martin v. Löwis11437992002-04-12 09:54:03 +000015429 cat >conftest.$ac_ext <<_ACEOF
15430#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015431#include "confdefs.h"
15432/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015433 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015434#include <assert.h>
15435/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015436#ifdef __cplusplus
15437extern "C"
15438#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015439/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015440 builtin and then its argument prototype would still apply. */
15441char gethostbyname_r ();
15442char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015443
Barry Warsawfe33b792003-01-07 22:42:49 +000015444#ifdef F77_DUMMY_MAIN
15445# ifdef __cplusplus
15446 extern "C"
15447# endif
15448 int F77_DUMMY_MAIN() { return 1; }
15449#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015450int
15451main ()
15452{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015453/* The GNU C library defines this for functions which it implements
15454 to always fail with ENOSYS. Some functions are actually named
15455 something starting with __ and the normal name is an alias. */
15456#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
15457choke me
15458#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015459f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015460#endif
15461
Martin v. Löwis11437992002-04-12 09:54:03 +000015462 ;
15463 return 0;
15464}
15465_ACEOF
15466rm -f conftest.$ac_objext conftest$ac_exeext
15467if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15468 (eval $ac_link) 2>&5
15469 ac_status=$?
15470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15471 (exit $ac_status); } &&
15472 { ac_try='test -s conftest$ac_exeext'
15473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15474 (eval $ac_try) 2>&5
15475 ac_status=$?
15476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15477 (exit $ac_status); }; }; then
15478 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015479else
Martin v. Löwis11437992002-04-12 09:54:03 +000015480 echo "$as_me: failed program was:" >&5
15481cat conftest.$ac_ext >&5
15482ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015483fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015484rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015485fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015486echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
15487echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
15488if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015489
Martin v. Löwis11437992002-04-12 09:54:03 +000015490 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015491#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015492_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015493
Martin v. Löwis11437992002-04-12 09:54:03 +000015494 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
15495echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015496 OLD_CFLAGS=$CFLAGS
15497 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015498 cat >conftest.$ac_ext <<_ACEOF
15499#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015500#include "confdefs.h"
15501
15502# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015503
Barry Warsawfe33b792003-01-07 22:42:49 +000015504#ifdef F77_DUMMY_MAIN
15505# ifdef __cplusplus
15506 extern "C"
15507# endif
15508 int F77_DUMMY_MAIN() { return 1; }
15509#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015510int
15511main ()
15512{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015513
15514 char *name;
15515 struct hostent *he, *res;
15516 char buffer[2048];
15517 int buflen = 2048;
15518 int h_errnop;
15519
15520 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015521
15522 ;
15523 return 0;
15524}
15525_ACEOF
15526rm -f conftest.$ac_objext
15527if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15528 (eval $ac_compile) 2>&5
15529 ac_status=$?
15530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15531 (exit $ac_status); } &&
15532 { ac_try='test -s conftest.$ac_objext'
15533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15534 (eval $ac_try) 2>&5
15535 ac_status=$?
15536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15537 (exit $ac_status); }; }; then
15538
15539 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015540#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015541_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015542
Martin v. Löwis11437992002-04-12 09:54:03 +000015543
15544cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015545#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015546_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015547
Martin v. Löwis11437992002-04-12 09:54:03 +000015548 echo "$as_me:$LINENO: result: yes" >&5
15549echo "${ECHO_T}yes" >&6
15550
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015551else
Martin v. Löwis11437992002-04-12 09:54:03 +000015552 echo "$as_me: failed program was:" >&5
15553cat conftest.$ac_ext >&5
15554
15555 echo "$as_me:$LINENO: result: no" >&5
15556echo "${ECHO_T}no" >&6
15557 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
15558echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
15559 cat >conftest.$ac_ext <<_ACEOF
15560#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015561#include "confdefs.h"
15562
15563# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015564
Barry Warsawfe33b792003-01-07 22:42:49 +000015565#ifdef F77_DUMMY_MAIN
15566# ifdef __cplusplus
15567 extern "C"
15568# endif
15569 int F77_DUMMY_MAIN() { return 1; }
15570#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015571int
15572main ()
15573{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015574
15575 char *name;
15576 struct hostent *he;
15577 char buffer[2048];
15578 int buflen = 2048;
15579 int h_errnop;
15580
15581 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015582
15583 ;
15584 return 0;
15585}
15586_ACEOF
15587rm -f conftest.$ac_objext
15588if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15589 (eval $ac_compile) 2>&5
15590 ac_status=$?
15591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15592 (exit $ac_status); } &&
15593 { ac_try='test -s conftest.$ac_objext'
15594 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15595 (eval $ac_try) 2>&5
15596 ac_status=$?
15597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15598 (exit $ac_status); }; }; then
15599
15600 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015601#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015602_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015603
Martin v. Löwis11437992002-04-12 09:54:03 +000015604
15605cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015606#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015607_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015608
Martin v. Löwis11437992002-04-12 09:54:03 +000015609 echo "$as_me:$LINENO: result: yes" >&5
15610echo "${ECHO_T}yes" >&6
15611
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015612else
Martin v. Löwis11437992002-04-12 09:54:03 +000015613 echo "$as_me: failed program was:" >&5
15614cat conftest.$ac_ext >&5
15615
15616 echo "$as_me:$LINENO: result: no" >&5
15617echo "${ECHO_T}no" >&6
15618 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
15619echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
15620 cat >conftest.$ac_ext <<_ACEOF
15621#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015622#include "confdefs.h"
15623
15624# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015625
Barry Warsawfe33b792003-01-07 22:42:49 +000015626#ifdef F77_DUMMY_MAIN
15627# ifdef __cplusplus
15628 extern "C"
15629# endif
15630 int F77_DUMMY_MAIN() { return 1; }
15631#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015632int
15633main ()
15634{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015635
15636 char *name;
15637 struct hostent *he;
15638 struct hostent_data data;
15639
15640 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000015641
15642 ;
15643 return 0;
15644}
15645_ACEOF
15646rm -f conftest.$ac_objext
15647if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15648 (eval $ac_compile) 2>&5
15649 ac_status=$?
15650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15651 (exit $ac_status); } &&
15652 { ac_try='test -s conftest.$ac_objext'
15653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15654 (eval $ac_try) 2>&5
15655 ac_status=$?
15656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15657 (exit $ac_status); }; }; then
15658
15659 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015660#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015661_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015662
Martin v. Löwis11437992002-04-12 09:54:03 +000015663
15664cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015665#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015666_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015667
Martin v. Löwis11437992002-04-12 09:54:03 +000015668 echo "$as_me:$LINENO: result: yes" >&5
15669echo "${ECHO_T}yes" >&6
15670
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015671else
Martin v. Löwis11437992002-04-12 09:54:03 +000015672 echo "$as_me: failed program was:" >&5
15673cat conftest.$ac_ext >&5
15674
15675 echo "$as_me:$LINENO: result: no" >&5
15676echo "${ECHO_T}no" >&6
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
15683
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015684fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015685rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015686 CFLAGS=$OLD_CFLAGS
15687
15688else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015689
Martin v. Löwis11437992002-04-12 09:54:03 +000015690
15691for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000015692do
Martin v. Löwis11437992002-04-12 09:54:03 +000015693as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15694echo "$as_me:$LINENO: checking for $ac_func" >&5
15695echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15696if eval "test \"\${$as_ac_var+set}\" = set"; then
15697 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015698else
Martin v. Löwis11437992002-04-12 09:54:03 +000015699 cat >conftest.$ac_ext <<_ACEOF
15700#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015701#include "confdefs.h"
15702/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015703 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015704#include <assert.h>
15705/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015706#ifdef __cplusplus
15707extern "C"
15708#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015709/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015710 builtin and then its argument prototype would still apply. */
15711char $ac_func ();
15712char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015713
Barry Warsawfe33b792003-01-07 22:42:49 +000015714#ifdef F77_DUMMY_MAIN
15715# ifdef __cplusplus
15716 extern "C"
15717# endif
15718 int F77_DUMMY_MAIN() { return 1; }
15719#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015720int
15721main ()
15722{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015723/* The GNU C library defines this for functions which it implements
15724 to always fail with ENOSYS. Some functions are actually named
15725 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015726#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015727choke me
15728#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015729f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015730#endif
15731
Martin v. Löwis11437992002-04-12 09:54:03 +000015732 ;
15733 return 0;
15734}
15735_ACEOF
15736rm -f conftest.$ac_objext conftest$ac_exeext
15737if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15738 (eval $ac_link) 2>&5
15739 ac_status=$?
15740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15741 (exit $ac_status); } &&
15742 { ac_try='test -s conftest$ac_exeext'
15743 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15744 (eval $ac_try) 2>&5
15745 ac_status=$?
15746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15747 (exit $ac_status); }; }; then
15748 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015749else
Martin v. Löwis11437992002-04-12 09:54:03 +000015750 echo "$as_me: failed program was:" >&5
15751cat conftest.$ac_ext >&5
15752eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015753fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015754rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015755fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015756echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15757echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15758if test `eval echo '${'$as_ac_var'}'` = yes; then
15759 cat >>confdefs.h <<_ACEOF
15760#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15761_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015762
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015763fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015764done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015765
Michael W. Hudson54241132001-12-07 15:38:26 +000015766
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015767fi
15768
Michael W. Hudson54241132001-12-07 15:38:26 +000015769
15770
15771
15772
15773
15774
Guido van Rossum627b2d71993-12-24 10:39:16 +000015775# checks for system services
15776# (none yet)
15777
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015778# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000015779echo "$as_me:$LINENO: checking for __fpu_control" >&5
15780echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
15781if test "${ac_cv_func___fpu_control+set}" = set; then
15782 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015783else
Martin v. Löwis11437992002-04-12 09:54:03 +000015784 cat >conftest.$ac_ext <<_ACEOF
15785#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015786#include "confdefs.h"
15787/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015788 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015789#include <assert.h>
15790/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015791#ifdef __cplusplus
15792extern "C"
15793#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015794/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015795 builtin and then its argument prototype would still apply. */
15796char __fpu_control ();
15797char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015798
Barry Warsawfe33b792003-01-07 22:42:49 +000015799#ifdef F77_DUMMY_MAIN
15800# ifdef __cplusplus
15801 extern "C"
15802# endif
15803 int F77_DUMMY_MAIN() { return 1; }
15804#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015805int
15806main ()
15807{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015808/* The GNU C library defines this for functions which it implements
15809 to always fail with ENOSYS. Some functions are actually named
15810 something starting with __ and the normal name is an alias. */
15811#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
15812choke me
15813#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015814f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015815#endif
15816
Martin v. Löwis11437992002-04-12 09:54:03 +000015817 ;
15818 return 0;
15819}
15820_ACEOF
15821rm -f conftest.$ac_objext conftest$ac_exeext
15822if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15823 (eval $ac_link) 2>&5
15824 ac_status=$?
15825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15826 (exit $ac_status); } &&
15827 { ac_try='test -s conftest$ac_exeext'
15828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15829 (eval $ac_try) 2>&5
15830 ac_status=$?
15831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15832 (exit $ac_status); }; }; then
15833 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015834else
Martin v. Löwis11437992002-04-12 09:54:03 +000015835 echo "$as_me: failed program was:" >&5
15836cat conftest.$ac_ext >&5
15837ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015838fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015839rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015840fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015841echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
15842echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
15843if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015844 :
15845else
Martin v. Löwis11437992002-04-12 09:54:03 +000015846
15847echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
15848echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
15849if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
15850 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015851else
Martin v. Löwis11437992002-04-12 09:54:03 +000015852 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015853LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015854cat >conftest.$ac_ext <<_ACEOF
15855#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015856#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015857
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015858/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015859#ifdef __cplusplus
15860extern "C"
15861#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015862/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015863 builtin and then its argument prototype would still apply. */
15864char __fpu_control ();
Barry Warsawfe33b792003-01-07 22:42:49 +000015865#ifdef F77_DUMMY_MAIN
15866# ifdef __cplusplus
15867 extern "C"
15868# endif
15869 int F77_DUMMY_MAIN() { return 1; }
15870#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015871int
15872main ()
15873{
15874__fpu_control ();
15875 ;
15876 return 0;
15877}
15878_ACEOF
15879rm -f conftest.$ac_objext conftest$ac_exeext
15880if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15881 (eval $ac_link) 2>&5
15882 ac_status=$?
15883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15884 (exit $ac_status); } &&
15885 { ac_try='test -s conftest$ac_exeext'
15886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15887 (eval $ac_try) 2>&5
15888 ac_status=$?
15889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15890 (exit $ac_status); }; }; then
15891 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015892else
Martin v. Löwis11437992002-04-12 09:54:03 +000015893 echo "$as_me: failed program was:" >&5
15894cat conftest.$ac_ext >&5
15895ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015896fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015897rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15898LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015899fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015900echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
15901echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
15902if test $ac_cv_lib_ieee___fpu_control = yes; then
15903 cat >>confdefs.h <<_ACEOF
15904#define HAVE_LIBIEEE 1
15905_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015906
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015907 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015908
Guido van Rossum627b2d71993-12-24 10:39:16 +000015909fi
15910
Michael W. Hudson54241132001-12-07 15:38:26 +000015911
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015912fi
15913
Michael W. Hudson54241132001-12-07 15:38:26 +000015914
Guido van Rossum7f253911997-05-09 02:42:48 +000015915# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000015916echo "$as_me:$LINENO: checking for --with-fpectl" >&5
15917echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
15918
Guido van Rossum7f253911997-05-09 02:42:48 +000015919# Check whether --with-fpectl or --without-fpectl was given.
15920if test "${with_fpectl+set}" = set; then
15921 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000015922
Guido van Rossum7f253911997-05-09 02:42:48 +000015923if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015924then
15925
15926cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000015927#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015928_ACEOF
15929
15930 echo "$as_me:$LINENO: result: yes" >&5
15931echo "${ECHO_T}yes" >&6
15932else echo "$as_me:$LINENO: result: no" >&5
15933echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015934fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015935else
Martin v. Löwis11437992002-04-12 09:54:03 +000015936 echo "$as_me:$LINENO: result: no" >&5
15937echo "${ECHO_T}no" >&6
15938fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000015939
Guido van Rossum7f43da71994-08-01 12:15:30 +000015940# check for --with-libm=...
15941
Guido van Rossum563e7081996-09-10 18:20:48 +000015942case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000015943Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015944BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000015945*) LIBM=-lm
15946esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015947echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
15948echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
15949
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015950# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015951if test "${with_libm+set}" = set; then
15952 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000015953
Guido van Rossum7f253911997-05-09 02:42:48 +000015954if test "$withval" = no
15955then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000015956 echo "$as_me:$LINENO: result: force LIBM empty" >&5
15957echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015958elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015959then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015960 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
15961echo "${ECHO_T}set LIBM=\"$withval\"" >&6
15962else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
15963echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
15964 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015965fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015966else
Martin v. Löwis11437992002-04-12 09:54:03 +000015967 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
15968echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
15969fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015970
15971# check for --with-libc=...
15972
Martin v. Löwis11437992002-04-12 09:54:03 +000015973echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
15974echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
15975
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015976# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015977if test "${with_libc+set}" = set; then
15978 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000015979
Guido van Rossum7f253911997-05-09 02:42:48 +000015980if test "$withval" = no
15981then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000015982 echo "$as_me:$LINENO: result: force LIBC empty" >&5
15983echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015984elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015985then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015986 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
15987echo "${ECHO_T}set LIBC=\"$withval\"" >&6
15988else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
15989echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
15990 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015991fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015992else
Martin v. Löwis11437992002-04-12 09:54:03 +000015993 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
15994echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
15995fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015996
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015997# check for hypot() in math library
15998LIBS_SAVE=$LIBS
15999LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000016000
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016001for ac_func in hypot
16002do
Martin v. Löwis11437992002-04-12 09:54:03 +000016003as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16004echo "$as_me:$LINENO: checking for $ac_func" >&5
16005echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16006if eval "test \"\${$as_ac_var+set}\" = set"; then
16007 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016008else
Martin v. Löwis11437992002-04-12 09:54:03 +000016009 cat >conftest.$ac_ext <<_ACEOF
16010#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016011#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016012/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000016013 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016014#include <assert.h>
16015/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016016#ifdef __cplusplus
16017extern "C"
16018#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016019/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016020 builtin and then its argument prototype would still apply. */
16021char $ac_func ();
16022char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016023
Barry Warsawfe33b792003-01-07 22:42:49 +000016024#ifdef F77_DUMMY_MAIN
16025# ifdef __cplusplus
16026 extern "C"
16027# endif
16028 int F77_DUMMY_MAIN() { return 1; }
16029#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016030int
16031main ()
16032{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016033/* The GNU C library defines this for functions which it implements
16034 to always fail with ENOSYS. Some functions are actually named
16035 something starting with __ and the normal name is an alias. */
16036#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16037choke me
16038#else
Martin v. Löwis11437992002-04-12 09:54:03 +000016039f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016040#endif
16041
Martin v. Löwis11437992002-04-12 09:54:03 +000016042 ;
16043 return 0;
16044}
16045_ACEOF
16046rm -f conftest.$ac_objext conftest$ac_exeext
16047if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16048 (eval $ac_link) 2>&5
16049 ac_status=$?
16050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16051 (exit $ac_status); } &&
16052 { ac_try='test -s conftest$ac_exeext'
16053 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16054 (eval $ac_try) 2>&5
16055 ac_status=$?
16056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16057 (exit $ac_status); }; }; then
16058 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016059else
Martin v. Löwis11437992002-04-12 09:54:03 +000016060 echo "$as_me: failed program was:" >&5
16061cat conftest.$ac_ext >&5
16062eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016063fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016064rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016065fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016066echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16067echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16068if test `eval echo '${'$as_ac_var'}'` = yes; then
16069 cat >>confdefs.h <<_ACEOF
16070#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16071_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000016072
Michael W. Hudson54241132001-12-07 15:38:26 +000016073else
Martin v. Löwis11437992002-04-12 09:54:03 +000016074 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016075fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016076done
16077
Michael W. Hudson54241132001-12-07 15:38:26 +000016078
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016079LIBS=$LIBS_SAVE
16080
Guido van Rossumef2255b2000-03-10 22:30:29 +000016081# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000016082if test "${ac_cv_header_wchar_h+set}" = set; then
16083 echo "$as_me:$LINENO: checking for wchar.h" >&5
16084echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16085if test "${ac_cv_header_wchar_h+set}" = set; then
16086 echo $ECHO_N "(cached) $ECHO_C" >&6
16087fi
16088echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16089echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000016090else
Martin v. Löwis11437992002-04-12 09:54:03 +000016091 # Is the header compilable?
16092echo "$as_me:$LINENO: checking wchar.h usability" >&5
16093echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
16094cat >conftest.$ac_ext <<_ACEOF
16095#line $LINENO "configure"
16096#include "confdefs.h"
16097$ac_includes_default
16098#include <wchar.h>
16099_ACEOF
16100rm -f conftest.$ac_objext
16101if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16102 (eval $ac_compile) 2>&5
16103 ac_status=$?
16104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16105 (exit $ac_status); } &&
16106 { ac_try='test -s conftest.$ac_objext'
16107 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16108 (eval $ac_try) 2>&5
16109 ac_status=$?
16110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16111 (exit $ac_status); }; }; then
16112 ac_header_compiler=yes
16113else
16114 echo "$as_me: failed program was:" >&5
16115cat conftest.$ac_ext >&5
16116ac_header_compiler=no
16117fi
16118rm -f conftest.$ac_objext conftest.$ac_ext
16119echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16120echo "${ECHO_T}$ac_header_compiler" >&6
16121
16122# Is the header present?
16123echo "$as_me:$LINENO: checking wchar.h presence" >&5
16124echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
16125cat >conftest.$ac_ext <<_ACEOF
16126#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016127#include "confdefs.h"
16128#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016129_ACEOF
16130if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16131 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16132 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000016133 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016134 rm -f conftest.er1
16135 cat conftest.err >&5
16136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16137 (exit $ac_status); } >/dev/null; then
16138 if test -s conftest.err; then
16139 ac_cpp_err=$ac_c_preproc_warn_flag
16140 else
16141 ac_cpp_err=
16142 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016143else
Martin v. Löwis11437992002-04-12 09:54:03 +000016144 ac_cpp_err=yes
16145fi
16146if test -z "$ac_cpp_err"; then
16147 ac_header_preproc=yes
16148else
16149 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000016150 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016151 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016152fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016153rm -f conftest.err conftest.$ac_ext
16154echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16155echo "${ECHO_T}$ac_header_preproc" >&6
16156
16157# So? What about this header?
16158case $ac_header_compiler:$ac_header_preproc in
16159 yes:no )
16160 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
16161echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16162 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
16163echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
16164 no:yes )
16165 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
16166echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
16167 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
16168echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
16169 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
16170echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
16171esac
16172echo "$as_me:$LINENO: checking for wchar.h" >&5
16173echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16174if test "${ac_cv_header_wchar_h+set}" = set; then
16175 echo $ECHO_N "(cached) $ECHO_C" >&6
16176else
16177 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000016178fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016179echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16180echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
16181
16182fi
16183if test $ac_cv_header_wchar_h = yes; then
16184
16185
16186cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016187#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016188_ACEOF
16189
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016190 wchar_h="yes"
16191
Guido van Rossumef2255b2000-03-10 22:30:29 +000016192else
Martin v. Löwis11437992002-04-12 09:54:03 +000016193 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016194
16195fi
16196
Michael W. Hudson54241132001-12-07 15:38:26 +000016197
Martin v. Löwis11437992002-04-12 09:54:03 +000016198
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016199# determine wchar_t size
16200if test "$wchar_h" = yes
16201then
Martin v. Löwis11437992002-04-12 09:54:03 +000016202 echo "$as_me:$LINENO: checking for wchar_t" >&5
16203echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
16204if test "${ac_cv_type_wchar_t+set}" = set; then
16205 echo $ECHO_N "(cached) $ECHO_C" >&6
16206else
16207 cat >conftest.$ac_ext <<_ACEOF
16208#line $LINENO "configure"
16209#include "confdefs.h"
16210#include <wchar.h>
16211
Barry Warsawfe33b792003-01-07 22:42:49 +000016212#ifdef F77_DUMMY_MAIN
16213# ifdef __cplusplus
16214 extern "C"
16215# endif
16216 int F77_DUMMY_MAIN() { return 1; }
16217#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016218int
16219main ()
16220{
16221if ((wchar_t *) 0)
16222 return 0;
16223if (sizeof (wchar_t))
16224 return 0;
16225 ;
16226 return 0;
16227}
16228_ACEOF
16229rm -f conftest.$ac_objext
16230if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16231 (eval $ac_compile) 2>&5
16232 ac_status=$?
16233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16234 (exit $ac_status); } &&
16235 { ac_try='test -s conftest.$ac_objext'
16236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16237 (eval $ac_try) 2>&5
16238 ac_status=$?
16239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16240 (exit $ac_status); }; }; then
16241 ac_cv_type_wchar_t=yes
16242else
16243 echo "$as_me: failed program was:" >&5
16244cat conftest.$ac_ext >&5
16245ac_cv_type_wchar_t=no
16246fi
16247rm -f conftest.$ac_objext conftest.$ac_ext
16248fi
16249echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
16250echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
16251
16252echo "$as_me:$LINENO: checking size of wchar_t" >&5
16253echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
16254if test "${ac_cv_sizeof_wchar_t+set}" = set; then
16255 echo $ECHO_N "(cached) $ECHO_C" >&6
16256else
16257 if test "$ac_cv_type_wchar_t" = yes; then
16258 # The cast to unsigned long works around a bug in the HP C Compiler
16259 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16260 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16261 # This bug is HP SR number 8606223364.
16262 if test "$cross_compiling" = yes; then
16263 # Depending upon the size, compute the lo and hi bounds.
16264cat >conftest.$ac_ext <<_ACEOF
16265#line $LINENO "configure"
16266#include "confdefs.h"
16267#include <wchar.h>
16268
Barry Warsawfe33b792003-01-07 22:42:49 +000016269#ifdef F77_DUMMY_MAIN
16270# ifdef __cplusplus
16271 extern "C"
16272# endif
16273 int F77_DUMMY_MAIN() { return 1; }
16274#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016275int
16276main ()
16277{
16278static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
16279test_array [0] = 0
16280
16281 ;
16282 return 0;
16283}
16284_ACEOF
16285rm -f conftest.$ac_objext
16286if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16287 (eval $ac_compile) 2>&5
16288 ac_status=$?
16289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16290 (exit $ac_status); } &&
16291 { ac_try='test -s conftest.$ac_objext'
16292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16293 (eval $ac_try) 2>&5
16294 ac_status=$?
16295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16296 (exit $ac_status); }; }; then
16297 ac_lo=0 ac_mid=0
16298 while :; do
16299 cat >conftest.$ac_ext <<_ACEOF
16300#line $LINENO "configure"
16301#include "confdefs.h"
16302#include <wchar.h>
16303
Barry Warsawfe33b792003-01-07 22:42:49 +000016304#ifdef F77_DUMMY_MAIN
16305# ifdef __cplusplus
16306 extern "C"
16307# endif
16308 int F77_DUMMY_MAIN() { return 1; }
16309#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016310int
16311main ()
16312{
16313static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16314test_array [0] = 0
16315
16316 ;
16317 return 0;
16318}
16319_ACEOF
16320rm -f conftest.$ac_objext
16321if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16322 (eval $ac_compile) 2>&5
16323 ac_status=$?
16324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16325 (exit $ac_status); } &&
16326 { ac_try='test -s conftest.$ac_objext'
16327 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16328 (eval $ac_try) 2>&5
16329 ac_status=$?
16330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16331 (exit $ac_status); }; }; then
16332 ac_hi=$ac_mid; break
16333else
16334 echo "$as_me: failed program was:" >&5
16335cat conftest.$ac_ext >&5
16336ac_lo=`expr $ac_mid + 1`
16337 if test $ac_lo -le $ac_mid; then
16338 ac_lo= ac_hi=
16339 break
16340 fi
16341 ac_mid=`expr 2 '*' $ac_mid + 1`
16342fi
16343rm -f conftest.$ac_objext conftest.$ac_ext
16344 done
16345else
16346 echo "$as_me: failed program was:" >&5
16347cat conftest.$ac_ext >&5
16348cat >conftest.$ac_ext <<_ACEOF
16349#line $LINENO "configure"
16350#include "confdefs.h"
16351#include <wchar.h>
16352
Barry Warsawfe33b792003-01-07 22:42:49 +000016353#ifdef F77_DUMMY_MAIN
16354# ifdef __cplusplus
16355 extern "C"
16356# endif
16357 int F77_DUMMY_MAIN() { return 1; }
16358#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016359int
16360main ()
16361{
16362static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
16363test_array [0] = 0
16364
16365 ;
16366 return 0;
16367}
16368_ACEOF
16369rm -f conftest.$ac_objext
16370if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16371 (eval $ac_compile) 2>&5
16372 ac_status=$?
16373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16374 (exit $ac_status); } &&
16375 { ac_try='test -s conftest.$ac_objext'
16376 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16377 (eval $ac_try) 2>&5
16378 ac_status=$?
16379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16380 (exit $ac_status); }; }; then
16381 ac_hi=-1 ac_mid=-1
16382 while :; do
16383 cat >conftest.$ac_ext <<_ACEOF
16384#line $LINENO "configure"
16385#include "confdefs.h"
16386#include <wchar.h>
16387
Barry Warsawfe33b792003-01-07 22:42:49 +000016388#ifdef F77_DUMMY_MAIN
16389# ifdef __cplusplus
16390 extern "C"
16391# endif
16392 int F77_DUMMY_MAIN() { return 1; }
16393#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016394int
16395main ()
16396{
16397static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
16398test_array [0] = 0
16399
16400 ;
16401 return 0;
16402}
16403_ACEOF
16404rm -f conftest.$ac_objext
16405if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16406 (eval $ac_compile) 2>&5
16407 ac_status=$?
16408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16409 (exit $ac_status); } &&
16410 { ac_try='test -s conftest.$ac_objext'
16411 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16412 (eval $ac_try) 2>&5
16413 ac_status=$?
16414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16415 (exit $ac_status); }; }; then
16416 ac_lo=$ac_mid; break
16417else
16418 echo "$as_me: failed program was:" >&5
16419cat conftest.$ac_ext >&5
16420ac_hi=`expr '(' $ac_mid ')' - 1`
16421 if test $ac_mid -le $ac_hi; then
16422 ac_lo= ac_hi=
16423 break
16424 fi
16425 ac_mid=`expr 2 '*' $ac_mid`
16426fi
16427rm -f conftest.$ac_objext conftest.$ac_ext
16428 done
16429else
16430 echo "$as_me: failed program was:" >&5
16431cat conftest.$ac_ext >&5
16432ac_lo= ac_hi=
16433fi
16434rm -f conftest.$ac_objext conftest.$ac_ext
16435fi
16436rm -f conftest.$ac_objext conftest.$ac_ext
16437# Binary search between lo and hi bounds.
16438while test "x$ac_lo" != "x$ac_hi"; do
16439 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
16440 cat >conftest.$ac_ext <<_ACEOF
16441#line $LINENO "configure"
16442#include "confdefs.h"
16443#include <wchar.h>
16444
Barry Warsawfe33b792003-01-07 22:42:49 +000016445#ifdef F77_DUMMY_MAIN
16446# ifdef __cplusplus
16447 extern "C"
16448# endif
16449 int F77_DUMMY_MAIN() { return 1; }
16450#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016451int
16452main ()
16453{
16454static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16455test_array [0] = 0
16456
16457 ;
16458 return 0;
16459}
16460_ACEOF
16461rm -f conftest.$ac_objext
16462if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16463 (eval $ac_compile) 2>&5
16464 ac_status=$?
16465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16466 (exit $ac_status); } &&
16467 { ac_try='test -s conftest.$ac_objext'
16468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16469 (eval $ac_try) 2>&5
16470 ac_status=$?
16471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16472 (exit $ac_status); }; }; then
16473 ac_hi=$ac_mid
16474else
16475 echo "$as_me: failed program was:" >&5
16476cat conftest.$ac_ext >&5
16477ac_lo=`expr '(' $ac_mid ')' + 1`
16478fi
16479rm -f conftest.$ac_objext conftest.$ac_ext
16480done
16481case $ac_lo in
16482?*) ac_cv_sizeof_wchar_t=$ac_lo;;
16483'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
16484echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
16485 { (exit 1); exit 1; }; } ;;
16486esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016487else
16488 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016489 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
16490echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16491 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000016492else
Martin v. Löwis11437992002-04-12 09:54:03 +000016493 cat >conftest.$ac_ext <<_ACEOF
16494#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016495#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016496#include <wchar.h>
16497
16498long longval () { return (long) (sizeof (wchar_t)); }
16499unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000016500#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016501#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000016502#ifdef F77_DUMMY_MAIN
16503# ifdef __cplusplus
16504 extern "C"
16505# endif
16506 int F77_DUMMY_MAIN() { return 1; }
16507#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016508int
16509main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016510{
Martin v. Löwis11437992002-04-12 09:54:03 +000016511
16512 FILE *f = fopen ("conftest.val", "w");
16513 if (! f)
16514 exit (1);
16515 if (((long) (sizeof (wchar_t))) < 0)
16516 {
16517 long i = longval ();
16518 if (i != ((long) (sizeof (wchar_t))))
16519 exit (1);
16520 fprintf (f, "%ld\n", i);
16521 }
16522 else
16523 {
16524 unsigned long i = ulongval ();
16525 if (i != ((long) (sizeof (wchar_t))))
16526 exit (1);
16527 fprintf (f, "%lu\n", i);
16528 }
16529 exit (ferror (f) || fclose (f) != 0);
16530
16531 ;
16532 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000016533}
Martin v. Löwis11437992002-04-12 09:54:03 +000016534_ACEOF
16535rm -f conftest$ac_exeext
16536if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16537 (eval $ac_link) 2>&5
16538 ac_status=$?
16539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16540 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16542 (eval $ac_try) 2>&5
16543 ac_status=$?
16544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16545 (exit $ac_status); }; }; then
16546 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000016547else
Martin v. Löwis11437992002-04-12 09:54:03 +000016548 echo "$as_me: program exited with status $ac_status" >&5
16549echo "$as_me: failed program was:" >&5
16550cat conftest.$ac_ext >&5
16551( exit $ac_status )
16552{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
16553echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
16554 { (exit 1); exit 1; }; }
16555fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016556rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016557fi
16558fi
16559rm -f conftest.val
16560else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016561 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000016562fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016563fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016564echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
16565echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
16566cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016567#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016568_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016569
Michael W. Hudson54241132001-12-07 15:38:26 +000016570
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016571fi
16572
Martin v. Löwis11437992002-04-12 09:54:03 +000016573echo "$as_me:$LINENO: checking what type to use for unicode" >&5
16574echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016575# Check whether --enable-unicode or --disable-unicode was given.
16576if test "${enable_unicode+set}" = set; then
16577 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000016578
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016579else
16580 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000016581fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016582
16583if test $enable_unicode = yes
16584then
Martin v. Löwisfd917792001-06-27 20:22:04 +000016585 # Without any arguments, Py_UNICODE defaults to two-byte mode
16586 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016587fi
16588
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016589
16590
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016591case "$enable_unicode" in
16592ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000016593 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016594#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000016595_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016596
16597 ;;
16598ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000016599 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016600#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000016601_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016602
16603 ;;
16604esac
16605
Michael W. Hudson54241132001-12-07 15:38:26 +000016606
Martin v. Löwis11437992002-04-12 09:54:03 +000016607
16608
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016609
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016610if test "$enable_unicode" = "no"
16611then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016612 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000016613 echo "$as_me:$LINENO: result: not used" >&5
16614echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016615else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016616 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000016617
16618cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016619#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016620_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016621
16622 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
16623 then
16624 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016625
Martin v. Löwis11437992002-04-12 09:54:03 +000016626cat >>confdefs.h <<\_ACEOF
16627#define HAVE_USABLE_WCHAR_T 1
16628_ACEOF
16629
16630 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016631#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016632_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016633
16634 elif test "$ac_cv_sizeof_short" = "$unicode_size"
16635 then
16636 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000016637 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016638#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000016639_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016640
16641 elif test "$ac_cv_sizeof_long" = "$unicode_size"
16642 then
16643 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000016644 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016645#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000016646_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016647
16648 else
16649 PY_UNICODE_TYPE="no type found"
16650 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016651 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
16652echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016653fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016654
16655# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000016656echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
16657echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
16658if test "${ac_cv_c_bigendian+set}" = set; then
16659 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000016660else
Martin v. Löwis11437992002-04-12 09:54:03 +000016661 # See if sys/param.h defines the BYTE_ORDER macro.
16662cat >conftest.$ac_ext <<_ACEOF
16663#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016664#include "confdefs.h"
16665#include <sys/types.h>
16666#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000016667
Barry Warsawfe33b792003-01-07 22:42:49 +000016668#ifdef F77_DUMMY_MAIN
16669# ifdef __cplusplus
16670 extern "C"
16671# endif
16672 int F77_DUMMY_MAIN() { return 1; }
16673#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016674int
16675main ()
16676{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016677#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
16678 bogus endian macros
16679#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016680
16681 ;
16682 return 0;
16683}
16684_ACEOF
16685rm -f conftest.$ac_objext
16686if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16687 (eval $ac_compile) 2>&5
16688 ac_status=$?
16689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16690 (exit $ac_status); } &&
16691 { ac_try='test -s conftest.$ac_objext'
16692 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16693 (eval $ac_try) 2>&5
16694 ac_status=$?
16695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16696 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016697 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000016698cat >conftest.$ac_ext <<_ACEOF
16699#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016700#include "confdefs.h"
16701#include <sys/types.h>
16702#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000016703
Barry Warsawfe33b792003-01-07 22:42:49 +000016704#ifdef F77_DUMMY_MAIN
16705# ifdef __cplusplus
16706 extern "C"
16707# endif
16708 int F77_DUMMY_MAIN() { return 1; }
16709#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016710int
16711main ()
16712{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016713#if BYTE_ORDER != BIG_ENDIAN
16714 not big endian
16715#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016716
16717 ;
16718 return 0;
16719}
16720_ACEOF
16721rm -f conftest.$ac_objext
16722if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16723 (eval $ac_compile) 2>&5
16724 ac_status=$?
16725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16726 (exit $ac_status); } &&
16727 { ac_try='test -s conftest.$ac_objext'
16728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16729 (eval $ac_try) 2>&5
16730 ac_status=$?
16731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16732 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016733 ac_cv_c_bigendian=yes
16734else
Martin v. Löwis11437992002-04-12 09:54:03 +000016735 echo "$as_me: failed program was:" >&5
16736cat conftest.$ac_ext >&5
16737ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016738fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016739rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016740else
Martin v. Löwis11437992002-04-12 09:54:03 +000016741 echo "$as_me: failed program was:" >&5
16742cat conftest.$ac_ext >&5
16743# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000016744if test "$cross_compiling" = yes; then
Barry Warsawfe33b792003-01-07 22:42:49 +000016745 # try to guess the endianess by grep'ing values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000016746 ac_cv_c_bigendian=unknown
16747 cat >conftest.$ac_ext <<_ACEOF
16748#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016749#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016750short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16751short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16752void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
16753short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16754short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16755void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Barry Warsawfe33b792003-01-07 22:42:49 +000016756#ifdef F77_DUMMY_MAIN
16757# ifdef __cplusplus
16758 extern "C"
16759# endif
16760 int F77_DUMMY_MAIN() { return 1; }
16761#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016762int
16763main ()
16764{
16765 _ascii (); _ebcdic ();
16766 ;
16767 return 0;
16768}
16769_ACEOF
16770rm -f conftest.$ac_objext
16771if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16772 (eval $ac_compile) 2>&5
16773 ac_status=$?
16774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16775 (exit $ac_status); } &&
16776 { ac_try='test -s conftest.$ac_objext'
16777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16778 (eval $ac_try) 2>&5
16779 ac_status=$?
16780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16781 (exit $ac_status); }; }; then
Barry Warsawfe33b792003-01-07 22:42:49 +000016782 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016783 ac_cv_c_bigendian=yes
16784fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016785if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016786 if test "$ac_cv_c_bigendian" = unknown; then
16787 ac_cv_c_bigendian=no
16788 else
16789 # finding both strings is unlikely to happen, but who knows?
16790 ac_cv_c_bigendian=unknown
16791 fi
16792fi
16793else
16794 echo "$as_me: failed program was:" >&5
16795cat conftest.$ac_ext >&5
16796fi
16797rm -f conftest.$ac_objext conftest.$ac_ext
16798else
16799 cat >conftest.$ac_ext <<_ACEOF
16800#line $LINENO "configure"
16801#include "confdefs.h"
16802int
16803main ()
16804{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016805 /* Are we little or big endian? From Harbison&Steele. */
16806 union
16807 {
16808 long l;
16809 char c[sizeof (long)];
16810 } u;
16811 u.l = 1;
16812 exit (u.c[sizeof (long) - 1] == 1);
16813}
Martin v. Löwis11437992002-04-12 09:54:03 +000016814_ACEOF
16815rm -f conftest$ac_exeext
16816if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16817 (eval $ac_link) 2>&5
16818 ac_status=$?
16819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16820 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16822 (eval $ac_try) 2>&5
16823 ac_status=$?
16824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16825 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016826 ac_cv_c_bigendian=no
16827else
Martin v. Löwis11437992002-04-12 09:54:03 +000016828 echo "$as_me: program exited with status $ac_status" >&5
16829echo "$as_me: failed program was:" >&5
16830cat conftest.$ac_ext >&5
16831( exit $ac_status )
16832ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000016833fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016834rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016835fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016836fi
16837rm -f conftest.$ac_objext conftest.$ac_ext
16838fi
16839echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
16840echo "${ECHO_T}$ac_cv_c_bigendian" >&6
16841case $ac_cv_c_bigendian in
16842 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000016843
Martin v. Löwis11437992002-04-12 09:54:03 +000016844cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016845#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016846_ACEOF
16847 ;;
16848 no)
16849 ;;
16850 *)
Barry Warsawfe33b792003-01-07 22:42:49 +000016851 { { echo "$as_me:$LINENO: error: unknown endianess
Martin v. Löwis11437992002-04-12 09:54:03 +000016852presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Barry Warsawfe33b792003-01-07 22:42:49 +000016853echo "$as_me: error: unknown endianess
Martin v. Löwis11437992002-04-12 09:54:03 +000016854presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
16855 { (exit 1); exit 1; }; } ;;
16856esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000016857
Michael W. Hudson54241132001-12-07 15:38:26 +000016858
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016859# Check whether right shifting a negative integer extends the sign bit
16860# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000016861echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
16862echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
16863if test "${ac_cv_rshift_extends_sign+set}" = set; then
16864 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016865else
Martin v. Löwis11437992002-04-12 09:54:03 +000016866
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016867if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000016868 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016869else
Martin v. Löwis11437992002-04-12 09:54:03 +000016870 cat >conftest.$ac_ext <<_ACEOF
16871#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016872#include "confdefs.h"
16873
16874int main()
16875{
Vladimir Marangozova6180282000-07-12 05:05:06 +000016876 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016877}
16878
Martin v. Löwis11437992002-04-12 09:54:03 +000016879_ACEOF
16880rm -f conftest$ac_exeext
16881if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16882 (eval $ac_link) 2>&5
16883 ac_status=$?
16884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16885 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16887 (eval $ac_try) 2>&5
16888 ac_status=$?
16889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16890 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000016891 ac_cv_rshift_extends_sign=yes
16892else
Martin v. Löwis11437992002-04-12 09:54:03 +000016893 echo "$as_me: program exited with status $ac_status" >&5
16894echo "$as_me: failed program was:" >&5
16895cat conftest.$ac_ext >&5
16896( exit $ac_status )
16897ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000016898fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016899rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016900fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000016901fi
16902
Martin v. Löwis11437992002-04-12 09:54:03 +000016903echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
16904echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016905if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016906then
Martin v. Löwis11437992002-04-12 09:54:03 +000016907
16908cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016909#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016910_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016911
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016912fi
16913
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016914# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016915echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
16916echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
16917if test "${ac_cv_have_getc_unlocked+set}" = set; then
16918 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016919else
Martin v. Löwis11437992002-04-12 09:54:03 +000016920
16921cat >conftest.$ac_ext <<_ACEOF
16922#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016923#include "confdefs.h"
16924#include <stdio.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000016925#ifdef F77_DUMMY_MAIN
16926# ifdef __cplusplus
16927 extern "C"
16928# endif
16929 int F77_DUMMY_MAIN() { return 1; }
16930#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016931int
16932main ()
16933{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016934
16935 FILE *f = fopen("/dev/null", "r");
16936 flockfile(f);
16937 getc_unlocked(f);
16938 funlockfile(f);
16939
Martin v. Löwis11437992002-04-12 09:54:03 +000016940 ;
16941 return 0;
16942}
16943_ACEOF
16944rm -f conftest.$ac_objext conftest$ac_exeext
16945if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16946 (eval $ac_link) 2>&5
16947 ac_status=$?
16948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16949 (exit $ac_status); } &&
16950 { ac_try='test -s conftest$ac_exeext'
16951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16952 (eval $ac_try) 2>&5
16953 ac_status=$?
16954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16955 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016956 ac_cv_have_getc_unlocked=yes
16957else
Martin v. Löwis11437992002-04-12 09:54:03 +000016958 echo "$as_me: failed program was:" >&5
16959cat conftest.$ac_ext >&5
16960ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016961fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016962rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016963fi
16964
Martin v. Löwis11437992002-04-12 09:54:03 +000016965echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
16966echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016967if test "$ac_cv_have_getc_unlocked" = yes
16968then
Martin v. Löwis11437992002-04-12 09:54:03 +000016969
16970cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016971#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016972_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016973
16974fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016975
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000016976# check for readline 2.2
16977cat >conftest.$ac_ext <<_ACEOF
16978#line $LINENO "configure"
16979#include "confdefs.h"
16980#include <readline/readline.h>
16981_ACEOF
16982if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16983 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16984 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000016985 egrep -v '^ *\+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000016986 rm -f conftest.er1
16987 cat conftest.err >&5
16988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16989 (exit $ac_status); } >/dev/null; then
16990 if test -s conftest.err; then
16991 ac_cpp_err=$ac_c_preproc_warn_flag
16992 else
16993 ac_cpp_err=
16994 fi
16995else
16996 ac_cpp_err=yes
16997fi
16998if test -z "$ac_cpp_err"; then
16999 have_readline=yes
17000else
17001 echo "$as_me: failed program was:" >&5
17002 cat conftest.$ac_ext >&5
17003 have_readline=no
17004fi
17005rm -f conftest.err conftest.$ac_ext
17006if test $have_readline = yes
17007then
17008 cat >conftest.$ac_ext <<_ACEOF
17009#line $LINENO "configure"
17010#include "confdefs.h"
17011#include <readline/readline.h>
17012
17013_ACEOF
17014if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000017015 egrep "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017016
17017cat >>confdefs.h <<\_ACEOF
17018#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
17019_ACEOF
17020
17021fi
17022rm -f conftest*
17023
17024fi
17025
Martin v. Löwis0daad592001-09-30 21:09:59 +000017026# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000017027echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
17028echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
17029if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
17030 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000017031else
Martin v. Löwis11437992002-04-12 09:54:03 +000017032 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000017033LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017034cat >conftest.$ac_ext <<_ACEOF
17035#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000017036#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000017037
Guido van Rossum353ae582001-07-10 16:45:32 +000017038/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017039#ifdef __cplusplus
17040extern "C"
17041#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000017042/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017043 builtin and then its argument prototype would still apply. */
17044char rl_pre_input_hook ();
Barry Warsawfe33b792003-01-07 22:42:49 +000017045#ifdef F77_DUMMY_MAIN
17046# ifdef __cplusplus
17047 extern "C"
17048# endif
17049 int F77_DUMMY_MAIN() { return 1; }
17050#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017051int
17052main ()
17053{
17054rl_pre_input_hook ();
17055 ;
17056 return 0;
17057}
17058_ACEOF
17059rm -f conftest.$ac_objext conftest$ac_exeext
17060if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17061 (eval $ac_link) 2>&5
17062 ac_status=$?
17063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17064 (exit $ac_status); } &&
17065 { ac_try='test -s conftest$ac_exeext'
17066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17067 (eval $ac_try) 2>&5
17068 ac_status=$?
17069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17070 (exit $ac_status); }; }; then
17071 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000017072else
Martin v. Löwis11437992002-04-12 09:54:03 +000017073 echo "$as_me: failed program was:" >&5
17074cat conftest.$ac_ext >&5
17075ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000017076fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017077rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17078LIBS=$ac_check_lib_save_LIBS
17079fi
17080echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
17081echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
17082if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017083
Martin v. Löwis11437992002-04-12 09:54:03 +000017084cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017085#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017086_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017087
Martin v. Löwis0daad592001-09-30 21:09:59 +000017088fi
17089
Michael W. Hudson54241132001-12-07 15:38:26 +000017090
Martin v. Löwis0daad592001-09-30 21:09:59 +000017091# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000017092echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
17093echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
17094if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
17095 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000017096else
Martin v. Löwis11437992002-04-12 09:54:03 +000017097 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000017098LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017099cat >conftest.$ac_ext <<_ACEOF
17100#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000017101#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000017102
Martin v. Löwis0daad592001-09-30 21:09:59 +000017103/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017104#ifdef __cplusplus
17105extern "C"
17106#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000017107/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017108 builtin and then its argument prototype would still apply. */
17109char rl_completion_matches ();
Barry Warsawfe33b792003-01-07 22:42:49 +000017110#ifdef F77_DUMMY_MAIN
17111# ifdef __cplusplus
17112 extern "C"
17113# endif
17114 int F77_DUMMY_MAIN() { return 1; }
17115#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017116int
17117main ()
17118{
17119rl_completion_matches ();
17120 ;
17121 return 0;
17122}
17123_ACEOF
17124rm -f conftest.$ac_objext conftest$ac_exeext
17125if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17126 (eval $ac_link) 2>&5
17127 ac_status=$?
17128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17129 (exit $ac_status); } &&
17130 { ac_try='test -s conftest$ac_exeext'
17131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17132 (eval $ac_try) 2>&5
17133 ac_status=$?
17134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17135 (exit $ac_status); }; }; then
17136 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000017137else
Martin v. Löwis11437992002-04-12 09:54:03 +000017138 echo "$as_me: failed program was:" >&5
17139cat conftest.$ac_ext >&5
17140ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000017141fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017142rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17143LIBS=$ac_check_lib_save_LIBS
17144fi
17145echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
17146echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
17147if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017148
Martin v. Löwis11437992002-04-12 09:54:03 +000017149cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017150#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017151_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017152
Guido van Rossum353ae582001-07-10 16:45:32 +000017153fi
17154
Jack Jansendd19cf82001-12-06 22:36:17 +000017155
Martin v. Löwis11437992002-04-12 09:54:03 +000017156echo "$as_me:$LINENO: checking for broken nice()" >&5
17157echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
17158if test "${ac_cv_broken_nice+set}" = set; then
17159 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017160else
Martin v. Löwis11437992002-04-12 09:54:03 +000017161
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017162if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017163 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017164else
Martin v. Löwis11437992002-04-12 09:54:03 +000017165 cat >conftest.$ac_ext <<_ACEOF
17166#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017167#include "confdefs.h"
17168
17169int main()
17170{
17171 int val1 = nice(1);
17172 if (val1 != -1 && val1 == nice(2))
17173 exit(0);
17174 exit(1);
17175}
17176
Martin v. Löwis11437992002-04-12 09:54:03 +000017177_ACEOF
17178rm -f conftest$ac_exeext
17179if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17180 (eval $ac_link) 2>&5
17181 ac_status=$?
17182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17183 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17184 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17185 (eval $ac_try) 2>&5
17186 ac_status=$?
17187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17188 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017189 ac_cv_broken_nice=yes
17190else
Martin v. Löwis11437992002-04-12 09:54:03 +000017191 echo "$as_me: program exited with status $ac_status" >&5
17192echo "$as_me: failed program was:" >&5
17193cat conftest.$ac_ext >&5
17194( exit $ac_status )
17195ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017196fi
Barry Warsawfe33b792003-01-07 22:42:49 +000017197rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017198fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017199fi
17200
Martin v. Löwis11437992002-04-12 09:54:03 +000017201echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
17202echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017203if test "$ac_cv_broken_nice" = yes
17204then
Martin v. Löwis11437992002-04-12 09:54:03 +000017205
17206cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017207#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017208_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017209
17210fi
17211
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017212# tzset(3) exists and works like we expect it to
17213echo "$as_me:$LINENO: checking for working tzset()" >&5
17214echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
17215if test "${ac_cv_working_tzset+set}" = set; then
17216 echo $ECHO_N "(cached) $ECHO_C" >&6
17217else
17218
17219if test "$cross_compiling" = yes; then
17220 ac_cv_working_tzset=no
17221else
17222 cat >conftest.$ac_ext <<_ACEOF
17223#line $LINENO "configure"
17224#include "confdefs.h"
17225
17226#include <stdlib.h>
17227#include <time.h>
17228int main()
17229{
17230 int gmt_hour;
17231 int eastern_hour;
17232 time_t now;
17233 now = time((time_t*)NULL);
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017234 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017235 tzset();
17236 gmt_hour = localtime(&now)->tm_hour;
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017237 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017238 tzset();
17239 eastern_hour = localtime(&now)->tm_hour;
17240 if (eastern_hour == gmt_hour)
17241 exit(1);
17242 exit(0);
17243}
17244
17245_ACEOF
17246rm -f conftest$ac_exeext
17247if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17248 (eval $ac_link) 2>&5
17249 ac_status=$?
17250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17251 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17253 (eval $ac_try) 2>&5
17254 ac_status=$?
17255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17256 (exit $ac_status); }; }; then
17257 ac_cv_working_tzset=yes
17258else
17259 echo "$as_me: program exited with status $ac_status" >&5
17260echo "$as_me: failed program was:" >&5
17261cat conftest.$ac_ext >&5
17262( exit $ac_status )
17263ac_cv_working_tzset=no
17264fi
17265rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17266fi
17267fi
17268
17269echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
17270echo "${ECHO_T}$ac_cv_working_tzset" >&6
17271if test "$ac_cv_working_tzset" = yes
17272then
17273
17274cat >>confdefs.h <<\_ACEOF
17275#define HAVE_WORKING_TZSET 1
17276_ACEOF
17277
17278fi
17279
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017280# Look for subsecond timestamps in struct stat
17281echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
17282echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
17283if test "${ac_cv_stat_tv_nsec+set}" = set; then
17284 echo $ECHO_N "(cached) $ECHO_C" >&6
17285else
17286 cat >conftest.$ac_ext <<_ACEOF
17287#line $LINENO "configure"
17288#include "confdefs.h"
17289#include <sys/stat.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000017290#ifdef F77_DUMMY_MAIN
17291# ifdef __cplusplus
17292 extern "C"
17293# endif
17294 int F77_DUMMY_MAIN() { return 1; }
17295#endif
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017296int
17297main ()
17298{
17299
17300struct stat st;
17301st.st_mtim.tv_nsec = 1;
17302
17303 ;
17304 return 0;
17305}
17306_ACEOF
17307rm -f conftest.$ac_objext
17308if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17309 (eval $ac_compile) 2>&5
17310 ac_status=$?
17311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17312 (exit $ac_status); } &&
17313 { ac_try='test -s conftest.$ac_objext'
17314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17315 (eval $ac_try) 2>&5
17316 ac_status=$?
17317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17318 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000017319 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017320else
17321 echo "$as_me: failed program was:" >&5
17322cat conftest.$ac_ext >&5
17323ac_cv_stat_tv_nsec=no
17324fi
17325rm -f conftest.$ac_objext conftest.$ac_ext
17326fi
17327
17328echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
17329echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
17330if test "$ac_cv_stat_tv_nsec" = yes
17331then
17332
17333cat >>confdefs.h <<\_ACEOF
17334#define HAVE_STAT_TV_NSEC 1
17335_ACEOF
17336
17337fi
17338
Jack Jansen666b1e72001-10-31 12:11:48 +000017339# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000017340echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
17341echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
17342if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
17343 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017344else
Martin v. Löwis11437992002-04-12 09:54:03 +000017345 cat >conftest.$ac_ext <<_ACEOF
17346#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000017347#include "confdefs.h"
17348#include <curses.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000017349#ifdef F77_DUMMY_MAIN
17350# ifdef __cplusplus
17351 extern "C"
17352# endif
17353 int F77_DUMMY_MAIN() { return 1; }
17354#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017355int
17356main ()
17357{
Jack Jansen666b1e72001-10-31 12:11:48 +000017358
17359 int rtn;
17360 rtn = mvwdelch(0,0,0);
17361
Martin v. Löwis11437992002-04-12 09:54:03 +000017362 ;
17363 return 0;
17364}
17365_ACEOF
17366rm -f conftest.$ac_objext
17367if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17368 (eval $ac_compile) 2>&5
17369 ac_status=$?
17370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17371 (exit $ac_status); } &&
17372 { ac_try='test -s conftest.$ac_objext'
17373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17374 (eval $ac_try) 2>&5
17375 ac_status=$?
17376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17377 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017378 ac_cv_mvwdelch_is_expression=yes
17379else
Martin v. Löwis11437992002-04-12 09:54:03 +000017380 echo "$as_me: failed program was:" >&5
17381cat conftest.$ac_ext >&5
17382ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017383fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017384rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017385fi
17386
Martin v. Löwis11437992002-04-12 09:54:03 +000017387echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
17388echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017389
17390if test "$ac_cv_mvwdelch_is_expression" = yes
17391then
Martin v. Löwis11437992002-04-12 09:54:03 +000017392
17393cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017394#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017395_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017396
17397fi
17398
Martin v. Löwis11437992002-04-12 09:54:03 +000017399echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
17400echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
17401if test "${ac_cv_window_has_flags+set}" = set; then
17402 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017403else
Martin v. Löwis11437992002-04-12 09:54:03 +000017404 cat >conftest.$ac_ext <<_ACEOF
17405#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000017406#include "confdefs.h"
17407#include <curses.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000017408#ifdef F77_DUMMY_MAIN
17409# ifdef __cplusplus
17410 extern "C"
17411# endif
17412 int F77_DUMMY_MAIN() { return 1; }
17413#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017414int
17415main ()
17416{
Jack Jansen666b1e72001-10-31 12:11:48 +000017417
17418 WINDOW *w;
17419 w->_flags = 0;
17420
Martin v. Löwis11437992002-04-12 09:54:03 +000017421 ;
17422 return 0;
17423}
17424_ACEOF
17425rm -f conftest.$ac_objext
17426if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17427 (eval $ac_compile) 2>&5
17428 ac_status=$?
17429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17430 (exit $ac_status); } &&
17431 { ac_try='test -s conftest.$ac_objext'
17432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17433 (eval $ac_try) 2>&5
17434 ac_status=$?
17435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17436 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017437 ac_cv_window_has_flags=yes
17438else
Martin v. Löwis11437992002-04-12 09:54:03 +000017439 echo "$as_me: failed program was:" >&5
17440cat conftest.$ac_ext >&5
17441ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017442fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017443rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017444fi
17445
Martin v. Löwis11437992002-04-12 09:54:03 +000017446echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
17447echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017448
Jack Jansen666b1e72001-10-31 12:11:48 +000017449
17450if test "$ac_cv_window_has_flags" = yes
17451then
Martin v. Löwis11437992002-04-12 09:54:03 +000017452
17453cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017454#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017455_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017456
17457fi
17458
Martin v. Löwis24a880b2002-12-31 12:55:15 +000017459echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
17460echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
17461
17462if test -e /dev/ptmx
17463then
17464 echo "$as_me:$LINENO: result: yes" >&5
17465echo "${ECHO_T}yes" >&6
17466
17467cat >>confdefs.h <<\_ACEOF
17468#define HAVE_DEV_PTMX 1
17469_ACEOF
17470
17471else
17472 echo "$as_me:$LINENO: result: no" >&5
17473echo "${ECHO_T}no" >&6
17474fi
17475
Neal Norwitz865400f2003-03-21 01:42:58 +000017476echo "$as_me:$LINENO: checking for /dev/ptc" >&5
17477echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
17478
17479if test -e /dev/ptc
17480then
17481 echo "$as_me:$LINENO: result: yes" >&5
17482echo "${ECHO_T}yes" >&6
17483
17484cat >>confdefs.h <<\_ACEOF
17485#define HAVE_DEV_PTC 1
17486_ACEOF
17487
17488else
17489 echo "$as_me:$LINENO: result: no" >&5
17490echo "${ECHO_T}no" >&6
17491fi
17492
Martin v. Löwis11437992002-04-12 09:54:03 +000017493echo "$as_me:$LINENO: checking for socklen_t" >&5
17494echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
17495if test "${ac_cv_type_socklen_t+set}" = set; then
17496 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000017497else
Martin v. Löwis11437992002-04-12 09:54:03 +000017498 cat >conftest.$ac_ext <<_ACEOF
17499#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000017500#include "confdefs.h"
Martin v. Löwis01c04012002-11-11 14:58:44 +000017501
17502#ifdef HAVE_SYS_TYPES_H
17503#include <sys/types.h>
17504#endif
17505#ifdef HAVE_SYS_SOCKET_H
17506#include <sys/socket.h>
17507#endif
17508
17509
Barry Warsawfe33b792003-01-07 22:42:49 +000017510#ifdef F77_DUMMY_MAIN
17511# ifdef __cplusplus
17512 extern "C"
17513# endif
17514 int F77_DUMMY_MAIN() { return 1; }
17515#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017516int
17517main ()
17518{
17519if ((socklen_t *) 0)
17520 return 0;
17521if (sizeof (socklen_t))
17522 return 0;
17523 ;
17524 return 0;
17525}
17526_ACEOF
17527rm -f conftest.$ac_objext
17528if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17529 (eval $ac_compile) 2>&5
17530 ac_status=$?
17531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17532 (exit $ac_status); } &&
17533 { ac_try='test -s conftest.$ac_objext'
17534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17535 (eval $ac_try) 2>&5
17536 ac_status=$?
17537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17538 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000017539 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000017540else
Martin v. Löwis11437992002-04-12 09:54:03 +000017541 echo "$as_me: failed program was:" >&5
17542cat conftest.$ac_ext >&5
17543ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000017544fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017545rm -f conftest.$ac_objext conftest.$ac_ext
17546fi
17547echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
17548echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
17549if test $ac_cv_type_socklen_t = yes; then
17550 :
17551else
Guido van Rossum95713eb2000-05-18 20:53:31 +000017552
Martin v. Löwis01c04012002-11-11 14:58:44 +000017553cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017554#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000017555_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017556
17557fi
17558
Michael W. Hudson54241132001-12-07 15:38:26 +000017559
Michael W. Hudson54241132001-12-07 15:38:26 +000017560
17561
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000017562for h in `(cd $srcdir;echo Python/thread_*.h)`
17563do
17564 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
17565done
17566
Michael W. Hudson54241132001-12-07 15:38:26 +000017567
Jack Jansen0b06be72002-06-21 14:48:38 +000017568SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000017569echo "$as_me:$LINENO: checking for build directories" >&5
17570echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017571for dir in $SRCDIRS; do
17572 if test ! -d $dir; then
17573 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000017574 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017575done
Martin v. Löwis11437992002-04-12 09:54:03 +000017576echo "$as_me:$LINENO: result: done" >&5
17577echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000017578
Guido van Rossum627b2d71993-12-24 10:39:16 +000017579# generate output files
Barry Warsawfe33b792003-01-07 22:42:49 +000017580ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017581
Martin v. Löwis11437992002-04-12 09:54:03 +000017582cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017583# This file is a shell script that caches the results of configure
17584# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017585# scripts and configure runs, see configure's option --config-cache.
17586# It is not useful on other systems. If it contains results you don't
17587# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017588#
Martin v. Löwis11437992002-04-12 09:54:03 +000017589# config.status only pays attention to the cache file if you give it
17590# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017591#
Barry Warsawfe33b792003-01-07 22:42:49 +000017592# `ac_cv_env_foo' variables (set or unset) will be overriden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017593# loading this file, other *unset* `ac_cv_foo' will be assigned the
17594# following values.
17595
17596_ACEOF
17597
Guido van Rossumf78abae1997-01-21 22:02:36 +000017598# The following way of writing the cache mishandles newlines in values,
17599# but we know of no workaround that is simple, portable, and efficient.
17600# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017601# Ultrix sh set writes to stderr and can't be redirected directly,
17602# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000017603{
17604 (set) 2>&1 |
17605 case `(ac_space=' '; set | grep ac_space) 2>&1` in
17606 *ac_space=\ *)
17607 # `set' does not quote correctly, so add quotes (double-quote
17608 # substitution turns \\\\ into \\, and sed turns \\ into \).
17609 sed -n \
17610 "s/'/'\\\\''/g;
17611 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17612 ;;
17613 *)
17614 # `set' quotes correctly as required by POSIX, so do not add quotes.
17615 sed -n \
17616 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17617 ;;
17618 esac;
17619} |
17620 sed '
17621 t clear
17622 : clear
17623 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17624 t end
17625 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17626 : end' >>confcache
17627if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017628 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017629 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17630 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017631 else
17632 echo "not updating unwritable cache $cache_file"
17633 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017634fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017635rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017636
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017637test "x$prefix" = xNONE && prefix=$ac_default_prefix
17638# Let make expand exec_prefix.
17639test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017640
Martin v. Löwis11437992002-04-12 09:54:03 +000017641# VPATH may cause trouble with some makes, so we remove $(srcdir),
17642# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17643# trailing colons and then remove the whole line if VPATH becomes empty
17644# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000017645if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017646 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17647s/:*\$(srcdir):*/:/;
17648s/:*\${srcdir}:*/:/;
17649s/:*@srcdir@:*/:/;
17650s/^\([^=]*=[ ]*\):*/\1/;
17651s/:*$//;
17652s/^[^=]*=[ ]*$//;
17653}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017654fi
17655
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017656DEFS=-DHAVE_CONFIG_H
17657
Martin v. Löwis11437992002-04-12 09:54:03 +000017658
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017659: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000017660ac_clean_files_save=$ac_clean_files
17661ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17662{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
17663echo "$as_me: creating $CONFIG_STATUS" >&6;}
17664cat >$CONFIG_STATUS <<_ACEOF
17665#! $SHELL
17666# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017667# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017668# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017669# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017670
Martin v. Löwis11437992002-04-12 09:54:03 +000017671debug=false
17672SHELL=\${CONFIG_SHELL-$SHELL}
17673_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000017674
Martin v. Löwis11437992002-04-12 09:54:03 +000017675cat >>$CONFIG_STATUS <<\_ACEOF
Barry Warsawfe33b792003-01-07 22:42:49 +000017676
Martin v. Löwis11437992002-04-12 09:54:03 +000017677## --------------------- ##
17678## M4sh Initialization. ##
17679## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017680
Martin v. Löwis11437992002-04-12 09:54:03 +000017681# Be Bourne compatible
17682if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17683 emulate sh
17684 NULLCMD=:
17685elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17686 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000017687fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017688
Barry Warsawfe33b792003-01-07 22:42:49 +000017689# NLS nuisances.
Martin v. Löwis11437992002-04-12 09:54:03 +000017690# Support unset when possible.
17691if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17692 as_unset=unset
17693else
17694 as_unset=false
17695fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017696
Barry Warsawfe33b792003-01-07 22:42:49 +000017697(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
17698 { $as_unset LANG || test "${LANG+set}" != set; } ||
17699 { LANG=C; export LANG; }
17700(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
17701 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
17702 { LC_ALL=C; export LC_ALL; }
17703(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
17704 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
17705 { LC_TIME=C; export LC_TIME; }
17706(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
17707 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
17708 { LC_CTYPE=C; export LC_CTYPE; }
17709(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
17710 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
17711 { LANGUAGE=C; export LANGUAGE; }
17712(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
17713 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
17714 { LC_COLLATE=C; export LC_COLLATE; }
17715(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
17716 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
17717 { LC_NUMERIC=C; export LC_NUMERIC; }
17718(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
17719 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
17720 { LC_MESSAGES=C; export LC_MESSAGES; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017721
17722
17723# Name of the executable.
Barry Warsawfe33b792003-01-07 22:42:49 +000017724as_me=`(basename "$0") 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017725$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17726 X"$0" : 'X\(//\)$' \| \
17727 X"$0" : 'X\(/\)$' \| \
17728 . : '\(.\)' 2>/dev/null ||
17729echo X/"$0" |
17730 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
17731 /^X\/\(\/\/\)$/{ s//\1/; q; }
17732 /^X\/\(\/\).*/{ s//\1/; q; }
17733 s/.*/./; q'`
17734
17735# PATH needs CR, and LINENO needs CR and PATH.
17736# Avoid depending upon Character Ranges.
17737as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17738as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17739as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17740as_cr_digits='0123456789'
17741as_cr_alnum=$as_cr_Letters$as_cr_digits
17742
17743# The user is always right.
17744if test "${PATH_SEPARATOR+set}" != set; then
17745 echo "#! /bin/sh" >conftest.sh
17746 echo "exit 0" >>conftest.sh
17747 chmod +x conftest.sh
Barry Warsawfe33b792003-01-07 22:42:49 +000017748 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017749 PATH_SEPARATOR=';'
17750 else
17751 PATH_SEPARATOR=:
17752 fi
17753 rm -f conftest.sh
17754fi
17755
17756
17757 as_lineno_1=$LINENO
17758 as_lineno_2=$LINENO
17759 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17760 test "x$as_lineno_1" != "x$as_lineno_2" &&
17761 test "x$as_lineno_3" = "x$as_lineno_2" || {
17762 # Find who we are. Look in the path if we contain no path at all
17763 # relative or not.
17764 case $0 in
17765 *[\\/]* ) as_myself=$0 ;;
17766 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17767for as_dir in $PATH
17768do
17769 IFS=$as_save_IFS
17770 test -z "$as_dir" && as_dir=.
17771 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17772done
17773
17774 ;;
17775 esac
17776 # We did not find ourselves, most probably we were run as `sh COMMAND'
17777 # in which case we are not to be found in the path.
17778 if test "x$as_myself" = x; then
17779 as_myself=$0
17780 fi
17781 if test ! -f "$as_myself"; then
17782 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
17783echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
17784 { (exit 1); exit 1; }; }
17785 fi
17786 case $CONFIG_SHELL in
17787 '')
17788 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17789for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
17790do
17791 IFS=$as_save_IFS
17792 test -z "$as_dir" && as_dir=.
17793 for as_base in sh bash ksh sh5; do
17794 case $as_dir in
17795 /*)
17796 if ("$as_dir/$as_base" -c '
17797 as_lineno_1=$LINENO
17798 as_lineno_2=$LINENO
17799 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17800 test "x$as_lineno_1" != "x$as_lineno_2" &&
17801 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
17802 CONFIG_SHELL=$as_dir/$as_base
17803 export CONFIG_SHELL
17804 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
17805 fi;;
17806 esac
17807 done
17808done
17809;;
Jack Jansendd19cf82001-12-06 22:36:17 +000017810 esac
17811
Martin v. Löwis11437992002-04-12 09:54:03 +000017812 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
17813 # uniformly replaced by the line number. The first 'sed' inserts a
17814 # line-number line before each line; the second 'sed' does the real
17815 # work. The second script uses 'N' to pair each line-number line
17816 # with the numbered line, and appends trailing '-' during
17817 # substitution so that $LINENO is not a special case at line end.
17818 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
17819 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
17820 sed '=' <$as_myself |
17821 sed '
17822 N
17823 s,$,-,
17824 : loop
17825 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
17826 t loop
17827 s,-$,,
17828 s,^['$as_cr_digits']*\n,,
17829 ' >$as_me.lineno &&
17830 chmod +x $as_me.lineno ||
17831 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
17832echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
17833 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017834
Martin v. Löwis11437992002-04-12 09:54:03 +000017835 # Don't try to exec as it changes $[0], causing all sort of problems
17836 # (the dirname of $[0] is not the place where we might find the
17837 # original and so on. Autoconf is especially sensible to this).
17838 . ./$as_me.lineno
17839 # Exit status is that of the last command.
17840 exit
17841}
17842
17843
17844case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
17845 *c*,-n*) ECHO_N= ECHO_C='
17846' ECHO_T=' ' ;;
17847 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
17848 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
17849esac
17850
17851if expr a : '\(a\)' >/dev/null 2>&1; then
17852 as_expr=expr
17853else
17854 as_expr=false
17855fi
17856
17857rm -f conf$$ conf$$.exe conf$$.file
17858echo >conf$$.file
17859if ln -s conf$$.file conf$$ 2>/dev/null; then
17860 # We could just check for DJGPP; but this test a) works b) is more generic
17861 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17862 if test -f conf$$.exe; then
17863 # Don't use ln at all; we don't have any links
17864 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017865 else
Martin v. Löwis11437992002-04-12 09:54:03 +000017866 as_ln_s='ln -s'
17867 fi
17868elif ln conf$$.file conf$$ 2>/dev/null; then
17869 as_ln_s=ln
17870else
17871 as_ln_s='cp -p'
17872fi
17873rm -f conf$$ conf$$.exe conf$$.file
17874
17875as_executable_p="test -f"
17876
17877# Sed expression to map a string onto a valid CPP name.
17878as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
17879
17880# Sed expression to map a string onto a valid variable name.
17881as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
17882
17883
17884# IFS
17885# We need space, tab and new line, in precisely that order.
17886as_nl='
17887'
17888IFS=" $as_nl"
17889
17890# CDPATH.
Barry Warsawfe33b792003-01-07 22:42:49 +000017891$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017892
17893exec 6>&1
17894
17895# Open the log real soon, to keep \$[0] and so on meaningful, and to
17896# report actual input values of CONFIG_FILES etc. instead of their
17897# values after options handling. Logging --version etc. is OK.
17898exec 5>>config.log
17899{
17900 echo
17901 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17902## Running $as_me. ##
17903_ASBOX
17904} >&5
17905cat >&5 <<_CSEOF
17906
Martin v. Löwis88afe662002-10-26 13:47:44 +000017907This file was extended by python $as_me 2.3, which was
Barry Warsawfe33b792003-01-07 22:42:49 +000017908generated by GNU Autoconf 2.53. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017909
17910 CONFIG_FILES = $CONFIG_FILES
17911 CONFIG_HEADERS = $CONFIG_HEADERS
17912 CONFIG_LINKS = $CONFIG_LINKS
17913 CONFIG_COMMANDS = $CONFIG_COMMANDS
17914 $ $0 $@
17915
17916_CSEOF
17917echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
17918echo >&5
17919_ACEOF
17920
17921# Files that config.status was made for.
17922if test -n "$ac_config_files"; then
17923 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17924fi
17925
17926if test -n "$ac_config_headers"; then
17927 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17928fi
17929
17930if test -n "$ac_config_links"; then
17931 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17932fi
17933
17934if test -n "$ac_config_commands"; then
17935 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17936fi
17937
17938cat >>$CONFIG_STATUS <<\_ACEOF
17939
17940ac_cs_usage="\
17941\`$as_me' instantiates files from templates according to the
17942current configuration.
17943
17944Usage: $0 [OPTIONS] [FILE]...
17945
17946 -h, --help print this help, then exit
17947 -V, --version print version number, then exit
17948 -d, --debug don't remove temporary files
17949 --recheck update $as_me by reconfiguring in the same conditions
17950 --file=FILE[:TEMPLATE]
17951 instantiate the configuration file FILE
17952 --header=FILE[:TEMPLATE]
17953 instantiate the configuration header FILE
17954
17955Configuration files:
17956$config_files
17957
17958Configuration headers:
17959$config_headers
17960
17961Report bugs to <bug-autoconf@gnu.org>."
17962_ACEOF
17963
17964cat >>$CONFIG_STATUS <<_ACEOF
17965ac_cs_version="\\
Martin v. Löwis88afe662002-10-26 13:47:44 +000017966python config.status 2.3
Barry Warsawfe33b792003-01-07 22:42:49 +000017967configured by $0, generated by GNU Autoconf 2.53,
Martin v. Löwis11437992002-04-12 09:54:03 +000017968 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17969
17970Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17971Free Software Foundation, Inc.
17972This config.status script is free software; the Free Software Foundation
17973gives unlimited permission to copy, distribute and modify it."
17974srcdir=$srcdir
17975INSTALL="$INSTALL"
17976_ACEOF
17977
17978cat >>$CONFIG_STATUS <<\_ACEOF
17979# If no file are specified by the user, then we need to provide default
17980# value. By we need to know if files were specified by the user.
17981ac_need_defaults=:
17982while test $# != 0
17983do
17984 case $1 in
17985 --*=*)
17986 ac_option=`expr "x$1" : 'x\([^=]*\)='`
17987 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Barry Warsawfe33b792003-01-07 22:42:49 +000017988 shift
17989 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17990 shift
Martin v. Löwis11437992002-04-12 09:54:03 +000017991 ;;
Barry Warsawfe33b792003-01-07 22:42:49 +000017992 -*);;
Martin v. Löwis11437992002-04-12 09:54:03 +000017993 *) # This is not an option, so the user has probably given explicit
17994 # arguments.
17995 ac_need_defaults=false;;
17996 esac
17997
Barry Warsawfe33b792003-01-07 22:42:49 +000017998 case $1 in
Martin v. Löwis11437992002-04-12 09:54:03 +000017999 # Handling of the options.
18000_ACEOF
18001cat >>$CONFIG_STATUS <<_ACEOF
18002 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18003 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18004 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18005_ACEOF
18006cat >>$CONFIG_STATUS <<\_ACEOF
18007 --version | --vers* | -V )
18008 echo "$ac_cs_version"; exit 0 ;;
18009 --he | --h)
18010 # Conflict between --help and --header
18011 { { echo "$as_me:$LINENO: error: ambiguous option: $1
18012Try \`$0 --help' for more information." >&5
18013echo "$as_me: error: ambiguous option: $1
18014Try \`$0 --help' for more information." >&2;}
18015 { (exit 1); exit 1; }; };;
18016 --help | --hel | -h )
18017 echo "$ac_cs_usage"; exit 0 ;;
18018 --debug | --d* | -d )
18019 debug=: ;;
18020 --file | --fil | --fi | --f )
Barry Warsawfe33b792003-01-07 22:42:49 +000018021 shift
18022 CONFIG_FILES="$CONFIG_FILES $1"
Martin v. Löwis11437992002-04-12 09:54:03 +000018023 ac_need_defaults=false;;
18024 --header | --heade | --head | --hea )
Barry Warsawfe33b792003-01-07 22:42:49 +000018025 shift
18026 CONFIG_HEADERS="$CONFIG_HEADERS $1"
Martin v. Löwis11437992002-04-12 09:54:03 +000018027 ac_need_defaults=false;;
18028
18029 # This is an error.
18030 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
18031Try \`$0 --help' for more information." >&5
18032echo "$as_me: error: unrecognized option: $1
18033Try \`$0 --help' for more information." >&2;}
18034 { (exit 1); exit 1; }; } ;;
18035
18036 *) ac_config_targets="$ac_config_targets $1" ;;
18037
18038 esac
18039 shift
18040done
18041
18042_ACEOF
18043
18044
18045
18046
18047
18048cat >>$CONFIG_STATUS <<\_ACEOF
18049for ac_config_target in $ac_config_targets
18050do
18051 case "$ac_config_target" in
18052 # Handling of arguments.
18053 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
18054 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
18055 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18056 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
18057echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18058 { (exit 1); exit 1; }; };;
18059 esac
18060done
18061
18062# If the user did not use the arguments to specify the items to instantiate,
18063# then the envvar interface is used. Set only those that are not.
18064# We use the long form for the default assignment because of an extremely
18065# bizarre bug on SunOS 4.1.3.
18066if $ac_need_defaults; then
18067 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18068 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18069fi
18070
18071# Create a temporary directory, and hook for its removal unless debugging.
18072$debug ||
18073{
18074 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18075 trap '{ (exit 1); exit 1; }' 1 2 13 15
18076}
18077
18078# Create a (secure) tmp directory for tmp files.
18079: ${TMPDIR=/tmp}
18080{
18081 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18082 test -n "$tmp" && test -d "$tmp"
18083} ||
18084{
18085 tmp=$TMPDIR/cs$$-$RANDOM
18086 (umask 077 && mkdir $tmp)
18087} ||
18088{
18089 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18090 { (exit 1); exit 1; }
18091}
18092
18093_ACEOF
18094
18095cat >>$CONFIG_STATUS <<_ACEOF
18096
18097#
18098# CONFIG_FILES section.
18099#
18100
18101# No need to generate the scripts if there are no CONFIG_FILES.
18102# This happens for instance when ./config.status config.h
18103if test -n "\$CONFIG_FILES"; then
18104 # Protect against being on the right side of a sed subst in config.status.
18105 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18106 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18107s,@SHELL@,$SHELL,;t t
18108s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18109s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18110s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18111s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18112s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18113s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18114s,@exec_prefix@,$exec_prefix,;t t
18115s,@prefix@,$prefix,;t t
18116s,@program_transform_name@,$program_transform_name,;t t
18117s,@bindir@,$bindir,;t t
18118s,@sbindir@,$sbindir,;t t
18119s,@libexecdir@,$libexecdir,;t t
18120s,@datadir@,$datadir,;t t
18121s,@sysconfdir@,$sysconfdir,;t t
18122s,@sharedstatedir@,$sharedstatedir,;t t
18123s,@localstatedir@,$localstatedir,;t t
18124s,@libdir@,$libdir,;t t
18125s,@includedir@,$includedir,;t t
18126s,@oldincludedir@,$oldincludedir,;t t
18127s,@infodir@,$infodir,;t t
18128s,@mandir@,$mandir,;t t
18129s,@build_alias@,$build_alias,;t t
18130s,@host_alias@,$host_alias,;t t
18131s,@target_alias@,$target_alias,;t t
18132s,@DEFS@,$DEFS,;t t
18133s,@ECHO_C@,$ECHO_C,;t t
18134s,@ECHO_N@,$ECHO_N,;t t
18135s,@ECHO_T@,$ECHO_T,;t t
18136s,@LIBS@,$LIBS,;t t
18137s,@VERSION@,$VERSION,;t t
18138s,@SOVERSION@,$SOVERSION,;t t
18139s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
18140s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
18141s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
18142s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
18143s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
18144s,@MACHDEP@,$MACHDEP,;t t
18145s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000018146s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000018147s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018148s,@CXX@,$CXX,;t t
18149s,@MAINOBJ@,$MAINOBJ,;t t
18150s,@EXEEXT@,$EXEEXT,;t t
18151s,@CC@,$CC,;t t
18152s,@CFLAGS@,$CFLAGS,;t t
18153s,@LDFLAGS@,$LDFLAGS,;t t
18154s,@CPPFLAGS@,$CPPFLAGS,;t t
18155s,@ac_ct_CC@,$ac_ct_CC,;t t
18156s,@OBJEXT@,$OBJEXT,;t t
18157s,@CPP@,$CPP,;t t
18158s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
18159s,@LIBRARY@,$LIBRARY,;t t
18160s,@LDLIBRARY@,$LDLIBRARY,;t t
18161s,@DLLLIBRARY@,$DLLLIBRARY,;t t
18162s,@BLDLIBRARY@,$BLDLIBRARY,;t t
18163s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
18164s,@INSTSONAME@,$INSTSONAME,;t t
18165s,@RUNSHARED@,$RUNSHARED,;t t
18166s,@LINKCC@,$LINKCC,;t t
18167s,@RANLIB@,$RANLIB,;t t
18168s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18169s,@AR@,$AR,;t t
18170s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18171s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18172s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18173s,@LN@,$LN,;t t
18174s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000018175s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018176s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
18177s,@SO@,$SO,;t t
18178s,@LDSHARED@,$LDSHARED,;t t
18179s,@BLDSHARED@,$BLDSHARED,;t t
18180s,@CCSHARED@,$CCSHARED,;t t
18181s,@LINKFORSHARED@,$LINKFORSHARED,;t t
18182s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018183s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018184s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
18185s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
18186s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
18187s,@LDLAST@,$LDLAST,;t t
18188s,@THREADOBJ@,$THREADOBJ,;t t
18189s,@DLINCLDIR@,$DLINCLDIR,;t t
18190s,@DYNLOADFILE@,$DYNLOADFILE,;t t
18191s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018192s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018193s,@LIBOBJS@,$LIBOBJS,;t t
18194s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
18195s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
18196s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
18197s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
18198s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
18199s,@LIBM@,$LIBM,;t t
18200s,@LIBC@,$LIBC,;t t
18201s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
18202s,@THREADHEADERS@,$THREADHEADERS,;t t
18203s,@SRCDIRS@,$SRCDIRS,;t t
18204CEOF
18205
18206_ACEOF
18207
18208 cat >>$CONFIG_STATUS <<\_ACEOF
18209 # Split the substitutions into bite-sized pieces for seds with
18210 # small command number limits, like on Digital OSF/1 and HP-UX.
18211 ac_max_sed_lines=48
18212 ac_sed_frag=1 # Number of current file.
18213 ac_beg=1 # First line for current file.
18214 ac_end=$ac_max_sed_lines # Line after last line for current file.
18215 ac_more_lines=:
18216 ac_sed_cmds=
18217 while $ac_more_lines; do
18218 if test $ac_beg -gt 1; then
18219 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18220 else
18221 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18222 fi
18223 if test ! -s $tmp/subs.frag; then
18224 ac_more_lines=false
18225 else
18226 # The purpose of the label and of the branching condition is to
18227 # speed up the sed processing (if there are no `@' at all, there
18228 # is no need to browse any of the substitutions).
18229 # These are the two extra sed commands mentioned above.
18230 (echo ':t
18231 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18232 if test -z "$ac_sed_cmds"; then
18233 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18234 else
18235 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18236 fi
18237 ac_sed_frag=`expr $ac_sed_frag + 1`
18238 ac_beg=$ac_end
18239 ac_end=`expr $ac_end + $ac_max_sed_lines`
18240 fi
18241 done
18242 if test -z "$ac_sed_cmds"; then
18243 ac_sed_cmds=cat
18244 fi
18245fi # test -n "$CONFIG_FILES"
18246
18247_ACEOF
18248cat >>$CONFIG_STATUS <<\_ACEOF
18249for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18250 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18251 case $ac_file in
18252 - | *:- | *:-:* ) # input from stdin
18253 cat >$tmp/stdin
18254 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18255 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18256 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18257 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18258 * ) ac_file_in=$ac_file.in ;;
18259 esac
18260
18261 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18262 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18263$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18264 X"$ac_file" : 'X\(//\)[^/]' \| \
18265 X"$ac_file" : 'X\(//\)$' \| \
18266 X"$ac_file" : 'X\(/\)' \| \
18267 . : '\(.\)' 2>/dev/null ||
18268echo X"$ac_file" |
18269 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18270 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18271 /^X\(\/\/\)$/{ s//\1/; q; }
18272 /^X\(\/\).*/{ s//\1/; q; }
18273 s/.*/./; q'`
Barry Warsawfe33b792003-01-07 22:42:49 +000018274 { case "$ac_dir" in
18275 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18276 *) as_incr_dir=.;;
18277esac
18278as_dummy="$ac_dir"
18279for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18280 case $as_mkdir_dir in
18281 # Skip DOS drivespec
18282 ?:) as_incr_dir=$as_mkdir_dir ;;
18283 *)
18284 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18285 test -d "$as_incr_dir" ||
18286 mkdir "$as_incr_dir" ||
18287 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18288echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18289 { (exit 1); exit 1; }; }
18290 ;;
18291 esac
18292done; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018293
18294 ac_builddir=.
18295
18296if test "$ac_dir" != .; then
18297 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18298 # A "../" for each directory in $ac_dir_suffix.
18299 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18300else
18301 ac_dir_suffix= ac_top_builddir=
18302fi
18303
18304case $srcdir in
18305 .) # No --srcdir option. We are building in place.
18306 ac_srcdir=.
18307 if test -z "$ac_top_builddir"; then
18308 ac_top_srcdir=.
18309 else
18310 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18311 fi ;;
18312 [\\/]* | ?:[\\/]* ) # Absolute path.
18313 ac_srcdir=$srcdir$ac_dir_suffix;
18314 ac_top_srcdir=$srcdir ;;
18315 *) # Relative path.
18316 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18317 ac_top_srcdir=$ac_top_builddir$srcdir ;;
18318esac
18319# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18320# absolute.
18321ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwis858f8172003-05-24 12:35:47 +000018322ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000018323ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18324ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18325
18326
18327 case $INSTALL in
18328 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18329 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
18330 esac
18331
18332 if test x"$ac_file" != x-; then
18333 { echo "$as_me:$LINENO: creating $ac_file" >&5
18334echo "$as_me: creating $ac_file" >&6;}
18335 rm -f "$ac_file"
18336 fi
18337 # Let's still pretend it is `configure' which instantiates (i.e., don't
18338 # use $as_me), people would be surprised to read:
18339 # /* config.h. Generated by config.status. */
18340 if test x"$ac_file" = x-; then
18341 configure_input=
18342 else
18343 configure_input="$ac_file. "
18344 fi
18345 configure_input=$configure_input"Generated from `echo $ac_file_in |
18346 sed 's,.*/,,'` by configure."
18347
18348 # First look for the input files in the build tree, otherwise in the
18349 # src tree.
18350 ac_file_inputs=`IFS=:
18351 for f in $ac_file_in; do
18352 case $f in
18353 -) echo $tmp/stdin ;;
18354 [\\/$]*)
18355 # Absolute (can't be DOS-style, as IFS=:)
18356 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18357echo "$as_me: error: cannot find input file: $f" >&2;}
18358 { (exit 1); exit 1; }; }
18359 echo $f;;
18360 *) # Relative
18361 if test -f "$f"; then
18362 # Build tree
18363 echo $f
18364 elif test -f "$srcdir/$f"; then
18365 # Source tree
18366 echo $srcdir/$f
18367 else
18368 # /dev/null tree
18369 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18370echo "$as_me: error: cannot find input file: $f" >&2;}
18371 { (exit 1); exit 1; }; }
18372 fi;;
18373 esac
18374 done` || { (exit 1); exit 1; }
18375_ACEOF
18376cat >>$CONFIG_STATUS <<_ACEOF
18377 sed "$ac_vpsub
18378$extrasub
18379_ACEOF
18380cat >>$CONFIG_STATUS <<\_ACEOF
18381:t
18382/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18383s,@configure_input@,$configure_input,;t t
18384s,@srcdir@,$ac_srcdir,;t t
18385s,@abs_srcdir@,$ac_abs_srcdir,;t t
18386s,@top_srcdir@,$ac_top_srcdir,;t t
18387s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18388s,@builddir@,$ac_builddir,;t t
18389s,@abs_builddir@,$ac_abs_builddir,;t t
18390s,@top_builddir@,$ac_top_builddir,;t t
18391s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
18392s,@INSTALL@,$ac_INSTALL,;t t
18393" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18394 rm -f $tmp/stdin
18395 if test x"$ac_file" != x-; then
18396 mv $tmp/out $ac_file
18397 else
18398 cat $tmp/out
18399 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018400 fi
18401
Martin v. Löwis11437992002-04-12 09:54:03 +000018402done
18403_ACEOF
18404cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018405
Martin v. Löwis11437992002-04-12 09:54:03 +000018406#
18407# CONFIG_HEADER section.
18408#
Guido van Rossum627b2d71993-12-24 10:39:16 +000018409
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018410# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18411# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000018412#
18413# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000018414ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18415ac_dB='[ ].*$,\1#\2'
18416ac_dC=' '
18417ac_dD=',;t'
18418# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18419ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18420ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018421ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000018422ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018423
Martin v. Löwis11437992002-04-12 09:54:03 +000018424for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000018425 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000018426 case $ac_file in
18427 - | *:- | *:-:* ) # input from stdin
18428 cat >$tmp/stdin
18429 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18430 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18431 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18432 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18433 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018434 esac
18435
Martin v. Löwis11437992002-04-12 09:54:03 +000018436 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
18437echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000018438
Martin v. Löwis11437992002-04-12 09:54:03 +000018439 # First look for the input files in the build tree, otherwise in the
18440 # src tree.
18441 ac_file_inputs=`IFS=:
18442 for f in $ac_file_in; do
18443 case $f in
18444 -) echo $tmp/stdin ;;
18445 [\\/$]*)
18446 # Absolute (can't be DOS-style, as IFS=:)
18447 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18448echo "$as_me: error: cannot find input file: $f" >&2;}
18449 { (exit 1); exit 1; }; }
18450 echo $f;;
18451 *) # Relative
18452 if test -f "$f"; then
18453 # Build tree
18454 echo $f
18455 elif test -f "$srcdir/$f"; then
18456 # Source tree
18457 echo $srcdir/$f
18458 else
18459 # /dev/null tree
18460 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18461echo "$as_me: error: cannot find input file: $f" >&2;}
18462 { (exit 1); exit 1; }; }
18463 fi;;
18464 esac
18465 done` || { (exit 1); exit 1; }
18466 # Remove the trailing spaces.
18467 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018468
Martin v. Löwis11437992002-04-12 09:54:03 +000018469_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018470
Martin v. Löwis11437992002-04-12 09:54:03 +000018471# Transform confdefs.h into two sed scripts, `conftest.defines' and
18472# `conftest.undefs', that substitutes the proper values into
18473# config.h.in to produce config.h. The first handles `#define'
18474# templates, and the second `#undef' templates.
18475# And first: Protect against being on the right side of a sed subst in
18476# config.status. Protect against being in an unquoted here document
18477# in config.status.
18478rm -f conftest.defines conftest.undefs
18479# Using a here document instead of a string reduces the quoting nightmare.
18480# Putting comments in sed scripts is not portable.
18481#
18482# `end' is used to avoid that the second main sed command (meant for
18483# 0-ary CPP macros) applies to n-ary macro definitions.
18484# See the Autoconf documentation for `clear'.
18485cat >confdef2sed.sed <<\_ACEOF
18486s/[\\&,]/\\&/g
18487s,[\\$`],\\&,g
18488t clear
18489: clear
18490s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
18491t end
18492s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
18493: end
18494_ACEOF
18495# If some macros were called several times there might be several times
18496# the same #defines, which is useless. Nevertheless, we may not want to
18497# sort them, since we want the *last* AC-DEFINE to be honored.
18498uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
18499sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
18500rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018501
18502# This sed command replaces #undef with comments. This is necessary, for
18503# example, in the case of _POSIX_SOURCE, which is predefined and required
18504# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000018505cat >>conftest.undefs <<\_ACEOF
18506s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
18507_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018508
Martin v. Löwis11437992002-04-12 09:54:03 +000018509# Break up conftest.defines because some shells have a limit on the size
18510# of here documents, and old seds have small limits too (100 cmds).
18511echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Barry Warsawfe33b792003-01-07 22:42:49 +000018512echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018513echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
18514echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018515rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000018516while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000018517do
Martin v. Löwis11437992002-04-12 09:54:03 +000018518 # Write a limited-size here document to $tmp/defines.sed.
18519 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
18520 # Speed up: don't consider the non `#define' lines.
18521 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
18522 # Work around the forget-to-reset-the-flag bug.
18523 echo 't clr' >>$CONFIG_STATUS
18524 echo ': clr' >>$CONFIG_STATUS
18525 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018526 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018527 sed -f $tmp/defines.sed $tmp/in >$tmp/out
18528 rm -f $tmp/in
18529 mv $tmp/out $tmp/in
18530' >>$CONFIG_STATUS
18531 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
18532 rm -f conftest.defines
18533 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000018534done
Martin v. Löwis11437992002-04-12 09:54:03 +000018535rm -f conftest.defines
Barry Warsawfe33b792003-01-07 22:42:49 +000018536echo ' fi # egrep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018537echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018538
Martin v. Löwis11437992002-04-12 09:54:03 +000018539# Break up conftest.undefs because some shells have a limit on the size
18540# of here documents, and old seds have small limits too (100 cmds).
18541echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
18542rm -f conftest.tail
18543while grep . conftest.undefs >/dev/null
18544do
18545 # Write a limited-size here document to $tmp/undefs.sed.
18546 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
18547 # Speed up: don't consider the non `#undef'
18548 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
18549 # Work around the forget-to-reset-the-flag bug.
18550 echo 't clr' >>$CONFIG_STATUS
18551 echo ': clr' >>$CONFIG_STATUS
18552 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
18553 echo 'CEOF
18554 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
18555 rm -f $tmp/in
18556 mv $tmp/out $tmp/in
18557' >>$CONFIG_STATUS
18558 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
18559 rm -f conftest.undefs
18560 mv conftest.tail conftest.undefs
18561done
18562rm -f conftest.undefs
18563
18564cat >>$CONFIG_STATUS <<\_ACEOF
18565 # Let's still pretend it is `configure' which instantiates (i.e., don't
18566 # use $as_me), people would be surprised to read:
18567 # /* config.h. Generated by config.status. */
18568 if test x"$ac_file" = x-; then
18569 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000018570 else
Martin v. Löwis11437992002-04-12 09:54:03 +000018571 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000018572 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018573 cat $tmp/in >>$tmp/config.h
18574 rm -f $tmp/in
18575 if test x"$ac_file" != x-; then
18576 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
18577 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
18578echo "$as_me: $ac_file is unchanged" >&6;}
18579 else
18580 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18581$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18582 X"$ac_file" : 'X\(//\)[^/]' \| \
18583 X"$ac_file" : 'X\(//\)$' \| \
18584 X"$ac_file" : 'X\(/\)' \| \
18585 . : '\(.\)' 2>/dev/null ||
18586echo X"$ac_file" |
18587 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18588 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18589 /^X\(\/\/\)$/{ s//\1/; q; }
18590 /^X\(\/\).*/{ s//\1/; q; }
18591 s/.*/./; q'`
Barry Warsawfe33b792003-01-07 22:42:49 +000018592 { case "$ac_dir" in
18593 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18594 *) as_incr_dir=.;;
18595esac
18596as_dummy="$ac_dir"
18597for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18598 case $as_mkdir_dir in
18599 # Skip DOS drivespec
18600 ?:) as_incr_dir=$as_mkdir_dir ;;
18601 *)
18602 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18603 test -d "$as_incr_dir" ||
18604 mkdir "$as_incr_dir" ||
18605 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18606echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18607 { (exit 1); exit 1; }; }
18608 ;;
18609 esac
18610done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018611
Martin v. Löwis11437992002-04-12 09:54:03 +000018612 rm -f $ac_file
18613 mv $tmp/config.h $ac_file
18614 fi
18615 else
18616 cat $tmp/config.h
18617 rm -f $tmp/config.h
18618 fi
18619done
18620_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000018621
Martin v. Löwis11437992002-04-12 09:54:03 +000018622cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018623
Martin v. Löwis11437992002-04-12 09:54:03 +000018624{ (exit 0); exit 0; }
18625_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018626chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018627ac_clean_files=$ac_clean_files_save
18628
18629
18630# configure is writing to config.log, and then calls config.status.
18631# config.status does its own redirection, appending to config.log.
18632# Unfortunately, on DOS this fails, as config.log is still kept open
18633# by configure, so config.status won't be able to write to it; its
18634# output is simply discarded. So we exec the FD to /dev/null,
18635# effectively closing config.log, so it can be properly (re)opened and
18636# appended to by config.status. When coming back to configure, we
18637# need to make the FD available again.
18638if test "$no_create" != yes; then
18639 ac_cs_success=:
18640 exec 5>/dev/null
18641 $SHELL $CONFIG_STATUS || ac_cs_success=false
18642 exec 5>>config.log
18643 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18644 # would make configure fail if this is the last instruction.
18645 $ac_cs_success || { (exit 1); exit 1; }
18646fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018647
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018648
18649echo "creating Setup"
18650if test ! -f Modules/Setup
18651then
18652 cp $srcdir/Modules/Setup.dist Modules/Setup
18653fi
18654
18655echo "creating Setup.local"
18656if test ! -f Modules/Setup.local
18657then
18658 echo "# Edit this file for local setup changes" >Modules/Setup.local
18659fi
18660
18661echo "creating Makefile"
18662$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
18663 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000018664 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018665mv config.c Modules