blob: 7c9a47e7bd023660c677d6ab7f55ed69913ca88a [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00002# From configure.in Revision: 1.416 .
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
Martin v. Löwis11437992002-04-12 09:54:03 +00001234
1235
1236
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001237
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001238
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001239# We don't use PACKAGE_ variables, and they cause conflicts
1240# with other autoconf-based packages that include Python.h
1241grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1242rm confdefs.h
1243mv confdefs.h.new confdefs.h
1244
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001245
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00001246VERSION=2.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001247
Martin v. Löwis1142de32002-03-29 16:28:31 +00001248
1249SOVERSION=1.0
1250
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001251# The later defininition of _XOPEN_SOURCE disables certain features
1252# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1253
1254cat >>confdefs.h <<\_ACEOF
1255#define _GNU_SOURCE 1
1256_ACEOF
1257
1258
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001259# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1260# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1261# them.
1262
1263cat >>confdefs.h <<\_ACEOF
1264#define _NETBSD_SOURCE 1
1265_ACEOF
1266
1267
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001268define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001269
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001270# Arguments passed to configure.
1271
1272CONFIG_ARGS="$ac_configure_args"
1273
Jack Jansene578a632001-08-15 01:27:14 +00001274# Check whether --enable-framework or --disable-framework was given.
1275if test "${enable_framework+set}" = set; then
1276 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001277
Jack Jansene578a632001-08-15 01:27:14 +00001278 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001279 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001280 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001281 esac
1282 case $enableval in
1283 no)
1284 PYTHONFRAMEWORK=
1285 PYTHONFRAMEWORKDIR=no-framework
1286 PYTHONFRAMEWORKPREFIX=
1287 PYTHONFRAMEWORKINSTALLDIR=
1288 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001289 ;;
1290 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001291 PYTHONFRAMEWORK=Python
1292 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001293 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001294 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1295 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001296 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001297
Guido van Rossum563e7081996-09-10 18:20:48 +00001298else
Martin v. Löwis11437992002-04-12 09:54:03 +00001299
Jack Jansene578a632001-08-15 01:27:14 +00001300 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001301 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001302 PYTHONFRAMEWORKPREFIX=
1303 PYTHONFRAMEWORKINSTALLDIR=
1304 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001305
Martin v. Löwis11437992002-04-12 09:54:03 +00001306fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001307
1308
1309
1310
Jack Jansene578a632001-08-15 01:27:14 +00001311
1312##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001313## AC_HELP_STRING(--with-dyld,
1314## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001315##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001316# Set name for machine-dependent library files
1317
Martin v. Löwis11437992002-04-12 09:54:03 +00001318echo "$as_me:$LINENO: checking MACHDEP" >&5
1319echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001320if test -z "$MACHDEP"
1321then
Guido van Rossum563e7081996-09-10 18:20:48 +00001322 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001323 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1324 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001325 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001326 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001327 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001328 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001329 ac_md_system=`echo $ac_sys_system |
1330 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1331 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001332 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001333 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001334
Guido van Rossum07397971997-04-29 21:49:50 +00001335 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001336 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001337 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001338 atheos*) MACHDEP="atheos";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001339 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001340 esac
1341fi
Guido van Rossum91922671997-10-09 20:24:13 +00001342
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001343# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1344# disable features if it is defined, without any means to access these
1345# features as extensions. For these systems, we skip the definition of
1346# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1347# some feature, make sure there is no alternative way to access this
1348# feature. Also, when using wildcards, make sure you have verified the
1349# need for not defining _XOPEN_SOURCE on all systems matching the
1350# wildcard, and that the wildcard does not include future systems
1351# (which may remove their limitations).
1352case $ac_sys_system/$ac_sys_release in
1353 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1354 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis858f8172003-05-24 12:35:47 +00001355 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm.
1356 OpenBSD/2.* | OpenBSD/3.[0123])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001357 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00001358 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
1359 # of union __?sigval. Reported by Stuart Bishop.
1360 SunOS/5.6)
1361 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001362 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
1363 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
1364 OpenUNIX/8.0.0| UnixWare/7.1.[0-3])
1365 define_xopen_source=no;;
1366 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001367 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001368 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001369 define_xopen_source=no;;
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001370esac
1371
1372if test $define_xopen_source = yes
1373then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001374
1375cat >>confdefs.h <<\_ACEOF
1376#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001377_ACEOF
1378
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001379
1380 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1381 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1382 # several APIs are not declared. Since this is also needed in some
1383 # cases for HP-UX, we define it globally.
1384
1385
1386cat >>confdefs.h <<\_ACEOF
1387#define _XOPEN_SOURCE_EXTENDED 1
1388_ACEOF
1389
1390
1391cat >>confdefs.h <<\_ACEOF
1392#define _POSIX_C_SOURCE 200112L
1393_ACEOF
1394
1395
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001396fi
1397
Guido van Rossum91922671997-10-09 20:24:13 +00001398#
1399# SGI compilers allow the specification of the both the ABI and the
1400# ISA on the command line. Depending on the values of these switches,
1401# different and often incompatable code will be generated.
1402#
1403# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1404# thus supply support for various ABI/ISA combinations. The MACHDEP
1405# variable is also adjusted.
1406#
1407
1408if test ! -z "$SGI_ABI"
1409then
1410 CC="cc $SGI_ABI"
1411 LDFLAGS="$SGI_ABI $LDFLAGS"
1412 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1413fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001414echo "$as_me:$LINENO: result: $MACHDEP" >&5
1415echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001416
Jack Jansen83f898c2002-12-30 22:23:40 +00001417# And add extra plat-mac for darwin
1418
Jack Jansen7b59b422003-03-17 15:44:10 +00001419
Jack Jansen83f898c2002-12-30 22:23:40 +00001420echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1421echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1422if test -z "$EXTRAPLATDIR"
1423then
1424 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001425 darwin)
1426 EXTRAPLATDIR="\$(PLATMACDIRS)"
1427 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1428 ;;
1429 *)
1430 EXTRAPLATDIR=""
1431 EXTRAMACHDEPPATH=""
1432 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001433 esac
1434fi
1435echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1436echo "${ECHO_T}$EXTRAPLATDIR" >&6
1437
Guido van Rossum627b2d71993-12-24 10:39:16 +00001438# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001439
1440# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1441# for debug/optimization stuff. BASECFLAGS is for flags that are required
1442# just to get things to compile and link. Users are free to override OPT
1443# when running configure or make. The build should not break if they do.
1444# BASECFLAGS should generally not be messed with, however.
1445
1446# XXX shouldn't some/most/all of this code be merged with the stuff later
1447# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001448echo "$as_me:$LINENO: checking for --without-gcc" >&5
1449echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1450
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001451# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001452if test "${with_gcc+set}" = set; then
1453 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001454
Guido van Rossum7f43da71994-08-01 12:15:30 +00001455 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001456 no) CC=cc
1457 without_gcc=yes;;
1458 yes) CC=gcc
1459 without_gcc=no;;
1460 *) CC=$withval
1461 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001462 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001463else
Martin v. Löwis11437992002-04-12 09:54:03 +00001464
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001465 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001466 AIX*) CC=cc_r
1467 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001468 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001469 case $BE_HOST_CPU in
1470 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001471 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001472 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001473 BASECFLAGS="$BASECFLAGS -export pragma"
1474 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001475 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001476 ;;
1477 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001478 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001479 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001480 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001481 ;;
1482 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001483 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1484echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1485 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001486 ;;
1487 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001488 AR="\$(srcdir)/Modules/ar_beos"
1489 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001490 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001491 Monterey*)
1492 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001493 without_gcc=;;
1494 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001495 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001496fi;
1497echo "$as_me:$LINENO: result: $without_gcc" >&5
1498echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001499
1500
Guido van Rossum95012191999-12-16 17:50:52 +00001501
Fred Drakea1a84e72001-03-06 05:52:16 +00001502MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001503echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1504echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1505
Guido van Rossum95012191999-12-16 17:50:52 +00001506# Check whether --with-cxx or --without-cxx was given.
1507if test "${with_cxx+set}" = set; then
1508 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001509
Martin v. Löwis22352952000-12-13 17:37:02 +00001510 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001511 case $withval in
1512 no) CXX=
1513 with_cxx=no;;
1514 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001515 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001516 with_cxx=$withval;;
1517 esac
1518else
Martin v. Löwis11437992002-04-12 09:54:03 +00001519
Guido van Rossum95012191999-12-16 17:50:52 +00001520 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001521 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001522
Martin v. Löwis11437992002-04-12 09:54:03 +00001523fi;
1524echo "$as_me:$LINENO: result: $with_cxx" >&5
1525echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001526
1527if test "$with_cxx" = "yes"
1528then
Martin v. Löwis11437992002-04-12 09:54:03 +00001529 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1530echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1531 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001532fi
1533
1534
1535
1536
Martin v. Löwis11437992002-04-12 09:54:03 +00001537if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001538then
1539 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1540do
Martin v. Löwis11437992002-04-12 09:54:03 +00001541 # 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 +00001542set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001543echo "$as_me:$LINENO: checking for $ac_word" >&5
1544echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1545if test "${ac_cv_prog_CXX+set}" = set; then
1546 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001547else
1548 if test -n "$CXX"; then
1549 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1550else
Martin v. Löwis11437992002-04-12 09:54:03 +00001551as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1552for as_dir in $PATH
1553do
1554 IFS=$as_save_IFS
1555 test -z "$as_dir" && as_dir=.
1556 for ac_exec_ext in '' $ac_executable_extensions; do
1557 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1558 ac_cv_prog_CXX="$ac_prog"
1559 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1560 break 2
1561 fi
1562done
1563done
1564
Martin v. Löwis22352952000-12-13 17:37:02 +00001565fi
1566fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001567CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001568if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001569 echo "$as_me:$LINENO: result: $CXX" >&5
1570echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001571else
Martin v. Löwis11437992002-04-12 09:54:03 +00001572 echo "$as_me:$LINENO: result: no" >&5
1573echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001574fi
1575
Martin v. Löwis11437992002-04-12 09:54:03 +00001576 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001577done
1578test -n "$CXX" || CXX="notfound"
1579
1580 if test "$CXX" = "notfound"
1581 then
1582 CXX=
1583 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001584 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001585ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001586ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1587ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1588ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1589 cat >conftest.$ac_ext <<_ACEOF
1590#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001591#include "confdefs.h"
1592
Barry Warsawfe33b792003-01-07 22:42:49 +00001593#ifdef F77_DUMMY_MAIN
1594# ifdef __cplusplus
1595 extern "C"
1596# endif
1597 int F77_DUMMY_MAIN() { return 1; }
1598#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00001599int
1600main ()
1601{
Michael W. Hudson54241132001-12-07 15:38:26 +00001602
Martin v. Löwis11437992002-04-12 09:54:03 +00001603 ;
1604 return 0;
1605}
1606_ACEOF
1607ac_clean_files_save=$ac_clean_files
1608ac_clean_files="$ac_clean_files a.out a.exe"
1609# Try to create an executable without -o first, disregard a.out.
1610# It will help us diagnose broken compilers, and finding out an intuition
1611# of exeext.
1612echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1613echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1614ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1615if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1616 (eval $ac_link_default) 2>&5
1617 ac_status=$?
1618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1619 (exit $ac_status); }; then
1620 # Find the output, starting from the most likely. This scheme is
1621# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1622# resort.
1623
1624# Be careful to initialize this variable, since it used to be cached.
1625# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1626ac_cv_exeext=
Barry Warsawfe33b792003-01-07 22:42:49 +00001627for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1628 ls a.out conftest 2>/dev/null;
1629 ls a.* conftest.* 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001630 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00001631 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001632 a.out ) # We found the default executable, but exeext='' is most
1633 # certainly right.
1634 break;;
1635 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1636 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1637 export ac_cv_exeext
1638 break;;
1639 * ) break;;
1640 esac
1641done
1642else
1643 echo "$as_me: failed program was:" >&5
1644cat conftest.$ac_ext >&5
Barry Warsawfe33b792003-01-07 22:42:49 +00001645{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1646echo "$as_me: error: C++ compiler cannot create executables" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001647 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001648fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001649
1650ac_exeext=$ac_cv_exeext
1651echo "$as_me:$LINENO: result: $ac_file" >&5
1652echo "${ECHO_T}$ac_file" >&6
1653
1654# Check the compiler produces executables we can run. If not, either
1655# the compiler is broken, or we cross compile.
1656echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1657echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1658# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1659# If not cross compiling, check that we can run a simple program.
1660if test "$cross_compiling" != yes; then
1661 if { ac_try='./$ac_file'
1662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1663 (eval $ac_try) 2>&5
1664 ac_status=$?
1665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1666 (exit $ac_status); }; }; then
1667 cross_compiling=no
1668 else
1669 if test "$cross_compiling" = maybe; then
1670 cross_compiling=yes
1671 else
1672 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1673If you meant to cross compile, use \`--host'." >&5
1674echo "$as_me: error: cannot run C++ compiled programs.
1675If you meant to cross compile, use \`--host'." >&2;}
1676 { (exit 1); exit 1; }; }
1677 fi
1678 fi
1679fi
1680echo "$as_me:$LINENO: result: yes" >&5
1681echo "${ECHO_T}yes" >&6
1682
1683rm -f a.out a.exe conftest$ac_cv_exeext
1684ac_clean_files=$ac_clean_files_save
1685# Check the compiler produces executables we can run. If not, either
1686# the compiler is broken, or we cross compile.
1687echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1688echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1689echo "$as_me:$LINENO: result: $cross_compiling" >&5
1690echo "${ECHO_T}$cross_compiling" >&6
1691
1692echo "$as_me:$LINENO: checking for suffix of executables" >&5
1693echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1694if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1695 (eval $ac_link) 2>&5
1696 ac_status=$?
1697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1698 (exit $ac_status); }; then
1699 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1700# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1701# work properly (i.e., refer to `conftest.exe'), while it won't with
1702# `rm'.
Barry Warsawfe33b792003-01-07 22:42:49 +00001703for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001704 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00001705 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001706 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1707 export ac_cv_exeext
1708 break;;
1709 * ) break;;
1710 esac
1711done
1712else
1713 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1714echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1715 { (exit 1); exit 1; }; }
1716fi
1717
1718rm -f conftest$ac_cv_exeext
1719echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1720echo "${ECHO_T}$ac_cv_exeext" >&6
1721
1722rm -f conftest.$ac_ext
1723EXEEXT=$ac_cv_exeext
1724ac_exeext=$EXEEXT
1725
1726 ac_ext=c
1727ac_cpp='$CPP $CPPFLAGS'
1728ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1729ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1730ac_compiler_gnu=$ac_cv_c_compiler_gnu
1731
1732
Martin v. Löwis22352952000-12-13 17:37:02 +00001733
1734 fi
1735fi
1736
Guido van Rossum8b131c51995-03-09 14:10:13 +00001737# If the user switches compilers, we can't believe the cache
1738if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1739then
Martin v. Löwis11437992002-04-12 09:54:03 +00001740 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1741(it is also a good idea to do 'make clean' before compiling)" >&5
1742echo "$as_me: error: cached CC is different -- throw away $cache_file
1743(it is also a good idea to do 'make clean' before compiling)" >&2;}
1744 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001745fi
1746
Martin v. Löwis11437992002-04-12 09:54:03 +00001747ac_ext=c
1748ac_cpp='$CPP $CPPFLAGS'
1749ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1750ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1751ac_compiler_gnu=$ac_cv_c_compiler_gnu
1752if test -n "$ac_tool_prefix"; then
1753 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1754set dummy ${ac_tool_prefix}gcc; ac_word=$2
1755echo "$as_me:$LINENO: checking for $ac_word" >&5
1756echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1757if test "${ac_cv_prog_CC+set}" = set; then
1758 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001759else
1760 if test -n "$CC"; then
1761 ac_cv_prog_CC="$CC" # Let the user override the test.
1762else
Martin v. Löwis11437992002-04-12 09:54:03 +00001763as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1764for as_dir in $PATH
1765do
1766 IFS=$as_save_IFS
1767 test -z "$as_dir" && as_dir=.
1768 for ac_exec_ext in '' $ac_executable_extensions; do
1769 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1770 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1771 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1772 break 2
1773 fi
1774done
1775done
1776
Jack Jansendd19cf82001-12-06 22:36:17 +00001777fi
1778fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001779CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001780if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001781 echo "$as_me:$LINENO: result: $CC" >&5
1782echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001783else
Martin v. Löwis11437992002-04-12 09:54:03 +00001784 echo "$as_me:$LINENO: result: no" >&5
1785echo "${ECHO_T}no" >&6
1786fi
1787
1788fi
1789if test -z "$ac_cv_prog_CC"; then
1790 ac_ct_CC=$CC
1791 # Extract the first word of "gcc", so it can be a program name with args.
1792set dummy gcc; ac_word=$2
1793echo "$as_me:$LINENO: checking for $ac_word" >&5
1794echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1795if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1796 echo $ECHO_N "(cached) $ECHO_C" >&6
1797else
1798 if test -n "$ac_ct_CC"; then
1799 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1800else
1801as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1802for as_dir in $PATH
1803do
1804 IFS=$as_save_IFS
1805 test -z "$as_dir" && as_dir=.
1806 for ac_exec_ext in '' $ac_executable_extensions; do
1807 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1808 ac_cv_prog_ac_ct_CC="gcc"
1809 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1810 break 2
1811 fi
1812done
1813done
1814
1815fi
1816fi
1817ac_ct_CC=$ac_cv_prog_ac_ct_CC
1818if test -n "$ac_ct_CC"; then
1819 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1820echo "${ECHO_T}$ac_ct_CC" >&6
1821else
1822 echo "$as_me:$LINENO: result: no" >&5
1823echo "${ECHO_T}no" >&6
1824fi
1825
1826 CC=$ac_ct_CC
1827else
1828 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001829fi
1830
Jack Jansendd19cf82001-12-06 22:36:17 +00001831if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001832 if test -n "$ac_tool_prefix"; then
1833 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1834set dummy ${ac_tool_prefix}cc; ac_word=$2
1835echo "$as_me:$LINENO: checking for $ac_word" >&5
1836echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1837if test "${ac_cv_prog_CC+set}" = set; then
1838 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001839else
1840 if test -n "$CC"; then
1841 ac_cv_prog_CC="$CC" # Let the user override the test.
1842else
Martin v. Löwis11437992002-04-12 09:54:03 +00001843as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1844for as_dir in $PATH
1845do
1846 IFS=$as_save_IFS
1847 test -z "$as_dir" && as_dir=.
1848 for ac_exec_ext in '' $ac_executable_extensions; do
1849 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1850 ac_cv_prog_CC="${ac_tool_prefix}cc"
1851 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1852 break 2
1853 fi
1854done
1855done
1856
1857fi
1858fi
1859CC=$ac_cv_prog_CC
1860if test -n "$CC"; then
1861 echo "$as_me:$LINENO: result: $CC" >&5
1862echo "${ECHO_T}$CC" >&6
1863else
1864 echo "$as_me:$LINENO: result: no" >&5
1865echo "${ECHO_T}no" >&6
1866fi
1867
1868fi
1869if test -z "$ac_cv_prog_CC"; then
1870 ac_ct_CC=$CC
1871 # Extract the first word of "cc", so it can be a program name with args.
1872set dummy cc; ac_word=$2
1873echo "$as_me:$LINENO: checking for $ac_word" >&5
1874echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1875if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1876 echo $ECHO_N "(cached) $ECHO_C" >&6
1877else
1878 if test -n "$ac_ct_CC"; then
1879 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1880else
1881as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1882for as_dir in $PATH
1883do
1884 IFS=$as_save_IFS
1885 test -z "$as_dir" && as_dir=.
1886 for ac_exec_ext in '' $ac_executable_extensions; do
1887 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1888 ac_cv_prog_ac_ct_CC="cc"
1889 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1890 break 2
1891 fi
1892done
1893done
1894
1895fi
1896fi
1897ac_ct_CC=$ac_cv_prog_ac_ct_CC
1898if test -n "$ac_ct_CC"; then
1899 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1900echo "${ECHO_T}$ac_ct_CC" >&6
1901else
1902 echo "$as_me:$LINENO: result: no" >&5
1903echo "${ECHO_T}no" >&6
1904fi
1905
1906 CC=$ac_ct_CC
1907else
1908 CC="$ac_cv_prog_CC"
1909fi
1910
1911fi
1912if test -z "$CC"; then
1913 # Extract the first word of "cc", so it can be a program name with args.
1914set dummy cc; ac_word=$2
1915echo "$as_me:$LINENO: checking for $ac_word" >&5
1916echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1917if test "${ac_cv_prog_CC+set}" = set; then
1918 echo $ECHO_N "(cached) $ECHO_C" >&6
1919else
1920 if test -n "$CC"; then
1921 ac_cv_prog_CC="$CC" # Let the user override the test.
1922else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001923 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001924as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1925for as_dir in $PATH
1926do
1927 IFS=$as_save_IFS
1928 test -z "$as_dir" && as_dir=.
1929 for ac_exec_ext in '' $ac_executable_extensions; do
1930 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1931 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1932 ac_prog_rejected=yes
1933 continue
1934 fi
1935 ac_cv_prog_CC="cc"
1936 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1937 break 2
1938 fi
1939done
1940done
1941
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001942if test $ac_prog_rejected = yes; then
1943 # We found a bogon in the path, so make sure we never use it.
1944 set dummy $ac_cv_prog_CC
1945 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001946 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001947 # We chose a different compiler from the bogus one.
1948 # However, it has the same basename, so the bogon will be chosen
1949 # first if we set CC to just the basename; use the full file name.
1950 shift
Barry Warsawfe33b792003-01-07 22:42:49 +00001951 set dummy "$as_dir/$ac_word" ${1+"$@"}
1952 shift
1953 ac_cv_prog_CC="$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001954 fi
1955fi
1956fi
1957fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001958CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001959if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001960 echo "$as_me:$LINENO: result: $CC" >&5
1961echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001962else
Martin v. Löwis11437992002-04-12 09:54:03 +00001963 echo "$as_me:$LINENO: result: no" >&5
1964echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001965fi
1966
Martin v. Löwis11437992002-04-12 09:54:03 +00001967fi
1968if test -z "$CC"; then
1969 if test -n "$ac_tool_prefix"; then
1970 for ac_prog in cl
1971 do
1972 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1973set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1974echo "$as_me:$LINENO: checking for $ac_word" >&5
1975echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1976if test "${ac_cv_prog_CC+set}" = set; then
1977 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001978else
1979 if test -n "$CC"; then
1980 ac_cv_prog_CC="$CC" # Let the user override the test.
1981else
Martin v. Löwis11437992002-04-12 09:54:03 +00001982as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1983for as_dir in $PATH
1984do
1985 IFS=$as_save_IFS
1986 test -z "$as_dir" && as_dir=.
1987 for ac_exec_ext in '' $ac_executable_extensions; do
1988 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1989 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1990 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1991 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001992 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001993done
1994done
1995
1996fi
1997fi
1998CC=$ac_cv_prog_CC
1999if test -n "$CC"; then
2000 echo "$as_me:$LINENO: result: $CC" >&5
2001echo "${ECHO_T}$CC" >&6
2002else
2003 echo "$as_me:$LINENO: result: no" >&5
2004echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002005fi
2006
Martin v. Löwis11437992002-04-12 09:54:03 +00002007 test -n "$CC" && break
2008 done
2009fi
2010if test -z "$CC"; then
2011 ac_ct_CC=$CC
2012 for ac_prog in cl
2013do
2014 # Extract the first word of "$ac_prog", so it can be a program name with args.
2015set dummy $ac_prog; ac_word=$2
2016echo "$as_me:$LINENO: checking for $ac_word" >&5
2017echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2018if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2019 echo $ECHO_N "(cached) $ECHO_C" >&6
2020else
2021 if test -n "$ac_ct_CC"; then
2022 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2023else
2024as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2025for as_dir in $PATH
2026do
2027 IFS=$as_save_IFS
2028 test -z "$as_dir" && as_dir=.
2029 for ac_exec_ext in '' $ac_executable_extensions; do
2030 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2031 ac_cv_prog_ac_ct_CC="$ac_prog"
2032 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2033 break 2
2034 fi
2035done
2036done
Jack Jansendd19cf82001-12-06 22:36:17 +00002037
Martin v. Löwis11437992002-04-12 09:54:03 +00002038fi
2039fi
2040ac_ct_CC=$ac_cv_prog_ac_ct_CC
2041if test -n "$ac_ct_CC"; then
2042 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2043echo "${ECHO_T}$ac_ct_CC" >&6
2044else
2045 echo "$as_me:$LINENO: result: no" >&5
2046echo "${ECHO_T}no" >&6
2047fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002048
Martin v. Löwis11437992002-04-12 09:54:03 +00002049 test -n "$ac_ct_CC" && break
2050done
Michael W. Hudson54241132001-12-07 15:38:26 +00002051
Martin v. Löwis11437992002-04-12 09:54:03 +00002052 CC=$ac_ct_CC
2053fi
2054
2055fi
2056
2057
2058test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
2059echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
2060 { (exit 1); exit 1; }; }
2061
2062# Provide some information about the compiler.
2063echo "$as_me:$LINENO:" \
2064 "checking for C compiler version" >&5
2065ac_compiler=`set X $ac_compile; echo $2`
2066{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2067 (eval $ac_compiler --version </dev/null >&5) 2>&5
2068 ac_status=$?
2069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2070 (exit $ac_status); }
2071{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2072 (eval $ac_compiler -v </dev/null >&5) 2>&5
2073 ac_status=$?
2074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2075 (exit $ac_status); }
2076{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2077 (eval $ac_compiler -V </dev/null >&5) 2>&5
2078 ac_status=$?
2079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2080 (exit $ac_status); }
2081
2082cat >conftest.$ac_ext <<_ACEOF
2083#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00002084#include "confdefs.h"
2085
Barry Warsawfe33b792003-01-07 22:42:49 +00002086#ifdef F77_DUMMY_MAIN
2087# ifdef __cplusplus
2088 extern "C"
2089# endif
2090 int F77_DUMMY_MAIN() { return 1; }
2091#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002092int
2093main ()
2094{
2095
2096 ;
2097 return 0;
2098}
2099_ACEOF
2100ac_clean_files_save=$ac_clean_files
2101ac_clean_files="$ac_clean_files a.out a.exe"
2102# Try to create an executable without -o first, disregard a.out.
2103# It will help us diagnose broken compilers, and finding out an intuition
2104# of exeext.
2105echo "$as_me:$LINENO: checking for C compiler default output" >&5
2106echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2107ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2108if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2109 (eval $ac_link_default) 2>&5
2110 ac_status=$?
2111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2112 (exit $ac_status); }; then
2113 # Find the output, starting from the most likely. This scheme is
2114# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2115# resort.
2116
2117# Be careful to initialize this variable, since it used to be cached.
2118# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2119ac_cv_exeext=
Barry Warsawfe33b792003-01-07 22:42:49 +00002120for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
2121 ls a.out conftest 2>/dev/null;
2122 ls a.* conftest.* 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002123 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00002124 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002125 a.out ) # We found the default executable, but exeext='' is most
2126 # certainly right.
2127 break;;
2128 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2129 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2130 export ac_cv_exeext
2131 break;;
2132 * ) break;;
2133 esac
2134done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002135else
Martin v. Löwis11437992002-04-12 09:54:03 +00002136 echo "$as_me: failed program was:" >&5
2137cat conftest.$ac_ext >&5
Barry Warsawfe33b792003-01-07 22:42:49 +00002138{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2139echo "$as_me: error: C compiler cannot create executables" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002140 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002141fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002142
Martin v. Löwis11437992002-04-12 09:54:03 +00002143ac_exeext=$ac_cv_exeext
2144echo "$as_me:$LINENO: result: $ac_file" >&5
2145echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002146
Martin v. Löwis11437992002-04-12 09:54:03 +00002147# Check the compiler produces executables we can run. If not, either
2148# the compiler is broken, or we cross compile.
2149echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2150echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2151# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2152# If not cross compiling, check that we can run a simple program.
2153if test "$cross_compiling" != yes; then
2154 if { ac_try='./$ac_file'
2155 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2156 (eval $ac_try) 2>&5
2157 ac_status=$?
2158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2159 (exit $ac_status); }; }; then
2160 cross_compiling=no
2161 else
2162 if test "$cross_compiling" = maybe; then
2163 cross_compiling=yes
2164 else
2165 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2166If you meant to cross compile, use \`--host'." >&5
2167echo "$as_me: error: cannot run C compiled programs.
2168If you meant to cross compile, use \`--host'." >&2;}
2169 { (exit 1); exit 1; }; }
2170 fi
2171 fi
2172fi
2173echo "$as_me:$LINENO: result: yes" >&5
2174echo "${ECHO_T}yes" >&6
2175
2176rm -f a.out a.exe conftest$ac_cv_exeext
2177ac_clean_files=$ac_clean_files_save
2178# Check the compiler produces executables we can run. If not, either
2179# the compiler is broken, or we cross compile.
2180echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2181echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2182echo "$as_me:$LINENO: result: $cross_compiling" >&5
2183echo "${ECHO_T}$cross_compiling" >&6
2184
2185echo "$as_me:$LINENO: checking for suffix of executables" >&5
2186echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2187if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2188 (eval $ac_link) 2>&5
2189 ac_status=$?
2190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2191 (exit $ac_status); }; then
2192 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2193# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2194# work properly (i.e., refer to `conftest.exe'), while it won't with
2195# `rm'.
Barry Warsawfe33b792003-01-07 22:42:49 +00002196for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002197 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00002198 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002199 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2200 export ac_cv_exeext
2201 break;;
2202 * ) break;;
2203 esac
2204done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002205else
Martin v. Löwis11437992002-04-12 09:54:03 +00002206 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2207echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2208 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002209fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002210
Martin v. Löwis11437992002-04-12 09:54:03 +00002211rm -f conftest$ac_cv_exeext
2212echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2213echo "${ECHO_T}$ac_cv_exeext" >&6
2214
2215rm -f conftest.$ac_ext
2216EXEEXT=$ac_cv_exeext
2217ac_exeext=$EXEEXT
2218echo "$as_me:$LINENO: checking for suffix of object files" >&5
2219echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2220if test "${ac_cv_objext+set}" = set; then
2221 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002222else
Martin v. Löwis11437992002-04-12 09:54:03 +00002223 cat >conftest.$ac_ext <<_ACEOF
2224#line $LINENO "configure"
2225#include "confdefs.h"
2226
Barry Warsawfe33b792003-01-07 22:42:49 +00002227#ifdef F77_DUMMY_MAIN
2228# ifdef __cplusplus
2229 extern "C"
2230# endif
2231 int F77_DUMMY_MAIN() { return 1; }
2232#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002233int
2234main ()
2235{
2236
2237 ;
2238 return 0;
2239}
2240_ACEOF
2241rm -f conftest.o conftest.obj
2242if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2243 (eval $ac_compile) 2>&5
2244 ac_status=$?
2245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2246 (exit $ac_status); }; then
2247 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2248 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00002249 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002250 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2251 break;;
2252 esac
2253done
2254else
2255 echo "$as_me: failed program was:" >&5
2256cat conftest.$ac_ext >&5
2257{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2258echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2259 { (exit 1); exit 1; }; }
2260fi
2261
2262rm -f conftest.$ac_cv_objext conftest.$ac_ext
2263fi
2264echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2265echo "${ECHO_T}$ac_cv_objext" >&6
2266OBJEXT=$ac_cv_objext
2267ac_objext=$OBJEXT
2268echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2269echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2270if test "${ac_cv_c_compiler_gnu+set}" = set; then
2271 echo $ECHO_N "(cached) $ECHO_C" >&6
2272else
2273 cat >conftest.$ac_ext <<_ACEOF
2274#line $LINENO "configure"
2275#include "confdefs.h"
2276
Barry Warsawfe33b792003-01-07 22:42:49 +00002277#ifdef F77_DUMMY_MAIN
2278# ifdef __cplusplus
2279 extern "C"
2280# endif
2281 int F77_DUMMY_MAIN() { return 1; }
2282#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002283int
2284main ()
2285{
2286#ifndef __GNUC__
2287 choke me
2288#endif
2289
2290 ;
2291 return 0;
2292}
2293_ACEOF
2294rm -f conftest.$ac_objext
2295if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2296 (eval $ac_compile) 2>&5
2297 ac_status=$?
2298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2299 (exit $ac_status); } &&
2300 { ac_try='test -s conftest.$ac_objext'
2301 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2302 (eval $ac_try) 2>&5
2303 ac_status=$?
2304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2305 (exit $ac_status); }; }; then
2306 ac_compiler_gnu=yes
2307else
2308 echo "$as_me: failed program was:" >&5
2309cat conftest.$ac_ext >&5
2310ac_compiler_gnu=no
2311fi
2312rm -f conftest.$ac_objext conftest.$ac_ext
2313ac_cv_c_compiler_gnu=$ac_compiler_gnu
2314
2315fi
2316echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2317echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2318GCC=`test $ac_compiler_gnu = yes && echo yes`
2319ac_test_CFLAGS=${CFLAGS+set}
2320ac_save_CFLAGS=$CFLAGS
2321CFLAGS="-g"
2322echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2323echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2324if test "${ac_cv_prog_cc_g+set}" = set; then
2325 echo $ECHO_N "(cached) $ECHO_C" >&6
2326else
2327 cat >conftest.$ac_ext <<_ACEOF
2328#line $LINENO "configure"
2329#include "confdefs.h"
2330
Barry Warsawfe33b792003-01-07 22:42:49 +00002331#ifdef F77_DUMMY_MAIN
2332# ifdef __cplusplus
2333 extern "C"
2334# endif
2335 int F77_DUMMY_MAIN() { return 1; }
2336#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002337int
2338main ()
2339{
2340
2341 ;
2342 return 0;
2343}
2344_ACEOF
2345rm -f conftest.$ac_objext
2346if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2347 (eval $ac_compile) 2>&5
2348 ac_status=$?
2349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2350 (exit $ac_status); } &&
2351 { ac_try='test -s conftest.$ac_objext'
2352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2353 (eval $ac_try) 2>&5
2354 ac_status=$?
2355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2356 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002357 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002358else
Martin v. Löwis11437992002-04-12 09:54:03 +00002359 echo "$as_me: failed program was:" >&5
2360cat conftest.$ac_ext >&5
2361ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002362fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002363rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002364fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002365echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2366echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002367if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002368 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002369elif test $ac_cv_prog_cc_g = yes; then
2370 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002371 CFLAGS="-g -O2"
2372 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002373 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002374 fi
2375else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002376 if test "$GCC" = yes; then
2377 CFLAGS="-O2"
2378 else
2379 CFLAGS=
2380 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002381fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002382# Some people use a C++ compiler to compile C. Since we use `exit',
2383# in C++ we need to declare it. In case someone uses the same compiler
2384# for both compiling C and C++ we need to have the C++ compiler decide
2385# the declaration of exit, since it's the most demanding environment.
2386cat >conftest.$ac_ext <<_ACEOF
2387#ifndef __cplusplus
2388 choke me
2389#endif
2390_ACEOF
2391rm -f conftest.$ac_objext
2392if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2393 (eval $ac_compile) 2>&5
2394 ac_status=$?
2395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2396 (exit $ac_status); } &&
2397 { ac_try='test -s conftest.$ac_objext'
2398 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2399 (eval $ac_try) 2>&5
2400 ac_status=$?
2401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2402 (exit $ac_status); }; }; then
2403 for ac_declaration in \
2404 ''\
2405 '#include <stdlib.h>' \
2406 'extern "C" void std::exit (int) throw (); using std::exit;' \
2407 'extern "C" void std::exit (int); using std::exit;' \
2408 'extern "C" void exit (int) throw ();' \
2409 'extern "C" void exit (int);' \
2410 'void exit (int);'
2411do
2412 cat >conftest.$ac_ext <<_ACEOF
2413#line $LINENO "configure"
2414#include "confdefs.h"
2415#include <stdlib.h>
2416$ac_declaration
Barry Warsawfe33b792003-01-07 22:42:49 +00002417#ifdef F77_DUMMY_MAIN
2418# ifdef __cplusplus
2419 extern "C"
2420# endif
2421 int F77_DUMMY_MAIN() { return 1; }
2422#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002423int
2424main ()
2425{
2426exit (42);
2427 ;
2428 return 0;
2429}
2430_ACEOF
2431rm -f conftest.$ac_objext
2432if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2433 (eval $ac_compile) 2>&5
2434 ac_status=$?
2435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2436 (exit $ac_status); } &&
2437 { ac_try='test -s conftest.$ac_objext'
2438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2439 (eval $ac_try) 2>&5
2440 ac_status=$?
2441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2442 (exit $ac_status); }; }; then
2443 :
2444else
2445 echo "$as_me: failed program was:" >&5
2446cat conftest.$ac_ext >&5
2447continue
2448fi
2449rm -f conftest.$ac_objext conftest.$ac_ext
2450 cat >conftest.$ac_ext <<_ACEOF
2451#line $LINENO "configure"
2452#include "confdefs.h"
2453$ac_declaration
Barry Warsawfe33b792003-01-07 22:42:49 +00002454#ifdef F77_DUMMY_MAIN
2455# ifdef __cplusplus
2456 extern "C"
2457# endif
2458 int F77_DUMMY_MAIN() { return 1; }
2459#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002460int
2461main ()
2462{
2463exit (42);
2464 ;
2465 return 0;
2466}
2467_ACEOF
2468rm -f conftest.$ac_objext
2469if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2470 (eval $ac_compile) 2>&5
2471 ac_status=$?
2472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2473 (exit $ac_status); } &&
2474 { ac_try='test -s conftest.$ac_objext'
2475 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2476 (eval $ac_try) 2>&5
2477 ac_status=$?
2478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2479 (exit $ac_status); }; }; then
2480 break
2481else
2482 echo "$as_me: failed program was:" >&5
2483cat conftest.$ac_ext >&5
2484fi
2485rm -f conftest.$ac_objext conftest.$ac_ext
2486done
2487rm -f conftest*
2488if test -n "$ac_declaration"; then
2489 echo '#ifdef __cplusplus' >>confdefs.h
2490 echo $ac_declaration >>confdefs.h
2491 echo '#endif' >>confdefs.h
2492fi
2493
2494else
2495 echo "$as_me: failed program was:" >&5
2496cat conftest.$ac_ext >&5
2497fi
2498rm -f conftest.$ac_objext conftest.$ac_ext
2499ac_ext=c
2500ac_cpp='$CPP $CPPFLAGS'
2501ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2502ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2503ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002504
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002505
2506# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002507
2508ac_ext=c
2509ac_cpp='$CPP $CPPFLAGS'
2510ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2511ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2512ac_compiler_gnu=$ac_cv_c_compiler_gnu
2513echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2514echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002515# On Suns, sometimes $CPP names a directory.
2516if test -n "$CPP" && test -d "$CPP"; then
2517 CPP=
2518fi
2519if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002520 if test "${ac_cv_prog_CPP+set}" = set; then
2521 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002522else
Martin v. Löwis11437992002-04-12 09:54:03 +00002523 # Double quotes because CPP needs to be expanded
2524 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2525 do
2526 ac_preproc_ok=false
2527for ac_c_preproc_warn_flag in '' yes
2528do
2529 # Use a header file that comes with gcc, so configuring glibc
2530 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002531 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 # not just through cpp. "Syntax error" is here to catch this case.
2533 cat >conftest.$ac_ext <<_ACEOF
2534#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002535#include "confdefs.h"
2536#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002537 Syntax error
2538_ACEOF
2539if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2540 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2541 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002542 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002543 rm -f conftest.er1
2544 cat conftest.err >&5
2545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2546 (exit $ac_status); } >/dev/null; then
2547 if test -s conftest.err; then
2548 ac_cpp_err=$ac_c_preproc_warn_flag
2549 else
2550 ac_cpp_err=
2551 fi
2552else
2553 ac_cpp_err=yes
2554fi
2555if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002556 :
2557else
Martin v. Löwis11437992002-04-12 09:54:03 +00002558 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002559 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002560 # Broken: fails on valid input.
2561continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002562fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002563rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002564
Martin v. Löwis11437992002-04-12 09:54:03 +00002565 # OK, works on sane cases. Now check whether non-existent headers
2566 # can be detected and how.
2567 cat >conftest.$ac_ext <<_ACEOF
2568#line $LINENO "configure"
2569#include "confdefs.h"
2570#include <ac_nonexistent.h>
2571_ACEOF
2572if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2573 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2574 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002575 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002576 rm -f conftest.er1
2577 cat conftest.err >&5
2578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2579 (exit $ac_status); } >/dev/null; then
2580 if test -s conftest.err; then
2581 ac_cpp_err=$ac_c_preproc_warn_flag
2582 else
2583 ac_cpp_err=
2584 fi
2585else
2586 ac_cpp_err=yes
2587fi
2588if test -z "$ac_cpp_err"; then
2589 # Broken: success on invalid input.
2590continue
2591else
2592 echo "$as_me: failed program was:" >&5
2593 cat conftest.$ac_ext >&5
2594 # Passes both tests.
2595ac_preproc_ok=:
2596break
2597fi
2598rm -f conftest.err conftest.$ac_ext
2599
2600done
2601# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2602rm -f conftest.err conftest.$ac_ext
2603if $ac_preproc_ok; then
2604 break
2605fi
2606
2607 done
2608 ac_cv_prog_CPP=$CPP
2609
2610fi
2611 CPP=$ac_cv_prog_CPP
2612else
2613 ac_cv_prog_CPP=$CPP
2614fi
2615echo "$as_me:$LINENO: result: $CPP" >&5
2616echo "${ECHO_T}$CPP" >&6
2617ac_preproc_ok=false
2618for ac_c_preproc_warn_flag in '' yes
2619do
2620 # Use a header file that comes with gcc, so configuring glibc
2621 # with a fresh cross-compiler works.
2622 # On the NeXT, cc -E runs the code through the compiler's parser,
2623 # not just through cpp. "Syntax error" is here to catch this case.
2624 cat >conftest.$ac_ext <<_ACEOF
2625#line $LINENO "configure"
2626#include "confdefs.h"
2627#include <assert.h>
2628 Syntax error
2629_ACEOF
2630if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2631 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2632 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002633 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002634 rm -f conftest.er1
2635 cat conftest.err >&5
2636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2637 (exit $ac_status); } >/dev/null; then
2638 if test -s conftest.err; then
2639 ac_cpp_err=$ac_c_preproc_warn_flag
2640 else
2641 ac_cpp_err=
2642 fi
2643else
2644 ac_cpp_err=yes
2645fi
2646if test -z "$ac_cpp_err"; then
2647 :
2648else
2649 echo "$as_me: failed program was:" >&5
2650 cat conftest.$ac_ext >&5
2651 # Broken: fails on valid input.
2652continue
2653fi
2654rm -f conftest.err conftest.$ac_ext
2655
2656 # OK, works on sane cases. Now check whether non-existent headers
2657 # can be detected and how.
2658 cat >conftest.$ac_ext <<_ACEOF
2659#line $LINENO "configure"
2660#include "confdefs.h"
2661#include <ac_nonexistent.h>
2662_ACEOF
2663if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2664 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2665 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002666 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002667 rm -f conftest.er1
2668 cat conftest.err >&5
2669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2670 (exit $ac_status); } >/dev/null; then
2671 if test -s conftest.err; then
2672 ac_cpp_err=$ac_c_preproc_warn_flag
2673 else
2674 ac_cpp_err=
2675 fi
2676else
2677 ac_cpp_err=yes
2678fi
2679if test -z "$ac_cpp_err"; then
2680 # Broken: success on invalid input.
2681continue
2682else
2683 echo "$as_me: failed program was:" >&5
2684 cat conftest.$ac_ext >&5
2685 # Passes both tests.
2686ac_preproc_ok=:
2687break
2688fi
2689rm -f conftest.err conftest.$ac_ext
2690
2691done
2692# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2693rm -f conftest.err conftest.$ac_ext
2694if $ac_preproc_ok; then
2695 :
2696else
2697 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2698echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2699 { (exit 1); exit 1; }; }
2700fi
2701
2702ac_ext=c
2703ac_cpp='$CPP $CPPFLAGS'
2704ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2705ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2706ac_compiler_gnu=$ac_cv_c_compiler_gnu
2707
2708
2709
2710echo "$as_me:$LINENO: checking for AIX" >&5
2711echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2712cat >conftest.$ac_ext <<_ACEOF
2713#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002714#include "confdefs.h"
2715#ifdef _AIX
2716 yes
2717#endif
2718
Martin v. Löwis11437992002-04-12 09:54:03 +00002719_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002720if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00002721 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002722 echo "$as_me:$LINENO: result: yes" >&5
2723echo "${ECHO_T}yes" >&6
2724cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002725#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002726_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002727
2728else
Martin v. Löwis11437992002-04-12 09:54:03 +00002729 echo "$as_me:$LINENO: result: no" >&5
2730echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002731fi
2732rm -f conftest*
2733
Michael W. Hudson54241132001-12-07 15:38:26 +00002734
Martin v. Löwis11437992002-04-12 09:54:03 +00002735echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2736echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2737if test "${ac_cv_header_stdc+set}" = set; then
2738 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002739else
Martin v. Löwis11437992002-04-12 09:54:03 +00002740 cat >conftest.$ac_ext <<_ACEOF
2741#line $LINENO "configure"
2742#include "confdefs.h"
2743#include <stdlib.h>
2744#include <stdarg.h>
2745#include <string.h>
2746#include <float.h>
2747
2748_ACEOF
2749if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2750 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2751 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002752 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002753 rm -f conftest.er1
2754 cat conftest.err >&5
2755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2756 (exit $ac_status); } >/dev/null; then
2757 if test -s conftest.err; then
2758 ac_cpp_err=$ac_c_preproc_warn_flag
2759 else
2760 ac_cpp_err=
2761 fi
2762else
2763 ac_cpp_err=yes
2764fi
2765if test -z "$ac_cpp_err"; then
2766 ac_cv_header_stdc=yes
2767else
2768 echo "$as_me: failed program was:" >&5
2769 cat conftest.$ac_ext >&5
2770 ac_cv_header_stdc=no
2771fi
2772rm -f conftest.err conftest.$ac_ext
2773
2774if test $ac_cv_header_stdc = yes; then
2775 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2776 cat >conftest.$ac_ext <<_ACEOF
2777#line $LINENO "configure"
2778#include "confdefs.h"
2779#include <string.h>
2780
2781_ACEOF
2782if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00002783 egrep "memchr" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002784 :
2785else
2786 ac_cv_header_stdc=no
2787fi
2788rm -f conftest*
2789
2790fi
2791
2792if test $ac_cv_header_stdc = yes; then
2793 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2794 cat >conftest.$ac_ext <<_ACEOF
2795#line $LINENO "configure"
2796#include "confdefs.h"
2797#include <stdlib.h>
2798
2799_ACEOF
2800if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00002801 egrep "free" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002802 :
2803else
2804 ac_cv_header_stdc=no
2805fi
2806rm -f conftest*
2807
2808fi
2809
2810if test $ac_cv_header_stdc = yes; then
2811 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2812 if test "$cross_compiling" = yes; then
2813 :
2814else
2815 cat >conftest.$ac_ext <<_ACEOF
2816#line $LINENO "configure"
2817#include "confdefs.h"
2818#include <ctype.h>
2819#if ((' ' & 0x0FF) == 0x020)
2820# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2821# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2822#else
2823# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2824 || ('j' <= (c) && (c) <= 'r') \
2825 || ('s' <= (c) && (c) <= 'z'))
2826# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2827#endif
2828
2829#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2830int
2831main ()
2832{
2833 int i;
2834 for (i = 0; i < 256; i++)
2835 if (XOR (islower (i), ISLOWER (i))
2836 || toupper (i) != TOUPPER (i))
2837 exit(2);
2838 exit (0);
2839}
2840_ACEOF
2841rm -f conftest$ac_exeext
2842if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2843 (eval $ac_link) 2>&5
2844 ac_status=$?
2845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2846 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2848 (eval $ac_try) 2>&5
2849 ac_status=$?
2850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2851 (exit $ac_status); }; }; then
2852 :
2853else
2854 echo "$as_me: program exited with status $ac_status" >&5
2855echo "$as_me: failed program was:" >&5
2856cat conftest.$ac_ext >&5
2857( exit $ac_status )
2858ac_cv_header_stdc=no
2859fi
Barry Warsawfe33b792003-01-07 22:42:49 +00002860rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002861fi
2862fi
2863fi
2864echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2865echo "${ECHO_T}$ac_cv_header_stdc" >&6
2866if test $ac_cv_header_stdc = yes; then
2867
2868cat >>confdefs.h <<\_ACEOF
2869#define STDC_HEADERS 1
2870_ACEOF
2871
2872fi
2873
2874# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2885 inttypes.h stdint.h unistd.h
2886do
2887as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2888echo "$as_me:$LINENO: checking for $ac_header" >&5
2889echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2890if eval "test \"\${$as_ac_Header+set}\" = set"; then
2891 echo $ECHO_N "(cached) $ECHO_C" >&6
2892else
2893 cat >conftest.$ac_ext <<_ACEOF
2894#line $LINENO "configure"
2895#include "confdefs.h"
2896$ac_includes_default
2897
2898#include <$ac_header>
2899_ACEOF
2900rm -f conftest.$ac_objext
2901if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2902 (eval $ac_compile) 2>&5
2903 ac_status=$?
2904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2905 (exit $ac_status); } &&
2906 { ac_try='test -s conftest.$ac_objext'
2907 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2908 (eval $ac_try) 2>&5
2909 ac_status=$?
2910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2911 (exit $ac_status); }; }; then
2912 eval "$as_ac_Header=yes"
2913else
2914 echo "$as_me: failed program was:" >&5
2915cat conftest.$ac_ext >&5
2916eval "$as_ac_Header=no"
2917fi
2918rm -f conftest.$ac_objext conftest.$ac_ext
2919fi
2920echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2921echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2922if test `eval echo '${'$as_ac_Header'}'` = yes; then
2923 cat >>confdefs.h <<_ACEOF
2924#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2925_ACEOF
2926
2927fi
2928
2929done
2930
2931
2932if test "${ac_cv_header_minix_config_h+set}" = set; then
2933 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2934echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2935if test "${ac_cv_header_minix_config_h+set}" = set; then
2936 echo $ECHO_N "(cached) $ECHO_C" >&6
2937fi
2938echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2939echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2940else
2941 # Is the header compilable?
2942echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2943echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2944cat >conftest.$ac_ext <<_ACEOF
2945#line $LINENO "configure"
2946#include "confdefs.h"
2947$ac_includes_default
2948#include <minix/config.h>
2949_ACEOF
2950rm -f conftest.$ac_objext
2951if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2952 (eval $ac_compile) 2>&5
2953 ac_status=$?
2954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2955 (exit $ac_status); } &&
2956 { ac_try='test -s conftest.$ac_objext'
2957 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2958 (eval $ac_try) 2>&5
2959 ac_status=$?
2960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2961 (exit $ac_status); }; }; then
2962 ac_header_compiler=yes
2963else
2964 echo "$as_me: failed program was:" >&5
2965cat conftest.$ac_ext >&5
2966ac_header_compiler=no
2967fi
2968rm -f conftest.$ac_objext conftest.$ac_ext
2969echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2970echo "${ECHO_T}$ac_header_compiler" >&6
2971
2972# Is the header present?
2973echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2974echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2975cat >conftest.$ac_ext <<_ACEOF
2976#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002977#include "confdefs.h"
2978#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002979_ACEOF
2980if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2981 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2982 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002983 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002984 rm -f conftest.er1
2985 cat conftest.err >&5
2986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2987 (exit $ac_status); } >/dev/null; then
2988 if test -s conftest.err; then
2989 ac_cpp_err=$ac_c_preproc_warn_flag
2990 else
2991 ac_cpp_err=
2992 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002993else
Martin v. Löwis11437992002-04-12 09:54:03 +00002994 ac_cpp_err=yes
2995fi
2996if test -z "$ac_cpp_err"; then
2997 ac_header_preproc=yes
2998else
2999 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003000 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003001 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003002fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003003rm -f conftest.err conftest.$ac_ext
3004echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3005echo "${ECHO_T}$ac_header_preproc" >&6
3006
3007# So? What about this header?
3008case $ac_header_compiler:$ac_header_preproc in
3009 yes:no )
3010 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
3011echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3012 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
3013echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
3014 no:yes )
3015 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
3016echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
3017 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
3018echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
3019 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
3020echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
3021esac
3022echo "$as_me:$LINENO: checking for minix/config.h" >&5
3023echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3024if test "${ac_cv_header_minix_config_h+set}" = set; then
3025 echo $ECHO_N "(cached) $ECHO_C" >&6
3026else
3027 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003028fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003029echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3030echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3031
3032fi
3033if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003034 MINIX=yes
3035else
Martin v. Löwis11437992002-04-12 09:54:03 +00003036 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003037fi
3038
Martin v. Löwis11437992002-04-12 09:54:03 +00003039
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003040if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003041
3042cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003043#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003044_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003045
Martin v. Löwis11437992002-04-12 09:54:03 +00003046
3047cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003048#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00003049_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003050
Martin v. Löwis11437992002-04-12 09:54:03 +00003051
3052cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003053#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003054_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003055
3056fi
3057
3058
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003059# Check for unsupported systems
3060case $ac_sys_system/$ac_sys_release in
3061SunOS/4*|DYNIX/*|dgux*/*|IRIX/4*|Linux*/1*)
3062 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3063 echo See README for details.
3064 exit 1;;
3065esac
3066
3067if test "$MINIX" = yes; then
3068 echo This system \(MINIX\) is no longer supported.
3069 echo Read README for details.
3070 exit 1
3071fi
3072
Michael W. Hudson54241132001-12-07 15:38:26 +00003073
Martin v. Löwis11437992002-04-12 09:54:03 +00003074echo "$as_me:$LINENO: checking for --with-suffix" >&5
3075echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003076
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003077# Check whether --with-suffix or --without-suffix was given.
3078if test "${with_suffix+set}" = set; then
3079 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003080
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003081 case $withval in
3082 no) EXEEXT=;;
3083 yes) EXEEXT=.exe;;
3084 *) EXEEXT=$withval;;
3085 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003086fi;
3087echo "$as_me:$LINENO: result: $EXEEXT" >&5
3088echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003089
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003090# Test whether we're running on a non-case-sensitive system, in which
3091# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003092
Martin v. Löwis11437992002-04-12 09:54:03 +00003093echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3094echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003095if test ! -d CaseSensitiveTestDir; then
3096mkdir CaseSensitiveTestDir
3097fi
3098
3099if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003100then
Martin v. Löwis11437992002-04-12 09:54:03 +00003101 echo "$as_me:$LINENO: result: yes" >&5
3102echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003103 BUILDEXEEXT=.exe
3104else
Martin v. Löwis11437992002-04-12 09:54:03 +00003105 echo "$as_me:$LINENO: result: no" >&5
3106echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003107 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003108fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003109rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003110
Guido van Rossumdd997f71998-10-07 19:58:26 +00003111case $MACHDEP in
3112bsdos*)
3113 case $CC in
3114 gcc) CC="$CC -D_HAVE_BSDI";;
3115 esac;;
3116esac
3117
Guido van Rossum24b1e751997-08-21 02:29:16 +00003118case $ac_sys_system in
3119hp*|HP*)
3120 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003121 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003122 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003123Monterey*)
3124 case $CC in
3125 cc) CC="$CC -Wl,-Bexport";;
3126 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003127SunOS*)
3128 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003129
3130cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003131#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003132_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003133
3134 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003135esac
3136
Michael W. Hudson54241132001-12-07 15:38:26 +00003137
3138
Martin v. Löwis11437992002-04-12 09:54:03 +00003139echo "$as_me:$LINENO: checking LIBRARY" >&5
3140echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003141if test -z "$LIBRARY"
3142then
3143 LIBRARY='libpython$(VERSION).a'
3144fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003145echo "$as_me:$LINENO: result: $LIBRARY" >&5
3146echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003147
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003148# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003149# name of the library into which to insert object files). BLDLIBRARY is also
3150# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3151# is blank as the main program is not linked directly against LDLIBRARY.
3152# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3153# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3154# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3155# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003156#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003157# RUNSHARED is used to run shared python without installed libraries
3158#
3159# INSTSONAME is the name of the shared library that will be use to install
3160# on the system - some systems like version suffix, others don't
3161
3162
Michael W. Hudson54241132001-12-07 15:38:26 +00003163
3164
3165
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003166
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003167LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003168BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003169INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003170DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003171LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003172RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003173
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003174# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003175# If CXX is set, and if it is needed to link a main function that was
3176# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3177# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003178# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003179# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003180
Martin v. Löwis11437992002-04-12 09:54:03 +00003181echo "$as_me:$LINENO: checking LINKCC" >&5
3182echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003183if test -z "$LINKCC"
3184then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003185 if test -z "$CXX"; then
3186 LINKCC="\$(PURIFY) \$(CC)"
3187 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003188 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003189 $CXX -c conftest.$ac_ext 2>&5
3190 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3191 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3192 then
3193 LINKCC="\$(PURIFY) \$(CC)"
3194 else
3195 LINKCC="\$(PURIFY) \$(CXX)"
3196 fi
3197 rm -fr conftest*
3198 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003199 case $ac_sys_system in
3200 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003201 exp_extra="\"\""
3202 if test $ac_sys_release -ge 5 -o \
3203 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3204 exp_extra="."
3205 fi
3206 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003207 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003208 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003209 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003210 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003211 esac
3212fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003213echo "$as_me:$LINENO: result: $LINKCC" >&5
3214echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003215
Martin v. Löwis11437992002-04-12 09:54:03 +00003216echo "$as_me:$LINENO: checking for --enable-shared" >&5
3217echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003218# Check whether --enable-shared or --disable-shared was given.
3219if test "${enable_shared+set}" = set; then
3220 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003221
Martin v. Löwis11437992002-04-12 09:54:03 +00003222fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003223
3224if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003225then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003226 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003227 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003228 enable_shared="yes";;
3229 *)
3230 enable_shared="no";;
3231 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003232fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003233echo "$as_me:$LINENO: result: $enable_shared" >&5
3234echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003235
3236
Martin v. Löwis11437992002-04-12 09:54:03 +00003237echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3238echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003239
Guido van Rossumb8552162001-09-05 14:58:11 +00003240# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3241# library that we build, but we do not want to link against it (we
3242# will find it with a -framework option). For this reason there is an
3243# extra variable BLDLIBRARY against which Python and the extension
3244# modules are linked, BLDLIBRARY. This is normally the same as
3245# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003246if test "$enable_framework"
3247then
3248 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3249 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3250 BLDLIBRARY=''
3251else
3252 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003253fi
Jack Jansene578a632001-08-15 01:27:14 +00003254
Martin v. Löwis1142de32002-03-29 16:28:31 +00003255# Other platforms follow
3256if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003257
3258cat >>confdefs.h <<\_ACEOF
3259#define Py_ENABLE_SHARED 1
3260_ACEOF
3261
Martin v. Löwis1142de32002-03-29 16:28:31 +00003262 case $ac_sys_system in
3263 BeOS*)
3264 LDLIBRARY='libpython$(VERSION).so'
3265 ;;
3266 CYGWIN*)
3267 LDLIBRARY='libpython$(VERSION).dll.a'
3268 DLLLIBRARY='libpython$(VERSION).dll'
3269 ;;
3270 SunOS*)
3271 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00003272 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwis1142de32002-03-29 16:28:31 +00003273 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3274 ;;
Martin v. Löwis96ce8052003-05-31 07:58:45 +00003275 Linux*|GNU*|NetBSD*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003276 LDLIBRARY='libpython$(VERSION).so'
3277 BLDLIBRARY='-L. -lpython$(VERSION)'
3278 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3279 INSTSONAME="$LDLIBRARY".$SOVERSION
3280 ;;
3281 hp*|HP*)
3282 LDLIBRARY='libpython$(VERSION).sl'
3283 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3284 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3285 ;;
3286 OSF*)
3287 LDLIBRARY='libpython$(VERSION).so'
3288 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3289 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3290 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003291 atheos*)
3292 LDLIBRARY='libpython$(VERSION).so'
3293 BLDLIBRARY='-L. -lpython$(VERSION)'
3294 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3295 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003296 esac
3297 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3298 case $MACHDEP in
3299 dguxR4)
3300 LDLIBRARY='libpython$(VERSION).so'
Skip Montanarodecc6a42003-01-01 20:07:49 +00003301 BASECFLAGS="$BASECFLAGS -pic"
Martin v. Löwis1142de32002-03-29 16:28:31 +00003302 ;;
3303 esac
3304fi
3305
Martin v. Löwis11437992002-04-12 09:54:03 +00003306echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3307echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003308
Martin v. Löwis11437992002-04-12 09:54:03 +00003309if test -n "$ac_tool_prefix"; then
3310 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3311set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3312echo "$as_me:$LINENO: checking for $ac_word" >&5
3313echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3314if test "${ac_cv_prog_RANLIB+set}" = set; then
3315 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003316else
3317 if test -n "$RANLIB"; then
3318 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3319else
Martin v. Löwis11437992002-04-12 09:54:03 +00003320as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3321for as_dir in $PATH
3322do
3323 IFS=$as_save_IFS
3324 test -z "$as_dir" && as_dir=.
3325 for ac_exec_ext in '' $ac_executable_extensions; do
3326 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3327 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3328 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3329 break 2
3330 fi
3331done
3332done
3333
Guido van Rossum627b2d71993-12-24 10:39:16 +00003334fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003335fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003336RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003337if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003338 echo "$as_me:$LINENO: result: $RANLIB" >&5
3339echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003340else
Martin v. Löwis11437992002-04-12 09:54:03 +00003341 echo "$as_me:$LINENO: result: no" >&5
3342echo "${ECHO_T}no" >&6
3343fi
3344
3345fi
3346if test -z "$ac_cv_prog_RANLIB"; then
3347 ac_ct_RANLIB=$RANLIB
3348 # Extract the first word of "ranlib", so it can be a program name with args.
3349set dummy ranlib; ac_word=$2
3350echo "$as_me:$LINENO: checking for $ac_word" >&5
3351echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3352if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3353 echo $ECHO_N "(cached) $ECHO_C" >&6
3354else
3355 if test -n "$ac_ct_RANLIB"; then
3356 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3357else
3358as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3359for as_dir in $PATH
3360do
3361 IFS=$as_save_IFS
3362 test -z "$as_dir" && as_dir=.
3363 for ac_exec_ext in '' $ac_executable_extensions; do
3364 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3365 ac_cv_prog_ac_ct_RANLIB="ranlib"
3366 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3367 break 2
3368 fi
3369done
3370done
3371
3372 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3373fi
3374fi
3375ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3376if test -n "$ac_ct_RANLIB"; then
3377 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3378echo "${ECHO_T}$ac_ct_RANLIB" >&6
3379else
3380 echo "$as_me:$LINENO: result: no" >&5
3381echo "${ECHO_T}no" >&6
3382fi
3383
3384 RANLIB=$ac_ct_RANLIB
3385else
3386 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003387fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003388
3389
Guido van Rossum7f43da71994-08-01 12:15:30 +00003390for ac_prog in ar aal
3391do
Martin v. Löwis11437992002-04-12 09:54:03 +00003392 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003393set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003394echo "$as_me:$LINENO: checking for $ac_word" >&5
3395echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3396if test "${ac_cv_prog_AR+set}" = set; then
3397 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003398else
3399 if test -n "$AR"; then
3400 ac_cv_prog_AR="$AR" # Let the user override the test.
3401else
Martin v. Löwis11437992002-04-12 09:54:03 +00003402as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3403for as_dir in $PATH
3404do
3405 IFS=$as_save_IFS
3406 test -z "$as_dir" && as_dir=.
3407 for ac_exec_ext in '' $ac_executable_extensions; do
3408 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3409 ac_cv_prog_AR="$ac_prog"
3410 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3411 break 2
3412 fi
3413done
3414done
3415
Guido van Rossum7f43da71994-08-01 12:15:30 +00003416fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003417fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003418AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003419if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003420 echo "$as_me:$LINENO: result: $AR" >&5
3421echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003422else
Martin v. Löwis11437992002-04-12 09:54:03 +00003423 echo "$as_me:$LINENO: result: no" >&5
3424echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003425fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003426
Martin v. Löwis11437992002-04-12 09:54:03 +00003427 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003428done
3429test -n "$AR" || AR="ar"
3430
Michael W. Hudson54241132001-12-07 15:38:26 +00003431
Neil Schemenauera42c8272001-03-31 00:01:55 +00003432case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003433bsdos*|hp*|HP*)
3434 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003435 if test -z "$INSTALL"
3436 then
3437 INSTALL="${srcdir}/install-sh -c"
3438 fi
3439esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003440ac_aux_dir=
3441for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3442 if 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
3446 elif test -f $ac_dir/install.sh; then
3447 ac_aux_dir=$ac_dir
3448 ac_install_sh="$ac_aux_dir/install.sh -c"
3449 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003450 elif test -f $ac_dir/shtool; then
3451 ac_aux_dir=$ac_dir
3452 ac_install_sh="$ac_aux_dir/shtool install -c"
3453 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003454 fi
3455done
3456if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003457 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3458echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3459 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003460fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003461ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3462ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3463ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003464
3465# Find a good install program. We prefer a C program (faster),
3466# so one script is as good as another. But avoid the broken or
3467# incompatible versions:
3468# SysV /etc/install, /usr/sbin/install
3469# SunOS /usr/etc/install
3470# IRIX /sbin/install
3471# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003472# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003473# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3474# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3475# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3476# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003477echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3478echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003479if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003480if test "${ac_cv_path_install+set}" = set; then
3481 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003482else
Martin v. Löwis11437992002-04-12 09:54:03 +00003483 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3484for as_dir in $PATH
3485do
3486 IFS=$as_save_IFS
3487 test -z "$as_dir" && as_dir=.
3488 # Account for people who put trailing slashes in PATH elements.
3489case $as_dir/ in
3490 ./ | .// | /cC/* | \
3491 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3492 /usr/ucb/* ) ;;
3493 *)
3494 # OSF1 and SCO ODT 3.0 have their own names for install.
3495 # Don't use installbsd from OSF since it installs stuff as root
3496 # by default.
3497 for ac_prog in ginstall scoinst install; do
3498 for ac_exec_ext in '' $ac_executable_extensions; do
3499 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3500 if test $ac_prog = install &&
3501 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3502 # AIX install. It has an incompatible calling convention.
3503 :
3504 elif test $ac_prog = install &&
3505 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3506 # program-specific install script used by HP pwplus--don't use.
3507 :
3508 else
3509 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3510 break 3
3511 fi
3512 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003513 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003514 done
3515 ;;
3516esac
3517done
3518
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003519
3520fi
3521 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003522 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003523 else
3524 # As a last resort, use the slow shell script. We don't cache a
3525 # path for INSTALL within a source directory, because that will
3526 # break other packages using the cache if that directory is
3527 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003528 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003529 fi
3530fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003531echo "$as_me:$LINENO: result: $INSTALL" >&5
3532echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003533
3534# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3535# It thinks the first close brace ends the variable substitution.
3536test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3537
Martin v. Löwis11437992002-04-12 09:54:03 +00003538test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003539
3540test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3541
Michael W. Hudson54241132001-12-07 15:38:26 +00003542
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003543# Not every filesystem supports hard links
3544
3545if test -z "$LN" ; then
3546 case $ac_sys_system in
3547 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003548 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003549 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003550 *) LN=ln;;
3551 esac
3552fi
3553
Fred Drake109d9862001-07-11 06:27:56 +00003554# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003555echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3556echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3557
Fred Drake109d9862001-07-11 06:27:56 +00003558# Check whether --with-pydebug or --without-pydebug was given.
3559if test "${with_pydebug+set}" = set; then
3560 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003561
Fred Drake109d9862001-07-11 06:27:56 +00003562if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003563then
3564
3565cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003566#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003567_ACEOF
3568
3569 echo "$as_me:$LINENO: result: yes" >&5
3570echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003571 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003572else echo "$as_me:$LINENO: result: no" >&5
3573echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003574fi
3575else
Martin v. Löwis11437992002-04-12 09:54:03 +00003576 echo "$as_me:$LINENO: result: no" >&5
3577echo "${ECHO_T}no" >&6
3578fi;
Fred Drake109d9862001-07-11 06:27:56 +00003579
Skip Montanarodecc6a42003-01-01 20:07:49 +00003580# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3581# merged with this chunk of code?
3582
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003583# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003584# ------------------------
3585# (The following bit of code is complicated enough - please keep things
3586# indented properly. Just pretend you're editing Python code. ;-)
3587
3588# There are two parallel sets of case statements below, one that checks to
3589# see if OPT was set and one that does BASECFLAGS setting based upon
3590# compiler and platform. BASECFLAGS tweaks need to be made even if the
3591# user set OPT.
3592
3593# tweak OPT based on compiler and platform, only if the user didn't set
3594# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003595
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003596if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003597then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003598 case $GCC in
3599 yes)
3600 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003601 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003602 if test "$Py_DEBUG" = 'true' ; then
3603 # Optimization messes up debuggers, so turn it off for
3604 # debug builds.
3605 OPT="-g -Wall -Wstrict-prototypes"
3606 else
3607 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003608 fi
3609 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003610 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003611 OPT="-O3 -Wall -Wstrict-prototypes"
3612 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003613 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003614 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003615 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3616 ;;
3617 esac
Fred Drake109d9862001-07-11 06:27:56 +00003618 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003619
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003620 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003621 OPT="-O"
3622 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003623 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003624
3625 # The current (beta) Monterey compiler dies with optimizations
3626 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003627 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003628 Monterey*)
3629 OPT=""
3630 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003631 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003632
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003633fi
3634
Skip Montanarodecc6a42003-01-01 20:07:49 +00003635
3636# tweak BASECFLAGS based on compiler and platform
3637case $GCC in
3638yes)
3639 case $ac_sys_system in
3640 SCO_SV*)
3641 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3642 ;;
3643 # is there any other compiler on Darwin besides gcc?
3644 Darwin*)
3645 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp"
3646 ;;
3647 esac
3648 ;;
3649
3650*)
3651 case $ac_sys_system in
3652 OpenUNIX*|UnixWare*)
3653 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3654 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00003655 OSF*)
3656 BASECFLAGS="$BASECFLAGS -ieee -std"
3657 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003658 SCO_SV*)
3659 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3660 ;;
3661 esac
3662 ;;
3663esac
3664
Fred Drakee1ceaa02001-12-04 20:55:47 +00003665if test "$Py_DEBUG" = 'true'; then
3666 :
3667else
3668 OPT="-DNDEBUG $OPT"
3669fi
3670
Guido van Rossum563e7081996-09-10 18:20:48 +00003671if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003672then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003673 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003674fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003675
Martin v. Löwis11437992002-04-12 09:54:03 +00003676echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3677echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3678if test "${ac_cv_opt_olimit_ok+set}" = set; then
3679 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003680else
3681 ac_save_cc="$CC"
3682CC="$CC -OPT:Olimit=0"
3683if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003684 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003685else
Martin v. Löwis11437992002-04-12 09:54:03 +00003686 cat >conftest.$ac_ext <<_ACEOF
3687#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003688#include "confdefs.h"
3689int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003690_ACEOF
3691rm -f conftest$ac_exeext
3692if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3693 (eval $ac_link) 2>&5
3694 ac_status=$?
3695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3696 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3698 (eval $ac_try) 2>&5
3699 ac_status=$?
3700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3701 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003702 ac_cv_opt_olimit_ok=yes
3703else
Martin v. Löwis11437992002-04-12 09:54:03 +00003704 echo "$as_me: program exited with status $ac_status" >&5
3705echo "$as_me: failed program was:" >&5
3706cat conftest.$ac_ext >&5
3707( exit $ac_status )
3708ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003709fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003710rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003711fi
Guido van Rossum91922671997-10-09 20:24:13 +00003712CC="$ac_save_cc"
3713fi
3714
Martin v. Löwis11437992002-04-12 09:54:03 +00003715echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3716echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003717if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003718 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003719 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3720 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3721 # environment?
3722 Darwin*)
3723 ;;
3724 *)
3725 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3726 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003727 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003728else
Martin v. Löwis11437992002-04-12 09:54:03 +00003729 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3730echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3731 if test "${ac_cv_olimit_ok+set}" = set; then
3732 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003733else
3734 ac_save_cc="$CC"
3735 CC="$CC -Olimit 1500"
3736 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003737 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003738else
Martin v. Löwis11437992002-04-12 09:54:03 +00003739 cat >conftest.$ac_ext <<_ACEOF
3740#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003741#include "confdefs.h"
3742int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003743_ACEOF
3744rm -f conftest$ac_exeext
3745if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3746 (eval $ac_link) 2>&5
3747 ac_status=$?
3748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3749 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3751 (eval $ac_try) 2>&5
3752 ac_status=$?
3753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3754 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003755 ac_cv_olimit_ok=yes
3756else
Martin v. Löwis11437992002-04-12 09:54:03 +00003757 echo "$as_me: program exited with status $ac_status" >&5
3758echo "$as_me: failed program was:" >&5
3759cat conftest.$ac_ext >&5
3760( exit $ac_status )
3761ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003762fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003763rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003764fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003765 CC="$ac_save_cc"
3766fi
3767
Martin v. Löwis11437992002-04-12 09:54:03 +00003768 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3769echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003770 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003771 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003772 fi
3773fi
3774
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003775# On some compilers, pthreads are available without further options
3776# (e.g. MacOS X). On some of these systems, the compiler will not
3777# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3778# So we have to see first whether pthreads are available without
3779# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003780echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3781echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3782if test "${ac_cv_pthread_is_default+set}" = set; then
3783 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003784else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003785 if test "$cross_compiling" = yes; then
3786 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003787else
Martin v. Löwis11437992002-04-12 09:54:03 +00003788 cat >conftest.$ac_ext <<_ACEOF
3789#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003790#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003791
Martin v. Löwis130fb172001-07-19 11:00:41 +00003792#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003793
3794void* routine(void* p){return NULL;}
3795
3796int main(){
3797 pthread_t p;
3798 if(pthread_create(&p,NULL,routine,NULL)!=0)
3799 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003800 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003801 return 0;
3802}
3803
Martin v. Löwis11437992002-04-12 09:54:03 +00003804_ACEOF
3805rm -f conftest$ac_exeext
3806if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3807 (eval $ac_link) 2>&5
3808 ac_status=$?
3809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3810 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3812 (eval $ac_try) 2>&5
3813 ac_status=$?
3814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3815 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003816 ac_cv_pthread_is_default=yes
3817else
Martin v. Löwis11437992002-04-12 09:54:03 +00003818 echo "$as_me: program exited with status $ac_status" >&5
3819echo "$as_me: failed program was:" >&5
3820cat conftest.$ac_ext >&5
3821( exit $ac_status )
3822ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003823fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003824rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003825fi
3826
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003827fi
3828
Martin v. Löwis11437992002-04-12 09:54:03 +00003829echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3830echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003831
Michael W. Hudson54241132001-12-07 15:38:26 +00003832
Martin v. Löwis11437992002-04-12 09:54:03 +00003833if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003834then
3835 ac_cv_kpthread=no
3836else
3837# -Kpthread, if available, provides the right #defines
3838# and linker options to make pthread_create available
3839# Some compilers won't report that they do not support -Kpthread,
3840# so we need to run a program to see whether it really made the
3841# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003842echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3843echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3844if test "${ac_cv_kpthread+set}" = set; then
3845 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003846else
3847 ac_save_cc="$CC"
3848CC="$CC -Kpthread"
3849if test "$cross_compiling" = yes; then
3850 ac_cv_kpthread=no
3851else
Martin v. Löwis11437992002-04-12 09:54:03 +00003852 cat >conftest.$ac_ext <<_ACEOF
3853#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003854#include "confdefs.h"
3855
3856#include <pthread.h>
3857
3858void* routine(void* p){return NULL;}
3859
3860int main(){
3861 pthread_t p;
3862 if(pthread_create(&p,NULL,routine,NULL)!=0)
3863 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003864 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003865 return 0;
3866}
3867
Martin v. Löwis11437992002-04-12 09:54:03 +00003868_ACEOF
3869rm -f conftest$ac_exeext
3870if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3871 (eval $ac_link) 2>&5
3872 ac_status=$?
3873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3874 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3875 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3876 (eval $ac_try) 2>&5
3877 ac_status=$?
3878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3879 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003880 ac_cv_kpthread=yes
3881else
Martin v. Löwis11437992002-04-12 09:54:03 +00003882 echo "$as_me: program exited with status $ac_status" >&5
3883echo "$as_me: failed program was:" >&5
3884cat conftest.$ac_ext >&5
3885( exit $ac_status )
3886ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003887fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003888rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003889fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003890CC="$ac_save_cc"
3891fi
3892
Martin v. Löwis11437992002-04-12 09:54:03 +00003893echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3894echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003895fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003896
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003897if test $ac_cv_kpthread = no
3898then
3899# -Kthread, if available, provides the right #defines
3900# and linker options to make pthread_create available
3901# Some compilers won't report that they do not support -Kthread,
3902# so we need to run a program to see whether it really made the
3903# function available.
3904echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
3905echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
3906if test "${ac_cv_kthread+set}" = set; then
3907 echo $ECHO_N "(cached) $ECHO_C" >&6
3908else
3909 ac_save_cc="$CC"
3910CC="$CC -Kthread"
3911if test "$cross_compiling" = yes; then
3912 ac_cv_kthread=no
3913else
3914 cat >conftest.$ac_ext <<_ACEOF
3915#line $LINENO "configure"
3916#include "confdefs.h"
3917
3918#include <pthread.h>
3919
3920void* routine(void* p){return NULL;}
3921
3922int main(){
3923 pthread_t p;
3924 if(pthread_create(&p,NULL,routine,NULL)!=0)
3925 return 1;
3926 (void)pthread_detach(p);
3927 return 0;
3928}
3929
3930_ACEOF
3931rm -f conftest$ac_exeext
3932if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3933 (eval $ac_link) 2>&5
3934 ac_status=$?
3935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3936 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3937 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3938 (eval $ac_try) 2>&5
3939 ac_status=$?
3940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3941 (exit $ac_status); }; }; then
3942 ac_cv_kthread=yes
3943else
3944 echo "$as_me: program exited with status $ac_status" >&5
3945echo "$as_me: failed program was:" >&5
3946cat conftest.$ac_ext >&5
3947( exit $ac_status )
3948ac_cv_kthread=no
3949fi
3950rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3951fi
3952CC="$ac_save_cc"
3953fi
3954
3955echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
3956echo "${ECHO_T}$ac_cv_kthread" >&6
3957fi
3958
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00003959if test $ac_cv_kthread = no
3960then
3961# -pthread, if available, provides the right #defines
3962# and linker options to make pthread_create available
3963# Some compilers won't report that they do not support -pthread,
3964# so we need to run a program to see whether it really made the
3965# function available.
3966echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
3967echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
3968if test "${ac_cv_thread+set}" = set; then
3969 echo $ECHO_N "(cached) $ECHO_C" >&6
3970else
3971 ac_save_cc="$CC"
3972CC="$CC -pthread"
3973if test "$cross_compiling" = yes; then
3974 ac_cv_pthread=no
3975else
3976 cat >conftest.$ac_ext <<_ACEOF
3977#line $LINENO "configure"
3978#include "confdefs.h"
3979
3980#include <pthread.h>
3981
3982void* routine(void* p){return NULL;}
3983
3984int main(){
3985 pthread_t p;
3986 if(pthread_create(&p,NULL,routine,NULL)!=0)
3987 return 1;
3988 (void)pthread_detach(p);
3989 return 0;
3990}
3991
3992_ACEOF
3993rm -f conftest$ac_exeext
3994if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3995 (eval $ac_link) 2>&5
3996 ac_status=$?
3997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3998 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3999 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4000 (eval $ac_try) 2>&5
4001 ac_status=$?
4002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4003 (exit $ac_status); }; }; then
4004 ac_cv_pthread=yes
4005else
4006 echo "$as_me: program exited with status $ac_status" >&5
4007echo "$as_me: failed program was:" >&5
4008cat conftest.$ac_ext >&5
4009( exit $ac_status )
4010ac_cv_pthread=no
4011fi
4012rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4013fi
4014CC="$ac_save_cc"
4015fi
4016
4017echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4018echo "${ECHO_T}$ac_cv_pthread" >&6
4019fi
4020
Michael W. Hudson54241132001-12-07 15:38:26 +00004021
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004022# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00004023echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4024echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4025if test "${ac_cv_header_stdc+set}" = set; then
4026 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004027else
Martin v. Löwis11437992002-04-12 09:54:03 +00004028 cat >conftest.$ac_ext <<_ACEOF
4029#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004030#include "confdefs.h"
4031#include <stdlib.h>
4032#include <stdarg.h>
4033#include <string.h>
4034#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004035
4036_ACEOF
4037if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4038 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4039 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004040 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004041 rm -f conftest.er1
4042 cat conftest.err >&5
4043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4044 (exit $ac_status); } >/dev/null; then
4045 if test -s conftest.err; then
4046 ac_cpp_err=$ac_c_preproc_warn_flag
4047 else
4048 ac_cpp_err=
4049 fi
4050else
4051 ac_cpp_err=yes
4052fi
4053if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004054 ac_cv_header_stdc=yes
4055else
Martin v. Löwis11437992002-04-12 09:54:03 +00004056 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00004057 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004058 ac_cv_header_stdc=no
4059fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004060rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004061
4062if test $ac_cv_header_stdc = yes; then
4063 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004064 cat >conftest.$ac_ext <<_ACEOF
4065#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004066#include "confdefs.h"
4067#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004068
4069_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004070if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00004071 egrep "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004072 :
4073else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004074 ac_cv_header_stdc=no
4075fi
4076rm -f conftest*
4077
4078fi
4079
4080if test $ac_cv_header_stdc = yes; then
4081 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004082 cat >conftest.$ac_ext <<_ACEOF
4083#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004084#include "confdefs.h"
4085#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004086
4087_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004088if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00004089 egrep "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004090 :
4091else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004092 ac_cv_header_stdc=no
4093fi
4094rm -f conftest*
4095
4096fi
4097
4098if test $ac_cv_header_stdc = yes; then
4099 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004100 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004101 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004102else
Martin v. Löwis11437992002-04-12 09:54:03 +00004103 cat >conftest.$ac_ext <<_ACEOF
4104#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004105#include "confdefs.h"
4106#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004107#if ((' ' & 0x0FF) == 0x020)
4108# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4109# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4110#else
4111# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4112 || ('j' <= (c) && (c) <= 'r') \
4113 || ('s' <= (c) && (c) <= 'z'))
4114# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4115#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004116
Martin v. Löwis11437992002-04-12 09:54:03 +00004117#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4118int
4119main ()
4120{
4121 int i;
4122 for (i = 0; i < 256; i++)
4123 if (XOR (islower (i), ISLOWER (i))
4124 || toupper (i) != TOUPPER (i))
4125 exit(2);
4126 exit (0);
4127}
4128_ACEOF
4129rm -f conftest$ac_exeext
4130if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4131 (eval $ac_link) 2>&5
4132 ac_status=$?
4133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4134 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4136 (eval $ac_try) 2>&5
4137 ac_status=$?
4138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4139 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004140 :
4141else
Martin v. Löwis11437992002-04-12 09:54:03 +00004142 echo "$as_me: program exited with status $ac_status" >&5
4143echo "$as_me: failed program was:" >&5
4144cat conftest.$ac_ext >&5
4145( exit $ac_status )
4146ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004147fi
Barry Warsawfe33b792003-01-07 22:42:49 +00004148rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004149fi
4150fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004151fi
4152echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4153echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004154if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004155
4156cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004157#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004158_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004159
4160fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004161
Martin v. Löwis11437992002-04-12 09:54:03 +00004162
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
4195
4196
4197
4198
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004199
Barry Warsawfe33b792003-01-07 22:42:49 +00004200
Neal Norwitz82251032003-05-23 14:35:24 +00004201
Martin v. Löwis11437992002-04-12 09:54:03 +00004202for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004203libintl.h locale.h ncurses.h poll.h pthread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004204signal.h stdarg.h stddef.h stdlib.h stropts.h termios.h thread.h \
4205unistd.h utime.h \
Neal Norwitz82251032003-05-23 14:35:24 +00004206sys/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 +00004207sys/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 +00004208sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Barry Warsawfe33b792003-01-07 22:42:49 +00004209sys/resource.h netpacket/packet.h sysexits.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004210do
Martin v. Löwis11437992002-04-12 09:54:03 +00004211as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4212if eval "test \"\${$as_ac_Header+set}\" = set"; then
4213 echo "$as_me:$LINENO: checking for $ac_header" >&5
4214echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4215if eval "test \"\${$as_ac_Header+set}\" = set"; then
4216 echo $ECHO_N "(cached) $ECHO_C" >&6
4217fi
4218echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4219echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004220else
Martin v. Löwis11437992002-04-12 09:54:03 +00004221 # Is the header compilable?
4222echo "$as_me:$LINENO: checking $ac_header usability" >&5
4223echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4224cat >conftest.$ac_ext <<_ACEOF
4225#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004226#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004227$ac_includes_default
4228#include <$ac_header>
4229_ACEOF
4230rm -f conftest.$ac_objext
4231if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4232 (eval $ac_compile) 2>&5
4233 ac_status=$?
4234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4235 (exit $ac_status); } &&
4236 { ac_try='test -s conftest.$ac_objext'
4237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4238 (eval $ac_try) 2>&5
4239 ac_status=$?
4240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4241 (exit $ac_status); }; }; then
4242 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004243else
Martin v. Löwis11437992002-04-12 09:54:03 +00004244 echo "$as_me: failed program was:" >&5
4245cat conftest.$ac_ext >&5
4246ac_header_compiler=no
4247fi
4248rm -f conftest.$ac_objext conftest.$ac_ext
4249echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4250echo "${ECHO_T}$ac_header_compiler" >&6
4251
4252# Is the header present?
4253echo "$as_me:$LINENO: checking $ac_header presence" >&5
4254echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4255cat >conftest.$ac_ext <<_ACEOF
4256#line $LINENO "configure"
4257#include "confdefs.h"
4258#include <$ac_header>
4259_ACEOF
4260if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4261 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4262 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004263 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004264 rm -f conftest.er1
4265 cat conftest.err >&5
4266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4267 (exit $ac_status); } >/dev/null; then
4268 if test -s conftest.err; then
4269 ac_cpp_err=$ac_c_preproc_warn_flag
4270 else
4271 ac_cpp_err=
4272 fi
4273else
4274 ac_cpp_err=yes
4275fi
4276if test -z "$ac_cpp_err"; then
4277 ac_header_preproc=yes
4278else
4279 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004280 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004281 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004282fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004283rm -f conftest.err conftest.$ac_ext
4284echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4285echo "${ECHO_T}$ac_header_preproc" >&6
4286
4287# So? What about this header?
4288case $ac_header_compiler:$ac_header_preproc in
4289 yes:no )
4290 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4291echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4292 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4293echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4294 no:yes )
4295 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4296echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4297 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4298echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4299 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4300echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4301esac
4302echo "$as_me:$LINENO: checking for $ac_header" >&5
4303echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4304if eval "test \"\${$as_ac_Header+set}\" = set"; then
4305 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004306else
Martin v. Löwis11437992002-04-12 09:54:03 +00004307 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004308fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004309echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4310echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4311
4312fi
4313if test `eval echo '${'$as_ac_Header'}'` = yes; then
4314 cat >>confdefs.h <<_ACEOF
4315#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4316_ACEOF
4317
4318fi
4319
Guido van Rossum627b2d71993-12-24 10:39:16 +00004320done
4321
Martin v. Löwis11437992002-04-12 09:54:03 +00004322
4323
4324
4325
4326
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004327ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004328for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4329 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4330echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4331echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4332if eval "test \"\${$as_ac_Header+set}\" = set"; then
4333 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004334else
Martin v. Löwis11437992002-04-12 09:54:03 +00004335 cat >conftest.$ac_ext <<_ACEOF
4336#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004337#include "confdefs.h"
4338#include <sys/types.h>
4339#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004340
Barry Warsawfe33b792003-01-07 22:42:49 +00004341#ifdef F77_DUMMY_MAIN
4342# ifdef __cplusplus
4343 extern "C"
4344# endif
4345 int F77_DUMMY_MAIN() { return 1; }
4346#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004347int
4348main ()
4349{
4350if ((DIR *) 0)
4351return 0;
4352 ;
4353 return 0;
4354}
4355_ACEOF
4356rm -f conftest.$ac_objext
4357if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4358 (eval $ac_compile) 2>&5
4359 ac_status=$?
4360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4361 (exit $ac_status); } &&
4362 { ac_try='test -s conftest.$ac_objext'
4363 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4364 (eval $ac_try) 2>&5
4365 ac_status=$?
4366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4367 (exit $ac_status); }; }; then
4368 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004369else
Martin v. Löwis11437992002-04-12 09:54:03 +00004370 echo "$as_me: failed program was:" >&5
4371cat conftest.$ac_ext >&5
4372eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004373fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004374rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004375fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004376echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4377echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4378if test `eval echo '${'$as_ac_Header'}'` = yes; then
4379 cat >>confdefs.h <<_ACEOF
4380#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4381_ACEOF
4382
4383ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004384fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004385
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004386done
4387# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4388if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004389 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4390echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4391if test "${ac_cv_search_opendir+set}" = set; then
4392 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004393else
Martin v. Löwis11437992002-04-12 09:54:03 +00004394 ac_func_search_save_LIBS=$LIBS
4395ac_cv_search_opendir=no
4396cat >conftest.$ac_ext <<_ACEOF
4397#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004398#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004399
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004400/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004401#ifdef __cplusplus
4402extern "C"
4403#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004404/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004405 builtin and then its argument prototype would still apply. */
4406char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004407#ifdef F77_DUMMY_MAIN
4408# ifdef __cplusplus
4409 extern "C"
4410# endif
4411 int F77_DUMMY_MAIN() { return 1; }
4412#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004413int
4414main ()
4415{
4416opendir ();
4417 ;
4418 return 0;
4419}
4420_ACEOF
4421rm -f conftest.$ac_objext conftest$ac_exeext
4422if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4423 (eval $ac_link) 2>&5
4424 ac_status=$?
4425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4426 (exit $ac_status); } &&
4427 { ac_try='test -s conftest$ac_exeext'
4428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4429 (eval $ac_try) 2>&5
4430 ac_status=$?
4431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4432 (exit $ac_status); }; }; then
4433 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004434else
Martin v. Löwis11437992002-04-12 09:54:03 +00004435 echo "$as_me: failed program was:" >&5
4436cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004437fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004438rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4439if test "$ac_cv_search_opendir" = no; then
4440 for ac_lib in dir; do
4441 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4442 cat >conftest.$ac_ext <<_ACEOF
4443#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004444#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004445
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004446/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004447#ifdef __cplusplus
4448extern "C"
4449#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004450/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004451 builtin and then its argument prototype would still apply. */
4452char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004453#ifdef F77_DUMMY_MAIN
4454# ifdef __cplusplus
4455 extern "C"
4456# endif
4457 int F77_DUMMY_MAIN() { return 1; }
4458#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004459int
4460main ()
4461{
4462opendir ();
4463 ;
4464 return 0;
4465}
4466_ACEOF
4467rm -f conftest.$ac_objext conftest$ac_exeext
4468if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4469 (eval $ac_link) 2>&5
4470 ac_status=$?
4471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4472 (exit $ac_status); } &&
4473 { ac_try='test -s conftest$ac_exeext'
4474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4475 (eval $ac_try) 2>&5
4476 ac_status=$?
4477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4478 (exit $ac_status); }; }; then
4479 ac_cv_search_opendir="-l$ac_lib"
4480break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004481else
Martin v. Löwis11437992002-04-12 09:54:03 +00004482 echo "$as_me: failed program was:" >&5
4483cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004484fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004485rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4486 done
4487fi
4488LIBS=$ac_func_search_save_LIBS
4489fi
4490echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4491echo "${ECHO_T}$ac_cv_search_opendir" >&6
4492if test "$ac_cv_search_opendir" != no; then
4493 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004494
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004495fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004496
Michael W. Hudson54241132001-12-07 15:38:26 +00004497else
Martin v. Löwis11437992002-04-12 09:54:03 +00004498 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4499echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4500if test "${ac_cv_search_opendir+set}" = set; then
4501 echo $ECHO_N "(cached) $ECHO_C" >&6
4502else
4503 ac_func_search_save_LIBS=$LIBS
4504ac_cv_search_opendir=no
4505cat >conftest.$ac_ext <<_ACEOF
4506#line $LINENO "configure"
4507#include "confdefs.h"
4508
4509/* Override any gcc2 internal prototype to avoid an error. */
4510#ifdef __cplusplus
4511extern "C"
4512#endif
4513/* We use char because int might match the return type of a gcc2
4514 builtin and then its argument prototype would still apply. */
4515char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004516#ifdef F77_DUMMY_MAIN
4517# ifdef __cplusplus
4518 extern "C"
4519# endif
4520 int F77_DUMMY_MAIN() { return 1; }
4521#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004522int
4523main ()
4524{
4525opendir ();
4526 ;
4527 return 0;
4528}
4529_ACEOF
4530rm -f conftest.$ac_objext conftest$ac_exeext
4531if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4532 (eval $ac_link) 2>&5
4533 ac_status=$?
4534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4535 (exit $ac_status); } &&
4536 { ac_try='test -s conftest$ac_exeext'
4537 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4538 (eval $ac_try) 2>&5
4539 ac_status=$?
4540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4541 (exit $ac_status); }; }; then
4542 ac_cv_search_opendir="none required"
4543else
4544 echo "$as_me: failed program was:" >&5
4545cat conftest.$ac_ext >&5
4546fi
4547rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4548if test "$ac_cv_search_opendir" = no; then
4549 for ac_lib in x; do
4550 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4551 cat >conftest.$ac_ext <<_ACEOF
4552#line $LINENO "configure"
4553#include "confdefs.h"
4554
4555/* Override any gcc2 internal prototype to avoid an error. */
4556#ifdef __cplusplus
4557extern "C"
4558#endif
4559/* We use char because int might match the return type of a gcc2
4560 builtin and then its argument prototype would still apply. */
4561char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004562#ifdef F77_DUMMY_MAIN
4563# ifdef __cplusplus
4564 extern "C"
4565# endif
4566 int F77_DUMMY_MAIN() { return 1; }
4567#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004568int
4569main ()
4570{
4571opendir ();
4572 ;
4573 return 0;
4574}
4575_ACEOF
4576rm -f conftest.$ac_objext conftest$ac_exeext
4577if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4578 (eval $ac_link) 2>&5
4579 ac_status=$?
4580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4581 (exit $ac_status); } &&
4582 { ac_try='test -s conftest$ac_exeext'
4583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4584 (eval $ac_try) 2>&5
4585 ac_status=$?
4586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4587 (exit $ac_status); }; }; then
4588 ac_cv_search_opendir="-l$ac_lib"
4589break
4590else
4591 echo "$as_me: failed program was:" >&5
4592cat conftest.$ac_ext >&5
4593fi
4594rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4595 done
4596fi
4597LIBS=$ac_func_search_save_LIBS
4598fi
4599echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4600echo "${ECHO_T}$ac_cv_search_opendir" >&6
4601if test "$ac_cv_search_opendir" != no; then
4602 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4603
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004604fi
4605
4606fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004607
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004608echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4609echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4610if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4611 echo $ECHO_N "(cached) $ECHO_C" >&6
4612else
4613 cat >conftest.$ac_ext <<_ACEOF
4614#line $LINENO "configure"
4615#include "confdefs.h"
4616#include <sys/types.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00004617#ifdef F77_DUMMY_MAIN
4618# ifdef __cplusplus
4619 extern "C"
4620# endif
4621 int F77_DUMMY_MAIN() { return 1; }
4622#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004623int
4624main ()
4625{
4626return makedev(0, 0);
4627 ;
4628 return 0;
4629}
4630_ACEOF
4631rm -f conftest.$ac_objext conftest$ac_exeext
4632if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4633 (eval $ac_link) 2>&5
4634 ac_status=$?
4635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4636 (exit $ac_status); } &&
4637 { ac_try='test -s conftest$ac_exeext'
4638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4639 (eval $ac_try) 2>&5
4640 ac_status=$?
4641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4642 (exit $ac_status); }; }; then
4643 ac_cv_header_sys_types_h_makedev=yes
4644else
4645 echo "$as_me: failed program was:" >&5
4646cat conftest.$ac_ext >&5
4647ac_cv_header_sys_types_h_makedev=no
4648fi
4649rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4650
4651fi
4652echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4653echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4654
4655if test $ac_cv_header_sys_types_h_makedev = no; then
4656if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4657 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4658echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4659if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4660 echo $ECHO_N "(cached) $ECHO_C" >&6
4661fi
4662echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4663echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4664else
4665 # Is the header compilable?
4666echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4667echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4668cat >conftest.$ac_ext <<_ACEOF
4669#line $LINENO "configure"
4670#include "confdefs.h"
4671$ac_includes_default
4672#include <sys/mkdev.h>
4673_ACEOF
4674rm -f conftest.$ac_objext
4675if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4676 (eval $ac_compile) 2>&5
4677 ac_status=$?
4678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4679 (exit $ac_status); } &&
4680 { ac_try='test -s conftest.$ac_objext'
4681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4682 (eval $ac_try) 2>&5
4683 ac_status=$?
4684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4685 (exit $ac_status); }; }; then
4686 ac_header_compiler=yes
4687else
4688 echo "$as_me: failed program was:" >&5
4689cat conftest.$ac_ext >&5
4690ac_header_compiler=no
4691fi
4692rm -f conftest.$ac_objext conftest.$ac_ext
4693echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4694echo "${ECHO_T}$ac_header_compiler" >&6
4695
4696# Is the header present?
4697echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4698echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4699cat >conftest.$ac_ext <<_ACEOF
4700#line $LINENO "configure"
4701#include "confdefs.h"
4702#include <sys/mkdev.h>
4703_ACEOF
4704if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4705 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4706 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004707 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004708 rm -f conftest.er1
4709 cat conftest.err >&5
4710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4711 (exit $ac_status); } >/dev/null; then
4712 if test -s conftest.err; then
4713 ac_cpp_err=$ac_c_preproc_warn_flag
4714 else
4715 ac_cpp_err=
4716 fi
4717else
4718 ac_cpp_err=yes
4719fi
4720if test -z "$ac_cpp_err"; then
4721 ac_header_preproc=yes
4722else
4723 echo "$as_me: failed program was:" >&5
4724 cat conftest.$ac_ext >&5
4725 ac_header_preproc=no
4726fi
4727rm -f conftest.err conftest.$ac_ext
4728echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4729echo "${ECHO_T}$ac_header_preproc" >&6
4730
4731# So? What about this header?
4732case $ac_header_compiler:$ac_header_preproc in
4733 yes:no )
4734 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4735echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4736 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4737echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4738 no:yes )
4739 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4740echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4741 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4742echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4743 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4744echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4745esac
4746echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4747echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4748if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4749 echo $ECHO_N "(cached) $ECHO_C" >&6
4750else
4751 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4752fi
4753echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4754echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4755
4756fi
4757if test $ac_cv_header_sys_mkdev_h = yes; then
4758
4759cat >>confdefs.h <<\_ACEOF
4760#define MAJOR_IN_MKDEV 1
4761_ACEOF
4762
4763fi
4764
4765
4766
4767 if test $ac_cv_header_sys_mkdev_h = no; then
4768 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4769 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4770echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4771if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4772 echo $ECHO_N "(cached) $ECHO_C" >&6
4773fi
4774echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4775echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4776else
4777 # Is the header compilable?
4778echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4779echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4780cat >conftest.$ac_ext <<_ACEOF
4781#line $LINENO "configure"
4782#include "confdefs.h"
4783$ac_includes_default
4784#include <sys/sysmacros.h>
4785_ACEOF
4786rm -f conftest.$ac_objext
4787if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4788 (eval $ac_compile) 2>&5
4789 ac_status=$?
4790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4791 (exit $ac_status); } &&
4792 { ac_try='test -s conftest.$ac_objext'
4793 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4794 (eval $ac_try) 2>&5
4795 ac_status=$?
4796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4797 (exit $ac_status); }; }; then
4798 ac_header_compiler=yes
4799else
4800 echo "$as_me: failed program was:" >&5
4801cat conftest.$ac_ext >&5
4802ac_header_compiler=no
4803fi
4804rm -f conftest.$ac_objext conftest.$ac_ext
4805echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4806echo "${ECHO_T}$ac_header_compiler" >&6
4807
4808# Is the header present?
4809echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
4810echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
4811cat >conftest.$ac_ext <<_ACEOF
4812#line $LINENO "configure"
4813#include "confdefs.h"
4814#include <sys/sysmacros.h>
4815_ACEOF
4816if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4817 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4818 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004819 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004820 rm -f conftest.er1
4821 cat conftest.err >&5
4822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4823 (exit $ac_status); } >/dev/null; then
4824 if test -s conftest.err; then
4825 ac_cpp_err=$ac_c_preproc_warn_flag
4826 else
4827 ac_cpp_err=
4828 fi
4829else
4830 ac_cpp_err=yes
4831fi
4832if test -z "$ac_cpp_err"; then
4833 ac_header_preproc=yes
4834else
4835 echo "$as_me: failed program was:" >&5
4836 cat conftest.$ac_ext >&5
4837 ac_header_preproc=no
4838fi
4839rm -f conftest.err conftest.$ac_ext
4840echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4841echo "${ECHO_T}$ac_header_preproc" >&6
4842
4843# So? What about this header?
4844case $ac_header_compiler:$ac_header_preproc in
4845 yes:no )
4846 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
4847echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4848 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4849echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4850 no:yes )
4851 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
4852echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
4853 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
4854echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
4855 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4856echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4857esac
4858echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4859echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4860if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4861 echo $ECHO_N "(cached) $ECHO_C" >&6
4862else
4863 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
4864fi
4865echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4866echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4867
4868fi
4869if test $ac_cv_header_sys_sysmacros_h = yes; then
4870
4871cat >>confdefs.h <<\_ACEOF
4872#define MAJOR_IN_SYSMACROS 1
4873_ACEOF
4874
4875fi
4876
4877
4878 fi
4879fi
4880
Michael W. Hudson54241132001-12-07 15:38:26 +00004881
Guido van Rossum627b2d71993-12-24 10:39:16 +00004882# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004883was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004884echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4885echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4886cat >conftest.$ac_ext <<_ACEOF
4887#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004888#include "confdefs.h"
4889#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004890
4891_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004892if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00004893 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004894 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004895else
Martin v. Löwis11437992002-04-12 09:54:03 +00004896
4897
4898cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004899#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004900_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004901
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004902
Guido van Rossum627b2d71993-12-24 10:39:16 +00004903fi
4904rm -f conftest*
4905
Martin v. Löwis11437992002-04-12 09:54:03 +00004906echo "$as_me:$LINENO: result: $was_it_defined" >&5
4907echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004908
Neal Norwitz11690112002-07-30 01:08:28 +00004909# Check whether using makedev requires defining _OSF_SOURCE
4910echo "$as_me:$LINENO: checking for makedev" >&5
4911echo $ECHO_N "checking for makedev... $ECHO_C" >&6
4912cat >conftest.$ac_ext <<_ACEOF
4913#line $LINENO "configure"
4914#include "confdefs.h"
Neal Norwitz6eb37f02003-02-23 23:28:15 +00004915#include <sys/types.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00004916#ifdef F77_DUMMY_MAIN
4917# ifdef __cplusplus
4918 extern "C"
4919# endif
4920 int F77_DUMMY_MAIN() { return 1; }
4921#endif
Neal Norwitz11690112002-07-30 01:08:28 +00004922int
4923main ()
4924{
4925 makedev(0, 0)
4926 ;
4927 return 0;
4928}
4929_ACEOF
4930rm -f conftest.$ac_objext conftest$ac_exeext
4931if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4932 (eval $ac_link) 2>&5
4933 ac_status=$?
4934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4935 (exit $ac_status); } &&
4936 { ac_try='test -s conftest$ac_exeext'
4937 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4938 (eval $ac_try) 2>&5
4939 ac_status=$?
4940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4941 (exit $ac_status); }; }; then
4942 ac_cv_has_makedev=yes
4943else
4944 echo "$as_me: failed program was:" >&5
4945cat conftest.$ac_ext >&5
4946ac_cv_has_makedev=no
4947fi
4948rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4949if test "$ac_cv_has_makedev" = "no"; then
4950 # we didn't link, try if _OSF_SOURCE will allow us to link
4951 cat >conftest.$ac_ext <<_ACEOF
4952#line $LINENO "configure"
4953#include "confdefs.h"
4954
Neal Norwitz6eb37f02003-02-23 23:28:15 +00004955#define _OSF_SOURCE 1
4956#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00004957
Barry Warsawfe33b792003-01-07 22:42:49 +00004958#ifdef F77_DUMMY_MAIN
4959# ifdef __cplusplus
4960 extern "C"
4961# endif
4962 int F77_DUMMY_MAIN() { return 1; }
4963#endif
Neal Norwitz11690112002-07-30 01:08:28 +00004964int
4965main ()
4966{
4967 makedev(0, 0)
4968 ;
4969 return 0;
4970}
4971_ACEOF
4972rm -f conftest.$ac_objext conftest$ac_exeext
4973if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4974 (eval $ac_link) 2>&5
4975 ac_status=$?
4976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4977 (exit $ac_status); } &&
4978 { ac_try='test -s conftest$ac_exeext'
4979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4980 (eval $ac_try) 2>&5
4981 ac_status=$?
4982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4983 (exit $ac_status); }; }; then
4984 ac_cv_has_makedev=yes
4985else
4986 echo "$as_me: failed program was:" >&5
4987cat conftest.$ac_ext >&5
4988ac_cv_has_makedev=no
4989fi
4990rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4991 if test "$ac_cv_has_makedev" = "yes"; then
4992
4993cat >>confdefs.h <<\_ACEOF
4994#define _OSF_SOURCE 1
4995_ACEOF
4996
4997 fi
4998fi
4999echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
5000echo "${ECHO_T}$ac_cv_has_makedev" >&6
5001if test "$ac_cv_has_makedev" = "yes"; then
5002
5003cat >>confdefs.h <<\_ACEOF
5004#define HAVE_MAKEDEV 1
5005_ACEOF
5006
5007fi
5008
Martin v. Löwis399a6892002-10-04 10:22:02 +00005009# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5010# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5011# defined, but the compiler does not support pragma redefine_extname,
5012# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5013# structures (such as rlimit64) without declaring them. As a
5014# work-around, disable LFS on such configurations
5015
5016use_lfs=yes
5017echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5018echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
5019cat >conftest.$ac_ext <<_ACEOF
5020#line $LINENO "configure"
5021#include "confdefs.h"
5022
5023#define _LARGEFILE_SOURCE 1
5024#define _FILE_OFFSET_BITS 64
5025#include <sys/resource.h>
5026
Barry Warsawfe33b792003-01-07 22:42:49 +00005027#ifdef F77_DUMMY_MAIN
5028# ifdef __cplusplus
5029 extern "C"
5030# endif
5031 int F77_DUMMY_MAIN() { return 1; }
5032#endif
Martin v. Löwis399a6892002-10-04 10:22:02 +00005033int
5034main ()
5035{
5036struct rlimit foo;
5037 ;
5038 return 0;
5039}
5040_ACEOF
5041rm -f conftest.$ac_objext
5042if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5043 (eval $ac_compile) 2>&5
5044 ac_status=$?
5045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5046 (exit $ac_status); } &&
5047 { ac_try='test -s conftest.$ac_objext'
5048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5049 (eval $ac_try) 2>&5
5050 ac_status=$?
5051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5052 (exit $ac_status); }; }; then
5053 sol_lfs_bug=no
5054else
5055 echo "$as_me: failed program was:" >&5
5056cat conftest.$ac_ext >&5
5057sol_lfs_bug=yes
5058fi
5059rm -f conftest.$ac_objext conftest.$ac_ext
5060echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5061echo "${ECHO_T}$sol_lfs_bug" >&6
5062if test "$sol_lfs_bug" = "yes"; then
5063 use_lfs=no
5064fi
5065
5066if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005067# Two defines needed to enable largefile support on various platforms
5068# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005069
Martin v. Löwis11437992002-04-12 09:54:03 +00005070cat >>confdefs.h <<\_ACEOF
5071#define _LARGEFILE_SOURCE 1
5072_ACEOF
5073
5074
5075cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005076#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005077_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005078
Martin v. Löwis399a6892002-10-04 10:22:02 +00005079fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005080
Guido van Rossum84e7b241996-08-19 21:59:00 +00005081# Add some code to confdefs.h so that the test for off_t works on SCO
5082cat >> confdefs.h <<\EOF
5083#if defined(SCO_DS)
5084#undef _OFF_T
5085#endif
5086EOF
5087
Guido van Rossumef2255b2000-03-10 22:30:29 +00005088# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005089echo "$as_me:$LINENO: checking for mode_t" >&5
5090echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5091if test "${ac_cv_type_mode_t+set}" = set; then
5092 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005093else
Martin v. Löwis11437992002-04-12 09:54:03 +00005094 cat >conftest.$ac_ext <<_ACEOF
5095#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005096#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005097$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005098#ifdef F77_DUMMY_MAIN
5099# ifdef __cplusplus
5100 extern "C"
5101# endif
5102 int F77_DUMMY_MAIN() { return 1; }
5103#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005104int
5105main ()
5106{
5107if ((mode_t *) 0)
5108 return 0;
5109if (sizeof (mode_t))
5110 return 0;
5111 ;
5112 return 0;
5113}
5114_ACEOF
5115rm -f conftest.$ac_objext
5116if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5117 (eval $ac_compile) 2>&5
5118 ac_status=$?
5119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5120 (exit $ac_status); } &&
5121 { ac_try='test -s conftest.$ac_objext'
5122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5123 (eval $ac_try) 2>&5
5124 ac_status=$?
5125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5126 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005127 ac_cv_type_mode_t=yes
5128else
Martin v. Löwis11437992002-04-12 09:54:03 +00005129 echo "$as_me: failed program was:" >&5
5130cat conftest.$ac_ext >&5
5131ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005132fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005133rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005134fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005135echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5136echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5137if test $ac_cv_type_mode_t = yes; then
5138 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005139else
Martin v. Löwis11437992002-04-12 09:54:03 +00005140
5141cat >>confdefs.h <<_ACEOF
5142#define mode_t int
5143_ACEOF
5144
5145fi
5146
5147echo "$as_me:$LINENO: checking for off_t" >&5
5148echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5149if test "${ac_cv_type_off_t+set}" = set; then
5150 echo $ECHO_N "(cached) $ECHO_C" >&6
5151else
5152 cat >conftest.$ac_ext <<_ACEOF
5153#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005154#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005155$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005156#ifdef F77_DUMMY_MAIN
5157# ifdef __cplusplus
5158 extern "C"
5159# endif
5160 int F77_DUMMY_MAIN() { return 1; }
5161#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005162int
5163main ()
5164{
5165if ((off_t *) 0)
5166 return 0;
5167if (sizeof (off_t))
5168 return 0;
5169 ;
5170 return 0;
5171}
5172_ACEOF
5173rm -f conftest.$ac_objext
5174if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5175 (eval $ac_compile) 2>&5
5176 ac_status=$?
5177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5178 (exit $ac_status); } &&
5179 { ac_try='test -s conftest.$ac_objext'
5180 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5181 (eval $ac_try) 2>&5
5182 ac_status=$?
5183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5184 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005185 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005186else
Martin v. Löwis11437992002-04-12 09:54:03 +00005187 echo "$as_me: failed program was:" >&5
5188cat conftest.$ac_ext >&5
5189ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005190fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005191rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005192fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005193echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5194echo "${ECHO_T}$ac_cv_type_off_t" >&6
5195if test $ac_cv_type_off_t = yes; then
5196 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005197else
Martin v. Löwis11437992002-04-12 09:54:03 +00005198
5199cat >>confdefs.h <<_ACEOF
5200#define off_t long
5201_ACEOF
5202
5203fi
5204
5205echo "$as_me:$LINENO: checking for pid_t" >&5
5206echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5207if test "${ac_cv_type_pid_t+set}" = set; then
5208 echo $ECHO_N "(cached) $ECHO_C" >&6
5209else
5210 cat >conftest.$ac_ext <<_ACEOF
5211#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005212#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005213$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005214#ifdef F77_DUMMY_MAIN
5215# ifdef __cplusplus
5216 extern "C"
5217# endif
5218 int F77_DUMMY_MAIN() { return 1; }
5219#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005220int
5221main ()
5222{
5223if ((pid_t *) 0)
5224 return 0;
5225if (sizeof (pid_t))
5226 return 0;
5227 ;
5228 return 0;
5229}
5230_ACEOF
5231rm -f conftest.$ac_objext
5232if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5233 (eval $ac_compile) 2>&5
5234 ac_status=$?
5235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5236 (exit $ac_status); } &&
5237 { ac_try='test -s conftest.$ac_objext'
5238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5239 (eval $ac_try) 2>&5
5240 ac_status=$?
5241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5242 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005243 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005244else
Martin v. Löwis11437992002-04-12 09:54:03 +00005245 echo "$as_me: failed program was:" >&5
5246cat conftest.$ac_ext >&5
5247ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005248fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005249rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005250fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005251echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5252echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5253if test $ac_cv_type_pid_t = yes; then
5254 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005255else
Martin v. Löwis11437992002-04-12 09:54:03 +00005256
5257cat >>confdefs.h <<_ACEOF
5258#define pid_t int
5259_ACEOF
5260
5261fi
5262
5263echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5264echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5265if test "${ac_cv_type_signal+set}" = set; then
5266 echo $ECHO_N "(cached) $ECHO_C" >&6
5267else
5268 cat >conftest.$ac_ext <<_ACEOF
5269#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005270#include "confdefs.h"
5271#include <sys/types.h>
5272#include <signal.h>
5273#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005274# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005275#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005276#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005277extern "C" void (*signal (int, void (*)(int)))(int);
5278#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005279void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005280#endif
5281
Barry Warsawfe33b792003-01-07 22:42:49 +00005282#ifdef F77_DUMMY_MAIN
5283# ifdef __cplusplus
5284 extern "C"
5285# endif
5286 int F77_DUMMY_MAIN() { return 1; }
5287#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005288int
5289main ()
5290{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005291int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005292 ;
5293 return 0;
5294}
5295_ACEOF
5296rm -f conftest.$ac_objext
5297if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5298 (eval $ac_compile) 2>&5
5299 ac_status=$?
5300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5301 (exit $ac_status); } &&
5302 { ac_try='test -s conftest.$ac_objext'
5303 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5304 (eval $ac_try) 2>&5
5305 ac_status=$?
5306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5307 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005308 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005309else
Martin v. Löwis11437992002-04-12 09:54:03 +00005310 echo "$as_me: failed program was:" >&5
5311cat conftest.$ac_ext >&5
5312ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005313fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005314rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005315fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005316echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5317echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005318
Martin v. Löwis11437992002-04-12 09:54:03 +00005319cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005320#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005321_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005322
Michael W. Hudson54241132001-12-07 15:38:26 +00005323
Martin v. Löwis11437992002-04-12 09:54:03 +00005324echo "$as_me:$LINENO: checking for size_t" >&5
5325echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5326if test "${ac_cv_type_size_t+set}" = set; then
5327 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005328else
Martin v. Löwis11437992002-04-12 09:54:03 +00005329 cat >conftest.$ac_ext <<_ACEOF
5330#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005331#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005332$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005333#ifdef F77_DUMMY_MAIN
5334# ifdef __cplusplus
5335 extern "C"
5336# endif
5337 int F77_DUMMY_MAIN() { return 1; }
5338#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005339int
5340main ()
5341{
5342if ((size_t *) 0)
5343 return 0;
5344if (sizeof (size_t))
5345 return 0;
5346 ;
5347 return 0;
5348}
5349_ACEOF
5350rm -f conftest.$ac_objext
5351if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5352 (eval $ac_compile) 2>&5
5353 ac_status=$?
5354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5355 (exit $ac_status); } &&
5356 { ac_try='test -s conftest.$ac_objext'
5357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5358 (eval $ac_try) 2>&5
5359 ac_status=$?
5360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5361 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005362 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005363else
Martin v. Löwis11437992002-04-12 09:54:03 +00005364 echo "$as_me: failed program was:" >&5
5365cat conftest.$ac_ext >&5
5366ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005367fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005368rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005369fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005370echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5371echo "${ECHO_T}$ac_cv_type_size_t" >&6
5372if test $ac_cv_type_size_t = yes; then
5373 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005374else
Martin v. Löwis11437992002-04-12 09:54:03 +00005375
5376cat >>confdefs.h <<_ACEOF
5377#define size_t unsigned
5378_ACEOF
5379
5380fi
5381
5382echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5383echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5384if test "${ac_cv_type_uid_t+set}" = set; then
5385 echo $ECHO_N "(cached) $ECHO_C" >&6
5386else
5387 cat >conftest.$ac_ext <<_ACEOF
5388#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005389#include "confdefs.h"
5390#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005391
5392_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005393if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00005394 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005395 ac_cv_type_uid_t=yes
5396else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005397 ac_cv_type_uid_t=no
5398fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005399rm -f conftest*
5400
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005401fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005402echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5403echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005404if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005405
Martin v. Löwis11437992002-04-12 09:54:03 +00005406cat >>confdefs.h <<\_ACEOF
5407#define uid_t int
5408_ACEOF
5409
5410
5411cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005412#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005413_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005414
5415fi
5416
Jack Jansendd19cf82001-12-06 22:36:17 +00005417
Michael W. Hudson54241132001-12-07 15:38:26 +00005418# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00005419echo "$as_me:$LINENO: checking for int" >&5
5420echo $ECHO_N "checking for int... $ECHO_C" >&6
5421if test "${ac_cv_type_int+set}" = set; then
5422 echo $ECHO_N "(cached) $ECHO_C" >&6
5423else
5424 cat >conftest.$ac_ext <<_ACEOF
5425#line $LINENO "configure"
5426#include "confdefs.h"
5427$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005428#ifdef F77_DUMMY_MAIN
5429# ifdef __cplusplus
5430 extern "C"
5431# endif
5432 int F77_DUMMY_MAIN() { return 1; }
5433#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005434int
5435main ()
5436{
5437if ((int *) 0)
5438 return 0;
5439if (sizeof (int))
5440 return 0;
5441 ;
5442 return 0;
5443}
5444_ACEOF
5445rm -f conftest.$ac_objext
5446if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5447 (eval $ac_compile) 2>&5
5448 ac_status=$?
5449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5450 (exit $ac_status); } &&
5451 { ac_try='test -s conftest.$ac_objext'
5452 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5453 (eval $ac_try) 2>&5
5454 ac_status=$?
5455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5456 (exit $ac_status); }; }; then
5457 ac_cv_type_int=yes
5458else
5459 echo "$as_me: failed program was:" >&5
5460cat conftest.$ac_ext >&5
5461ac_cv_type_int=no
5462fi
5463rm -f conftest.$ac_objext conftest.$ac_ext
5464fi
5465echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5466echo "${ECHO_T}$ac_cv_type_int" >&6
5467
5468echo "$as_me:$LINENO: checking size of int" >&5
5469echo $ECHO_N "checking size of int... $ECHO_C" >&6
5470if test "${ac_cv_sizeof_int+set}" = set; then
5471 echo $ECHO_N "(cached) $ECHO_C" >&6
5472else
5473 if test "$ac_cv_type_int" = yes; then
5474 # The cast to unsigned long works around a bug in the HP C Compiler
5475 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5476 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5477 # This bug is HP SR number 8606223364.
5478 if test "$cross_compiling" = yes; then
5479 # Depending upon the size, compute the lo and hi bounds.
5480cat >conftest.$ac_ext <<_ACEOF
5481#line $LINENO "configure"
5482#include "confdefs.h"
5483$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005484#ifdef F77_DUMMY_MAIN
5485# ifdef __cplusplus
5486 extern "C"
5487# endif
5488 int F77_DUMMY_MAIN() { return 1; }
5489#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005490int
5491main ()
5492{
5493static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5494test_array [0] = 0
5495
5496 ;
5497 return 0;
5498}
5499_ACEOF
5500rm -f conftest.$ac_objext
5501if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5502 (eval $ac_compile) 2>&5
5503 ac_status=$?
5504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5505 (exit $ac_status); } &&
5506 { ac_try='test -s conftest.$ac_objext'
5507 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5508 (eval $ac_try) 2>&5
5509 ac_status=$?
5510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5511 (exit $ac_status); }; }; then
5512 ac_lo=0 ac_mid=0
5513 while :; do
5514 cat >conftest.$ac_ext <<_ACEOF
5515#line $LINENO "configure"
5516#include "confdefs.h"
5517$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005518#ifdef F77_DUMMY_MAIN
5519# ifdef __cplusplus
5520 extern "C"
5521# endif
5522 int F77_DUMMY_MAIN() { return 1; }
5523#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005524int
5525main ()
5526{
5527static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5528test_array [0] = 0
5529
5530 ;
5531 return 0;
5532}
5533_ACEOF
5534rm -f conftest.$ac_objext
5535if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5536 (eval $ac_compile) 2>&5
5537 ac_status=$?
5538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5539 (exit $ac_status); } &&
5540 { ac_try='test -s conftest.$ac_objext'
5541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5542 (eval $ac_try) 2>&5
5543 ac_status=$?
5544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5545 (exit $ac_status); }; }; then
5546 ac_hi=$ac_mid; break
5547else
5548 echo "$as_me: failed program was:" >&5
5549cat conftest.$ac_ext >&5
5550ac_lo=`expr $ac_mid + 1`
5551 if test $ac_lo -le $ac_mid; then
5552 ac_lo= ac_hi=
5553 break
5554 fi
5555 ac_mid=`expr 2 '*' $ac_mid + 1`
5556fi
5557rm -f conftest.$ac_objext conftest.$ac_ext
5558 done
5559else
5560 echo "$as_me: failed program was:" >&5
5561cat conftest.$ac_ext >&5
5562cat >conftest.$ac_ext <<_ACEOF
5563#line $LINENO "configure"
5564#include "confdefs.h"
5565$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005566#ifdef F77_DUMMY_MAIN
5567# ifdef __cplusplus
5568 extern "C"
5569# endif
5570 int F77_DUMMY_MAIN() { return 1; }
5571#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005572int
5573main ()
5574{
5575static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5576test_array [0] = 0
5577
5578 ;
5579 return 0;
5580}
5581_ACEOF
5582rm -f conftest.$ac_objext
5583if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5584 (eval $ac_compile) 2>&5
5585 ac_status=$?
5586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5587 (exit $ac_status); } &&
5588 { ac_try='test -s conftest.$ac_objext'
5589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5590 (eval $ac_try) 2>&5
5591 ac_status=$?
5592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5593 (exit $ac_status); }; }; then
5594 ac_hi=-1 ac_mid=-1
5595 while :; do
5596 cat >conftest.$ac_ext <<_ACEOF
5597#line $LINENO "configure"
5598#include "confdefs.h"
5599$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005600#ifdef F77_DUMMY_MAIN
5601# ifdef __cplusplus
5602 extern "C"
5603# endif
5604 int F77_DUMMY_MAIN() { return 1; }
5605#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005606int
5607main ()
5608{
5609static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5610test_array [0] = 0
5611
5612 ;
5613 return 0;
5614}
5615_ACEOF
5616rm -f conftest.$ac_objext
5617if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5618 (eval $ac_compile) 2>&5
5619 ac_status=$?
5620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5621 (exit $ac_status); } &&
5622 { ac_try='test -s conftest.$ac_objext'
5623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5624 (eval $ac_try) 2>&5
5625 ac_status=$?
5626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5627 (exit $ac_status); }; }; then
5628 ac_lo=$ac_mid; break
5629else
5630 echo "$as_me: failed program was:" >&5
5631cat conftest.$ac_ext >&5
5632ac_hi=`expr '(' $ac_mid ')' - 1`
5633 if test $ac_mid -le $ac_hi; then
5634 ac_lo= ac_hi=
5635 break
5636 fi
5637 ac_mid=`expr 2 '*' $ac_mid`
5638fi
5639rm -f conftest.$ac_objext conftest.$ac_ext
5640 done
5641else
5642 echo "$as_me: failed program was:" >&5
5643cat conftest.$ac_ext >&5
5644ac_lo= ac_hi=
5645fi
5646rm -f conftest.$ac_objext conftest.$ac_ext
5647fi
5648rm -f conftest.$ac_objext conftest.$ac_ext
5649# Binary search between lo and hi bounds.
5650while test "x$ac_lo" != "x$ac_hi"; do
5651 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5652 cat >conftest.$ac_ext <<_ACEOF
5653#line $LINENO "configure"
5654#include "confdefs.h"
5655$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005656#ifdef F77_DUMMY_MAIN
5657# ifdef __cplusplus
5658 extern "C"
5659# endif
5660 int F77_DUMMY_MAIN() { return 1; }
5661#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005662int
5663main ()
5664{
5665static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5666test_array [0] = 0
5667
5668 ;
5669 return 0;
5670}
5671_ACEOF
5672rm -f conftest.$ac_objext
5673if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5674 (eval $ac_compile) 2>&5
5675 ac_status=$?
5676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5677 (exit $ac_status); } &&
5678 { ac_try='test -s conftest.$ac_objext'
5679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5680 (eval $ac_try) 2>&5
5681 ac_status=$?
5682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5683 (exit $ac_status); }; }; then
5684 ac_hi=$ac_mid
5685else
5686 echo "$as_me: failed program was:" >&5
5687cat conftest.$ac_ext >&5
5688ac_lo=`expr '(' $ac_mid ')' + 1`
5689fi
5690rm -f conftest.$ac_objext conftest.$ac_ext
5691done
5692case $ac_lo in
5693?*) ac_cv_sizeof_int=$ac_lo;;
5694'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5695echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5696 { (exit 1); exit 1; }; } ;;
5697esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005698else
5699 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005700 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5701echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5702 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005703else
Martin v. Löwis11437992002-04-12 09:54:03 +00005704 cat >conftest.$ac_ext <<_ACEOF
5705#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005706#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005707$ac_includes_default
5708long longval () { return (long) (sizeof (int)); }
5709unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005710#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005711#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00005712#ifdef F77_DUMMY_MAIN
5713# ifdef __cplusplus
5714 extern "C"
5715# endif
5716 int F77_DUMMY_MAIN() { return 1; }
5717#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005718int
5719main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005720{
Martin v. Löwis11437992002-04-12 09:54:03 +00005721
5722 FILE *f = fopen ("conftest.val", "w");
5723 if (! f)
5724 exit (1);
5725 if (((long) (sizeof (int))) < 0)
5726 {
5727 long i = longval ();
5728 if (i != ((long) (sizeof (int))))
5729 exit (1);
5730 fprintf (f, "%ld\n", i);
5731 }
5732 else
5733 {
5734 unsigned long i = ulongval ();
5735 if (i != ((long) (sizeof (int))))
5736 exit (1);
5737 fprintf (f, "%lu\n", i);
5738 }
5739 exit (ferror (f) || fclose (f) != 0);
5740
5741 ;
5742 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005743}
Martin v. Löwis11437992002-04-12 09:54:03 +00005744_ACEOF
5745rm -f conftest$ac_exeext
5746if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5747 (eval $ac_link) 2>&5
5748 ac_status=$?
5749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5750 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5751 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5752 (eval $ac_try) 2>&5
5753 ac_status=$?
5754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5755 (exit $ac_status); }; }; then
5756 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005757else
Martin v. Löwis11437992002-04-12 09:54:03 +00005758 echo "$as_me: program exited with status $ac_status" >&5
5759echo "$as_me: failed program was:" >&5
5760cat conftest.$ac_ext >&5
5761( exit $ac_status )
5762{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5763echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5764 { (exit 1); exit 1; }; }
5765fi
Barry Warsawfe33b792003-01-07 22:42:49 +00005766rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005767fi
5768fi
5769rm -f conftest.val
5770else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005771 ac_cv_sizeof_int=0
5772fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005773fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005774echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5775echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5776cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005777#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005778_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005779
5780
Martin v. Löwis11437992002-04-12 09:54:03 +00005781echo "$as_me:$LINENO: checking for long" >&5
5782echo $ECHO_N "checking for long... $ECHO_C" >&6
5783if test "${ac_cv_type_long+set}" = set; then
5784 echo $ECHO_N "(cached) $ECHO_C" >&6
5785else
5786 cat >conftest.$ac_ext <<_ACEOF
5787#line $LINENO "configure"
5788#include "confdefs.h"
5789$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005790#ifdef F77_DUMMY_MAIN
5791# ifdef __cplusplus
5792 extern "C"
5793# endif
5794 int F77_DUMMY_MAIN() { return 1; }
5795#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005796int
5797main ()
5798{
5799if ((long *) 0)
5800 return 0;
5801if (sizeof (long))
5802 return 0;
5803 ;
5804 return 0;
5805}
5806_ACEOF
5807rm -f conftest.$ac_objext
5808if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5809 (eval $ac_compile) 2>&5
5810 ac_status=$?
5811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5812 (exit $ac_status); } &&
5813 { ac_try='test -s conftest.$ac_objext'
5814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5815 (eval $ac_try) 2>&5
5816 ac_status=$?
5817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5818 (exit $ac_status); }; }; then
5819 ac_cv_type_long=yes
5820else
5821 echo "$as_me: failed program was:" >&5
5822cat conftest.$ac_ext >&5
5823ac_cv_type_long=no
5824fi
5825rm -f conftest.$ac_objext conftest.$ac_ext
5826fi
5827echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5828echo "${ECHO_T}$ac_cv_type_long" >&6
5829
5830echo "$as_me:$LINENO: checking size of long" >&5
5831echo $ECHO_N "checking size of long... $ECHO_C" >&6
5832if test "${ac_cv_sizeof_long+set}" = set; then
5833 echo $ECHO_N "(cached) $ECHO_C" >&6
5834else
5835 if test "$ac_cv_type_long" = yes; then
5836 # The cast to unsigned long works around a bug in the HP C Compiler
5837 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5838 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5839 # This bug is HP SR number 8606223364.
5840 if test "$cross_compiling" = yes; then
5841 # Depending upon the size, compute the lo and hi bounds.
5842cat >conftest.$ac_ext <<_ACEOF
5843#line $LINENO "configure"
5844#include "confdefs.h"
5845$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005846#ifdef F77_DUMMY_MAIN
5847# ifdef __cplusplus
5848 extern "C"
5849# endif
5850 int F77_DUMMY_MAIN() { return 1; }
5851#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005852int
5853main ()
5854{
5855static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5856test_array [0] = 0
5857
5858 ;
5859 return 0;
5860}
5861_ACEOF
5862rm -f conftest.$ac_objext
5863if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5864 (eval $ac_compile) 2>&5
5865 ac_status=$?
5866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5867 (exit $ac_status); } &&
5868 { ac_try='test -s conftest.$ac_objext'
5869 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5870 (eval $ac_try) 2>&5
5871 ac_status=$?
5872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5873 (exit $ac_status); }; }; then
5874 ac_lo=0 ac_mid=0
5875 while :; do
5876 cat >conftest.$ac_ext <<_ACEOF
5877#line $LINENO "configure"
5878#include "confdefs.h"
5879$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005880#ifdef F77_DUMMY_MAIN
5881# ifdef __cplusplus
5882 extern "C"
5883# endif
5884 int F77_DUMMY_MAIN() { return 1; }
5885#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005886int
5887main ()
5888{
5889static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5890test_array [0] = 0
5891
5892 ;
5893 return 0;
5894}
5895_ACEOF
5896rm -f conftest.$ac_objext
5897if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5898 (eval $ac_compile) 2>&5
5899 ac_status=$?
5900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5901 (exit $ac_status); } &&
5902 { ac_try='test -s conftest.$ac_objext'
5903 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5904 (eval $ac_try) 2>&5
5905 ac_status=$?
5906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5907 (exit $ac_status); }; }; then
5908 ac_hi=$ac_mid; break
5909else
5910 echo "$as_me: failed program was:" >&5
5911cat conftest.$ac_ext >&5
5912ac_lo=`expr $ac_mid + 1`
5913 if test $ac_lo -le $ac_mid; then
5914 ac_lo= ac_hi=
5915 break
5916 fi
5917 ac_mid=`expr 2 '*' $ac_mid + 1`
5918fi
5919rm -f conftest.$ac_objext conftest.$ac_ext
5920 done
5921else
5922 echo "$as_me: failed program was:" >&5
5923cat conftest.$ac_ext >&5
5924cat >conftest.$ac_ext <<_ACEOF
5925#line $LINENO "configure"
5926#include "confdefs.h"
5927$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005928#ifdef F77_DUMMY_MAIN
5929# ifdef __cplusplus
5930 extern "C"
5931# endif
5932 int F77_DUMMY_MAIN() { return 1; }
5933#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005934int
5935main ()
5936{
5937static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5938test_array [0] = 0
5939
5940 ;
5941 return 0;
5942}
5943_ACEOF
5944rm -f conftest.$ac_objext
5945if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5946 (eval $ac_compile) 2>&5
5947 ac_status=$?
5948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5949 (exit $ac_status); } &&
5950 { ac_try='test -s conftest.$ac_objext'
5951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5952 (eval $ac_try) 2>&5
5953 ac_status=$?
5954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5955 (exit $ac_status); }; }; then
5956 ac_hi=-1 ac_mid=-1
5957 while :; do
5958 cat >conftest.$ac_ext <<_ACEOF
5959#line $LINENO "configure"
5960#include "confdefs.h"
5961$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005962#ifdef F77_DUMMY_MAIN
5963# ifdef __cplusplus
5964 extern "C"
5965# endif
5966 int F77_DUMMY_MAIN() { return 1; }
5967#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005968int
5969main ()
5970{
5971static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5972test_array [0] = 0
5973
5974 ;
5975 return 0;
5976}
5977_ACEOF
5978rm -f conftest.$ac_objext
5979if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5980 (eval $ac_compile) 2>&5
5981 ac_status=$?
5982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5983 (exit $ac_status); } &&
5984 { ac_try='test -s conftest.$ac_objext'
5985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5986 (eval $ac_try) 2>&5
5987 ac_status=$?
5988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5989 (exit $ac_status); }; }; then
5990 ac_lo=$ac_mid; break
5991else
5992 echo "$as_me: failed program was:" >&5
5993cat conftest.$ac_ext >&5
5994ac_hi=`expr '(' $ac_mid ')' - 1`
5995 if test $ac_mid -le $ac_hi; then
5996 ac_lo= ac_hi=
5997 break
5998 fi
5999 ac_mid=`expr 2 '*' $ac_mid`
6000fi
6001rm -f conftest.$ac_objext conftest.$ac_ext
6002 done
6003else
6004 echo "$as_me: failed program was:" >&5
6005cat conftest.$ac_ext >&5
6006ac_lo= ac_hi=
6007fi
6008rm -f conftest.$ac_objext conftest.$ac_ext
6009fi
6010rm -f conftest.$ac_objext conftest.$ac_ext
6011# Binary search between lo and hi bounds.
6012while test "x$ac_lo" != "x$ac_hi"; do
6013 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6014 cat >conftest.$ac_ext <<_ACEOF
6015#line $LINENO "configure"
6016#include "confdefs.h"
6017$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006018#ifdef F77_DUMMY_MAIN
6019# ifdef __cplusplus
6020 extern "C"
6021# endif
6022 int F77_DUMMY_MAIN() { return 1; }
6023#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006024int
6025main ()
6026{
6027static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6028test_array [0] = 0
6029
6030 ;
6031 return 0;
6032}
6033_ACEOF
6034rm -f conftest.$ac_objext
6035if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6036 (eval $ac_compile) 2>&5
6037 ac_status=$?
6038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6039 (exit $ac_status); } &&
6040 { ac_try='test -s conftest.$ac_objext'
6041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6042 (eval $ac_try) 2>&5
6043 ac_status=$?
6044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6045 (exit $ac_status); }; }; then
6046 ac_hi=$ac_mid
6047else
6048 echo "$as_me: failed program was:" >&5
6049cat conftest.$ac_ext >&5
6050ac_lo=`expr '(' $ac_mid ')' + 1`
6051fi
6052rm -f conftest.$ac_objext conftest.$ac_ext
6053done
6054case $ac_lo in
6055?*) ac_cv_sizeof_long=$ac_lo;;
6056'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
6057echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
6058 { (exit 1); exit 1; }; } ;;
6059esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006060else
6061 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006062 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6063echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6064 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006065else
Martin v. Löwis11437992002-04-12 09:54:03 +00006066 cat >conftest.$ac_ext <<_ACEOF
6067#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006068#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006069$ac_includes_default
6070long longval () { return (long) (sizeof (long)); }
6071unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006072#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006073#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00006074#ifdef F77_DUMMY_MAIN
6075# ifdef __cplusplus
6076 extern "C"
6077# endif
6078 int F77_DUMMY_MAIN() { return 1; }
6079#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006080int
6081main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006082{
Martin v. Löwis11437992002-04-12 09:54:03 +00006083
6084 FILE *f = fopen ("conftest.val", "w");
6085 if (! f)
6086 exit (1);
6087 if (((long) (sizeof (long))) < 0)
6088 {
6089 long i = longval ();
6090 if (i != ((long) (sizeof (long))))
6091 exit (1);
6092 fprintf (f, "%ld\n", i);
6093 }
6094 else
6095 {
6096 unsigned long i = ulongval ();
6097 if (i != ((long) (sizeof (long))))
6098 exit (1);
6099 fprintf (f, "%lu\n", i);
6100 }
6101 exit (ferror (f) || fclose (f) != 0);
6102
6103 ;
6104 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006105}
Martin v. Löwis11437992002-04-12 09:54:03 +00006106_ACEOF
6107rm -f conftest$ac_exeext
6108if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6109 (eval $ac_link) 2>&5
6110 ac_status=$?
6111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6112 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6113 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6114 (eval $ac_try) 2>&5
6115 ac_status=$?
6116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6117 (exit $ac_status); }; }; then
6118 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006119else
Martin v. Löwis11437992002-04-12 09:54:03 +00006120 echo "$as_me: program exited with status $ac_status" >&5
6121echo "$as_me: failed program was:" >&5
6122cat conftest.$ac_ext >&5
6123( exit $ac_status )
6124{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
6125echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
6126 { (exit 1); exit 1; }; }
6127fi
Barry Warsawfe33b792003-01-07 22:42:49 +00006128rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006129fi
6130fi
6131rm -f conftest.val
6132else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006133 ac_cv_sizeof_long=0
6134fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006135fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006136echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6137echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6138cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006139#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006140_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006141
6142
Martin v. Löwis11437992002-04-12 09:54:03 +00006143echo "$as_me:$LINENO: checking for void *" >&5
6144echo $ECHO_N "checking for void *... $ECHO_C" >&6
6145if test "${ac_cv_type_void_p+set}" = set; then
6146 echo $ECHO_N "(cached) $ECHO_C" >&6
6147else
6148 cat >conftest.$ac_ext <<_ACEOF
6149#line $LINENO "configure"
6150#include "confdefs.h"
6151$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006152#ifdef F77_DUMMY_MAIN
6153# ifdef __cplusplus
6154 extern "C"
6155# endif
6156 int F77_DUMMY_MAIN() { return 1; }
6157#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006158int
6159main ()
6160{
6161if ((void * *) 0)
6162 return 0;
6163if (sizeof (void *))
6164 return 0;
6165 ;
6166 return 0;
6167}
6168_ACEOF
6169rm -f conftest.$ac_objext
6170if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6171 (eval $ac_compile) 2>&5
6172 ac_status=$?
6173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6174 (exit $ac_status); } &&
6175 { ac_try='test -s conftest.$ac_objext'
6176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6177 (eval $ac_try) 2>&5
6178 ac_status=$?
6179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6180 (exit $ac_status); }; }; then
6181 ac_cv_type_void_p=yes
6182else
6183 echo "$as_me: failed program was:" >&5
6184cat conftest.$ac_ext >&5
6185ac_cv_type_void_p=no
6186fi
6187rm -f conftest.$ac_objext conftest.$ac_ext
6188fi
6189echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
6190echo "${ECHO_T}$ac_cv_type_void_p" >&6
6191
6192echo "$as_me:$LINENO: checking size of void *" >&5
6193echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6194if test "${ac_cv_sizeof_void_p+set}" = set; then
6195 echo $ECHO_N "(cached) $ECHO_C" >&6
6196else
6197 if test "$ac_cv_type_void_p" = yes; then
6198 # The cast to unsigned long works around a bug in the HP C Compiler
6199 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6200 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6201 # This bug is HP SR number 8606223364.
6202 if test "$cross_compiling" = yes; then
6203 # Depending upon the size, compute the lo and hi bounds.
6204cat >conftest.$ac_ext <<_ACEOF
6205#line $LINENO "configure"
6206#include "confdefs.h"
6207$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006208#ifdef F77_DUMMY_MAIN
6209# ifdef __cplusplus
6210 extern "C"
6211# endif
6212 int F77_DUMMY_MAIN() { return 1; }
6213#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006214int
6215main ()
6216{
6217static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
6218test_array [0] = 0
6219
6220 ;
6221 return 0;
6222}
6223_ACEOF
6224rm -f conftest.$ac_objext
6225if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6226 (eval $ac_compile) 2>&5
6227 ac_status=$?
6228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6229 (exit $ac_status); } &&
6230 { ac_try='test -s conftest.$ac_objext'
6231 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6232 (eval $ac_try) 2>&5
6233 ac_status=$?
6234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6235 (exit $ac_status); }; }; then
6236 ac_lo=0 ac_mid=0
6237 while :; do
6238 cat >conftest.$ac_ext <<_ACEOF
6239#line $LINENO "configure"
6240#include "confdefs.h"
6241$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006242#ifdef F77_DUMMY_MAIN
6243# ifdef __cplusplus
6244 extern "C"
6245# endif
6246 int F77_DUMMY_MAIN() { return 1; }
6247#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006248int
6249main ()
6250{
6251static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6252test_array [0] = 0
6253
6254 ;
6255 return 0;
6256}
6257_ACEOF
6258rm -f conftest.$ac_objext
6259if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6260 (eval $ac_compile) 2>&5
6261 ac_status=$?
6262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6263 (exit $ac_status); } &&
6264 { ac_try='test -s conftest.$ac_objext'
6265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6266 (eval $ac_try) 2>&5
6267 ac_status=$?
6268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6269 (exit $ac_status); }; }; then
6270 ac_hi=$ac_mid; break
6271else
6272 echo "$as_me: failed program was:" >&5
6273cat conftest.$ac_ext >&5
6274ac_lo=`expr $ac_mid + 1`
6275 if test $ac_lo -le $ac_mid; then
6276 ac_lo= ac_hi=
6277 break
6278 fi
6279 ac_mid=`expr 2 '*' $ac_mid + 1`
6280fi
6281rm -f conftest.$ac_objext conftest.$ac_ext
6282 done
6283else
6284 echo "$as_me: failed program was:" >&5
6285cat conftest.$ac_ext >&5
6286cat >conftest.$ac_ext <<_ACEOF
6287#line $LINENO "configure"
6288#include "confdefs.h"
6289$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006290#ifdef F77_DUMMY_MAIN
6291# ifdef __cplusplus
6292 extern "C"
6293# endif
6294 int F77_DUMMY_MAIN() { return 1; }
6295#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006296int
6297main ()
6298{
6299static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6300test_array [0] = 0
6301
6302 ;
6303 return 0;
6304}
6305_ACEOF
6306rm -f conftest.$ac_objext
6307if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6308 (eval $ac_compile) 2>&5
6309 ac_status=$?
6310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6311 (exit $ac_status); } &&
6312 { ac_try='test -s conftest.$ac_objext'
6313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6314 (eval $ac_try) 2>&5
6315 ac_status=$?
6316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6317 (exit $ac_status); }; }; then
6318 ac_hi=-1 ac_mid=-1
6319 while :; do
6320 cat >conftest.$ac_ext <<_ACEOF
6321#line $LINENO "configure"
6322#include "confdefs.h"
6323$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006324#ifdef F77_DUMMY_MAIN
6325# ifdef __cplusplus
6326 extern "C"
6327# endif
6328 int F77_DUMMY_MAIN() { return 1; }
6329#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006330int
6331main ()
6332{
6333static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6334test_array [0] = 0
6335
6336 ;
6337 return 0;
6338}
6339_ACEOF
6340rm -f conftest.$ac_objext
6341if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6342 (eval $ac_compile) 2>&5
6343 ac_status=$?
6344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6345 (exit $ac_status); } &&
6346 { ac_try='test -s conftest.$ac_objext'
6347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6348 (eval $ac_try) 2>&5
6349 ac_status=$?
6350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6351 (exit $ac_status); }; }; then
6352 ac_lo=$ac_mid; break
6353else
6354 echo "$as_me: failed program was:" >&5
6355cat conftest.$ac_ext >&5
6356ac_hi=`expr '(' $ac_mid ')' - 1`
6357 if test $ac_mid -le $ac_hi; then
6358 ac_lo= ac_hi=
6359 break
6360 fi
6361 ac_mid=`expr 2 '*' $ac_mid`
6362fi
6363rm -f conftest.$ac_objext conftest.$ac_ext
6364 done
6365else
6366 echo "$as_me: failed program was:" >&5
6367cat conftest.$ac_ext >&5
6368ac_lo= ac_hi=
6369fi
6370rm -f conftest.$ac_objext conftest.$ac_ext
6371fi
6372rm -f conftest.$ac_objext conftest.$ac_ext
6373# Binary search between lo and hi bounds.
6374while test "x$ac_lo" != "x$ac_hi"; do
6375 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6376 cat >conftest.$ac_ext <<_ACEOF
6377#line $LINENO "configure"
6378#include "confdefs.h"
6379$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006380#ifdef F77_DUMMY_MAIN
6381# ifdef __cplusplus
6382 extern "C"
6383# endif
6384 int F77_DUMMY_MAIN() { return 1; }
6385#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006386int
6387main ()
6388{
6389static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6390test_array [0] = 0
6391
6392 ;
6393 return 0;
6394}
6395_ACEOF
6396rm -f conftest.$ac_objext
6397if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6398 (eval $ac_compile) 2>&5
6399 ac_status=$?
6400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6401 (exit $ac_status); } &&
6402 { ac_try='test -s conftest.$ac_objext'
6403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6404 (eval $ac_try) 2>&5
6405 ac_status=$?
6406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6407 (exit $ac_status); }; }; then
6408 ac_hi=$ac_mid
6409else
6410 echo "$as_me: failed program was:" >&5
6411cat conftest.$ac_ext >&5
6412ac_lo=`expr '(' $ac_mid ')' + 1`
6413fi
6414rm -f conftest.$ac_objext conftest.$ac_ext
6415done
6416case $ac_lo in
6417?*) ac_cv_sizeof_void_p=$ac_lo;;
6418'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6419echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6420 { (exit 1); exit 1; }; } ;;
6421esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006422else
6423 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006424 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6425echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6426 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006427else
Martin v. Löwis11437992002-04-12 09:54:03 +00006428 cat >conftest.$ac_ext <<_ACEOF
6429#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00006430#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006431$ac_includes_default
6432long longval () { return (long) (sizeof (void *)); }
6433unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006434#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006435#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00006436#ifdef F77_DUMMY_MAIN
6437# ifdef __cplusplus
6438 extern "C"
6439# endif
6440 int F77_DUMMY_MAIN() { return 1; }
6441#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006442int
6443main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006444{
Martin v. Löwis11437992002-04-12 09:54:03 +00006445
6446 FILE *f = fopen ("conftest.val", "w");
6447 if (! f)
6448 exit (1);
6449 if (((long) (sizeof (void *))) < 0)
6450 {
6451 long i = longval ();
6452 if (i != ((long) (sizeof (void *))))
6453 exit (1);
6454 fprintf (f, "%ld\n", i);
6455 }
6456 else
6457 {
6458 unsigned long i = ulongval ();
6459 if (i != ((long) (sizeof (void *))))
6460 exit (1);
6461 fprintf (f, "%lu\n", i);
6462 }
6463 exit (ferror (f) || fclose (f) != 0);
6464
6465 ;
6466 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006467}
Martin v. Löwis11437992002-04-12 09:54:03 +00006468_ACEOF
6469rm -f conftest$ac_exeext
6470if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6471 (eval $ac_link) 2>&5
6472 ac_status=$?
6473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6474 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6475 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6476 (eval $ac_try) 2>&5
6477 ac_status=$?
6478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6479 (exit $ac_status); }; }; then
6480 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006481else
Martin v. Löwis11437992002-04-12 09:54:03 +00006482 echo "$as_me: program exited with status $ac_status" >&5
6483echo "$as_me: failed program was:" >&5
6484cat conftest.$ac_ext >&5
6485( exit $ac_status )
6486{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6487echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6488 { (exit 1); exit 1; }; }
6489fi
Barry Warsawfe33b792003-01-07 22:42:49 +00006490rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006491fi
6492fi
6493rm -f conftest.val
6494else
Guido van Rossumad678af1998-10-02 14:42:15 +00006495 ac_cv_sizeof_void_p=0
6496fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006497fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006498echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6499echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6500cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006501#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006502_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006503
6504
Martin v. Löwis11437992002-04-12 09:54:03 +00006505echo "$as_me:$LINENO: checking for char" >&5
6506echo $ECHO_N "checking for char... $ECHO_C" >&6
6507if test "${ac_cv_type_char+set}" = set; then
6508 echo $ECHO_N "(cached) $ECHO_C" >&6
6509else
6510 cat >conftest.$ac_ext <<_ACEOF
6511#line $LINENO "configure"
6512#include "confdefs.h"
6513$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006514#ifdef F77_DUMMY_MAIN
6515# ifdef __cplusplus
6516 extern "C"
6517# endif
6518 int F77_DUMMY_MAIN() { return 1; }
6519#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006520int
6521main ()
6522{
6523if ((char *) 0)
6524 return 0;
6525if (sizeof (char))
6526 return 0;
6527 ;
6528 return 0;
6529}
6530_ACEOF
6531rm -f conftest.$ac_objext
6532if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6533 (eval $ac_compile) 2>&5
6534 ac_status=$?
6535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6536 (exit $ac_status); } &&
6537 { ac_try='test -s conftest.$ac_objext'
6538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6539 (eval $ac_try) 2>&5
6540 ac_status=$?
6541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6542 (exit $ac_status); }; }; then
6543 ac_cv_type_char=yes
6544else
6545 echo "$as_me: failed program was:" >&5
6546cat conftest.$ac_ext >&5
6547ac_cv_type_char=no
6548fi
6549rm -f conftest.$ac_objext conftest.$ac_ext
6550fi
6551echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
6552echo "${ECHO_T}$ac_cv_type_char" >&6
6553
6554echo "$as_me:$LINENO: checking size of char" >&5
6555echo $ECHO_N "checking size of char... $ECHO_C" >&6
6556if test "${ac_cv_sizeof_char+set}" = set; then
6557 echo $ECHO_N "(cached) $ECHO_C" >&6
6558else
6559 if test "$ac_cv_type_char" = yes; then
6560 # The cast to unsigned long works around a bug in the HP C Compiler
6561 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6562 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6563 # This bug is HP SR number 8606223364.
6564 if test "$cross_compiling" = yes; then
6565 # Depending upon the size, compute the lo and hi bounds.
6566cat >conftest.$ac_ext <<_ACEOF
6567#line $LINENO "configure"
6568#include "confdefs.h"
6569$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006570#ifdef F77_DUMMY_MAIN
6571# ifdef __cplusplus
6572 extern "C"
6573# endif
6574 int F77_DUMMY_MAIN() { return 1; }
6575#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006576int
6577main ()
6578{
6579static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
6580test_array [0] = 0
6581
6582 ;
6583 return 0;
6584}
6585_ACEOF
6586rm -f conftest.$ac_objext
6587if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6588 (eval $ac_compile) 2>&5
6589 ac_status=$?
6590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6591 (exit $ac_status); } &&
6592 { ac_try='test -s conftest.$ac_objext'
6593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6594 (eval $ac_try) 2>&5
6595 ac_status=$?
6596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6597 (exit $ac_status); }; }; then
6598 ac_lo=0 ac_mid=0
6599 while :; do
6600 cat >conftest.$ac_ext <<_ACEOF
6601#line $LINENO "configure"
6602#include "confdefs.h"
6603$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006604#ifdef F77_DUMMY_MAIN
6605# ifdef __cplusplus
6606 extern "C"
6607# endif
6608 int F77_DUMMY_MAIN() { return 1; }
6609#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006610int
6611main ()
6612{
6613static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6614test_array [0] = 0
6615
6616 ;
6617 return 0;
6618}
6619_ACEOF
6620rm -f conftest.$ac_objext
6621if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6622 (eval $ac_compile) 2>&5
6623 ac_status=$?
6624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6625 (exit $ac_status); } &&
6626 { ac_try='test -s conftest.$ac_objext'
6627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6628 (eval $ac_try) 2>&5
6629 ac_status=$?
6630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6631 (exit $ac_status); }; }; then
6632 ac_hi=$ac_mid; break
6633else
6634 echo "$as_me: failed program was:" >&5
6635cat conftest.$ac_ext >&5
6636ac_lo=`expr $ac_mid + 1`
6637 if test $ac_lo -le $ac_mid; then
6638 ac_lo= ac_hi=
6639 break
6640 fi
6641 ac_mid=`expr 2 '*' $ac_mid + 1`
6642fi
6643rm -f conftest.$ac_objext conftest.$ac_ext
6644 done
6645else
6646 echo "$as_me: failed program was:" >&5
6647cat conftest.$ac_ext >&5
6648cat >conftest.$ac_ext <<_ACEOF
6649#line $LINENO "configure"
6650#include "confdefs.h"
6651$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006652#ifdef F77_DUMMY_MAIN
6653# ifdef __cplusplus
6654 extern "C"
6655# endif
6656 int F77_DUMMY_MAIN() { return 1; }
6657#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006658int
6659main ()
6660{
6661static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
6662test_array [0] = 0
6663
6664 ;
6665 return 0;
6666}
6667_ACEOF
6668rm -f conftest.$ac_objext
6669if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6670 (eval $ac_compile) 2>&5
6671 ac_status=$?
6672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6673 (exit $ac_status); } &&
6674 { ac_try='test -s conftest.$ac_objext'
6675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6676 (eval $ac_try) 2>&5
6677 ac_status=$?
6678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6679 (exit $ac_status); }; }; then
6680 ac_hi=-1 ac_mid=-1
6681 while :; do
6682 cat >conftest.$ac_ext <<_ACEOF
6683#line $LINENO "configure"
6684#include "confdefs.h"
6685$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006686#ifdef F77_DUMMY_MAIN
6687# ifdef __cplusplus
6688 extern "C"
6689# endif
6690 int F77_DUMMY_MAIN() { return 1; }
6691#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006692int
6693main ()
6694{
6695static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
6696test_array [0] = 0
6697
6698 ;
6699 return 0;
6700}
6701_ACEOF
6702rm -f conftest.$ac_objext
6703if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6704 (eval $ac_compile) 2>&5
6705 ac_status=$?
6706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6707 (exit $ac_status); } &&
6708 { ac_try='test -s conftest.$ac_objext'
6709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6710 (eval $ac_try) 2>&5
6711 ac_status=$?
6712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6713 (exit $ac_status); }; }; then
6714 ac_lo=$ac_mid; break
6715else
6716 echo "$as_me: failed program was:" >&5
6717cat conftest.$ac_ext >&5
6718ac_hi=`expr '(' $ac_mid ')' - 1`
6719 if test $ac_mid -le $ac_hi; then
6720 ac_lo= ac_hi=
6721 break
6722 fi
6723 ac_mid=`expr 2 '*' $ac_mid`
6724fi
6725rm -f conftest.$ac_objext conftest.$ac_ext
6726 done
6727else
6728 echo "$as_me: failed program was:" >&5
6729cat conftest.$ac_ext >&5
6730ac_lo= ac_hi=
6731fi
6732rm -f conftest.$ac_objext conftest.$ac_ext
6733fi
6734rm -f conftest.$ac_objext conftest.$ac_ext
6735# Binary search between lo and hi bounds.
6736while test "x$ac_lo" != "x$ac_hi"; do
6737 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6738 cat >conftest.$ac_ext <<_ACEOF
6739#line $LINENO "configure"
6740#include "confdefs.h"
6741$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006742#ifdef F77_DUMMY_MAIN
6743# ifdef __cplusplus
6744 extern "C"
6745# endif
6746 int F77_DUMMY_MAIN() { return 1; }
6747#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006748int
6749main ()
6750{
6751static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6752test_array [0] = 0
6753
6754 ;
6755 return 0;
6756}
6757_ACEOF
6758rm -f conftest.$ac_objext
6759if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6760 (eval $ac_compile) 2>&5
6761 ac_status=$?
6762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6763 (exit $ac_status); } &&
6764 { ac_try='test -s conftest.$ac_objext'
6765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6766 (eval $ac_try) 2>&5
6767 ac_status=$?
6768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6769 (exit $ac_status); }; }; then
6770 ac_hi=$ac_mid
6771else
6772 echo "$as_me: failed program was:" >&5
6773cat conftest.$ac_ext >&5
6774ac_lo=`expr '(' $ac_mid ')' + 1`
6775fi
6776rm -f conftest.$ac_objext conftest.$ac_ext
6777done
6778case $ac_lo in
6779?*) ac_cv_sizeof_char=$ac_lo;;
6780'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6781echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6782 { (exit 1); exit 1; }; } ;;
6783esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006784else
6785 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006786 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6787echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6788 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006789else
Martin v. Löwis11437992002-04-12 09:54:03 +00006790 cat >conftest.$ac_ext <<_ACEOF
6791#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006792#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006793$ac_includes_default
6794long longval () { return (long) (sizeof (char)); }
6795unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006796#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006797#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00006798#ifdef F77_DUMMY_MAIN
6799# ifdef __cplusplus
6800 extern "C"
6801# endif
6802 int F77_DUMMY_MAIN() { return 1; }
6803#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006804int
6805main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006806{
Martin v. Löwis11437992002-04-12 09:54:03 +00006807
6808 FILE *f = fopen ("conftest.val", "w");
6809 if (! f)
6810 exit (1);
6811 if (((long) (sizeof (char))) < 0)
6812 {
6813 long i = longval ();
6814 if (i != ((long) (sizeof (char))))
6815 exit (1);
6816 fprintf (f, "%ld\n", i);
6817 }
6818 else
6819 {
6820 unsigned long i = ulongval ();
6821 if (i != ((long) (sizeof (char))))
6822 exit (1);
6823 fprintf (f, "%lu\n", i);
6824 }
6825 exit (ferror (f) || fclose (f) != 0);
6826
6827 ;
6828 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006829}
Martin v. Löwis11437992002-04-12 09:54:03 +00006830_ACEOF
6831rm -f conftest$ac_exeext
6832if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6833 (eval $ac_link) 2>&5
6834 ac_status=$?
6835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6836 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6837 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6838 (eval $ac_try) 2>&5
6839 ac_status=$?
6840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6841 (exit $ac_status); }; }; then
6842 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006843else
Martin v. Löwis11437992002-04-12 09:54:03 +00006844 echo "$as_me: program exited with status $ac_status" >&5
6845echo "$as_me: failed program was:" >&5
6846cat conftest.$ac_ext >&5
6847( exit $ac_status )
6848{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6849echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6850 { (exit 1); exit 1; }; }
6851fi
Barry Warsawfe33b792003-01-07 22:42:49 +00006852rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006853fi
6854fi
6855rm -f conftest.val
6856else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006857 ac_cv_sizeof_char=0
6858fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006859fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006860echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6861echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6862cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006863#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006864_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006865
6866
Martin v. Löwis11437992002-04-12 09:54:03 +00006867echo "$as_me:$LINENO: checking for short" >&5
6868echo $ECHO_N "checking for short... $ECHO_C" >&6
6869if test "${ac_cv_type_short+set}" = set; then
6870 echo $ECHO_N "(cached) $ECHO_C" >&6
6871else
6872 cat >conftest.$ac_ext <<_ACEOF
6873#line $LINENO "configure"
6874#include "confdefs.h"
6875$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006876#ifdef F77_DUMMY_MAIN
6877# ifdef __cplusplus
6878 extern "C"
6879# endif
6880 int F77_DUMMY_MAIN() { return 1; }
6881#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006882int
6883main ()
6884{
6885if ((short *) 0)
6886 return 0;
6887if (sizeof (short))
6888 return 0;
6889 ;
6890 return 0;
6891}
6892_ACEOF
6893rm -f conftest.$ac_objext
6894if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6895 (eval $ac_compile) 2>&5
6896 ac_status=$?
6897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6898 (exit $ac_status); } &&
6899 { ac_try='test -s conftest.$ac_objext'
6900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6901 (eval $ac_try) 2>&5
6902 ac_status=$?
6903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6904 (exit $ac_status); }; }; then
6905 ac_cv_type_short=yes
6906else
6907 echo "$as_me: failed program was:" >&5
6908cat conftest.$ac_ext >&5
6909ac_cv_type_short=no
6910fi
6911rm -f conftest.$ac_objext conftest.$ac_ext
6912fi
6913echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6914echo "${ECHO_T}$ac_cv_type_short" >&6
6915
6916echo "$as_me:$LINENO: checking size of short" >&5
6917echo $ECHO_N "checking size of short... $ECHO_C" >&6
6918if test "${ac_cv_sizeof_short+set}" = set; then
6919 echo $ECHO_N "(cached) $ECHO_C" >&6
6920else
6921 if test "$ac_cv_type_short" = yes; then
6922 # The cast to unsigned long works around a bug in the HP C Compiler
6923 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6924 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6925 # This bug is HP SR number 8606223364.
6926 if test "$cross_compiling" = yes; then
6927 # Depending upon the size, compute the lo and hi bounds.
6928cat >conftest.$ac_ext <<_ACEOF
6929#line $LINENO "configure"
6930#include "confdefs.h"
6931$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006932#ifdef F77_DUMMY_MAIN
6933# ifdef __cplusplus
6934 extern "C"
6935# endif
6936 int F77_DUMMY_MAIN() { return 1; }
6937#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006938int
6939main ()
6940{
6941static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6942test_array [0] = 0
6943
6944 ;
6945 return 0;
6946}
6947_ACEOF
6948rm -f conftest.$ac_objext
6949if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6950 (eval $ac_compile) 2>&5
6951 ac_status=$?
6952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6953 (exit $ac_status); } &&
6954 { ac_try='test -s conftest.$ac_objext'
6955 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6956 (eval $ac_try) 2>&5
6957 ac_status=$?
6958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6959 (exit $ac_status); }; }; then
6960 ac_lo=0 ac_mid=0
6961 while :; do
6962 cat >conftest.$ac_ext <<_ACEOF
6963#line $LINENO "configure"
6964#include "confdefs.h"
6965$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006966#ifdef F77_DUMMY_MAIN
6967# ifdef __cplusplus
6968 extern "C"
6969# endif
6970 int F77_DUMMY_MAIN() { return 1; }
6971#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006972int
6973main ()
6974{
6975static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6976test_array [0] = 0
6977
6978 ;
6979 return 0;
6980}
6981_ACEOF
6982rm -f conftest.$ac_objext
6983if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6984 (eval $ac_compile) 2>&5
6985 ac_status=$?
6986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6987 (exit $ac_status); } &&
6988 { ac_try='test -s conftest.$ac_objext'
6989 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6990 (eval $ac_try) 2>&5
6991 ac_status=$?
6992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6993 (exit $ac_status); }; }; then
6994 ac_hi=$ac_mid; break
6995else
6996 echo "$as_me: failed program was:" >&5
6997cat conftest.$ac_ext >&5
6998ac_lo=`expr $ac_mid + 1`
6999 if test $ac_lo -le $ac_mid; then
7000 ac_lo= ac_hi=
7001 break
7002 fi
7003 ac_mid=`expr 2 '*' $ac_mid + 1`
7004fi
7005rm -f conftest.$ac_objext conftest.$ac_ext
7006 done
7007else
7008 echo "$as_me: failed program was:" >&5
7009cat conftest.$ac_ext >&5
7010cat >conftest.$ac_ext <<_ACEOF
7011#line $LINENO "configure"
7012#include "confdefs.h"
7013$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007014#ifdef F77_DUMMY_MAIN
7015# ifdef __cplusplus
7016 extern "C"
7017# endif
7018 int F77_DUMMY_MAIN() { return 1; }
7019#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007020int
7021main ()
7022{
7023static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
7024test_array [0] = 0
7025
7026 ;
7027 return 0;
7028}
7029_ACEOF
7030rm -f conftest.$ac_objext
7031if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7032 (eval $ac_compile) 2>&5
7033 ac_status=$?
7034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7035 (exit $ac_status); } &&
7036 { ac_try='test -s conftest.$ac_objext'
7037 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7038 (eval $ac_try) 2>&5
7039 ac_status=$?
7040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7041 (exit $ac_status); }; }; then
7042 ac_hi=-1 ac_mid=-1
7043 while :; do
7044 cat >conftest.$ac_ext <<_ACEOF
7045#line $LINENO "configure"
7046#include "confdefs.h"
7047$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007048#ifdef F77_DUMMY_MAIN
7049# ifdef __cplusplus
7050 extern "C"
7051# endif
7052 int F77_DUMMY_MAIN() { return 1; }
7053#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007054int
7055main ()
7056{
7057static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
7058test_array [0] = 0
7059
7060 ;
7061 return 0;
7062}
7063_ACEOF
7064rm -f conftest.$ac_objext
7065if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7066 (eval $ac_compile) 2>&5
7067 ac_status=$?
7068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7069 (exit $ac_status); } &&
7070 { ac_try='test -s conftest.$ac_objext'
7071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7072 (eval $ac_try) 2>&5
7073 ac_status=$?
7074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7075 (exit $ac_status); }; }; then
7076 ac_lo=$ac_mid; break
7077else
7078 echo "$as_me: failed program was:" >&5
7079cat conftest.$ac_ext >&5
7080ac_hi=`expr '(' $ac_mid ')' - 1`
7081 if test $ac_mid -le $ac_hi; then
7082 ac_lo= ac_hi=
7083 break
7084 fi
7085 ac_mid=`expr 2 '*' $ac_mid`
7086fi
7087rm -f conftest.$ac_objext conftest.$ac_ext
7088 done
7089else
7090 echo "$as_me: failed program was:" >&5
7091cat conftest.$ac_ext >&5
7092ac_lo= ac_hi=
7093fi
7094rm -f conftest.$ac_objext conftest.$ac_ext
7095fi
7096rm -f conftest.$ac_objext conftest.$ac_ext
7097# Binary search between lo and hi bounds.
7098while test "x$ac_lo" != "x$ac_hi"; do
7099 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7100 cat >conftest.$ac_ext <<_ACEOF
7101#line $LINENO "configure"
7102#include "confdefs.h"
7103$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007104#ifdef F77_DUMMY_MAIN
7105# ifdef __cplusplus
7106 extern "C"
7107# endif
7108 int F77_DUMMY_MAIN() { return 1; }
7109#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007110int
7111main ()
7112{
7113static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7114test_array [0] = 0
7115
7116 ;
7117 return 0;
7118}
7119_ACEOF
7120rm -f conftest.$ac_objext
7121if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7122 (eval $ac_compile) 2>&5
7123 ac_status=$?
7124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7125 (exit $ac_status); } &&
7126 { ac_try='test -s conftest.$ac_objext'
7127 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7128 (eval $ac_try) 2>&5
7129 ac_status=$?
7130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7131 (exit $ac_status); }; }; then
7132 ac_hi=$ac_mid
7133else
7134 echo "$as_me: failed program was:" >&5
7135cat conftest.$ac_ext >&5
7136ac_lo=`expr '(' $ac_mid ')' + 1`
7137fi
7138rm -f conftest.$ac_objext conftest.$ac_ext
7139done
7140case $ac_lo in
7141?*) ac_cv_sizeof_short=$ac_lo;;
7142'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
7143echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
7144 { (exit 1); exit 1; }; } ;;
7145esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007146else
7147 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007148 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7149echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7150 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007151else
Martin v. Löwis11437992002-04-12 09:54:03 +00007152 cat >conftest.$ac_ext <<_ACEOF
7153#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007154#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007155$ac_includes_default
7156long longval () { return (long) (sizeof (short)); }
7157unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007158#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007159#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00007160#ifdef F77_DUMMY_MAIN
7161# ifdef __cplusplus
7162 extern "C"
7163# endif
7164 int F77_DUMMY_MAIN() { return 1; }
7165#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007166int
7167main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007168{
Martin v. Löwis11437992002-04-12 09:54:03 +00007169
7170 FILE *f = fopen ("conftest.val", "w");
7171 if (! f)
7172 exit (1);
7173 if (((long) (sizeof (short))) < 0)
7174 {
7175 long i = longval ();
7176 if (i != ((long) (sizeof (short))))
7177 exit (1);
7178 fprintf (f, "%ld\n", i);
7179 }
7180 else
7181 {
7182 unsigned long i = ulongval ();
7183 if (i != ((long) (sizeof (short))))
7184 exit (1);
7185 fprintf (f, "%lu\n", i);
7186 }
7187 exit (ferror (f) || fclose (f) != 0);
7188
7189 ;
7190 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007191}
Martin v. Löwis11437992002-04-12 09:54:03 +00007192_ACEOF
7193rm -f conftest$ac_exeext
7194if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7195 (eval $ac_link) 2>&5
7196 ac_status=$?
7197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7198 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7200 (eval $ac_try) 2>&5
7201 ac_status=$?
7202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7203 (exit $ac_status); }; }; then
7204 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007205else
Martin v. Löwis11437992002-04-12 09:54:03 +00007206 echo "$as_me: program exited with status $ac_status" >&5
7207echo "$as_me: failed program was:" >&5
7208cat conftest.$ac_ext >&5
7209( exit $ac_status )
7210{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
7211echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
7212 { (exit 1); exit 1; }; }
7213fi
Barry Warsawfe33b792003-01-07 22:42:49 +00007214rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007215fi
7216fi
7217rm -f conftest.val
7218else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007219 ac_cv_sizeof_short=0
7220fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007221fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007222echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7223echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7224cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007225#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007226_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007227
7228
Martin v. Löwis11437992002-04-12 09:54:03 +00007229echo "$as_me:$LINENO: checking for float" >&5
7230echo $ECHO_N "checking for float... $ECHO_C" >&6
7231if test "${ac_cv_type_float+set}" = set; then
7232 echo $ECHO_N "(cached) $ECHO_C" >&6
7233else
7234 cat >conftest.$ac_ext <<_ACEOF
7235#line $LINENO "configure"
7236#include "confdefs.h"
7237$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007238#ifdef F77_DUMMY_MAIN
7239# ifdef __cplusplus
7240 extern "C"
7241# endif
7242 int F77_DUMMY_MAIN() { return 1; }
7243#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007244int
7245main ()
7246{
7247if ((float *) 0)
7248 return 0;
7249if (sizeof (float))
7250 return 0;
7251 ;
7252 return 0;
7253}
7254_ACEOF
7255rm -f conftest.$ac_objext
7256if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7257 (eval $ac_compile) 2>&5
7258 ac_status=$?
7259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7260 (exit $ac_status); } &&
7261 { ac_try='test -s conftest.$ac_objext'
7262 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7263 (eval $ac_try) 2>&5
7264 ac_status=$?
7265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7266 (exit $ac_status); }; }; then
7267 ac_cv_type_float=yes
7268else
7269 echo "$as_me: failed program was:" >&5
7270cat conftest.$ac_ext >&5
7271ac_cv_type_float=no
7272fi
7273rm -f conftest.$ac_objext conftest.$ac_ext
7274fi
7275echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7276echo "${ECHO_T}$ac_cv_type_float" >&6
7277
7278echo "$as_me:$LINENO: checking size of float" >&5
7279echo $ECHO_N "checking size of float... $ECHO_C" >&6
7280if test "${ac_cv_sizeof_float+set}" = set; then
7281 echo $ECHO_N "(cached) $ECHO_C" >&6
7282else
7283 if test "$ac_cv_type_float" = yes; then
7284 # The cast to unsigned long works around a bug in the HP C Compiler
7285 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7286 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7287 # This bug is HP SR number 8606223364.
7288 if test "$cross_compiling" = yes; then
7289 # Depending upon the size, compute the lo and hi bounds.
7290cat >conftest.$ac_ext <<_ACEOF
7291#line $LINENO "configure"
7292#include "confdefs.h"
7293$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007294#ifdef F77_DUMMY_MAIN
7295# ifdef __cplusplus
7296 extern "C"
7297# endif
7298 int F77_DUMMY_MAIN() { return 1; }
7299#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007300int
7301main ()
7302{
7303static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7304test_array [0] = 0
7305
7306 ;
7307 return 0;
7308}
7309_ACEOF
7310rm -f conftest.$ac_objext
7311if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7312 (eval $ac_compile) 2>&5
7313 ac_status=$?
7314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7315 (exit $ac_status); } &&
7316 { ac_try='test -s conftest.$ac_objext'
7317 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7318 (eval $ac_try) 2>&5
7319 ac_status=$?
7320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7321 (exit $ac_status); }; }; then
7322 ac_lo=0 ac_mid=0
7323 while :; do
7324 cat >conftest.$ac_ext <<_ACEOF
7325#line $LINENO "configure"
7326#include "confdefs.h"
7327$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007328#ifdef F77_DUMMY_MAIN
7329# ifdef __cplusplus
7330 extern "C"
7331# endif
7332 int F77_DUMMY_MAIN() { return 1; }
7333#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007334int
7335main ()
7336{
7337static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7338test_array [0] = 0
7339
7340 ;
7341 return 0;
7342}
7343_ACEOF
7344rm -f conftest.$ac_objext
7345if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7346 (eval $ac_compile) 2>&5
7347 ac_status=$?
7348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7349 (exit $ac_status); } &&
7350 { ac_try='test -s conftest.$ac_objext'
7351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7352 (eval $ac_try) 2>&5
7353 ac_status=$?
7354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7355 (exit $ac_status); }; }; then
7356 ac_hi=$ac_mid; break
7357else
7358 echo "$as_me: failed program was:" >&5
7359cat conftest.$ac_ext >&5
7360ac_lo=`expr $ac_mid + 1`
7361 if test $ac_lo -le $ac_mid; then
7362 ac_lo= ac_hi=
7363 break
7364 fi
7365 ac_mid=`expr 2 '*' $ac_mid + 1`
7366fi
7367rm -f conftest.$ac_objext conftest.$ac_ext
7368 done
7369else
7370 echo "$as_me: failed program was:" >&5
7371cat conftest.$ac_ext >&5
7372cat >conftest.$ac_ext <<_ACEOF
7373#line $LINENO "configure"
7374#include "confdefs.h"
7375$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007376#ifdef F77_DUMMY_MAIN
7377# ifdef __cplusplus
7378 extern "C"
7379# endif
7380 int F77_DUMMY_MAIN() { return 1; }
7381#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007382int
7383main ()
7384{
7385static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7386test_array [0] = 0
7387
7388 ;
7389 return 0;
7390}
7391_ACEOF
7392rm -f conftest.$ac_objext
7393if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7394 (eval $ac_compile) 2>&5
7395 ac_status=$?
7396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7397 (exit $ac_status); } &&
7398 { ac_try='test -s conftest.$ac_objext'
7399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7400 (eval $ac_try) 2>&5
7401 ac_status=$?
7402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7403 (exit $ac_status); }; }; then
7404 ac_hi=-1 ac_mid=-1
7405 while :; do
7406 cat >conftest.$ac_ext <<_ACEOF
7407#line $LINENO "configure"
7408#include "confdefs.h"
7409$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007410#ifdef F77_DUMMY_MAIN
7411# ifdef __cplusplus
7412 extern "C"
7413# endif
7414 int F77_DUMMY_MAIN() { return 1; }
7415#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007416int
7417main ()
7418{
7419static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7420test_array [0] = 0
7421
7422 ;
7423 return 0;
7424}
7425_ACEOF
7426rm -f conftest.$ac_objext
7427if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7428 (eval $ac_compile) 2>&5
7429 ac_status=$?
7430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7431 (exit $ac_status); } &&
7432 { ac_try='test -s conftest.$ac_objext'
7433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7434 (eval $ac_try) 2>&5
7435 ac_status=$?
7436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7437 (exit $ac_status); }; }; then
7438 ac_lo=$ac_mid; break
7439else
7440 echo "$as_me: failed program was:" >&5
7441cat conftest.$ac_ext >&5
7442ac_hi=`expr '(' $ac_mid ')' - 1`
7443 if test $ac_mid -le $ac_hi; then
7444 ac_lo= ac_hi=
7445 break
7446 fi
7447 ac_mid=`expr 2 '*' $ac_mid`
7448fi
7449rm -f conftest.$ac_objext conftest.$ac_ext
7450 done
7451else
7452 echo "$as_me: failed program was:" >&5
7453cat conftest.$ac_ext >&5
7454ac_lo= ac_hi=
7455fi
7456rm -f conftest.$ac_objext conftest.$ac_ext
7457fi
7458rm -f conftest.$ac_objext conftest.$ac_ext
7459# Binary search between lo and hi bounds.
7460while test "x$ac_lo" != "x$ac_hi"; do
7461 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7462 cat >conftest.$ac_ext <<_ACEOF
7463#line $LINENO "configure"
7464#include "confdefs.h"
7465$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007466#ifdef F77_DUMMY_MAIN
7467# ifdef __cplusplus
7468 extern "C"
7469# endif
7470 int F77_DUMMY_MAIN() { return 1; }
7471#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007472int
7473main ()
7474{
7475static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7476test_array [0] = 0
7477
7478 ;
7479 return 0;
7480}
7481_ACEOF
7482rm -f conftest.$ac_objext
7483if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7484 (eval $ac_compile) 2>&5
7485 ac_status=$?
7486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7487 (exit $ac_status); } &&
7488 { ac_try='test -s conftest.$ac_objext'
7489 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7490 (eval $ac_try) 2>&5
7491 ac_status=$?
7492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7493 (exit $ac_status); }; }; then
7494 ac_hi=$ac_mid
7495else
7496 echo "$as_me: failed program was:" >&5
7497cat conftest.$ac_ext >&5
7498ac_lo=`expr '(' $ac_mid ')' + 1`
7499fi
7500rm -f conftest.$ac_objext conftest.$ac_ext
7501done
7502case $ac_lo in
7503?*) ac_cv_sizeof_float=$ac_lo;;
7504'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7505echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7506 { (exit 1); exit 1; }; } ;;
7507esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007508else
7509 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007510 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7511echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7512 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007513else
Martin v. Löwis11437992002-04-12 09:54:03 +00007514 cat >conftest.$ac_ext <<_ACEOF
7515#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007516#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007517$ac_includes_default
7518long longval () { return (long) (sizeof (float)); }
7519unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007520#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007521#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00007522#ifdef F77_DUMMY_MAIN
7523# ifdef __cplusplus
7524 extern "C"
7525# endif
7526 int F77_DUMMY_MAIN() { return 1; }
7527#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007528int
7529main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007530{
Martin v. Löwis11437992002-04-12 09:54:03 +00007531
7532 FILE *f = fopen ("conftest.val", "w");
7533 if (! f)
7534 exit (1);
7535 if (((long) (sizeof (float))) < 0)
7536 {
7537 long i = longval ();
7538 if (i != ((long) (sizeof (float))))
7539 exit (1);
7540 fprintf (f, "%ld\n", i);
7541 }
7542 else
7543 {
7544 unsigned long i = ulongval ();
7545 if (i != ((long) (sizeof (float))))
7546 exit (1);
7547 fprintf (f, "%lu\n", i);
7548 }
7549 exit (ferror (f) || fclose (f) != 0);
7550
7551 ;
7552 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007553}
Martin v. Löwis11437992002-04-12 09:54:03 +00007554_ACEOF
7555rm -f conftest$ac_exeext
7556if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7557 (eval $ac_link) 2>&5
7558 ac_status=$?
7559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7560 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7562 (eval $ac_try) 2>&5
7563 ac_status=$?
7564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7565 (exit $ac_status); }; }; then
7566 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007567else
Martin v. Löwis11437992002-04-12 09:54:03 +00007568 echo "$as_me: program exited with status $ac_status" >&5
7569echo "$as_me: failed program was:" >&5
7570cat conftest.$ac_ext >&5
7571( exit $ac_status )
7572{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7573echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7574 { (exit 1); exit 1; }; }
7575fi
Barry Warsawfe33b792003-01-07 22:42:49 +00007576rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007577fi
7578fi
7579rm -f conftest.val
7580else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007581 ac_cv_sizeof_float=0
7582fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007583fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007584echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7585echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7586cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007587#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007588_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007589
7590
Martin v. Löwis11437992002-04-12 09:54:03 +00007591echo "$as_me:$LINENO: checking for double" >&5
7592echo $ECHO_N "checking for double... $ECHO_C" >&6
7593if test "${ac_cv_type_double+set}" = set; then
7594 echo $ECHO_N "(cached) $ECHO_C" >&6
7595else
7596 cat >conftest.$ac_ext <<_ACEOF
7597#line $LINENO "configure"
7598#include "confdefs.h"
7599$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007600#ifdef F77_DUMMY_MAIN
7601# ifdef __cplusplus
7602 extern "C"
7603# endif
7604 int F77_DUMMY_MAIN() { return 1; }
7605#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007606int
7607main ()
7608{
7609if ((double *) 0)
7610 return 0;
7611if (sizeof (double))
7612 return 0;
7613 ;
7614 return 0;
7615}
7616_ACEOF
7617rm -f conftest.$ac_objext
7618if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7619 (eval $ac_compile) 2>&5
7620 ac_status=$?
7621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7622 (exit $ac_status); } &&
7623 { ac_try='test -s conftest.$ac_objext'
7624 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7625 (eval $ac_try) 2>&5
7626 ac_status=$?
7627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7628 (exit $ac_status); }; }; then
7629 ac_cv_type_double=yes
7630else
7631 echo "$as_me: failed program was:" >&5
7632cat conftest.$ac_ext >&5
7633ac_cv_type_double=no
7634fi
7635rm -f conftest.$ac_objext conftest.$ac_ext
7636fi
7637echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7638echo "${ECHO_T}$ac_cv_type_double" >&6
7639
7640echo "$as_me:$LINENO: checking size of double" >&5
7641echo $ECHO_N "checking size of double... $ECHO_C" >&6
7642if test "${ac_cv_sizeof_double+set}" = set; then
7643 echo $ECHO_N "(cached) $ECHO_C" >&6
7644else
7645 if test "$ac_cv_type_double" = yes; then
7646 # The cast to unsigned long works around a bug in the HP C Compiler
7647 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7648 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7649 # This bug is HP SR number 8606223364.
7650 if test "$cross_compiling" = yes; then
7651 # Depending upon the size, compute the lo and hi bounds.
7652cat >conftest.$ac_ext <<_ACEOF
7653#line $LINENO "configure"
7654#include "confdefs.h"
7655$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007656#ifdef F77_DUMMY_MAIN
7657# ifdef __cplusplus
7658 extern "C"
7659# endif
7660 int F77_DUMMY_MAIN() { return 1; }
7661#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007662int
7663main ()
7664{
7665static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7666test_array [0] = 0
7667
7668 ;
7669 return 0;
7670}
7671_ACEOF
7672rm -f conftest.$ac_objext
7673if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7674 (eval $ac_compile) 2>&5
7675 ac_status=$?
7676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7677 (exit $ac_status); } &&
7678 { ac_try='test -s conftest.$ac_objext'
7679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7680 (eval $ac_try) 2>&5
7681 ac_status=$?
7682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7683 (exit $ac_status); }; }; then
7684 ac_lo=0 ac_mid=0
7685 while :; do
7686 cat >conftest.$ac_ext <<_ACEOF
7687#line $LINENO "configure"
7688#include "confdefs.h"
7689$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007690#ifdef F77_DUMMY_MAIN
7691# ifdef __cplusplus
7692 extern "C"
7693# endif
7694 int F77_DUMMY_MAIN() { return 1; }
7695#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007696int
7697main ()
7698{
7699static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7700test_array [0] = 0
7701
7702 ;
7703 return 0;
7704}
7705_ACEOF
7706rm -f conftest.$ac_objext
7707if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7708 (eval $ac_compile) 2>&5
7709 ac_status=$?
7710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7711 (exit $ac_status); } &&
7712 { ac_try='test -s conftest.$ac_objext'
7713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7714 (eval $ac_try) 2>&5
7715 ac_status=$?
7716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7717 (exit $ac_status); }; }; then
7718 ac_hi=$ac_mid; break
7719else
7720 echo "$as_me: failed program was:" >&5
7721cat conftest.$ac_ext >&5
7722ac_lo=`expr $ac_mid + 1`
7723 if test $ac_lo -le $ac_mid; then
7724 ac_lo= ac_hi=
7725 break
7726 fi
7727 ac_mid=`expr 2 '*' $ac_mid + 1`
7728fi
7729rm -f conftest.$ac_objext conftest.$ac_ext
7730 done
7731else
7732 echo "$as_me: failed program was:" >&5
7733cat conftest.$ac_ext >&5
7734cat >conftest.$ac_ext <<_ACEOF
7735#line $LINENO "configure"
7736#include "confdefs.h"
7737$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007738#ifdef F77_DUMMY_MAIN
7739# ifdef __cplusplus
7740 extern "C"
7741# endif
7742 int F77_DUMMY_MAIN() { return 1; }
7743#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007744int
7745main ()
7746{
7747static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7748test_array [0] = 0
7749
7750 ;
7751 return 0;
7752}
7753_ACEOF
7754rm -f conftest.$ac_objext
7755if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7756 (eval $ac_compile) 2>&5
7757 ac_status=$?
7758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7759 (exit $ac_status); } &&
7760 { ac_try='test -s conftest.$ac_objext'
7761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7762 (eval $ac_try) 2>&5
7763 ac_status=$?
7764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7765 (exit $ac_status); }; }; then
7766 ac_hi=-1 ac_mid=-1
7767 while :; do
7768 cat >conftest.$ac_ext <<_ACEOF
7769#line $LINENO "configure"
7770#include "confdefs.h"
7771$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007772#ifdef F77_DUMMY_MAIN
7773# ifdef __cplusplus
7774 extern "C"
7775# endif
7776 int F77_DUMMY_MAIN() { return 1; }
7777#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007778int
7779main ()
7780{
7781static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7782test_array [0] = 0
7783
7784 ;
7785 return 0;
7786}
7787_ACEOF
7788rm -f conftest.$ac_objext
7789if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7790 (eval $ac_compile) 2>&5
7791 ac_status=$?
7792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7793 (exit $ac_status); } &&
7794 { ac_try='test -s conftest.$ac_objext'
7795 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7796 (eval $ac_try) 2>&5
7797 ac_status=$?
7798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7799 (exit $ac_status); }; }; then
7800 ac_lo=$ac_mid; break
7801else
7802 echo "$as_me: failed program was:" >&5
7803cat conftest.$ac_ext >&5
7804ac_hi=`expr '(' $ac_mid ')' - 1`
7805 if test $ac_mid -le $ac_hi; then
7806 ac_lo= ac_hi=
7807 break
7808 fi
7809 ac_mid=`expr 2 '*' $ac_mid`
7810fi
7811rm -f conftest.$ac_objext conftest.$ac_ext
7812 done
7813else
7814 echo "$as_me: failed program was:" >&5
7815cat conftest.$ac_ext >&5
7816ac_lo= ac_hi=
7817fi
7818rm -f conftest.$ac_objext conftest.$ac_ext
7819fi
7820rm -f conftest.$ac_objext conftest.$ac_ext
7821# Binary search between lo and hi bounds.
7822while test "x$ac_lo" != "x$ac_hi"; do
7823 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7824 cat >conftest.$ac_ext <<_ACEOF
7825#line $LINENO "configure"
7826#include "confdefs.h"
7827$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007828#ifdef F77_DUMMY_MAIN
7829# ifdef __cplusplus
7830 extern "C"
7831# endif
7832 int F77_DUMMY_MAIN() { return 1; }
7833#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007834int
7835main ()
7836{
7837static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7838test_array [0] = 0
7839
7840 ;
7841 return 0;
7842}
7843_ACEOF
7844rm -f conftest.$ac_objext
7845if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7846 (eval $ac_compile) 2>&5
7847 ac_status=$?
7848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7849 (exit $ac_status); } &&
7850 { ac_try='test -s conftest.$ac_objext'
7851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7852 (eval $ac_try) 2>&5
7853 ac_status=$?
7854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7855 (exit $ac_status); }; }; then
7856 ac_hi=$ac_mid
7857else
7858 echo "$as_me: failed program was:" >&5
7859cat conftest.$ac_ext >&5
7860ac_lo=`expr '(' $ac_mid ')' + 1`
7861fi
7862rm -f conftest.$ac_objext conftest.$ac_ext
7863done
7864case $ac_lo in
7865?*) ac_cv_sizeof_double=$ac_lo;;
7866'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7867echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7868 { (exit 1); exit 1; }; } ;;
7869esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007870else
7871 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007872 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7873echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7874 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007875else
Martin v. Löwis11437992002-04-12 09:54:03 +00007876 cat >conftest.$ac_ext <<_ACEOF
7877#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007878#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007879$ac_includes_default
7880long longval () { return (long) (sizeof (double)); }
7881unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007882#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007883#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00007884#ifdef F77_DUMMY_MAIN
7885# ifdef __cplusplus
7886 extern "C"
7887# endif
7888 int F77_DUMMY_MAIN() { return 1; }
7889#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007890int
7891main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007892{
Martin v. Löwis11437992002-04-12 09:54:03 +00007893
7894 FILE *f = fopen ("conftest.val", "w");
7895 if (! f)
7896 exit (1);
7897 if (((long) (sizeof (double))) < 0)
7898 {
7899 long i = longval ();
7900 if (i != ((long) (sizeof (double))))
7901 exit (1);
7902 fprintf (f, "%ld\n", i);
7903 }
7904 else
7905 {
7906 unsigned long i = ulongval ();
7907 if (i != ((long) (sizeof (double))))
7908 exit (1);
7909 fprintf (f, "%lu\n", i);
7910 }
7911 exit (ferror (f) || fclose (f) != 0);
7912
7913 ;
7914 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007915}
Martin v. Löwis11437992002-04-12 09:54:03 +00007916_ACEOF
7917rm -f conftest$ac_exeext
7918if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7919 (eval $ac_link) 2>&5
7920 ac_status=$?
7921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7922 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7923 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7924 (eval $ac_try) 2>&5
7925 ac_status=$?
7926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7927 (exit $ac_status); }; }; then
7928 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007929else
Martin v. Löwis11437992002-04-12 09:54:03 +00007930 echo "$as_me: program exited with status $ac_status" >&5
7931echo "$as_me: failed program was:" >&5
7932cat conftest.$ac_ext >&5
7933( exit $ac_status )
7934{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7935echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7936 { (exit 1); exit 1; }; }
7937fi
Barry Warsawfe33b792003-01-07 22:42:49 +00007938rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007939fi
7940fi
7941rm -f conftest.val
7942else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007943 ac_cv_sizeof_double=0
7944fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007945fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007946echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7947echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7948cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007949#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007950_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007951
7952
Martin v. Löwis11437992002-04-12 09:54:03 +00007953echo "$as_me:$LINENO: checking for fpos_t" >&5
7954echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7955if test "${ac_cv_type_fpos_t+set}" = set; then
7956 echo $ECHO_N "(cached) $ECHO_C" >&6
7957else
7958 cat >conftest.$ac_ext <<_ACEOF
7959#line $LINENO "configure"
7960#include "confdefs.h"
7961$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007962#ifdef F77_DUMMY_MAIN
7963# ifdef __cplusplus
7964 extern "C"
7965# endif
7966 int F77_DUMMY_MAIN() { return 1; }
7967#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007968int
7969main ()
7970{
7971if ((fpos_t *) 0)
7972 return 0;
7973if (sizeof (fpos_t))
7974 return 0;
7975 ;
7976 return 0;
7977}
7978_ACEOF
7979rm -f conftest.$ac_objext
7980if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7981 (eval $ac_compile) 2>&5
7982 ac_status=$?
7983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7984 (exit $ac_status); } &&
7985 { ac_try='test -s conftest.$ac_objext'
7986 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7987 (eval $ac_try) 2>&5
7988 ac_status=$?
7989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7990 (exit $ac_status); }; }; then
7991 ac_cv_type_fpos_t=yes
7992else
7993 echo "$as_me: failed program was:" >&5
7994cat conftest.$ac_ext >&5
7995ac_cv_type_fpos_t=no
7996fi
7997rm -f conftest.$ac_objext conftest.$ac_ext
7998fi
7999echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
8000echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
8001
8002echo "$as_me:$LINENO: checking size of fpos_t" >&5
8003echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
8004if test "${ac_cv_sizeof_fpos_t+set}" = set; then
8005 echo $ECHO_N "(cached) $ECHO_C" >&6
8006else
8007 if test "$ac_cv_type_fpos_t" = yes; then
8008 # The cast to unsigned long works around a bug in the HP C Compiler
8009 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8010 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8011 # This bug is HP SR number 8606223364.
8012 if test "$cross_compiling" = yes; then
8013 # Depending upon the size, compute the lo and hi bounds.
8014cat >conftest.$ac_ext <<_ACEOF
8015#line $LINENO "configure"
8016#include "confdefs.h"
8017$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008018#ifdef F77_DUMMY_MAIN
8019# ifdef __cplusplus
8020 extern "C"
8021# endif
8022 int F77_DUMMY_MAIN() { return 1; }
8023#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008024int
8025main ()
8026{
8027static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
8028test_array [0] = 0
8029
8030 ;
8031 return 0;
8032}
8033_ACEOF
8034rm -f conftest.$ac_objext
8035if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8036 (eval $ac_compile) 2>&5
8037 ac_status=$?
8038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8039 (exit $ac_status); } &&
8040 { ac_try='test -s conftest.$ac_objext'
8041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8042 (eval $ac_try) 2>&5
8043 ac_status=$?
8044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8045 (exit $ac_status); }; }; then
8046 ac_lo=0 ac_mid=0
8047 while :; do
8048 cat >conftest.$ac_ext <<_ACEOF
8049#line $LINENO "configure"
8050#include "confdefs.h"
8051$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008052#ifdef F77_DUMMY_MAIN
8053# ifdef __cplusplus
8054 extern "C"
8055# endif
8056 int F77_DUMMY_MAIN() { return 1; }
8057#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008058int
8059main ()
8060{
8061static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8062test_array [0] = 0
8063
8064 ;
8065 return 0;
8066}
8067_ACEOF
8068rm -f conftest.$ac_objext
8069if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8070 (eval $ac_compile) 2>&5
8071 ac_status=$?
8072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8073 (exit $ac_status); } &&
8074 { ac_try='test -s conftest.$ac_objext'
8075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8076 (eval $ac_try) 2>&5
8077 ac_status=$?
8078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8079 (exit $ac_status); }; }; then
8080 ac_hi=$ac_mid; break
8081else
8082 echo "$as_me: failed program was:" >&5
8083cat conftest.$ac_ext >&5
8084ac_lo=`expr $ac_mid + 1`
8085 if test $ac_lo -le $ac_mid; then
8086 ac_lo= ac_hi=
8087 break
8088 fi
8089 ac_mid=`expr 2 '*' $ac_mid + 1`
8090fi
8091rm -f conftest.$ac_objext conftest.$ac_ext
8092 done
8093else
8094 echo "$as_me: failed program was:" >&5
8095cat conftest.$ac_ext >&5
8096cat >conftest.$ac_ext <<_ACEOF
8097#line $LINENO "configure"
8098#include "confdefs.h"
8099$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008100#ifdef F77_DUMMY_MAIN
8101# ifdef __cplusplus
8102 extern "C"
8103# endif
8104 int F77_DUMMY_MAIN() { return 1; }
8105#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008106int
8107main ()
8108{
8109static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
8110test_array [0] = 0
8111
8112 ;
8113 return 0;
8114}
8115_ACEOF
8116rm -f conftest.$ac_objext
8117if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8118 (eval $ac_compile) 2>&5
8119 ac_status=$?
8120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8121 (exit $ac_status); } &&
8122 { ac_try='test -s conftest.$ac_objext'
8123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8124 (eval $ac_try) 2>&5
8125 ac_status=$?
8126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8127 (exit $ac_status); }; }; then
8128 ac_hi=-1 ac_mid=-1
8129 while :; do
8130 cat >conftest.$ac_ext <<_ACEOF
8131#line $LINENO "configure"
8132#include "confdefs.h"
8133$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008134#ifdef F77_DUMMY_MAIN
8135# ifdef __cplusplus
8136 extern "C"
8137# endif
8138 int F77_DUMMY_MAIN() { return 1; }
8139#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008140int
8141main ()
8142{
8143static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8144test_array [0] = 0
8145
8146 ;
8147 return 0;
8148}
8149_ACEOF
8150rm -f conftest.$ac_objext
8151if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8152 (eval $ac_compile) 2>&5
8153 ac_status=$?
8154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8155 (exit $ac_status); } &&
8156 { ac_try='test -s conftest.$ac_objext'
8157 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8158 (eval $ac_try) 2>&5
8159 ac_status=$?
8160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8161 (exit $ac_status); }; }; then
8162 ac_lo=$ac_mid; break
8163else
8164 echo "$as_me: failed program was:" >&5
8165cat conftest.$ac_ext >&5
8166ac_hi=`expr '(' $ac_mid ')' - 1`
8167 if test $ac_mid -le $ac_hi; then
8168 ac_lo= ac_hi=
8169 break
8170 fi
8171 ac_mid=`expr 2 '*' $ac_mid`
8172fi
8173rm -f conftest.$ac_objext conftest.$ac_ext
8174 done
8175else
8176 echo "$as_me: failed program was:" >&5
8177cat conftest.$ac_ext >&5
8178ac_lo= ac_hi=
8179fi
8180rm -f conftest.$ac_objext conftest.$ac_ext
8181fi
8182rm -f conftest.$ac_objext conftest.$ac_ext
8183# Binary search between lo and hi bounds.
8184while test "x$ac_lo" != "x$ac_hi"; do
8185 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8186 cat >conftest.$ac_ext <<_ACEOF
8187#line $LINENO "configure"
8188#include "confdefs.h"
8189$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008190#ifdef F77_DUMMY_MAIN
8191# ifdef __cplusplus
8192 extern "C"
8193# endif
8194 int F77_DUMMY_MAIN() { return 1; }
8195#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008196int
8197main ()
8198{
8199static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8200test_array [0] = 0
8201
8202 ;
8203 return 0;
8204}
8205_ACEOF
8206rm -f conftest.$ac_objext
8207if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8208 (eval $ac_compile) 2>&5
8209 ac_status=$?
8210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8211 (exit $ac_status); } &&
8212 { ac_try='test -s conftest.$ac_objext'
8213 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8214 (eval $ac_try) 2>&5
8215 ac_status=$?
8216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8217 (exit $ac_status); }; }; then
8218 ac_hi=$ac_mid
8219else
8220 echo "$as_me: failed program was:" >&5
8221cat conftest.$ac_ext >&5
8222ac_lo=`expr '(' $ac_mid ')' + 1`
8223fi
8224rm -f conftest.$ac_objext conftest.$ac_ext
8225done
8226case $ac_lo in
8227?*) ac_cv_sizeof_fpos_t=$ac_lo;;
8228'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8229echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
8230 { (exit 1); exit 1; }; } ;;
8231esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008232else
8233 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008234 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8235echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8236 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008237else
Martin v. Löwis11437992002-04-12 09:54:03 +00008238 cat >conftest.$ac_ext <<_ACEOF
8239#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008240#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008241$ac_includes_default
8242long longval () { return (long) (sizeof (fpos_t)); }
8243unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008244#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008245#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00008246#ifdef F77_DUMMY_MAIN
8247# ifdef __cplusplus
8248 extern "C"
8249# endif
8250 int F77_DUMMY_MAIN() { return 1; }
8251#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008252int
8253main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008254{
Martin v. Löwis11437992002-04-12 09:54:03 +00008255
8256 FILE *f = fopen ("conftest.val", "w");
8257 if (! f)
8258 exit (1);
8259 if (((long) (sizeof (fpos_t))) < 0)
8260 {
8261 long i = longval ();
8262 if (i != ((long) (sizeof (fpos_t))))
8263 exit (1);
8264 fprintf (f, "%ld\n", i);
8265 }
8266 else
8267 {
8268 unsigned long i = ulongval ();
8269 if (i != ((long) (sizeof (fpos_t))))
8270 exit (1);
8271 fprintf (f, "%lu\n", i);
8272 }
8273 exit (ferror (f) || fclose (f) != 0);
8274
8275 ;
8276 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008277}
Martin v. Löwis11437992002-04-12 09:54:03 +00008278_ACEOF
8279rm -f conftest$ac_exeext
8280if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8281 (eval $ac_link) 2>&5
8282 ac_status=$?
8283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8284 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8285 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8286 (eval $ac_try) 2>&5
8287 ac_status=$?
8288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8289 (exit $ac_status); }; }; then
8290 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008291else
Martin v. Löwis11437992002-04-12 09:54:03 +00008292 echo "$as_me: program exited with status $ac_status" >&5
8293echo "$as_me: failed program was:" >&5
8294cat conftest.$ac_ext >&5
8295( exit $ac_status )
8296{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8297echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
8298 { (exit 1); exit 1; }; }
8299fi
Barry Warsawfe33b792003-01-07 22:42:49 +00008300rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008301fi
8302fi
8303rm -f conftest.val
8304else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008305 ac_cv_sizeof_fpos_t=0
8306fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008307fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008308echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8309echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8310cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008311#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008312_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008313
Michael W. Hudson54241132001-12-07 15:38:26 +00008314
8315
Martin v. Löwis11437992002-04-12 09:54:03 +00008316echo "$as_me:$LINENO: checking for long long support" >&5
8317echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008318have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008319cat >conftest.$ac_ext <<_ACEOF
8320#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008321#include "confdefs.h"
8322
Barry Warsawfe33b792003-01-07 22:42:49 +00008323#ifdef F77_DUMMY_MAIN
8324# ifdef __cplusplus
8325 extern "C"
8326# endif
8327 int F77_DUMMY_MAIN() { return 1; }
8328#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008329int
8330main ()
8331{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008332long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008333 ;
8334 return 0;
8335}
8336_ACEOF
8337rm -f conftest.$ac_objext
8338if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8339 (eval $ac_compile) 2>&5
8340 ac_status=$?
8341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8342 (exit $ac_status); } &&
8343 { ac_try='test -s conftest.$ac_objext'
8344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8345 (eval $ac_try) 2>&5
8346 ac_status=$?
8347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8348 (exit $ac_status); }; }; then
8349
8350
8351cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008352#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008353_ACEOF
8354
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008355 have_long_long=yes
8356
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008357else
Martin v. Löwis11437992002-04-12 09:54:03 +00008358 echo "$as_me: failed program was:" >&5
8359cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008360fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008361rm -f conftest.$ac_objext conftest.$ac_ext
8362echo "$as_me:$LINENO: result: $have_long_long" >&5
8363echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008364if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008365echo "$as_me:$LINENO: checking for long long" >&5
8366echo $ECHO_N "checking for long long... $ECHO_C" >&6
8367if test "${ac_cv_type_long_long+set}" = set; then
8368 echo $ECHO_N "(cached) $ECHO_C" >&6
8369else
8370 cat >conftest.$ac_ext <<_ACEOF
8371#line $LINENO "configure"
8372#include "confdefs.h"
8373$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008374#ifdef F77_DUMMY_MAIN
8375# ifdef __cplusplus
8376 extern "C"
8377# endif
8378 int F77_DUMMY_MAIN() { return 1; }
8379#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008380int
8381main ()
8382{
8383if ((long long *) 0)
8384 return 0;
8385if (sizeof (long long))
8386 return 0;
8387 ;
8388 return 0;
8389}
8390_ACEOF
8391rm -f conftest.$ac_objext
8392if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8393 (eval $ac_compile) 2>&5
8394 ac_status=$?
8395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8396 (exit $ac_status); } &&
8397 { ac_try='test -s conftest.$ac_objext'
8398 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8399 (eval $ac_try) 2>&5
8400 ac_status=$?
8401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8402 (exit $ac_status); }; }; then
8403 ac_cv_type_long_long=yes
8404else
8405 echo "$as_me: failed program was:" >&5
8406cat conftest.$ac_ext >&5
8407ac_cv_type_long_long=no
8408fi
8409rm -f conftest.$ac_objext conftest.$ac_ext
8410fi
8411echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8412echo "${ECHO_T}$ac_cv_type_long_long" >&6
8413
8414echo "$as_me:$LINENO: checking size of long long" >&5
8415echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8416if test "${ac_cv_sizeof_long_long+set}" = set; then
8417 echo $ECHO_N "(cached) $ECHO_C" >&6
8418else
8419 if test "$ac_cv_type_long_long" = yes; then
8420 # The cast to unsigned long works around a bug in the HP C Compiler
8421 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8422 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8423 # This bug is HP SR number 8606223364.
8424 if test "$cross_compiling" = yes; then
8425 # Depending upon the size, compute the lo and hi bounds.
8426cat >conftest.$ac_ext <<_ACEOF
8427#line $LINENO "configure"
8428#include "confdefs.h"
8429$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008430#ifdef F77_DUMMY_MAIN
8431# ifdef __cplusplus
8432 extern "C"
8433# endif
8434 int F77_DUMMY_MAIN() { return 1; }
8435#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008436int
8437main ()
8438{
8439static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8440test_array [0] = 0
8441
8442 ;
8443 return 0;
8444}
8445_ACEOF
8446rm -f conftest.$ac_objext
8447if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8448 (eval $ac_compile) 2>&5
8449 ac_status=$?
8450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8451 (exit $ac_status); } &&
8452 { ac_try='test -s conftest.$ac_objext'
8453 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8454 (eval $ac_try) 2>&5
8455 ac_status=$?
8456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8457 (exit $ac_status); }; }; then
8458 ac_lo=0 ac_mid=0
8459 while :; do
8460 cat >conftest.$ac_ext <<_ACEOF
8461#line $LINENO "configure"
8462#include "confdefs.h"
8463$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008464#ifdef F77_DUMMY_MAIN
8465# ifdef __cplusplus
8466 extern "C"
8467# endif
8468 int F77_DUMMY_MAIN() { return 1; }
8469#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008470int
8471main ()
8472{
8473static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8474test_array [0] = 0
8475
8476 ;
8477 return 0;
8478}
8479_ACEOF
8480rm -f conftest.$ac_objext
8481if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8482 (eval $ac_compile) 2>&5
8483 ac_status=$?
8484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8485 (exit $ac_status); } &&
8486 { ac_try='test -s conftest.$ac_objext'
8487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8488 (eval $ac_try) 2>&5
8489 ac_status=$?
8490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8491 (exit $ac_status); }; }; then
8492 ac_hi=$ac_mid; break
8493else
8494 echo "$as_me: failed program was:" >&5
8495cat conftest.$ac_ext >&5
8496ac_lo=`expr $ac_mid + 1`
8497 if test $ac_lo -le $ac_mid; then
8498 ac_lo= ac_hi=
8499 break
8500 fi
8501 ac_mid=`expr 2 '*' $ac_mid + 1`
8502fi
8503rm -f conftest.$ac_objext conftest.$ac_ext
8504 done
8505else
8506 echo "$as_me: failed program was:" >&5
8507cat conftest.$ac_ext >&5
8508cat >conftest.$ac_ext <<_ACEOF
8509#line $LINENO "configure"
8510#include "confdefs.h"
8511$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008512#ifdef F77_DUMMY_MAIN
8513# ifdef __cplusplus
8514 extern "C"
8515# endif
8516 int F77_DUMMY_MAIN() { return 1; }
8517#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008518int
8519main ()
8520{
8521static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8522test_array [0] = 0
8523
8524 ;
8525 return 0;
8526}
8527_ACEOF
8528rm -f conftest.$ac_objext
8529if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8530 (eval $ac_compile) 2>&5
8531 ac_status=$?
8532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8533 (exit $ac_status); } &&
8534 { ac_try='test -s conftest.$ac_objext'
8535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8536 (eval $ac_try) 2>&5
8537 ac_status=$?
8538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8539 (exit $ac_status); }; }; then
8540 ac_hi=-1 ac_mid=-1
8541 while :; do
8542 cat >conftest.$ac_ext <<_ACEOF
8543#line $LINENO "configure"
8544#include "confdefs.h"
8545$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008546#ifdef F77_DUMMY_MAIN
8547# ifdef __cplusplus
8548 extern "C"
8549# endif
8550 int F77_DUMMY_MAIN() { return 1; }
8551#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008552int
8553main ()
8554{
8555static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8556test_array [0] = 0
8557
8558 ;
8559 return 0;
8560}
8561_ACEOF
8562rm -f conftest.$ac_objext
8563if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8564 (eval $ac_compile) 2>&5
8565 ac_status=$?
8566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8567 (exit $ac_status); } &&
8568 { ac_try='test -s conftest.$ac_objext'
8569 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8570 (eval $ac_try) 2>&5
8571 ac_status=$?
8572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8573 (exit $ac_status); }; }; then
8574 ac_lo=$ac_mid; break
8575else
8576 echo "$as_me: failed program was:" >&5
8577cat conftest.$ac_ext >&5
8578ac_hi=`expr '(' $ac_mid ')' - 1`
8579 if test $ac_mid -le $ac_hi; then
8580 ac_lo= ac_hi=
8581 break
8582 fi
8583 ac_mid=`expr 2 '*' $ac_mid`
8584fi
8585rm -f conftest.$ac_objext conftest.$ac_ext
8586 done
8587else
8588 echo "$as_me: failed program was:" >&5
8589cat conftest.$ac_ext >&5
8590ac_lo= ac_hi=
8591fi
8592rm -f conftest.$ac_objext conftest.$ac_ext
8593fi
8594rm -f conftest.$ac_objext conftest.$ac_ext
8595# Binary search between lo and hi bounds.
8596while test "x$ac_lo" != "x$ac_hi"; do
8597 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8598 cat >conftest.$ac_ext <<_ACEOF
8599#line $LINENO "configure"
8600#include "confdefs.h"
8601$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008602#ifdef F77_DUMMY_MAIN
8603# ifdef __cplusplus
8604 extern "C"
8605# endif
8606 int F77_DUMMY_MAIN() { return 1; }
8607#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008608int
8609main ()
8610{
8611static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8612test_array [0] = 0
8613
8614 ;
8615 return 0;
8616}
8617_ACEOF
8618rm -f conftest.$ac_objext
8619if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8620 (eval $ac_compile) 2>&5
8621 ac_status=$?
8622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8623 (exit $ac_status); } &&
8624 { ac_try='test -s conftest.$ac_objext'
8625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8626 (eval $ac_try) 2>&5
8627 ac_status=$?
8628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8629 (exit $ac_status); }; }; then
8630 ac_hi=$ac_mid
8631else
8632 echo "$as_me: failed program was:" >&5
8633cat conftest.$ac_ext >&5
8634ac_lo=`expr '(' $ac_mid ')' + 1`
8635fi
8636rm -f conftest.$ac_objext conftest.$ac_ext
8637done
8638case $ac_lo in
8639?*) ac_cv_sizeof_long_long=$ac_lo;;
8640'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8641echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8642 { (exit 1); exit 1; }; } ;;
8643esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008644else
8645 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008646 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8647echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8648 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008649else
Martin v. Löwis11437992002-04-12 09:54:03 +00008650 cat >conftest.$ac_ext <<_ACEOF
8651#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008652#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008653$ac_includes_default
8654long longval () { return (long) (sizeof (long long)); }
8655unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008656#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008657#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00008658#ifdef F77_DUMMY_MAIN
8659# ifdef __cplusplus
8660 extern "C"
8661# endif
8662 int F77_DUMMY_MAIN() { return 1; }
8663#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008664int
8665main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008666{
Martin v. Löwis11437992002-04-12 09:54:03 +00008667
8668 FILE *f = fopen ("conftest.val", "w");
8669 if (! f)
8670 exit (1);
8671 if (((long) (sizeof (long long))) < 0)
8672 {
8673 long i = longval ();
8674 if (i != ((long) (sizeof (long long))))
8675 exit (1);
8676 fprintf (f, "%ld\n", i);
8677 }
8678 else
8679 {
8680 unsigned long i = ulongval ();
8681 if (i != ((long) (sizeof (long long))))
8682 exit (1);
8683 fprintf (f, "%lu\n", i);
8684 }
8685 exit (ferror (f) || fclose (f) != 0);
8686
8687 ;
8688 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008689}
Martin v. Löwis11437992002-04-12 09:54:03 +00008690_ACEOF
8691rm -f conftest$ac_exeext
8692if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8693 (eval $ac_link) 2>&5
8694 ac_status=$?
8695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8696 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8698 (eval $ac_try) 2>&5
8699 ac_status=$?
8700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8701 (exit $ac_status); }; }; then
8702 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008703else
Martin v. Löwis11437992002-04-12 09:54:03 +00008704 echo "$as_me: program exited with status $ac_status" >&5
8705echo "$as_me: failed program was:" >&5
8706cat conftest.$ac_ext >&5
8707( exit $ac_status )
8708{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8709echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8710 { (exit 1); exit 1; }; }
8711fi
Barry Warsawfe33b792003-01-07 22:42:49 +00008712rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008713fi
8714fi
8715rm -f conftest.val
8716else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008717 ac_cv_sizeof_long_long=0
8718fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008719fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008720echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8721echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8722cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008723#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008724_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008725
Michael W. Hudson54241132001-12-07 15:38:26 +00008726
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008727fi
8728
Martin v. Löwis11437992002-04-12 09:54:03 +00008729echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8730echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008731have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008732cat >conftest.$ac_ext <<_ACEOF
8733#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008734#include "confdefs.h"
8735
Barry Warsawfe33b792003-01-07 22:42:49 +00008736#ifdef F77_DUMMY_MAIN
8737# ifdef __cplusplus
8738 extern "C"
8739# endif
8740 int F77_DUMMY_MAIN() { return 1; }
8741#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008742int
8743main ()
8744{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008745uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008746 ;
8747 return 0;
8748}
8749_ACEOF
8750rm -f conftest.$ac_objext
8751if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8752 (eval $ac_compile) 2>&5
8753 ac_status=$?
8754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8755 (exit $ac_status); } &&
8756 { ac_try='test -s conftest.$ac_objext'
8757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8758 (eval $ac_try) 2>&5
8759 ac_status=$?
8760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8761 (exit $ac_status); }; }; then
8762
8763
8764cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008765#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008766_ACEOF
8767
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008768 have_uintptr_t=yes
8769
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008770else
Martin v. Löwis11437992002-04-12 09:54:03 +00008771 echo "$as_me: failed program was:" >&5
8772cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008773fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008774rm -f conftest.$ac_objext conftest.$ac_ext
8775echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8776echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008777if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008778echo "$as_me:$LINENO: checking for uintptr_t" >&5
8779echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8780if test "${ac_cv_type_uintptr_t+set}" = set; then
8781 echo $ECHO_N "(cached) $ECHO_C" >&6
8782else
8783 cat >conftest.$ac_ext <<_ACEOF
8784#line $LINENO "configure"
8785#include "confdefs.h"
8786$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008787#ifdef F77_DUMMY_MAIN
8788# ifdef __cplusplus
8789 extern "C"
8790# endif
8791 int F77_DUMMY_MAIN() { return 1; }
8792#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008793int
8794main ()
8795{
8796if ((uintptr_t *) 0)
8797 return 0;
8798if (sizeof (uintptr_t))
8799 return 0;
8800 ;
8801 return 0;
8802}
8803_ACEOF
8804rm -f conftest.$ac_objext
8805if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8806 (eval $ac_compile) 2>&5
8807 ac_status=$?
8808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8809 (exit $ac_status); } &&
8810 { ac_try='test -s conftest.$ac_objext'
8811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8812 (eval $ac_try) 2>&5
8813 ac_status=$?
8814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8815 (exit $ac_status); }; }; then
8816 ac_cv_type_uintptr_t=yes
8817else
8818 echo "$as_me: failed program was:" >&5
8819cat conftest.$ac_ext >&5
8820ac_cv_type_uintptr_t=no
8821fi
8822rm -f conftest.$ac_objext conftest.$ac_ext
8823fi
8824echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8825echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8826
8827echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8828echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8829if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8830 echo $ECHO_N "(cached) $ECHO_C" >&6
8831else
8832 if test "$ac_cv_type_uintptr_t" = yes; then
8833 # The cast to unsigned long works around a bug in the HP C Compiler
8834 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8835 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8836 # This bug is HP SR number 8606223364.
8837 if test "$cross_compiling" = yes; then
8838 # Depending upon the size, compute the lo and hi bounds.
8839cat >conftest.$ac_ext <<_ACEOF
8840#line $LINENO "configure"
8841#include "confdefs.h"
8842$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008843#ifdef F77_DUMMY_MAIN
8844# ifdef __cplusplus
8845 extern "C"
8846# endif
8847 int F77_DUMMY_MAIN() { return 1; }
8848#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008849int
8850main ()
8851{
8852static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8853test_array [0] = 0
8854
8855 ;
8856 return 0;
8857}
8858_ACEOF
8859rm -f conftest.$ac_objext
8860if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8861 (eval $ac_compile) 2>&5
8862 ac_status=$?
8863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8864 (exit $ac_status); } &&
8865 { ac_try='test -s conftest.$ac_objext'
8866 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8867 (eval $ac_try) 2>&5
8868 ac_status=$?
8869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8870 (exit $ac_status); }; }; then
8871 ac_lo=0 ac_mid=0
8872 while :; do
8873 cat >conftest.$ac_ext <<_ACEOF
8874#line $LINENO "configure"
8875#include "confdefs.h"
8876$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008877#ifdef F77_DUMMY_MAIN
8878# ifdef __cplusplus
8879 extern "C"
8880# endif
8881 int F77_DUMMY_MAIN() { return 1; }
8882#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008883int
8884main ()
8885{
8886static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8887test_array [0] = 0
8888
8889 ;
8890 return 0;
8891}
8892_ACEOF
8893rm -f conftest.$ac_objext
8894if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8895 (eval $ac_compile) 2>&5
8896 ac_status=$?
8897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8898 (exit $ac_status); } &&
8899 { ac_try='test -s conftest.$ac_objext'
8900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8901 (eval $ac_try) 2>&5
8902 ac_status=$?
8903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8904 (exit $ac_status); }; }; then
8905 ac_hi=$ac_mid; break
8906else
8907 echo "$as_me: failed program was:" >&5
8908cat conftest.$ac_ext >&5
8909ac_lo=`expr $ac_mid + 1`
8910 if test $ac_lo -le $ac_mid; then
8911 ac_lo= ac_hi=
8912 break
8913 fi
8914 ac_mid=`expr 2 '*' $ac_mid + 1`
8915fi
8916rm -f conftest.$ac_objext conftest.$ac_ext
8917 done
8918else
8919 echo "$as_me: failed program was:" >&5
8920cat conftest.$ac_ext >&5
8921cat >conftest.$ac_ext <<_ACEOF
8922#line $LINENO "configure"
8923#include "confdefs.h"
8924$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008925#ifdef F77_DUMMY_MAIN
8926# ifdef __cplusplus
8927 extern "C"
8928# endif
8929 int F77_DUMMY_MAIN() { return 1; }
8930#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008931int
8932main ()
8933{
8934static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8935test_array [0] = 0
8936
8937 ;
8938 return 0;
8939}
8940_ACEOF
8941rm -f conftest.$ac_objext
8942if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8943 (eval $ac_compile) 2>&5
8944 ac_status=$?
8945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8946 (exit $ac_status); } &&
8947 { ac_try='test -s conftest.$ac_objext'
8948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8949 (eval $ac_try) 2>&5
8950 ac_status=$?
8951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8952 (exit $ac_status); }; }; then
8953 ac_hi=-1 ac_mid=-1
8954 while :; do
8955 cat >conftest.$ac_ext <<_ACEOF
8956#line $LINENO "configure"
8957#include "confdefs.h"
8958$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008959#ifdef F77_DUMMY_MAIN
8960# ifdef __cplusplus
8961 extern "C"
8962# endif
8963 int F77_DUMMY_MAIN() { return 1; }
8964#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008965int
8966main ()
8967{
8968static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8969test_array [0] = 0
8970
8971 ;
8972 return 0;
8973}
8974_ACEOF
8975rm -f conftest.$ac_objext
8976if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8977 (eval $ac_compile) 2>&5
8978 ac_status=$?
8979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8980 (exit $ac_status); } &&
8981 { ac_try='test -s conftest.$ac_objext'
8982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8983 (eval $ac_try) 2>&5
8984 ac_status=$?
8985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8986 (exit $ac_status); }; }; then
8987 ac_lo=$ac_mid; break
8988else
8989 echo "$as_me: failed program was:" >&5
8990cat conftest.$ac_ext >&5
8991ac_hi=`expr '(' $ac_mid ')' - 1`
8992 if test $ac_mid -le $ac_hi; then
8993 ac_lo= ac_hi=
8994 break
8995 fi
8996 ac_mid=`expr 2 '*' $ac_mid`
8997fi
8998rm -f conftest.$ac_objext conftest.$ac_ext
8999 done
9000else
9001 echo "$as_me: failed program was:" >&5
9002cat conftest.$ac_ext >&5
9003ac_lo= ac_hi=
9004fi
9005rm -f conftest.$ac_objext conftest.$ac_ext
9006fi
9007rm -f conftest.$ac_objext conftest.$ac_ext
9008# Binary search between lo and hi bounds.
9009while test "x$ac_lo" != "x$ac_hi"; do
9010 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9011 cat >conftest.$ac_ext <<_ACEOF
9012#line $LINENO "configure"
9013#include "confdefs.h"
9014$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00009015#ifdef F77_DUMMY_MAIN
9016# ifdef __cplusplus
9017 extern "C"
9018# endif
9019 int F77_DUMMY_MAIN() { return 1; }
9020#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009021int
9022main ()
9023{
9024static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
9025test_array [0] = 0
9026
9027 ;
9028 return 0;
9029}
9030_ACEOF
9031rm -f conftest.$ac_objext
9032if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9033 (eval $ac_compile) 2>&5
9034 ac_status=$?
9035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9036 (exit $ac_status); } &&
9037 { ac_try='test -s conftest.$ac_objext'
9038 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9039 (eval $ac_try) 2>&5
9040 ac_status=$?
9041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9042 (exit $ac_status); }; }; then
9043 ac_hi=$ac_mid
9044else
9045 echo "$as_me: failed program was:" >&5
9046cat conftest.$ac_ext >&5
9047ac_lo=`expr '(' $ac_mid ')' + 1`
9048fi
9049rm -f conftest.$ac_objext conftest.$ac_ext
9050done
9051case $ac_lo in
9052?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
9053'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
9054echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
9055 { (exit 1); exit 1; }; } ;;
9056esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009057else
9058 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009059 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
9060echo "$as_me: error: cannot run test program while cross compiling" >&2;}
9061 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009062else
Martin v. Löwis11437992002-04-12 09:54:03 +00009063 cat >conftest.$ac_ext <<_ACEOF
9064#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009065#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009066$ac_includes_default
9067long longval () { return (long) (sizeof (uintptr_t)); }
9068unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009069#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009070#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00009071#ifdef F77_DUMMY_MAIN
9072# ifdef __cplusplus
9073 extern "C"
9074# endif
9075 int F77_DUMMY_MAIN() { return 1; }
9076#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009077int
9078main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009079{
Martin v. Löwis11437992002-04-12 09:54:03 +00009080
9081 FILE *f = fopen ("conftest.val", "w");
9082 if (! f)
9083 exit (1);
9084 if (((long) (sizeof (uintptr_t))) < 0)
9085 {
9086 long i = longval ();
9087 if (i != ((long) (sizeof (uintptr_t))))
9088 exit (1);
9089 fprintf (f, "%ld\n", i);
9090 }
9091 else
9092 {
9093 unsigned long i = ulongval ();
9094 if (i != ((long) (sizeof (uintptr_t))))
9095 exit (1);
9096 fprintf (f, "%lu\n", i);
9097 }
9098 exit (ferror (f) || fclose (f) != 0);
9099
9100 ;
9101 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009102}
Martin v. Löwis11437992002-04-12 09:54:03 +00009103_ACEOF
9104rm -f conftest$ac_exeext
9105if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9106 (eval $ac_link) 2>&5
9107 ac_status=$?
9108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9109 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9110 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9111 (eval $ac_try) 2>&5
9112 ac_status=$?
9113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9114 (exit $ac_status); }; }; then
9115 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009116else
Martin v. Löwis11437992002-04-12 09:54:03 +00009117 echo "$as_me: program exited with status $ac_status" >&5
9118echo "$as_me: failed program was:" >&5
9119cat conftest.$ac_ext >&5
9120( exit $ac_status )
9121{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
9122echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
9123 { (exit 1); exit 1; }; }
9124fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009125rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009126fi
9127fi
9128rm -f conftest.val
9129else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009130 ac_cv_sizeof_uintptr_t=0
9131fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009132fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009133echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
9134echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
9135cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009136#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009137_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009138
Michael W. Hudson54241132001-12-07 15:38:26 +00009139
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009140fi
9141
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009142# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009143echo "$as_me:$LINENO: checking size of off_t" >&5
9144echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
9145if test "${ac_cv_sizeof_off_t+set}" = set; then
9146 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009147else
9148 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009149 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009150else
Martin v. Löwis11437992002-04-12 09:54:03 +00009151 cat >conftest.$ac_ext <<_ACEOF
9152#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009153#include "confdefs.h"
9154#include <stdio.h>
9155#include <sys/types.h>
9156main()
9157{
9158 FILE *f=fopen("conftestval", "w");
9159 if (!f) exit(1);
9160 fprintf(f, "%d\n", sizeof(off_t));
9161 exit(0);
9162}
Martin v. Löwis11437992002-04-12 09:54:03 +00009163_ACEOF
9164rm -f conftest$ac_exeext
9165if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9166 (eval $ac_link) 2>&5
9167 ac_status=$?
9168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9169 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9170 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9171 (eval $ac_try) 2>&5
9172 ac_status=$?
9173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9174 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009175 ac_cv_sizeof_off_t=`cat conftestval`
9176else
Martin v. Löwis11437992002-04-12 09:54:03 +00009177 echo "$as_me: program exited with status $ac_status" >&5
9178echo "$as_me: failed program was:" >&5
9179cat conftest.$ac_ext >&5
9180( exit $ac_status )
9181ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009182fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009183rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009184fi
9185
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009186fi
9187
Martin v. Löwis11437992002-04-12 09:54:03 +00009188echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
9189echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
9190
9191cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009192#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009193_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009194
Michael W. Hudson54241132001-12-07 15:38:26 +00009195
Martin v. Löwis11437992002-04-12 09:54:03 +00009196echo "$as_me:$LINENO: checking whether to enable large file support" >&5
9197echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009198if test "$have_long_long" = yes -a \
9199 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
9200 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009201
Martin v. Löwis11437992002-04-12 09:54:03 +00009202cat >>confdefs.h <<\_ACEOF
9203#define HAVE_LARGEFILE_SUPPORT 1
9204_ACEOF
9205
9206 echo "$as_me:$LINENO: result: yes" >&5
9207echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009208else
Martin v. Löwis11437992002-04-12 09:54:03 +00009209 echo "$as_me:$LINENO: result: no" >&5
9210echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009211fi
9212
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009213# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009214echo "$as_me:$LINENO: checking size of time_t" >&5
9215echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
9216if test "${ac_cv_sizeof_time_t+set}" = set; then
9217 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009218else
9219 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009220 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009221else
Martin v. Löwis11437992002-04-12 09:54:03 +00009222 cat >conftest.$ac_ext <<_ACEOF
9223#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009224#include "confdefs.h"
9225#include <stdio.h>
9226#include <time.h>
9227main()
9228{
9229 FILE *f=fopen("conftestval", "w");
9230 if (!f) exit(1);
9231 fprintf(f, "%d\n", sizeof(time_t));
9232 exit(0);
9233}
Martin v. Löwis11437992002-04-12 09:54:03 +00009234_ACEOF
9235rm -f conftest$ac_exeext
9236if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9237 (eval $ac_link) 2>&5
9238 ac_status=$?
9239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9240 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9241 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9242 (eval $ac_try) 2>&5
9243 ac_status=$?
9244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9245 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009246 ac_cv_sizeof_time_t=`cat conftestval`
9247else
Martin v. Löwis11437992002-04-12 09:54:03 +00009248 echo "$as_me: program exited with status $ac_status" >&5
9249echo "$as_me: failed program was:" >&5
9250cat conftest.$ac_ext >&5
9251( exit $ac_status )
9252ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009253fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009254rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009255fi
9256
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009257fi
9258
Martin v. Löwis11437992002-04-12 09:54:03 +00009259echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9260echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9261
9262cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009263#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009264_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009265
Michael W. Hudson54241132001-12-07 15:38:26 +00009266
9267
Trent Mick635f6fb2000-08-23 21:33:05 +00009268# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009269ac_save_cc="$CC"
9270if test "$ac_cv_kpthread" = "yes"
9271then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009272elif test "$ac_cv_kthread" = "yes"
9273then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009274elif test "$ac_cv_pthread" = "yes"
9275then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009276fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009277echo "$as_me:$LINENO: checking for pthread_t" >&5
9278echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009279have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009280cat >conftest.$ac_ext <<_ACEOF
9281#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009282#include "confdefs.h"
9283#include <pthread.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00009284#ifdef F77_DUMMY_MAIN
9285# ifdef __cplusplus
9286 extern "C"
9287# endif
9288 int F77_DUMMY_MAIN() { return 1; }
9289#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009290int
9291main ()
9292{
Guido van Rossum12580492000-09-24 16:47:19 +00009293pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009294 ;
9295 return 0;
9296}
9297_ACEOF
9298rm -f conftest.$ac_objext
9299if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9300 (eval $ac_compile) 2>&5
9301 ac_status=$?
9302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9303 (exit $ac_status); } &&
9304 { ac_try='test -s conftest.$ac_objext'
9305 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9306 (eval $ac_try) 2>&5
9307 ac_status=$?
9308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9309 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009310 have_pthread_t=yes
9311else
Martin v. Löwis11437992002-04-12 09:54:03 +00009312 echo "$as_me: failed program was:" >&5
9313cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00009314fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009315rm -f conftest.$ac_objext conftest.$ac_ext
9316echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9317echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009318if test "$have_pthread_t" = yes ; then
9319 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009320 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9321echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9322 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9323 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009324else
9325 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009326 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009327else
Martin v. Löwis11437992002-04-12 09:54:03 +00009328 cat >conftest.$ac_ext <<_ACEOF
9329#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009330#include "confdefs.h"
9331#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009332#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +00009333 main()
9334 {
9335 FILE *f=fopen("conftestval", "w");
9336 if (!f) exit(1);
9337 fprintf(f, "%d\n", sizeof(pthread_t));
9338 exit(0);
9339 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009340_ACEOF
9341rm -f conftest$ac_exeext
9342if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9343 (eval $ac_link) 2>&5
9344 ac_status=$?
9345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9346 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9348 (eval $ac_try) 2>&5
9349 ac_status=$?
9350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9351 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009352 ac_cv_sizeof_pthread_t=`cat conftestval`
9353else
Martin v. Löwis11437992002-04-12 09:54:03 +00009354 echo "$as_me: program exited with status $ac_status" >&5
9355echo "$as_me: failed program was:" >&5
9356cat conftest.$ac_ext >&5
9357( exit $ac_status )
9358ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009359fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009360rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009361fi
9362
Trent Mick635f6fb2000-08-23 21:33:05 +00009363fi
9364
Martin v. Löwis11437992002-04-12 09:54:03 +00009365 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9366echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9367
9368cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009369#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009370_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009371
9372fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009373CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009374
Martin v. Löwis11437992002-04-12 09:54:03 +00009375echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9376echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009377# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9378if test "${enable_toolbox_glue+set}" = set; then
9379 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009380
Martin v. Löwis11437992002-04-12 09:54:03 +00009381fi;
Jack Jansene578a632001-08-15 01:27:14 +00009382
9383if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009384then
Jack Jansene578a632001-08-15 01:27:14 +00009385 case $ac_sys_system/$ac_sys_release in
9386 Darwin/*)
9387 enable_toolbox_glue="yes";;
9388 *)
9389 enable_toolbox_glue="no";;
9390 esac
9391fi
9392case "$enable_toolbox_glue" in
9393yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009394 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009395 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009396 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009397
9398cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009399#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009400_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009401
9402 ;;
9403*)
9404 extra_frameworks=""
9405 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009406 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009407 ;;
9408esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009409echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9410echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009411
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009412
9413case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009414 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009415 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009416 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00009417 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9418 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009419 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009420 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009421 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00009422 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9423 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009424esac
9425
Martin v. Löwis11437992002-04-12 09:54:03 +00009426echo "$as_me:$LINENO: checking for --enable-framework" >&5
9427echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009428if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009429then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009430 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009431 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009432 # in the build location.
Jack Jansenea0c3822002-08-01 21:57:49 +00009433 LDFLAGS="$LDFLAGS -Wl,-F."
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009434
Martin v. Löwis11437992002-04-12 09:54:03 +00009435cat >>confdefs.h <<\_ACEOF
9436#define WITH_NEXT_FRAMEWORK 1
9437_ACEOF
9438
9439 echo "$as_me:$LINENO: result: yes" >&5
9440echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009441else
Martin v. Löwis11437992002-04-12 09:54:03 +00009442 echo "$as_me:$LINENO: result: no" >&5
9443echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009444fi
9445
Martin v. Löwis11437992002-04-12 09:54:03 +00009446echo "$as_me:$LINENO: checking for dyld" >&5
9447echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009448case $ac_sys_system/$ac_sys_release in
9449 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009450
Martin v. Löwis11437992002-04-12 09:54:03 +00009451cat >>confdefs.h <<\_ACEOF
9452#define WITH_DYLD 1
9453_ACEOF
9454
9455 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9456echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009457 ;;
9458 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009459 echo "$as_me:$LINENO: result: no" >&5
9460echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009461 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009462esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009463
Guido van Rossum0a516c91994-09-12 10:58:40 +00009464# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009465
Michael W. Hudson54241132001-12-07 15:38:26 +00009466
9467
9468
9469
Guido van Rossum0a516c91994-09-12 10:58:40 +00009470# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009471# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009472echo "$as_me:$LINENO: checking SO" >&5
9473echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009474if test -z "$SO"
9475then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009476 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009477 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009478 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009479 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009480 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00009481else
9482 # this might also be a termcap variable, see #610332
9483 echo
9484 echo '====================================================================='
9485 echo '+ +'
9486 echo '+ WARNING: You have set SO in your environment. +'
9487 echo '+ Do you really mean to change the extension for shared libraries? +'
9488 echo '+ Continuing in 10 seconds to let you to ponder. +'
9489 echo '+ +'
9490 echo '====================================================================='
9491 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00009492fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009493echo "$as_me:$LINENO: result: $SO" >&5
9494echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009495# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00009496# -- "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 +00009497# (Shared libraries in this instance are shared modules to be loaded into
9498# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009499echo "$as_me:$LINENO: checking LDSHARED" >&5
9500echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009501if test -z "$LDSHARED"
9502then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009503 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009504 AIX*)
9505 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009506 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009507 ;;
9508 BeOS*)
9509 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009510 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009511 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009512 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009513 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009514 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009515 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00009516 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009517 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009518 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +00009519 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009520 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009521 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
9522 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009523 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009524 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9525 if test "$enable_framework" ; then
9526 # Link against the framework. All externals should be defined.
9527 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9528 else
9529 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009530 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009531 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009532 Darwin/*)
9533 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9534 if test "$enable_framework" ; then
9535 # Link against the framework. All externals should be defined.
9536 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9537 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009538 # No framework, use the Python app as bundle-loader
9539 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009540 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009541 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009542 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00009543 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009544 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009545 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009546 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009547 then
9548 LDSHARED="cc -shared ${LDFLAGS}"
9549 else
9550 LDSHARED="ld -Bshareable ${LDFLAGS}"
9551 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009552 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009553 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009554 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009555 then LDSHARED='$(CC) -shared'
9556 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009557 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009558 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +00009559 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009560 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009561 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009562 *) LDSHARED="ld";;
9563 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009564fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009565echo "$as_me:$LINENO: result: $LDSHARED" >&5
9566echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009567BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009568# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009569# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009570echo "$as_me:$LINENO: checking CCSHARED" >&5
9571echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009572if test -z "$CCSHARED"
9573then
Guido van Rossum07397971997-04-29 21:49:50 +00009574 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009575 SunOS*) if test "$GCC" = yes;
9576 then CCSHARED="-fPIC";
9577 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009578 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009579 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009580 else CCSHARED="+z";
9581 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009582 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009583 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009584 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009585 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009586 if test "$GCC" = "yes"
9587 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009588 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009589 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009590 SCO_SV*)
9591 if test "$GCC" = "yes"
9592 then CCSHARED="-fPIC"
9593 else CCSHARED="-Kpic -belf"
9594 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009595 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009596 IRIX*/6*) case $CC in
9597 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009598 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009599 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009600 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009601 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009602fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009603echo "$as_me:$LINENO: result: $CCSHARED" >&5
9604echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009605# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009606# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009607echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9608echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009609if test -z "$LINKFORSHARED"
9610then
Guido van Rossum07397971997-04-29 21:49:50 +00009611 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009612 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009613 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009614 LINKFORSHARED="-Wl,-E -Wl,+s";;
9615# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009616 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009617 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009618 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009619 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009620 # -u __dummy makes the linker aware of the objc runtime
9621 # in System.framework; otherwise, __objcInit (referenced in
9622 # crt1.o) gets erroneously defined as common, which breaks dynamic
9623 # loading of any modules which reference it in System.framework.
9624 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9625 # not used by the core itself but which needs to be in the core so
9626 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00009627 # -prebind is no longer used, because it actually seems to give a
9628 # slowdown in stead of a speedup, maybe due to the large number of
9629 # dynamic loads Python does.
9630 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009631 if test "$enable_framework"
9632 then
9633 LINKFORSHARED="$LINKFORSHARED -framework Python"
9634 fi
9635 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009636 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009637 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009638 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009639 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009640 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9641 then
9642 LINKFORSHARED="-Wl,--export-dynamic"
9643 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009644 SunOS/5*) case $CC in
9645 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009646 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009647 then
9648 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009649 fi;;
9650 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009651 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009652fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009653echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9654echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009655
Michael W. Hudson54241132001-12-07 15:38:26 +00009656
Martin v. Löwis11437992002-04-12 09:54:03 +00009657echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9658echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009659if test ! "$LIBRARY" = "$LDLIBRARY"
9660then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009661 case $ac_sys_system in
9662 CYGWIN*)
9663 # Cygwin needs CCSHARED when building extension DLLs
9664 # but not when building the interpreter DLL.
9665 CFLAGSFORSHARED='';;
9666 *)
9667 CFLAGSFORSHARED='$(CCSHARED)'
9668 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009669fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009670echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9671echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009672
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009673# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9674# library (with --enable-shared).
9675# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009676# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9677# if it is not required, since it creates a dependency of the shared library
9678# to LIBS. This, in turn, means that applications linking the shared libpython
9679# don't need to link LIBS explicitly. The default should be only changed
9680# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009681
9682echo "$as_me:$LINENO: checking SHLIBS" >&5
9683echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9684case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009685 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009686 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009687esac
9688echo "$as_me:$LINENO: result: $SHLIBS" >&5
9689echo "${ECHO_T}$SHLIBS" >&6
9690
9691
Guido van Rossum627b2d71993-12-24 10:39:16 +00009692# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009693
9694echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9695echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9696if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9697 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009698else
Martin v. Löwis11437992002-04-12 09:54:03 +00009699 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009700LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009701cat >conftest.$ac_ext <<_ACEOF
9702#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009703#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009704
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009705/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009706#ifdef __cplusplus
9707extern "C"
9708#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009709/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009710 builtin and then its argument prototype would still apply. */
9711char dlopen ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009712#ifdef F77_DUMMY_MAIN
9713# ifdef __cplusplus
9714 extern "C"
9715# endif
9716 int F77_DUMMY_MAIN() { return 1; }
9717#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009718int
9719main ()
9720{
9721dlopen ();
9722 ;
9723 return 0;
9724}
9725_ACEOF
9726rm -f conftest.$ac_objext conftest$ac_exeext
9727if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9728 (eval $ac_link) 2>&5
9729 ac_status=$?
9730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9731 (exit $ac_status); } &&
9732 { ac_try='test -s conftest$ac_exeext'
9733 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9734 (eval $ac_try) 2>&5
9735 ac_status=$?
9736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9737 (exit $ac_status); }; }; then
9738 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009739else
Martin v. Löwis11437992002-04-12 09:54:03 +00009740 echo "$as_me: failed program was:" >&5
9741cat conftest.$ac_ext >&5
9742ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009743fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009744rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9745LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009746fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009747echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9748echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9749if test $ac_cv_lib_dl_dlopen = yes; then
9750 cat >>confdefs.h <<_ACEOF
9751#define HAVE_LIBDL 1
9752_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009753
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009754 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009755
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009756fi
9757 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009758
9759echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9760echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9761if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9762 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009763else
Martin v. Löwis11437992002-04-12 09:54:03 +00009764 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009765LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009766cat >conftest.$ac_ext <<_ACEOF
9767#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009768#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009769
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009770/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009771#ifdef __cplusplus
9772extern "C"
9773#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009774/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009775 builtin and then its argument prototype would still apply. */
9776char shl_load ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009777#ifdef F77_DUMMY_MAIN
9778# ifdef __cplusplus
9779 extern "C"
9780# endif
9781 int F77_DUMMY_MAIN() { return 1; }
9782#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009783int
9784main ()
9785{
9786shl_load ();
9787 ;
9788 return 0;
9789}
9790_ACEOF
9791rm -f conftest.$ac_objext conftest$ac_exeext
9792if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9793 (eval $ac_link) 2>&5
9794 ac_status=$?
9795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9796 (exit $ac_status); } &&
9797 { ac_try='test -s conftest$ac_exeext'
9798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9799 (eval $ac_try) 2>&5
9800 ac_status=$?
9801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9802 (exit $ac_status); }; }; then
9803 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009804else
Martin v. Löwis11437992002-04-12 09:54:03 +00009805 echo "$as_me: failed program was:" >&5
9806cat conftest.$ac_ext >&5
9807ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009808fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009809rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9810LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009811fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009812echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9813echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9814if test $ac_cv_lib_dld_shl_load = yes; then
9815 cat >>confdefs.h <<_ACEOF
9816#define HAVE_LIBDLD 1
9817_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009818
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009819 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009820
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009821fi
9822 # Dynamic linking for HP-UX
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009823echo "$as_me:$LINENO: checking for library containing sem_init" >&5
9824echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9825if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009826 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009827else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009828 ac_func_search_save_LIBS=$LIBS
9829ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009830cat >conftest.$ac_ext <<_ACEOF
9831#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009832#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009833
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009834/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009835#ifdef __cplusplus
9836extern "C"
9837#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009838/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009839 builtin and then its argument prototype would still apply. */
9840char sem_init ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009841#ifdef F77_DUMMY_MAIN
9842# ifdef __cplusplus
9843 extern "C"
9844# endif
9845 int F77_DUMMY_MAIN() { return 1; }
9846#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009847int
9848main ()
9849{
9850sem_init ();
9851 ;
9852 return 0;
9853}
9854_ACEOF
9855rm -f conftest.$ac_objext conftest$ac_exeext
9856if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9857 (eval $ac_link) 2>&5
9858 ac_status=$?
9859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9860 (exit $ac_status); } &&
9861 { ac_try='test -s conftest$ac_exeext'
9862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9863 (eval $ac_try) 2>&5
9864 ac_status=$?
9865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9866 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009867 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009868else
Martin v. Löwis11437992002-04-12 09:54:03 +00009869 echo "$as_me: failed program was:" >&5
9870cat conftest.$ac_ext >&5
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009871fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009872rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009873if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009874 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009875 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9876 cat >conftest.$ac_ext <<_ACEOF
9877#line $LINENO "configure"
9878#include "confdefs.h"
9879
9880/* Override any gcc2 internal prototype to avoid an error. */
9881#ifdef __cplusplus
9882extern "C"
9883#endif
9884/* We use char because int might match the return type of a gcc2
9885 builtin and then its argument prototype would still apply. */
9886char sem_init ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009887#ifdef F77_DUMMY_MAIN
9888# ifdef __cplusplus
9889 extern "C"
9890# endif
9891 int F77_DUMMY_MAIN() { return 1; }
9892#endif
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009893int
9894main ()
9895{
9896sem_init ();
9897 ;
9898 return 0;
9899}
Martin v. Löwis11437992002-04-12 09:54:03 +00009900_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009901rm -f conftest.$ac_objext conftest$ac_exeext
9902if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9903 (eval $ac_link) 2>&5
9904 ac_status=$?
9905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9906 (exit $ac_status); } &&
9907 { ac_try='test -s conftest$ac_exeext'
9908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9909 (eval $ac_try) 2>&5
9910 ac_status=$?
9911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9912 (exit $ac_status); }; }; then
9913 ac_cv_search_sem_init="-l$ac_lib"
9914break
9915else
9916 echo "$as_me: failed program was:" >&5
9917cat conftest.$ac_ext >&5
9918fi
9919rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9920 done
9921fi
9922LIBS=$ac_func_search_save_LIBS
9923fi
9924echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9925echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9926if test "$ac_cv_search_sem_init" != no; then
9927 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009928
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009929fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009930 # 'Real Time' functions on Solaris
9931 # posix4 on Solaris 2.6
9932 # pthread (first!) on Linux
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009933
9934# checks for system dependent C++ extensions support
9935case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009936 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9937echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9938 cat >conftest.$ac_ext <<_ACEOF
9939#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009940#include "confdefs.h"
9941#include "/usr/lpp/xlC/include/load.h"
Barry Warsawfe33b792003-01-07 22:42:49 +00009942#ifdef F77_DUMMY_MAIN
9943# ifdef __cplusplus
9944 extern "C"
9945# endif
9946 int F77_DUMMY_MAIN() { return 1; }
9947#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009948int
9949main ()
9950{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009951loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009952 ;
9953 return 0;
9954}
9955_ACEOF
9956rm -f conftest.$ac_objext conftest$ac_exeext
9957if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9958 (eval $ac_link) 2>&5
9959 ac_status=$?
9960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9961 (exit $ac_status); } &&
9962 { ac_try='test -s conftest$ac_exeext'
9963 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9964 (eval $ac_try) 2>&5
9965 ac_status=$?
9966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9967 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009968
Martin v. Löwis11437992002-04-12 09:54:03 +00009969cat >>confdefs.h <<\_ACEOF
9970#define AIX_GENUINE_CPLUSPLUS 1
9971_ACEOF
9972
9973 echo "$as_me:$LINENO: result: yes" >&5
9974echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009975else
Martin v. Löwis11437992002-04-12 09:54:03 +00009976 echo "$as_me: failed program was:" >&5
9977cat conftest.$ac_ext >&5
9978echo "$as_me:$LINENO: result: no" >&5
9979echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009980fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009981rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009982 *) ;;
9983esac
9984
Guido van Rossum70c7f481998-03-26 18:44:10 +00009985# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Martin v. Löwise1172582002-11-13 08:51:19 +00009986# However on SGI IRIX 4, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009987# BeOS' sockets are stashed in libnet.
9988case "$ac_sys_system" in
9989IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009990*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009991echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9992echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9993if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9994 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009995else
Martin v. Löwis11437992002-04-12 09:54:03 +00009996 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009997LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009998cat >conftest.$ac_ext <<_ACEOF
9999#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010000#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010001
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010002/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010003#ifdef __cplusplus
10004extern "C"
10005#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010006/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010007 builtin and then its argument prototype would still apply. */
10008char t_open ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010009#ifdef F77_DUMMY_MAIN
10010# ifdef __cplusplus
10011 extern "C"
10012# endif
10013 int F77_DUMMY_MAIN() { return 1; }
10014#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010015int
10016main ()
10017{
10018t_open ();
10019 ;
10020 return 0;
10021}
10022_ACEOF
10023rm -f conftest.$ac_objext conftest$ac_exeext
10024if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10025 (eval $ac_link) 2>&5
10026 ac_status=$?
10027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10028 (exit $ac_status); } &&
10029 { ac_try='test -s conftest$ac_exeext'
10030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10031 (eval $ac_try) 2>&5
10032 ac_status=$?
10033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10034 (exit $ac_status); }; }; then
10035 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010036else
Martin v. Löwis11437992002-04-12 09:54:03 +000010037 echo "$as_me: failed program was:" >&5
10038cat conftest.$ac_ext >&5
10039ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010040fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010041rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10042LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010043fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010044echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
10045echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
10046if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010047 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010048fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010049 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +000010050echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
10051echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
10052if test "${ac_cv_lib_socket_socket+set}" = set; then
10053 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010054else
Martin v. Löwis11437992002-04-12 09:54:03 +000010055 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010056LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010057cat >conftest.$ac_ext <<_ACEOF
10058#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010059#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010060
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010061/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010062#ifdef __cplusplus
10063extern "C"
10064#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010065/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010066 builtin and then its argument prototype would still apply. */
10067char socket ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010068#ifdef F77_DUMMY_MAIN
10069# ifdef __cplusplus
10070 extern "C"
10071# endif
10072 int F77_DUMMY_MAIN() { return 1; }
10073#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010074int
10075main ()
10076{
10077socket ();
10078 ;
10079 return 0;
10080}
10081_ACEOF
10082rm -f conftest.$ac_objext conftest$ac_exeext
10083if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10084 (eval $ac_link) 2>&5
10085 ac_status=$?
10086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10087 (exit $ac_status); } &&
10088 { ac_try='test -s conftest$ac_exeext'
10089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10090 (eval $ac_try) 2>&5
10091 ac_status=$?
10092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10093 (exit $ac_status); }; }; then
10094 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010095else
Martin v. Löwis11437992002-04-12 09:54:03 +000010096 echo "$as_me: failed program was:" >&5
10097cat conftest.$ac_ext >&5
10098ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010099fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010100rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10101LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010102fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010103echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
10104echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
10105if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000010106 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010107fi
10108 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000010109;;
10110esac
10111case "$ac_sys_system" in
10112BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010113echo "$as_me:$LINENO: checking for socket in -lnet" >&5
10114echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
10115if test "${ac_cv_lib_net_socket+set}" = set; then
10116 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010117else
Martin v. Löwis11437992002-04-12 09:54:03 +000010118 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010119LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010120cat >conftest.$ac_ext <<_ACEOF
10121#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010122#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010123
Guido van Rossumad678af1998-10-02 14:42:15 +000010124/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010125#ifdef __cplusplus
10126extern "C"
10127#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010128/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010129 builtin and then its argument prototype would still apply. */
10130char socket ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010131#ifdef F77_DUMMY_MAIN
10132# ifdef __cplusplus
10133 extern "C"
10134# endif
10135 int F77_DUMMY_MAIN() { return 1; }
10136#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010137int
10138main ()
10139{
10140socket ();
10141 ;
10142 return 0;
10143}
10144_ACEOF
10145rm -f conftest.$ac_objext conftest$ac_exeext
10146if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10147 (eval $ac_link) 2>&5
10148 ac_status=$?
10149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10150 (exit $ac_status); } &&
10151 { ac_try='test -s conftest$ac_exeext'
10152 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10153 (eval $ac_try) 2>&5
10154 ac_status=$?
10155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10156 (exit $ac_status); }; }; then
10157 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010158else
Martin v. Löwis11437992002-04-12 09:54:03 +000010159 echo "$as_me: failed program was:" >&5
10160cat conftest.$ac_ext >&5
10161ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010162fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010163rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10164LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010165fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010166echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
10167echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
10168if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010169 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010170fi
10171 # BeOS
10172;;
10173esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000010174
Martin v. Löwis11437992002-04-12 09:54:03 +000010175echo "$as_me:$LINENO: checking for --with-libs" >&5
10176echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
10177
Guido van Rossuma68acba1996-07-31 17:36:39 +000010178# Check whether --with-libs or --without-libs was given.
10179if test "${with_libs+set}" = set; then
10180 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000010181
10182echo "$as_me:$LINENO: result: $withval" >&5
10183echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000010184LIBS="$withval $LIBS"
10185
10186else
Martin v. Löwis11437992002-04-12 09:54:03 +000010187 echo "$as_me:$LINENO: result: no" >&5
10188echo "${ECHO_T}no" >&6
10189fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000010190
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010191# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010192
10193
Martin v. Löwis11437992002-04-12 09:54:03 +000010194echo "$as_me:$LINENO: checking for --with-signal-module" >&5
10195echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
10196
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010197# Check whether --with-signal-module or --without-signal-module was given.
10198if test "${with_signal_module+set}" = set; then
10199 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010200
Martin v. Löwis11437992002-04-12 09:54:03 +000010201fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010202
10203if test -z "$with_signal_module"
10204then with_signal_module="yes"
10205fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010206echo "$as_me:$LINENO: result: $with_signal_module" >&5
10207echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010208
10209if test "${with_signal_module}" = "yes"; then
10210 USE_SIGNAL_MODULE=""
10211 SIGNAL_OBJS=""
10212else
10213 USE_SIGNAL_MODULE="#"
10214 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10215fi
10216
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010217# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010218
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010219USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010220
Martin v. Löwis11437992002-04-12 09:54:03 +000010221echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
10222echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
10223
Guido van Rossumec2f0731997-01-22 20:54:01 +000010224
10225# Check whether --with-dec-threads or --without-dec-threads was given.
10226if test "${with_dec_threads+set}" = set; then
10227 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000010228
10229echo "$as_me:$LINENO: result: $withval" >&5
10230echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000010231LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000010232if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000010233 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000010234fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010235else
Martin v. Löwis11437992002-04-12 09:54:03 +000010236 echo "$as_me:$LINENO: result: no" >&5
10237echo "${ECHO_T}no" >&6
10238fi;
10239
10240# Templates for things AC_DEFINEd more than once.
10241# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010242
10243
Martin v. Löwis11437992002-04-12 09:54:03 +000010244
10245
10246
10247
10248
10249echo "$as_me:$LINENO: checking for --with-threads" >&5
10250echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
10251
Guido van Rossumec2f0731997-01-22 20:54:01 +000010252# Check whether --with-threads or --without-threads was given.
10253if test "${with_threads+set}" = set; then
10254 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000010255
Martin v. Löwis11437992002-04-12 09:54:03 +000010256fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000010257
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010258# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010259
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010260# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010261if test "${with_thread+set}" = set; then
10262 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010263 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000010264fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010265
10266if test -z "$with_threads"
10267then with_threads="yes"
10268fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010269echo "$as_me:$LINENO: result: $with_threads" >&5
10270echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010271
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010272
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010273if test "$with_threads" = "no"
10274then
10275 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010276elif test "$ac_cv_pthread_is_default" = yes
10277then
Martin v. Löwis11437992002-04-12 09:54:03 +000010278 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010279#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010280_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010281
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010282 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010283 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010284#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010285_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010286
10287 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010288 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010289elif test "$ac_cv_kpthread" = "yes"
10290then
10291 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010292 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010293#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010294_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010295
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010296 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010297 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010298elif test "$ac_cv_kthread" = "yes"
10299then
10300 CC="$CC -Kthread"
10301 cat >>confdefs.h <<\_ACEOF
10302#define WITH_THREAD 1
10303_ACEOF
10304
10305 posix_threads=yes
10306 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010307elif test "$ac_cv_pthread" = "yes"
10308then
10309 CC="$CC -pthread"
10310 cat >>confdefs.h <<\_ACEOF
10311#define WITH_THREAD 1
10312_ACEOF
10313
10314 posix_threads=yes
10315 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010316else
10317 if test ! -z "$with_threads" -a -d "$with_threads"
10318 then LDFLAGS="$LDFLAGS -L$with_threads"
10319 fi
10320 if test ! -z "$withval" -a -d "$withval"
10321 then LDFLAGS="$LDFLAGS -L$withval"
10322 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010323
10324 # According to the POSIX spec, a pthreads implementation must
10325 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010326 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10327echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10328 cat >conftest.$ac_ext <<_ACEOF
10329#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010330#include "confdefs.h"
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010331
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010332#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010333#ifdef _POSIX_THREADS
10334yes
10335#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010336
10337_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010338if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000010339 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010340 unistd_defines_pthreads=yes
10341else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010342 unistd_defines_pthreads=no
10343fi
10344rm -f conftest*
10345
Martin v. Löwis11437992002-04-12 09:54:03 +000010346 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10347echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010348
Martin v. Löwis11437992002-04-12 09:54:03 +000010349 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010350#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010351_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010352
Martin v. Löwis11437992002-04-12 09:54:03 +000010353 if test "${ac_cv_header_cthreads_h+set}" = set; then
10354 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10355echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10356if test "${ac_cv_header_cthreads_h+set}" = set; then
10357 echo $ECHO_N "(cached) $ECHO_C" >&6
10358fi
10359echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10360echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010361else
Martin v. Löwis11437992002-04-12 09:54:03 +000010362 # Is the header compilable?
10363echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10364echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10365cat >conftest.$ac_ext <<_ACEOF
10366#line $LINENO "configure"
10367#include "confdefs.h"
10368$ac_includes_default
10369#include <cthreads.h>
10370_ACEOF
10371rm -f conftest.$ac_objext
10372if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10373 (eval $ac_compile) 2>&5
10374 ac_status=$?
10375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10376 (exit $ac_status); } &&
10377 { ac_try='test -s conftest.$ac_objext'
10378 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10379 (eval $ac_try) 2>&5
10380 ac_status=$?
10381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10382 (exit $ac_status); }; }; then
10383 ac_header_compiler=yes
10384else
10385 echo "$as_me: failed program was:" >&5
10386cat conftest.$ac_ext >&5
10387ac_header_compiler=no
10388fi
10389rm -f conftest.$ac_objext conftest.$ac_ext
10390echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10391echo "${ECHO_T}$ac_header_compiler" >&6
10392
10393# Is the header present?
10394echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10395echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10396cat >conftest.$ac_ext <<_ACEOF
10397#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010398#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010399#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010400_ACEOF
10401if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10402 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10403 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010404 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010405 rm -f conftest.er1
10406 cat conftest.err >&5
10407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10408 (exit $ac_status); } >/dev/null; then
10409 if test -s conftest.err; then
10410 ac_cpp_err=$ac_c_preproc_warn_flag
10411 else
10412 ac_cpp_err=
10413 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010414else
Martin v. Löwis11437992002-04-12 09:54:03 +000010415 ac_cpp_err=yes
10416fi
10417if test -z "$ac_cpp_err"; then
10418 ac_header_preproc=yes
10419else
10420 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +000010421 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010422 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010423fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010424rm -f conftest.err conftest.$ac_ext
10425echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10426echo "${ECHO_T}$ac_header_preproc" >&6
10427
10428# So? What about this header?
10429case $ac_header_compiler:$ac_header_preproc in
10430 yes:no )
10431 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10432echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10433 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10434echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10435 no:yes )
10436 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10437echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10438 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10439echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10440 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10441echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10442esac
10443echo "$as_me:$LINENO: checking for cthreads.h" >&5
10444echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10445if test "${ac_cv_header_cthreads_h+set}" = set; then
10446 echo $ECHO_N "(cached) $ECHO_C" >&6
10447else
10448 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010449fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010450echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10451echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10452
10453fi
10454if test $ac_cv_header_cthreads_h = yes; then
10455 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010456#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010457_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010458
Martin v. Löwis11437992002-04-12 09:54:03 +000010459 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010460#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010461_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010462
Martin v. Löwis11437992002-04-12 09:54:03 +000010463
10464cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010465#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010466_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010467
10468 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010469 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010470else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010471
Martin v. Löwis11437992002-04-12 09:54:03 +000010472 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10473 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10474echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10475if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10476 echo $ECHO_N "(cached) $ECHO_C" >&6
10477fi
10478echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10479echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010480else
Martin v. Löwis11437992002-04-12 09:54:03 +000010481 # Is the header compilable?
10482echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10483echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10484cat >conftest.$ac_ext <<_ACEOF
10485#line $LINENO "configure"
10486#include "confdefs.h"
10487$ac_includes_default
10488#include <mach/cthreads.h>
10489_ACEOF
10490rm -f conftest.$ac_objext
10491if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10492 (eval $ac_compile) 2>&5
10493 ac_status=$?
10494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10495 (exit $ac_status); } &&
10496 { ac_try='test -s conftest.$ac_objext'
10497 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10498 (eval $ac_try) 2>&5
10499 ac_status=$?
10500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10501 (exit $ac_status); }; }; then
10502 ac_header_compiler=yes
10503else
10504 echo "$as_me: failed program was:" >&5
10505cat conftest.$ac_ext >&5
10506ac_header_compiler=no
10507fi
10508rm -f conftest.$ac_objext conftest.$ac_ext
10509echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10510echo "${ECHO_T}$ac_header_compiler" >&6
10511
10512# Is the header present?
10513echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10514echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10515cat >conftest.$ac_ext <<_ACEOF
10516#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010517#include "confdefs.h"
10518#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010519_ACEOF
10520if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10521 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10522 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010523 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010524 rm -f conftest.er1
10525 cat conftest.err >&5
10526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10527 (exit $ac_status); } >/dev/null; then
10528 if test -s conftest.err; then
10529 ac_cpp_err=$ac_c_preproc_warn_flag
10530 else
10531 ac_cpp_err=
10532 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010533else
Martin v. Löwis11437992002-04-12 09:54:03 +000010534 ac_cpp_err=yes
10535fi
10536if test -z "$ac_cpp_err"; then
10537 ac_header_preproc=yes
10538else
10539 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010540 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010541 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010542fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010543rm -f conftest.err conftest.$ac_ext
10544echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10545echo "${ECHO_T}$ac_header_preproc" >&6
10546
10547# So? What about this header?
10548case $ac_header_compiler:$ac_header_preproc in
10549 yes:no )
10550 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10551echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10552 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10553echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10554 no:yes )
10555 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10556echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10557 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10558echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10559 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10560echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10561esac
10562echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10563echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10564if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10565 echo $ECHO_N "(cached) $ECHO_C" >&6
10566else
10567 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010568fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010569echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10570echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10571
10572fi
10573if test $ac_cv_header_mach_cthreads_h = yes; then
10574 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010575#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010576_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010577
Martin v. Löwis11437992002-04-12 09:54:03 +000010578 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010579#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010580_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010581
Martin v. Löwis11437992002-04-12 09:54:03 +000010582
10583cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010584#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010585_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010586
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010587 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010588else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010589
Martin v. Löwis11437992002-04-12 09:54:03 +000010590 echo "$as_me:$LINENO: checking for --with-pth" >&5
10591echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10592
10593# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010594if test "${with_pth+set}" = set; then
10595 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010596 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010597echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010598 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010599#define WITH_THREAD 1
10600_ACEOF
10601
10602
10603cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010604#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010605_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010606
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010607 LIBS="-lpth $LIBS"
10608 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010609else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010610 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010611echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010612
10613 # Just looking for pthread_create in libpthread is not enough:
10614 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10615 # So we really have to include pthread.h, and then link.
10616 _libs=$LIBS
10617 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010618 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10619echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10620 cat >conftest.$ac_ext <<_ACEOF
10621#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010622#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010623#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010624
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010625void * start_routine (void *arg) { exit (0); }
Barry Warsawfe33b792003-01-07 22:42:49 +000010626#ifdef F77_DUMMY_MAIN
10627# ifdef __cplusplus
10628 extern "C"
10629# endif
10630 int F77_DUMMY_MAIN() { return 1; }
10631#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010632int
10633main ()
10634{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010635
10636pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010637 ;
10638 return 0;
10639}
10640_ACEOF
10641rm -f conftest.$ac_objext conftest$ac_exeext
10642if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10643 (eval $ac_link) 2>&5
10644 ac_status=$?
10645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10646 (exit $ac_status); } &&
10647 { ac_try='test -s conftest$ac_exeext'
10648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10649 (eval $ac_try) 2>&5
10650 ac_status=$?
10651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10652 (exit $ac_status); }; }; then
10653
10654 echo "$as_me:$LINENO: result: yes" >&5
10655echo "${ECHO_T}yes" >&6
10656 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010657#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010658_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010659
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010660 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010661 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010662else
Martin v. Löwis11437992002-04-12 09:54:03 +000010663 echo "$as_me: failed program was:" >&5
10664cat conftest.$ac_ext >&5
10665
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010666 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010667 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10668echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10669if test "${ac_cv_func_pthread_detach+set}" = set; then
10670 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010671else
Martin v. Löwis11437992002-04-12 09:54:03 +000010672 cat >conftest.$ac_ext <<_ACEOF
10673#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010674#include "confdefs.h"
10675/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010676 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010677#include <assert.h>
10678/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010679#ifdef __cplusplus
10680extern "C"
10681#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010682/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010683 builtin and then its argument prototype would still apply. */
10684char pthread_detach ();
10685char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010686
Barry Warsawfe33b792003-01-07 22:42:49 +000010687#ifdef F77_DUMMY_MAIN
10688# ifdef __cplusplus
10689 extern "C"
10690# endif
10691 int F77_DUMMY_MAIN() { return 1; }
10692#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010693int
10694main ()
10695{
Guido van Rossumad678af1998-10-02 14:42:15 +000010696/* The GNU C library defines this for functions which it implements
10697 to always fail with ENOSYS. Some functions are actually named
10698 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010699#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010700choke me
10701#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010702f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +000010703#endif
10704
Martin v. Löwis11437992002-04-12 09:54:03 +000010705 ;
10706 return 0;
10707}
10708_ACEOF
10709rm -f conftest.$ac_objext conftest$ac_exeext
10710if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10711 (eval $ac_link) 2>&5
10712 ac_status=$?
10713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10714 (exit $ac_status); } &&
10715 { ac_try='test -s conftest$ac_exeext'
10716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10717 (eval $ac_try) 2>&5
10718 ac_status=$?
10719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10720 (exit $ac_status); }; }; then
10721 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010722else
Martin v. Löwis11437992002-04-12 09:54:03 +000010723 echo "$as_me: failed program was:" >&5
10724cat conftest.$ac_ext >&5
10725ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010726fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010727rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010728fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010729echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10730echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10731if test $ac_cv_func_pthread_detach = yes; then
10732 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010733#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010734_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010735
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010736 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010737 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010738else
Guido van Rossumad678af1998-10-02 14:42:15 +000010739
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010740 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10741 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10742echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10743if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10744 echo $ECHO_N "(cached) $ECHO_C" >&6
10745fi
10746echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10747echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10748else
10749 # Is the header compilable?
10750echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10751echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10752cat >conftest.$ac_ext <<_ACEOF
10753#line $LINENO "configure"
10754#include "confdefs.h"
10755$ac_includes_default
10756#include <atheos/threads.h>
10757_ACEOF
10758rm -f conftest.$ac_objext
10759if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10760 (eval $ac_compile) 2>&5
10761 ac_status=$?
10762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10763 (exit $ac_status); } &&
10764 { ac_try='test -s conftest.$ac_objext'
10765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10766 (eval $ac_try) 2>&5
10767 ac_status=$?
10768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10769 (exit $ac_status); }; }; then
10770 ac_header_compiler=yes
10771else
10772 echo "$as_me: failed program was:" >&5
10773cat conftest.$ac_ext >&5
10774ac_header_compiler=no
10775fi
10776rm -f conftest.$ac_objext conftest.$ac_ext
10777echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10778echo "${ECHO_T}$ac_header_compiler" >&6
10779
10780# Is the header present?
10781echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10782echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10783cat >conftest.$ac_ext <<_ACEOF
10784#line $LINENO "configure"
10785#include "confdefs.h"
10786#include <atheos/threads.h>
10787_ACEOF
10788if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10789 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10790 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010791 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010792 rm -f conftest.er1
10793 cat conftest.err >&5
10794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10795 (exit $ac_status); } >/dev/null; then
10796 if test -s conftest.err; then
10797 ac_cpp_err=$ac_c_preproc_warn_flag
10798 else
10799 ac_cpp_err=
10800 fi
10801else
10802 ac_cpp_err=yes
10803fi
10804if test -z "$ac_cpp_err"; then
10805 ac_header_preproc=yes
10806else
10807 echo "$as_me: failed program was:" >&5
10808 cat conftest.$ac_ext >&5
10809 ac_header_preproc=no
10810fi
10811rm -f conftest.err conftest.$ac_ext
10812echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10813echo "${ECHO_T}$ac_header_preproc" >&6
10814
10815# So? What about this header?
10816case $ac_header_compiler:$ac_header_preproc in
10817 yes:no )
10818 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10819echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10820 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10821echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10822 no:yes )
10823 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10824echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10825 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10826echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10827 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10828echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10829esac
10830echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10831echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10832if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10833 echo $ECHO_N "(cached) $ECHO_C" >&6
10834else
10835 ac_cv_header_atheos_threads_h=$ac_header_preproc
10836fi
10837echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10838echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10839
10840fi
10841if test $ac_cv_header_atheos_threads_h = yes; then
10842 cat >>confdefs.h <<\_ACEOF
10843#define WITH_THREAD 1
10844_ACEOF
10845
10846
10847cat >>confdefs.h <<\_ACEOF
10848#define ATHEOS_THREADS 1
10849_ACEOF
10850
10851 THREADOBJ="Python/thread.o"
10852else
10853
Martin v. Löwis11437992002-04-12 09:54:03 +000010854 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10855 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10856echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10857if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10858 echo $ECHO_N "(cached) $ECHO_C" >&6
10859fi
10860echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10861echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010862else
Martin v. Löwis11437992002-04-12 09:54:03 +000010863 # Is the header compilable?
10864echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10865echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10866cat >conftest.$ac_ext <<_ACEOF
10867#line $LINENO "configure"
10868#include "confdefs.h"
10869$ac_includes_default
10870#include <kernel/OS.h>
10871_ACEOF
10872rm -f conftest.$ac_objext
10873if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10874 (eval $ac_compile) 2>&5
10875 ac_status=$?
10876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10877 (exit $ac_status); } &&
10878 { ac_try='test -s conftest.$ac_objext'
10879 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10880 (eval $ac_try) 2>&5
10881 ac_status=$?
10882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10883 (exit $ac_status); }; }; then
10884 ac_header_compiler=yes
10885else
10886 echo "$as_me: failed program was:" >&5
10887cat conftest.$ac_ext >&5
10888ac_header_compiler=no
10889fi
10890rm -f conftest.$ac_objext conftest.$ac_ext
10891echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10892echo "${ECHO_T}$ac_header_compiler" >&6
10893
10894# Is the header present?
10895echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10896echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10897cat >conftest.$ac_ext <<_ACEOF
10898#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010899#include "confdefs.h"
10900#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010901_ACEOF
10902if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10903 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10904 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010905 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010906 rm -f conftest.er1
10907 cat conftest.err >&5
10908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10909 (exit $ac_status); } >/dev/null; then
10910 if test -s conftest.err; then
10911 ac_cpp_err=$ac_c_preproc_warn_flag
10912 else
10913 ac_cpp_err=
10914 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010915else
Martin v. Löwis11437992002-04-12 09:54:03 +000010916 ac_cpp_err=yes
10917fi
10918if test -z "$ac_cpp_err"; then
10919 ac_header_preproc=yes
10920else
10921 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010922 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010923 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010924fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010925rm -f conftest.err conftest.$ac_ext
10926echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10927echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010928
Martin v. Löwis11437992002-04-12 09:54:03 +000010929# So? What about this header?
10930case $ac_header_compiler:$ac_header_preproc in
10931 yes:no )
10932 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10933echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10934 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10935echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10936 no:yes )
10937 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10938echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10939 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10940echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10941 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10942echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10943esac
10944echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10945echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10946if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10947 echo $ECHO_N "(cached) $ECHO_C" >&6
10948else
10949 ac_cv_header_kernel_OS_h=$ac_header_preproc
10950fi
10951echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10952echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10953
10954fi
10955if test $ac_cv_header_kernel_OS_h = yes; then
10956 cat >>confdefs.h <<\_ACEOF
10957#define WITH_THREAD 1
10958_ACEOF
10959
10960
10961cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010962#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010963_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010964
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010965 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010966else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010967
Martin v. Löwis11437992002-04-12 09:54:03 +000010968 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10969echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10970if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10971 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010972else
Martin v. Löwis11437992002-04-12 09:54:03 +000010973 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010974LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010975cat >conftest.$ac_ext <<_ACEOF
10976#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010977#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010978
Greg Steinadf63d62000-07-05 10:38:09 +000010979/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010980#ifdef __cplusplus
10981extern "C"
10982#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010983/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010984 builtin and then its argument prototype would still apply. */
10985char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010986#ifdef F77_DUMMY_MAIN
10987# ifdef __cplusplus
10988 extern "C"
10989# endif
10990 int F77_DUMMY_MAIN() { return 1; }
10991#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010992int
10993main ()
10994{
10995pthread_create ();
10996 ;
10997 return 0;
10998}
10999_ACEOF
11000rm -f conftest.$ac_objext conftest$ac_exeext
11001if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11002 (eval $ac_link) 2>&5
11003 ac_status=$?
11004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11005 (exit $ac_status); } &&
11006 { ac_try='test -s conftest$ac_exeext'
11007 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11008 (eval $ac_try) 2>&5
11009 ac_status=$?
11010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11011 (exit $ac_status); }; }; then
11012 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000011013else
Martin v. Löwis11437992002-04-12 09:54:03 +000011014 echo "$as_me: failed program was:" >&5
11015cat conftest.$ac_ext >&5
11016ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000011017fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011018rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11019LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011020fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011021echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
11022echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
11023if test $ac_cv_lib_pthreads_pthread_create = yes; then
11024 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011025#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011026_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011027
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011028 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011029 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011030 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000011031else
Greg Steinadf63d62000-07-05 10:38:09 +000011032
Martin v. Löwis11437992002-04-12 09:54:03 +000011033 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
11034echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
11035if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
11036 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000011037else
Martin v. Löwis11437992002-04-12 09:54:03 +000011038 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011039LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011040cat >conftest.$ac_ext <<_ACEOF
11041#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000011042#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011043
Guido van Rossum49545951997-12-02 19:28:29 +000011044/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011045#ifdef __cplusplus
11046extern "C"
11047#endif
Guido van Rossum49545951997-12-02 19:28:29 +000011048/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011049 builtin and then its argument prototype would still apply. */
11050char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011051#ifdef F77_DUMMY_MAIN
11052# ifdef __cplusplus
11053 extern "C"
11054# endif
11055 int F77_DUMMY_MAIN() { return 1; }
11056#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011057int
11058main ()
11059{
11060pthread_create ();
11061 ;
11062 return 0;
11063}
11064_ACEOF
11065rm -f conftest.$ac_objext conftest$ac_exeext
11066if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11067 (eval $ac_link) 2>&5
11068 ac_status=$?
11069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11070 (exit $ac_status); } &&
11071 { ac_try='test -s conftest$ac_exeext'
11072 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11073 (eval $ac_try) 2>&5
11074 ac_status=$?
11075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11076 (exit $ac_status); }; }; then
11077 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000011078else
Martin v. Löwis11437992002-04-12 09:54:03 +000011079 echo "$as_me: failed program was:" >&5
11080cat conftest.$ac_ext >&5
11081ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000011082fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011083rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11084LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000011085fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011086echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
11087echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
11088if test $ac_cv_lib_c_r_pthread_create = yes; then
11089 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011090#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011091_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011092
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011093 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011094 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011095 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011096else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011097
Martin v. Löwis11437992002-04-12 09:54:03 +000011098 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
11099echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
11100if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
11101 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011102else
Martin v. Löwis11437992002-04-12 09:54:03 +000011103 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011104LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011105cat >conftest.$ac_ext <<_ACEOF
11106#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011107#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011108
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011109/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011110#ifdef __cplusplus
11111extern "C"
11112#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011113/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011114 builtin and then its argument prototype would still apply. */
11115char __d6_pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011116#ifdef F77_DUMMY_MAIN
11117# ifdef __cplusplus
11118 extern "C"
11119# endif
11120 int F77_DUMMY_MAIN() { return 1; }
11121#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011122int
11123main ()
11124{
11125__d6_pthread_create ();
11126 ;
11127 return 0;
11128}
11129_ACEOF
11130rm -f conftest.$ac_objext conftest$ac_exeext
11131if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11132 (eval $ac_link) 2>&5
11133 ac_status=$?
11134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11135 (exit $ac_status); } &&
11136 { ac_try='test -s conftest$ac_exeext'
11137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11138 (eval $ac_try) 2>&5
11139 ac_status=$?
11140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11141 (exit $ac_status); }; }; then
11142 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011143else
Martin v. Löwis11437992002-04-12 09:54:03 +000011144 echo "$as_me: failed program was:" >&5
11145cat conftest.$ac_ext >&5
11146ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011147fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011148rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11149LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011150fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011151echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
11152echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
11153if test $ac_cv_lib_thread___d6_pthread_create = yes; then
11154 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011155#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011156_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011157
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011158 echo Systems with __d6_pthread_create are not supported anymore.
11159 echo See README
11160 exit 1
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011161 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011162 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011163 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000011164else
Guido van Rossum49545951997-12-02 19:28:29 +000011165
Martin v. Löwis11437992002-04-12 09:54:03 +000011166 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
11167echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
11168if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
11169 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011170else
Martin v. Löwis11437992002-04-12 09:54:03 +000011171 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011172LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011173cat >conftest.$ac_ext <<_ACEOF
11174#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011175#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011176
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011177/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011178#ifdef __cplusplus
11179extern "C"
11180#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011181/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011182 builtin and then its argument prototype would still apply. */
11183char __pthread_create_system ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011184#ifdef F77_DUMMY_MAIN
11185# ifdef __cplusplus
11186 extern "C"
11187# endif
11188 int F77_DUMMY_MAIN() { return 1; }
11189#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011190int
11191main ()
11192{
11193__pthread_create_system ();
11194 ;
11195 return 0;
11196}
11197_ACEOF
11198rm -f conftest.$ac_objext conftest$ac_exeext
11199if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11200 (eval $ac_link) 2>&5
11201 ac_status=$?
11202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11203 (exit $ac_status); } &&
11204 { ac_try='test -s conftest$ac_exeext'
11205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11206 (eval $ac_try) 2>&5
11207 ac_status=$?
11208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11209 (exit $ac_status); }; }; then
11210 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011211else
Martin v. Löwis11437992002-04-12 09:54:03 +000011212 echo "$as_me: failed program was:" >&5
11213cat conftest.$ac_ext >&5
11214ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011215fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011216rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11217LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011218fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011219echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11220echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
11221if test $ac_cv_lib_pthread___pthread_create_system = yes; then
11222 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011223#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011224_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011225
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011226 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011227 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011228 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011229else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011230
Martin v. Löwis11437992002-04-12 09:54:03 +000011231 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
11232echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
11233if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
11234 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000011235else
Martin v. Löwis11437992002-04-12 09:54:03 +000011236 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011237LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011238cat >conftest.$ac_ext <<_ACEOF
11239#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011240#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011241
Guido van Rossumb93a8621998-05-07 13:27:32 +000011242/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011243#ifdef __cplusplus
11244extern "C"
11245#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000011246/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011247 builtin and then its argument prototype would still apply. */
11248char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011249#ifdef F77_DUMMY_MAIN
11250# ifdef __cplusplus
11251 extern "C"
11252# endif
11253 int F77_DUMMY_MAIN() { return 1; }
11254#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011255int
11256main ()
11257{
11258pthread_create ();
11259 ;
11260 return 0;
11261}
11262_ACEOF
11263rm -f conftest.$ac_objext conftest$ac_exeext
11264if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11265 (eval $ac_link) 2>&5
11266 ac_status=$?
11267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11268 (exit $ac_status); } &&
11269 { ac_try='test -s conftest$ac_exeext'
11270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11271 (eval $ac_try) 2>&5
11272 ac_status=$?
11273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11274 (exit $ac_status); }; }; then
11275 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000011276else
Martin v. Löwis11437992002-04-12 09:54:03 +000011277 echo "$as_me: failed program was:" >&5
11278cat conftest.$ac_ext >&5
11279ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011280fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011281rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11282LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011283fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011284echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
11285echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
11286if test $ac_cv_lib_cma_pthread_create = yes; then
11287 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011288#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011289_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011290
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011291 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011292 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011293 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011294else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011295
Martin v. Löwis130fb172001-07-19 11:00:41 +000011296 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000011297fi
11298
Guido van Rossum627b2d71993-12-24 10:39:16 +000011299
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011300fi
11301
Guido van Rossum0be3e491997-05-22 20:33:33 +000011302fi
11303
Guido van Rossum49545951997-12-02 19:28:29 +000011304fi
11305
Guido van Rossumb93a8621998-05-07 13:27:32 +000011306fi
11307
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011308fi
11309
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011310
Michael W. Hudson54241132001-12-07 15:38:26 +000011311fi
11312
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011313
11314fi
11315
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011316fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011317rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11318fi;
11319fi
11320
11321
11322fi
11323
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011324
Michael W. Hudson54241132001-12-07 15:38:26 +000011325
Martin v. Löwis11437992002-04-12 09:54:03 +000011326 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11327echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11328if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11329 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011330else
Martin v. Löwis11437992002-04-12 09:54:03 +000011331 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011332LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011333cat >conftest.$ac_ext <<_ACEOF
11334#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011335#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011336
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011337/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011338#ifdef __cplusplus
11339extern "C"
11340#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011341/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011342 builtin and then its argument prototype would still apply. */
11343char usconfig ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011344#ifdef F77_DUMMY_MAIN
11345# ifdef __cplusplus
11346 extern "C"
11347# endif
11348 int F77_DUMMY_MAIN() { return 1; }
11349#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011350int
11351main ()
11352{
11353usconfig ();
11354 ;
11355 return 0;
11356}
11357_ACEOF
11358rm -f conftest.$ac_objext conftest$ac_exeext
11359if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11360 (eval $ac_link) 2>&5
11361 ac_status=$?
11362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11363 (exit $ac_status); } &&
11364 { ac_try='test -s conftest$ac_exeext'
11365 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11366 (eval $ac_try) 2>&5
11367 ac_status=$?
11368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11369 (exit $ac_status); }; }; then
11370 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011371else
Martin v. Löwis11437992002-04-12 09:54:03 +000011372 echo "$as_me: failed program was:" >&5
11373cat conftest.$ac_ext >&5
11374ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011375fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011376rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11377LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011378fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011379echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11380echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11381if test $ac_cv_lib_mpc_usconfig = yes; then
11382 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011383#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011384_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011385
Martin v. Löwis130fb172001-07-19 11:00:41 +000011386 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011387 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011388 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011389fi
11390
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011391
Neal Norwitza978ab02002-11-02 16:58:05 +000011392 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011393 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11394echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11395if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11396 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011397else
Martin v. Löwis11437992002-04-12 09:54:03 +000011398 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011399LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011400cat >conftest.$ac_ext <<_ACEOF
11401#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011402#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011403
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011404/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011405#ifdef __cplusplus
11406extern "C"
11407#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011408/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011409 builtin and then its argument prototype would still apply. */
11410char thr_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011411#ifdef F77_DUMMY_MAIN
11412# ifdef __cplusplus
11413 extern "C"
11414# endif
11415 int F77_DUMMY_MAIN() { return 1; }
11416#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011417int
11418main ()
11419{
11420thr_create ();
11421 ;
11422 return 0;
11423}
11424_ACEOF
11425rm -f conftest.$ac_objext conftest$ac_exeext
11426if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11427 (eval $ac_link) 2>&5
11428 ac_status=$?
11429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11430 (exit $ac_status); } &&
11431 { ac_try='test -s conftest$ac_exeext'
11432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11433 (eval $ac_try) 2>&5
11434 ac_status=$?
11435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11436 (exit $ac_status); }; }; then
11437 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011438else
Martin v. Löwis11437992002-04-12 09:54:03 +000011439 echo "$as_me: failed program was:" >&5
11440cat conftest.$ac_ext >&5
11441ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011442fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011443rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11444LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011445fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011446echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11447echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11448if test $ac_cv_lib_thread_thr_create = yes; then
11449 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011450#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011451_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011452
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011453 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011454 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011455 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011456fi
11457
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011458 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011459
Martin v. Löwis130fb172001-07-19 11:00:41 +000011460 if test "$USE_THREAD_MODULE" != "#"
11461 then
11462 # If the above checks didn't disable threads, (at least) OSF1
11463 # needs this '-threads' argument during linking.
11464 case $ac_sys_system in
11465 OSF1) LDLAST=-threads;;
11466 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011467 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011468fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011469
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011470if test "$posix_threads" = "yes"; then
11471 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011472
11473cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011474#define _POSIX_THREADS 1
11475_ACEOF
11476
11477 fi
11478
11479 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11480 case $ac_sys_system/$ac_sys_release in
11481 SunOS/5.6)
11482cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011483#define HAVE_PTHREAD_DESTRUCTOR 1
11484_ACEOF
11485
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011486 ;;
11487 SunOS/5.8)
11488cat >>confdefs.h <<\_ACEOF
11489#define HAVE_BROKEN_POSIX_SEMAPHORES 1
11490_ACEOF
11491
11492 ;;
11493 esac
11494
11495 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11496echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11497 if test "${ac_cv_pthread_system_supported+set}" = set; then
11498 echo $ECHO_N "(cached) $ECHO_C" >&6
11499else
11500 if test "$cross_compiling" = yes; then
11501 ac_cv_pthread_system_supported=no
11502else
11503 cat >conftest.$ac_ext <<_ACEOF
11504#line $LINENO "configure"
11505#include "confdefs.h"
11506#include <pthread.h>
11507 void *foo(void *parm) {
11508 return NULL;
11509 }
11510 main() {
11511 pthread_attr_t attr;
11512 pthread_t id;
11513 if (pthread_attr_init(&attr)) exit(-1);
11514 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
11515 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
11516 exit(0);
11517 }
11518_ACEOF
11519rm -f conftest$ac_exeext
11520if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11521 (eval $ac_link) 2>&5
11522 ac_status=$?
11523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11524 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11525 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11526 (eval $ac_try) 2>&5
11527 ac_status=$?
11528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11529 (exit $ac_status); }; }; then
11530 ac_cv_pthread_system_supported=yes
11531else
11532 echo "$as_me: program exited with status $ac_status" >&5
11533echo "$as_me: failed program was:" >&5
11534cat conftest.$ac_ext >&5
11535( exit $ac_status )
11536ac_cv_pthread_system_supported=no
11537fi
11538rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11539fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011540
Guido van Rossum627b2d71993-12-24 10:39:16 +000011541fi
11542
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011543 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11544echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
11545 if test "$ac_cv_pthread_system_supported" = "yes"; then
11546
11547cat >>confdefs.h <<\_ACEOF
11548#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
11549_ACEOF
11550
11551 fi
11552
11553for ac_func in pthread_sigmask
11554do
11555as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11556echo "$as_me:$LINENO: checking for $ac_func" >&5
11557echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11558if eval "test \"\${$as_ac_var+set}\" = set"; then
11559 echo $ECHO_N "(cached) $ECHO_C" >&6
11560else
11561 cat >conftest.$ac_ext <<_ACEOF
11562#line $LINENO "configure"
11563#include "confdefs.h"
11564/* System header to define __stub macros and hopefully few prototypes,
11565 which can conflict with char $ac_func (); below. */
11566#include <assert.h>
11567/* Override any gcc2 internal prototype to avoid an error. */
11568#ifdef __cplusplus
11569extern "C"
11570#endif
11571/* We use char because int might match the return type of a gcc2
11572 builtin and then its argument prototype would still apply. */
11573char $ac_func ();
11574char (*f) ();
11575
11576#ifdef F77_DUMMY_MAIN
11577# ifdef __cplusplus
11578 extern "C"
11579# endif
11580 int F77_DUMMY_MAIN() { return 1; }
11581#endif
11582int
11583main ()
11584{
11585/* The GNU C library defines this for functions which it implements
11586 to always fail with ENOSYS. Some functions are actually named
11587 something starting with __ and the normal name is an alias. */
11588#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11589choke me
11590#else
11591f = $ac_func;
11592#endif
11593
11594 ;
11595 return 0;
11596}
11597_ACEOF
11598rm -f conftest.$ac_objext conftest$ac_exeext
11599if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11600 (eval $ac_link) 2>&5
11601 ac_status=$?
11602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11603 (exit $ac_status); } &&
11604 { ac_try='test -s conftest$ac_exeext'
11605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11606 (eval $ac_try) 2>&5
11607 ac_status=$?
11608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11609 (exit $ac_status); }; }; then
11610 eval "$as_ac_var=yes"
11611else
11612 echo "$as_me: failed program was:" >&5
11613cat conftest.$ac_ext >&5
11614eval "$as_ac_var=no"
11615fi
11616rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11617fi
11618echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11619echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11620if test `eval echo '${'$as_ac_var'}'` = yes; then
11621 cat >>confdefs.h <<_ACEOF
11622#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11623_ACEOF
11624
11625fi
11626done
11627
11628fi
11629
11630
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011631# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011632
11633
11634echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11635echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011636# Check whether --enable-ipv6 or --disable-ipv6 was given.
11637if test "${enable_ipv6+set}" = set; then
11638 enableval="$enable_ipv6"
11639 case "$enableval" in
11640 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011641 echo "$as_me:$LINENO: result: no" >&5
11642echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011643 ipv6=no
11644 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011645 *) echo "$as_me:$LINENO: result: yes" >&5
11646echo "${ECHO_T}yes" >&6
11647 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011648#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011649_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011650
11651 ipv6=yes
11652 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011653 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011654else
Martin v. Löwis11437992002-04-12 09:54:03 +000011655
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011656 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011657 echo "$as_me:$LINENO: result: no" >&5
11658echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011659 ipv6=no
11660
11661else
Martin v. Löwis11437992002-04-12 09:54:03 +000011662 cat >conftest.$ac_ext <<_ACEOF
11663#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011664#include "confdefs.h"
11665 /* AF_INET6 available check */
11666#include <sys/types.h>
11667#include <sys/socket.h>
11668main()
11669{
11670 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11671 exit(1);
11672 else
11673 exit(0);
11674}
11675
Martin v. Löwis11437992002-04-12 09:54:03 +000011676_ACEOF
11677rm -f conftest$ac_exeext
11678if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11679 (eval $ac_link) 2>&5
11680 ac_status=$?
11681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11682 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11683 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11684 (eval $ac_try) 2>&5
11685 ac_status=$?
11686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11687 (exit $ac_status); }; }; then
11688 echo "$as_me:$LINENO: result: yes" >&5
11689echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011690 ipv6=yes
11691else
Martin v. Löwis11437992002-04-12 09:54:03 +000011692 echo "$as_me: program exited with status $ac_status" >&5
11693echo "$as_me: failed program was:" >&5
11694cat conftest.$ac_ext >&5
11695( exit $ac_status )
11696echo "$as_me:$LINENO: result: no" >&5
11697echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011698 ipv6=no
11699fi
Barry Warsawfe33b792003-01-07 22:42:49 +000011700rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011701fi
11702
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011703if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011704 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11705echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11706 cat >conftest.$ac_ext <<_ACEOF
11707#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011708#include "confdefs.h"
11709#include <sys/types.h>
11710#include <netinet/in.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000011711#ifdef F77_DUMMY_MAIN
11712# ifdef __cplusplus
11713 extern "C"
11714# endif
11715 int F77_DUMMY_MAIN() { return 1; }
11716#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011717int
11718main ()
11719{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011720struct sockaddr_in6 x;
11721x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011722 ;
11723 return 0;
11724}
11725_ACEOF
11726rm -f conftest.$ac_objext
11727if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11728 (eval $ac_compile) 2>&5
11729 ac_status=$?
11730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11731 (exit $ac_status); } &&
11732 { ac_try='test -s conftest.$ac_objext'
11733 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11734 (eval $ac_try) 2>&5
11735 ac_status=$?
11736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11737 (exit $ac_status); }; }; then
11738 echo "$as_me:$LINENO: result: yes" >&5
11739echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011740 ipv6=yes
11741else
Martin v. Löwis11437992002-04-12 09:54:03 +000011742 echo "$as_me: failed program was:" >&5
11743cat conftest.$ac_ext >&5
11744echo "$as_me:$LINENO: result: no" >&5
11745echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011746 ipv6=no
11747fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011748rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011749fi
11750
11751if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011752 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011753#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011754_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011755
11756fi
11757
Martin v. Löwis11437992002-04-12 09:54:03 +000011758fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011759
11760ipv6type=unknown
11761ipv6lib=none
11762ipv6trylibc=no
11763
11764if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011765 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11766echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011767 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11768 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011769 case $i in
11770 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011771 cat >conftest.$ac_ext <<_ACEOF
11772#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011773#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011774
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011775#include <netinet/in.h>
11776#ifdef IPV6_INRIA_VERSION
11777yes
11778#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011779_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011780if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011781 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011782 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011783fi
11784rm -f conftest*
11785
11786 ;;
11787 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011788 cat >conftest.$ac_ext <<_ACEOF
11789#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011790#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011791
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011792#include <netinet/in.h>
11793#ifdef __KAME__
11794yes
11795#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011796_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011797if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011798 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011799 ipv6type=$i;
11800 ipv6lib=inet6
11801 ipv6libdir=/usr/local/v6/lib
11802 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011803fi
11804rm -f conftest*
11805
11806 ;;
11807 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011808 cat >conftest.$ac_ext <<_ACEOF
11809#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011810#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011811
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011812#include <features.h>
11813#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11814yes
11815#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011816_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011817if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011818 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011819 ipv6type=$i;
11820 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011821fi
11822rm -f conftest*
11823
11824 ;;
11825 linux-inet6)
11826 if test -d /usr/inet6; then
11827 ipv6type=$i
11828 ipv6lib=inet6
11829 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011830 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011831 fi
11832 ;;
11833 solaris)
11834 if test -f /etc/netconfig; then
11835 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11836 ipv6type=$i
11837 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011838 fi
11839 fi
11840 ;;
11841 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011842 cat >conftest.$ac_ext <<_ACEOF
11843#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011844#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011845
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011846#include <sys/param.h>
11847#ifdef _TOSHIBA_INET6
11848yes
11849#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011850_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011851if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011852 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011853 ipv6type=$i;
11854 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011855 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011856fi
11857rm -f conftest*
11858
11859 ;;
11860 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011861 cat >conftest.$ac_ext <<_ACEOF
11862#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011863#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011864
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011865#include </usr/local/v6/include/sys/v6config.h>
11866#ifdef __V6D__
11867yes
11868#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011869_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011870if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011871 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011872 ipv6type=$i;
11873 ipv6lib=v6;
11874 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011875 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011876fi
11877rm -f conftest*
11878
11879 ;;
11880 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011881 cat >conftest.$ac_ext <<_ACEOF
11882#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011883#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011884
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011885#include <sys/param.h>
11886#ifdef _ZETA_MINAMI_INET6
11887yes
11888#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011889_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011890if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011891 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011892 ipv6type=$i;
11893 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011894 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011895fi
11896rm -f conftest*
11897
11898 ;;
11899 esac
11900 if test "$ipv6type" != "unknown"; then
11901 break
11902 fi
11903 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011904 echo "$as_me:$LINENO: result: $ipv6type" >&5
11905echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011906fi
11907
11908if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11909 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11910 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11911 echo "using lib$ipv6lib"
11912 else
11913 if test $ipv6trylibc = "yes"; then
11914 echo "using libc"
11915 else
11916 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11917 echo "You need to fetch lib$ipv6lib.a from appropriate"
11918 echo 'ipv6 kit and compile beforehand.'
11919 exit 1
11920 fi
11921 fi
11922fi
11923
Jack Jansen7b8c7542002-04-14 20:12:41 +000011924# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000011925echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
11926echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000011927
11928# Check whether --with-universal-newlines or --without-universal-newlines was given.
11929if test "${with_universal_newlines+set}" = set; then
11930 withval="$with_universal_newlines"
11931
11932fi;
11933
11934if test -z "$with_universal_newlines"
11935then with_universal_newlines="yes"
11936fi
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011937if test "$with_universal_newlines" = "no"
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011938then
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011939 echo --without-universal-newlines is unsupported, see README
11940 exit 1
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011941else
Martin v. Löwise8aea582002-04-16 05:51:02 +000011942
11943cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011944#define WITH_UNIVERSAL_NEWLINES 1
11945_ACEOF
11946
11947fi
11948echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11949echo "${ECHO_T}$with_universal_newlines" >&6
11950
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011951# Check for --with-doc-strings
11952echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11953echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11954
11955# Check whether --with-doc-strings or --without-doc-strings was given.
11956if test "${with_doc_strings+set}" = set; then
11957 withval="$with_doc_strings"
11958
11959fi;
11960
11961if test -z "$with_doc_strings"
11962then with_doc_strings="yes"
11963fi
11964if test "$with_doc_strings" != "no"
11965then
11966
11967cat >>confdefs.h <<\_ACEOF
11968#define WITH_DOC_STRINGS 1
11969_ACEOF
11970
11971fi
11972echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11973echo "${ECHO_T}$with_doc_strings" >&6
11974
Neil Schemenauera35c6882001-02-27 04:45:05 +000011975# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011976echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11977echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11978
Neil Schemenauera35c6882001-02-27 04:45:05 +000011979# Check whether --with-pymalloc or --without-pymalloc was given.
11980if test "${with_pymalloc+set}" = set; then
11981 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011982
Martin v. Löwis11437992002-04-12 09:54:03 +000011983fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011984
Neil Schemenauer16c22972002-03-22 15:34:49 +000011985if test -z "$with_pymalloc"
11986then with_pymalloc="yes"
11987fi
11988if test "$with_pymalloc" != "no"
11989then
Martin v. Löwis11437992002-04-12 09:54:03 +000011990
11991cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011992#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011993_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011994
11995fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011996echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11997echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011998
Barry Warsawef82cd72000-06-30 16:21:01 +000011999# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012000echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
12001echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
12002
Barry Warsawef82cd72000-06-30 16:21:01 +000012003# Check whether --with-wctype-functions or --without-wctype-functions was given.
12004if test "${with_wctype_functions+set}" = set; then
12005 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000012006
Barry Warsawef82cd72000-06-30 16:21:01 +000012007if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012008then
12009
12010cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000012011#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012012_ACEOF
12013
12014 echo "$as_me:$LINENO: result: yes" >&5
12015echo "${ECHO_T}yes" >&6
12016else echo "$as_me:$LINENO: result: no" >&5
12017echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000012018fi
12019else
Martin v. Löwis11437992002-04-12 09:54:03 +000012020 echo "$as_me:$LINENO: result: no" >&5
12021echo "${ECHO_T}no" >&6
12022fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000012023
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012024# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000012025
Guido van Rossum98935bf2001-09-05 19:13:16 +000012026DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000012027
Martin v. Löwis11437992002-04-12 09:54:03 +000012028echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
12029echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
12030
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012031# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012032if test "${with_sgi_dl+set}" = set; then
12033 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000012034
12035echo "$as_me:$LINENO: result: $withval" >&5
12036echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000012037echo --with-sgi-dl is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000012038exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012039
12040cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012041#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012042_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000012043
Guido van Rossume97ee181999-12-20 21:27:22 +000012044DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012045dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000012046if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000012047then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000012048else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
12049echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
12050 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012051fi
12052DLINCLDIR=${dldir}
12053LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000012054else
Martin v. Löwis11437992002-04-12 09:54:03 +000012055 echo "$as_me:$LINENO: result: no" >&5
12056echo "${ECHO_T}no" >&6
12057fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000012058
Martin v. Löwis11437992002-04-12 09:54:03 +000012059echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
12060echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000012061
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012062# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012063if test "${with_dl_dld+set}" = set; then
12064 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000012065
12066echo "$as_me:$LINENO: result: $withval" >&5
12067echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000012068echo --with-dl-dld is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000012069exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012070
12071cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012072#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012073_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000012074
Guido van Rossume97ee181999-12-20 21:27:22 +000012075DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012076dldir=`echo "$withval" | sed 's/,.*//'`
12077dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000012078if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000012079then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012080else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&5
12081echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&2;}
12082 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012083fi
12084DLINCLDIR=${dldir}
12085LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000012086else
Martin v. Löwis11437992002-04-12 09:54:03 +000012087 echo "$as_me:$LINENO: result: no" >&5
12088echo "${ECHO_T}no" >&6
12089fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000012090
Guido van Rossume97ee181999-12-20 21:27:22 +000012091# the dlopen() function means we might want to use dynload_shlib.o. some
12092# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012093
Thomas Wouters3a584202000-08-05 23:28:51 +000012094for ac_func in dlopen
12095do
Martin v. Löwis11437992002-04-12 09:54:03 +000012096as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12097echo "$as_me:$LINENO: checking for $ac_func" >&5
12098echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12099if eval "test \"\${$as_ac_var+set}\" = set"; then
12100 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012101else
Martin v. Löwis11437992002-04-12 09:54:03 +000012102 cat >conftest.$ac_ext <<_ACEOF
12103#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000012104#include "confdefs.h"
12105/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012106 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000012107#include <assert.h>
12108/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012109#ifdef __cplusplus
12110extern "C"
12111#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012112/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012113 builtin and then its argument prototype would still apply. */
12114char $ac_func ();
12115char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000012116
Barry Warsawfe33b792003-01-07 22:42:49 +000012117#ifdef F77_DUMMY_MAIN
12118# ifdef __cplusplus
12119 extern "C"
12120# endif
12121 int F77_DUMMY_MAIN() { return 1; }
12122#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012123int
12124main ()
12125{
Guido van Rossume97ee181999-12-20 21:27:22 +000012126/* The GNU C library defines this for functions which it implements
12127 to always fail with ENOSYS. Some functions are actually named
12128 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012129#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000012130choke me
12131#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012132f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000012133#endif
12134
Martin v. Löwis11437992002-04-12 09:54:03 +000012135 ;
12136 return 0;
12137}
12138_ACEOF
12139rm -f conftest.$ac_objext conftest$ac_exeext
12140if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12141 (eval $ac_link) 2>&5
12142 ac_status=$?
12143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12144 (exit $ac_status); } &&
12145 { ac_try='test -s conftest$ac_exeext'
12146 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12147 (eval $ac_try) 2>&5
12148 ac_status=$?
12149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12150 (exit $ac_status); }; }; then
12151 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012152else
Martin v. Löwis11437992002-04-12 09:54:03 +000012153 echo "$as_me: failed program was:" >&5
12154cat conftest.$ac_ext >&5
12155eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012156fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012157rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012158fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012159echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12160echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12161if test `eval echo '${'$as_ac_var'}'` = yes; then
12162 cat >>confdefs.h <<_ACEOF
12163#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12164_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012165
Guido van Rossume97ee181999-12-20 21:27:22 +000012166fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012167done
Guido van Rossume97ee181999-12-20 21:27:22 +000012168
Michael W. Hudson54241132001-12-07 15:38:26 +000012169
Guido van Rossume97ee181999-12-20 21:27:22 +000012170# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12171# loading of modules.
12172
Martin v. Löwis11437992002-04-12 09:54:03 +000012173echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
12174echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012175if test -z "$DYNLOADFILE"
12176then
12177 case $ac_sys_system/$ac_sys_release in
12178 AIX*) DYNLOADFILE="dynload_aix.o";;
12179 BeOS*) DYNLOADFILE="dynload_beos.o";;
12180 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000012181 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012182 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000012183 *)
12184 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
12185 # out any dynamic loading
12186 if test "$ac_cv_func_dlopen" = yes
12187 then DYNLOADFILE="dynload_shlib.o"
12188 else DYNLOADFILE="dynload_stub.o"
12189 fi
12190 ;;
12191 esac
12192fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012193echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
12194echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012195if test "$DYNLOADFILE" != "dynload_stub.o"
12196then
Martin v. Löwis11437992002-04-12 09:54:03 +000012197
12198cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012199#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012200_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012201
12202fi
12203
Neil Schemenauer4e425612001-06-19 15:44:15 +000012204# MACHDEP_OBJS can be set to platform-specific object files needed by Python
12205
Michael W. Hudson54241132001-12-07 15:38:26 +000012206
Martin v. Löwis11437992002-04-12 09:54:03 +000012207echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
12208echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012209if test -z "$MACHDEP_OBJS"
12210then
Jack Jansene578a632001-08-15 01:27:14 +000012211 MACHDEP_OBJS=$extra_machdep_objs
12212else
12213 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000012214fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012215echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
12216echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012217
Guido van Rossum627b2d71993-12-24 10:39:16 +000012218# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012219
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
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
Martin v. Löwis9c36c292002-12-21 18:34:06 +000012292
Martin v. Löwisd5843682002-11-21 20:41:28 +000012293for ac_func in alarm chown clock confstr ctermid execv \
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012294 fchdir fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012295 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
12296 getpriority getpwent getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000012297 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000012298 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000012299 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000012300 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000012301 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012302 sigaction siginterrupt sigrelse strftime strptime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000012303 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012304 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000012305do
Martin v. Löwis11437992002-04-12 09:54:03 +000012306as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12307echo "$as_me:$LINENO: checking for $ac_func" >&5
12308echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12309if eval "test \"\${$as_ac_var+set}\" = set"; then
12310 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012311else
Martin v. Löwis11437992002-04-12 09:54:03 +000012312 cat >conftest.$ac_ext <<_ACEOF
12313#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012314#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012315/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012316 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012317#include <assert.h>
12318/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012319#ifdef __cplusplus
12320extern "C"
12321#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012322/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012323 builtin and then its argument prototype would still apply. */
12324char $ac_func ();
12325char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012326
Barry Warsawfe33b792003-01-07 22:42:49 +000012327#ifdef F77_DUMMY_MAIN
12328# ifdef __cplusplus
12329 extern "C"
12330# endif
12331 int F77_DUMMY_MAIN() { return 1; }
12332#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012333int
12334main ()
12335{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012336/* The GNU C library defines this for functions which it implements
12337 to always fail with ENOSYS. Some functions are actually named
12338 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012339#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012340choke me
12341#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012342f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012343#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012344
Martin v. Löwis11437992002-04-12 09:54:03 +000012345 ;
12346 return 0;
12347}
12348_ACEOF
12349rm -f conftest.$ac_objext conftest$ac_exeext
12350if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12351 (eval $ac_link) 2>&5
12352 ac_status=$?
12353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12354 (exit $ac_status); } &&
12355 { ac_try='test -s conftest$ac_exeext'
12356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12357 (eval $ac_try) 2>&5
12358 ac_status=$?
12359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12360 (exit $ac_status); }; }; then
12361 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012362else
Martin v. Löwis11437992002-04-12 09:54:03 +000012363 echo "$as_me: failed program was:" >&5
12364cat conftest.$ac_ext >&5
12365eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012366fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012367rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012368fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012369echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12370echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12371if test `eval echo '${'$as_ac_var'}'` = yes; then
12372 cat >>confdefs.h <<_ACEOF
12373#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12374_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012375
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012376fi
12377done
12378
Michael W. Hudson54241132001-12-07 15:38:26 +000012379
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012380# For some functions, having a definition is not sufficient, since
12381# we want to take their address.
12382echo "$as_me:$LINENO: checking for chroot" >&5
12383echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12384cat >conftest.$ac_ext <<_ACEOF
12385#line $LINENO "configure"
12386#include "confdefs.h"
12387#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012388#ifdef F77_DUMMY_MAIN
12389# ifdef __cplusplus
12390 extern "C"
12391# endif
12392 int F77_DUMMY_MAIN() { return 1; }
12393#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012394int
12395main ()
12396{
12397void *x=chroot
12398 ;
12399 return 0;
12400}
12401_ACEOF
12402rm -f conftest.$ac_objext
12403if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12404 (eval $ac_compile) 2>&5
12405 ac_status=$?
12406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12407 (exit $ac_status); } &&
12408 { ac_try='test -s conftest.$ac_objext'
12409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12410 (eval $ac_try) 2>&5
12411 ac_status=$?
12412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12413 (exit $ac_status); }; }; then
12414
12415cat >>confdefs.h <<\_ACEOF
12416#define HAVE_CHROOT 1
12417_ACEOF
12418
12419 echo "$as_me:$LINENO: result: yes" >&5
12420echo "${ECHO_T}yes" >&6
12421else
12422 echo "$as_me: failed program was:" >&5
12423cat conftest.$ac_ext >&5
12424echo "$as_me:$LINENO: result: no" >&5
12425echo "${ECHO_T}no" >&6
12426
12427fi
12428rm -f conftest.$ac_objext conftest.$ac_ext
12429echo "$as_me:$LINENO: checking for link" >&5
12430echo $ECHO_N "checking for link... $ECHO_C" >&6
12431cat >conftest.$ac_ext <<_ACEOF
12432#line $LINENO "configure"
12433#include "confdefs.h"
12434#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012435#ifdef F77_DUMMY_MAIN
12436# ifdef __cplusplus
12437 extern "C"
12438# endif
12439 int F77_DUMMY_MAIN() { return 1; }
12440#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012441int
12442main ()
12443{
12444void *x=link
12445 ;
12446 return 0;
12447}
12448_ACEOF
12449rm -f conftest.$ac_objext
12450if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12451 (eval $ac_compile) 2>&5
12452 ac_status=$?
12453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12454 (exit $ac_status); } &&
12455 { ac_try='test -s conftest.$ac_objext'
12456 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12457 (eval $ac_try) 2>&5
12458 ac_status=$?
12459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12460 (exit $ac_status); }; }; then
12461
12462cat >>confdefs.h <<\_ACEOF
12463#define HAVE_LINK 1
12464_ACEOF
12465
12466 echo "$as_me:$LINENO: result: yes" >&5
12467echo "${ECHO_T}yes" >&6
12468else
12469 echo "$as_me: failed program was:" >&5
12470cat conftest.$ac_ext >&5
12471echo "$as_me:$LINENO: result: no" >&5
12472echo "${ECHO_T}no" >&6
12473
12474fi
12475rm -f conftest.$ac_objext conftest.$ac_ext
12476echo "$as_me:$LINENO: checking for symlink" >&5
12477echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12478cat >conftest.$ac_ext <<_ACEOF
12479#line $LINENO "configure"
12480#include "confdefs.h"
12481#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012482#ifdef F77_DUMMY_MAIN
12483# ifdef __cplusplus
12484 extern "C"
12485# endif
12486 int F77_DUMMY_MAIN() { return 1; }
12487#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012488int
12489main ()
12490{
12491void *x=symlink
12492 ;
12493 return 0;
12494}
12495_ACEOF
12496rm -f conftest.$ac_objext
12497if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12498 (eval $ac_compile) 2>&5
12499 ac_status=$?
12500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12501 (exit $ac_status); } &&
12502 { ac_try='test -s conftest.$ac_objext'
12503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12504 (eval $ac_try) 2>&5
12505 ac_status=$?
12506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12507 (exit $ac_status); }; }; then
12508
12509cat >>confdefs.h <<\_ACEOF
12510#define HAVE_SYMLINK 1
12511_ACEOF
12512
12513 echo "$as_me:$LINENO: result: yes" >&5
12514echo "${ECHO_T}yes" >&6
12515else
12516 echo "$as_me: failed program was:" >&5
12517cat conftest.$ac_ext >&5
12518echo "$as_me:$LINENO: result: no" >&5
12519echo "${ECHO_T}no" >&6
12520
12521fi
12522rm -f conftest.$ac_objext conftest.$ac_ext
12523
Martin v. Löwisd5843682002-11-21 20:41:28 +000012524# On some systems (eg. FreeBSD 5), we would find a definition of the
12525# functions ctermid_r, setgroups in the library, but no prototype
12526# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12527# address to avoid compiler warnings and potential miscompilations
12528# because of the missing prototypes.
12529
12530echo "$as_me:$LINENO: checking for ctermid_r" >&5
12531echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
12532cat >conftest.$ac_ext <<_ACEOF
12533#line $LINENO "configure"
12534#include "confdefs.h"
12535
12536#include "confdefs.h"
12537#include <stdio.h>
12538
Barry Warsawfe33b792003-01-07 22:42:49 +000012539#ifdef F77_DUMMY_MAIN
12540# ifdef __cplusplus
12541 extern "C"
12542# endif
12543 int F77_DUMMY_MAIN() { return 1; }
12544#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012545int
12546main ()
12547{
12548void* p = ctermid_r
12549 ;
12550 return 0;
12551}
12552_ACEOF
12553rm -f conftest.$ac_objext
12554if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12555 (eval $ac_compile) 2>&5
12556 ac_status=$?
12557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12558 (exit $ac_status); } &&
12559 { ac_try='test -s conftest.$ac_objext'
12560 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12561 (eval $ac_try) 2>&5
12562 ac_status=$?
12563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12564 (exit $ac_status); }; }; then
12565
12566cat >>confdefs.h <<\_ACEOF
12567#define HAVE_CTERMID_R 1
12568_ACEOF
12569
12570 echo "$as_me:$LINENO: result: yes" >&5
12571echo "${ECHO_T}yes" >&6
12572else
12573 echo "$as_me: failed program was:" >&5
12574cat conftest.$ac_ext >&5
12575echo "$as_me:$LINENO: result: no" >&5
12576echo "${ECHO_T}no" >&6
12577
12578fi
12579rm -f conftest.$ac_objext conftest.$ac_ext
12580
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012581echo "$as_me:$LINENO: checking for flock" >&5
12582echo $ECHO_N "checking for flock... $ECHO_C" >&6
12583cat >conftest.$ac_ext <<_ACEOF
12584#line $LINENO "configure"
12585#include "confdefs.h"
12586
12587#include "confdefs.h"
12588#include <sys/file.h>
12589
12590#ifdef F77_DUMMY_MAIN
12591# ifdef __cplusplus
12592 extern "C"
12593# endif
12594 int F77_DUMMY_MAIN() { return 1; }
12595#endif
12596int
12597main ()
12598{
12599void* p = flock
12600 ;
12601 return 0;
12602}
12603_ACEOF
12604rm -f conftest.$ac_objext
12605if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12606 (eval $ac_compile) 2>&5
12607 ac_status=$?
12608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12609 (exit $ac_status); } &&
12610 { ac_try='test -s conftest.$ac_objext'
12611 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12612 (eval $ac_try) 2>&5
12613 ac_status=$?
12614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12615 (exit $ac_status); }; }; then
12616
12617cat >>confdefs.h <<\_ACEOF
12618#define HAVE_FLOCK 1
12619_ACEOF
12620
12621 echo "$as_me:$LINENO: result: yes" >&5
12622echo "${ECHO_T}yes" >&6
12623else
12624 echo "$as_me: failed program was:" >&5
12625cat conftest.$ac_ext >&5
12626echo "$as_me:$LINENO: result: no" >&5
12627echo "${ECHO_T}no" >&6
12628
12629fi
12630rm -f conftest.$ac_objext conftest.$ac_ext
12631
12632echo "$as_me:$LINENO: checking for getpagesize" >&5
12633echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
12634cat >conftest.$ac_ext <<_ACEOF
12635#line $LINENO "configure"
12636#include "confdefs.h"
12637
12638#include "confdefs.h"
12639#include <unistd.h>
12640
12641#ifdef F77_DUMMY_MAIN
12642# ifdef __cplusplus
12643 extern "C"
12644# endif
12645 int F77_DUMMY_MAIN() { return 1; }
12646#endif
12647int
12648main ()
12649{
12650void* p = getpagesize
12651 ;
12652 return 0;
12653}
12654_ACEOF
12655rm -f conftest.$ac_objext
12656if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12657 (eval $ac_compile) 2>&5
12658 ac_status=$?
12659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12660 (exit $ac_status); } &&
12661 { ac_try='test -s conftest.$ac_objext'
12662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12663 (eval $ac_try) 2>&5
12664 ac_status=$?
12665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12666 (exit $ac_status); }; }; then
12667
12668cat >>confdefs.h <<\_ACEOF
12669#define HAVE_GETPAGESIZE 1
12670_ACEOF
12671
12672 echo "$as_me:$LINENO: result: yes" >&5
12673echo "${ECHO_T}yes" >&6
12674else
12675 echo "$as_me: failed program was:" >&5
12676cat conftest.$ac_ext >&5
12677echo "$as_me:$LINENO: result: no" >&5
12678echo "${ECHO_T}no" >&6
12679
12680fi
12681rm -f conftest.$ac_objext conftest.$ac_ext
12682
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012683for ac_prog in true
12684do
12685 # Extract the first word of "$ac_prog", so it can be a program name with args.
12686set dummy $ac_prog; ac_word=$2
12687echo "$as_me:$LINENO: checking for $ac_word" >&5
12688echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12689if test "${ac_cv_prog_TRUE+set}" = set; then
12690 echo $ECHO_N "(cached) $ECHO_C" >&6
12691else
12692 if test -n "$TRUE"; then
12693 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12694else
12695as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12696for as_dir in $PATH
12697do
12698 IFS=$as_save_IFS
12699 test -z "$as_dir" && as_dir=.
12700 for ac_exec_ext in '' $ac_executable_extensions; do
12701 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12702 ac_cv_prog_TRUE="$ac_prog"
12703 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12704 break 2
12705 fi
12706done
12707done
12708
12709fi
12710fi
12711TRUE=$ac_cv_prog_TRUE
12712if test -n "$TRUE"; then
12713 echo "$as_me:$LINENO: result: $TRUE" >&5
12714echo "${ECHO_T}$TRUE" >&6
12715else
12716 echo "$as_me:$LINENO: result: no" >&5
12717echo "${ECHO_T}no" >&6
12718fi
12719
12720 test -n "$TRUE" && break
12721done
12722test -n "$TRUE" || TRUE="/bin/true"
12723
12724
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012725echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
12726echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
12727if test "${ac_cv_lib_c_inet_aton+set}" = set; then
12728 echo $ECHO_N "(cached) $ECHO_C" >&6
12729else
12730 ac_check_lib_save_LIBS=$LIBS
12731LIBS="-lc $LIBS"
12732cat >conftest.$ac_ext <<_ACEOF
12733#line $LINENO "configure"
12734#include "confdefs.h"
12735
12736/* Override any gcc2 internal prototype to avoid an error. */
12737#ifdef __cplusplus
12738extern "C"
12739#endif
12740/* We use char because int might match the return type of a gcc2
12741 builtin and then its argument prototype would still apply. */
12742char inet_aton ();
12743#ifdef F77_DUMMY_MAIN
12744# ifdef __cplusplus
12745 extern "C"
12746# endif
12747 int F77_DUMMY_MAIN() { return 1; }
12748#endif
12749int
12750main ()
12751{
12752inet_aton ();
12753 ;
12754 return 0;
12755}
12756_ACEOF
12757rm -f conftest.$ac_objext conftest$ac_exeext
12758if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12759 (eval $ac_link) 2>&5
12760 ac_status=$?
12761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12762 (exit $ac_status); } &&
12763 { ac_try='test -s conftest$ac_exeext'
12764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12765 (eval $ac_try) 2>&5
12766 ac_status=$?
12767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12768 (exit $ac_status); }; }; then
12769 ac_cv_lib_c_inet_aton=yes
12770else
12771 echo "$as_me: failed program was:" >&5
12772cat conftest.$ac_ext >&5
12773ac_cv_lib_c_inet_aton=no
12774fi
12775rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12776LIBS=$ac_check_lib_save_LIBS
12777fi
12778echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
12779echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
12780if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012781 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012782else
12783
12784echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
12785echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
12786if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
12787 echo $ECHO_N "(cached) $ECHO_C" >&6
12788else
12789 ac_check_lib_save_LIBS=$LIBS
12790LIBS="-lresolv $LIBS"
12791cat >conftest.$ac_ext <<_ACEOF
12792#line $LINENO "configure"
12793#include "confdefs.h"
12794
12795/* Override any gcc2 internal prototype to avoid an error. */
12796#ifdef __cplusplus
12797extern "C"
12798#endif
12799/* We use char because int might match the return type of a gcc2
12800 builtin and then its argument prototype would still apply. */
12801char inet_aton ();
12802#ifdef F77_DUMMY_MAIN
12803# ifdef __cplusplus
12804 extern "C"
12805# endif
12806 int F77_DUMMY_MAIN() { return 1; }
12807#endif
12808int
12809main ()
12810{
12811inet_aton ();
12812 ;
12813 return 0;
12814}
12815_ACEOF
12816rm -f conftest.$ac_objext conftest$ac_exeext
12817if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12818 (eval $ac_link) 2>&5
12819 ac_status=$?
12820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12821 (exit $ac_status); } &&
12822 { ac_try='test -s conftest$ac_exeext'
12823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12824 (eval $ac_try) 2>&5
12825 ac_status=$?
12826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12827 (exit $ac_status); }; }; then
12828 ac_cv_lib_resolv_inet_aton=yes
12829else
12830 echo "$as_me: failed program was:" >&5
12831cat conftest.$ac_ext >&5
12832ac_cv_lib_resolv_inet_aton=no
12833fi
12834rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12835LIBS=$ac_check_lib_save_LIBS
12836fi
12837echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
12838echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
12839if test $ac_cv_lib_resolv_inet_aton = yes; then
12840 cat >>confdefs.h <<_ACEOF
12841#define HAVE_LIBRESOLV 1
12842_ACEOF
12843
12844 LIBS="-lresolv $LIBS"
12845
12846fi
12847
12848
12849fi
12850
12851
Martin v. Löwise9416172003-05-03 10:12:45 +000012852echo "$as_me:$LINENO: checking for hstrerror" >&5
12853echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
12854cat >conftest.$ac_ext <<_ACEOF
12855#line $LINENO "configure"
12856#include "confdefs.h"
12857
12858#include "confdefs.h"
12859#include <netdb.h>
12860
12861#ifdef F77_DUMMY_MAIN
12862# ifdef __cplusplus
12863 extern "C"
12864# endif
12865 int F77_DUMMY_MAIN() { return 1; }
12866#endif
12867int
12868main ()
12869{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012870void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012871 ;
12872 return 0;
12873}
12874_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012875rm -f conftest.$ac_objext conftest$ac_exeext
12876if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12877 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000012878 ac_status=$?
12879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12880 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012881 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000012882 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12883 (eval $ac_try) 2>&5
12884 ac_status=$?
12885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12886 (exit $ac_status); }; }; then
12887
12888cat >>confdefs.h <<\_ACEOF
12889#define HAVE_HSTRERROR 1
12890_ACEOF
12891
12892 echo "$as_me:$LINENO: result: yes" >&5
12893echo "${ECHO_T}yes" >&6
12894else
12895 echo "$as_me: failed program was:" >&5
12896cat conftest.$ac_ext >&5
12897echo "$as_me:$LINENO: result: no" >&5
12898echo "${ECHO_T}no" >&6
12899
12900fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012901rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012902
12903echo "$as_me:$LINENO: checking for inet_aton" >&5
12904echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
12905cat >conftest.$ac_ext <<_ACEOF
12906#line $LINENO "configure"
12907#include "confdefs.h"
12908
12909#include "confdefs.h"
12910#include <sys/socket.h>
12911#include <netinet/in.h>
12912#include <arpa/inet.h>
12913
12914#ifdef F77_DUMMY_MAIN
12915# ifdef __cplusplus
12916 extern "C"
12917# endif
12918 int F77_DUMMY_MAIN() { return 1; }
12919#endif
12920int
12921main ()
12922{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012923void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012924 ;
12925 return 0;
12926}
12927_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012928rm -f conftest.$ac_objext conftest$ac_exeext
12929if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12930 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000012931 ac_status=$?
12932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12933 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012934 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000012935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12936 (eval $ac_try) 2>&5
12937 ac_status=$?
12938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12939 (exit $ac_status); }; }; then
12940
12941cat >>confdefs.h <<\_ACEOF
12942#define HAVE_INET_ATON 1
12943_ACEOF
12944
12945 echo "$as_me:$LINENO: result: yes" >&5
12946echo "${ECHO_T}yes" >&6
12947else
12948 echo "$as_me: failed program was:" >&5
12949cat conftest.$ac_ext >&5
12950echo "$as_me:$LINENO: result: no" >&5
12951echo "${ECHO_T}no" >&6
12952
12953fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012954rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012955
12956echo "$as_me:$LINENO: checking for inet_pton" >&5
12957echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
12958cat >conftest.$ac_ext <<_ACEOF
12959#line $LINENO "configure"
12960#include "confdefs.h"
12961
12962#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012963#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012964#include <sys/socket.h>
12965#include <netinet/in.h>
12966#include <arpa/inet.h>
12967
12968#ifdef F77_DUMMY_MAIN
12969# ifdef __cplusplus
12970 extern "C"
12971# endif
12972 int F77_DUMMY_MAIN() { return 1; }
12973#endif
12974int
12975main ()
12976{
12977void* p = inet_pton
12978 ;
12979 return 0;
12980}
12981_ACEOF
12982rm -f conftest.$ac_objext
12983if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12984 (eval $ac_compile) 2>&5
12985 ac_status=$?
12986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12987 (exit $ac_status); } &&
12988 { ac_try='test -s conftest.$ac_objext'
12989 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12990 (eval $ac_try) 2>&5
12991 ac_status=$?
12992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12993 (exit $ac_status); }; }; then
12994
12995cat >>confdefs.h <<\_ACEOF
12996#define HAVE_INET_PTON 1
12997_ACEOF
12998
12999 echo "$as_me:$LINENO: result: yes" >&5
13000echo "${ECHO_T}yes" >&6
13001else
13002 echo "$as_me: failed program was:" >&5
13003cat conftest.$ac_ext >&5
13004echo "$as_me:$LINENO: result: no" >&5
13005echo "${ECHO_T}no" >&6
13006
13007fi
13008rm -f conftest.$ac_objext conftest.$ac_ext
13009
Martin v. Löwisd5843682002-11-21 20:41:28 +000013010echo "$as_me:$LINENO: checking for setgroups" >&5
13011echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
13012cat >conftest.$ac_ext <<_ACEOF
13013#line $LINENO "configure"
13014#include "confdefs.h"
13015
13016#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013017#include <unistd.h>
Martin v. Löwisd5843682002-11-21 20:41:28 +000013018
Barry Warsawfe33b792003-01-07 22:42:49 +000013019#ifdef F77_DUMMY_MAIN
13020# ifdef __cplusplus
13021 extern "C"
13022# endif
13023 int F77_DUMMY_MAIN() { return 1; }
13024#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000013025int
13026main ()
13027{
13028void* p = setgroups
13029 ;
13030 return 0;
13031}
13032_ACEOF
13033rm -f conftest.$ac_objext
13034if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13035 (eval $ac_compile) 2>&5
13036 ac_status=$?
13037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13038 (exit $ac_status); } &&
13039 { ac_try='test -s conftest.$ac_objext'
13040 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13041 (eval $ac_try) 2>&5
13042 ac_status=$?
13043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13044 (exit $ac_status); }; }; then
13045
13046cat >>confdefs.h <<\_ACEOF
13047#define HAVE_SETGROUPS 1
13048_ACEOF
13049
13050 echo "$as_me:$LINENO: result: yes" >&5
13051echo "${ECHO_T}yes" >&6
13052else
13053 echo "$as_me: failed program was:" >&5
13054cat conftest.$ac_ext >&5
13055echo "$as_me:$LINENO: result: no" >&5
13056echo "${ECHO_T}no" >&6
13057
13058fi
13059rm -f conftest.$ac_objext conftest.$ac_ext
13060
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013061# check for openpty and forkpty
13062
Martin v. Löwis11437992002-04-12 09:54:03 +000013063
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013064for ac_func in openpty
13065do
Martin v. Löwis11437992002-04-12 09:54:03 +000013066as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13067echo "$as_me:$LINENO: checking for $ac_func" >&5
13068echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13069if eval "test \"\${$as_ac_var+set}\" = set"; then
13070 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013071else
Martin v. Löwis11437992002-04-12 09:54:03 +000013072 cat >conftest.$ac_ext <<_ACEOF
13073#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013074#include "confdefs.h"
13075/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013076 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013077#include <assert.h>
13078/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013079#ifdef __cplusplus
13080extern "C"
13081#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013082/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013083 builtin and then its argument prototype would still apply. */
13084char $ac_func ();
13085char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013086
Barry Warsawfe33b792003-01-07 22:42:49 +000013087#ifdef F77_DUMMY_MAIN
13088# ifdef __cplusplus
13089 extern "C"
13090# endif
13091 int F77_DUMMY_MAIN() { return 1; }
13092#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013093int
13094main ()
13095{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013096/* The GNU C library defines this for functions which it implements
13097 to always fail with ENOSYS. Some functions are actually named
13098 something starting with __ and the normal name is an alias. */
13099#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13100choke me
13101#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013102f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013103#endif
13104
Martin v. Löwis11437992002-04-12 09:54:03 +000013105 ;
13106 return 0;
13107}
13108_ACEOF
13109rm -f conftest.$ac_objext conftest$ac_exeext
13110if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13111 (eval $ac_link) 2>&5
13112 ac_status=$?
13113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13114 (exit $ac_status); } &&
13115 { ac_try='test -s conftest$ac_exeext'
13116 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13117 (eval $ac_try) 2>&5
13118 ac_status=$?
13119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13120 (exit $ac_status); }; }; then
13121 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013122else
Martin v. Löwis11437992002-04-12 09:54:03 +000013123 echo "$as_me: failed program was:" >&5
13124cat conftest.$ac_ext >&5
13125eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013126fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013127rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013128fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013129echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13130echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13131if test `eval echo '${'$as_ac_var'}'` = yes; then
13132 cat >>confdefs.h <<_ACEOF
13133#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13134_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013135
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013136else
Martin v. Löwis11437992002-04-12 09:54:03 +000013137 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
13138echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
13139if test "${ac_cv_lib_util_openpty+set}" = set; then
13140 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013141else
Martin v. Löwis11437992002-04-12 09:54:03 +000013142 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013143LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013144cat >conftest.$ac_ext <<_ACEOF
13145#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013146#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013147
Fred Drake8cef4cf2000-06-28 16:40:38 +000013148/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013149#ifdef __cplusplus
13150extern "C"
13151#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013152/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013153 builtin and then its argument prototype would still apply. */
13154char openpty ();
Barry Warsawfe33b792003-01-07 22:42:49 +000013155#ifdef F77_DUMMY_MAIN
13156# ifdef __cplusplus
13157 extern "C"
13158# endif
13159 int F77_DUMMY_MAIN() { return 1; }
13160#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013161int
13162main ()
13163{
13164openpty ();
13165 ;
13166 return 0;
13167}
13168_ACEOF
13169rm -f conftest.$ac_objext conftest$ac_exeext
13170if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13171 (eval $ac_link) 2>&5
13172 ac_status=$?
13173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13174 (exit $ac_status); } &&
13175 { ac_try='test -s conftest$ac_exeext'
13176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13177 (eval $ac_try) 2>&5
13178 ac_status=$?
13179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13180 (exit $ac_status); }; }; then
13181 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013182else
Martin v. Löwis11437992002-04-12 09:54:03 +000013183 echo "$as_me: failed program was:" >&5
13184cat conftest.$ac_ext >&5
13185ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013186fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013187rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13188LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013189fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013190echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
13191echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
13192if test $ac_cv_lib_util_openpty = yes; then
13193 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013194#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013195_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013196 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013197fi
13198
13199fi
13200done
13201
Martin v. Löwis11437992002-04-12 09:54:03 +000013202
Fred Drake8cef4cf2000-06-28 16:40:38 +000013203for ac_func in forkpty
13204do
Martin v. Löwis11437992002-04-12 09:54:03 +000013205as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13206echo "$as_me:$LINENO: checking for $ac_func" >&5
13207echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13208if eval "test \"\${$as_ac_var+set}\" = set"; then
13209 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013210else
Martin v. Löwis11437992002-04-12 09:54:03 +000013211 cat >conftest.$ac_ext <<_ACEOF
13212#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013213#include "confdefs.h"
13214/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013215 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000013216#include <assert.h>
13217/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013218#ifdef __cplusplus
13219extern "C"
13220#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013221/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013222 builtin and then its argument prototype would still apply. */
13223char $ac_func ();
13224char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000013225
Barry Warsawfe33b792003-01-07 22:42:49 +000013226#ifdef F77_DUMMY_MAIN
13227# ifdef __cplusplus
13228 extern "C"
13229# endif
13230 int F77_DUMMY_MAIN() { return 1; }
13231#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013232int
13233main ()
13234{
Fred Drake8cef4cf2000-06-28 16:40:38 +000013235/* The GNU C library defines this for functions which it implements
13236 to always fail with ENOSYS. Some functions are actually named
13237 something starting with __ and the normal name is an alias. */
13238#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13239choke me
13240#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013241f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000013242#endif
13243
Martin v. Löwis11437992002-04-12 09:54:03 +000013244 ;
13245 return 0;
13246}
13247_ACEOF
13248rm -f conftest.$ac_objext conftest$ac_exeext
13249if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13250 (eval $ac_link) 2>&5
13251 ac_status=$?
13252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13253 (exit $ac_status); } &&
13254 { ac_try='test -s conftest$ac_exeext'
13255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13256 (eval $ac_try) 2>&5
13257 ac_status=$?
13258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13259 (exit $ac_status); }; }; then
13260 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013261else
Martin v. Löwis11437992002-04-12 09:54:03 +000013262 echo "$as_me: failed program was:" >&5
13263cat conftest.$ac_ext >&5
13264eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013265fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013266rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013267fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013268echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13269echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13270if test `eval echo '${'$as_ac_var'}'` = yes; then
13271 cat >>confdefs.h <<_ACEOF
13272#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13273_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013274
Fred Drake8cef4cf2000-06-28 16:40:38 +000013275else
Martin v. Löwis11437992002-04-12 09:54:03 +000013276 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
13277echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
13278if test "${ac_cv_lib_util_forkpty+set}" = set; then
13279 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013280else
Martin v. Löwis11437992002-04-12 09:54:03 +000013281 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013282LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013283cat >conftest.$ac_ext <<_ACEOF
13284#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013285#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013286
Fred Drake8cef4cf2000-06-28 16:40:38 +000013287/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013288#ifdef __cplusplus
13289extern "C"
13290#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013291/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013292 builtin and then its argument prototype would still apply. */
13293char forkpty ();
Barry Warsawfe33b792003-01-07 22:42:49 +000013294#ifdef F77_DUMMY_MAIN
13295# ifdef __cplusplus
13296 extern "C"
13297# endif
13298 int F77_DUMMY_MAIN() { return 1; }
13299#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013300int
13301main ()
13302{
13303forkpty ();
13304 ;
13305 return 0;
13306}
13307_ACEOF
13308rm -f conftest.$ac_objext conftest$ac_exeext
13309if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13310 (eval $ac_link) 2>&5
13311 ac_status=$?
13312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13313 (exit $ac_status); } &&
13314 { ac_try='test -s conftest$ac_exeext'
13315 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13316 (eval $ac_try) 2>&5
13317 ac_status=$?
13318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13319 (exit $ac_status); }; }; then
13320 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013321else
Martin v. Löwis11437992002-04-12 09:54:03 +000013322 echo "$as_me: failed program was:" >&5
13323cat conftest.$ac_ext >&5
13324ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013325fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013326rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13327LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013328fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013329echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
13330echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
13331if test $ac_cv_lib_util_forkpty = yes; then
13332 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013333#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013334_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013335 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013336fi
13337
13338fi
13339done
13340
Jack Jansendd19cf82001-12-06 22:36:17 +000013341
Michael W. Hudson54241132001-12-07 15:38:26 +000013342# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013343
13344
13345
13346
13347
13348
Fred Drake8cef4cf2000-06-28 16:40:38 +000013349for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
13350do
Martin v. Löwis11437992002-04-12 09:54:03 +000013351as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13352echo "$as_me:$LINENO: checking for $ac_func" >&5
13353echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13354if eval "test \"\${$as_ac_var+set}\" = set"; then
13355 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013356else
Martin v. Löwis11437992002-04-12 09:54:03 +000013357 cat >conftest.$ac_ext <<_ACEOF
13358#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013359#include "confdefs.h"
13360/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013361 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013362#include <assert.h>
13363/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013364#ifdef __cplusplus
13365extern "C"
13366#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013367/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013368 builtin and then its argument prototype would still apply. */
13369char $ac_func ();
13370char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013371
Barry Warsawfe33b792003-01-07 22:42:49 +000013372#ifdef F77_DUMMY_MAIN
13373# ifdef __cplusplus
13374 extern "C"
13375# endif
13376 int F77_DUMMY_MAIN() { return 1; }
13377#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013378int
13379main ()
13380{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013381/* The GNU C library defines this for functions which it implements
13382 to always fail with ENOSYS. Some functions are actually named
13383 something starting with __ and the normal name is an alias. */
13384#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13385choke me
13386#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013387f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013388#endif
13389
Martin v. Löwis11437992002-04-12 09:54:03 +000013390 ;
13391 return 0;
13392}
13393_ACEOF
13394rm -f conftest.$ac_objext conftest$ac_exeext
13395if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13396 (eval $ac_link) 2>&5
13397 ac_status=$?
13398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13399 (exit $ac_status); } &&
13400 { ac_try='test -s conftest$ac_exeext'
13401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13402 (eval $ac_try) 2>&5
13403 ac_status=$?
13404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13405 (exit $ac_status); }; }; then
13406 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013407else
Martin v. Löwis11437992002-04-12 09:54:03 +000013408 echo "$as_me: failed program was:" >&5
13409cat conftest.$ac_ext >&5
13410eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013411fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013412rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013413fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013414echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13415echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13416if test `eval echo '${'$as_ac_var'}'` = yes; then
13417 cat >>confdefs.h <<_ACEOF
13418#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13419_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000013420
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013421fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000013422done
13423
Michael W. Hudson54241132001-12-07 15:38:26 +000013424
Martin v. Löwis11437992002-04-12 09:54:03 +000013425
13426
13427
13428
13429
Martin v. Löwis1142de32002-03-29 16:28:31 +000013430for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000013431do
Martin v. Löwis11437992002-04-12 09:54:03 +000013432as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13433echo "$as_me:$LINENO: checking for $ac_func" >&5
13434echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13435if eval "test \"\${$as_ac_var+set}\" = set"; then
13436 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013437else
Martin v. Löwis11437992002-04-12 09:54:03 +000013438 cat >conftest.$ac_ext <<_ACEOF
13439#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013440#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013441/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013442 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013443#include <assert.h>
13444/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013445#ifdef __cplusplus
13446extern "C"
13447#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013448/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013449 builtin and then its argument prototype would still apply. */
13450char $ac_func ();
13451char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013452
Barry Warsawfe33b792003-01-07 22:42:49 +000013453#ifdef F77_DUMMY_MAIN
13454# ifdef __cplusplus
13455 extern "C"
13456# endif
13457 int F77_DUMMY_MAIN() { return 1; }
13458#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013459int
13460main ()
13461{
Guido van Rossum627b2d71993-12-24 10:39:16 +000013462/* The GNU C library defines this for functions which it implements
13463 to always fail with ENOSYS. Some functions are actually named
13464 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013465#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013466choke me
13467#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013468f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013469#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013470
Martin v. Löwis11437992002-04-12 09:54:03 +000013471 ;
13472 return 0;
13473}
13474_ACEOF
13475rm -f conftest.$ac_objext conftest$ac_exeext
13476if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13477 (eval $ac_link) 2>&5
13478 ac_status=$?
13479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13480 (exit $ac_status); } &&
13481 { ac_try='test -s conftest$ac_exeext'
13482 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13483 (eval $ac_try) 2>&5
13484 ac_status=$?
13485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13486 (exit $ac_status); }; }; then
13487 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013488else
Martin v. Löwis11437992002-04-12 09:54:03 +000013489 echo "$as_me: failed program was:" >&5
13490cat conftest.$ac_ext >&5
13491eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013492fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013493rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000013494fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013495echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13496echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13497if test `eval echo '${'$as_ac_var'}'` = yes; then
13498 cat >>confdefs.h <<_ACEOF
13499#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13500_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000013501
Martin v. Löwis1142de32002-03-29 16:28:31 +000013502else
Martin v. Löwis11437992002-04-12 09:54:03 +000013503 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013504fi
13505done
13506
13507
Martin v. Löwis11437992002-04-12 09:54:03 +000013508
Martin v. Löwis1142de32002-03-29 16:28:31 +000013509for ac_func in getpgrp
13510do
Martin v. Löwis11437992002-04-12 09:54:03 +000013511as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13512echo "$as_me:$LINENO: checking for $ac_func" >&5
13513echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13514if eval "test \"\${$as_ac_var+set}\" = set"; then
13515 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000013516else
Martin v. Löwis11437992002-04-12 09:54:03 +000013517 cat >conftest.$ac_ext <<_ACEOF
13518#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013519#include "confdefs.h"
13520/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013521 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000013522#include <assert.h>
13523/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013524#ifdef __cplusplus
13525extern "C"
13526#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013527/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013528 builtin and then its argument prototype would still apply. */
13529char $ac_func ();
13530char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000013531
Barry Warsawfe33b792003-01-07 22:42:49 +000013532#ifdef F77_DUMMY_MAIN
13533# ifdef __cplusplus
13534 extern "C"
13535# endif
13536 int F77_DUMMY_MAIN() { return 1; }
13537#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013538int
13539main ()
13540{
Martin v. Löwis1142de32002-03-29 16:28:31 +000013541/* The GNU C library defines this for functions which it implements
13542 to always fail with ENOSYS. Some functions are actually named
13543 something starting with __ and the normal name is an alias. */
13544#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13545choke me
13546#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013547f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000013548#endif
13549
Martin v. Löwis11437992002-04-12 09:54:03 +000013550 ;
13551 return 0;
13552}
13553_ACEOF
13554rm -f conftest.$ac_objext conftest$ac_exeext
13555if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13556 (eval $ac_link) 2>&5
13557 ac_status=$?
13558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13559 (exit $ac_status); } &&
13560 { ac_try='test -s conftest$ac_exeext'
13561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13562 (eval $ac_try) 2>&5
13563 ac_status=$?
13564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13565 (exit $ac_status); }; }; then
13566 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013567else
Martin v. Löwis11437992002-04-12 09:54:03 +000013568 echo "$as_me: failed program was:" >&5
13569cat conftest.$ac_ext >&5
13570eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013571fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013572rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013573fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013574echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13575echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13576if test `eval echo '${'$as_ac_var'}'` = yes; then
13577 cat >>confdefs.h <<_ACEOF
13578#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13579_ACEOF
13580 cat >conftest.$ac_ext <<_ACEOF
13581#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013582#include "confdefs.h"
13583#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000013584#ifdef F77_DUMMY_MAIN
13585# ifdef __cplusplus
13586 extern "C"
13587# endif
13588 int F77_DUMMY_MAIN() { return 1; }
13589#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013590int
13591main ()
13592{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013593getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013594 ;
13595 return 0;
13596}
13597_ACEOF
13598rm -f conftest.$ac_objext
13599if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13600 (eval $ac_compile) 2>&5
13601 ac_status=$?
13602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13603 (exit $ac_status); } &&
13604 { ac_try='test -s conftest.$ac_objext'
13605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13606 (eval $ac_try) 2>&5
13607 ac_status=$?
13608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13609 (exit $ac_status); }; }; then
13610
13611cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013612#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013613_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013614
Martin v. Löwis11437992002-04-12 09:54:03 +000013615
Guido van Rossumf78abae1997-01-21 22:02:36 +000013616else
Martin v. Löwis11437992002-04-12 09:54:03 +000013617 echo "$as_me: failed program was:" >&5
13618cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013619fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013620rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013621
Guido van Rossum627b2d71993-12-24 10:39:16 +000013622fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013623done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013624
Jack Jansen150753c2003-03-29 22:07:47 +000013625
13626for ac_func in setpgrp
13627do
13628as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13629echo "$as_me:$LINENO: checking for $ac_func" >&5
13630echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13631if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013632 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013633else
Martin v. Löwis11437992002-04-12 09:54:03 +000013634 cat >conftest.$ac_ext <<_ACEOF
13635#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013636#include "confdefs.h"
Jack Jansen150753c2003-03-29 22:07:47 +000013637/* System header to define __stub macros and hopefully few prototypes,
13638 which can conflict with char $ac_func (); below. */
13639#include <assert.h>
13640/* Override any gcc2 internal prototype to avoid an error. */
13641#ifdef __cplusplus
13642extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000013643#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013644/* We use char because int might match the return type of a gcc2
13645 builtin and then its argument prototype would still apply. */
13646char $ac_func ();
13647char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013648
Barry Warsawfe33b792003-01-07 22:42:49 +000013649#ifdef F77_DUMMY_MAIN
13650# ifdef __cplusplus
13651 extern "C"
13652# endif
13653 int F77_DUMMY_MAIN() { return 1; }
13654#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013655int
13656main ()
13657{
Jack Jansen150753c2003-03-29 22:07:47 +000013658/* The GNU C library defines this for functions which it implements
13659 to always fail with ENOSYS. Some functions are actually named
13660 something starting with __ and the normal name is an alias. */
13661#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13662choke me
13663#else
13664f = $ac_func;
13665#endif
13666
Martin v. Löwis11437992002-04-12 09:54:03 +000013667 ;
13668 return 0;
13669}
13670_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013671rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000013672if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13673 (eval $ac_link) 2>&5
13674 ac_status=$?
13675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013676 (exit $ac_status); } &&
13677 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013678 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13679 (eval $ac_try) 2>&5
13680 ac_status=$?
13681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13682 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000013683 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013684else
Jack Jansen150753c2003-03-29 22:07:47 +000013685 echo "$as_me: failed program was:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013686cat conftest.$ac_ext >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013687eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013688fi
Jack Jansen150753c2003-03-29 22:07:47 +000013689rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013690fi
Jack Jansen150753c2003-03-29 22:07:47 +000013691echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13692echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13693if test `eval echo '${'$as_ac_var'}'` = yes; then
13694 cat >>confdefs.h <<_ACEOF
13695#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13696_ACEOF
13697 cat >conftest.$ac_ext <<_ACEOF
13698#line $LINENO "configure"
13699#include "confdefs.h"
13700#include <unistd.h>
13701#ifdef F77_DUMMY_MAIN
13702# ifdef __cplusplus
13703 extern "C"
13704# endif
13705 int F77_DUMMY_MAIN() { return 1; }
13706#endif
13707int
13708main ()
13709{
13710setpgrp(0,0);
13711 ;
13712 return 0;
13713}
13714_ACEOF
13715rm -f conftest.$ac_objext
13716if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13717 (eval $ac_compile) 2>&5
13718 ac_status=$?
13719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13720 (exit $ac_status); } &&
13721 { ac_try='test -s conftest.$ac_objext'
13722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13723 (eval $ac_try) 2>&5
13724 ac_status=$?
13725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13726 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013727
13728cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013729#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013730_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013731
Jack Jansen150753c2003-03-29 22:07:47 +000013732
13733else
13734 echo "$as_me: failed program was:" >&5
13735cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013736fi
Jack Jansen150753c2003-03-29 22:07:47 +000013737rm -f conftest.$ac_objext conftest.$ac_ext
13738
13739fi
13740done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013741
Martin v. Löwis11437992002-04-12 09:54:03 +000013742
Thomas Wouters3a584202000-08-05 23:28:51 +000013743for ac_func in gettimeofday
13744do
Martin v. Löwis11437992002-04-12 09:54:03 +000013745as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13746echo "$as_me:$LINENO: checking for $ac_func" >&5
13747echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13748if eval "test \"\${$as_ac_var+set}\" = set"; then
13749 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013750else
Martin v. Löwis11437992002-04-12 09:54:03 +000013751 cat >conftest.$ac_ext <<_ACEOF
13752#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013753#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013754/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013755 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013756#include <assert.h>
13757/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013758#ifdef __cplusplus
13759extern "C"
13760#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013761/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013762 builtin and then its argument prototype would still apply. */
13763char $ac_func ();
13764char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013765
Barry Warsawfe33b792003-01-07 22:42:49 +000013766#ifdef F77_DUMMY_MAIN
13767# ifdef __cplusplus
13768 extern "C"
13769# endif
13770 int F77_DUMMY_MAIN() { return 1; }
13771#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013772int
13773main ()
13774{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013775/* The GNU C library defines this for functions which it implements
13776 to always fail with ENOSYS. Some functions are actually named
13777 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013778#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013779choke me
13780#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013781f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013782#endif
13783
Martin v. Löwis11437992002-04-12 09:54:03 +000013784 ;
13785 return 0;
13786}
13787_ACEOF
13788rm -f conftest.$ac_objext conftest$ac_exeext
13789if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13790 (eval $ac_link) 2>&5
13791 ac_status=$?
13792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13793 (exit $ac_status); } &&
13794 { ac_try='test -s conftest$ac_exeext'
13795 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13796 (eval $ac_try) 2>&5
13797 ac_status=$?
13798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13799 (exit $ac_status); }; }; then
13800 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013801else
Martin v. Löwis11437992002-04-12 09:54:03 +000013802 echo "$as_me: failed program was:" >&5
13803cat conftest.$ac_ext >&5
13804eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013805fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013806rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013807fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013808echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13809echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13810if test `eval echo '${'$as_ac_var'}'` = yes; then
13811 cat >>confdefs.h <<_ACEOF
13812#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13813_ACEOF
13814 cat >conftest.$ac_ext <<_ACEOF
13815#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013816#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013817#include <sys/time.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000013818#ifdef F77_DUMMY_MAIN
13819# ifdef __cplusplus
13820 extern "C"
13821# endif
13822 int F77_DUMMY_MAIN() { return 1; }
13823#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013824int
13825main ()
13826{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013827gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013828 ;
13829 return 0;
13830}
13831_ACEOF
13832rm -f conftest.$ac_objext
13833if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13834 (eval $ac_compile) 2>&5
13835 ac_status=$?
13836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13837 (exit $ac_status); } &&
13838 { ac_try='test -s conftest.$ac_objext'
13839 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13840 (eval $ac_try) 2>&5
13841 ac_status=$?
13842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13843 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013844 :
13845else
Martin v. Löwis11437992002-04-12 09:54:03 +000013846 echo "$as_me: failed program was:" >&5
13847cat conftest.$ac_ext >&5
13848
13849cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013850#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013851_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013852
Martin v. Löwis11437992002-04-12 09:54:03 +000013853
Guido van Rossum627b2d71993-12-24 10:39:16 +000013854fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013855rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013856
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013857fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013858done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013859
Michael W. Hudson54241132001-12-07 15:38:26 +000013860
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013861echo "$as_me:$LINENO: checking for major" >&5
13862echo $ECHO_N "checking for major... $ECHO_C" >&6
13863cat >conftest.$ac_ext <<_ACEOF
13864#line $LINENO "configure"
13865#include "confdefs.h"
13866
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013867#if defined(MAJOR_IN_MKDEV)
13868#include <sys/mkdev.h>
13869#elif defined(MAJOR_IN_SYSMACROS)
13870#include <sys/sysmacros.h>
13871#else
13872#include <sys/types.h>
13873#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013874
Barry Warsawfe33b792003-01-07 22:42:49 +000013875#ifdef F77_DUMMY_MAIN
13876# ifdef __cplusplus
13877 extern "C"
13878# endif
13879 int F77_DUMMY_MAIN() { return 1; }
13880#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013881int
13882main ()
13883{
13884
13885 makedev(major(0),minor(0));
13886
13887 ;
13888 return 0;
13889}
13890_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000013891rm -f conftest.$ac_objext conftest$ac_exeext
13892if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13893 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013894 ac_status=$?
13895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13896 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000013897 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13899 (eval $ac_try) 2>&5
13900 ac_status=$?
13901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13902 (exit $ac_status); }; }; then
13903
13904
13905cat >>confdefs.h <<\_ACEOF
13906#define HAVE_DEVICE_MACROS 1
13907_ACEOF
13908
13909 echo "$as_me:$LINENO: result: yes" >&5
13910echo "${ECHO_T}yes" >&6
13911
13912else
13913 echo "$as_me: failed program was:" >&5
13914cat conftest.$ac_ext >&5
13915
13916 echo "$as_me:$LINENO: result: no" >&5
13917echo "${ECHO_T}no" >&6
13918
13919fi
Martin v. Löwise3271202002-11-07 07:42:30 +000013920rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013921
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013922# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013923# for [no]getaddrinfo in netdb.h.
13924echo "$as_me:$LINENO: checking for getaddrinfo" >&5
13925echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
13926cat >conftest.$ac_ext <<_ACEOF
13927#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013928#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013929
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013930#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013931#include <sys/socket.h>
13932#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013933#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013934
Barry Warsawfe33b792003-01-07 22:42:49 +000013935#ifdef F77_DUMMY_MAIN
13936# ifdef __cplusplus
13937 extern "C"
13938# endif
13939 int F77_DUMMY_MAIN() { return 1; }
13940#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013941int
13942main ()
13943{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013944
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013945getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013946
Martin v. Löwis11437992002-04-12 09:54:03 +000013947 ;
13948 return 0;
13949}
13950_ACEOF
13951rm -f conftest.$ac_objext conftest$ac_exeext
13952if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13953 (eval $ac_link) 2>&5
13954 ac_status=$?
13955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13956 (exit $ac_status); } &&
13957 { ac_try='test -s conftest$ac_exeext'
13958 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13959 (eval $ac_try) 2>&5
13960 ac_status=$?
13961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13962 (exit $ac_status); }; }; then
13963
13964echo "$as_me:$LINENO: result: yes" >&5
13965echo "${ECHO_T}yes" >&6
13966echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
13967echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013968if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013969 echo "$as_me:$LINENO: result: buggy" >&5
13970echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013971buggygetaddrinfo=yes
13972else
Martin v. Löwis11437992002-04-12 09:54:03 +000013973 cat >conftest.$ac_ext <<_ACEOF
13974#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013975#include "confdefs.h"
13976
13977#include <sys/types.h>
13978#include <netdb.h>
13979#include <string.h>
13980#include <sys/socket.h>
13981#include <netinet/in.h>
13982
13983main()
13984{
13985 int passive, gaierr, inet4 = 0, inet6 = 0;
13986 struct addrinfo hints, *ai, *aitop;
13987 char straddr[INET6_ADDRSTRLEN], strport[16];
13988
13989 for (passive = 0; passive <= 1; passive++) {
13990 memset(&hints, 0, sizeof(hints));
13991 hints.ai_family = AF_UNSPEC;
13992 hints.ai_flags = passive ? AI_PASSIVE : 0;
13993 hints.ai_socktype = SOCK_STREAM;
13994 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13995 (void)gai_strerror(gaierr);
13996 goto bad;
13997 }
13998 for (ai = aitop; ai; ai = ai->ai_next) {
13999 if (ai->ai_addr == NULL ||
14000 ai->ai_addrlen == 0 ||
14001 getnameinfo(ai->ai_addr, ai->ai_addrlen,
14002 straddr, sizeof(straddr), strport, sizeof(strport),
14003 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
14004 goto bad;
14005 }
14006 switch (ai->ai_family) {
14007 case AF_INET:
14008 if (strcmp(strport, "54321") != 0) {
14009 goto bad;
14010 }
14011 if (passive) {
14012 if (strcmp(straddr, "0.0.0.0") != 0) {
14013 goto bad;
14014 }
14015 } else {
14016 if (strcmp(straddr, "127.0.0.1") != 0) {
14017 goto bad;
14018 }
14019 }
14020 inet4++;
14021 break;
14022 case AF_INET6:
14023 if (strcmp(strport, "54321") != 0) {
14024 goto bad;
14025 }
14026 if (passive) {
14027 if (strcmp(straddr, "::") != 0) {
14028 goto bad;
14029 }
14030 } else {
14031 if (strcmp(straddr, "::1") != 0) {
14032 goto bad;
14033 }
14034 }
14035 inet6++;
14036 break;
14037 case AF_UNSPEC:
14038 goto bad;
14039 break;
14040 default:
14041 /* another family support? */
14042 break;
14043 }
14044 }
14045 }
14046
14047 if (!(inet4 == 0 || inet4 == 2))
14048 goto bad;
14049 if (!(inet6 == 0 || inet6 == 2))
14050 goto bad;
14051
14052 if (aitop)
14053 freeaddrinfo(aitop);
14054 exit(0);
14055
14056 bad:
14057 if (aitop)
14058 freeaddrinfo(aitop);
14059 exit(1);
14060}
14061
Martin v. Löwis11437992002-04-12 09:54:03 +000014062_ACEOF
14063rm -f conftest$ac_exeext
14064if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14065 (eval $ac_link) 2>&5
14066 ac_status=$?
14067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14068 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14069 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14070 (eval $ac_try) 2>&5
14071 ac_status=$?
14072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14073 (exit $ac_status); }; }; then
14074 echo "$as_me:$LINENO: result: good" >&5
14075echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014076buggygetaddrinfo=no
14077else
Martin v. Löwis11437992002-04-12 09:54:03 +000014078 echo "$as_me: program exited with status $ac_status" >&5
14079echo "$as_me: failed program was:" >&5
14080cat conftest.$ac_ext >&5
14081( exit $ac_status )
14082echo "$as_me:$LINENO: result: buggy" >&5
14083echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014084buggygetaddrinfo=yes
14085fi
Barry Warsawfe33b792003-01-07 22:42:49 +000014086rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014087fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014088else
Martin v. Löwis11437992002-04-12 09:54:03 +000014089 echo "$as_me: failed program was:" >&5
14090cat conftest.$ac_ext >&5
14091
14092echo "$as_me:$LINENO: result: no" >&5
14093echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014094buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014095
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014096fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014097rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014098
14099if test "$buggygetaddrinfo" = "yes"; then
14100 if test "$ipv6" = "yes"; then
14101 echo 'Fatal: You must get working getaddrinfo() function.'
14102 echo ' or you can specify "--disable-ipv6"'.
14103 exit 1
14104 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014105else
Martin v. Löwis11437992002-04-12 09:54:03 +000014106
14107cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014108#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014109_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014110
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014111fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014112
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014113for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014114do
Martin v. Löwis11437992002-04-12 09:54:03 +000014115as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14116echo "$as_me:$LINENO: checking for $ac_func" >&5
14117echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14118if eval "test \"\${$as_ac_var+set}\" = set"; then
14119 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014120else
Martin v. Löwis11437992002-04-12 09:54:03 +000014121 cat >conftest.$ac_ext <<_ACEOF
14122#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014123#include "confdefs.h"
14124/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014125 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014126#include <assert.h>
14127/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014128#ifdef __cplusplus
14129extern "C"
14130#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014131/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014132 builtin and then its argument prototype would still apply. */
14133char $ac_func ();
14134char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014135
Barry Warsawfe33b792003-01-07 22:42:49 +000014136#ifdef F77_DUMMY_MAIN
14137# ifdef __cplusplus
14138 extern "C"
14139# endif
14140 int F77_DUMMY_MAIN() { return 1; }
14141#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014142int
14143main ()
14144{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014145/* The GNU C library defines this for functions which it implements
14146 to always fail with ENOSYS. Some functions are actually named
14147 something starting with __ and the normal name is an alias. */
14148#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14149choke me
14150#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014151f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014152#endif
14153
Martin v. Löwis11437992002-04-12 09:54:03 +000014154 ;
14155 return 0;
14156}
14157_ACEOF
14158rm -f conftest.$ac_objext conftest$ac_exeext
14159if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14160 (eval $ac_link) 2>&5
14161 ac_status=$?
14162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14163 (exit $ac_status); } &&
14164 { ac_try='test -s conftest$ac_exeext'
14165 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14166 (eval $ac_try) 2>&5
14167 ac_status=$?
14168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14169 (exit $ac_status); }; }; then
14170 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014171else
Martin v. Löwis11437992002-04-12 09:54:03 +000014172 echo "$as_me: failed program was:" >&5
14173cat conftest.$ac_ext >&5
14174eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014175fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014176rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014177fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014178echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14179echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14180if test `eval echo '${'$as_ac_var'}'` = yes; then
14181 cat >>confdefs.h <<_ACEOF
14182#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14183_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014184
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014185fi
14186done
14187
Michael W. Hudson54241132001-12-07 15:38:26 +000014188
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014189# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000014190echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
14191echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14192if test "${ac_cv_header_time+set}" = set; then
14193 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014194else
Martin v. Löwis11437992002-04-12 09:54:03 +000014195 cat >conftest.$ac_ext <<_ACEOF
14196#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014197#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014198#include <sys/types.h>
14199#include <sys/time.h>
14200#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014201
Barry Warsawfe33b792003-01-07 22:42:49 +000014202#ifdef F77_DUMMY_MAIN
14203# ifdef __cplusplus
14204 extern "C"
14205# endif
14206 int F77_DUMMY_MAIN() { return 1; }
14207#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014208int
14209main ()
14210{
14211if ((struct tm *) 0)
14212return 0;
14213 ;
14214 return 0;
14215}
14216_ACEOF
14217rm -f conftest.$ac_objext
14218if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14219 (eval $ac_compile) 2>&5
14220 ac_status=$?
14221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14222 (exit $ac_status); } &&
14223 { ac_try='test -s conftest.$ac_objext'
14224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14225 (eval $ac_try) 2>&5
14226 ac_status=$?
14227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14228 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014229 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014230else
Martin v. Löwis11437992002-04-12 09:54:03 +000014231 echo "$as_me: failed program was:" >&5
14232cat conftest.$ac_ext >&5
14233ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014234fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014235rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014236fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014237echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
14238echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014239if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014240
14241cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014242#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014243_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014244
14245fi
14246
Martin v. Löwis11437992002-04-12 09:54:03 +000014247echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
14248echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
14249if test "${ac_cv_struct_tm+set}" = set; then
14250 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014251else
Martin v. Löwis11437992002-04-12 09:54:03 +000014252 cat >conftest.$ac_ext <<_ACEOF
14253#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014254#include "confdefs.h"
14255#include <sys/types.h>
14256#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014257
Barry Warsawfe33b792003-01-07 22:42:49 +000014258#ifdef F77_DUMMY_MAIN
14259# ifdef __cplusplus
14260 extern "C"
14261# endif
14262 int F77_DUMMY_MAIN() { return 1; }
14263#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014264int
14265main ()
14266{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014267struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000014268 ;
14269 return 0;
14270}
14271_ACEOF
14272rm -f conftest.$ac_objext
14273if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14274 (eval $ac_compile) 2>&5
14275 ac_status=$?
14276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14277 (exit $ac_status); } &&
14278 { ac_try='test -s conftest.$ac_objext'
14279 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14280 (eval $ac_try) 2>&5
14281 ac_status=$?
14282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14283 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014284 ac_cv_struct_tm=time.h
14285else
Martin v. Löwis11437992002-04-12 09:54:03 +000014286 echo "$as_me: failed program was:" >&5
14287cat conftest.$ac_ext >&5
14288ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014289fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014290rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014291fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014292echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
14293echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014294if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014295
14296cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014297#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014298_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014299
14300fi
14301
Martin v. Löwis11437992002-04-12 09:54:03 +000014302echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
14303echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
14304if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
14305 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014306else
Martin v. Löwis11437992002-04-12 09:54:03 +000014307 cat >conftest.$ac_ext <<_ACEOF
14308#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014309#include "confdefs.h"
14310#include <sys/types.h>
14311#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000014312
14313
Barry Warsawfe33b792003-01-07 22:42:49 +000014314#ifdef F77_DUMMY_MAIN
14315# ifdef __cplusplus
14316 extern "C"
14317# endif
14318 int F77_DUMMY_MAIN() { return 1; }
14319#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014320int
14321main ()
14322{
14323static struct tm ac_aggr;
14324if (ac_aggr.tm_zone)
14325return 0;
14326 ;
14327 return 0;
14328}
14329_ACEOF
14330rm -f conftest.$ac_objext
14331if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14332 (eval $ac_compile) 2>&5
14333 ac_status=$?
14334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14335 (exit $ac_status); } &&
14336 { ac_try='test -s conftest.$ac_objext'
14337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14338 (eval $ac_try) 2>&5
14339 ac_status=$?
14340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14341 (exit $ac_status); }; }; then
14342 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014343else
Martin v. Löwis11437992002-04-12 09:54:03 +000014344 echo "$as_me: failed program was:" >&5
14345cat conftest.$ac_ext >&5
14346ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014347fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014348rm -f conftest.$ac_objext conftest.$ac_ext
14349fi
14350echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
14351echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
14352if test $ac_cv_member_struct_tm_tm_zone = yes; then
14353
14354cat >>confdefs.h <<_ACEOF
14355#define HAVE_STRUCT_TM_TM_ZONE 1
14356_ACEOF
14357
14358
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014359fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014360
Martin v. Löwis11437992002-04-12 09:54:03 +000014361if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14362
14363cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014364#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014365_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014366
14367else
Martin v. Löwis11437992002-04-12 09:54:03 +000014368 echo "$as_me:$LINENO: checking for tzname" >&5
14369echo $ECHO_N "checking for tzname... $ECHO_C" >&6
14370if test "${ac_cv_var_tzname+set}" = set; then
14371 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014372else
Martin v. Löwis11437992002-04-12 09:54:03 +000014373 cat >conftest.$ac_ext <<_ACEOF
14374#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014375#include "confdefs.h"
14376#include <time.h>
14377#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014378extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014379#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014380
Barry Warsawfe33b792003-01-07 22:42:49 +000014381#ifdef F77_DUMMY_MAIN
14382# ifdef __cplusplus
14383 extern "C"
14384# endif
14385 int F77_DUMMY_MAIN() { return 1; }
14386#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014387int
14388main ()
14389{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014390atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000014391 ;
14392 return 0;
14393}
14394_ACEOF
14395rm -f conftest.$ac_objext conftest$ac_exeext
14396if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14397 (eval $ac_link) 2>&5
14398 ac_status=$?
14399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14400 (exit $ac_status); } &&
14401 { ac_try='test -s conftest$ac_exeext'
14402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14403 (eval $ac_try) 2>&5
14404 ac_status=$?
14405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14406 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014407 ac_cv_var_tzname=yes
14408else
Martin v. Löwis11437992002-04-12 09:54:03 +000014409 echo "$as_me: failed program was:" >&5
14410cat conftest.$ac_ext >&5
14411ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014412fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014413rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000014414fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014415echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
14416echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014417 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014418
14419cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014420#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014421_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014422
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014423 fi
14424fi
14425
Martin v. Löwis11437992002-04-12 09:54:03 +000014426echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
14427echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
14428if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
14429 echo $ECHO_N "(cached) $ECHO_C" >&6
14430else
14431 cat >conftest.$ac_ext <<_ACEOF
14432#line $LINENO "configure"
14433#include "confdefs.h"
14434$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014435#ifdef F77_DUMMY_MAIN
14436# ifdef __cplusplus
14437 extern "C"
14438# endif
14439 int F77_DUMMY_MAIN() { return 1; }
14440#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014441int
14442main ()
14443{
14444static struct stat ac_aggr;
14445if (ac_aggr.st_rdev)
14446return 0;
14447 ;
14448 return 0;
14449}
14450_ACEOF
14451rm -f conftest.$ac_objext
14452if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14453 (eval $ac_compile) 2>&5
14454 ac_status=$?
14455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14456 (exit $ac_status); } &&
14457 { ac_try='test -s conftest.$ac_objext'
14458 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14459 (eval $ac_try) 2>&5
14460 ac_status=$?
14461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14462 (exit $ac_status); }; }; then
14463 ac_cv_member_struct_stat_st_rdev=yes
14464else
14465 echo "$as_me: failed program was:" >&5
14466cat conftest.$ac_ext >&5
14467ac_cv_member_struct_stat_st_rdev=no
14468fi
14469rm -f conftest.$ac_objext conftest.$ac_ext
14470fi
14471echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
14472echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
14473if test $ac_cv_member_struct_stat_st_rdev = yes; then
14474
14475cat >>confdefs.h <<_ACEOF
14476#define HAVE_STRUCT_STAT_ST_RDEV 1
14477_ACEOF
14478
14479
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014480fi
14481
Martin v. Löwis11437992002-04-12 09:54:03 +000014482echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
14483echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
14484if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
14485 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014486else
Martin v. Löwis11437992002-04-12 09:54:03 +000014487 cat >conftest.$ac_ext <<_ACEOF
14488#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014489#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014490$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014491#ifdef F77_DUMMY_MAIN
14492# ifdef __cplusplus
14493 extern "C"
14494# endif
14495 int F77_DUMMY_MAIN() { return 1; }
14496#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014497int
14498main ()
14499{
14500static struct stat ac_aggr;
14501if (ac_aggr.st_blksize)
14502return 0;
14503 ;
14504 return 0;
14505}
14506_ACEOF
14507rm -f conftest.$ac_objext
14508if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14509 (eval $ac_compile) 2>&5
14510 ac_status=$?
14511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14512 (exit $ac_status); } &&
14513 { ac_try='test -s conftest.$ac_objext'
14514 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14515 (eval $ac_try) 2>&5
14516 ac_status=$?
14517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14518 (exit $ac_status); }; }; then
14519 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014520else
Martin v. Löwis11437992002-04-12 09:54:03 +000014521 echo "$as_me: failed program was:" >&5
14522cat conftest.$ac_ext >&5
14523ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014524fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014525rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014526fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014527echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
14528echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
14529if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014530
Martin v. Löwis11437992002-04-12 09:54:03 +000014531cat >>confdefs.h <<_ACEOF
14532#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
14533_ACEOF
14534
14535
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014536fi
14537
Martin v. Löwis11437992002-04-12 09:54:03 +000014538echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
14539echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
14540if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
14541 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014542else
Martin v. Löwis11437992002-04-12 09:54:03 +000014543 cat >conftest.$ac_ext <<_ACEOF
14544#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014545#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014546$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014547#ifdef F77_DUMMY_MAIN
14548# ifdef __cplusplus
14549 extern "C"
14550# endif
14551 int F77_DUMMY_MAIN() { return 1; }
14552#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014553int
14554main ()
14555{
14556static struct stat ac_aggr;
14557if (ac_aggr.st_blocks)
14558return 0;
14559 ;
14560 return 0;
14561}
14562_ACEOF
14563rm -f conftest.$ac_objext
14564if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14565 (eval $ac_compile) 2>&5
14566 ac_status=$?
14567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14568 (exit $ac_status); } &&
14569 { ac_try='test -s conftest.$ac_objext'
14570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14571 (eval $ac_try) 2>&5
14572 ac_status=$?
14573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14574 (exit $ac_status); }; }; then
14575 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014576else
Martin v. Löwis11437992002-04-12 09:54:03 +000014577 echo "$as_me: failed program was:" >&5
14578cat conftest.$ac_ext >&5
14579ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014580fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014581rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014582fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014583echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
14584echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
14585if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014586
Martin v. Löwis11437992002-04-12 09:54:03 +000014587cat >>confdefs.h <<_ACEOF
14588#define HAVE_STRUCT_STAT_ST_BLOCKS 1
14589_ACEOF
14590
14591
14592cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014593#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014594_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014595
14596else
Martin v. Löwis11437992002-04-12 09:54:03 +000014597 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014598fi
14599
Michael W. Hudson54241132001-12-07 15:38:26 +000014600
Martin v. Löwis11437992002-04-12 09:54:03 +000014601
14602echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
14603echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
14604if test "${ac_cv_header_time_altzone+set}" = set; then
14605 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014606else
Martin v. Löwis11437992002-04-12 09:54:03 +000014607 cat >conftest.$ac_ext <<_ACEOF
14608#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014609#include "confdefs.h"
14610#include <time.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014611#ifdef F77_DUMMY_MAIN
14612# ifdef __cplusplus
14613 extern "C"
14614# endif
14615 int F77_DUMMY_MAIN() { return 1; }
14616#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014617int
14618main ()
14619{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014620return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000014621 ;
14622 return 0;
14623}
14624_ACEOF
14625rm -f conftest.$ac_objext
14626if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14627 (eval $ac_compile) 2>&5
14628 ac_status=$?
14629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14630 (exit $ac_status); } &&
14631 { ac_try='test -s conftest.$ac_objext'
14632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14633 (eval $ac_try) 2>&5
14634 ac_status=$?
14635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14636 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014637 ac_cv_header_time_altzone=yes
14638else
Martin v. Löwis11437992002-04-12 09:54:03 +000014639 echo "$as_me: failed program was:" >&5
14640cat conftest.$ac_ext >&5
14641ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000014642fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014643rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014644fi
14645
Martin v. Löwis11437992002-04-12 09:54:03 +000014646echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
14647echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014648if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014649
14650cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014651#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014652_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014653
14654fi
14655
Guido van Rossumda88dad1995-01-26 00:46:29 +000014656was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014657echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
14658echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
14659cat >conftest.$ac_ext <<_ACEOF
14660#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014661#include "confdefs.h"
14662
14663#include <sys/types.h>
14664#include <sys/select.h>
14665#include <sys/time.h>
14666
Barry Warsawfe33b792003-01-07 22:42:49 +000014667#ifdef F77_DUMMY_MAIN
14668# ifdef __cplusplus
14669 extern "C"
14670# endif
14671 int F77_DUMMY_MAIN() { return 1; }
14672#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014673int
14674main ()
14675{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014676;
Martin v. Löwis11437992002-04-12 09:54:03 +000014677 ;
14678 return 0;
14679}
14680_ACEOF
14681rm -f conftest.$ac_objext
14682if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14683 (eval $ac_compile) 2>&5
14684 ac_status=$?
14685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14686 (exit $ac_status); } &&
14687 { ac_try='test -s conftest.$ac_objext'
14688 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14689 (eval $ac_try) 2>&5
14690 ac_status=$?
14691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14692 (exit $ac_status); }; }; then
14693
14694
14695cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014696#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014697_ACEOF
14698
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014699 was_it_defined=yes
14700
Guido van Rossumf78abae1997-01-21 22:02:36 +000014701else
Martin v. Löwis11437992002-04-12 09:54:03 +000014702 echo "$as_me: failed program was:" >&5
14703cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014704fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014705rm -f conftest.$ac_objext conftest.$ac_ext
14706echo "$as_me:$LINENO: result: $was_it_defined" >&5
14707echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000014708
Martin v. Löwis11437992002-04-12 09:54:03 +000014709echo "$as_me:$LINENO: checking for addrinfo" >&5
14710echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
14711if test "${ac_cv_struct_addrinfo+set}" = set; then
14712 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014713else
Martin v. Löwis11437992002-04-12 09:54:03 +000014714 cat >conftest.$ac_ext <<_ACEOF
14715#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014716#include "confdefs.h"
14717
14718# include <netdb.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014719#ifdef F77_DUMMY_MAIN
14720# ifdef __cplusplus
14721 extern "C"
14722# endif
14723 int F77_DUMMY_MAIN() { return 1; }
14724#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014725int
14726main ()
14727{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014728struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000014729 ;
14730 return 0;
14731}
14732_ACEOF
14733rm -f conftest.$ac_objext
14734if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14735 (eval $ac_compile) 2>&5
14736 ac_status=$?
14737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14738 (exit $ac_status); } &&
14739 { ac_try='test -s conftest.$ac_objext'
14740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14741 (eval $ac_try) 2>&5
14742 ac_status=$?
14743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14744 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014745 ac_cv_struct_addrinfo=yes
14746else
Martin v. Löwis11437992002-04-12 09:54:03 +000014747 echo "$as_me: failed program was:" >&5
14748cat conftest.$ac_ext >&5
14749ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014750fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014751rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014752fi
14753
Martin v. Löwis11437992002-04-12 09:54:03 +000014754echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
14755echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014756if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014757
14758cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014759#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014760_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014761
14762fi
14763
Martin v. Löwis11437992002-04-12 09:54:03 +000014764echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
14765echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
14766if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
14767 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014768else
Martin v. Löwis11437992002-04-12 09:54:03 +000014769 cat >conftest.$ac_ext <<_ACEOF
14770#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014771#include "confdefs.h"
14772
14773# include <sys/types.h>
14774# include <sys/socket.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014775#ifdef F77_DUMMY_MAIN
14776# ifdef __cplusplus
14777 extern "C"
14778# endif
14779 int F77_DUMMY_MAIN() { return 1; }
14780#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014781int
14782main ()
14783{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014784struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000014785 ;
14786 return 0;
14787}
14788_ACEOF
14789rm -f conftest.$ac_objext
14790if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14791 (eval $ac_compile) 2>&5
14792 ac_status=$?
14793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14794 (exit $ac_status); } &&
14795 { ac_try='test -s conftest.$ac_objext'
14796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14797 (eval $ac_try) 2>&5
14798 ac_status=$?
14799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14800 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014801 ac_cv_struct_sockaddr_storage=yes
14802else
Martin v. Löwis11437992002-04-12 09:54:03 +000014803 echo "$as_me: failed program was:" >&5
14804cat conftest.$ac_ext >&5
14805ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014806fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014807rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014808fi
14809
Martin v. Löwis11437992002-04-12 09:54:03 +000014810echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
14811echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014812if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014813
14814cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014815#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014816_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014817
14818fi
14819
Guido van Rossum627b2d71993-12-24 10:39:16 +000014820# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000014821
Michael W. Hudson54241132001-12-07 15:38:26 +000014822
Martin v. Löwis11437992002-04-12 09:54:03 +000014823echo "$as_me:$LINENO: checking whether char is unsigned" >&5
14824echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
14825if test "${ac_cv_c_char_unsigned+set}" = set; then
14826 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000014827else
Martin v. Löwis11437992002-04-12 09:54:03 +000014828 cat >conftest.$ac_ext <<_ACEOF
14829#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000014830#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014831$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014832#ifdef F77_DUMMY_MAIN
14833# ifdef __cplusplus
14834 extern "C"
14835# endif
14836 int F77_DUMMY_MAIN() { return 1; }
14837#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014838int
14839main ()
14840{
14841static int test_array [1 - 2 * !(((char) -1) < 0)];
14842test_array [0] = 0
14843
14844 ;
14845 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000014846}
Martin v. Löwis11437992002-04-12 09:54:03 +000014847_ACEOF
14848rm -f conftest.$ac_objext
14849if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14850 (eval $ac_compile) 2>&5
14851 ac_status=$?
14852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14853 (exit $ac_status); } &&
14854 { ac_try='test -s conftest.$ac_objext'
14855 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14856 (eval $ac_try) 2>&5
14857 ac_status=$?
14858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14859 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000014860 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014861else
14862 echo "$as_me: failed program was:" >&5
14863cat conftest.$ac_ext >&5
14864ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014865fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014866rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014867fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014868echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
14869echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014870if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014871 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014872#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014873_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014874
14875fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000014876
Barry Warsawfe33b792003-01-07 22:42:49 +000014877echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
14878echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
14879if test "${ac_cv_prog_cc_stdc+set}" = set; then
14880 echo $ECHO_N "(cached) $ECHO_C" >&6
14881else
14882 ac_cv_prog_cc_stdc=no
14883ac_save_CC=$CC
14884cat >conftest.$ac_ext <<_ACEOF
14885#line $LINENO "configure"
14886#include "confdefs.h"
14887#include <stdarg.h>
14888#include <stdio.h>
14889#include <sys/types.h>
14890#include <sys/stat.h>
14891/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
14892struct buf { int x; };
14893FILE * (*rcsopen) (struct buf *, struct stat *, int);
14894static char *e (p, i)
14895 char **p;
14896 int i;
14897{
14898 return p[i];
14899}
14900static char *f (char * (*g) (char **, int), char **p, ...)
14901{
14902 char *s;
14903 va_list v;
14904 va_start (v,p);
14905 s = g (p, va_arg (v,int));
14906 va_end (v);
14907 return s;
14908}
14909int test (int i, double x);
14910struct s1 {int (*f) (int a);};
14911struct s2 {int (*f) (double a);};
14912int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
14913int argc;
14914char **argv;
14915#ifdef F77_DUMMY_MAIN
14916# ifdef __cplusplus
14917 extern "C"
14918# endif
14919 int F77_DUMMY_MAIN() { return 1; }
14920#endif
14921int
14922main ()
14923{
14924return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
14925 ;
14926 return 0;
14927}
14928_ACEOF
14929# Don't try gcc -ansi; that turns off useful extensions and
14930# breaks some systems' header files.
14931# AIX -qlanglvl=ansi
14932# Ultrix and OSF/1 -std1
14933# HP-UX 10.20 and later -Ae
14934# HP-UX older versions -Aa -D_HPUX_SOURCE
14935# SVR4 -Xc -D__EXTENSIONS__
14936for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
14937do
14938 CC="$ac_save_CC $ac_arg"
14939 rm -f conftest.$ac_objext
14940if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14941 (eval $ac_compile) 2>&5
14942 ac_status=$?
14943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14944 (exit $ac_status); } &&
14945 { ac_try='test -s conftest.$ac_objext'
14946 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14947 (eval $ac_try) 2>&5
14948 ac_status=$?
14949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14950 (exit $ac_status); }; }; then
14951 ac_cv_prog_cc_stdc=$ac_arg
14952break
14953else
14954 echo "$as_me: failed program was:" >&5
14955cat conftest.$ac_ext >&5
14956fi
14957rm -f conftest.$ac_objext
14958done
14959rm -f conftest.$ac_ext conftest.$ac_objext
14960CC=$ac_save_CC
14961
14962fi
14963
14964case "x$ac_cv_prog_cc_stdc" in
14965 x|xno)
14966 echo "$as_me:$LINENO: result: none needed" >&5
14967echo "${ECHO_T}none needed" >&6 ;;
14968 *)
14969 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
14970echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
14971 CC="$CC $ac_cv_prog_cc_stdc" ;;
14972esac
14973
Martin v. Löwis11437992002-04-12 09:54:03 +000014974echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
14975echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14976if test "${ac_cv_c_const+set}" = set; then
14977 echo $ECHO_N "(cached) $ECHO_C" >&6
14978else
14979 cat >conftest.$ac_ext <<_ACEOF
14980#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014981#include "confdefs.h"
14982
Barry Warsawfe33b792003-01-07 22:42:49 +000014983#ifdef F77_DUMMY_MAIN
14984# ifdef __cplusplus
14985 extern "C"
14986# endif
14987 int F77_DUMMY_MAIN() { return 1; }
14988#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014989int
14990main ()
14991{
14992/* FIXME: Include the comments suggested by Paul. */
14993#ifndef __cplusplus
14994 /* Ultrix mips cc rejects this. */
14995 typedef int charset[2];
14996 const charset x;
14997 /* SunOS 4.1.1 cc rejects this. */
14998 char const *const *ccp;
14999 char **p;
15000 /* NEC SVR4.0.2 mips cc rejects this. */
15001 struct point {int x, y;};
15002 static struct point const zero = {0,0};
15003 /* AIX XL C 1.02.0.0 rejects this.
15004 It does not let you subtract one const X* pointer from another in
15005 an arm of an if-expression whose if-part is not a constant
15006 expression */
15007 const char *g = "string";
15008 ccp = &g + (g ? g-g : 0);
15009 /* HPUX 7.0 cc rejects these. */
15010 ++ccp;
15011 p = (char**) ccp;
15012 ccp = (char const *const *) p;
15013 { /* SCO 3.2v4 cc rejects this. */
15014 char *t;
15015 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015016
Martin v. Löwis11437992002-04-12 09:54:03 +000015017 *t++ = 0;
15018 }
15019 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
15020 int x[] = {25, 17};
15021 const int *foo = &x[0];
15022 ++foo;
15023 }
15024 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15025 typedef const int *iptr;
15026 iptr p = 0;
15027 ++p;
15028 }
15029 { /* AIX XL C 1.02.0.0 rejects this saying
15030 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15031 struct s { int j; const int *ap[3]; };
15032 struct s *b; b->j = 5;
15033 }
15034 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15035 const int foo = 10;
15036 }
15037#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000015038
Martin v. Löwis11437992002-04-12 09:54:03 +000015039 ;
15040 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000015041}
Martin v. Löwis11437992002-04-12 09:54:03 +000015042_ACEOF
15043rm -f conftest.$ac_objext
15044if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15045 (eval $ac_compile) 2>&5
15046 ac_status=$?
15047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15048 (exit $ac_status); } &&
15049 { ac_try='test -s conftest.$ac_objext'
15050 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15051 (eval $ac_try) 2>&5
15052 ac_status=$?
15053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15054 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015055 ac_cv_c_const=yes
15056else
Martin v. Löwis11437992002-04-12 09:54:03 +000015057 echo "$as_me: failed program was:" >&5
15058cat conftest.$ac_ext >&5
15059ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015060fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015061rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015062fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015063echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
15064echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015065if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015066
15067cat >>confdefs.h <<\_ACEOF
15068#define const
15069_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015070
15071fi
15072
Michael W. Hudson54241132001-12-07 15:38:26 +000015073
Guido van Rossumda88dad1995-01-26 00:46:29 +000015074works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015075echo "$as_me:$LINENO: checking for working volatile" >&5
15076echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
15077cat >conftest.$ac_ext <<_ACEOF
15078#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015079#include "confdefs.h"
15080
Barry Warsawfe33b792003-01-07 22:42:49 +000015081#ifdef F77_DUMMY_MAIN
15082# ifdef __cplusplus
15083 extern "C"
15084# endif
15085 int F77_DUMMY_MAIN() { return 1; }
15086#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015087int
15088main ()
15089{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015090volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015091 ;
15092 return 0;
15093}
15094_ACEOF
15095rm -f conftest.$ac_objext
15096if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15097 (eval $ac_compile) 2>&5
15098 ac_status=$?
15099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15100 (exit $ac_status); } &&
15101 { ac_try='test -s conftest.$ac_objext'
15102 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15103 (eval $ac_try) 2>&5
15104 ac_status=$?
15105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15106 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015107 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015108else
Martin v. Löwis11437992002-04-12 09:54:03 +000015109 echo "$as_me: failed program was:" >&5
15110cat conftest.$ac_ext >&5
15111
15112cat >>confdefs.h <<\_ACEOF
15113#define volatile
15114_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015115
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015116
Guido van Rossum627b2d71993-12-24 10:39:16 +000015117fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015118rm -f conftest.$ac_objext conftest.$ac_ext
15119echo "$as_me:$LINENO: result: $works" >&5
15120echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015121
Guido van Rossumda88dad1995-01-26 00:46:29 +000015122works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015123echo "$as_me:$LINENO: checking for working signed char" >&5
15124echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
15125cat >conftest.$ac_ext <<_ACEOF
15126#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015127#include "confdefs.h"
15128
Barry Warsawfe33b792003-01-07 22:42:49 +000015129#ifdef F77_DUMMY_MAIN
15130# ifdef __cplusplus
15131 extern "C"
15132# endif
15133 int F77_DUMMY_MAIN() { return 1; }
15134#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015135int
15136main ()
15137{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015138signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000015139 ;
15140 return 0;
15141}
15142_ACEOF
15143rm -f conftest.$ac_objext
15144if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15145 (eval $ac_compile) 2>&5
15146 ac_status=$?
15147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15148 (exit $ac_status); } &&
15149 { ac_try='test -s conftest.$ac_objext'
15150 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15151 (eval $ac_try) 2>&5
15152 ac_status=$?
15153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15154 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015155 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015156else
Martin v. Löwis11437992002-04-12 09:54:03 +000015157 echo "$as_me: failed program was:" >&5
15158cat conftest.$ac_ext >&5
15159
15160cat >>confdefs.h <<\_ACEOF
15161#define signed
15162_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000015163
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015164
Guido van Rossum7f43da71994-08-01 12:15:30 +000015165fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015166rm -f conftest.$ac_objext conftest.$ac_ext
15167echo "$as_me:$LINENO: result: $works" >&5
15168echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015169
Guido van Rossumda88dad1995-01-26 00:46:29 +000015170have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015171echo "$as_me:$LINENO: checking for prototypes" >&5
15172echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
15173cat >conftest.$ac_ext <<_ACEOF
15174#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015175#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015176int foo(int x) { return 0; }
Barry Warsawfe33b792003-01-07 22:42:49 +000015177#ifdef F77_DUMMY_MAIN
15178# ifdef __cplusplus
15179 extern "C"
15180# endif
15181 int F77_DUMMY_MAIN() { return 1; }
15182#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015183int
15184main ()
15185{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015186return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000015187 ;
15188 return 0;
15189}
15190_ACEOF
15191rm -f conftest.$ac_objext
15192if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15193 (eval $ac_compile) 2>&5
15194 ac_status=$?
15195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15196 (exit $ac_status); } &&
15197 { ac_try='test -s conftest.$ac_objext'
15198 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15199 (eval $ac_try) 2>&5
15200 ac_status=$?
15201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15202 (exit $ac_status); }; }; then
15203
15204
15205cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015206#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015207_ACEOF
15208
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015209 have_prototypes=yes
15210
Guido van Rossumf78abae1997-01-21 22:02:36 +000015211else
Martin v. Löwis11437992002-04-12 09:54:03 +000015212 echo "$as_me: failed program was:" >&5
15213cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000015214fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015215rm -f conftest.$ac_objext conftest.$ac_ext
15216echo "$as_me:$LINENO: result: $have_prototypes" >&5
15217echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015218
Guido van Rossumda88dad1995-01-26 00:46:29 +000015219works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015220echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
15221echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
15222cat >conftest.$ac_ext <<_ACEOF
15223#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015224#include "confdefs.h"
15225
15226#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000015227int foo(int x, ...) {
15228 va_list va;
15229 va_start(va, x);
15230 va_arg(va, int);
15231 va_arg(va, char *);
15232 va_arg(va, double);
15233 return 0;
15234}
Guido van Rossum7f43da71994-08-01 12:15:30 +000015235
Barry Warsawfe33b792003-01-07 22:42:49 +000015236#ifdef F77_DUMMY_MAIN
15237# ifdef __cplusplus
15238 extern "C"
15239# endif
15240 int F77_DUMMY_MAIN() { return 1; }
15241#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015242int
15243main ()
15244{
Guido van Rossum90eea071996-08-30 20:58:57 +000015245return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000015246 ;
15247 return 0;
15248}
15249_ACEOF
15250rm -f conftest.$ac_objext
15251if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15252 (eval $ac_compile) 2>&5
15253 ac_status=$?
15254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15255 (exit $ac_status); } &&
15256 { ac_try='test -s conftest.$ac_objext'
15257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15258 (eval $ac_try) 2>&5
15259 ac_status=$?
15260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15261 (exit $ac_status); }; }; then
15262
15263
15264cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015265#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015266_ACEOF
15267
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015268 works=yes
15269
Guido van Rossumf78abae1997-01-21 22:02:36 +000015270else
Martin v. Löwis11437992002-04-12 09:54:03 +000015271 echo "$as_me: failed program was:" >&5
15272cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000015273fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015274rm -f conftest.$ac_objext conftest.$ac_ext
15275echo "$as_me:$LINENO: result: $works" >&5
15276echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015277
Guido van Rossumda88dad1995-01-26 00:46:29 +000015278if test "$have_prototypes" = yes; then
15279bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015280echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
15281echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
15282cat >conftest.$ac_ext <<_ACEOF
15283#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015284#include "confdefs.h"
15285#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000015286#ifdef F77_DUMMY_MAIN
15287# ifdef __cplusplus
15288 extern "C"
15289# endif
15290 int F77_DUMMY_MAIN() { return 1; }
15291#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015292int
15293main ()
15294{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015295char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000015296 ;
15297 return 0;
15298}
15299_ACEOF
15300rm -f conftest.$ac_objext
15301if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15302 (eval $ac_compile) 2>&5
15303 ac_status=$?
15304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15305 (exit $ac_status); } &&
15306 { ac_try='test -s conftest.$ac_objext'
15307 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15308 (eval $ac_try) 2>&5
15309 ac_status=$?
15310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15311 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000015312 :
15313else
Martin v. Löwis11437992002-04-12 09:54:03 +000015314 echo "$as_me: failed program was:" >&5
15315cat conftest.$ac_ext >&5
15316
15317cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015318#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015319_ACEOF
15320
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015321 bad_prototypes=yes
15322
Guido van Rossum627b2d71993-12-24 10:39:16 +000015323fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015324rm -f conftest.$ac_objext conftest.$ac_ext
15325echo "$as_me:$LINENO: result: $bad_prototypes" >&5
15326echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015327fi
15328
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015329# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000015330echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
15331echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
15332cat >conftest.$ac_ext <<_ACEOF
15333#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015334#include "confdefs.h"
15335#include <sys/types.h>
15336#include <sys/socket.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000015337#ifdef F77_DUMMY_MAIN
15338# ifdef __cplusplus
15339 extern "C"
15340# endif
15341 int F77_DUMMY_MAIN() { return 1; }
15342#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015343int
15344main ()
15345{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015346struct sockaddr x;
15347x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015348 ;
15349 return 0;
15350}
15351_ACEOF
15352rm -f conftest.$ac_objext
15353if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15354 (eval $ac_compile) 2>&5
15355 ac_status=$?
15356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15357 (exit $ac_status); } &&
15358 { ac_try='test -s conftest.$ac_objext'
15359 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15360 (eval $ac_try) 2>&5
15361 ac_status=$?
15362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15363 (exit $ac_status); }; }; then
15364 echo "$as_me:$LINENO: result: yes" >&5
15365echo "${ECHO_T}yes" >&6
15366
15367cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015368#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015369_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015370
15371else
Martin v. Löwis11437992002-04-12 09:54:03 +000015372 echo "$as_me: failed program was:" >&5
15373cat conftest.$ac_ext >&5
15374echo "$as_me:$LINENO: result: no" >&5
15375echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015376fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015377rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015378
Guido van Rossumda88dad1995-01-26 00:46:29 +000015379va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015380echo "$as_me:$LINENO: checking whether va_list is an array" >&5
15381echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
15382cat >conftest.$ac_ext <<_ACEOF
15383#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015384#include "confdefs.h"
15385
15386#ifdef HAVE_STDARG_PROTOTYPES
15387#include <stdarg.h>
15388#else
15389#include <varargs.h>
15390#endif
15391
Barry Warsawfe33b792003-01-07 22:42:49 +000015392#ifdef F77_DUMMY_MAIN
15393# ifdef __cplusplus
15394 extern "C"
15395# endif
15396 int F77_DUMMY_MAIN() { return 1; }
15397#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015398int
15399main ()
15400{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015401va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000015402 ;
15403 return 0;
15404}
15405_ACEOF
15406rm -f conftest.$ac_objext
15407if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15408 (eval $ac_compile) 2>&5
15409 ac_status=$?
15410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15411 (exit $ac_status); } &&
15412 { ac_try='test -s conftest.$ac_objext'
15413 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15414 (eval $ac_try) 2>&5
15415 ac_status=$?
15416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15417 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015418 :
15419else
Martin v. Löwis11437992002-04-12 09:54:03 +000015420 echo "$as_me: failed program was:" >&5
15421cat conftest.$ac_ext >&5
15422
15423
15424cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015425#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015426_ACEOF
15427
Guido van Rossumda88dad1995-01-26 00:46:29 +000015428 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015429
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015430fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015431rm -f conftest.$ac_objext conftest.$ac_ext
15432echo "$as_me:$LINENO: result: $va_list_is_array" >&5
15433echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015434
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015435# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000015436
15437
15438
15439echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
15440echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
15441if test "${ac_cv_func_gethostbyname_r+set}" = set; then
15442 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015443else
Martin v. Löwis11437992002-04-12 09:54:03 +000015444 cat >conftest.$ac_ext <<_ACEOF
15445#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015446#include "confdefs.h"
15447/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015448 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015449#include <assert.h>
15450/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015451#ifdef __cplusplus
15452extern "C"
15453#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015454/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015455 builtin and then its argument prototype would still apply. */
15456char gethostbyname_r ();
15457char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015458
Barry Warsawfe33b792003-01-07 22:42:49 +000015459#ifdef F77_DUMMY_MAIN
15460# ifdef __cplusplus
15461 extern "C"
15462# endif
15463 int F77_DUMMY_MAIN() { return 1; }
15464#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015465int
15466main ()
15467{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015468/* The GNU C library defines this for functions which it implements
15469 to always fail with ENOSYS. Some functions are actually named
15470 something starting with __ and the normal name is an alias. */
15471#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
15472choke me
15473#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015474f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015475#endif
15476
Martin v. Löwis11437992002-04-12 09:54:03 +000015477 ;
15478 return 0;
15479}
15480_ACEOF
15481rm -f conftest.$ac_objext conftest$ac_exeext
15482if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15483 (eval $ac_link) 2>&5
15484 ac_status=$?
15485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15486 (exit $ac_status); } &&
15487 { ac_try='test -s conftest$ac_exeext'
15488 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15489 (eval $ac_try) 2>&5
15490 ac_status=$?
15491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15492 (exit $ac_status); }; }; then
15493 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015494else
Martin v. Löwis11437992002-04-12 09:54:03 +000015495 echo "$as_me: failed program was:" >&5
15496cat conftest.$ac_ext >&5
15497ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015498fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015499rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015500fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015501echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
15502echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
15503if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015504
Martin v. Löwis11437992002-04-12 09:54:03 +000015505 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015506#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015507_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015508
Martin v. Löwis11437992002-04-12 09:54:03 +000015509 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
15510echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015511 OLD_CFLAGS=$CFLAGS
15512 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015513 cat >conftest.$ac_ext <<_ACEOF
15514#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015515#include "confdefs.h"
15516
15517# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015518
Barry Warsawfe33b792003-01-07 22:42:49 +000015519#ifdef F77_DUMMY_MAIN
15520# ifdef __cplusplus
15521 extern "C"
15522# endif
15523 int F77_DUMMY_MAIN() { return 1; }
15524#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015525int
15526main ()
15527{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015528
15529 char *name;
15530 struct hostent *he, *res;
15531 char buffer[2048];
15532 int buflen = 2048;
15533 int h_errnop;
15534
15535 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015536
15537 ;
15538 return 0;
15539}
15540_ACEOF
15541rm -f conftest.$ac_objext
15542if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15543 (eval $ac_compile) 2>&5
15544 ac_status=$?
15545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15546 (exit $ac_status); } &&
15547 { ac_try='test -s conftest.$ac_objext'
15548 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15549 (eval $ac_try) 2>&5
15550 ac_status=$?
15551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15552 (exit $ac_status); }; }; then
15553
15554 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015555#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015556_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015557
Martin v. Löwis11437992002-04-12 09:54:03 +000015558
15559cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015560#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015561_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015562
Martin v. Löwis11437992002-04-12 09:54:03 +000015563 echo "$as_me:$LINENO: result: yes" >&5
15564echo "${ECHO_T}yes" >&6
15565
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015566else
Martin v. Löwis11437992002-04-12 09:54:03 +000015567 echo "$as_me: failed program was:" >&5
15568cat conftest.$ac_ext >&5
15569
15570 echo "$as_me:$LINENO: result: no" >&5
15571echo "${ECHO_T}no" >&6
15572 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
15573echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
15574 cat >conftest.$ac_ext <<_ACEOF
15575#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015576#include "confdefs.h"
15577
15578# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015579
Barry Warsawfe33b792003-01-07 22:42:49 +000015580#ifdef F77_DUMMY_MAIN
15581# ifdef __cplusplus
15582 extern "C"
15583# endif
15584 int F77_DUMMY_MAIN() { return 1; }
15585#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015586int
15587main ()
15588{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015589
15590 char *name;
15591 struct hostent *he;
15592 char buffer[2048];
15593 int buflen = 2048;
15594 int h_errnop;
15595
15596 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015597
15598 ;
15599 return 0;
15600}
15601_ACEOF
15602rm -f conftest.$ac_objext
15603if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15604 (eval $ac_compile) 2>&5
15605 ac_status=$?
15606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15607 (exit $ac_status); } &&
15608 { ac_try='test -s conftest.$ac_objext'
15609 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15610 (eval $ac_try) 2>&5
15611 ac_status=$?
15612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15613 (exit $ac_status); }; }; then
15614
15615 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015616#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015617_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015618
Martin v. Löwis11437992002-04-12 09:54:03 +000015619
15620cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015621#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015622_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015623
Martin v. Löwis11437992002-04-12 09:54:03 +000015624 echo "$as_me:$LINENO: result: yes" >&5
15625echo "${ECHO_T}yes" >&6
15626
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015627else
Martin v. Löwis11437992002-04-12 09:54:03 +000015628 echo "$as_me: failed program was:" >&5
15629cat conftest.$ac_ext >&5
15630
15631 echo "$as_me:$LINENO: result: no" >&5
15632echo "${ECHO_T}no" >&6
15633 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
15634echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
15635 cat >conftest.$ac_ext <<_ACEOF
15636#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015637#include "confdefs.h"
15638
15639# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015640
Barry Warsawfe33b792003-01-07 22:42:49 +000015641#ifdef F77_DUMMY_MAIN
15642# ifdef __cplusplus
15643 extern "C"
15644# endif
15645 int F77_DUMMY_MAIN() { return 1; }
15646#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015647int
15648main ()
15649{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015650
15651 char *name;
15652 struct hostent *he;
15653 struct hostent_data data;
15654
15655 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000015656
15657 ;
15658 return 0;
15659}
15660_ACEOF
15661rm -f conftest.$ac_objext
15662if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15663 (eval $ac_compile) 2>&5
15664 ac_status=$?
15665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15666 (exit $ac_status); } &&
15667 { ac_try='test -s conftest.$ac_objext'
15668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15669 (eval $ac_try) 2>&5
15670 ac_status=$?
15671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15672 (exit $ac_status); }; }; then
15673
15674 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015675#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015676_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015677
Martin v. Löwis11437992002-04-12 09:54:03 +000015678
15679cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015680#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015681_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015682
Martin v. Löwis11437992002-04-12 09:54:03 +000015683 echo "$as_me:$LINENO: result: yes" >&5
15684echo "${ECHO_T}yes" >&6
15685
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015686else
Martin v. Löwis11437992002-04-12 09:54:03 +000015687 echo "$as_me: failed program was:" >&5
15688cat conftest.$ac_ext >&5
15689
15690 echo "$as_me:$LINENO: result: no" >&5
15691echo "${ECHO_T}no" >&6
15692
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015693fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015694rm -f conftest.$ac_objext conftest.$ac_ext
15695
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015696fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015697rm -f conftest.$ac_objext conftest.$ac_ext
15698
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015699fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015700rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015701 CFLAGS=$OLD_CFLAGS
15702
15703else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015704
Martin v. Löwis11437992002-04-12 09:54:03 +000015705
15706for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000015707do
Martin v. Löwis11437992002-04-12 09:54:03 +000015708as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15709echo "$as_me:$LINENO: checking for $ac_func" >&5
15710echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15711if eval "test \"\${$as_ac_var+set}\" = set"; then
15712 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015713else
Martin v. Löwis11437992002-04-12 09:54:03 +000015714 cat >conftest.$ac_ext <<_ACEOF
15715#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015716#include "confdefs.h"
15717/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015718 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015719#include <assert.h>
15720/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015721#ifdef __cplusplus
15722extern "C"
15723#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015724/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015725 builtin and then its argument prototype would still apply. */
15726char $ac_func ();
15727char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015728
Barry Warsawfe33b792003-01-07 22:42:49 +000015729#ifdef F77_DUMMY_MAIN
15730# ifdef __cplusplus
15731 extern "C"
15732# endif
15733 int F77_DUMMY_MAIN() { return 1; }
15734#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015735int
15736main ()
15737{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015738/* The GNU C library defines this for functions which it implements
15739 to always fail with ENOSYS. Some functions are actually named
15740 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015741#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015742choke me
15743#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015744f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015745#endif
15746
Martin v. Löwis11437992002-04-12 09:54:03 +000015747 ;
15748 return 0;
15749}
15750_ACEOF
15751rm -f conftest.$ac_objext conftest$ac_exeext
15752if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15753 (eval $ac_link) 2>&5
15754 ac_status=$?
15755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15756 (exit $ac_status); } &&
15757 { ac_try='test -s conftest$ac_exeext'
15758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15759 (eval $ac_try) 2>&5
15760 ac_status=$?
15761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15762 (exit $ac_status); }; }; then
15763 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015764else
Martin v. Löwis11437992002-04-12 09:54:03 +000015765 echo "$as_me: failed program was:" >&5
15766cat conftest.$ac_ext >&5
15767eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015768fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015769rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015770fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015771echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15772echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15773if test `eval echo '${'$as_ac_var'}'` = yes; then
15774 cat >>confdefs.h <<_ACEOF
15775#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15776_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015777
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015778fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015779done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015780
Michael W. Hudson54241132001-12-07 15:38:26 +000015781
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015782fi
15783
Michael W. Hudson54241132001-12-07 15:38:26 +000015784
15785
15786
15787
15788
15789
Guido van Rossum627b2d71993-12-24 10:39:16 +000015790# checks for system services
15791# (none yet)
15792
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015793# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000015794echo "$as_me:$LINENO: checking for __fpu_control" >&5
15795echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
15796if test "${ac_cv_func___fpu_control+set}" = set; then
15797 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015798else
Martin v. Löwis11437992002-04-12 09:54:03 +000015799 cat >conftest.$ac_ext <<_ACEOF
15800#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015801#include "confdefs.h"
15802/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015803 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015804#include <assert.h>
15805/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015806#ifdef __cplusplus
15807extern "C"
15808#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015809/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015810 builtin and then its argument prototype would still apply. */
15811char __fpu_control ();
15812char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015813
Barry Warsawfe33b792003-01-07 22:42:49 +000015814#ifdef F77_DUMMY_MAIN
15815# ifdef __cplusplus
15816 extern "C"
15817# endif
15818 int F77_DUMMY_MAIN() { return 1; }
15819#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015820int
15821main ()
15822{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015823/* The GNU C library defines this for functions which it implements
15824 to always fail with ENOSYS. Some functions are actually named
15825 something starting with __ and the normal name is an alias. */
15826#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
15827choke me
15828#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015829f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015830#endif
15831
Martin v. Löwis11437992002-04-12 09:54:03 +000015832 ;
15833 return 0;
15834}
15835_ACEOF
15836rm -f conftest.$ac_objext conftest$ac_exeext
15837if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15838 (eval $ac_link) 2>&5
15839 ac_status=$?
15840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15841 (exit $ac_status); } &&
15842 { ac_try='test -s conftest$ac_exeext'
15843 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15844 (eval $ac_try) 2>&5
15845 ac_status=$?
15846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15847 (exit $ac_status); }; }; then
15848 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015849else
Martin v. Löwis11437992002-04-12 09:54:03 +000015850 echo "$as_me: failed program was:" >&5
15851cat conftest.$ac_ext >&5
15852ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015853fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015854rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015855fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015856echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
15857echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
15858if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015859 :
15860else
Martin v. Löwis11437992002-04-12 09:54:03 +000015861
15862echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
15863echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
15864if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
15865 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015866else
Martin v. Löwis11437992002-04-12 09:54:03 +000015867 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015868LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015869cat >conftest.$ac_ext <<_ACEOF
15870#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015871#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015872
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015873/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015874#ifdef __cplusplus
15875extern "C"
15876#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015877/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015878 builtin and then its argument prototype would still apply. */
15879char __fpu_control ();
Barry Warsawfe33b792003-01-07 22:42:49 +000015880#ifdef F77_DUMMY_MAIN
15881# ifdef __cplusplus
15882 extern "C"
15883# endif
15884 int F77_DUMMY_MAIN() { return 1; }
15885#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015886int
15887main ()
15888{
15889__fpu_control ();
15890 ;
15891 return 0;
15892}
15893_ACEOF
15894rm -f conftest.$ac_objext conftest$ac_exeext
15895if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15896 (eval $ac_link) 2>&5
15897 ac_status=$?
15898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15899 (exit $ac_status); } &&
15900 { ac_try='test -s conftest$ac_exeext'
15901 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15902 (eval $ac_try) 2>&5
15903 ac_status=$?
15904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15905 (exit $ac_status); }; }; then
15906 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015907else
Martin v. Löwis11437992002-04-12 09:54:03 +000015908 echo "$as_me: failed program was:" >&5
15909cat conftest.$ac_ext >&5
15910ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015911fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015912rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15913LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015914fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015915echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
15916echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
15917if test $ac_cv_lib_ieee___fpu_control = yes; then
15918 cat >>confdefs.h <<_ACEOF
15919#define HAVE_LIBIEEE 1
15920_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015921
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015922 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015923
Guido van Rossum627b2d71993-12-24 10:39:16 +000015924fi
15925
Michael W. Hudson54241132001-12-07 15:38:26 +000015926
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015927fi
15928
Michael W. Hudson54241132001-12-07 15:38:26 +000015929
Guido van Rossum7f253911997-05-09 02:42:48 +000015930# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000015931echo "$as_me:$LINENO: checking for --with-fpectl" >&5
15932echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
15933
Guido van Rossum7f253911997-05-09 02:42:48 +000015934# Check whether --with-fpectl or --without-fpectl was given.
15935if test "${with_fpectl+set}" = set; then
15936 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000015937
Guido van Rossum7f253911997-05-09 02:42:48 +000015938if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015939then
15940
15941cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000015942#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015943_ACEOF
15944
15945 echo "$as_me:$LINENO: result: yes" >&5
15946echo "${ECHO_T}yes" >&6
15947else echo "$as_me:$LINENO: result: no" >&5
15948echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015949fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015950else
Martin v. Löwis11437992002-04-12 09:54:03 +000015951 echo "$as_me:$LINENO: result: no" >&5
15952echo "${ECHO_T}no" >&6
15953fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000015954
Guido van Rossum7f43da71994-08-01 12:15:30 +000015955# check for --with-libm=...
15956
Guido van Rossum563e7081996-09-10 18:20:48 +000015957case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000015958Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015959BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000015960*) LIBM=-lm
15961esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015962echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
15963echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
15964
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015965# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015966if test "${with_libm+set}" = set; then
15967 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000015968
Guido van Rossum7f253911997-05-09 02:42:48 +000015969if test "$withval" = no
15970then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000015971 echo "$as_me:$LINENO: result: force LIBM empty" >&5
15972echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015973elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015974then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015975 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
15976echo "${ECHO_T}set LIBM=\"$withval\"" >&6
15977else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
15978echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
15979 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015980fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015981else
Martin v. Löwis11437992002-04-12 09:54:03 +000015982 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
15983echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
15984fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015985
15986# check for --with-libc=...
15987
Martin v. Löwis11437992002-04-12 09:54:03 +000015988echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
15989echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
15990
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015991# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015992if test "${with_libc+set}" = set; then
15993 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000015994
Guido van Rossum7f253911997-05-09 02:42:48 +000015995if test "$withval" = no
15996then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000015997 echo "$as_me:$LINENO: result: force LIBC empty" >&5
15998echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015999elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016000then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000016001 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
16002echo "${ECHO_T}set LIBC=\"$withval\"" >&6
16003else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
16004echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
16005 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016006fi
Guido van Rossum7f253911997-05-09 02:42:48 +000016007else
Martin v. Löwis11437992002-04-12 09:54:03 +000016008 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
16009echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
16010fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016011
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016012# check for hypot() in math library
16013LIBS_SAVE=$LIBS
16014LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000016015
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016016for ac_func in hypot
16017do
Martin v. Löwis11437992002-04-12 09:54:03 +000016018as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16019echo "$as_me:$LINENO: checking for $ac_func" >&5
16020echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16021if eval "test \"\${$as_ac_var+set}\" = set"; then
16022 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016023else
Martin v. Löwis11437992002-04-12 09:54:03 +000016024 cat >conftest.$ac_ext <<_ACEOF
16025#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016026#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016027/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000016028 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016029#include <assert.h>
16030/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016031#ifdef __cplusplus
16032extern "C"
16033#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016034/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016035 builtin and then its argument prototype would still apply. */
16036char $ac_func ();
16037char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016038
Barry Warsawfe33b792003-01-07 22:42:49 +000016039#ifdef F77_DUMMY_MAIN
16040# ifdef __cplusplus
16041 extern "C"
16042# endif
16043 int F77_DUMMY_MAIN() { return 1; }
16044#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016045int
16046main ()
16047{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016048/* The GNU C library defines this for functions which it implements
16049 to always fail with ENOSYS. Some functions are actually named
16050 something starting with __ and the normal name is an alias. */
16051#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16052choke me
16053#else
Martin v. Löwis11437992002-04-12 09:54:03 +000016054f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016055#endif
16056
Martin v. Löwis11437992002-04-12 09:54:03 +000016057 ;
16058 return 0;
16059}
16060_ACEOF
16061rm -f conftest.$ac_objext conftest$ac_exeext
16062if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16063 (eval $ac_link) 2>&5
16064 ac_status=$?
16065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16066 (exit $ac_status); } &&
16067 { ac_try='test -s conftest$ac_exeext'
16068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16069 (eval $ac_try) 2>&5
16070 ac_status=$?
16071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16072 (exit $ac_status); }; }; then
16073 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016074else
Martin v. Löwis11437992002-04-12 09:54:03 +000016075 echo "$as_me: failed program was:" >&5
16076cat conftest.$ac_ext >&5
16077eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016078fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016079rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016080fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016081echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16082echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16083if test `eval echo '${'$as_ac_var'}'` = yes; then
16084 cat >>confdefs.h <<_ACEOF
16085#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16086_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000016087
Michael W. Hudson54241132001-12-07 15:38:26 +000016088else
Martin v. Löwis11437992002-04-12 09:54:03 +000016089 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016090fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016091done
16092
Michael W. Hudson54241132001-12-07 15:38:26 +000016093
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016094LIBS=$LIBS_SAVE
16095
Guido van Rossumef2255b2000-03-10 22:30:29 +000016096# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000016097if test "${ac_cv_header_wchar_h+set}" = set; then
16098 echo "$as_me:$LINENO: checking for wchar.h" >&5
16099echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16100if test "${ac_cv_header_wchar_h+set}" = set; then
16101 echo $ECHO_N "(cached) $ECHO_C" >&6
16102fi
16103echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16104echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000016105else
Martin v. Löwis11437992002-04-12 09:54:03 +000016106 # Is the header compilable?
16107echo "$as_me:$LINENO: checking wchar.h usability" >&5
16108echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
16109cat >conftest.$ac_ext <<_ACEOF
16110#line $LINENO "configure"
16111#include "confdefs.h"
16112$ac_includes_default
16113#include <wchar.h>
16114_ACEOF
16115rm -f conftest.$ac_objext
16116if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16117 (eval $ac_compile) 2>&5
16118 ac_status=$?
16119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16120 (exit $ac_status); } &&
16121 { ac_try='test -s conftest.$ac_objext'
16122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16123 (eval $ac_try) 2>&5
16124 ac_status=$?
16125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16126 (exit $ac_status); }; }; then
16127 ac_header_compiler=yes
16128else
16129 echo "$as_me: failed program was:" >&5
16130cat conftest.$ac_ext >&5
16131ac_header_compiler=no
16132fi
16133rm -f conftest.$ac_objext conftest.$ac_ext
16134echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16135echo "${ECHO_T}$ac_header_compiler" >&6
16136
16137# Is the header present?
16138echo "$as_me:$LINENO: checking wchar.h presence" >&5
16139echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
16140cat >conftest.$ac_ext <<_ACEOF
16141#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016142#include "confdefs.h"
16143#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016144_ACEOF
16145if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16146 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16147 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000016148 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016149 rm -f conftest.er1
16150 cat conftest.err >&5
16151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16152 (exit $ac_status); } >/dev/null; then
16153 if test -s conftest.err; then
16154 ac_cpp_err=$ac_c_preproc_warn_flag
16155 else
16156 ac_cpp_err=
16157 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016158else
Martin v. Löwis11437992002-04-12 09:54:03 +000016159 ac_cpp_err=yes
16160fi
16161if test -z "$ac_cpp_err"; then
16162 ac_header_preproc=yes
16163else
16164 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000016165 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016166 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016167fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016168rm -f conftest.err conftest.$ac_ext
16169echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16170echo "${ECHO_T}$ac_header_preproc" >&6
16171
16172# So? What about this header?
16173case $ac_header_compiler:$ac_header_preproc in
16174 yes:no )
16175 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
16176echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16177 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
16178echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
16179 no:yes )
16180 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
16181echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
16182 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
16183echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
16184 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
16185echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
16186esac
16187echo "$as_me:$LINENO: checking for wchar.h" >&5
16188echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16189if test "${ac_cv_header_wchar_h+set}" = set; then
16190 echo $ECHO_N "(cached) $ECHO_C" >&6
16191else
16192 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000016193fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016194echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16195echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
16196
16197fi
16198if test $ac_cv_header_wchar_h = yes; then
16199
16200
16201cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016202#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016203_ACEOF
16204
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016205 wchar_h="yes"
16206
Guido van Rossumef2255b2000-03-10 22:30:29 +000016207else
Martin v. Löwis11437992002-04-12 09:54:03 +000016208 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016209
16210fi
16211
Michael W. Hudson54241132001-12-07 15:38:26 +000016212
Martin v. Löwis11437992002-04-12 09:54:03 +000016213
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016214# determine wchar_t size
16215if test "$wchar_h" = yes
16216then
Martin v. Löwis11437992002-04-12 09:54:03 +000016217 echo "$as_me:$LINENO: checking for wchar_t" >&5
16218echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
16219if test "${ac_cv_type_wchar_t+set}" = set; then
16220 echo $ECHO_N "(cached) $ECHO_C" >&6
16221else
16222 cat >conftest.$ac_ext <<_ACEOF
16223#line $LINENO "configure"
16224#include "confdefs.h"
16225#include <wchar.h>
16226
Barry Warsawfe33b792003-01-07 22:42:49 +000016227#ifdef F77_DUMMY_MAIN
16228# ifdef __cplusplus
16229 extern "C"
16230# endif
16231 int F77_DUMMY_MAIN() { return 1; }
16232#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016233int
16234main ()
16235{
16236if ((wchar_t *) 0)
16237 return 0;
16238if (sizeof (wchar_t))
16239 return 0;
16240 ;
16241 return 0;
16242}
16243_ACEOF
16244rm -f conftest.$ac_objext
16245if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16246 (eval $ac_compile) 2>&5
16247 ac_status=$?
16248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16249 (exit $ac_status); } &&
16250 { ac_try='test -s conftest.$ac_objext'
16251 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16252 (eval $ac_try) 2>&5
16253 ac_status=$?
16254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16255 (exit $ac_status); }; }; then
16256 ac_cv_type_wchar_t=yes
16257else
16258 echo "$as_me: failed program was:" >&5
16259cat conftest.$ac_ext >&5
16260ac_cv_type_wchar_t=no
16261fi
16262rm -f conftest.$ac_objext conftest.$ac_ext
16263fi
16264echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
16265echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
16266
16267echo "$as_me:$LINENO: checking size of wchar_t" >&5
16268echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
16269if test "${ac_cv_sizeof_wchar_t+set}" = set; then
16270 echo $ECHO_N "(cached) $ECHO_C" >&6
16271else
16272 if test "$ac_cv_type_wchar_t" = yes; then
16273 # The cast to unsigned long works around a bug in the HP C Compiler
16274 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16275 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16276 # This bug is HP SR number 8606223364.
16277 if test "$cross_compiling" = yes; then
16278 # Depending upon the size, compute the lo and hi bounds.
16279cat >conftest.$ac_ext <<_ACEOF
16280#line $LINENO "configure"
16281#include "confdefs.h"
16282#include <wchar.h>
16283
Barry Warsawfe33b792003-01-07 22:42:49 +000016284#ifdef F77_DUMMY_MAIN
16285# ifdef __cplusplus
16286 extern "C"
16287# endif
16288 int F77_DUMMY_MAIN() { return 1; }
16289#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016290int
16291main ()
16292{
16293static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
16294test_array [0] = 0
16295
16296 ;
16297 return 0;
16298}
16299_ACEOF
16300rm -f conftest.$ac_objext
16301if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16302 (eval $ac_compile) 2>&5
16303 ac_status=$?
16304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16305 (exit $ac_status); } &&
16306 { ac_try='test -s conftest.$ac_objext'
16307 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16308 (eval $ac_try) 2>&5
16309 ac_status=$?
16310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16311 (exit $ac_status); }; }; then
16312 ac_lo=0 ac_mid=0
16313 while :; do
16314 cat >conftest.$ac_ext <<_ACEOF
16315#line $LINENO "configure"
16316#include "confdefs.h"
16317#include <wchar.h>
16318
Barry Warsawfe33b792003-01-07 22:42:49 +000016319#ifdef F77_DUMMY_MAIN
16320# ifdef __cplusplus
16321 extern "C"
16322# endif
16323 int F77_DUMMY_MAIN() { return 1; }
16324#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016325int
16326main ()
16327{
16328static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16329test_array [0] = 0
16330
16331 ;
16332 return 0;
16333}
16334_ACEOF
16335rm -f conftest.$ac_objext
16336if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16337 (eval $ac_compile) 2>&5
16338 ac_status=$?
16339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16340 (exit $ac_status); } &&
16341 { ac_try='test -s conftest.$ac_objext'
16342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16343 (eval $ac_try) 2>&5
16344 ac_status=$?
16345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16346 (exit $ac_status); }; }; then
16347 ac_hi=$ac_mid; break
16348else
16349 echo "$as_me: failed program was:" >&5
16350cat conftest.$ac_ext >&5
16351ac_lo=`expr $ac_mid + 1`
16352 if test $ac_lo -le $ac_mid; then
16353 ac_lo= ac_hi=
16354 break
16355 fi
16356 ac_mid=`expr 2 '*' $ac_mid + 1`
16357fi
16358rm -f conftest.$ac_objext conftest.$ac_ext
16359 done
16360else
16361 echo "$as_me: failed program was:" >&5
16362cat conftest.$ac_ext >&5
16363cat >conftest.$ac_ext <<_ACEOF
16364#line $LINENO "configure"
16365#include "confdefs.h"
16366#include <wchar.h>
16367
Barry Warsawfe33b792003-01-07 22:42:49 +000016368#ifdef F77_DUMMY_MAIN
16369# ifdef __cplusplus
16370 extern "C"
16371# endif
16372 int F77_DUMMY_MAIN() { return 1; }
16373#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016374int
16375main ()
16376{
16377static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
16378test_array [0] = 0
16379
16380 ;
16381 return 0;
16382}
16383_ACEOF
16384rm -f conftest.$ac_objext
16385if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16386 (eval $ac_compile) 2>&5
16387 ac_status=$?
16388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16389 (exit $ac_status); } &&
16390 { ac_try='test -s conftest.$ac_objext'
16391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16392 (eval $ac_try) 2>&5
16393 ac_status=$?
16394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16395 (exit $ac_status); }; }; then
16396 ac_hi=-1 ac_mid=-1
16397 while :; do
16398 cat >conftest.$ac_ext <<_ACEOF
16399#line $LINENO "configure"
16400#include "confdefs.h"
16401#include <wchar.h>
16402
Barry Warsawfe33b792003-01-07 22:42:49 +000016403#ifdef F77_DUMMY_MAIN
16404# ifdef __cplusplus
16405 extern "C"
16406# endif
16407 int F77_DUMMY_MAIN() { return 1; }
16408#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016409int
16410main ()
16411{
16412static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
16413test_array [0] = 0
16414
16415 ;
16416 return 0;
16417}
16418_ACEOF
16419rm -f conftest.$ac_objext
16420if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16421 (eval $ac_compile) 2>&5
16422 ac_status=$?
16423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16424 (exit $ac_status); } &&
16425 { ac_try='test -s conftest.$ac_objext'
16426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16427 (eval $ac_try) 2>&5
16428 ac_status=$?
16429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16430 (exit $ac_status); }; }; then
16431 ac_lo=$ac_mid; break
16432else
16433 echo "$as_me: failed program was:" >&5
16434cat conftest.$ac_ext >&5
16435ac_hi=`expr '(' $ac_mid ')' - 1`
16436 if test $ac_mid -le $ac_hi; then
16437 ac_lo= ac_hi=
16438 break
16439 fi
16440 ac_mid=`expr 2 '*' $ac_mid`
16441fi
16442rm -f conftest.$ac_objext conftest.$ac_ext
16443 done
16444else
16445 echo "$as_me: failed program was:" >&5
16446cat conftest.$ac_ext >&5
16447ac_lo= ac_hi=
16448fi
16449rm -f conftest.$ac_objext conftest.$ac_ext
16450fi
16451rm -f conftest.$ac_objext conftest.$ac_ext
16452# Binary search between lo and hi bounds.
16453while test "x$ac_lo" != "x$ac_hi"; do
16454 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
16455 cat >conftest.$ac_ext <<_ACEOF
16456#line $LINENO "configure"
16457#include "confdefs.h"
16458#include <wchar.h>
16459
Barry Warsawfe33b792003-01-07 22:42:49 +000016460#ifdef F77_DUMMY_MAIN
16461# ifdef __cplusplus
16462 extern "C"
16463# endif
16464 int F77_DUMMY_MAIN() { return 1; }
16465#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016466int
16467main ()
16468{
16469static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16470test_array [0] = 0
16471
16472 ;
16473 return 0;
16474}
16475_ACEOF
16476rm -f conftest.$ac_objext
16477if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16478 (eval $ac_compile) 2>&5
16479 ac_status=$?
16480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16481 (exit $ac_status); } &&
16482 { ac_try='test -s conftest.$ac_objext'
16483 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16484 (eval $ac_try) 2>&5
16485 ac_status=$?
16486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16487 (exit $ac_status); }; }; then
16488 ac_hi=$ac_mid
16489else
16490 echo "$as_me: failed program was:" >&5
16491cat conftest.$ac_ext >&5
16492ac_lo=`expr '(' $ac_mid ')' + 1`
16493fi
16494rm -f conftest.$ac_objext conftest.$ac_ext
16495done
16496case $ac_lo in
16497?*) ac_cv_sizeof_wchar_t=$ac_lo;;
16498'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
16499echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
16500 { (exit 1); exit 1; }; } ;;
16501esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016502else
16503 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016504 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
16505echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16506 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000016507else
Martin v. Löwis11437992002-04-12 09:54:03 +000016508 cat >conftest.$ac_ext <<_ACEOF
16509#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016510#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016511#include <wchar.h>
16512
16513long longval () { return (long) (sizeof (wchar_t)); }
16514unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000016515#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016516#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000016517#ifdef F77_DUMMY_MAIN
16518# ifdef __cplusplus
16519 extern "C"
16520# endif
16521 int F77_DUMMY_MAIN() { return 1; }
16522#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016523int
16524main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016525{
Martin v. Löwis11437992002-04-12 09:54:03 +000016526
16527 FILE *f = fopen ("conftest.val", "w");
16528 if (! f)
16529 exit (1);
16530 if (((long) (sizeof (wchar_t))) < 0)
16531 {
16532 long i = longval ();
16533 if (i != ((long) (sizeof (wchar_t))))
16534 exit (1);
16535 fprintf (f, "%ld\n", i);
16536 }
16537 else
16538 {
16539 unsigned long i = ulongval ();
16540 if (i != ((long) (sizeof (wchar_t))))
16541 exit (1);
16542 fprintf (f, "%lu\n", i);
16543 }
16544 exit (ferror (f) || fclose (f) != 0);
16545
16546 ;
16547 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000016548}
Martin v. Löwis11437992002-04-12 09:54:03 +000016549_ACEOF
16550rm -f conftest$ac_exeext
16551if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16552 (eval $ac_link) 2>&5
16553 ac_status=$?
16554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16555 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16557 (eval $ac_try) 2>&5
16558 ac_status=$?
16559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16560 (exit $ac_status); }; }; then
16561 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000016562else
Martin v. Löwis11437992002-04-12 09:54:03 +000016563 echo "$as_me: program exited with status $ac_status" >&5
16564echo "$as_me: failed program was:" >&5
16565cat conftest.$ac_ext >&5
16566( exit $ac_status )
16567{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
16568echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
16569 { (exit 1); exit 1; }; }
16570fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016571rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016572fi
16573fi
16574rm -f conftest.val
16575else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016576 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000016577fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016578fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016579echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
16580echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
16581cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016582#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016583_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016584
Michael W. Hudson54241132001-12-07 15:38:26 +000016585
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016586fi
16587
Martin v. Löwis11437992002-04-12 09:54:03 +000016588echo "$as_me:$LINENO: checking what type to use for unicode" >&5
16589echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016590# Check whether --enable-unicode or --disable-unicode was given.
16591if test "${enable_unicode+set}" = set; then
16592 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000016593
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016594else
16595 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000016596fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016597
16598if test $enable_unicode = yes
16599then
Martin v. Löwisfd917792001-06-27 20:22:04 +000016600 # Without any arguments, Py_UNICODE defaults to two-byte mode
16601 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016602fi
16603
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016604
16605
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016606case "$enable_unicode" in
16607ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000016608 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016609#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000016610_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016611
16612 ;;
16613ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000016614 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016615#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000016616_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016617
16618 ;;
16619esac
16620
Michael W. Hudson54241132001-12-07 15:38:26 +000016621
Martin v. Löwis11437992002-04-12 09:54:03 +000016622
16623
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016624
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016625if test "$enable_unicode" = "no"
16626then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016627 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000016628 echo "$as_me:$LINENO: result: not used" >&5
16629echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016630else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016631 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000016632
16633cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016634#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016635_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016636
16637 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
16638 then
16639 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016640
Martin v. Löwis11437992002-04-12 09:54:03 +000016641cat >>confdefs.h <<\_ACEOF
16642#define HAVE_USABLE_WCHAR_T 1
16643_ACEOF
16644
16645 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016646#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016647_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016648
16649 elif test "$ac_cv_sizeof_short" = "$unicode_size"
16650 then
16651 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000016652 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016653#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000016654_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016655
16656 elif test "$ac_cv_sizeof_long" = "$unicode_size"
16657 then
16658 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000016659 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016660#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000016661_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016662
16663 else
16664 PY_UNICODE_TYPE="no type found"
16665 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016666 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
16667echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016668fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016669
16670# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000016671echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
16672echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
16673if test "${ac_cv_c_bigendian+set}" = set; then
16674 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000016675else
Martin v. Löwis11437992002-04-12 09:54:03 +000016676 # See if sys/param.h defines the BYTE_ORDER macro.
16677cat >conftest.$ac_ext <<_ACEOF
16678#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016679#include "confdefs.h"
16680#include <sys/types.h>
16681#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000016682
Barry Warsawfe33b792003-01-07 22:42:49 +000016683#ifdef F77_DUMMY_MAIN
16684# ifdef __cplusplus
16685 extern "C"
16686# endif
16687 int F77_DUMMY_MAIN() { return 1; }
16688#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016689int
16690main ()
16691{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016692#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
16693 bogus endian macros
16694#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016695
16696 ;
16697 return 0;
16698}
16699_ACEOF
16700rm -f conftest.$ac_objext
16701if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16702 (eval $ac_compile) 2>&5
16703 ac_status=$?
16704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16705 (exit $ac_status); } &&
16706 { ac_try='test -s conftest.$ac_objext'
16707 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16708 (eval $ac_try) 2>&5
16709 ac_status=$?
16710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16711 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016712 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000016713cat >conftest.$ac_ext <<_ACEOF
16714#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016715#include "confdefs.h"
16716#include <sys/types.h>
16717#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000016718
Barry Warsawfe33b792003-01-07 22:42:49 +000016719#ifdef F77_DUMMY_MAIN
16720# ifdef __cplusplus
16721 extern "C"
16722# endif
16723 int F77_DUMMY_MAIN() { return 1; }
16724#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016725int
16726main ()
16727{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016728#if BYTE_ORDER != BIG_ENDIAN
16729 not big endian
16730#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016731
16732 ;
16733 return 0;
16734}
16735_ACEOF
16736rm -f conftest.$ac_objext
16737if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16738 (eval $ac_compile) 2>&5
16739 ac_status=$?
16740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16741 (exit $ac_status); } &&
16742 { ac_try='test -s conftest.$ac_objext'
16743 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16744 (eval $ac_try) 2>&5
16745 ac_status=$?
16746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16747 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016748 ac_cv_c_bigendian=yes
16749else
Martin v. Löwis11437992002-04-12 09:54:03 +000016750 echo "$as_me: failed program was:" >&5
16751cat conftest.$ac_ext >&5
16752ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016753fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016754rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016755else
Martin v. Löwis11437992002-04-12 09:54:03 +000016756 echo "$as_me: failed program was:" >&5
16757cat conftest.$ac_ext >&5
16758# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000016759if test "$cross_compiling" = yes; then
Barry Warsawfe33b792003-01-07 22:42:49 +000016760 # try to guess the endianess by grep'ing values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000016761 ac_cv_c_bigendian=unknown
16762 cat >conftest.$ac_ext <<_ACEOF
16763#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016764#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016765short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16766short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16767void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
16768short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16769short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16770void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Barry Warsawfe33b792003-01-07 22:42:49 +000016771#ifdef F77_DUMMY_MAIN
16772# ifdef __cplusplus
16773 extern "C"
16774# endif
16775 int F77_DUMMY_MAIN() { return 1; }
16776#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016777int
16778main ()
16779{
16780 _ascii (); _ebcdic ();
16781 ;
16782 return 0;
16783}
16784_ACEOF
16785rm -f conftest.$ac_objext
16786if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16787 (eval $ac_compile) 2>&5
16788 ac_status=$?
16789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16790 (exit $ac_status); } &&
16791 { ac_try='test -s conftest.$ac_objext'
16792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16793 (eval $ac_try) 2>&5
16794 ac_status=$?
16795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16796 (exit $ac_status); }; }; then
Barry Warsawfe33b792003-01-07 22:42:49 +000016797 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016798 ac_cv_c_bigendian=yes
16799fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016800if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016801 if test "$ac_cv_c_bigendian" = unknown; then
16802 ac_cv_c_bigendian=no
16803 else
16804 # finding both strings is unlikely to happen, but who knows?
16805 ac_cv_c_bigendian=unknown
16806 fi
16807fi
16808else
16809 echo "$as_me: failed program was:" >&5
16810cat conftest.$ac_ext >&5
16811fi
16812rm -f conftest.$ac_objext conftest.$ac_ext
16813else
16814 cat >conftest.$ac_ext <<_ACEOF
16815#line $LINENO "configure"
16816#include "confdefs.h"
16817int
16818main ()
16819{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016820 /* Are we little or big endian? From Harbison&Steele. */
16821 union
16822 {
16823 long l;
16824 char c[sizeof (long)];
16825 } u;
16826 u.l = 1;
16827 exit (u.c[sizeof (long) - 1] == 1);
16828}
Martin v. Löwis11437992002-04-12 09:54:03 +000016829_ACEOF
16830rm -f conftest$ac_exeext
16831if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16832 (eval $ac_link) 2>&5
16833 ac_status=$?
16834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16835 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16837 (eval $ac_try) 2>&5
16838 ac_status=$?
16839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16840 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016841 ac_cv_c_bigendian=no
16842else
Martin v. Löwis11437992002-04-12 09:54:03 +000016843 echo "$as_me: program exited with status $ac_status" >&5
16844echo "$as_me: failed program was:" >&5
16845cat conftest.$ac_ext >&5
16846( exit $ac_status )
16847ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000016848fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016849rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016850fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016851fi
16852rm -f conftest.$ac_objext conftest.$ac_ext
16853fi
16854echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
16855echo "${ECHO_T}$ac_cv_c_bigendian" >&6
16856case $ac_cv_c_bigendian in
16857 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000016858
Martin v. Löwis11437992002-04-12 09:54:03 +000016859cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016860#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016861_ACEOF
16862 ;;
16863 no)
16864 ;;
16865 *)
Barry Warsawfe33b792003-01-07 22:42:49 +000016866 { { echo "$as_me:$LINENO: error: unknown endianess
Martin v. Löwis11437992002-04-12 09:54:03 +000016867presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Barry Warsawfe33b792003-01-07 22:42:49 +000016868echo "$as_me: error: unknown endianess
Martin v. Löwis11437992002-04-12 09:54:03 +000016869presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
16870 { (exit 1); exit 1; }; } ;;
16871esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000016872
Michael W. Hudson54241132001-12-07 15:38:26 +000016873
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016874# Check whether right shifting a negative integer extends the sign bit
16875# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000016876echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
16877echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
16878if test "${ac_cv_rshift_extends_sign+set}" = set; then
16879 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016880else
Martin v. Löwis11437992002-04-12 09:54:03 +000016881
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016882if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000016883 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016884else
Martin v. Löwis11437992002-04-12 09:54:03 +000016885 cat >conftest.$ac_ext <<_ACEOF
16886#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016887#include "confdefs.h"
16888
16889int main()
16890{
Vladimir Marangozova6180282000-07-12 05:05:06 +000016891 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016892}
16893
Martin v. Löwis11437992002-04-12 09:54:03 +000016894_ACEOF
16895rm -f conftest$ac_exeext
16896if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16897 (eval $ac_link) 2>&5
16898 ac_status=$?
16899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16900 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16901 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16902 (eval $ac_try) 2>&5
16903 ac_status=$?
16904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16905 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000016906 ac_cv_rshift_extends_sign=yes
16907else
Martin v. Löwis11437992002-04-12 09:54:03 +000016908 echo "$as_me: program exited with status $ac_status" >&5
16909echo "$as_me: failed program was:" >&5
16910cat conftest.$ac_ext >&5
16911( exit $ac_status )
16912ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000016913fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016914rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016915fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000016916fi
16917
Martin v. Löwis11437992002-04-12 09:54:03 +000016918echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
16919echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016920if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016921then
Martin v. Löwis11437992002-04-12 09:54:03 +000016922
16923cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016924#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016925_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016926
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016927fi
16928
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016929# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016930echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
16931echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
16932if test "${ac_cv_have_getc_unlocked+set}" = set; then
16933 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016934else
Martin v. Löwis11437992002-04-12 09:54:03 +000016935
16936cat >conftest.$ac_ext <<_ACEOF
16937#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016938#include "confdefs.h"
16939#include <stdio.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000016940#ifdef F77_DUMMY_MAIN
16941# ifdef __cplusplus
16942 extern "C"
16943# endif
16944 int F77_DUMMY_MAIN() { return 1; }
16945#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016946int
16947main ()
16948{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016949
16950 FILE *f = fopen("/dev/null", "r");
16951 flockfile(f);
16952 getc_unlocked(f);
16953 funlockfile(f);
16954
Martin v. Löwis11437992002-04-12 09:54:03 +000016955 ;
16956 return 0;
16957}
16958_ACEOF
16959rm -f conftest.$ac_objext conftest$ac_exeext
16960if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16961 (eval $ac_link) 2>&5
16962 ac_status=$?
16963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16964 (exit $ac_status); } &&
16965 { ac_try='test -s conftest$ac_exeext'
16966 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16967 (eval $ac_try) 2>&5
16968 ac_status=$?
16969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16970 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016971 ac_cv_have_getc_unlocked=yes
16972else
Martin v. Löwis11437992002-04-12 09:54:03 +000016973 echo "$as_me: failed program was:" >&5
16974cat conftest.$ac_ext >&5
16975ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016976fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016977rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016978fi
16979
Martin v. Löwis11437992002-04-12 09:54:03 +000016980echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
16981echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016982if test "$ac_cv_have_getc_unlocked" = yes
16983then
Martin v. Löwis11437992002-04-12 09:54:03 +000016984
16985cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016986#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016987_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016988
16989fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016990
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000016991# check for readline 2.2
16992cat >conftest.$ac_ext <<_ACEOF
16993#line $LINENO "configure"
16994#include "confdefs.h"
16995#include <readline/readline.h>
16996_ACEOF
16997if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16998 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16999 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000017000 egrep -v '^ *\+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017001 rm -f conftest.er1
17002 cat conftest.err >&5
17003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17004 (exit $ac_status); } >/dev/null; then
17005 if test -s conftest.err; then
17006 ac_cpp_err=$ac_c_preproc_warn_flag
17007 else
17008 ac_cpp_err=
17009 fi
17010else
17011 ac_cpp_err=yes
17012fi
17013if test -z "$ac_cpp_err"; then
17014 have_readline=yes
17015else
17016 echo "$as_me: failed program was:" >&5
17017 cat conftest.$ac_ext >&5
17018 have_readline=no
17019fi
17020rm -f conftest.err conftest.$ac_ext
17021if test $have_readline = yes
17022then
17023 cat >conftest.$ac_ext <<_ACEOF
17024#line $LINENO "configure"
17025#include "confdefs.h"
17026#include <readline/readline.h>
17027
17028_ACEOF
17029if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000017030 egrep "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017031
17032cat >>confdefs.h <<\_ACEOF
17033#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
17034_ACEOF
17035
17036fi
17037rm -f conftest*
17038
17039fi
17040
Martin v. Löwis0daad592001-09-30 21:09:59 +000017041# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000017042echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
17043echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
17044if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
17045 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000017046else
Martin v. Löwis11437992002-04-12 09:54:03 +000017047 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000017048LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017049cat >conftest.$ac_ext <<_ACEOF
17050#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000017051#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000017052
Guido van Rossum353ae582001-07-10 16:45:32 +000017053/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017054#ifdef __cplusplus
17055extern "C"
17056#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000017057/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017058 builtin and then its argument prototype would still apply. */
17059char rl_pre_input_hook ();
Barry Warsawfe33b792003-01-07 22:42:49 +000017060#ifdef F77_DUMMY_MAIN
17061# ifdef __cplusplus
17062 extern "C"
17063# endif
17064 int F77_DUMMY_MAIN() { return 1; }
17065#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017066int
17067main ()
17068{
17069rl_pre_input_hook ();
17070 ;
17071 return 0;
17072}
17073_ACEOF
17074rm -f conftest.$ac_objext conftest$ac_exeext
17075if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17076 (eval $ac_link) 2>&5
17077 ac_status=$?
17078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17079 (exit $ac_status); } &&
17080 { ac_try='test -s conftest$ac_exeext'
17081 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17082 (eval $ac_try) 2>&5
17083 ac_status=$?
17084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17085 (exit $ac_status); }; }; then
17086 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000017087else
Martin v. Löwis11437992002-04-12 09:54:03 +000017088 echo "$as_me: failed program was:" >&5
17089cat conftest.$ac_ext >&5
17090ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000017091fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017092rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17093LIBS=$ac_check_lib_save_LIBS
17094fi
17095echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
17096echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
17097if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017098
Martin v. Löwis11437992002-04-12 09:54:03 +000017099cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017100#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017101_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017102
Martin v. Löwis0daad592001-09-30 21:09:59 +000017103fi
17104
Michael W. Hudson54241132001-12-07 15:38:26 +000017105
Martin v. Löwis0daad592001-09-30 21:09:59 +000017106# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000017107echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
17108echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
17109if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
17110 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000017111else
Martin v. Löwis11437992002-04-12 09:54:03 +000017112 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000017113LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017114cat >conftest.$ac_ext <<_ACEOF
17115#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000017116#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000017117
Martin v. Löwis0daad592001-09-30 21:09:59 +000017118/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017119#ifdef __cplusplus
17120extern "C"
17121#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000017122/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017123 builtin and then its argument prototype would still apply. */
17124char rl_completion_matches ();
Barry Warsawfe33b792003-01-07 22:42:49 +000017125#ifdef F77_DUMMY_MAIN
17126# ifdef __cplusplus
17127 extern "C"
17128# endif
17129 int F77_DUMMY_MAIN() { return 1; }
17130#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017131int
17132main ()
17133{
17134rl_completion_matches ();
17135 ;
17136 return 0;
17137}
17138_ACEOF
17139rm -f conftest.$ac_objext conftest$ac_exeext
17140if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17141 (eval $ac_link) 2>&5
17142 ac_status=$?
17143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17144 (exit $ac_status); } &&
17145 { ac_try='test -s conftest$ac_exeext'
17146 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17147 (eval $ac_try) 2>&5
17148 ac_status=$?
17149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17150 (exit $ac_status); }; }; then
17151 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000017152else
Martin v. Löwis11437992002-04-12 09:54:03 +000017153 echo "$as_me: failed program was:" >&5
17154cat conftest.$ac_ext >&5
17155ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000017156fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017157rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17158LIBS=$ac_check_lib_save_LIBS
17159fi
17160echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
17161echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
17162if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017163
Martin v. Löwis11437992002-04-12 09:54:03 +000017164cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017165#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017166_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017167
Guido van Rossum353ae582001-07-10 16:45:32 +000017168fi
17169
Jack Jansendd19cf82001-12-06 22:36:17 +000017170
Martin v. Löwis11437992002-04-12 09:54:03 +000017171echo "$as_me:$LINENO: checking for broken nice()" >&5
17172echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
17173if test "${ac_cv_broken_nice+set}" = set; then
17174 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017175else
Martin v. Löwis11437992002-04-12 09:54:03 +000017176
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017177if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017178 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017179else
Martin v. Löwis11437992002-04-12 09:54:03 +000017180 cat >conftest.$ac_ext <<_ACEOF
17181#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017182#include "confdefs.h"
17183
17184int main()
17185{
17186 int val1 = nice(1);
17187 if (val1 != -1 && val1 == nice(2))
17188 exit(0);
17189 exit(1);
17190}
17191
Martin v. Löwis11437992002-04-12 09:54:03 +000017192_ACEOF
17193rm -f conftest$ac_exeext
17194if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17195 (eval $ac_link) 2>&5
17196 ac_status=$?
17197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17198 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17200 (eval $ac_try) 2>&5
17201 ac_status=$?
17202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17203 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017204 ac_cv_broken_nice=yes
17205else
Martin v. Löwis11437992002-04-12 09:54:03 +000017206 echo "$as_me: program exited with status $ac_status" >&5
17207echo "$as_me: failed program was:" >&5
17208cat conftest.$ac_ext >&5
17209( exit $ac_status )
17210ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017211fi
Barry Warsawfe33b792003-01-07 22:42:49 +000017212rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017213fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017214fi
17215
Martin v. Löwis11437992002-04-12 09:54:03 +000017216echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
17217echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017218if test "$ac_cv_broken_nice" = yes
17219then
Martin v. Löwis11437992002-04-12 09:54:03 +000017220
17221cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017222#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017223_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017224
17225fi
17226
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017227# tzset(3) exists and works like we expect it to
17228echo "$as_me:$LINENO: checking for working tzset()" >&5
17229echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
17230if test "${ac_cv_working_tzset+set}" = set; then
17231 echo $ECHO_N "(cached) $ECHO_C" >&6
17232else
17233
17234if test "$cross_compiling" = yes; then
17235 ac_cv_working_tzset=no
17236else
17237 cat >conftest.$ac_ext <<_ACEOF
17238#line $LINENO "configure"
17239#include "confdefs.h"
17240
17241#include <stdlib.h>
17242#include <time.h>
17243int main()
17244{
17245 int gmt_hour;
17246 int eastern_hour;
17247 time_t now;
17248 now = time((time_t*)NULL);
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017249 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017250 tzset();
17251 gmt_hour = localtime(&now)->tm_hour;
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017252 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017253 tzset();
17254 eastern_hour = localtime(&now)->tm_hour;
17255 if (eastern_hour == gmt_hour)
17256 exit(1);
17257 exit(0);
17258}
17259
17260_ACEOF
17261rm -f conftest$ac_exeext
17262if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17263 (eval $ac_link) 2>&5
17264 ac_status=$?
17265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17266 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17268 (eval $ac_try) 2>&5
17269 ac_status=$?
17270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17271 (exit $ac_status); }; }; then
17272 ac_cv_working_tzset=yes
17273else
17274 echo "$as_me: program exited with status $ac_status" >&5
17275echo "$as_me: failed program was:" >&5
17276cat conftest.$ac_ext >&5
17277( exit $ac_status )
17278ac_cv_working_tzset=no
17279fi
17280rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17281fi
17282fi
17283
17284echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
17285echo "${ECHO_T}$ac_cv_working_tzset" >&6
17286if test "$ac_cv_working_tzset" = yes
17287then
17288
17289cat >>confdefs.h <<\_ACEOF
17290#define HAVE_WORKING_TZSET 1
17291_ACEOF
17292
17293fi
17294
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017295# Look for subsecond timestamps in struct stat
17296echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
17297echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
17298if test "${ac_cv_stat_tv_nsec+set}" = set; then
17299 echo $ECHO_N "(cached) $ECHO_C" >&6
17300else
17301 cat >conftest.$ac_ext <<_ACEOF
17302#line $LINENO "configure"
17303#include "confdefs.h"
17304#include <sys/stat.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000017305#ifdef F77_DUMMY_MAIN
17306# ifdef __cplusplus
17307 extern "C"
17308# endif
17309 int F77_DUMMY_MAIN() { return 1; }
17310#endif
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017311int
17312main ()
17313{
17314
17315struct stat st;
17316st.st_mtim.tv_nsec = 1;
17317
17318 ;
17319 return 0;
17320}
17321_ACEOF
17322rm -f conftest.$ac_objext
17323if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17324 (eval $ac_compile) 2>&5
17325 ac_status=$?
17326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17327 (exit $ac_status); } &&
17328 { ac_try='test -s conftest.$ac_objext'
17329 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17330 (eval $ac_try) 2>&5
17331 ac_status=$?
17332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17333 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000017334 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017335else
17336 echo "$as_me: failed program was:" >&5
17337cat conftest.$ac_ext >&5
17338ac_cv_stat_tv_nsec=no
17339fi
17340rm -f conftest.$ac_objext conftest.$ac_ext
17341fi
17342
17343echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
17344echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
17345if test "$ac_cv_stat_tv_nsec" = yes
17346then
17347
17348cat >>confdefs.h <<\_ACEOF
17349#define HAVE_STAT_TV_NSEC 1
17350_ACEOF
17351
17352fi
17353
Jack Jansen666b1e72001-10-31 12:11:48 +000017354# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000017355echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
17356echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
17357if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
17358 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017359else
Martin v. Löwis11437992002-04-12 09:54:03 +000017360 cat >conftest.$ac_ext <<_ACEOF
17361#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000017362#include "confdefs.h"
17363#include <curses.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000017364#ifdef F77_DUMMY_MAIN
17365# ifdef __cplusplus
17366 extern "C"
17367# endif
17368 int F77_DUMMY_MAIN() { return 1; }
17369#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017370int
17371main ()
17372{
Jack Jansen666b1e72001-10-31 12:11:48 +000017373
17374 int rtn;
17375 rtn = mvwdelch(0,0,0);
17376
Martin v. Löwis11437992002-04-12 09:54:03 +000017377 ;
17378 return 0;
17379}
17380_ACEOF
17381rm -f conftest.$ac_objext
17382if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17383 (eval $ac_compile) 2>&5
17384 ac_status=$?
17385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17386 (exit $ac_status); } &&
17387 { ac_try='test -s conftest.$ac_objext'
17388 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17389 (eval $ac_try) 2>&5
17390 ac_status=$?
17391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17392 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017393 ac_cv_mvwdelch_is_expression=yes
17394else
Martin v. Löwis11437992002-04-12 09:54:03 +000017395 echo "$as_me: failed program was:" >&5
17396cat conftest.$ac_ext >&5
17397ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017398fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017399rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017400fi
17401
Martin v. Löwis11437992002-04-12 09:54:03 +000017402echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
17403echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017404
17405if test "$ac_cv_mvwdelch_is_expression" = yes
17406then
Martin v. Löwis11437992002-04-12 09:54:03 +000017407
17408cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017409#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017410_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017411
17412fi
17413
Martin v. Löwis11437992002-04-12 09:54:03 +000017414echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
17415echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
17416if test "${ac_cv_window_has_flags+set}" = set; then
17417 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017418else
Martin v. Löwis11437992002-04-12 09:54:03 +000017419 cat >conftest.$ac_ext <<_ACEOF
17420#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000017421#include "confdefs.h"
17422#include <curses.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000017423#ifdef F77_DUMMY_MAIN
17424# ifdef __cplusplus
17425 extern "C"
17426# endif
17427 int F77_DUMMY_MAIN() { return 1; }
17428#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017429int
17430main ()
17431{
Jack Jansen666b1e72001-10-31 12:11:48 +000017432
17433 WINDOW *w;
17434 w->_flags = 0;
17435
Martin v. Löwis11437992002-04-12 09:54:03 +000017436 ;
17437 return 0;
17438}
17439_ACEOF
17440rm -f conftest.$ac_objext
17441if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17442 (eval $ac_compile) 2>&5
17443 ac_status=$?
17444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17445 (exit $ac_status); } &&
17446 { ac_try='test -s conftest.$ac_objext'
17447 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17448 (eval $ac_try) 2>&5
17449 ac_status=$?
17450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17451 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017452 ac_cv_window_has_flags=yes
17453else
Martin v. Löwis11437992002-04-12 09:54:03 +000017454 echo "$as_me: failed program was:" >&5
17455cat conftest.$ac_ext >&5
17456ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017457fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017458rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017459fi
17460
Martin v. Löwis11437992002-04-12 09:54:03 +000017461echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
17462echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017463
Jack Jansen666b1e72001-10-31 12:11:48 +000017464
17465if test "$ac_cv_window_has_flags" = yes
17466then
Martin v. Löwis11437992002-04-12 09:54:03 +000017467
17468cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017469#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017470_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017471
17472fi
17473
Martin v. Löwis24a880b2002-12-31 12:55:15 +000017474echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
17475echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
17476
17477if test -e /dev/ptmx
17478then
17479 echo "$as_me:$LINENO: result: yes" >&5
17480echo "${ECHO_T}yes" >&6
17481
17482cat >>confdefs.h <<\_ACEOF
17483#define HAVE_DEV_PTMX 1
17484_ACEOF
17485
17486else
17487 echo "$as_me:$LINENO: result: no" >&5
17488echo "${ECHO_T}no" >&6
17489fi
17490
Neal Norwitz865400f2003-03-21 01:42:58 +000017491echo "$as_me:$LINENO: checking for /dev/ptc" >&5
17492echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
17493
17494if test -e /dev/ptc
17495then
17496 echo "$as_me:$LINENO: result: yes" >&5
17497echo "${ECHO_T}yes" >&6
17498
17499cat >>confdefs.h <<\_ACEOF
17500#define HAVE_DEV_PTC 1
17501_ACEOF
17502
17503else
17504 echo "$as_me:$LINENO: result: no" >&5
17505echo "${ECHO_T}no" >&6
17506fi
17507
Martin v. Löwis11437992002-04-12 09:54:03 +000017508echo "$as_me:$LINENO: checking for socklen_t" >&5
17509echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
17510if test "${ac_cv_type_socklen_t+set}" = set; then
17511 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000017512else
Martin v. Löwis11437992002-04-12 09:54:03 +000017513 cat >conftest.$ac_ext <<_ACEOF
17514#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000017515#include "confdefs.h"
Martin v. Löwis01c04012002-11-11 14:58:44 +000017516
17517#ifdef HAVE_SYS_TYPES_H
17518#include <sys/types.h>
17519#endif
17520#ifdef HAVE_SYS_SOCKET_H
17521#include <sys/socket.h>
17522#endif
17523
17524
Barry Warsawfe33b792003-01-07 22:42:49 +000017525#ifdef F77_DUMMY_MAIN
17526# ifdef __cplusplus
17527 extern "C"
17528# endif
17529 int F77_DUMMY_MAIN() { return 1; }
17530#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017531int
17532main ()
17533{
17534if ((socklen_t *) 0)
17535 return 0;
17536if (sizeof (socklen_t))
17537 return 0;
17538 ;
17539 return 0;
17540}
17541_ACEOF
17542rm -f conftest.$ac_objext
17543if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17544 (eval $ac_compile) 2>&5
17545 ac_status=$?
17546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17547 (exit $ac_status); } &&
17548 { ac_try='test -s conftest.$ac_objext'
17549 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17550 (eval $ac_try) 2>&5
17551 ac_status=$?
17552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17553 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000017554 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000017555else
Martin v. Löwis11437992002-04-12 09:54:03 +000017556 echo "$as_me: failed program was:" >&5
17557cat conftest.$ac_ext >&5
17558ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000017559fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017560rm -f conftest.$ac_objext conftest.$ac_ext
17561fi
17562echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
17563echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
17564if test $ac_cv_type_socklen_t = yes; then
17565 :
17566else
Guido van Rossum95713eb2000-05-18 20:53:31 +000017567
Martin v. Löwis01c04012002-11-11 14:58:44 +000017568cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017569#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000017570_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017571
17572fi
17573
Michael W. Hudson54241132001-12-07 15:38:26 +000017574
Michael W. Hudson54241132001-12-07 15:38:26 +000017575
17576
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000017577for h in `(cd $srcdir;echo Python/thread_*.h)`
17578do
17579 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
17580done
17581
Michael W. Hudson54241132001-12-07 15:38:26 +000017582
Jack Jansen0b06be72002-06-21 14:48:38 +000017583SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000017584echo "$as_me:$LINENO: checking for build directories" >&5
17585echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017586for dir in $SRCDIRS; do
17587 if test ! -d $dir; then
17588 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000017589 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017590done
Martin v. Löwis11437992002-04-12 09:54:03 +000017591echo "$as_me:$LINENO: result: done" >&5
17592echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000017593
Guido van Rossum627b2d71993-12-24 10:39:16 +000017594# generate output files
Barry Warsawfe33b792003-01-07 22:42:49 +000017595ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017596
Martin v. Löwis11437992002-04-12 09:54:03 +000017597cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017598# This file is a shell script that caches the results of configure
17599# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017600# scripts and configure runs, see configure's option --config-cache.
17601# It is not useful on other systems. If it contains results you don't
17602# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017603#
Martin v. Löwis11437992002-04-12 09:54:03 +000017604# config.status only pays attention to the cache file if you give it
17605# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017606#
Barry Warsawfe33b792003-01-07 22:42:49 +000017607# `ac_cv_env_foo' variables (set or unset) will be overriden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017608# loading this file, other *unset* `ac_cv_foo' will be assigned the
17609# following values.
17610
17611_ACEOF
17612
Guido van Rossumf78abae1997-01-21 22:02:36 +000017613# The following way of writing the cache mishandles newlines in values,
17614# but we know of no workaround that is simple, portable, and efficient.
17615# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017616# Ultrix sh set writes to stderr and can't be redirected directly,
17617# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000017618{
17619 (set) 2>&1 |
17620 case `(ac_space=' '; set | grep ac_space) 2>&1` in
17621 *ac_space=\ *)
17622 # `set' does not quote correctly, so add quotes (double-quote
17623 # substitution turns \\\\ into \\, and sed turns \\ into \).
17624 sed -n \
17625 "s/'/'\\\\''/g;
17626 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17627 ;;
17628 *)
17629 # `set' quotes correctly as required by POSIX, so do not add quotes.
17630 sed -n \
17631 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17632 ;;
17633 esac;
17634} |
17635 sed '
17636 t clear
17637 : clear
17638 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17639 t end
17640 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17641 : end' >>confcache
17642if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017643 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017644 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17645 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017646 else
17647 echo "not updating unwritable cache $cache_file"
17648 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017649fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017650rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017651
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017652test "x$prefix" = xNONE && prefix=$ac_default_prefix
17653# Let make expand exec_prefix.
17654test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017655
Martin v. Löwis11437992002-04-12 09:54:03 +000017656# VPATH may cause trouble with some makes, so we remove $(srcdir),
17657# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17658# trailing colons and then remove the whole line if VPATH becomes empty
17659# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000017660if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017661 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17662s/:*\$(srcdir):*/:/;
17663s/:*\${srcdir}:*/:/;
17664s/:*@srcdir@:*/:/;
17665s/^\([^=]*=[ ]*\):*/\1/;
17666s/:*$//;
17667s/^[^=]*=[ ]*$//;
17668}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017669fi
17670
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017671DEFS=-DHAVE_CONFIG_H
17672
Martin v. Löwis11437992002-04-12 09:54:03 +000017673
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017674: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000017675ac_clean_files_save=$ac_clean_files
17676ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17677{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
17678echo "$as_me: creating $CONFIG_STATUS" >&6;}
17679cat >$CONFIG_STATUS <<_ACEOF
17680#! $SHELL
17681# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017682# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017683# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017684# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017685
Martin v. Löwis11437992002-04-12 09:54:03 +000017686debug=false
17687SHELL=\${CONFIG_SHELL-$SHELL}
17688_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000017689
Martin v. Löwis11437992002-04-12 09:54:03 +000017690cat >>$CONFIG_STATUS <<\_ACEOF
Barry Warsawfe33b792003-01-07 22:42:49 +000017691
Martin v. Löwis11437992002-04-12 09:54:03 +000017692## --------------------- ##
17693## M4sh Initialization. ##
17694## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017695
Martin v. Löwis11437992002-04-12 09:54:03 +000017696# Be Bourne compatible
17697if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17698 emulate sh
17699 NULLCMD=:
17700elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17701 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000017702fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017703
Barry Warsawfe33b792003-01-07 22:42:49 +000017704# NLS nuisances.
Martin v. Löwis11437992002-04-12 09:54:03 +000017705# Support unset when possible.
17706if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17707 as_unset=unset
17708else
17709 as_unset=false
17710fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017711
Barry Warsawfe33b792003-01-07 22:42:49 +000017712(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
17713 { $as_unset LANG || test "${LANG+set}" != set; } ||
17714 { LANG=C; export LANG; }
17715(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
17716 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
17717 { LC_ALL=C; export LC_ALL; }
17718(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
17719 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
17720 { LC_TIME=C; export LC_TIME; }
17721(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
17722 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
17723 { LC_CTYPE=C; export LC_CTYPE; }
17724(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
17725 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
17726 { LANGUAGE=C; export LANGUAGE; }
17727(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
17728 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
17729 { LC_COLLATE=C; export LC_COLLATE; }
17730(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
17731 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
17732 { LC_NUMERIC=C; export LC_NUMERIC; }
17733(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
17734 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
17735 { LC_MESSAGES=C; export LC_MESSAGES; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017736
17737
17738# Name of the executable.
Barry Warsawfe33b792003-01-07 22:42:49 +000017739as_me=`(basename "$0") 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017740$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17741 X"$0" : 'X\(//\)$' \| \
17742 X"$0" : 'X\(/\)$' \| \
17743 . : '\(.\)' 2>/dev/null ||
17744echo X/"$0" |
17745 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
17746 /^X\/\(\/\/\)$/{ s//\1/; q; }
17747 /^X\/\(\/\).*/{ s//\1/; q; }
17748 s/.*/./; q'`
17749
17750# PATH needs CR, and LINENO needs CR and PATH.
17751# Avoid depending upon Character Ranges.
17752as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17753as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17754as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17755as_cr_digits='0123456789'
17756as_cr_alnum=$as_cr_Letters$as_cr_digits
17757
17758# The user is always right.
17759if test "${PATH_SEPARATOR+set}" != set; then
17760 echo "#! /bin/sh" >conftest.sh
17761 echo "exit 0" >>conftest.sh
17762 chmod +x conftest.sh
Barry Warsawfe33b792003-01-07 22:42:49 +000017763 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017764 PATH_SEPARATOR=';'
17765 else
17766 PATH_SEPARATOR=:
17767 fi
17768 rm -f conftest.sh
17769fi
17770
17771
17772 as_lineno_1=$LINENO
17773 as_lineno_2=$LINENO
17774 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17775 test "x$as_lineno_1" != "x$as_lineno_2" &&
17776 test "x$as_lineno_3" = "x$as_lineno_2" || {
17777 # Find who we are. Look in the path if we contain no path at all
17778 # relative or not.
17779 case $0 in
17780 *[\\/]* ) as_myself=$0 ;;
17781 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17782for as_dir in $PATH
17783do
17784 IFS=$as_save_IFS
17785 test -z "$as_dir" && as_dir=.
17786 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17787done
17788
17789 ;;
17790 esac
17791 # We did not find ourselves, most probably we were run as `sh COMMAND'
17792 # in which case we are not to be found in the path.
17793 if test "x$as_myself" = x; then
17794 as_myself=$0
17795 fi
17796 if test ! -f "$as_myself"; then
17797 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
17798echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
17799 { (exit 1); exit 1; }; }
17800 fi
17801 case $CONFIG_SHELL in
17802 '')
17803 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17804for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
17805do
17806 IFS=$as_save_IFS
17807 test -z "$as_dir" && as_dir=.
17808 for as_base in sh bash ksh sh5; do
17809 case $as_dir in
17810 /*)
17811 if ("$as_dir/$as_base" -c '
17812 as_lineno_1=$LINENO
17813 as_lineno_2=$LINENO
17814 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17815 test "x$as_lineno_1" != "x$as_lineno_2" &&
17816 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
17817 CONFIG_SHELL=$as_dir/$as_base
17818 export CONFIG_SHELL
17819 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
17820 fi;;
17821 esac
17822 done
17823done
17824;;
Jack Jansendd19cf82001-12-06 22:36:17 +000017825 esac
17826
Martin v. Löwis11437992002-04-12 09:54:03 +000017827 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
17828 # uniformly replaced by the line number. The first 'sed' inserts a
17829 # line-number line before each line; the second 'sed' does the real
17830 # work. The second script uses 'N' to pair each line-number line
17831 # with the numbered line, and appends trailing '-' during
17832 # substitution so that $LINENO is not a special case at line end.
17833 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
17834 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
17835 sed '=' <$as_myself |
17836 sed '
17837 N
17838 s,$,-,
17839 : loop
17840 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
17841 t loop
17842 s,-$,,
17843 s,^['$as_cr_digits']*\n,,
17844 ' >$as_me.lineno &&
17845 chmod +x $as_me.lineno ||
17846 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
17847echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
17848 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017849
Martin v. Löwis11437992002-04-12 09:54:03 +000017850 # Don't try to exec as it changes $[0], causing all sort of problems
17851 # (the dirname of $[0] is not the place where we might find the
17852 # original and so on. Autoconf is especially sensible to this).
17853 . ./$as_me.lineno
17854 # Exit status is that of the last command.
17855 exit
17856}
17857
17858
17859case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
17860 *c*,-n*) ECHO_N= ECHO_C='
17861' ECHO_T=' ' ;;
17862 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
17863 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
17864esac
17865
17866if expr a : '\(a\)' >/dev/null 2>&1; then
17867 as_expr=expr
17868else
17869 as_expr=false
17870fi
17871
17872rm -f conf$$ conf$$.exe conf$$.file
17873echo >conf$$.file
17874if ln -s conf$$.file conf$$ 2>/dev/null; then
17875 # We could just check for DJGPP; but this test a) works b) is more generic
17876 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17877 if test -f conf$$.exe; then
17878 # Don't use ln at all; we don't have any links
17879 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017880 else
Martin v. Löwis11437992002-04-12 09:54:03 +000017881 as_ln_s='ln -s'
17882 fi
17883elif ln conf$$.file conf$$ 2>/dev/null; then
17884 as_ln_s=ln
17885else
17886 as_ln_s='cp -p'
17887fi
17888rm -f conf$$ conf$$.exe conf$$.file
17889
17890as_executable_p="test -f"
17891
17892# Sed expression to map a string onto a valid CPP name.
17893as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
17894
17895# Sed expression to map a string onto a valid variable name.
17896as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
17897
17898
17899# IFS
17900# We need space, tab and new line, in precisely that order.
17901as_nl='
17902'
17903IFS=" $as_nl"
17904
17905# CDPATH.
Barry Warsawfe33b792003-01-07 22:42:49 +000017906$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017907
17908exec 6>&1
17909
17910# Open the log real soon, to keep \$[0] and so on meaningful, and to
17911# report actual input values of CONFIG_FILES etc. instead of their
17912# values after options handling. Logging --version etc. is OK.
17913exec 5>>config.log
17914{
17915 echo
17916 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17917## Running $as_me. ##
17918_ASBOX
17919} >&5
17920cat >&5 <<_CSEOF
17921
Martin v. Löwis88afe662002-10-26 13:47:44 +000017922This file was extended by python $as_me 2.3, which was
Barry Warsawfe33b792003-01-07 22:42:49 +000017923generated by GNU Autoconf 2.53. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017924
17925 CONFIG_FILES = $CONFIG_FILES
17926 CONFIG_HEADERS = $CONFIG_HEADERS
17927 CONFIG_LINKS = $CONFIG_LINKS
17928 CONFIG_COMMANDS = $CONFIG_COMMANDS
17929 $ $0 $@
17930
17931_CSEOF
17932echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
17933echo >&5
17934_ACEOF
17935
17936# Files that config.status was made for.
17937if test -n "$ac_config_files"; then
17938 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17939fi
17940
17941if test -n "$ac_config_headers"; then
17942 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17943fi
17944
17945if test -n "$ac_config_links"; then
17946 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17947fi
17948
17949if test -n "$ac_config_commands"; then
17950 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17951fi
17952
17953cat >>$CONFIG_STATUS <<\_ACEOF
17954
17955ac_cs_usage="\
17956\`$as_me' instantiates files from templates according to the
17957current configuration.
17958
17959Usage: $0 [OPTIONS] [FILE]...
17960
17961 -h, --help print this help, then exit
17962 -V, --version print version number, then exit
17963 -d, --debug don't remove temporary files
17964 --recheck update $as_me by reconfiguring in the same conditions
17965 --file=FILE[:TEMPLATE]
17966 instantiate the configuration file FILE
17967 --header=FILE[:TEMPLATE]
17968 instantiate the configuration header FILE
17969
17970Configuration files:
17971$config_files
17972
17973Configuration headers:
17974$config_headers
17975
17976Report bugs to <bug-autoconf@gnu.org>."
17977_ACEOF
17978
17979cat >>$CONFIG_STATUS <<_ACEOF
17980ac_cs_version="\\
Martin v. Löwis88afe662002-10-26 13:47:44 +000017981python config.status 2.3
Barry Warsawfe33b792003-01-07 22:42:49 +000017982configured by $0, generated by GNU Autoconf 2.53,
Martin v. Löwis11437992002-04-12 09:54:03 +000017983 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17984
17985Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17986Free Software Foundation, Inc.
17987This config.status script is free software; the Free Software Foundation
17988gives unlimited permission to copy, distribute and modify it."
17989srcdir=$srcdir
17990INSTALL="$INSTALL"
17991_ACEOF
17992
17993cat >>$CONFIG_STATUS <<\_ACEOF
17994# If no file are specified by the user, then we need to provide default
17995# value. By we need to know if files were specified by the user.
17996ac_need_defaults=:
17997while test $# != 0
17998do
17999 case $1 in
18000 --*=*)
18001 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18002 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Barry Warsawfe33b792003-01-07 22:42:49 +000018003 shift
18004 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18005 shift
Martin v. Löwis11437992002-04-12 09:54:03 +000018006 ;;
Barry Warsawfe33b792003-01-07 22:42:49 +000018007 -*);;
Martin v. Löwis11437992002-04-12 09:54:03 +000018008 *) # This is not an option, so the user has probably given explicit
18009 # arguments.
18010 ac_need_defaults=false;;
18011 esac
18012
Barry Warsawfe33b792003-01-07 22:42:49 +000018013 case $1 in
Martin v. Löwis11437992002-04-12 09:54:03 +000018014 # Handling of the options.
18015_ACEOF
18016cat >>$CONFIG_STATUS <<_ACEOF
18017 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18018 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18019 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18020_ACEOF
18021cat >>$CONFIG_STATUS <<\_ACEOF
18022 --version | --vers* | -V )
18023 echo "$ac_cs_version"; exit 0 ;;
18024 --he | --h)
18025 # Conflict between --help and --header
18026 { { echo "$as_me:$LINENO: error: ambiguous option: $1
18027Try \`$0 --help' for more information." >&5
18028echo "$as_me: error: ambiguous option: $1
18029Try \`$0 --help' for more information." >&2;}
18030 { (exit 1); exit 1; }; };;
18031 --help | --hel | -h )
18032 echo "$ac_cs_usage"; exit 0 ;;
18033 --debug | --d* | -d )
18034 debug=: ;;
18035 --file | --fil | --fi | --f )
Barry Warsawfe33b792003-01-07 22:42:49 +000018036 shift
18037 CONFIG_FILES="$CONFIG_FILES $1"
Martin v. Löwis11437992002-04-12 09:54:03 +000018038 ac_need_defaults=false;;
18039 --header | --heade | --head | --hea )
Barry Warsawfe33b792003-01-07 22:42:49 +000018040 shift
18041 CONFIG_HEADERS="$CONFIG_HEADERS $1"
Martin v. Löwis11437992002-04-12 09:54:03 +000018042 ac_need_defaults=false;;
18043
18044 # This is an error.
18045 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
18046Try \`$0 --help' for more information." >&5
18047echo "$as_me: error: unrecognized option: $1
18048Try \`$0 --help' for more information." >&2;}
18049 { (exit 1); exit 1; }; } ;;
18050
18051 *) ac_config_targets="$ac_config_targets $1" ;;
18052
18053 esac
18054 shift
18055done
18056
18057_ACEOF
18058
18059
18060
18061
18062
18063cat >>$CONFIG_STATUS <<\_ACEOF
18064for ac_config_target in $ac_config_targets
18065do
18066 case "$ac_config_target" in
18067 # Handling of arguments.
18068 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
18069 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
18070 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18071 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
18072echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18073 { (exit 1); exit 1; }; };;
18074 esac
18075done
18076
18077# If the user did not use the arguments to specify the items to instantiate,
18078# then the envvar interface is used. Set only those that are not.
18079# We use the long form for the default assignment because of an extremely
18080# bizarre bug on SunOS 4.1.3.
18081if $ac_need_defaults; then
18082 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18083 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18084fi
18085
18086# Create a temporary directory, and hook for its removal unless debugging.
18087$debug ||
18088{
18089 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18090 trap '{ (exit 1); exit 1; }' 1 2 13 15
18091}
18092
18093# Create a (secure) tmp directory for tmp files.
18094: ${TMPDIR=/tmp}
18095{
18096 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18097 test -n "$tmp" && test -d "$tmp"
18098} ||
18099{
18100 tmp=$TMPDIR/cs$$-$RANDOM
18101 (umask 077 && mkdir $tmp)
18102} ||
18103{
18104 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18105 { (exit 1); exit 1; }
18106}
18107
18108_ACEOF
18109
18110cat >>$CONFIG_STATUS <<_ACEOF
18111
18112#
18113# CONFIG_FILES section.
18114#
18115
18116# No need to generate the scripts if there are no CONFIG_FILES.
18117# This happens for instance when ./config.status config.h
18118if test -n "\$CONFIG_FILES"; then
18119 # Protect against being on the right side of a sed subst in config.status.
18120 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18121 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18122s,@SHELL@,$SHELL,;t t
18123s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18124s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18125s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18126s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18127s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18128s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18129s,@exec_prefix@,$exec_prefix,;t t
18130s,@prefix@,$prefix,;t t
18131s,@program_transform_name@,$program_transform_name,;t t
18132s,@bindir@,$bindir,;t t
18133s,@sbindir@,$sbindir,;t t
18134s,@libexecdir@,$libexecdir,;t t
18135s,@datadir@,$datadir,;t t
18136s,@sysconfdir@,$sysconfdir,;t t
18137s,@sharedstatedir@,$sharedstatedir,;t t
18138s,@localstatedir@,$localstatedir,;t t
18139s,@libdir@,$libdir,;t t
18140s,@includedir@,$includedir,;t t
18141s,@oldincludedir@,$oldincludedir,;t t
18142s,@infodir@,$infodir,;t t
18143s,@mandir@,$mandir,;t t
18144s,@build_alias@,$build_alias,;t t
18145s,@host_alias@,$host_alias,;t t
18146s,@target_alias@,$target_alias,;t t
18147s,@DEFS@,$DEFS,;t t
18148s,@ECHO_C@,$ECHO_C,;t t
18149s,@ECHO_N@,$ECHO_N,;t t
18150s,@ECHO_T@,$ECHO_T,;t t
18151s,@LIBS@,$LIBS,;t t
18152s,@VERSION@,$VERSION,;t t
18153s,@SOVERSION@,$SOVERSION,;t t
18154s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
18155s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
18156s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
18157s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
18158s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
18159s,@MACHDEP@,$MACHDEP,;t t
18160s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000018161s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000018162s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018163s,@CXX@,$CXX,;t t
18164s,@MAINOBJ@,$MAINOBJ,;t t
18165s,@EXEEXT@,$EXEEXT,;t t
18166s,@CC@,$CC,;t t
18167s,@CFLAGS@,$CFLAGS,;t t
18168s,@LDFLAGS@,$LDFLAGS,;t t
18169s,@CPPFLAGS@,$CPPFLAGS,;t t
18170s,@ac_ct_CC@,$ac_ct_CC,;t t
18171s,@OBJEXT@,$OBJEXT,;t t
18172s,@CPP@,$CPP,;t t
18173s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
18174s,@LIBRARY@,$LIBRARY,;t t
18175s,@LDLIBRARY@,$LDLIBRARY,;t t
18176s,@DLLLIBRARY@,$DLLLIBRARY,;t t
18177s,@BLDLIBRARY@,$BLDLIBRARY,;t t
18178s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
18179s,@INSTSONAME@,$INSTSONAME,;t t
18180s,@RUNSHARED@,$RUNSHARED,;t t
18181s,@LINKCC@,$LINKCC,;t t
18182s,@RANLIB@,$RANLIB,;t t
18183s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18184s,@AR@,$AR,;t t
18185s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18186s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18187s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18188s,@LN@,$LN,;t t
18189s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000018190s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018191s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
18192s,@SO@,$SO,;t t
18193s,@LDSHARED@,$LDSHARED,;t t
18194s,@BLDSHARED@,$BLDSHARED,;t t
18195s,@CCSHARED@,$CCSHARED,;t t
18196s,@LINKFORSHARED@,$LINKFORSHARED,;t t
18197s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018198s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018199s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
18200s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
18201s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
18202s,@LDLAST@,$LDLAST,;t t
18203s,@THREADOBJ@,$THREADOBJ,;t t
18204s,@DLINCLDIR@,$DLINCLDIR,;t t
18205s,@DYNLOADFILE@,$DYNLOADFILE,;t t
18206s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018207s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018208s,@LIBOBJS@,$LIBOBJS,;t t
18209s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
18210s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
18211s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
18212s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
18213s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
18214s,@LIBM@,$LIBM,;t t
18215s,@LIBC@,$LIBC,;t t
18216s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
18217s,@THREADHEADERS@,$THREADHEADERS,;t t
18218s,@SRCDIRS@,$SRCDIRS,;t t
18219CEOF
18220
18221_ACEOF
18222
18223 cat >>$CONFIG_STATUS <<\_ACEOF
18224 # Split the substitutions into bite-sized pieces for seds with
18225 # small command number limits, like on Digital OSF/1 and HP-UX.
18226 ac_max_sed_lines=48
18227 ac_sed_frag=1 # Number of current file.
18228 ac_beg=1 # First line for current file.
18229 ac_end=$ac_max_sed_lines # Line after last line for current file.
18230 ac_more_lines=:
18231 ac_sed_cmds=
18232 while $ac_more_lines; do
18233 if test $ac_beg -gt 1; then
18234 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18235 else
18236 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18237 fi
18238 if test ! -s $tmp/subs.frag; then
18239 ac_more_lines=false
18240 else
18241 # The purpose of the label and of the branching condition is to
18242 # speed up the sed processing (if there are no `@' at all, there
18243 # is no need to browse any of the substitutions).
18244 # These are the two extra sed commands mentioned above.
18245 (echo ':t
18246 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18247 if test -z "$ac_sed_cmds"; then
18248 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18249 else
18250 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18251 fi
18252 ac_sed_frag=`expr $ac_sed_frag + 1`
18253 ac_beg=$ac_end
18254 ac_end=`expr $ac_end + $ac_max_sed_lines`
18255 fi
18256 done
18257 if test -z "$ac_sed_cmds"; then
18258 ac_sed_cmds=cat
18259 fi
18260fi # test -n "$CONFIG_FILES"
18261
18262_ACEOF
18263cat >>$CONFIG_STATUS <<\_ACEOF
18264for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18265 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18266 case $ac_file in
18267 - | *:- | *:-:* ) # input from stdin
18268 cat >$tmp/stdin
18269 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18270 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18271 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18272 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18273 * ) ac_file_in=$ac_file.in ;;
18274 esac
18275
18276 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18277 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18278$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18279 X"$ac_file" : 'X\(//\)[^/]' \| \
18280 X"$ac_file" : 'X\(//\)$' \| \
18281 X"$ac_file" : 'X\(/\)' \| \
18282 . : '\(.\)' 2>/dev/null ||
18283echo X"$ac_file" |
18284 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18285 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18286 /^X\(\/\/\)$/{ s//\1/; q; }
18287 /^X\(\/\).*/{ s//\1/; q; }
18288 s/.*/./; q'`
Barry Warsawfe33b792003-01-07 22:42:49 +000018289 { case "$ac_dir" in
18290 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18291 *) as_incr_dir=.;;
18292esac
18293as_dummy="$ac_dir"
18294for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18295 case $as_mkdir_dir in
18296 # Skip DOS drivespec
18297 ?:) as_incr_dir=$as_mkdir_dir ;;
18298 *)
18299 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18300 test -d "$as_incr_dir" ||
18301 mkdir "$as_incr_dir" ||
18302 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18303echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18304 { (exit 1); exit 1; }; }
18305 ;;
18306 esac
18307done; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018308
18309 ac_builddir=.
18310
18311if test "$ac_dir" != .; then
18312 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18313 # A "../" for each directory in $ac_dir_suffix.
18314 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18315else
18316 ac_dir_suffix= ac_top_builddir=
18317fi
18318
18319case $srcdir in
18320 .) # No --srcdir option. We are building in place.
18321 ac_srcdir=.
18322 if test -z "$ac_top_builddir"; then
18323 ac_top_srcdir=.
18324 else
18325 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18326 fi ;;
18327 [\\/]* | ?:[\\/]* ) # Absolute path.
18328 ac_srcdir=$srcdir$ac_dir_suffix;
18329 ac_top_srcdir=$srcdir ;;
18330 *) # Relative path.
18331 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18332 ac_top_srcdir=$ac_top_builddir$srcdir ;;
18333esac
18334# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18335# absolute.
18336ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwis858f8172003-05-24 12:35:47 +000018337ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000018338ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18339ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18340
18341
18342 case $INSTALL in
18343 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18344 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
18345 esac
18346
18347 if test x"$ac_file" != x-; then
18348 { echo "$as_me:$LINENO: creating $ac_file" >&5
18349echo "$as_me: creating $ac_file" >&6;}
18350 rm -f "$ac_file"
18351 fi
18352 # Let's still pretend it is `configure' which instantiates (i.e., don't
18353 # use $as_me), people would be surprised to read:
18354 # /* config.h. Generated by config.status. */
18355 if test x"$ac_file" = x-; then
18356 configure_input=
18357 else
18358 configure_input="$ac_file. "
18359 fi
18360 configure_input=$configure_input"Generated from `echo $ac_file_in |
18361 sed 's,.*/,,'` by configure."
18362
18363 # First look for the input files in the build tree, otherwise in the
18364 # src tree.
18365 ac_file_inputs=`IFS=:
18366 for f in $ac_file_in; do
18367 case $f in
18368 -) echo $tmp/stdin ;;
18369 [\\/$]*)
18370 # Absolute (can't be DOS-style, as IFS=:)
18371 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18372echo "$as_me: error: cannot find input file: $f" >&2;}
18373 { (exit 1); exit 1; }; }
18374 echo $f;;
18375 *) # Relative
18376 if test -f "$f"; then
18377 # Build tree
18378 echo $f
18379 elif test -f "$srcdir/$f"; then
18380 # Source tree
18381 echo $srcdir/$f
18382 else
18383 # /dev/null tree
18384 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18385echo "$as_me: error: cannot find input file: $f" >&2;}
18386 { (exit 1); exit 1; }; }
18387 fi;;
18388 esac
18389 done` || { (exit 1); exit 1; }
18390_ACEOF
18391cat >>$CONFIG_STATUS <<_ACEOF
18392 sed "$ac_vpsub
18393$extrasub
18394_ACEOF
18395cat >>$CONFIG_STATUS <<\_ACEOF
18396:t
18397/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18398s,@configure_input@,$configure_input,;t t
18399s,@srcdir@,$ac_srcdir,;t t
18400s,@abs_srcdir@,$ac_abs_srcdir,;t t
18401s,@top_srcdir@,$ac_top_srcdir,;t t
18402s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18403s,@builddir@,$ac_builddir,;t t
18404s,@abs_builddir@,$ac_abs_builddir,;t t
18405s,@top_builddir@,$ac_top_builddir,;t t
18406s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
18407s,@INSTALL@,$ac_INSTALL,;t t
18408" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18409 rm -f $tmp/stdin
18410 if test x"$ac_file" != x-; then
18411 mv $tmp/out $ac_file
18412 else
18413 cat $tmp/out
18414 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018415 fi
18416
Martin v. Löwis11437992002-04-12 09:54:03 +000018417done
18418_ACEOF
18419cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018420
Martin v. Löwis11437992002-04-12 09:54:03 +000018421#
18422# CONFIG_HEADER section.
18423#
Guido van Rossum627b2d71993-12-24 10:39:16 +000018424
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018425# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18426# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000018427#
18428# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000018429ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18430ac_dB='[ ].*$,\1#\2'
18431ac_dC=' '
18432ac_dD=',;t'
18433# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18434ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18435ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018436ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000018437ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018438
Martin v. Löwis11437992002-04-12 09:54:03 +000018439for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000018440 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000018441 case $ac_file in
18442 - | *:- | *:-:* ) # input from stdin
18443 cat >$tmp/stdin
18444 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18445 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18446 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18447 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18448 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018449 esac
18450
Martin v. Löwis11437992002-04-12 09:54:03 +000018451 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
18452echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000018453
Martin v. Löwis11437992002-04-12 09:54:03 +000018454 # First look for the input files in the build tree, otherwise in the
18455 # src tree.
18456 ac_file_inputs=`IFS=:
18457 for f in $ac_file_in; do
18458 case $f in
18459 -) echo $tmp/stdin ;;
18460 [\\/$]*)
18461 # Absolute (can't be DOS-style, as IFS=:)
18462 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18463echo "$as_me: error: cannot find input file: $f" >&2;}
18464 { (exit 1); exit 1; }; }
18465 echo $f;;
18466 *) # Relative
18467 if test -f "$f"; then
18468 # Build tree
18469 echo $f
18470 elif test -f "$srcdir/$f"; then
18471 # Source tree
18472 echo $srcdir/$f
18473 else
18474 # /dev/null tree
18475 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18476echo "$as_me: error: cannot find input file: $f" >&2;}
18477 { (exit 1); exit 1; }; }
18478 fi;;
18479 esac
18480 done` || { (exit 1); exit 1; }
18481 # Remove the trailing spaces.
18482 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018483
Martin v. Löwis11437992002-04-12 09:54:03 +000018484_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018485
Martin v. Löwis11437992002-04-12 09:54:03 +000018486# Transform confdefs.h into two sed scripts, `conftest.defines' and
18487# `conftest.undefs', that substitutes the proper values into
18488# config.h.in to produce config.h. The first handles `#define'
18489# templates, and the second `#undef' templates.
18490# And first: Protect against being on the right side of a sed subst in
18491# config.status. Protect against being in an unquoted here document
18492# in config.status.
18493rm -f conftest.defines conftest.undefs
18494# Using a here document instead of a string reduces the quoting nightmare.
18495# Putting comments in sed scripts is not portable.
18496#
18497# `end' is used to avoid that the second main sed command (meant for
18498# 0-ary CPP macros) applies to n-ary macro definitions.
18499# See the Autoconf documentation for `clear'.
18500cat >confdef2sed.sed <<\_ACEOF
18501s/[\\&,]/\\&/g
18502s,[\\$`],\\&,g
18503t clear
18504: clear
18505s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
18506t end
18507s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
18508: end
18509_ACEOF
18510# If some macros were called several times there might be several times
18511# the same #defines, which is useless. Nevertheless, we may not want to
18512# sort them, since we want the *last* AC-DEFINE to be honored.
18513uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
18514sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
18515rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018516
18517# This sed command replaces #undef with comments. This is necessary, for
18518# example, in the case of _POSIX_SOURCE, which is predefined and required
18519# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000018520cat >>conftest.undefs <<\_ACEOF
18521s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
18522_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018523
Martin v. Löwis11437992002-04-12 09:54:03 +000018524# Break up conftest.defines because some shells have a limit on the size
18525# of here documents, and old seds have small limits too (100 cmds).
18526echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Barry Warsawfe33b792003-01-07 22:42:49 +000018527echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018528echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
18529echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018530rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000018531while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000018532do
Martin v. Löwis11437992002-04-12 09:54:03 +000018533 # Write a limited-size here document to $tmp/defines.sed.
18534 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
18535 # Speed up: don't consider the non `#define' lines.
18536 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
18537 # Work around the forget-to-reset-the-flag bug.
18538 echo 't clr' >>$CONFIG_STATUS
18539 echo ': clr' >>$CONFIG_STATUS
18540 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018541 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018542 sed -f $tmp/defines.sed $tmp/in >$tmp/out
18543 rm -f $tmp/in
18544 mv $tmp/out $tmp/in
18545' >>$CONFIG_STATUS
18546 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
18547 rm -f conftest.defines
18548 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000018549done
Martin v. Löwis11437992002-04-12 09:54:03 +000018550rm -f conftest.defines
Barry Warsawfe33b792003-01-07 22:42:49 +000018551echo ' fi # egrep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018552echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018553
Martin v. Löwis11437992002-04-12 09:54:03 +000018554# Break up conftest.undefs because some shells have a limit on the size
18555# of here documents, and old seds have small limits too (100 cmds).
18556echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
18557rm -f conftest.tail
18558while grep . conftest.undefs >/dev/null
18559do
18560 # Write a limited-size here document to $tmp/undefs.sed.
18561 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
18562 # Speed up: don't consider the non `#undef'
18563 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
18564 # Work around the forget-to-reset-the-flag bug.
18565 echo 't clr' >>$CONFIG_STATUS
18566 echo ': clr' >>$CONFIG_STATUS
18567 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
18568 echo 'CEOF
18569 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
18570 rm -f $tmp/in
18571 mv $tmp/out $tmp/in
18572' >>$CONFIG_STATUS
18573 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
18574 rm -f conftest.undefs
18575 mv conftest.tail conftest.undefs
18576done
18577rm -f conftest.undefs
18578
18579cat >>$CONFIG_STATUS <<\_ACEOF
18580 # Let's still pretend it is `configure' which instantiates (i.e., don't
18581 # use $as_me), people would be surprised to read:
18582 # /* config.h. Generated by config.status. */
18583 if test x"$ac_file" = x-; then
18584 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000018585 else
Martin v. Löwis11437992002-04-12 09:54:03 +000018586 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000018587 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018588 cat $tmp/in >>$tmp/config.h
18589 rm -f $tmp/in
18590 if test x"$ac_file" != x-; then
18591 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
18592 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
18593echo "$as_me: $ac_file is unchanged" >&6;}
18594 else
18595 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18596$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18597 X"$ac_file" : 'X\(//\)[^/]' \| \
18598 X"$ac_file" : 'X\(//\)$' \| \
18599 X"$ac_file" : 'X\(/\)' \| \
18600 . : '\(.\)' 2>/dev/null ||
18601echo X"$ac_file" |
18602 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18603 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18604 /^X\(\/\/\)$/{ s//\1/; q; }
18605 /^X\(\/\).*/{ s//\1/; q; }
18606 s/.*/./; q'`
Barry Warsawfe33b792003-01-07 22:42:49 +000018607 { case "$ac_dir" in
18608 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18609 *) as_incr_dir=.;;
18610esac
18611as_dummy="$ac_dir"
18612for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18613 case $as_mkdir_dir in
18614 # Skip DOS drivespec
18615 ?:) as_incr_dir=$as_mkdir_dir ;;
18616 *)
18617 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18618 test -d "$as_incr_dir" ||
18619 mkdir "$as_incr_dir" ||
18620 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18621echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18622 { (exit 1); exit 1; }; }
18623 ;;
18624 esac
18625done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018626
Martin v. Löwis11437992002-04-12 09:54:03 +000018627 rm -f $ac_file
18628 mv $tmp/config.h $ac_file
18629 fi
18630 else
18631 cat $tmp/config.h
18632 rm -f $tmp/config.h
18633 fi
18634done
18635_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000018636
Martin v. Löwis11437992002-04-12 09:54:03 +000018637cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018638
Martin v. Löwis11437992002-04-12 09:54:03 +000018639{ (exit 0); exit 0; }
18640_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018641chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018642ac_clean_files=$ac_clean_files_save
18643
18644
18645# configure is writing to config.log, and then calls config.status.
18646# config.status does its own redirection, appending to config.log.
18647# Unfortunately, on DOS this fails, as config.log is still kept open
18648# by configure, so config.status won't be able to write to it; its
18649# output is simply discarded. So we exec the FD to /dev/null,
18650# effectively closing config.log, so it can be properly (re)opened and
18651# appended to by config.status. When coming back to configure, we
18652# need to make the FD available again.
18653if test "$no_create" != yes; then
18654 ac_cs_success=:
18655 exec 5>/dev/null
18656 $SHELL $CONFIG_STATUS || ac_cs_success=false
18657 exec 5>>config.log
18658 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18659 # would make configure fail if this is the last instruction.
18660 $ac_cs_success || { (exit 1); exit 1; }
18661fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018662
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018663
18664echo "creating Setup"
18665if test ! -f Modules/Setup
18666then
18667 cp $srcdir/Modules/Setup.dist Modules/Setup
18668fi
18669
18670echo "creating Setup.local"
18671if test ! -f Modules/Setup.local
18672then
18673 echo "# Edit this file for local setup changes" >Modules/Setup.local
18674fi
18675
18676echo "creating Makefile"
18677$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
18678 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000018679 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018680mv config.c Modules