blob: 5db96b32f87ebdfc5d17916cc9f4255969cf02b5 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002# From configure.in Revision: 1.414 .
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'
3272 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3273 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
Guido van Rossum0a516c91994-09-12 10:58:40 +00009481fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009482echo "$as_me:$LINENO: result: $SO" >&5
9483echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009484# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00009485# -- "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 +00009486# (Shared libraries in this instance are shared modules to be loaded into
9487# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009488echo "$as_me:$LINENO: checking LDSHARED" >&5
9489echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009490if test -z "$LDSHARED"
9491then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009492 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009493 AIX*)
9494 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009495 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009496 ;;
9497 BeOS*)
9498 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009499 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009500 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009501 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009502 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009503 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009504 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00009505 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009506 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009507 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +00009508 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009509 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009510 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
9511 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009512 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009513 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9514 if test "$enable_framework" ; then
9515 # Link against the framework. All externals should be defined.
9516 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9517 else
9518 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009519 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009520 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009521 Darwin/*)
9522 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9523 if test "$enable_framework" ; then
9524 # Link against the framework. All externals should be defined.
9525 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9526 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009527 # No framework, use the Python app as bundle-loader
9528 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009529 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009530 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009531 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00009532 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009533 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009534 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009535 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009536 then
9537 LDSHARED="cc -shared ${LDFLAGS}"
9538 else
9539 LDSHARED="ld -Bshareable ${LDFLAGS}"
9540 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009541 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009542 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009543 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009544 then LDSHARED='$(CC) -shared'
9545 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009546 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009547 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +00009548 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009549 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009550 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009551 *) LDSHARED="ld";;
9552 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009553fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009554echo "$as_me:$LINENO: result: $LDSHARED" >&5
9555echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009556BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009557# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009558# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009559echo "$as_me:$LINENO: checking CCSHARED" >&5
9560echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009561if test -z "$CCSHARED"
9562then
Guido van Rossum07397971997-04-29 21:49:50 +00009563 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009564 SunOS*) if test "$GCC" = yes;
9565 then CCSHARED="-fPIC";
9566 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009567 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009568 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009569 else CCSHARED="+z";
9570 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009571 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009572 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009573 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009574 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009575 if test "$GCC" = "yes"
9576 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009577 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009578 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009579 SCO_SV*)
9580 if test "$GCC" = "yes"
9581 then CCSHARED="-fPIC"
9582 else CCSHARED="-Kpic -belf"
9583 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009584 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009585 IRIX*/6*) case $CC in
9586 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009587 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009588 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009589 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009590 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009591fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009592echo "$as_me:$LINENO: result: $CCSHARED" >&5
9593echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009594# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009595# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009596echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9597echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009598if test -z "$LINKFORSHARED"
9599then
Guido van Rossum07397971997-04-29 21:49:50 +00009600 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009601 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009602 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009603 LINKFORSHARED="-Wl,-E -Wl,+s";;
9604# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009605 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009606 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009607 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009608 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009609 # -u __dummy makes the linker aware of the objc runtime
9610 # in System.framework; otherwise, __objcInit (referenced in
9611 # crt1.o) gets erroneously defined as common, which breaks dynamic
9612 # loading of any modules which reference it in System.framework.
9613 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9614 # not used by the core itself but which needs to be in the core so
9615 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00009616 # -prebind is no longer used, because it actually seems to give a
9617 # slowdown in stead of a speedup, maybe due to the large number of
9618 # dynamic loads Python does.
9619 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009620 if test "$enable_framework"
9621 then
9622 LINKFORSHARED="$LINKFORSHARED -framework Python"
9623 fi
9624 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009625 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009626 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009627 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009628 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009629 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9630 then
9631 LINKFORSHARED="-Wl,--export-dynamic"
9632 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009633 SunOS/5*) case $CC in
9634 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009635 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009636 then
9637 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009638 fi;;
9639 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009640 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009641fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009642echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9643echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009644
Michael W. Hudson54241132001-12-07 15:38:26 +00009645
Martin v. Löwis11437992002-04-12 09:54:03 +00009646echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9647echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009648if test ! "$LIBRARY" = "$LDLIBRARY"
9649then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009650 case $ac_sys_system in
9651 CYGWIN*)
9652 # Cygwin needs CCSHARED when building extension DLLs
9653 # but not when building the interpreter DLL.
9654 CFLAGSFORSHARED='';;
9655 *)
9656 CFLAGSFORSHARED='$(CCSHARED)'
9657 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009658fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009659echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9660echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009661
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009662# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9663# library (with --enable-shared).
9664# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009665# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9666# if it is not required, since it creates a dependency of the shared library
9667# to LIBS. This, in turn, means that applications linking the shared libpython
9668# don't need to link LIBS explicitly. The default should be only changed
9669# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009670
9671echo "$as_me:$LINENO: checking SHLIBS" >&5
9672echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9673case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009674 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009675 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009676esac
9677echo "$as_me:$LINENO: result: $SHLIBS" >&5
9678echo "${ECHO_T}$SHLIBS" >&6
9679
9680
Guido van Rossum627b2d71993-12-24 10:39:16 +00009681# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009682
9683echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9684echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9685if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9686 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009687else
Martin v. Löwis11437992002-04-12 09:54:03 +00009688 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009689LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009690cat >conftest.$ac_ext <<_ACEOF
9691#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009692#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009693
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009694/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009695#ifdef __cplusplus
9696extern "C"
9697#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009698/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009699 builtin and then its argument prototype would still apply. */
9700char dlopen ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009701#ifdef F77_DUMMY_MAIN
9702# ifdef __cplusplus
9703 extern "C"
9704# endif
9705 int F77_DUMMY_MAIN() { return 1; }
9706#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009707int
9708main ()
9709{
9710dlopen ();
9711 ;
9712 return 0;
9713}
9714_ACEOF
9715rm -f conftest.$ac_objext conftest$ac_exeext
9716if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9717 (eval $ac_link) 2>&5
9718 ac_status=$?
9719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9720 (exit $ac_status); } &&
9721 { ac_try='test -s conftest$ac_exeext'
9722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9723 (eval $ac_try) 2>&5
9724 ac_status=$?
9725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9726 (exit $ac_status); }; }; then
9727 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009728else
Martin v. Löwis11437992002-04-12 09:54:03 +00009729 echo "$as_me: failed program was:" >&5
9730cat conftest.$ac_ext >&5
9731ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009732fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009733rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9734LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009735fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009736echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9737echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9738if test $ac_cv_lib_dl_dlopen = yes; then
9739 cat >>confdefs.h <<_ACEOF
9740#define HAVE_LIBDL 1
9741_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009742
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009743 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009744
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009745fi
9746 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009747
9748echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9749echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9750if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9751 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009752else
Martin v. Löwis11437992002-04-12 09:54:03 +00009753 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009754LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009755cat >conftest.$ac_ext <<_ACEOF
9756#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009757#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009758
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009759/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009760#ifdef __cplusplus
9761extern "C"
9762#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009763/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009764 builtin and then its argument prototype would still apply. */
9765char shl_load ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009766#ifdef F77_DUMMY_MAIN
9767# ifdef __cplusplus
9768 extern "C"
9769# endif
9770 int F77_DUMMY_MAIN() { return 1; }
9771#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009772int
9773main ()
9774{
9775shl_load ();
9776 ;
9777 return 0;
9778}
9779_ACEOF
9780rm -f conftest.$ac_objext conftest$ac_exeext
9781if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9782 (eval $ac_link) 2>&5
9783 ac_status=$?
9784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9785 (exit $ac_status); } &&
9786 { ac_try='test -s conftest$ac_exeext'
9787 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9788 (eval $ac_try) 2>&5
9789 ac_status=$?
9790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9791 (exit $ac_status); }; }; then
9792 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009793else
Martin v. Löwis11437992002-04-12 09:54:03 +00009794 echo "$as_me: failed program was:" >&5
9795cat conftest.$ac_ext >&5
9796ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009797fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009798rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9799LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009800fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009801echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9802echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9803if test $ac_cv_lib_dld_shl_load = yes; then
9804 cat >>confdefs.h <<_ACEOF
9805#define HAVE_LIBDLD 1
9806_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009807
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009808 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009809
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009810fi
9811 # Dynamic linking for HP-UX
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009812echo "$as_me:$LINENO: checking for library containing sem_init" >&5
9813echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9814if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009815 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009816else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009817 ac_func_search_save_LIBS=$LIBS
9818ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009819cat >conftest.$ac_ext <<_ACEOF
9820#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009821#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009822
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009823/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009824#ifdef __cplusplus
9825extern "C"
9826#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009827/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009828 builtin and then its argument prototype would still apply. */
9829char sem_init ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009830#ifdef F77_DUMMY_MAIN
9831# ifdef __cplusplus
9832 extern "C"
9833# endif
9834 int F77_DUMMY_MAIN() { return 1; }
9835#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009836int
9837main ()
9838{
9839sem_init ();
9840 ;
9841 return 0;
9842}
9843_ACEOF
9844rm -f conftest.$ac_objext conftest$ac_exeext
9845if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9846 (eval $ac_link) 2>&5
9847 ac_status=$?
9848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9849 (exit $ac_status); } &&
9850 { ac_try='test -s conftest$ac_exeext'
9851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9852 (eval $ac_try) 2>&5
9853 ac_status=$?
9854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9855 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009856 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009857else
Martin v. Löwis11437992002-04-12 09:54:03 +00009858 echo "$as_me: failed program was:" >&5
9859cat conftest.$ac_ext >&5
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009860fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009861rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009862if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009863 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009864 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9865 cat >conftest.$ac_ext <<_ACEOF
9866#line $LINENO "configure"
9867#include "confdefs.h"
9868
9869/* Override any gcc2 internal prototype to avoid an error. */
9870#ifdef __cplusplus
9871extern "C"
9872#endif
9873/* We use char because int might match the return type of a gcc2
9874 builtin and then its argument prototype would still apply. */
9875char sem_init ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009876#ifdef F77_DUMMY_MAIN
9877# ifdef __cplusplus
9878 extern "C"
9879# endif
9880 int F77_DUMMY_MAIN() { return 1; }
9881#endif
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009882int
9883main ()
9884{
9885sem_init ();
9886 ;
9887 return 0;
9888}
Martin v. Löwis11437992002-04-12 09:54:03 +00009889_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009890rm -f conftest.$ac_objext conftest$ac_exeext
9891if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9892 (eval $ac_link) 2>&5
9893 ac_status=$?
9894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9895 (exit $ac_status); } &&
9896 { ac_try='test -s conftest$ac_exeext'
9897 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9898 (eval $ac_try) 2>&5
9899 ac_status=$?
9900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9901 (exit $ac_status); }; }; then
9902 ac_cv_search_sem_init="-l$ac_lib"
9903break
9904else
9905 echo "$as_me: failed program was:" >&5
9906cat conftest.$ac_ext >&5
9907fi
9908rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9909 done
9910fi
9911LIBS=$ac_func_search_save_LIBS
9912fi
9913echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9914echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9915if test "$ac_cv_search_sem_init" != no; then
9916 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009917
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009918fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009919 # 'Real Time' functions on Solaris
9920 # posix4 on Solaris 2.6
9921 # pthread (first!) on Linux
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009922
9923# checks for system dependent C++ extensions support
9924case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009925 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9926echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9927 cat >conftest.$ac_ext <<_ACEOF
9928#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009929#include "confdefs.h"
9930#include "/usr/lpp/xlC/include/load.h"
Barry Warsawfe33b792003-01-07 22:42:49 +00009931#ifdef F77_DUMMY_MAIN
9932# ifdef __cplusplus
9933 extern "C"
9934# endif
9935 int F77_DUMMY_MAIN() { return 1; }
9936#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009937int
9938main ()
9939{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009940loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009941 ;
9942 return 0;
9943}
9944_ACEOF
9945rm -f conftest.$ac_objext conftest$ac_exeext
9946if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9947 (eval $ac_link) 2>&5
9948 ac_status=$?
9949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9950 (exit $ac_status); } &&
9951 { ac_try='test -s conftest$ac_exeext'
9952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9953 (eval $ac_try) 2>&5
9954 ac_status=$?
9955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9956 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009957
Martin v. Löwis11437992002-04-12 09:54:03 +00009958cat >>confdefs.h <<\_ACEOF
9959#define AIX_GENUINE_CPLUSPLUS 1
9960_ACEOF
9961
9962 echo "$as_me:$LINENO: result: yes" >&5
9963echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009964else
Martin v. Löwis11437992002-04-12 09:54:03 +00009965 echo "$as_me: failed program was:" >&5
9966cat conftest.$ac_ext >&5
9967echo "$as_me:$LINENO: result: no" >&5
9968echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009969fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009970rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009971 *) ;;
9972esac
9973
Guido van Rossum70c7f481998-03-26 18:44:10 +00009974# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Martin v. Löwise1172582002-11-13 08:51:19 +00009975# However on SGI IRIX 4, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009976# BeOS' sockets are stashed in libnet.
9977case "$ac_sys_system" in
9978IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009979*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009980echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9981echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9982if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9983 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009984else
Martin v. Löwis11437992002-04-12 09:54:03 +00009985 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009986LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009987cat >conftest.$ac_ext <<_ACEOF
9988#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009989#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009990
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009991/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009992#ifdef __cplusplus
9993extern "C"
9994#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009995/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009996 builtin and then its argument prototype would still apply. */
9997char t_open ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009998#ifdef F77_DUMMY_MAIN
9999# ifdef __cplusplus
10000 extern "C"
10001# endif
10002 int F77_DUMMY_MAIN() { return 1; }
10003#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010004int
10005main ()
10006{
10007t_open ();
10008 ;
10009 return 0;
10010}
10011_ACEOF
10012rm -f conftest.$ac_objext conftest$ac_exeext
10013if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10014 (eval $ac_link) 2>&5
10015 ac_status=$?
10016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10017 (exit $ac_status); } &&
10018 { ac_try='test -s conftest$ac_exeext'
10019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10020 (eval $ac_try) 2>&5
10021 ac_status=$?
10022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10023 (exit $ac_status); }; }; then
10024 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010025else
Martin v. Löwis11437992002-04-12 09:54:03 +000010026 echo "$as_me: failed program was:" >&5
10027cat conftest.$ac_ext >&5
10028ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010029fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010030rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10031LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010032fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010033echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
10034echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
10035if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010036 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010037fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010038 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +000010039echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
10040echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
10041if test "${ac_cv_lib_socket_socket+set}" = set; then
10042 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010043else
Martin v. Löwis11437992002-04-12 09:54:03 +000010044 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010045LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010046cat >conftest.$ac_ext <<_ACEOF
10047#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010048#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010049
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010050/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010051#ifdef __cplusplus
10052extern "C"
10053#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010054/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010055 builtin and then its argument prototype would still apply. */
10056char socket ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010057#ifdef F77_DUMMY_MAIN
10058# ifdef __cplusplus
10059 extern "C"
10060# endif
10061 int F77_DUMMY_MAIN() { return 1; }
10062#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010063int
10064main ()
10065{
10066socket ();
10067 ;
10068 return 0;
10069}
10070_ACEOF
10071rm -f conftest.$ac_objext conftest$ac_exeext
10072if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10073 (eval $ac_link) 2>&5
10074 ac_status=$?
10075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10076 (exit $ac_status); } &&
10077 { ac_try='test -s conftest$ac_exeext'
10078 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10079 (eval $ac_try) 2>&5
10080 ac_status=$?
10081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10082 (exit $ac_status); }; }; then
10083 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010084else
Martin v. Löwis11437992002-04-12 09:54:03 +000010085 echo "$as_me: failed program was:" >&5
10086cat conftest.$ac_ext >&5
10087ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010088fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010089rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10090LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010091fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010092echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
10093echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
10094if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000010095 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010096fi
10097 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000010098;;
10099esac
10100case "$ac_sys_system" in
10101BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010102echo "$as_me:$LINENO: checking for socket in -lnet" >&5
10103echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
10104if test "${ac_cv_lib_net_socket+set}" = set; then
10105 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010106else
Martin v. Löwis11437992002-04-12 09:54:03 +000010107 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010108LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010109cat >conftest.$ac_ext <<_ACEOF
10110#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010111#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010112
Guido van Rossumad678af1998-10-02 14:42:15 +000010113/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010114#ifdef __cplusplus
10115extern "C"
10116#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010117/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010118 builtin and then its argument prototype would still apply. */
10119char socket ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010120#ifdef F77_DUMMY_MAIN
10121# ifdef __cplusplus
10122 extern "C"
10123# endif
10124 int F77_DUMMY_MAIN() { return 1; }
10125#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010126int
10127main ()
10128{
10129socket ();
10130 ;
10131 return 0;
10132}
10133_ACEOF
10134rm -f conftest.$ac_objext conftest$ac_exeext
10135if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10136 (eval $ac_link) 2>&5
10137 ac_status=$?
10138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10139 (exit $ac_status); } &&
10140 { ac_try='test -s conftest$ac_exeext'
10141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10142 (eval $ac_try) 2>&5
10143 ac_status=$?
10144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10145 (exit $ac_status); }; }; then
10146 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010147else
Martin v. Löwis11437992002-04-12 09:54:03 +000010148 echo "$as_me: failed program was:" >&5
10149cat conftest.$ac_ext >&5
10150ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010151fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010152rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10153LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010154fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010155echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
10156echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
10157if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010158 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010159fi
10160 # BeOS
10161;;
10162esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000010163
Martin v. Löwis11437992002-04-12 09:54:03 +000010164echo "$as_me:$LINENO: checking for --with-libs" >&5
10165echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
10166
Guido van Rossuma68acba1996-07-31 17:36:39 +000010167# Check whether --with-libs or --without-libs was given.
10168if test "${with_libs+set}" = set; then
10169 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000010170
10171echo "$as_me:$LINENO: result: $withval" >&5
10172echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000010173LIBS="$withval $LIBS"
10174
10175else
Martin v. Löwis11437992002-04-12 09:54:03 +000010176 echo "$as_me:$LINENO: result: no" >&5
10177echo "${ECHO_T}no" >&6
10178fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000010179
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010180# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010181
10182
Martin v. Löwis11437992002-04-12 09:54:03 +000010183echo "$as_me:$LINENO: checking for --with-signal-module" >&5
10184echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
10185
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010186# Check whether --with-signal-module or --without-signal-module was given.
10187if test "${with_signal_module+set}" = set; then
10188 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010189
Martin v. Löwis11437992002-04-12 09:54:03 +000010190fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010191
10192if test -z "$with_signal_module"
10193then with_signal_module="yes"
10194fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010195echo "$as_me:$LINENO: result: $with_signal_module" >&5
10196echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010197
10198if test "${with_signal_module}" = "yes"; then
10199 USE_SIGNAL_MODULE=""
10200 SIGNAL_OBJS=""
10201else
10202 USE_SIGNAL_MODULE="#"
10203 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10204fi
10205
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010206# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010207
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010208USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010209
Martin v. Löwis11437992002-04-12 09:54:03 +000010210echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
10211echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
10212
Guido van Rossumec2f0731997-01-22 20:54:01 +000010213
10214# Check whether --with-dec-threads or --without-dec-threads was given.
10215if test "${with_dec_threads+set}" = set; then
10216 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000010217
10218echo "$as_me:$LINENO: result: $withval" >&5
10219echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000010220LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000010221if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000010222 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000010223fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010224else
Martin v. Löwis11437992002-04-12 09:54:03 +000010225 echo "$as_me:$LINENO: result: no" >&5
10226echo "${ECHO_T}no" >&6
10227fi;
10228
10229# Templates for things AC_DEFINEd more than once.
10230# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010231
10232
Martin v. Löwis11437992002-04-12 09:54:03 +000010233
10234
10235
10236
10237
10238echo "$as_me:$LINENO: checking for --with-threads" >&5
10239echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
10240
Guido van Rossumec2f0731997-01-22 20:54:01 +000010241# Check whether --with-threads or --without-threads was given.
10242if test "${with_threads+set}" = set; then
10243 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000010244
Martin v. Löwis11437992002-04-12 09:54:03 +000010245fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000010246
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010247# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010248
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010249# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010250if test "${with_thread+set}" = set; then
10251 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010252 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000010253fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010254
10255if test -z "$with_threads"
10256then with_threads="yes"
10257fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010258echo "$as_me:$LINENO: result: $with_threads" >&5
10259echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010260
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010261
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010262if test "$with_threads" = "no"
10263then
10264 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010265elif test "$ac_cv_pthread_is_default" = yes
10266then
Martin v. Löwis11437992002-04-12 09:54:03 +000010267 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010268#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010269_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010270
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010271 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010272 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010273#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010274_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010275
10276 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010277 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010278elif test "$ac_cv_kpthread" = "yes"
10279then
10280 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010281 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010282#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010283_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010284
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010285 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010286 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010287elif test "$ac_cv_kthread" = "yes"
10288then
10289 CC="$CC -Kthread"
10290 cat >>confdefs.h <<\_ACEOF
10291#define WITH_THREAD 1
10292_ACEOF
10293
10294 posix_threads=yes
10295 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010296elif test "$ac_cv_pthread" = "yes"
10297then
10298 CC="$CC -pthread"
10299 cat >>confdefs.h <<\_ACEOF
10300#define WITH_THREAD 1
10301_ACEOF
10302
10303 posix_threads=yes
10304 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010305else
10306 if test ! -z "$with_threads" -a -d "$with_threads"
10307 then LDFLAGS="$LDFLAGS -L$with_threads"
10308 fi
10309 if test ! -z "$withval" -a -d "$withval"
10310 then LDFLAGS="$LDFLAGS -L$withval"
10311 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010312
10313 # According to the POSIX spec, a pthreads implementation must
10314 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010315 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10316echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10317 cat >conftest.$ac_ext <<_ACEOF
10318#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010319#include "confdefs.h"
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010320
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010321#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010322#ifdef _POSIX_THREADS
10323yes
10324#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010325
10326_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010327if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000010328 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010329 unistd_defines_pthreads=yes
10330else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010331 unistd_defines_pthreads=no
10332fi
10333rm -f conftest*
10334
Martin v. Löwis11437992002-04-12 09:54:03 +000010335 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10336echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010337
Martin v. Löwis11437992002-04-12 09:54:03 +000010338 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010339#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010340_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010341
Martin v. Löwis11437992002-04-12 09:54:03 +000010342 if test "${ac_cv_header_cthreads_h+set}" = set; then
10343 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10344echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10345if test "${ac_cv_header_cthreads_h+set}" = set; then
10346 echo $ECHO_N "(cached) $ECHO_C" >&6
10347fi
10348echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10349echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010350else
Martin v. Löwis11437992002-04-12 09:54:03 +000010351 # Is the header compilable?
10352echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10353echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10354cat >conftest.$ac_ext <<_ACEOF
10355#line $LINENO "configure"
10356#include "confdefs.h"
10357$ac_includes_default
10358#include <cthreads.h>
10359_ACEOF
10360rm -f conftest.$ac_objext
10361if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10362 (eval $ac_compile) 2>&5
10363 ac_status=$?
10364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10365 (exit $ac_status); } &&
10366 { ac_try='test -s conftest.$ac_objext'
10367 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10368 (eval $ac_try) 2>&5
10369 ac_status=$?
10370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10371 (exit $ac_status); }; }; then
10372 ac_header_compiler=yes
10373else
10374 echo "$as_me: failed program was:" >&5
10375cat conftest.$ac_ext >&5
10376ac_header_compiler=no
10377fi
10378rm -f conftest.$ac_objext conftest.$ac_ext
10379echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10380echo "${ECHO_T}$ac_header_compiler" >&6
10381
10382# Is the header present?
10383echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10384echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10385cat >conftest.$ac_ext <<_ACEOF
10386#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010387#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010388#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010389_ACEOF
10390if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10391 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10392 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010393 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010394 rm -f conftest.er1
10395 cat conftest.err >&5
10396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10397 (exit $ac_status); } >/dev/null; then
10398 if test -s conftest.err; then
10399 ac_cpp_err=$ac_c_preproc_warn_flag
10400 else
10401 ac_cpp_err=
10402 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010403else
Martin v. Löwis11437992002-04-12 09:54:03 +000010404 ac_cpp_err=yes
10405fi
10406if test -z "$ac_cpp_err"; then
10407 ac_header_preproc=yes
10408else
10409 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +000010410 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010411 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010412fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010413rm -f conftest.err conftest.$ac_ext
10414echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10415echo "${ECHO_T}$ac_header_preproc" >&6
10416
10417# So? What about this header?
10418case $ac_header_compiler:$ac_header_preproc in
10419 yes:no )
10420 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10421echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10422 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10423echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10424 no:yes )
10425 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10426echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10427 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10428echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10429 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10430echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10431esac
10432echo "$as_me:$LINENO: checking for cthreads.h" >&5
10433echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10434if test "${ac_cv_header_cthreads_h+set}" = set; then
10435 echo $ECHO_N "(cached) $ECHO_C" >&6
10436else
10437 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010438fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010439echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10440echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10441
10442fi
10443if test $ac_cv_header_cthreads_h = yes; then
10444 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010445#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010446_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010447
Martin v. Löwis11437992002-04-12 09:54:03 +000010448 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010449#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010450_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010451
Martin v. Löwis11437992002-04-12 09:54:03 +000010452
10453cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010454#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010455_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010456
10457 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010458 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010459else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010460
Martin v. Löwis11437992002-04-12 09:54:03 +000010461 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10462 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10463echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10464if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10465 echo $ECHO_N "(cached) $ECHO_C" >&6
10466fi
10467echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10468echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010469else
Martin v. Löwis11437992002-04-12 09:54:03 +000010470 # Is the header compilable?
10471echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10472echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10473cat >conftest.$ac_ext <<_ACEOF
10474#line $LINENO "configure"
10475#include "confdefs.h"
10476$ac_includes_default
10477#include <mach/cthreads.h>
10478_ACEOF
10479rm -f conftest.$ac_objext
10480if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10481 (eval $ac_compile) 2>&5
10482 ac_status=$?
10483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10484 (exit $ac_status); } &&
10485 { ac_try='test -s conftest.$ac_objext'
10486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10487 (eval $ac_try) 2>&5
10488 ac_status=$?
10489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10490 (exit $ac_status); }; }; then
10491 ac_header_compiler=yes
10492else
10493 echo "$as_me: failed program was:" >&5
10494cat conftest.$ac_ext >&5
10495ac_header_compiler=no
10496fi
10497rm -f conftest.$ac_objext conftest.$ac_ext
10498echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10499echo "${ECHO_T}$ac_header_compiler" >&6
10500
10501# Is the header present?
10502echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10503echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10504cat >conftest.$ac_ext <<_ACEOF
10505#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010506#include "confdefs.h"
10507#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010508_ACEOF
10509if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10510 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10511 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010512 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010513 rm -f conftest.er1
10514 cat conftest.err >&5
10515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10516 (exit $ac_status); } >/dev/null; then
10517 if test -s conftest.err; then
10518 ac_cpp_err=$ac_c_preproc_warn_flag
10519 else
10520 ac_cpp_err=
10521 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010522else
Martin v. Löwis11437992002-04-12 09:54:03 +000010523 ac_cpp_err=yes
10524fi
10525if test -z "$ac_cpp_err"; then
10526 ac_header_preproc=yes
10527else
10528 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010529 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010530 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010531fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010532rm -f conftest.err conftest.$ac_ext
10533echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10534echo "${ECHO_T}$ac_header_preproc" >&6
10535
10536# So? What about this header?
10537case $ac_header_compiler:$ac_header_preproc in
10538 yes:no )
10539 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10540echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10541 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10542echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10543 no:yes )
10544 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10545echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10546 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10547echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10548 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10549echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10550esac
10551echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10552echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10553if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10554 echo $ECHO_N "(cached) $ECHO_C" >&6
10555else
10556 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010557fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010558echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10559echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10560
10561fi
10562if test $ac_cv_header_mach_cthreads_h = yes; then
10563 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010564#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010565_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010566
Martin v. Löwis11437992002-04-12 09:54:03 +000010567 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010568#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010569_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010570
Martin v. Löwis11437992002-04-12 09:54:03 +000010571
10572cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010573#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010574_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010575
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010576 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010577else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010578
Martin v. Löwis11437992002-04-12 09:54:03 +000010579 echo "$as_me:$LINENO: checking for --with-pth" >&5
10580echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10581
10582# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010583if test "${with_pth+set}" = set; then
10584 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010585 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010586echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010587 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010588#define WITH_THREAD 1
10589_ACEOF
10590
10591
10592cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010593#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010594_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010595
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010596 LIBS="-lpth $LIBS"
10597 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010598else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010599 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010600echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010601
10602 # Just looking for pthread_create in libpthread is not enough:
10603 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10604 # So we really have to include pthread.h, and then link.
10605 _libs=$LIBS
10606 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010607 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10608echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10609 cat >conftest.$ac_ext <<_ACEOF
10610#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010611#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010612#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010613
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010614void * start_routine (void *arg) { exit (0); }
Barry Warsawfe33b792003-01-07 22:42:49 +000010615#ifdef F77_DUMMY_MAIN
10616# ifdef __cplusplus
10617 extern "C"
10618# endif
10619 int F77_DUMMY_MAIN() { return 1; }
10620#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010621int
10622main ()
10623{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010624
10625pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010626 ;
10627 return 0;
10628}
10629_ACEOF
10630rm -f conftest.$ac_objext conftest$ac_exeext
10631if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10632 (eval $ac_link) 2>&5
10633 ac_status=$?
10634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10635 (exit $ac_status); } &&
10636 { ac_try='test -s conftest$ac_exeext'
10637 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10638 (eval $ac_try) 2>&5
10639 ac_status=$?
10640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10641 (exit $ac_status); }; }; then
10642
10643 echo "$as_me:$LINENO: result: yes" >&5
10644echo "${ECHO_T}yes" >&6
10645 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010646#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010647_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010648
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010649 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010650 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010651else
Martin v. Löwis11437992002-04-12 09:54:03 +000010652 echo "$as_me: failed program was:" >&5
10653cat conftest.$ac_ext >&5
10654
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010655 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010656 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10657echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10658if test "${ac_cv_func_pthread_detach+set}" = set; then
10659 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010660else
Martin v. Löwis11437992002-04-12 09:54:03 +000010661 cat >conftest.$ac_ext <<_ACEOF
10662#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010663#include "confdefs.h"
10664/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010665 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010666#include <assert.h>
10667/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010668#ifdef __cplusplus
10669extern "C"
10670#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010671/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010672 builtin and then its argument prototype would still apply. */
10673char pthread_detach ();
10674char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010675
Barry Warsawfe33b792003-01-07 22:42:49 +000010676#ifdef F77_DUMMY_MAIN
10677# ifdef __cplusplus
10678 extern "C"
10679# endif
10680 int F77_DUMMY_MAIN() { return 1; }
10681#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010682int
10683main ()
10684{
Guido van Rossumad678af1998-10-02 14:42:15 +000010685/* The GNU C library defines this for functions which it implements
10686 to always fail with ENOSYS. Some functions are actually named
10687 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010688#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010689choke me
10690#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010691f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +000010692#endif
10693
Martin v. Löwis11437992002-04-12 09:54:03 +000010694 ;
10695 return 0;
10696}
10697_ACEOF
10698rm -f conftest.$ac_objext conftest$ac_exeext
10699if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10700 (eval $ac_link) 2>&5
10701 ac_status=$?
10702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10703 (exit $ac_status); } &&
10704 { ac_try='test -s conftest$ac_exeext'
10705 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10706 (eval $ac_try) 2>&5
10707 ac_status=$?
10708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10709 (exit $ac_status); }; }; then
10710 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010711else
Martin v. Löwis11437992002-04-12 09:54:03 +000010712 echo "$as_me: failed program was:" >&5
10713cat conftest.$ac_ext >&5
10714ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010715fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010716rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010717fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010718echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10719echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10720if test $ac_cv_func_pthread_detach = yes; then
10721 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010722#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010723_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010724
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010725 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010726 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010727else
Guido van Rossumad678af1998-10-02 14:42:15 +000010728
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010729 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10730 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10731echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10732if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10733 echo $ECHO_N "(cached) $ECHO_C" >&6
10734fi
10735echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10736echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10737else
10738 # Is the header compilable?
10739echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10740echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10741cat >conftest.$ac_ext <<_ACEOF
10742#line $LINENO "configure"
10743#include "confdefs.h"
10744$ac_includes_default
10745#include <atheos/threads.h>
10746_ACEOF
10747rm -f conftest.$ac_objext
10748if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10749 (eval $ac_compile) 2>&5
10750 ac_status=$?
10751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10752 (exit $ac_status); } &&
10753 { ac_try='test -s conftest.$ac_objext'
10754 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10755 (eval $ac_try) 2>&5
10756 ac_status=$?
10757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10758 (exit $ac_status); }; }; then
10759 ac_header_compiler=yes
10760else
10761 echo "$as_me: failed program was:" >&5
10762cat conftest.$ac_ext >&5
10763ac_header_compiler=no
10764fi
10765rm -f conftest.$ac_objext conftest.$ac_ext
10766echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10767echo "${ECHO_T}$ac_header_compiler" >&6
10768
10769# Is the header present?
10770echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10771echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10772cat >conftest.$ac_ext <<_ACEOF
10773#line $LINENO "configure"
10774#include "confdefs.h"
10775#include <atheos/threads.h>
10776_ACEOF
10777if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10778 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10779 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010780 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010781 rm -f conftest.er1
10782 cat conftest.err >&5
10783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10784 (exit $ac_status); } >/dev/null; then
10785 if test -s conftest.err; then
10786 ac_cpp_err=$ac_c_preproc_warn_flag
10787 else
10788 ac_cpp_err=
10789 fi
10790else
10791 ac_cpp_err=yes
10792fi
10793if test -z "$ac_cpp_err"; then
10794 ac_header_preproc=yes
10795else
10796 echo "$as_me: failed program was:" >&5
10797 cat conftest.$ac_ext >&5
10798 ac_header_preproc=no
10799fi
10800rm -f conftest.err conftest.$ac_ext
10801echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10802echo "${ECHO_T}$ac_header_preproc" >&6
10803
10804# So? What about this header?
10805case $ac_header_compiler:$ac_header_preproc in
10806 yes:no )
10807 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10808echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10809 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10810echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10811 no:yes )
10812 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10813echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10814 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10815echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10816 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10817echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10818esac
10819echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10820echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10821if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10822 echo $ECHO_N "(cached) $ECHO_C" >&6
10823else
10824 ac_cv_header_atheos_threads_h=$ac_header_preproc
10825fi
10826echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10827echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10828
10829fi
10830if test $ac_cv_header_atheos_threads_h = yes; then
10831 cat >>confdefs.h <<\_ACEOF
10832#define WITH_THREAD 1
10833_ACEOF
10834
10835
10836cat >>confdefs.h <<\_ACEOF
10837#define ATHEOS_THREADS 1
10838_ACEOF
10839
10840 THREADOBJ="Python/thread.o"
10841else
10842
Martin v. Löwis11437992002-04-12 09:54:03 +000010843 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10844 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10845echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10846if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10847 echo $ECHO_N "(cached) $ECHO_C" >&6
10848fi
10849echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10850echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010851else
Martin v. Löwis11437992002-04-12 09:54:03 +000010852 # Is the header compilable?
10853echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10854echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10855cat >conftest.$ac_ext <<_ACEOF
10856#line $LINENO "configure"
10857#include "confdefs.h"
10858$ac_includes_default
10859#include <kernel/OS.h>
10860_ACEOF
10861rm -f conftest.$ac_objext
10862if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10863 (eval $ac_compile) 2>&5
10864 ac_status=$?
10865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10866 (exit $ac_status); } &&
10867 { ac_try='test -s conftest.$ac_objext'
10868 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10869 (eval $ac_try) 2>&5
10870 ac_status=$?
10871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10872 (exit $ac_status); }; }; then
10873 ac_header_compiler=yes
10874else
10875 echo "$as_me: failed program was:" >&5
10876cat conftest.$ac_ext >&5
10877ac_header_compiler=no
10878fi
10879rm -f conftest.$ac_objext conftest.$ac_ext
10880echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10881echo "${ECHO_T}$ac_header_compiler" >&6
10882
10883# Is the header present?
10884echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10885echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10886cat >conftest.$ac_ext <<_ACEOF
10887#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010888#include "confdefs.h"
10889#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010890_ACEOF
10891if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10892 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10893 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010894 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010895 rm -f conftest.er1
10896 cat conftest.err >&5
10897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10898 (exit $ac_status); } >/dev/null; then
10899 if test -s conftest.err; then
10900 ac_cpp_err=$ac_c_preproc_warn_flag
10901 else
10902 ac_cpp_err=
10903 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010904else
Martin v. Löwis11437992002-04-12 09:54:03 +000010905 ac_cpp_err=yes
10906fi
10907if test -z "$ac_cpp_err"; then
10908 ac_header_preproc=yes
10909else
10910 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010911 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010912 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010913fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010914rm -f conftest.err conftest.$ac_ext
10915echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10916echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010917
Martin v. Löwis11437992002-04-12 09:54:03 +000010918# So? What about this header?
10919case $ac_header_compiler:$ac_header_preproc in
10920 yes:no )
10921 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10922echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10923 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10924echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10925 no:yes )
10926 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10927echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10928 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10929echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10930 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10931echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10932esac
10933echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10934echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10935if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10936 echo $ECHO_N "(cached) $ECHO_C" >&6
10937else
10938 ac_cv_header_kernel_OS_h=$ac_header_preproc
10939fi
10940echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10941echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10942
10943fi
10944if test $ac_cv_header_kernel_OS_h = yes; then
10945 cat >>confdefs.h <<\_ACEOF
10946#define WITH_THREAD 1
10947_ACEOF
10948
10949
10950cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010951#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010952_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010953
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010954 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010955else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010956
Martin v. Löwis11437992002-04-12 09:54:03 +000010957 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10958echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10959if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10960 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010961else
Martin v. Löwis11437992002-04-12 09:54:03 +000010962 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010963LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010964cat >conftest.$ac_ext <<_ACEOF
10965#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010966#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010967
Greg Steinadf63d62000-07-05 10:38:09 +000010968/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010969#ifdef __cplusplus
10970extern "C"
10971#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010972/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010973 builtin and then its argument prototype would still apply. */
10974char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010975#ifdef F77_DUMMY_MAIN
10976# ifdef __cplusplus
10977 extern "C"
10978# endif
10979 int F77_DUMMY_MAIN() { return 1; }
10980#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010981int
10982main ()
10983{
10984pthread_create ();
10985 ;
10986 return 0;
10987}
10988_ACEOF
10989rm -f conftest.$ac_objext conftest$ac_exeext
10990if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10991 (eval $ac_link) 2>&5
10992 ac_status=$?
10993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10994 (exit $ac_status); } &&
10995 { ac_try='test -s conftest$ac_exeext'
10996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10997 (eval $ac_try) 2>&5
10998 ac_status=$?
10999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11000 (exit $ac_status); }; }; then
11001 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000011002else
Martin v. Löwis11437992002-04-12 09:54:03 +000011003 echo "$as_me: failed program was:" >&5
11004cat conftest.$ac_ext >&5
11005ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000011006fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011007rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11008LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011009fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011010echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
11011echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
11012if test $ac_cv_lib_pthreads_pthread_create = yes; then
11013 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011014#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011015_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011016
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011017 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011018 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011019 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000011020else
Greg Steinadf63d62000-07-05 10:38:09 +000011021
Martin v. Löwis11437992002-04-12 09:54:03 +000011022 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
11023echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
11024if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
11025 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000011026else
Martin v. Löwis11437992002-04-12 09:54:03 +000011027 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011028LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011029cat >conftest.$ac_ext <<_ACEOF
11030#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000011031#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011032
Guido van Rossum49545951997-12-02 19:28:29 +000011033/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011034#ifdef __cplusplus
11035extern "C"
11036#endif
Guido van Rossum49545951997-12-02 19:28:29 +000011037/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011038 builtin and then its argument prototype would still apply. */
11039char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011040#ifdef F77_DUMMY_MAIN
11041# ifdef __cplusplus
11042 extern "C"
11043# endif
11044 int F77_DUMMY_MAIN() { return 1; }
11045#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011046int
11047main ()
11048{
11049pthread_create ();
11050 ;
11051 return 0;
11052}
11053_ACEOF
11054rm -f conftest.$ac_objext conftest$ac_exeext
11055if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11056 (eval $ac_link) 2>&5
11057 ac_status=$?
11058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11059 (exit $ac_status); } &&
11060 { ac_try='test -s conftest$ac_exeext'
11061 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11062 (eval $ac_try) 2>&5
11063 ac_status=$?
11064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11065 (exit $ac_status); }; }; then
11066 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000011067else
Martin v. Löwis11437992002-04-12 09:54:03 +000011068 echo "$as_me: failed program was:" >&5
11069cat conftest.$ac_ext >&5
11070ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000011071fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011072rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11073LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000011074fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011075echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
11076echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
11077if test $ac_cv_lib_c_r_pthread_create = yes; then
11078 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011079#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011080_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011081
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011082 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011083 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011084 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011085else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011086
Martin v. Löwis11437992002-04-12 09:54:03 +000011087 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
11088echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
11089if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
11090 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011091else
Martin v. Löwis11437992002-04-12 09:54:03 +000011092 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011093LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011094cat >conftest.$ac_ext <<_ACEOF
11095#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011096#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011097
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011098/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011099#ifdef __cplusplus
11100extern "C"
11101#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011102/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011103 builtin and then its argument prototype would still apply. */
11104char __d6_pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011105#ifdef F77_DUMMY_MAIN
11106# ifdef __cplusplus
11107 extern "C"
11108# endif
11109 int F77_DUMMY_MAIN() { return 1; }
11110#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011111int
11112main ()
11113{
11114__d6_pthread_create ();
11115 ;
11116 return 0;
11117}
11118_ACEOF
11119rm -f conftest.$ac_objext conftest$ac_exeext
11120if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11121 (eval $ac_link) 2>&5
11122 ac_status=$?
11123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11124 (exit $ac_status); } &&
11125 { ac_try='test -s conftest$ac_exeext'
11126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11127 (eval $ac_try) 2>&5
11128 ac_status=$?
11129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11130 (exit $ac_status); }; }; then
11131 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011132else
Martin v. Löwis11437992002-04-12 09:54:03 +000011133 echo "$as_me: failed program was:" >&5
11134cat conftest.$ac_ext >&5
11135ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011136fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011137rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11138LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011139fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011140echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
11141echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
11142if test $ac_cv_lib_thread___d6_pthread_create = yes; then
11143 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011144#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011145_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011146
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011147 echo Systems with __d6_pthread_create are not supported anymore.
11148 echo See README
11149 exit 1
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011150 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011151 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011152 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000011153else
Guido van Rossum49545951997-12-02 19:28:29 +000011154
Martin v. Löwis11437992002-04-12 09:54:03 +000011155 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
11156echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
11157if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
11158 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011159else
Martin v. Löwis11437992002-04-12 09:54:03 +000011160 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011161LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011162cat >conftest.$ac_ext <<_ACEOF
11163#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011164#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011165
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011166/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011167#ifdef __cplusplus
11168extern "C"
11169#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011170/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011171 builtin and then its argument prototype would still apply. */
11172char __pthread_create_system ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011173#ifdef F77_DUMMY_MAIN
11174# ifdef __cplusplus
11175 extern "C"
11176# endif
11177 int F77_DUMMY_MAIN() { return 1; }
11178#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011179int
11180main ()
11181{
11182__pthread_create_system ();
11183 ;
11184 return 0;
11185}
11186_ACEOF
11187rm -f conftest.$ac_objext conftest$ac_exeext
11188if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11189 (eval $ac_link) 2>&5
11190 ac_status=$?
11191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11192 (exit $ac_status); } &&
11193 { ac_try='test -s conftest$ac_exeext'
11194 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11195 (eval $ac_try) 2>&5
11196 ac_status=$?
11197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11198 (exit $ac_status); }; }; then
11199 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011200else
Martin v. Löwis11437992002-04-12 09:54:03 +000011201 echo "$as_me: failed program was:" >&5
11202cat conftest.$ac_ext >&5
11203ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011204fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011205rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11206LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011207fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011208echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11209echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
11210if test $ac_cv_lib_pthread___pthread_create_system = yes; then
11211 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011212#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011213_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011214
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011215 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011216 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011217 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011218else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011219
Martin v. Löwis11437992002-04-12 09:54:03 +000011220 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
11221echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
11222if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
11223 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000011224else
Martin v. Löwis11437992002-04-12 09:54:03 +000011225 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011226LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011227cat >conftest.$ac_ext <<_ACEOF
11228#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011229#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011230
Guido van Rossumb93a8621998-05-07 13:27:32 +000011231/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011232#ifdef __cplusplus
11233extern "C"
11234#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000011235/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011236 builtin and then its argument prototype would still apply. */
11237char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011238#ifdef F77_DUMMY_MAIN
11239# ifdef __cplusplus
11240 extern "C"
11241# endif
11242 int F77_DUMMY_MAIN() { return 1; }
11243#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011244int
11245main ()
11246{
11247pthread_create ();
11248 ;
11249 return 0;
11250}
11251_ACEOF
11252rm -f conftest.$ac_objext conftest$ac_exeext
11253if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11254 (eval $ac_link) 2>&5
11255 ac_status=$?
11256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11257 (exit $ac_status); } &&
11258 { ac_try='test -s conftest$ac_exeext'
11259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11260 (eval $ac_try) 2>&5
11261 ac_status=$?
11262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11263 (exit $ac_status); }; }; then
11264 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000011265else
Martin v. Löwis11437992002-04-12 09:54:03 +000011266 echo "$as_me: failed program was:" >&5
11267cat conftest.$ac_ext >&5
11268ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011269fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011270rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11271LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011272fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011273echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
11274echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
11275if test $ac_cv_lib_cma_pthread_create = yes; then
11276 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011277#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011278_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011279
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011280 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011281 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011282 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011283else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011284
Martin v. Löwis130fb172001-07-19 11:00:41 +000011285 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000011286fi
11287
Guido van Rossum627b2d71993-12-24 10:39:16 +000011288
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011289fi
11290
Guido van Rossum0be3e491997-05-22 20:33:33 +000011291fi
11292
Guido van Rossum49545951997-12-02 19:28:29 +000011293fi
11294
Guido van Rossumb93a8621998-05-07 13:27:32 +000011295fi
11296
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011297fi
11298
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011299
Michael W. Hudson54241132001-12-07 15:38:26 +000011300fi
11301
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011302
11303fi
11304
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011305fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011306rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11307fi;
11308fi
11309
11310
11311fi
11312
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011313
Michael W. Hudson54241132001-12-07 15:38:26 +000011314
Martin v. Löwis11437992002-04-12 09:54:03 +000011315 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11316echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11317if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11318 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011319else
Martin v. Löwis11437992002-04-12 09:54:03 +000011320 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011321LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011322cat >conftest.$ac_ext <<_ACEOF
11323#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011324#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011325
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011326/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011327#ifdef __cplusplus
11328extern "C"
11329#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011330/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011331 builtin and then its argument prototype would still apply. */
11332char usconfig ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011333#ifdef F77_DUMMY_MAIN
11334# ifdef __cplusplus
11335 extern "C"
11336# endif
11337 int F77_DUMMY_MAIN() { return 1; }
11338#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011339int
11340main ()
11341{
11342usconfig ();
11343 ;
11344 return 0;
11345}
11346_ACEOF
11347rm -f conftest.$ac_objext conftest$ac_exeext
11348if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11349 (eval $ac_link) 2>&5
11350 ac_status=$?
11351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11352 (exit $ac_status); } &&
11353 { ac_try='test -s conftest$ac_exeext'
11354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11355 (eval $ac_try) 2>&5
11356 ac_status=$?
11357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11358 (exit $ac_status); }; }; then
11359 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011360else
Martin v. Löwis11437992002-04-12 09:54:03 +000011361 echo "$as_me: failed program was:" >&5
11362cat conftest.$ac_ext >&5
11363ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011364fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011365rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11366LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011367fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011368echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11369echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11370if test $ac_cv_lib_mpc_usconfig = yes; then
11371 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011372#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011373_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011374
Martin v. Löwis130fb172001-07-19 11:00:41 +000011375 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011376 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011377 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011378fi
11379
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011380
Neal Norwitza978ab02002-11-02 16:58:05 +000011381 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011382 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11383echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11384if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11385 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011386else
Martin v. Löwis11437992002-04-12 09:54:03 +000011387 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011388LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011389cat >conftest.$ac_ext <<_ACEOF
11390#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011391#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011392
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011393/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011394#ifdef __cplusplus
11395extern "C"
11396#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011397/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011398 builtin and then its argument prototype would still apply. */
11399char thr_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011400#ifdef F77_DUMMY_MAIN
11401# ifdef __cplusplus
11402 extern "C"
11403# endif
11404 int F77_DUMMY_MAIN() { return 1; }
11405#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011406int
11407main ()
11408{
11409thr_create ();
11410 ;
11411 return 0;
11412}
11413_ACEOF
11414rm -f conftest.$ac_objext conftest$ac_exeext
11415if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11416 (eval $ac_link) 2>&5
11417 ac_status=$?
11418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11419 (exit $ac_status); } &&
11420 { ac_try='test -s conftest$ac_exeext'
11421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11422 (eval $ac_try) 2>&5
11423 ac_status=$?
11424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11425 (exit $ac_status); }; }; then
11426 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011427else
Martin v. Löwis11437992002-04-12 09:54:03 +000011428 echo "$as_me: failed program was:" >&5
11429cat conftest.$ac_ext >&5
11430ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011431fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011432rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11433LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011434fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011435echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11436echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11437if test $ac_cv_lib_thread_thr_create = yes; then
11438 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011439#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011440_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011441
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011442 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011443 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011444 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011445fi
11446
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011447 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011448
Martin v. Löwis130fb172001-07-19 11:00:41 +000011449 if test "$USE_THREAD_MODULE" != "#"
11450 then
11451 # If the above checks didn't disable threads, (at least) OSF1
11452 # needs this '-threads' argument during linking.
11453 case $ac_sys_system in
11454 OSF1) LDLAST=-threads;;
11455 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011456 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011457fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011458
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011459if test "$posix_threads" = "yes"; then
11460 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011461
11462cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011463#define _POSIX_THREADS 1
11464_ACEOF
11465
11466 fi
11467
11468 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11469 case $ac_sys_system/$ac_sys_release in
11470 SunOS/5.6)
11471cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011472#define HAVE_PTHREAD_DESTRUCTOR 1
11473_ACEOF
11474
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011475 ;;
11476 SunOS/5.8)
11477cat >>confdefs.h <<\_ACEOF
11478#define HAVE_BROKEN_POSIX_SEMAPHORES 1
11479_ACEOF
11480
11481 ;;
11482 esac
11483
11484 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11485echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11486 if test "${ac_cv_pthread_system_supported+set}" = set; then
11487 echo $ECHO_N "(cached) $ECHO_C" >&6
11488else
11489 if test "$cross_compiling" = yes; then
11490 ac_cv_pthread_system_supported=no
11491else
11492 cat >conftest.$ac_ext <<_ACEOF
11493#line $LINENO "configure"
11494#include "confdefs.h"
11495#include <pthread.h>
11496 void *foo(void *parm) {
11497 return NULL;
11498 }
11499 main() {
11500 pthread_attr_t attr;
11501 pthread_t id;
11502 if (pthread_attr_init(&attr)) exit(-1);
11503 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
11504 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
11505 exit(0);
11506 }
11507_ACEOF
11508rm -f conftest$ac_exeext
11509if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11510 (eval $ac_link) 2>&5
11511 ac_status=$?
11512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11513 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11514 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11515 (eval $ac_try) 2>&5
11516 ac_status=$?
11517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11518 (exit $ac_status); }; }; then
11519 ac_cv_pthread_system_supported=yes
11520else
11521 echo "$as_me: program exited with status $ac_status" >&5
11522echo "$as_me: failed program was:" >&5
11523cat conftest.$ac_ext >&5
11524( exit $ac_status )
11525ac_cv_pthread_system_supported=no
11526fi
11527rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11528fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011529
Guido van Rossum627b2d71993-12-24 10:39:16 +000011530fi
11531
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011532 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11533echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
11534 if test "$ac_cv_pthread_system_supported" = "yes"; then
11535
11536cat >>confdefs.h <<\_ACEOF
11537#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
11538_ACEOF
11539
11540 fi
11541
11542for ac_func in pthread_sigmask
11543do
11544as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11545echo "$as_me:$LINENO: checking for $ac_func" >&5
11546echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11547if eval "test \"\${$as_ac_var+set}\" = set"; then
11548 echo $ECHO_N "(cached) $ECHO_C" >&6
11549else
11550 cat >conftest.$ac_ext <<_ACEOF
11551#line $LINENO "configure"
11552#include "confdefs.h"
11553/* System header to define __stub macros and hopefully few prototypes,
11554 which can conflict with char $ac_func (); below. */
11555#include <assert.h>
11556/* Override any gcc2 internal prototype to avoid an error. */
11557#ifdef __cplusplus
11558extern "C"
11559#endif
11560/* We use char because int might match the return type of a gcc2
11561 builtin and then its argument prototype would still apply. */
11562char $ac_func ();
11563char (*f) ();
11564
11565#ifdef F77_DUMMY_MAIN
11566# ifdef __cplusplus
11567 extern "C"
11568# endif
11569 int F77_DUMMY_MAIN() { return 1; }
11570#endif
11571int
11572main ()
11573{
11574/* The GNU C library defines this for functions which it implements
11575 to always fail with ENOSYS. Some functions are actually named
11576 something starting with __ and the normal name is an alias. */
11577#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11578choke me
11579#else
11580f = $ac_func;
11581#endif
11582
11583 ;
11584 return 0;
11585}
11586_ACEOF
11587rm -f conftest.$ac_objext conftest$ac_exeext
11588if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11589 (eval $ac_link) 2>&5
11590 ac_status=$?
11591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11592 (exit $ac_status); } &&
11593 { ac_try='test -s conftest$ac_exeext'
11594 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11595 (eval $ac_try) 2>&5
11596 ac_status=$?
11597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11598 (exit $ac_status); }; }; then
11599 eval "$as_ac_var=yes"
11600else
11601 echo "$as_me: failed program was:" >&5
11602cat conftest.$ac_ext >&5
11603eval "$as_ac_var=no"
11604fi
11605rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11606fi
11607echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11608echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11609if test `eval echo '${'$as_ac_var'}'` = yes; then
11610 cat >>confdefs.h <<_ACEOF
11611#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11612_ACEOF
11613
11614fi
11615done
11616
11617fi
11618
11619
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011620# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011621
11622
11623echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11624echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011625# Check whether --enable-ipv6 or --disable-ipv6 was given.
11626if test "${enable_ipv6+set}" = set; then
11627 enableval="$enable_ipv6"
11628 case "$enableval" in
11629 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011630 echo "$as_me:$LINENO: result: no" >&5
11631echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011632 ipv6=no
11633 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011634 *) echo "$as_me:$LINENO: result: yes" >&5
11635echo "${ECHO_T}yes" >&6
11636 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011637#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011638_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011639
11640 ipv6=yes
11641 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011642 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011643else
Martin v. Löwis11437992002-04-12 09:54:03 +000011644
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011645 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011646 echo "$as_me:$LINENO: result: no" >&5
11647echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011648 ipv6=no
11649
11650else
Martin v. Löwis11437992002-04-12 09:54:03 +000011651 cat >conftest.$ac_ext <<_ACEOF
11652#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011653#include "confdefs.h"
11654 /* AF_INET6 available check */
11655#include <sys/types.h>
11656#include <sys/socket.h>
11657main()
11658{
11659 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11660 exit(1);
11661 else
11662 exit(0);
11663}
11664
Martin v. Löwis11437992002-04-12 09:54:03 +000011665_ACEOF
11666rm -f conftest$ac_exeext
11667if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11668 (eval $ac_link) 2>&5
11669 ac_status=$?
11670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11671 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11673 (eval $ac_try) 2>&5
11674 ac_status=$?
11675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11676 (exit $ac_status); }; }; then
11677 echo "$as_me:$LINENO: result: yes" >&5
11678echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011679 ipv6=yes
11680else
Martin v. Löwis11437992002-04-12 09:54:03 +000011681 echo "$as_me: program exited with status $ac_status" >&5
11682echo "$as_me: failed program was:" >&5
11683cat conftest.$ac_ext >&5
11684( exit $ac_status )
11685echo "$as_me:$LINENO: result: no" >&5
11686echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011687 ipv6=no
11688fi
Barry Warsawfe33b792003-01-07 22:42:49 +000011689rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011690fi
11691
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011692if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011693 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11694echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11695 cat >conftest.$ac_ext <<_ACEOF
11696#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011697#include "confdefs.h"
11698#include <sys/types.h>
11699#include <netinet/in.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000011700#ifdef F77_DUMMY_MAIN
11701# ifdef __cplusplus
11702 extern "C"
11703# endif
11704 int F77_DUMMY_MAIN() { return 1; }
11705#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011706int
11707main ()
11708{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011709struct sockaddr_in6 x;
11710x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011711 ;
11712 return 0;
11713}
11714_ACEOF
11715rm -f conftest.$ac_objext
11716if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11717 (eval $ac_compile) 2>&5
11718 ac_status=$?
11719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11720 (exit $ac_status); } &&
11721 { ac_try='test -s conftest.$ac_objext'
11722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11723 (eval $ac_try) 2>&5
11724 ac_status=$?
11725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11726 (exit $ac_status); }; }; then
11727 echo "$as_me:$LINENO: result: yes" >&5
11728echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011729 ipv6=yes
11730else
Martin v. Löwis11437992002-04-12 09:54:03 +000011731 echo "$as_me: failed program was:" >&5
11732cat conftest.$ac_ext >&5
11733echo "$as_me:$LINENO: result: no" >&5
11734echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011735 ipv6=no
11736fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011737rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011738fi
11739
11740if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011741 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011742#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011743_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011744
11745fi
11746
Martin v. Löwis11437992002-04-12 09:54:03 +000011747fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011748
11749ipv6type=unknown
11750ipv6lib=none
11751ipv6trylibc=no
11752
11753if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011754 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11755echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011756 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11757 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011758 case $i in
11759 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011760 cat >conftest.$ac_ext <<_ACEOF
11761#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011762#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011763
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011764#include <netinet/in.h>
11765#ifdef IPV6_INRIA_VERSION
11766yes
11767#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011768_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011769if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011770 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011771 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011772fi
11773rm -f conftest*
11774
11775 ;;
11776 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011777 cat >conftest.$ac_ext <<_ACEOF
11778#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011779#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011780
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011781#include <netinet/in.h>
11782#ifdef __KAME__
11783yes
11784#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011785_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011786if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011787 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011788 ipv6type=$i;
11789 ipv6lib=inet6
11790 ipv6libdir=/usr/local/v6/lib
11791 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011792fi
11793rm -f conftest*
11794
11795 ;;
11796 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011797 cat >conftest.$ac_ext <<_ACEOF
11798#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011799#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011800
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011801#include <features.h>
11802#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11803yes
11804#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011805_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011806if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011807 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011808 ipv6type=$i;
11809 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011810fi
11811rm -f conftest*
11812
11813 ;;
11814 linux-inet6)
11815 if test -d /usr/inet6; then
11816 ipv6type=$i
11817 ipv6lib=inet6
11818 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011819 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011820 fi
11821 ;;
11822 solaris)
11823 if test -f /etc/netconfig; then
11824 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11825 ipv6type=$i
11826 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011827 fi
11828 fi
11829 ;;
11830 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011831 cat >conftest.$ac_ext <<_ACEOF
11832#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011833#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011834
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011835#include <sys/param.h>
11836#ifdef _TOSHIBA_INET6
11837yes
11838#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011839_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011840if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011841 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011842 ipv6type=$i;
11843 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011844 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011845fi
11846rm -f conftest*
11847
11848 ;;
11849 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011850 cat >conftest.$ac_ext <<_ACEOF
11851#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011852#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011853
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011854#include </usr/local/v6/include/sys/v6config.h>
11855#ifdef __V6D__
11856yes
11857#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011858_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011859if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011860 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011861 ipv6type=$i;
11862 ipv6lib=v6;
11863 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011864 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011865fi
11866rm -f conftest*
11867
11868 ;;
11869 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011870 cat >conftest.$ac_ext <<_ACEOF
11871#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011872#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011873
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011874#include <sys/param.h>
11875#ifdef _ZETA_MINAMI_INET6
11876yes
11877#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011878_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011879if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011880 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011881 ipv6type=$i;
11882 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011883 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011884fi
11885rm -f conftest*
11886
11887 ;;
11888 esac
11889 if test "$ipv6type" != "unknown"; then
11890 break
11891 fi
11892 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011893 echo "$as_me:$LINENO: result: $ipv6type" >&5
11894echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011895fi
11896
11897if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11898 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11899 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11900 echo "using lib$ipv6lib"
11901 else
11902 if test $ipv6trylibc = "yes"; then
11903 echo "using libc"
11904 else
11905 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11906 echo "You need to fetch lib$ipv6lib.a from appropriate"
11907 echo 'ipv6 kit and compile beforehand.'
11908 exit 1
11909 fi
11910 fi
11911fi
11912
Jack Jansen7b8c7542002-04-14 20:12:41 +000011913# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000011914echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
11915echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000011916
11917# Check whether --with-universal-newlines or --without-universal-newlines was given.
11918if test "${with_universal_newlines+set}" = set; then
11919 withval="$with_universal_newlines"
11920
11921fi;
11922
11923if test -z "$with_universal_newlines"
11924then with_universal_newlines="yes"
11925fi
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011926if test "$with_universal_newlines" = "no"
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011927then
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011928 echo --without-universal-newlines is unsupported, see README
11929 exit 1
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011930else
Martin v. Löwise8aea582002-04-16 05:51:02 +000011931
11932cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011933#define WITH_UNIVERSAL_NEWLINES 1
11934_ACEOF
11935
11936fi
11937echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11938echo "${ECHO_T}$with_universal_newlines" >&6
11939
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011940# Check for --with-doc-strings
11941echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11942echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11943
11944# Check whether --with-doc-strings or --without-doc-strings was given.
11945if test "${with_doc_strings+set}" = set; then
11946 withval="$with_doc_strings"
11947
11948fi;
11949
11950if test -z "$with_doc_strings"
11951then with_doc_strings="yes"
11952fi
11953if test "$with_doc_strings" != "no"
11954then
11955
11956cat >>confdefs.h <<\_ACEOF
11957#define WITH_DOC_STRINGS 1
11958_ACEOF
11959
11960fi
11961echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11962echo "${ECHO_T}$with_doc_strings" >&6
11963
Neil Schemenauera35c6882001-02-27 04:45:05 +000011964# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011965echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11966echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11967
Neil Schemenauera35c6882001-02-27 04:45:05 +000011968# Check whether --with-pymalloc or --without-pymalloc was given.
11969if test "${with_pymalloc+set}" = set; then
11970 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011971
Martin v. Löwis11437992002-04-12 09:54:03 +000011972fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011973
Neil Schemenauer16c22972002-03-22 15:34:49 +000011974if test -z "$with_pymalloc"
11975then with_pymalloc="yes"
11976fi
11977if test "$with_pymalloc" != "no"
11978then
Martin v. Löwis11437992002-04-12 09:54:03 +000011979
11980cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011981#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011982_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011983
11984fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011985echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11986echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011987
Barry Warsawef82cd72000-06-30 16:21:01 +000011988# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011989echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11990echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11991
Barry Warsawef82cd72000-06-30 16:21:01 +000011992# Check whether --with-wctype-functions or --without-wctype-functions was given.
11993if test "${with_wctype_functions+set}" = set; then
11994 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011995
Barry Warsawef82cd72000-06-30 16:21:01 +000011996if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011997then
11998
11999cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000012000#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012001_ACEOF
12002
12003 echo "$as_me:$LINENO: result: yes" >&5
12004echo "${ECHO_T}yes" >&6
12005else echo "$as_me:$LINENO: result: no" >&5
12006echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000012007fi
12008else
Martin v. Löwis11437992002-04-12 09:54:03 +000012009 echo "$as_me:$LINENO: result: no" >&5
12010echo "${ECHO_T}no" >&6
12011fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000012012
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012013# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000012014
Guido van Rossum98935bf2001-09-05 19:13:16 +000012015DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000012016
Martin v. Löwis11437992002-04-12 09:54:03 +000012017echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
12018echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
12019
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012020# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012021if test "${with_sgi_dl+set}" = set; then
12022 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000012023
12024echo "$as_me:$LINENO: result: $withval" >&5
12025echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000012026echo --with-sgi-dl is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000012027exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012028
12029cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012030#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012031_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000012032
Guido van Rossume97ee181999-12-20 21:27:22 +000012033DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012034dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000012035if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000012036then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000012037else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
12038echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
12039 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012040fi
12041DLINCLDIR=${dldir}
12042LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000012043else
Martin v. Löwis11437992002-04-12 09:54:03 +000012044 echo "$as_me:$LINENO: result: no" >&5
12045echo "${ECHO_T}no" >&6
12046fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000012047
Martin v. Löwis11437992002-04-12 09:54:03 +000012048echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
12049echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000012050
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012051# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012052if test "${with_dl_dld+set}" = set; then
12053 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000012054
12055echo "$as_me:$LINENO: result: $withval" >&5
12056echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000012057echo --with-dl-dld is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000012058exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012059
12060cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012061#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012062_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000012063
Guido van Rossume97ee181999-12-20 21:27:22 +000012064DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012065dldir=`echo "$withval" | sed 's/,.*//'`
12066dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000012067if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000012068then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012069else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&5
12070echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&2;}
12071 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012072fi
12073DLINCLDIR=${dldir}
12074LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000012075else
Martin v. Löwis11437992002-04-12 09:54:03 +000012076 echo "$as_me:$LINENO: result: no" >&5
12077echo "${ECHO_T}no" >&6
12078fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000012079
Guido van Rossume97ee181999-12-20 21:27:22 +000012080# the dlopen() function means we might want to use dynload_shlib.o. some
12081# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012082
Thomas Wouters3a584202000-08-05 23:28:51 +000012083for ac_func in dlopen
12084do
Martin v. Löwis11437992002-04-12 09:54:03 +000012085as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12086echo "$as_me:$LINENO: checking for $ac_func" >&5
12087echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12088if eval "test \"\${$as_ac_var+set}\" = set"; then
12089 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012090else
Martin v. Löwis11437992002-04-12 09:54:03 +000012091 cat >conftest.$ac_ext <<_ACEOF
12092#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000012093#include "confdefs.h"
12094/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012095 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000012096#include <assert.h>
12097/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012098#ifdef __cplusplus
12099extern "C"
12100#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012101/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012102 builtin and then its argument prototype would still apply. */
12103char $ac_func ();
12104char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000012105
Barry Warsawfe33b792003-01-07 22:42:49 +000012106#ifdef F77_DUMMY_MAIN
12107# ifdef __cplusplus
12108 extern "C"
12109# endif
12110 int F77_DUMMY_MAIN() { return 1; }
12111#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012112int
12113main ()
12114{
Guido van Rossume97ee181999-12-20 21:27:22 +000012115/* The GNU C library defines this for functions which it implements
12116 to always fail with ENOSYS. Some functions are actually named
12117 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012118#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000012119choke me
12120#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012121f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000012122#endif
12123
Martin v. Löwis11437992002-04-12 09:54:03 +000012124 ;
12125 return 0;
12126}
12127_ACEOF
12128rm -f conftest.$ac_objext conftest$ac_exeext
12129if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12130 (eval $ac_link) 2>&5
12131 ac_status=$?
12132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12133 (exit $ac_status); } &&
12134 { ac_try='test -s conftest$ac_exeext'
12135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12136 (eval $ac_try) 2>&5
12137 ac_status=$?
12138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12139 (exit $ac_status); }; }; then
12140 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012141else
Martin v. Löwis11437992002-04-12 09:54:03 +000012142 echo "$as_me: failed program was:" >&5
12143cat conftest.$ac_ext >&5
12144eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012145fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012146rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012147fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012148echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12149echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12150if test `eval echo '${'$as_ac_var'}'` = yes; then
12151 cat >>confdefs.h <<_ACEOF
12152#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12153_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012154
Guido van Rossume97ee181999-12-20 21:27:22 +000012155fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012156done
Guido van Rossume97ee181999-12-20 21:27:22 +000012157
Michael W. Hudson54241132001-12-07 15:38:26 +000012158
Guido van Rossume97ee181999-12-20 21:27:22 +000012159# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12160# loading of modules.
12161
Martin v. Löwis11437992002-04-12 09:54:03 +000012162echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
12163echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012164if test -z "$DYNLOADFILE"
12165then
12166 case $ac_sys_system/$ac_sys_release in
12167 AIX*) DYNLOADFILE="dynload_aix.o";;
12168 BeOS*) DYNLOADFILE="dynload_beos.o";;
12169 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000012170 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012171 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000012172 *)
12173 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
12174 # out any dynamic loading
12175 if test "$ac_cv_func_dlopen" = yes
12176 then DYNLOADFILE="dynload_shlib.o"
12177 else DYNLOADFILE="dynload_stub.o"
12178 fi
12179 ;;
12180 esac
12181fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012182echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
12183echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012184if test "$DYNLOADFILE" != "dynload_stub.o"
12185then
Martin v. Löwis11437992002-04-12 09:54:03 +000012186
12187cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012188#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012189_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012190
12191fi
12192
Neil Schemenauer4e425612001-06-19 15:44:15 +000012193# MACHDEP_OBJS can be set to platform-specific object files needed by Python
12194
Michael W. Hudson54241132001-12-07 15:38:26 +000012195
Martin v. Löwis11437992002-04-12 09:54:03 +000012196echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
12197echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012198if test -z "$MACHDEP_OBJS"
12199then
Jack Jansene578a632001-08-15 01:27:14 +000012200 MACHDEP_OBJS=$extra_machdep_objs
12201else
12202 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000012203fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012204echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
12205echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012206
Guido van Rossum627b2d71993-12-24 10:39:16 +000012207# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
Martin v. Löwis9c36c292002-12-21 18:34:06 +000012281
Martin v. Löwisd5843682002-11-21 20:41:28 +000012282for ac_func in alarm chown clock confstr ctermid execv \
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012283 fchdir fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012284 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
12285 getpriority getpwent getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000012286 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000012287 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000012288 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000012289 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000012290 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012291 sigaction siginterrupt sigrelse strftime strptime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000012292 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012293 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000012294do
Martin v. Löwis11437992002-04-12 09:54:03 +000012295as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12296echo "$as_me:$LINENO: checking for $ac_func" >&5
12297echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12298if eval "test \"\${$as_ac_var+set}\" = set"; then
12299 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012300else
Martin v. Löwis11437992002-04-12 09:54:03 +000012301 cat >conftest.$ac_ext <<_ACEOF
12302#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012303#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012304/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012305 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012306#include <assert.h>
12307/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012308#ifdef __cplusplus
12309extern "C"
12310#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012311/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012312 builtin and then its argument prototype would still apply. */
12313char $ac_func ();
12314char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012315
Barry Warsawfe33b792003-01-07 22:42:49 +000012316#ifdef F77_DUMMY_MAIN
12317# ifdef __cplusplus
12318 extern "C"
12319# endif
12320 int F77_DUMMY_MAIN() { return 1; }
12321#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012322int
12323main ()
12324{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012325/* The GNU C library defines this for functions which it implements
12326 to always fail with ENOSYS. Some functions are actually named
12327 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012328#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012329choke me
12330#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012331f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012332#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012333
Martin v. Löwis11437992002-04-12 09:54:03 +000012334 ;
12335 return 0;
12336}
12337_ACEOF
12338rm -f conftest.$ac_objext conftest$ac_exeext
12339if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12340 (eval $ac_link) 2>&5
12341 ac_status=$?
12342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12343 (exit $ac_status); } &&
12344 { ac_try='test -s conftest$ac_exeext'
12345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12346 (eval $ac_try) 2>&5
12347 ac_status=$?
12348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12349 (exit $ac_status); }; }; then
12350 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012351else
Martin v. Löwis11437992002-04-12 09:54:03 +000012352 echo "$as_me: failed program was:" >&5
12353cat conftest.$ac_ext >&5
12354eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012355fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012356rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012357fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012358echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12359echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12360if test `eval echo '${'$as_ac_var'}'` = yes; then
12361 cat >>confdefs.h <<_ACEOF
12362#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12363_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012364
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012365fi
12366done
12367
Michael W. Hudson54241132001-12-07 15:38:26 +000012368
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012369# For some functions, having a definition is not sufficient, since
12370# we want to take their address.
12371echo "$as_me:$LINENO: checking for chroot" >&5
12372echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12373cat >conftest.$ac_ext <<_ACEOF
12374#line $LINENO "configure"
12375#include "confdefs.h"
12376#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012377#ifdef F77_DUMMY_MAIN
12378# ifdef __cplusplus
12379 extern "C"
12380# endif
12381 int F77_DUMMY_MAIN() { return 1; }
12382#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012383int
12384main ()
12385{
12386void *x=chroot
12387 ;
12388 return 0;
12389}
12390_ACEOF
12391rm -f conftest.$ac_objext
12392if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12393 (eval $ac_compile) 2>&5
12394 ac_status=$?
12395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12396 (exit $ac_status); } &&
12397 { ac_try='test -s conftest.$ac_objext'
12398 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12399 (eval $ac_try) 2>&5
12400 ac_status=$?
12401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12402 (exit $ac_status); }; }; then
12403
12404cat >>confdefs.h <<\_ACEOF
12405#define HAVE_CHROOT 1
12406_ACEOF
12407
12408 echo "$as_me:$LINENO: result: yes" >&5
12409echo "${ECHO_T}yes" >&6
12410else
12411 echo "$as_me: failed program was:" >&5
12412cat conftest.$ac_ext >&5
12413echo "$as_me:$LINENO: result: no" >&5
12414echo "${ECHO_T}no" >&6
12415
12416fi
12417rm -f conftest.$ac_objext conftest.$ac_ext
12418echo "$as_me:$LINENO: checking for link" >&5
12419echo $ECHO_N "checking for link... $ECHO_C" >&6
12420cat >conftest.$ac_ext <<_ACEOF
12421#line $LINENO "configure"
12422#include "confdefs.h"
12423#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012424#ifdef F77_DUMMY_MAIN
12425# ifdef __cplusplus
12426 extern "C"
12427# endif
12428 int F77_DUMMY_MAIN() { return 1; }
12429#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012430int
12431main ()
12432{
12433void *x=link
12434 ;
12435 return 0;
12436}
12437_ACEOF
12438rm -f conftest.$ac_objext
12439if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12440 (eval $ac_compile) 2>&5
12441 ac_status=$?
12442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12443 (exit $ac_status); } &&
12444 { ac_try='test -s conftest.$ac_objext'
12445 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12446 (eval $ac_try) 2>&5
12447 ac_status=$?
12448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12449 (exit $ac_status); }; }; then
12450
12451cat >>confdefs.h <<\_ACEOF
12452#define HAVE_LINK 1
12453_ACEOF
12454
12455 echo "$as_me:$LINENO: result: yes" >&5
12456echo "${ECHO_T}yes" >&6
12457else
12458 echo "$as_me: failed program was:" >&5
12459cat conftest.$ac_ext >&5
12460echo "$as_me:$LINENO: result: no" >&5
12461echo "${ECHO_T}no" >&6
12462
12463fi
12464rm -f conftest.$ac_objext conftest.$ac_ext
12465echo "$as_me:$LINENO: checking for symlink" >&5
12466echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12467cat >conftest.$ac_ext <<_ACEOF
12468#line $LINENO "configure"
12469#include "confdefs.h"
12470#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012471#ifdef F77_DUMMY_MAIN
12472# ifdef __cplusplus
12473 extern "C"
12474# endif
12475 int F77_DUMMY_MAIN() { return 1; }
12476#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012477int
12478main ()
12479{
12480void *x=symlink
12481 ;
12482 return 0;
12483}
12484_ACEOF
12485rm -f conftest.$ac_objext
12486if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12487 (eval $ac_compile) 2>&5
12488 ac_status=$?
12489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12490 (exit $ac_status); } &&
12491 { ac_try='test -s conftest.$ac_objext'
12492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12493 (eval $ac_try) 2>&5
12494 ac_status=$?
12495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12496 (exit $ac_status); }; }; then
12497
12498cat >>confdefs.h <<\_ACEOF
12499#define HAVE_SYMLINK 1
12500_ACEOF
12501
12502 echo "$as_me:$LINENO: result: yes" >&5
12503echo "${ECHO_T}yes" >&6
12504else
12505 echo "$as_me: failed program was:" >&5
12506cat conftest.$ac_ext >&5
12507echo "$as_me:$LINENO: result: no" >&5
12508echo "${ECHO_T}no" >&6
12509
12510fi
12511rm -f conftest.$ac_objext conftest.$ac_ext
12512
Martin v. Löwisd5843682002-11-21 20:41:28 +000012513# On some systems (eg. FreeBSD 5), we would find a definition of the
12514# functions ctermid_r, setgroups in the library, but no prototype
12515# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12516# address to avoid compiler warnings and potential miscompilations
12517# because of the missing prototypes.
12518
12519echo "$as_me:$LINENO: checking for ctermid_r" >&5
12520echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
12521cat >conftest.$ac_ext <<_ACEOF
12522#line $LINENO "configure"
12523#include "confdefs.h"
12524
12525#include "confdefs.h"
12526#include <stdio.h>
12527
Barry Warsawfe33b792003-01-07 22:42:49 +000012528#ifdef F77_DUMMY_MAIN
12529# ifdef __cplusplus
12530 extern "C"
12531# endif
12532 int F77_DUMMY_MAIN() { return 1; }
12533#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012534int
12535main ()
12536{
12537void* p = ctermid_r
12538 ;
12539 return 0;
12540}
12541_ACEOF
12542rm -f conftest.$ac_objext
12543if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12544 (eval $ac_compile) 2>&5
12545 ac_status=$?
12546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12547 (exit $ac_status); } &&
12548 { ac_try='test -s conftest.$ac_objext'
12549 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12550 (eval $ac_try) 2>&5
12551 ac_status=$?
12552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12553 (exit $ac_status); }; }; then
12554
12555cat >>confdefs.h <<\_ACEOF
12556#define HAVE_CTERMID_R 1
12557_ACEOF
12558
12559 echo "$as_me:$LINENO: result: yes" >&5
12560echo "${ECHO_T}yes" >&6
12561else
12562 echo "$as_me: failed program was:" >&5
12563cat conftest.$ac_ext >&5
12564echo "$as_me:$LINENO: result: no" >&5
12565echo "${ECHO_T}no" >&6
12566
12567fi
12568rm -f conftest.$ac_objext conftest.$ac_ext
12569
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012570echo "$as_me:$LINENO: checking for flock" >&5
12571echo $ECHO_N "checking for flock... $ECHO_C" >&6
12572cat >conftest.$ac_ext <<_ACEOF
12573#line $LINENO "configure"
12574#include "confdefs.h"
12575
12576#include "confdefs.h"
12577#include <sys/file.h>
12578
12579#ifdef F77_DUMMY_MAIN
12580# ifdef __cplusplus
12581 extern "C"
12582# endif
12583 int F77_DUMMY_MAIN() { return 1; }
12584#endif
12585int
12586main ()
12587{
12588void* p = flock
12589 ;
12590 return 0;
12591}
12592_ACEOF
12593rm -f conftest.$ac_objext
12594if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12595 (eval $ac_compile) 2>&5
12596 ac_status=$?
12597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12598 (exit $ac_status); } &&
12599 { ac_try='test -s conftest.$ac_objext'
12600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12601 (eval $ac_try) 2>&5
12602 ac_status=$?
12603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12604 (exit $ac_status); }; }; then
12605
12606cat >>confdefs.h <<\_ACEOF
12607#define HAVE_FLOCK 1
12608_ACEOF
12609
12610 echo "$as_me:$LINENO: result: yes" >&5
12611echo "${ECHO_T}yes" >&6
12612else
12613 echo "$as_me: failed program was:" >&5
12614cat conftest.$ac_ext >&5
12615echo "$as_me:$LINENO: result: no" >&5
12616echo "${ECHO_T}no" >&6
12617
12618fi
12619rm -f conftest.$ac_objext conftest.$ac_ext
12620
12621echo "$as_me:$LINENO: checking for getpagesize" >&5
12622echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
12623cat >conftest.$ac_ext <<_ACEOF
12624#line $LINENO "configure"
12625#include "confdefs.h"
12626
12627#include "confdefs.h"
12628#include <unistd.h>
12629
12630#ifdef F77_DUMMY_MAIN
12631# ifdef __cplusplus
12632 extern "C"
12633# endif
12634 int F77_DUMMY_MAIN() { return 1; }
12635#endif
12636int
12637main ()
12638{
12639void* p = getpagesize
12640 ;
12641 return 0;
12642}
12643_ACEOF
12644rm -f conftest.$ac_objext
12645if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12646 (eval $ac_compile) 2>&5
12647 ac_status=$?
12648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12649 (exit $ac_status); } &&
12650 { ac_try='test -s conftest.$ac_objext'
12651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12652 (eval $ac_try) 2>&5
12653 ac_status=$?
12654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12655 (exit $ac_status); }; }; then
12656
12657cat >>confdefs.h <<\_ACEOF
12658#define HAVE_GETPAGESIZE 1
12659_ACEOF
12660
12661 echo "$as_me:$LINENO: result: yes" >&5
12662echo "${ECHO_T}yes" >&6
12663else
12664 echo "$as_me: failed program was:" >&5
12665cat conftest.$ac_ext >&5
12666echo "$as_me:$LINENO: result: no" >&5
12667echo "${ECHO_T}no" >&6
12668
12669fi
12670rm -f conftest.$ac_objext conftest.$ac_ext
12671
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012672for ac_prog in true
12673do
12674 # Extract the first word of "$ac_prog", so it can be a program name with args.
12675set dummy $ac_prog; ac_word=$2
12676echo "$as_me:$LINENO: checking for $ac_word" >&5
12677echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12678if test "${ac_cv_prog_TRUE+set}" = set; then
12679 echo $ECHO_N "(cached) $ECHO_C" >&6
12680else
12681 if test -n "$TRUE"; then
12682 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12683else
12684as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12685for as_dir in $PATH
12686do
12687 IFS=$as_save_IFS
12688 test -z "$as_dir" && as_dir=.
12689 for ac_exec_ext in '' $ac_executable_extensions; do
12690 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12691 ac_cv_prog_TRUE="$ac_prog"
12692 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12693 break 2
12694 fi
12695done
12696done
12697
12698fi
12699fi
12700TRUE=$ac_cv_prog_TRUE
12701if test -n "$TRUE"; then
12702 echo "$as_me:$LINENO: result: $TRUE" >&5
12703echo "${ECHO_T}$TRUE" >&6
12704else
12705 echo "$as_me:$LINENO: result: no" >&5
12706echo "${ECHO_T}no" >&6
12707fi
12708
12709 test -n "$TRUE" && break
12710done
12711test -n "$TRUE" || TRUE="/bin/true"
12712
12713
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012714echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
12715echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
12716if test "${ac_cv_lib_c_inet_aton+set}" = set; then
12717 echo $ECHO_N "(cached) $ECHO_C" >&6
12718else
12719 ac_check_lib_save_LIBS=$LIBS
12720LIBS="-lc $LIBS"
12721cat >conftest.$ac_ext <<_ACEOF
12722#line $LINENO "configure"
12723#include "confdefs.h"
12724
12725/* Override any gcc2 internal prototype to avoid an error. */
12726#ifdef __cplusplus
12727extern "C"
12728#endif
12729/* We use char because int might match the return type of a gcc2
12730 builtin and then its argument prototype would still apply. */
12731char inet_aton ();
12732#ifdef F77_DUMMY_MAIN
12733# ifdef __cplusplus
12734 extern "C"
12735# endif
12736 int F77_DUMMY_MAIN() { return 1; }
12737#endif
12738int
12739main ()
12740{
12741inet_aton ();
12742 ;
12743 return 0;
12744}
12745_ACEOF
12746rm -f conftest.$ac_objext conftest$ac_exeext
12747if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12748 (eval $ac_link) 2>&5
12749 ac_status=$?
12750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12751 (exit $ac_status); } &&
12752 { ac_try='test -s conftest$ac_exeext'
12753 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12754 (eval $ac_try) 2>&5
12755 ac_status=$?
12756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12757 (exit $ac_status); }; }; then
12758 ac_cv_lib_c_inet_aton=yes
12759else
12760 echo "$as_me: failed program was:" >&5
12761cat conftest.$ac_ext >&5
12762ac_cv_lib_c_inet_aton=no
12763fi
12764rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12765LIBS=$ac_check_lib_save_LIBS
12766fi
12767echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
12768echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
12769if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012770 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012771else
12772
12773echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
12774echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
12775if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
12776 echo $ECHO_N "(cached) $ECHO_C" >&6
12777else
12778 ac_check_lib_save_LIBS=$LIBS
12779LIBS="-lresolv $LIBS"
12780cat >conftest.$ac_ext <<_ACEOF
12781#line $LINENO "configure"
12782#include "confdefs.h"
12783
12784/* Override any gcc2 internal prototype to avoid an error. */
12785#ifdef __cplusplus
12786extern "C"
12787#endif
12788/* We use char because int might match the return type of a gcc2
12789 builtin and then its argument prototype would still apply. */
12790char inet_aton ();
12791#ifdef F77_DUMMY_MAIN
12792# ifdef __cplusplus
12793 extern "C"
12794# endif
12795 int F77_DUMMY_MAIN() { return 1; }
12796#endif
12797int
12798main ()
12799{
12800inet_aton ();
12801 ;
12802 return 0;
12803}
12804_ACEOF
12805rm -f conftest.$ac_objext conftest$ac_exeext
12806if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12807 (eval $ac_link) 2>&5
12808 ac_status=$?
12809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12810 (exit $ac_status); } &&
12811 { ac_try='test -s conftest$ac_exeext'
12812 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12813 (eval $ac_try) 2>&5
12814 ac_status=$?
12815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12816 (exit $ac_status); }; }; then
12817 ac_cv_lib_resolv_inet_aton=yes
12818else
12819 echo "$as_me: failed program was:" >&5
12820cat conftest.$ac_ext >&5
12821ac_cv_lib_resolv_inet_aton=no
12822fi
12823rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12824LIBS=$ac_check_lib_save_LIBS
12825fi
12826echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
12827echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
12828if test $ac_cv_lib_resolv_inet_aton = yes; then
12829 cat >>confdefs.h <<_ACEOF
12830#define HAVE_LIBRESOLV 1
12831_ACEOF
12832
12833 LIBS="-lresolv $LIBS"
12834
12835fi
12836
12837
12838fi
12839
12840
Martin v. Löwise9416172003-05-03 10:12:45 +000012841echo "$as_me:$LINENO: checking for hstrerror" >&5
12842echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
12843cat >conftest.$ac_ext <<_ACEOF
12844#line $LINENO "configure"
12845#include "confdefs.h"
12846
12847#include "confdefs.h"
12848#include <netdb.h>
12849
12850#ifdef F77_DUMMY_MAIN
12851# ifdef __cplusplus
12852 extern "C"
12853# endif
12854 int F77_DUMMY_MAIN() { return 1; }
12855#endif
12856int
12857main ()
12858{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012859void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012860 ;
12861 return 0;
12862}
12863_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012864rm -f conftest.$ac_objext conftest$ac_exeext
12865if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12866 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000012867 ac_status=$?
12868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12869 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012870 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000012871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12872 (eval $ac_try) 2>&5
12873 ac_status=$?
12874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12875 (exit $ac_status); }; }; then
12876
12877cat >>confdefs.h <<\_ACEOF
12878#define HAVE_HSTRERROR 1
12879_ACEOF
12880
12881 echo "$as_me:$LINENO: result: yes" >&5
12882echo "${ECHO_T}yes" >&6
12883else
12884 echo "$as_me: failed program was:" >&5
12885cat conftest.$ac_ext >&5
12886echo "$as_me:$LINENO: result: no" >&5
12887echo "${ECHO_T}no" >&6
12888
12889fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012890rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012891
12892echo "$as_me:$LINENO: checking for inet_aton" >&5
12893echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
12894cat >conftest.$ac_ext <<_ACEOF
12895#line $LINENO "configure"
12896#include "confdefs.h"
12897
12898#include "confdefs.h"
12899#include <sys/socket.h>
12900#include <netinet/in.h>
12901#include <arpa/inet.h>
12902
12903#ifdef F77_DUMMY_MAIN
12904# ifdef __cplusplus
12905 extern "C"
12906# endif
12907 int F77_DUMMY_MAIN() { return 1; }
12908#endif
12909int
12910main ()
12911{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012912void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012913 ;
12914 return 0;
12915}
12916_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012917rm -f conftest.$ac_objext conftest$ac_exeext
12918if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12919 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000012920 ac_status=$?
12921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12922 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012923 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000012924 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12925 (eval $ac_try) 2>&5
12926 ac_status=$?
12927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12928 (exit $ac_status); }; }; then
12929
12930cat >>confdefs.h <<\_ACEOF
12931#define HAVE_INET_ATON 1
12932_ACEOF
12933
12934 echo "$as_me:$LINENO: result: yes" >&5
12935echo "${ECHO_T}yes" >&6
12936else
12937 echo "$as_me: failed program was:" >&5
12938cat conftest.$ac_ext >&5
12939echo "$as_me:$LINENO: result: no" >&5
12940echo "${ECHO_T}no" >&6
12941
12942fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012943rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012944
12945echo "$as_me:$LINENO: checking for inet_pton" >&5
12946echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
12947cat >conftest.$ac_ext <<_ACEOF
12948#line $LINENO "configure"
12949#include "confdefs.h"
12950
12951#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012952#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012953#include <sys/socket.h>
12954#include <netinet/in.h>
12955#include <arpa/inet.h>
12956
12957#ifdef F77_DUMMY_MAIN
12958# ifdef __cplusplus
12959 extern "C"
12960# endif
12961 int F77_DUMMY_MAIN() { return 1; }
12962#endif
12963int
12964main ()
12965{
12966void* p = inet_pton
12967 ;
12968 return 0;
12969}
12970_ACEOF
12971rm -f conftest.$ac_objext
12972if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12973 (eval $ac_compile) 2>&5
12974 ac_status=$?
12975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12976 (exit $ac_status); } &&
12977 { ac_try='test -s conftest.$ac_objext'
12978 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12979 (eval $ac_try) 2>&5
12980 ac_status=$?
12981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12982 (exit $ac_status); }; }; then
12983
12984cat >>confdefs.h <<\_ACEOF
12985#define HAVE_INET_PTON 1
12986_ACEOF
12987
12988 echo "$as_me:$LINENO: result: yes" >&5
12989echo "${ECHO_T}yes" >&6
12990else
12991 echo "$as_me: failed program was:" >&5
12992cat conftest.$ac_ext >&5
12993echo "$as_me:$LINENO: result: no" >&5
12994echo "${ECHO_T}no" >&6
12995
12996fi
12997rm -f conftest.$ac_objext conftest.$ac_ext
12998
Martin v. Löwisd5843682002-11-21 20:41:28 +000012999echo "$as_me:$LINENO: checking for setgroups" >&5
13000echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
13001cat >conftest.$ac_ext <<_ACEOF
13002#line $LINENO "configure"
13003#include "confdefs.h"
13004
13005#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013006#include <unistd.h>
Martin v. Löwisd5843682002-11-21 20:41:28 +000013007
Barry Warsawfe33b792003-01-07 22:42:49 +000013008#ifdef F77_DUMMY_MAIN
13009# ifdef __cplusplus
13010 extern "C"
13011# endif
13012 int F77_DUMMY_MAIN() { return 1; }
13013#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000013014int
13015main ()
13016{
13017void* p = setgroups
13018 ;
13019 return 0;
13020}
13021_ACEOF
13022rm -f conftest.$ac_objext
13023if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13024 (eval $ac_compile) 2>&5
13025 ac_status=$?
13026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13027 (exit $ac_status); } &&
13028 { ac_try='test -s conftest.$ac_objext'
13029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13030 (eval $ac_try) 2>&5
13031 ac_status=$?
13032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13033 (exit $ac_status); }; }; then
13034
13035cat >>confdefs.h <<\_ACEOF
13036#define HAVE_SETGROUPS 1
13037_ACEOF
13038
13039 echo "$as_me:$LINENO: result: yes" >&5
13040echo "${ECHO_T}yes" >&6
13041else
13042 echo "$as_me: failed program was:" >&5
13043cat conftest.$ac_ext >&5
13044echo "$as_me:$LINENO: result: no" >&5
13045echo "${ECHO_T}no" >&6
13046
13047fi
13048rm -f conftest.$ac_objext conftest.$ac_ext
13049
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013050# check for openpty and forkpty
13051
Martin v. Löwis11437992002-04-12 09:54:03 +000013052
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013053for ac_func in openpty
13054do
Martin v. Löwis11437992002-04-12 09:54:03 +000013055as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13056echo "$as_me:$LINENO: checking for $ac_func" >&5
13057echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13058if eval "test \"\${$as_ac_var+set}\" = set"; then
13059 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013060else
Martin v. Löwis11437992002-04-12 09:54:03 +000013061 cat >conftest.$ac_ext <<_ACEOF
13062#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013063#include "confdefs.h"
13064/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013065 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013066#include <assert.h>
13067/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013068#ifdef __cplusplus
13069extern "C"
13070#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013071/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013072 builtin and then its argument prototype would still apply. */
13073char $ac_func ();
13074char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013075
Barry Warsawfe33b792003-01-07 22:42:49 +000013076#ifdef F77_DUMMY_MAIN
13077# ifdef __cplusplus
13078 extern "C"
13079# endif
13080 int F77_DUMMY_MAIN() { return 1; }
13081#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013082int
13083main ()
13084{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013085/* The GNU C library defines this for functions which it implements
13086 to always fail with ENOSYS. Some functions are actually named
13087 something starting with __ and the normal name is an alias. */
13088#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13089choke me
13090#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013091f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013092#endif
13093
Martin v. Löwis11437992002-04-12 09:54:03 +000013094 ;
13095 return 0;
13096}
13097_ACEOF
13098rm -f conftest.$ac_objext conftest$ac_exeext
13099if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13100 (eval $ac_link) 2>&5
13101 ac_status=$?
13102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13103 (exit $ac_status); } &&
13104 { ac_try='test -s conftest$ac_exeext'
13105 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13106 (eval $ac_try) 2>&5
13107 ac_status=$?
13108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13109 (exit $ac_status); }; }; then
13110 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013111else
Martin v. Löwis11437992002-04-12 09:54:03 +000013112 echo "$as_me: failed program was:" >&5
13113cat conftest.$ac_ext >&5
13114eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013115fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013116rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013117fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013118echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13119echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13120if test `eval echo '${'$as_ac_var'}'` = yes; then
13121 cat >>confdefs.h <<_ACEOF
13122#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13123_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013124
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013125else
Martin v. Löwis11437992002-04-12 09:54:03 +000013126 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
13127echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
13128if test "${ac_cv_lib_util_openpty+set}" = set; then
13129 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013130else
Martin v. Löwis11437992002-04-12 09:54:03 +000013131 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013132LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013133cat >conftest.$ac_ext <<_ACEOF
13134#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013135#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013136
Fred Drake8cef4cf2000-06-28 16:40:38 +000013137/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013138#ifdef __cplusplus
13139extern "C"
13140#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013141/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013142 builtin and then its argument prototype would still apply. */
13143char openpty ();
Barry Warsawfe33b792003-01-07 22:42:49 +000013144#ifdef F77_DUMMY_MAIN
13145# ifdef __cplusplus
13146 extern "C"
13147# endif
13148 int F77_DUMMY_MAIN() { return 1; }
13149#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013150int
13151main ()
13152{
13153openpty ();
13154 ;
13155 return 0;
13156}
13157_ACEOF
13158rm -f conftest.$ac_objext conftest$ac_exeext
13159if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13160 (eval $ac_link) 2>&5
13161 ac_status=$?
13162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13163 (exit $ac_status); } &&
13164 { ac_try='test -s conftest$ac_exeext'
13165 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13166 (eval $ac_try) 2>&5
13167 ac_status=$?
13168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13169 (exit $ac_status); }; }; then
13170 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013171else
Martin v. Löwis11437992002-04-12 09:54:03 +000013172 echo "$as_me: failed program was:" >&5
13173cat conftest.$ac_ext >&5
13174ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013175fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013176rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13177LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013178fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013179echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
13180echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
13181if test $ac_cv_lib_util_openpty = yes; then
13182 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013183#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013184_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013185 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013186fi
13187
13188fi
13189done
13190
Martin v. Löwis11437992002-04-12 09:54:03 +000013191
Fred Drake8cef4cf2000-06-28 16:40:38 +000013192for ac_func in forkpty
13193do
Martin v. Löwis11437992002-04-12 09:54:03 +000013194as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13195echo "$as_me:$LINENO: checking for $ac_func" >&5
13196echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13197if eval "test \"\${$as_ac_var+set}\" = set"; then
13198 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013199else
Martin v. Löwis11437992002-04-12 09:54:03 +000013200 cat >conftest.$ac_ext <<_ACEOF
13201#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013202#include "confdefs.h"
13203/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013204 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000013205#include <assert.h>
13206/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013207#ifdef __cplusplus
13208extern "C"
13209#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013210/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013211 builtin and then its argument prototype would still apply. */
13212char $ac_func ();
13213char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000013214
Barry Warsawfe33b792003-01-07 22:42:49 +000013215#ifdef F77_DUMMY_MAIN
13216# ifdef __cplusplus
13217 extern "C"
13218# endif
13219 int F77_DUMMY_MAIN() { return 1; }
13220#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013221int
13222main ()
13223{
Fred Drake8cef4cf2000-06-28 16:40:38 +000013224/* The GNU C library defines this for functions which it implements
13225 to always fail with ENOSYS. Some functions are actually named
13226 something starting with __ and the normal name is an alias. */
13227#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13228choke me
13229#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013230f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000013231#endif
13232
Martin v. Löwis11437992002-04-12 09:54:03 +000013233 ;
13234 return 0;
13235}
13236_ACEOF
13237rm -f conftest.$ac_objext conftest$ac_exeext
13238if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13239 (eval $ac_link) 2>&5
13240 ac_status=$?
13241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13242 (exit $ac_status); } &&
13243 { ac_try='test -s conftest$ac_exeext'
13244 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13245 (eval $ac_try) 2>&5
13246 ac_status=$?
13247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13248 (exit $ac_status); }; }; then
13249 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013250else
Martin v. Löwis11437992002-04-12 09:54:03 +000013251 echo "$as_me: failed program was:" >&5
13252cat conftest.$ac_ext >&5
13253eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013254fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013255rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013256fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013257echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13258echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13259if test `eval echo '${'$as_ac_var'}'` = yes; then
13260 cat >>confdefs.h <<_ACEOF
13261#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13262_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013263
Fred Drake8cef4cf2000-06-28 16:40:38 +000013264else
Martin v. Löwis11437992002-04-12 09:54:03 +000013265 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
13266echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
13267if test "${ac_cv_lib_util_forkpty+set}" = set; then
13268 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013269else
Martin v. Löwis11437992002-04-12 09:54:03 +000013270 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013271LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013272cat >conftest.$ac_ext <<_ACEOF
13273#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013274#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013275
Fred Drake8cef4cf2000-06-28 16:40:38 +000013276/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013277#ifdef __cplusplus
13278extern "C"
13279#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013280/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013281 builtin and then its argument prototype would still apply. */
13282char forkpty ();
Barry Warsawfe33b792003-01-07 22:42:49 +000013283#ifdef F77_DUMMY_MAIN
13284# ifdef __cplusplus
13285 extern "C"
13286# endif
13287 int F77_DUMMY_MAIN() { return 1; }
13288#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013289int
13290main ()
13291{
13292forkpty ();
13293 ;
13294 return 0;
13295}
13296_ACEOF
13297rm -f conftest.$ac_objext conftest$ac_exeext
13298if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13299 (eval $ac_link) 2>&5
13300 ac_status=$?
13301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13302 (exit $ac_status); } &&
13303 { ac_try='test -s conftest$ac_exeext'
13304 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13305 (eval $ac_try) 2>&5
13306 ac_status=$?
13307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13308 (exit $ac_status); }; }; then
13309 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013310else
Martin v. Löwis11437992002-04-12 09:54:03 +000013311 echo "$as_me: failed program was:" >&5
13312cat conftest.$ac_ext >&5
13313ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013314fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013315rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13316LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013317fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013318echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
13319echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
13320if test $ac_cv_lib_util_forkpty = yes; then
13321 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013322#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013323_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013324 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013325fi
13326
13327fi
13328done
13329
Jack Jansendd19cf82001-12-06 22:36:17 +000013330
Michael W. Hudson54241132001-12-07 15:38:26 +000013331# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013332
13333
13334
13335
13336
13337
Fred Drake8cef4cf2000-06-28 16:40:38 +000013338for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
13339do
Martin v. Löwis11437992002-04-12 09:54:03 +000013340as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13341echo "$as_me:$LINENO: checking for $ac_func" >&5
13342echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13343if eval "test \"\${$as_ac_var+set}\" = set"; then
13344 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013345else
Martin v. Löwis11437992002-04-12 09:54:03 +000013346 cat >conftest.$ac_ext <<_ACEOF
13347#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013348#include "confdefs.h"
13349/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013350 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013351#include <assert.h>
13352/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013353#ifdef __cplusplus
13354extern "C"
13355#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013356/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013357 builtin and then its argument prototype would still apply. */
13358char $ac_func ();
13359char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013360
Barry Warsawfe33b792003-01-07 22:42:49 +000013361#ifdef F77_DUMMY_MAIN
13362# ifdef __cplusplus
13363 extern "C"
13364# endif
13365 int F77_DUMMY_MAIN() { return 1; }
13366#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013367int
13368main ()
13369{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013370/* The GNU C library defines this for functions which it implements
13371 to always fail with ENOSYS. Some functions are actually named
13372 something starting with __ and the normal name is an alias. */
13373#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13374choke me
13375#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013376f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013377#endif
13378
Martin v. Löwis11437992002-04-12 09:54:03 +000013379 ;
13380 return 0;
13381}
13382_ACEOF
13383rm -f conftest.$ac_objext conftest$ac_exeext
13384if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13385 (eval $ac_link) 2>&5
13386 ac_status=$?
13387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13388 (exit $ac_status); } &&
13389 { ac_try='test -s conftest$ac_exeext'
13390 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13391 (eval $ac_try) 2>&5
13392 ac_status=$?
13393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13394 (exit $ac_status); }; }; then
13395 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013396else
Martin v. Löwis11437992002-04-12 09:54:03 +000013397 echo "$as_me: failed program was:" >&5
13398cat conftest.$ac_ext >&5
13399eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013400fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013401rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013402fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013403echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13404echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13405if test `eval echo '${'$as_ac_var'}'` = yes; then
13406 cat >>confdefs.h <<_ACEOF
13407#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13408_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000013409
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013410fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000013411done
13412
Michael W. Hudson54241132001-12-07 15:38:26 +000013413
Martin v. Löwis11437992002-04-12 09:54:03 +000013414
13415
13416
13417
13418
Martin v. Löwis1142de32002-03-29 16:28:31 +000013419for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000013420do
Martin v. Löwis11437992002-04-12 09:54:03 +000013421as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13422echo "$as_me:$LINENO: checking for $ac_func" >&5
13423echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13424if eval "test \"\${$as_ac_var+set}\" = set"; then
13425 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013426else
Martin v. Löwis11437992002-04-12 09:54:03 +000013427 cat >conftest.$ac_ext <<_ACEOF
13428#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013429#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013430/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013431 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013432#include <assert.h>
13433/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013434#ifdef __cplusplus
13435extern "C"
13436#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013437/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013438 builtin and then its argument prototype would still apply. */
13439char $ac_func ();
13440char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013441
Barry Warsawfe33b792003-01-07 22:42:49 +000013442#ifdef F77_DUMMY_MAIN
13443# ifdef __cplusplus
13444 extern "C"
13445# endif
13446 int F77_DUMMY_MAIN() { return 1; }
13447#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013448int
13449main ()
13450{
Guido van Rossum627b2d71993-12-24 10:39:16 +000013451/* The GNU C library defines this for functions which it implements
13452 to always fail with ENOSYS. Some functions are actually named
13453 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013454#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013455choke me
13456#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013457f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013458#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013459
Martin v. Löwis11437992002-04-12 09:54:03 +000013460 ;
13461 return 0;
13462}
13463_ACEOF
13464rm -f conftest.$ac_objext conftest$ac_exeext
13465if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13466 (eval $ac_link) 2>&5
13467 ac_status=$?
13468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13469 (exit $ac_status); } &&
13470 { ac_try='test -s conftest$ac_exeext'
13471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13472 (eval $ac_try) 2>&5
13473 ac_status=$?
13474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13475 (exit $ac_status); }; }; then
13476 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013477else
Martin v. Löwis11437992002-04-12 09:54:03 +000013478 echo "$as_me: failed program was:" >&5
13479cat conftest.$ac_ext >&5
13480eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013481fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013482rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000013483fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013484echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13485echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13486if test `eval echo '${'$as_ac_var'}'` = yes; then
13487 cat >>confdefs.h <<_ACEOF
13488#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13489_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000013490
Martin v. Löwis1142de32002-03-29 16:28:31 +000013491else
Martin v. Löwis11437992002-04-12 09:54:03 +000013492 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013493fi
13494done
13495
13496
Martin v. Löwis11437992002-04-12 09:54:03 +000013497
Martin v. Löwis1142de32002-03-29 16:28:31 +000013498for ac_func in getpgrp
13499do
Martin v. Löwis11437992002-04-12 09:54:03 +000013500as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13501echo "$as_me:$LINENO: checking for $ac_func" >&5
13502echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13503if eval "test \"\${$as_ac_var+set}\" = set"; then
13504 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000013505else
Martin v. Löwis11437992002-04-12 09:54:03 +000013506 cat >conftest.$ac_ext <<_ACEOF
13507#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013508#include "confdefs.h"
13509/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013510 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000013511#include <assert.h>
13512/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013513#ifdef __cplusplus
13514extern "C"
13515#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013516/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013517 builtin and then its argument prototype would still apply. */
13518char $ac_func ();
13519char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000013520
Barry Warsawfe33b792003-01-07 22:42:49 +000013521#ifdef F77_DUMMY_MAIN
13522# ifdef __cplusplus
13523 extern "C"
13524# endif
13525 int F77_DUMMY_MAIN() { return 1; }
13526#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013527int
13528main ()
13529{
Martin v. Löwis1142de32002-03-29 16:28:31 +000013530/* The GNU C library defines this for functions which it implements
13531 to always fail with ENOSYS. Some functions are actually named
13532 something starting with __ and the normal name is an alias. */
13533#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13534choke me
13535#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013536f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000013537#endif
13538
Martin v. Löwis11437992002-04-12 09:54:03 +000013539 ;
13540 return 0;
13541}
13542_ACEOF
13543rm -f conftest.$ac_objext conftest$ac_exeext
13544if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13545 (eval $ac_link) 2>&5
13546 ac_status=$?
13547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13548 (exit $ac_status); } &&
13549 { ac_try='test -s conftest$ac_exeext'
13550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13551 (eval $ac_try) 2>&5
13552 ac_status=$?
13553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13554 (exit $ac_status); }; }; then
13555 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013556else
Martin v. Löwis11437992002-04-12 09:54:03 +000013557 echo "$as_me: failed program was:" >&5
13558cat conftest.$ac_ext >&5
13559eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013560fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013561rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013562fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013563echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13564echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13565if test `eval echo '${'$as_ac_var'}'` = yes; then
13566 cat >>confdefs.h <<_ACEOF
13567#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13568_ACEOF
13569 cat >conftest.$ac_ext <<_ACEOF
13570#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013571#include "confdefs.h"
13572#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000013573#ifdef F77_DUMMY_MAIN
13574# ifdef __cplusplus
13575 extern "C"
13576# endif
13577 int F77_DUMMY_MAIN() { return 1; }
13578#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013579int
13580main ()
13581{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013582getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013583 ;
13584 return 0;
13585}
13586_ACEOF
13587rm -f conftest.$ac_objext
13588if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13589 (eval $ac_compile) 2>&5
13590 ac_status=$?
13591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13592 (exit $ac_status); } &&
13593 { ac_try='test -s conftest.$ac_objext'
13594 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13595 (eval $ac_try) 2>&5
13596 ac_status=$?
13597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13598 (exit $ac_status); }; }; then
13599
13600cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013601#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013602_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013603
Martin v. Löwis11437992002-04-12 09:54:03 +000013604
Guido van Rossumf78abae1997-01-21 22:02:36 +000013605else
Martin v. Löwis11437992002-04-12 09:54:03 +000013606 echo "$as_me: failed program was:" >&5
13607cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013608fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013609rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013610
Guido van Rossum627b2d71993-12-24 10:39:16 +000013611fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013612done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013613
Jack Jansen150753c2003-03-29 22:07:47 +000013614
13615for ac_func in setpgrp
13616do
13617as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13618echo "$as_me:$LINENO: checking for $ac_func" >&5
13619echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13620if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013621 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013622else
Martin v. Löwis11437992002-04-12 09:54:03 +000013623 cat >conftest.$ac_ext <<_ACEOF
13624#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013625#include "confdefs.h"
Jack Jansen150753c2003-03-29 22:07:47 +000013626/* System header to define __stub macros and hopefully few prototypes,
13627 which can conflict with char $ac_func (); below. */
13628#include <assert.h>
13629/* Override any gcc2 internal prototype to avoid an error. */
13630#ifdef __cplusplus
13631extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000013632#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013633/* We use char because int might match the return type of a gcc2
13634 builtin and then its argument prototype would still apply. */
13635char $ac_func ();
13636char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013637
Barry Warsawfe33b792003-01-07 22:42:49 +000013638#ifdef F77_DUMMY_MAIN
13639# ifdef __cplusplus
13640 extern "C"
13641# endif
13642 int F77_DUMMY_MAIN() { return 1; }
13643#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013644int
13645main ()
13646{
Jack Jansen150753c2003-03-29 22:07:47 +000013647/* The GNU C library defines this for functions which it implements
13648 to always fail with ENOSYS. Some functions are actually named
13649 something starting with __ and the normal name is an alias. */
13650#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13651choke me
13652#else
13653f = $ac_func;
13654#endif
13655
Martin v. Löwis11437992002-04-12 09:54:03 +000013656 ;
13657 return 0;
13658}
13659_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013660rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000013661if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13662 (eval $ac_link) 2>&5
13663 ac_status=$?
13664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013665 (exit $ac_status); } &&
13666 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013667 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13668 (eval $ac_try) 2>&5
13669 ac_status=$?
13670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13671 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000013672 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013673else
Jack Jansen150753c2003-03-29 22:07:47 +000013674 echo "$as_me: failed program was:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013675cat conftest.$ac_ext >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013676eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013677fi
Jack Jansen150753c2003-03-29 22:07:47 +000013678rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013679fi
Jack Jansen150753c2003-03-29 22:07:47 +000013680echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13681echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13682if test `eval echo '${'$as_ac_var'}'` = yes; then
13683 cat >>confdefs.h <<_ACEOF
13684#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13685_ACEOF
13686 cat >conftest.$ac_ext <<_ACEOF
13687#line $LINENO "configure"
13688#include "confdefs.h"
13689#include <unistd.h>
13690#ifdef F77_DUMMY_MAIN
13691# ifdef __cplusplus
13692 extern "C"
13693# endif
13694 int F77_DUMMY_MAIN() { return 1; }
13695#endif
13696int
13697main ()
13698{
13699setpgrp(0,0);
13700 ;
13701 return 0;
13702}
13703_ACEOF
13704rm -f conftest.$ac_objext
13705if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13706 (eval $ac_compile) 2>&5
13707 ac_status=$?
13708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13709 (exit $ac_status); } &&
13710 { ac_try='test -s conftest.$ac_objext'
13711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13712 (eval $ac_try) 2>&5
13713 ac_status=$?
13714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13715 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013716
13717cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013718#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013719_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013720
Jack Jansen150753c2003-03-29 22:07:47 +000013721
13722else
13723 echo "$as_me: failed program was:" >&5
13724cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013725fi
Jack Jansen150753c2003-03-29 22:07:47 +000013726rm -f conftest.$ac_objext conftest.$ac_ext
13727
13728fi
13729done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013730
Martin v. Löwis11437992002-04-12 09:54:03 +000013731
Thomas Wouters3a584202000-08-05 23:28:51 +000013732for ac_func in gettimeofday
13733do
Martin v. Löwis11437992002-04-12 09:54:03 +000013734as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13735echo "$as_me:$LINENO: checking for $ac_func" >&5
13736echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13737if eval "test \"\${$as_ac_var+set}\" = set"; then
13738 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013739else
Martin v. Löwis11437992002-04-12 09:54:03 +000013740 cat >conftest.$ac_ext <<_ACEOF
13741#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013742#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013743/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013744 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013745#include <assert.h>
13746/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013747#ifdef __cplusplus
13748extern "C"
13749#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013750/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013751 builtin and then its argument prototype would still apply. */
13752char $ac_func ();
13753char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013754
Barry Warsawfe33b792003-01-07 22:42:49 +000013755#ifdef F77_DUMMY_MAIN
13756# ifdef __cplusplus
13757 extern "C"
13758# endif
13759 int F77_DUMMY_MAIN() { return 1; }
13760#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013761int
13762main ()
13763{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013764/* The GNU C library defines this for functions which it implements
13765 to always fail with ENOSYS. Some functions are actually named
13766 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013767#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013768choke me
13769#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013770f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013771#endif
13772
Martin v. Löwis11437992002-04-12 09:54:03 +000013773 ;
13774 return 0;
13775}
13776_ACEOF
13777rm -f conftest.$ac_objext conftest$ac_exeext
13778if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13779 (eval $ac_link) 2>&5
13780 ac_status=$?
13781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13782 (exit $ac_status); } &&
13783 { ac_try='test -s conftest$ac_exeext'
13784 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13785 (eval $ac_try) 2>&5
13786 ac_status=$?
13787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13788 (exit $ac_status); }; }; then
13789 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013790else
Martin v. Löwis11437992002-04-12 09:54:03 +000013791 echo "$as_me: failed program was:" >&5
13792cat conftest.$ac_ext >&5
13793eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013794fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013795rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013796fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013797echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13798echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13799if test `eval echo '${'$as_ac_var'}'` = yes; then
13800 cat >>confdefs.h <<_ACEOF
13801#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13802_ACEOF
13803 cat >conftest.$ac_ext <<_ACEOF
13804#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013805#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013806#include <sys/time.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000013807#ifdef F77_DUMMY_MAIN
13808# ifdef __cplusplus
13809 extern "C"
13810# endif
13811 int F77_DUMMY_MAIN() { return 1; }
13812#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013813int
13814main ()
13815{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013816gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013817 ;
13818 return 0;
13819}
13820_ACEOF
13821rm -f conftest.$ac_objext
13822if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13823 (eval $ac_compile) 2>&5
13824 ac_status=$?
13825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13826 (exit $ac_status); } &&
13827 { ac_try='test -s conftest.$ac_objext'
13828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13829 (eval $ac_try) 2>&5
13830 ac_status=$?
13831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13832 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013833 :
13834else
Martin v. Löwis11437992002-04-12 09:54:03 +000013835 echo "$as_me: failed program was:" >&5
13836cat conftest.$ac_ext >&5
13837
13838cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013839#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013840_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013841
Martin v. Löwis11437992002-04-12 09:54:03 +000013842
Guido van Rossum627b2d71993-12-24 10:39:16 +000013843fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013844rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013845
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013846fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013847done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013848
Michael W. Hudson54241132001-12-07 15:38:26 +000013849
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013850echo "$as_me:$LINENO: checking for major" >&5
13851echo $ECHO_N "checking for major... $ECHO_C" >&6
13852cat >conftest.$ac_ext <<_ACEOF
13853#line $LINENO "configure"
13854#include "confdefs.h"
13855
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013856#if defined(MAJOR_IN_MKDEV)
13857#include <sys/mkdev.h>
13858#elif defined(MAJOR_IN_SYSMACROS)
13859#include <sys/sysmacros.h>
13860#else
13861#include <sys/types.h>
13862#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013863
Barry Warsawfe33b792003-01-07 22:42:49 +000013864#ifdef F77_DUMMY_MAIN
13865# ifdef __cplusplus
13866 extern "C"
13867# endif
13868 int F77_DUMMY_MAIN() { return 1; }
13869#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013870int
13871main ()
13872{
13873
13874 makedev(major(0),minor(0));
13875
13876 ;
13877 return 0;
13878}
13879_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000013880rm -f conftest.$ac_objext conftest$ac_exeext
13881if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13882 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013883 ac_status=$?
13884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13885 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000013886 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13888 (eval $ac_try) 2>&5
13889 ac_status=$?
13890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13891 (exit $ac_status); }; }; then
13892
13893
13894cat >>confdefs.h <<\_ACEOF
13895#define HAVE_DEVICE_MACROS 1
13896_ACEOF
13897
13898 echo "$as_me:$LINENO: result: yes" >&5
13899echo "${ECHO_T}yes" >&6
13900
13901else
13902 echo "$as_me: failed program was:" >&5
13903cat conftest.$ac_ext >&5
13904
13905 echo "$as_me:$LINENO: result: no" >&5
13906echo "${ECHO_T}no" >&6
13907
13908fi
Martin v. Löwise3271202002-11-07 07:42:30 +000013909rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013910
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013911# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013912# for [no]getaddrinfo in netdb.h.
13913echo "$as_me:$LINENO: checking for getaddrinfo" >&5
13914echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
13915cat >conftest.$ac_ext <<_ACEOF
13916#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013917#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013918
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013919#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013920#include <sys/socket.h>
13921#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013922#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013923
Barry Warsawfe33b792003-01-07 22:42:49 +000013924#ifdef F77_DUMMY_MAIN
13925# ifdef __cplusplus
13926 extern "C"
13927# endif
13928 int F77_DUMMY_MAIN() { return 1; }
13929#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013930int
13931main ()
13932{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013933
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013934getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013935
Martin v. Löwis11437992002-04-12 09:54:03 +000013936 ;
13937 return 0;
13938}
13939_ACEOF
13940rm -f conftest.$ac_objext conftest$ac_exeext
13941if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13942 (eval $ac_link) 2>&5
13943 ac_status=$?
13944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13945 (exit $ac_status); } &&
13946 { ac_try='test -s conftest$ac_exeext'
13947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13948 (eval $ac_try) 2>&5
13949 ac_status=$?
13950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13951 (exit $ac_status); }; }; then
13952
13953echo "$as_me:$LINENO: result: yes" >&5
13954echo "${ECHO_T}yes" >&6
13955echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
13956echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013957if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013958 echo "$as_me:$LINENO: result: buggy" >&5
13959echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013960buggygetaddrinfo=yes
13961else
Martin v. Löwis11437992002-04-12 09:54:03 +000013962 cat >conftest.$ac_ext <<_ACEOF
13963#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013964#include "confdefs.h"
13965
13966#include <sys/types.h>
13967#include <netdb.h>
13968#include <string.h>
13969#include <sys/socket.h>
13970#include <netinet/in.h>
13971
13972main()
13973{
13974 int passive, gaierr, inet4 = 0, inet6 = 0;
13975 struct addrinfo hints, *ai, *aitop;
13976 char straddr[INET6_ADDRSTRLEN], strport[16];
13977
13978 for (passive = 0; passive <= 1; passive++) {
13979 memset(&hints, 0, sizeof(hints));
13980 hints.ai_family = AF_UNSPEC;
13981 hints.ai_flags = passive ? AI_PASSIVE : 0;
13982 hints.ai_socktype = SOCK_STREAM;
13983 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13984 (void)gai_strerror(gaierr);
13985 goto bad;
13986 }
13987 for (ai = aitop; ai; ai = ai->ai_next) {
13988 if (ai->ai_addr == NULL ||
13989 ai->ai_addrlen == 0 ||
13990 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13991 straddr, sizeof(straddr), strport, sizeof(strport),
13992 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13993 goto bad;
13994 }
13995 switch (ai->ai_family) {
13996 case AF_INET:
13997 if (strcmp(strport, "54321") != 0) {
13998 goto bad;
13999 }
14000 if (passive) {
14001 if (strcmp(straddr, "0.0.0.0") != 0) {
14002 goto bad;
14003 }
14004 } else {
14005 if (strcmp(straddr, "127.0.0.1") != 0) {
14006 goto bad;
14007 }
14008 }
14009 inet4++;
14010 break;
14011 case AF_INET6:
14012 if (strcmp(strport, "54321") != 0) {
14013 goto bad;
14014 }
14015 if (passive) {
14016 if (strcmp(straddr, "::") != 0) {
14017 goto bad;
14018 }
14019 } else {
14020 if (strcmp(straddr, "::1") != 0) {
14021 goto bad;
14022 }
14023 }
14024 inet6++;
14025 break;
14026 case AF_UNSPEC:
14027 goto bad;
14028 break;
14029 default:
14030 /* another family support? */
14031 break;
14032 }
14033 }
14034 }
14035
14036 if (!(inet4 == 0 || inet4 == 2))
14037 goto bad;
14038 if (!(inet6 == 0 || inet6 == 2))
14039 goto bad;
14040
14041 if (aitop)
14042 freeaddrinfo(aitop);
14043 exit(0);
14044
14045 bad:
14046 if (aitop)
14047 freeaddrinfo(aitop);
14048 exit(1);
14049}
14050
Martin v. Löwis11437992002-04-12 09:54:03 +000014051_ACEOF
14052rm -f conftest$ac_exeext
14053if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14054 (eval $ac_link) 2>&5
14055 ac_status=$?
14056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14057 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14058 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14059 (eval $ac_try) 2>&5
14060 ac_status=$?
14061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14062 (exit $ac_status); }; }; then
14063 echo "$as_me:$LINENO: result: good" >&5
14064echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014065buggygetaddrinfo=no
14066else
Martin v. Löwis11437992002-04-12 09:54:03 +000014067 echo "$as_me: program exited with status $ac_status" >&5
14068echo "$as_me: failed program was:" >&5
14069cat conftest.$ac_ext >&5
14070( exit $ac_status )
14071echo "$as_me:$LINENO: result: buggy" >&5
14072echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014073buggygetaddrinfo=yes
14074fi
Barry Warsawfe33b792003-01-07 22:42:49 +000014075rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014076fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014077else
Martin v. Löwis11437992002-04-12 09:54:03 +000014078 echo "$as_me: failed program was:" >&5
14079cat conftest.$ac_ext >&5
14080
14081echo "$as_me:$LINENO: result: no" >&5
14082echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014083buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014084
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014085fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014086rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014087
14088if test "$buggygetaddrinfo" = "yes"; then
14089 if test "$ipv6" = "yes"; then
14090 echo 'Fatal: You must get working getaddrinfo() function.'
14091 echo ' or you can specify "--disable-ipv6"'.
14092 exit 1
14093 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014094else
Martin v. Löwis11437992002-04-12 09:54:03 +000014095
14096cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014097#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014098_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014099
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014100fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014101
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014102for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014103do
Martin v. Löwis11437992002-04-12 09:54:03 +000014104as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14105echo "$as_me:$LINENO: checking for $ac_func" >&5
14106echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14107if eval "test \"\${$as_ac_var+set}\" = set"; then
14108 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014109else
Martin v. Löwis11437992002-04-12 09:54:03 +000014110 cat >conftest.$ac_ext <<_ACEOF
14111#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014112#include "confdefs.h"
14113/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014114 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014115#include <assert.h>
14116/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014117#ifdef __cplusplus
14118extern "C"
14119#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014120/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014121 builtin and then its argument prototype would still apply. */
14122char $ac_func ();
14123char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014124
Barry Warsawfe33b792003-01-07 22:42:49 +000014125#ifdef F77_DUMMY_MAIN
14126# ifdef __cplusplus
14127 extern "C"
14128# endif
14129 int F77_DUMMY_MAIN() { return 1; }
14130#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014131int
14132main ()
14133{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014134/* The GNU C library defines this for functions which it implements
14135 to always fail with ENOSYS. Some functions are actually named
14136 something starting with __ and the normal name is an alias. */
14137#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14138choke me
14139#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014140f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014141#endif
14142
Martin v. Löwis11437992002-04-12 09:54:03 +000014143 ;
14144 return 0;
14145}
14146_ACEOF
14147rm -f conftest.$ac_objext conftest$ac_exeext
14148if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14149 (eval $ac_link) 2>&5
14150 ac_status=$?
14151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14152 (exit $ac_status); } &&
14153 { ac_try='test -s conftest$ac_exeext'
14154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14155 (eval $ac_try) 2>&5
14156 ac_status=$?
14157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14158 (exit $ac_status); }; }; then
14159 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014160else
Martin v. Löwis11437992002-04-12 09:54:03 +000014161 echo "$as_me: failed program was:" >&5
14162cat conftest.$ac_ext >&5
14163eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014164fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014165rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014166fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014167echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14168echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14169if test `eval echo '${'$as_ac_var'}'` = yes; then
14170 cat >>confdefs.h <<_ACEOF
14171#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14172_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014173
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014174fi
14175done
14176
Michael W. Hudson54241132001-12-07 15:38:26 +000014177
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014178# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000014179echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
14180echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14181if test "${ac_cv_header_time+set}" = set; then
14182 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014183else
Martin v. Löwis11437992002-04-12 09:54:03 +000014184 cat >conftest.$ac_ext <<_ACEOF
14185#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014186#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014187#include <sys/types.h>
14188#include <sys/time.h>
14189#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014190
Barry Warsawfe33b792003-01-07 22:42:49 +000014191#ifdef F77_DUMMY_MAIN
14192# ifdef __cplusplus
14193 extern "C"
14194# endif
14195 int F77_DUMMY_MAIN() { return 1; }
14196#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014197int
14198main ()
14199{
14200if ((struct tm *) 0)
14201return 0;
14202 ;
14203 return 0;
14204}
14205_ACEOF
14206rm -f conftest.$ac_objext
14207if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14208 (eval $ac_compile) 2>&5
14209 ac_status=$?
14210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14211 (exit $ac_status); } &&
14212 { ac_try='test -s conftest.$ac_objext'
14213 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14214 (eval $ac_try) 2>&5
14215 ac_status=$?
14216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14217 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014218 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014219else
Martin v. Löwis11437992002-04-12 09:54:03 +000014220 echo "$as_me: failed program was:" >&5
14221cat conftest.$ac_ext >&5
14222ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014223fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014224rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014225fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014226echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
14227echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014228if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014229
14230cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014231#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014232_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014233
14234fi
14235
Martin v. Löwis11437992002-04-12 09:54:03 +000014236echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
14237echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
14238if test "${ac_cv_struct_tm+set}" = set; then
14239 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014240else
Martin v. Löwis11437992002-04-12 09:54:03 +000014241 cat >conftest.$ac_ext <<_ACEOF
14242#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014243#include "confdefs.h"
14244#include <sys/types.h>
14245#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014246
Barry Warsawfe33b792003-01-07 22:42:49 +000014247#ifdef F77_DUMMY_MAIN
14248# ifdef __cplusplus
14249 extern "C"
14250# endif
14251 int F77_DUMMY_MAIN() { return 1; }
14252#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014253int
14254main ()
14255{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014256struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000014257 ;
14258 return 0;
14259}
14260_ACEOF
14261rm -f conftest.$ac_objext
14262if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14263 (eval $ac_compile) 2>&5
14264 ac_status=$?
14265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14266 (exit $ac_status); } &&
14267 { ac_try='test -s conftest.$ac_objext'
14268 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14269 (eval $ac_try) 2>&5
14270 ac_status=$?
14271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14272 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014273 ac_cv_struct_tm=time.h
14274else
Martin v. Löwis11437992002-04-12 09:54:03 +000014275 echo "$as_me: failed program was:" >&5
14276cat conftest.$ac_ext >&5
14277ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014278fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014279rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014280fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014281echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
14282echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014283if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014284
14285cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014286#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014287_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014288
14289fi
14290
Martin v. Löwis11437992002-04-12 09:54:03 +000014291echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
14292echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
14293if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
14294 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014295else
Martin v. Löwis11437992002-04-12 09:54:03 +000014296 cat >conftest.$ac_ext <<_ACEOF
14297#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014298#include "confdefs.h"
14299#include <sys/types.h>
14300#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000014301
14302
Barry Warsawfe33b792003-01-07 22:42:49 +000014303#ifdef F77_DUMMY_MAIN
14304# ifdef __cplusplus
14305 extern "C"
14306# endif
14307 int F77_DUMMY_MAIN() { return 1; }
14308#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014309int
14310main ()
14311{
14312static struct tm ac_aggr;
14313if (ac_aggr.tm_zone)
14314return 0;
14315 ;
14316 return 0;
14317}
14318_ACEOF
14319rm -f conftest.$ac_objext
14320if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14321 (eval $ac_compile) 2>&5
14322 ac_status=$?
14323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14324 (exit $ac_status); } &&
14325 { ac_try='test -s conftest.$ac_objext'
14326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14327 (eval $ac_try) 2>&5
14328 ac_status=$?
14329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14330 (exit $ac_status); }; }; then
14331 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014332else
Martin v. Löwis11437992002-04-12 09:54:03 +000014333 echo "$as_me: failed program was:" >&5
14334cat conftest.$ac_ext >&5
14335ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014336fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014337rm -f conftest.$ac_objext conftest.$ac_ext
14338fi
14339echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
14340echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
14341if test $ac_cv_member_struct_tm_tm_zone = yes; then
14342
14343cat >>confdefs.h <<_ACEOF
14344#define HAVE_STRUCT_TM_TM_ZONE 1
14345_ACEOF
14346
14347
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014348fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014349
Martin v. Löwis11437992002-04-12 09:54:03 +000014350if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14351
14352cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014353#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014354_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014355
14356else
Martin v. Löwis11437992002-04-12 09:54:03 +000014357 echo "$as_me:$LINENO: checking for tzname" >&5
14358echo $ECHO_N "checking for tzname... $ECHO_C" >&6
14359if test "${ac_cv_var_tzname+set}" = set; then
14360 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014361else
Martin v. Löwis11437992002-04-12 09:54:03 +000014362 cat >conftest.$ac_ext <<_ACEOF
14363#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014364#include "confdefs.h"
14365#include <time.h>
14366#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014367extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014368#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014369
Barry Warsawfe33b792003-01-07 22:42:49 +000014370#ifdef F77_DUMMY_MAIN
14371# ifdef __cplusplus
14372 extern "C"
14373# endif
14374 int F77_DUMMY_MAIN() { return 1; }
14375#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014376int
14377main ()
14378{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014379atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000014380 ;
14381 return 0;
14382}
14383_ACEOF
14384rm -f conftest.$ac_objext conftest$ac_exeext
14385if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14386 (eval $ac_link) 2>&5
14387 ac_status=$?
14388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14389 (exit $ac_status); } &&
14390 { ac_try='test -s conftest$ac_exeext'
14391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14392 (eval $ac_try) 2>&5
14393 ac_status=$?
14394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14395 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014396 ac_cv_var_tzname=yes
14397else
Martin v. Löwis11437992002-04-12 09:54:03 +000014398 echo "$as_me: failed program was:" >&5
14399cat conftest.$ac_ext >&5
14400ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014401fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014402rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000014403fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014404echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
14405echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014406 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014407
14408cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014409#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014410_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014411
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014412 fi
14413fi
14414
Martin v. Löwis11437992002-04-12 09:54:03 +000014415echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
14416echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
14417if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
14418 echo $ECHO_N "(cached) $ECHO_C" >&6
14419else
14420 cat >conftest.$ac_ext <<_ACEOF
14421#line $LINENO "configure"
14422#include "confdefs.h"
14423$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014424#ifdef F77_DUMMY_MAIN
14425# ifdef __cplusplus
14426 extern "C"
14427# endif
14428 int F77_DUMMY_MAIN() { return 1; }
14429#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014430int
14431main ()
14432{
14433static struct stat ac_aggr;
14434if (ac_aggr.st_rdev)
14435return 0;
14436 ;
14437 return 0;
14438}
14439_ACEOF
14440rm -f conftest.$ac_objext
14441if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14442 (eval $ac_compile) 2>&5
14443 ac_status=$?
14444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14445 (exit $ac_status); } &&
14446 { ac_try='test -s conftest.$ac_objext'
14447 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14448 (eval $ac_try) 2>&5
14449 ac_status=$?
14450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14451 (exit $ac_status); }; }; then
14452 ac_cv_member_struct_stat_st_rdev=yes
14453else
14454 echo "$as_me: failed program was:" >&5
14455cat conftest.$ac_ext >&5
14456ac_cv_member_struct_stat_st_rdev=no
14457fi
14458rm -f conftest.$ac_objext conftest.$ac_ext
14459fi
14460echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
14461echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
14462if test $ac_cv_member_struct_stat_st_rdev = yes; then
14463
14464cat >>confdefs.h <<_ACEOF
14465#define HAVE_STRUCT_STAT_ST_RDEV 1
14466_ACEOF
14467
14468
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014469fi
14470
Martin v. Löwis11437992002-04-12 09:54:03 +000014471echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
14472echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
14473if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
14474 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014475else
Martin v. Löwis11437992002-04-12 09:54:03 +000014476 cat >conftest.$ac_ext <<_ACEOF
14477#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014478#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014479$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014480#ifdef F77_DUMMY_MAIN
14481# ifdef __cplusplus
14482 extern "C"
14483# endif
14484 int F77_DUMMY_MAIN() { return 1; }
14485#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014486int
14487main ()
14488{
14489static struct stat ac_aggr;
14490if (ac_aggr.st_blksize)
14491return 0;
14492 ;
14493 return 0;
14494}
14495_ACEOF
14496rm -f conftest.$ac_objext
14497if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14498 (eval $ac_compile) 2>&5
14499 ac_status=$?
14500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14501 (exit $ac_status); } &&
14502 { ac_try='test -s conftest.$ac_objext'
14503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14504 (eval $ac_try) 2>&5
14505 ac_status=$?
14506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14507 (exit $ac_status); }; }; then
14508 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014509else
Martin v. Löwis11437992002-04-12 09:54:03 +000014510 echo "$as_me: failed program was:" >&5
14511cat conftest.$ac_ext >&5
14512ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014513fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014514rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014515fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014516echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
14517echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
14518if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014519
Martin v. Löwis11437992002-04-12 09:54:03 +000014520cat >>confdefs.h <<_ACEOF
14521#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
14522_ACEOF
14523
14524
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014525fi
14526
Martin v. Löwis11437992002-04-12 09:54:03 +000014527echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
14528echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
14529if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
14530 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014531else
Martin v. Löwis11437992002-04-12 09:54:03 +000014532 cat >conftest.$ac_ext <<_ACEOF
14533#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014534#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014535$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014536#ifdef F77_DUMMY_MAIN
14537# ifdef __cplusplus
14538 extern "C"
14539# endif
14540 int F77_DUMMY_MAIN() { return 1; }
14541#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014542int
14543main ()
14544{
14545static struct stat ac_aggr;
14546if (ac_aggr.st_blocks)
14547return 0;
14548 ;
14549 return 0;
14550}
14551_ACEOF
14552rm -f conftest.$ac_objext
14553if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14554 (eval $ac_compile) 2>&5
14555 ac_status=$?
14556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14557 (exit $ac_status); } &&
14558 { ac_try='test -s conftest.$ac_objext'
14559 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14560 (eval $ac_try) 2>&5
14561 ac_status=$?
14562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14563 (exit $ac_status); }; }; then
14564 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014565else
Martin v. Löwis11437992002-04-12 09:54:03 +000014566 echo "$as_me: failed program was:" >&5
14567cat conftest.$ac_ext >&5
14568ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014569fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014570rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014571fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014572echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
14573echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
14574if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014575
Martin v. Löwis11437992002-04-12 09:54:03 +000014576cat >>confdefs.h <<_ACEOF
14577#define HAVE_STRUCT_STAT_ST_BLOCKS 1
14578_ACEOF
14579
14580
14581cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014582#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014583_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014584
14585else
Martin v. Löwis11437992002-04-12 09:54:03 +000014586 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014587fi
14588
Michael W. Hudson54241132001-12-07 15:38:26 +000014589
Martin v. Löwis11437992002-04-12 09:54:03 +000014590
14591echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
14592echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
14593if test "${ac_cv_header_time_altzone+set}" = set; then
14594 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014595else
Martin v. Löwis11437992002-04-12 09:54:03 +000014596 cat >conftest.$ac_ext <<_ACEOF
14597#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014598#include "confdefs.h"
14599#include <time.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014600#ifdef F77_DUMMY_MAIN
14601# ifdef __cplusplus
14602 extern "C"
14603# endif
14604 int F77_DUMMY_MAIN() { return 1; }
14605#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014606int
14607main ()
14608{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014609return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000014610 ;
14611 return 0;
14612}
14613_ACEOF
14614rm -f conftest.$ac_objext
14615if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14616 (eval $ac_compile) 2>&5
14617 ac_status=$?
14618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14619 (exit $ac_status); } &&
14620 { ac_try='test -s conftest.$ac_objext'
14621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14622 (eval $ac_try) 2>&5
14623 ac_status=$?
14624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14625 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014626 ac_cv_header_time_altzone=yes
14627else
Martin v. Löwis11437992002-04-12 09:54:03 +000014628 echo "$as_me: failed program was:" >&5
14629cat conftest.$ac_ext >&5
14630ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000014631fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014632rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014633fi
14634
Martin v. Löwis11437992002-04-12 09:54:03 +000014635echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
14636echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014637if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014638
14639cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014640#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014641_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014642
14643fi
14644
Guido van Rossumda88dad1995-01-26 00:46:29 +000014645was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014646echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
14647echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
14648cat >conftest.$ac_ext <<_ACEOF
14649#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014650#include "confdefs.h"
14651
14652#include <sys/types.h>
14653#include <sys/select.h>
14654#include <sys/time.h>
14655
Barry Warsawfe33b792003-01-07 22:42:49 +000014656#ifdef F77_DUMMY_MAIN
14657# ifdef __cplusplus
14658 extern "C"
14659# endif
14660 int F77_DUMMY_MAIN() { return 1; }
14661#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014662int
14663main ()
14664{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014665;
Martin v. Löwis11437992002-04-12 09:54:03 +000014666 ;
14667 return 0;
14668}
14669_ACEOF
14670rm -f conftest.$ac_objext
14671if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14672 (eval $ac_compile) 2>&5
14673 ac_status=$?
14674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14675 (exit $ac_status); } &&
14676 { ac_try='test -s conftest.$ac_objext'
14677 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14678 (eval $ac_try) 2>&5
14679 ac_status=$?
14680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14681 (exit $ac_status); }; }; then
14682
14683
14684cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014685#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014686_ACEOF
14687
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014688 was_it_defined=yes
14689
Guido van Rossumf78abae1997-01-21 22:02:36 +000014690else
Martin v. Löwis11437992002-04-12 09:54:03 +000014691 echo "$as_me: failed program was:" >&5
14692cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014693fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014694rm -f conftest.$ac_objext conftest.$ac_ext
14695echo "$as_me:$LINENO: result: $was_it_defined" >&5
14696echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000014697
Martin v. Löwis11437992002-04-12 09:54:03 +000014698echo "$as_me:$LINENO: checking for addrinfo" >&5
14699echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
14700if test "${ac_cv_struct_addrinfo+set}" = set; then
14701 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014702else
Martin v. Löwis11437992002-04-12 09:54:03 +000014703 cat >conftest.$ac_ext <<_ACEOF
14704#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014705#include "confdefs.h"
14706
14707# include <netdb.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014708#ifdef F77_DUMMY_MAIN
14709# ifdef __cplusplus
14710 extern "C"
14711# endif
14712 int F77_DUMMY_MAIN() { return 1; }
14713#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014714int
14715main ()
14716{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014717struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000014718 ;
14719 return 0;
14720}
14721_ACEOF
14722rm -f conftest.$ac_objext
14723if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14724 (eval $ac_compile) 2>&5
14725 ac_status=$?
14726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14727 (exit $ac_status); } &&
14728 { ac_try='test -s conftest.$ac_objext'
14729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14730 (eval $ac_try) 2>&5
14731 ac_status=$?
14732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14733 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014734 ac_cv_struct_addrinfo=yes
14735else
Martin v. Löwis11437992002-04-12 09:54:03 +000014736 echo "$as_me: failed program was:" >&5
14737cat conftest.$ac_ext >&5
14738ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014739fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014740rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014741fi
14742
Martin v. Löwis11437992002-04-12 09:54:03 +000014743echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
14744echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014745if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014746
14747cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014748#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014749_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014750
14751fi
14752
Martin v. Löwis11437992002-04-12 09:54:03 +000014753echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
14754echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
14755if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
14756 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014757else
Martin v. Löwis11437992002-04-12 09:54:03 +000014758 cat >conftest.$ac_ext <<_ACEOF
14759#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014760#include "confdefs.h"
14761
14762# include <sys/types.h>
14763# include <sys/socket.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014764#ifdef F77_DUMMY_MAIN
14765# ifdef __cplusplus
14766 extern "C"
14767# endif
14768 int F77_DUMMY_MAIN() { return 1; }
14769#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014770int
14771main ()
14772{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014773struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000014774 ;
14775 return 0;
14776}
14777_ACEOF
14778rm -f conftest.$ac_objext
14779if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14780 (eval $ac_compile) 2>&5
14781 ac_status=$?
14782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14783 (exit $ac_status); } &&
14784 { ac_try='test -s conftest.$ac_objext'
14785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14786 (eval $ac_try) 2>&5
14787 ac_status=$?
14788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14789 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014790 ac_cv_struct_sockaddr_storage=yes
14791else
Martin v. Löwis11437992002-04-12 09:54:03 +000014792 echo "$as_me: failed program was:" >&5
14793cat conftest.$ac_ext >&5
14794ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014795fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014796rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014797fi
14798
Martin v. Löwis11437992002-04-12 09:54:03 +000014799echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
14800echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014801if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014802
14803cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014804#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014805_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014806
14807fi
14808
Guido van Rossum627b2d71993-12-24 10:39:16 +000014809# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000014810
Michael W. Hudson54241132001-12-07 15:38:26 +000014811
Martin v. Löwis11437992002-04-12 09:54:03 +000014812echo "$as_me:$LINENO: checking whether char is unsigned" >&5
14813echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
14814if test "${ac_cv_c_char_unsigned+set}" = set; then
14815 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000014816else
Martin v. Löwis11437992002-04-12 09:54:03 +000014817 cat >conftest.$ac_ext <<_ACEOF
14818#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000014819#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014820$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014821#ifdef F77_DUMMY_MAIN
14822# ifdef __cplusplus
14823 extern "C"
14824# endif
14825 int F77_DUMMY_MAIN() { return 1; }
14826#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014827int
14828main ()
14829{
14830static int test_array [1 - 2 * !(((char) -1) < 0)];
14831test_array [0] = 0
14832
14833 ;
14834 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000014835}
Martin v. Löwis11437992002-04-12 09:54:03 +000014836_ACEOF
14837rm -f conftest.$ac_objext
14838if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14839 (eval $ac_compile) 2>&5
14840 ac_status=$?
14841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14842 (exit $ac_status); } &&
14843 { ac_try='test -s conftest.$ac_objext'
14844 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14845 (eval $ac_try) 2>&5
14846 ac_status=$?
14847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14848 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000014849 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014850else
14851 echo "$as_me: failed program was:" >&5
14852cat conftest.$ac_ext >&5
14853ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014854fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014855rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014856fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014857echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
14858echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014859if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014860 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014861#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014862_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014863
14864fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000014865
Barry Warsawfe33b792003-01-07 22:42:49 +000014866echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
14867echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
14868if test "${ac_cv_prog_cc_stdc+set}" = set; then
14869 echo $ECHO_N "(cached) $ECHO_C" >&6
14870else
14871 ac_cv_prog_cc_stdc=no
14872ac_save_CC=$CC
14873cat >conftest.$ac_ext <<_ACEOF
14874#line $LINENO "configure"
14875#include "confdefs.h"
14876#include <stdarg.h>
14877#include <stdio.h>
14878#include <sys/types.h>
14879#include <sys/stat.h>
14880/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
14881struct buf { int x; };
14882FILE * (*rcsopen) (struct buf *, struct stat *, int);
14883static char *e (p, i)
14884 char **p;
14885 int i;
14886{
14887 return p[i];
14888}
14889static char *f (char * (*g) (char **, int), char **p, ...)
14890{
14891 char *s;
14892 va_list v;
14893 va_start (v,p);
14894 s = g (p, va_arg (v,int));
14895 va_end (v);
14896 return s;
14897}
14898int test (int i, double x);
14899struct s1 {int (*f) (int a);};
14900struct s2 {int (*f) (double a);};
14901int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
14902int argc;
14903char **argv;
14904#ifdef F77_DUMMY_MAIN
14905# ifdef __cplusplus
14906 extern "C"
14907# endif
14908 int F77_DUMMY_MAIN() { return 1; }
14909#endif
14910int
14911main ()
14912{
14913return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
14914 ;
14915 return 0;
14916}
14917_ACEOF
14918# Don't try gcc -ansi; that turns off useful extensions and
14919# breaks some systems' header files.
14920# AIX -qlanglvl=ansi
14921# Ultrix and OSF/1 -std1
14922# HP-UX 10.20 and later -Ae
14923# HP-UX older versions -Aa -D_HPUX_SOURCE
14924# SVR4 -Xc -D__EXTENSIONS__
14925for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
14926do
14927 CC="$ac_save_CC $ac_arg"
14928 rm -f conftest.$ac_objext
14929if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14930 (eval $ac_compile) 2>&5
14931 ac_status=$?
14932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14933 (exit $ac_status); } &&
14934 { ac_try='test -s conftest.$ac_objext'
14935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14936 (eval $ac_try) 2>&5
14937 ac_status=$?
14938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14939 (exit $ac_status); }; }; then
14940 ac_cv_prog_cc_stdc=$ac_arg
14941break
14942else
14943 echo "$as_me: failed program was:" >&5
14944cat conftest.$ac_ext >&5
14945fi
14946rm -f conftest.$ac_objext
14947done
14948rm -f conftest.$ac_ext conftest.$ac_objext
14949CC=$ac_save_CC
14950
14951fi
14952
14953case "x$ac_cv_prog_cc_stdc" in
14954 x|xno)
14955 echo "$as_me:$LINENO: result: none needed" >&5
14956echo "${ECHO_T}none needed" >&6 ;;
14957 *)
14958 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
14959echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
14960 CC="$CC $ac_cv_prog_cc_stdc" ;;
14961esac
14962
Martin v. Löwis11437992002-04-12 09:54:03 +000014963echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
14964echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14965if test "${ac_cv_c_const+set}" = set; then
14966 echo $ECHO_N "(cached) $ECHO_C" >&6
14967else
14968 cat >conftest.$ac_ext <<_ACEOF
14969#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014970#include "confdefs.h"
14971
Barry Warsawfe33b792003-01-07 22:42:49 +000014972#ifdef F77_DUMMY_MAIN
14973# ifdef __cplusplus
14974 extern "C"
14975# endif
14976 int F77_DUMMY_MAIN() { return 1; }
14977#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014978int
14979main ()
14980{
14981/* FIXME: Include the comments suggested by Paul. */
14982#ifndef __cplusplus
14983 /* Ultrix mips cc rejects this. */
14984 typedef int charset[2];
14985 const charset x;
14986 /* SunOS 4.1.1 cc rejects this. */
14987 char const *const *ccp;
14988 char **p;
14989 /* NEC SVR4.0.2 mips cc rejects this. */
14990 struct point {int x, y;};
14991 static struct point const zero = {0,0};
14992 /* AIX XL C 1.02.0.0 rejects this.
14993 It does not let you subtract one const X* pointer from another in
14994 an arm of an if-expression whose if-part is not a constant
14995 expression */
14996 const char *g = "string";
14997 ccp = &g + (g ? g-g : 0);
14998 /* HPUX 7.0 cc rejects these. */
14999 ++ccp;
15000 p = (char**) ccp;
15001 ccp = (char const *const *) p;
15002 { /* SCO 3.2v4 cc rejects this. */
15003 char *t;
15004 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015005
Martin v. Löwis11437992002-04-12 09:54:03 +000015006 *t++ = 0;
15007 }
15008 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
15009 int x[] = {25, 17};
15010 const int *foo = &x[0];
15011 ++foo;
15012 }
15013 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15014 typedef const int *iptr;
15015 iptr p = 0;
15016 ++p;
15017 }
15018 { /* AIX XL C 1.02.0.0 rejects this saying
15019 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15020 struct s { int j; const int *ap[3]; };
15021 struct s *b; b->j = 5;
15022 }
15023 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15024 const int foo = 10;
15025 }
15026#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000015027
Martin v. Löwis11437992002-04-12 09:54:03 +000015028 ;
15029 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000015030}
Martin v. Löwis11437992002-04-12 09:54:03 +000015031_ACEOF
15032rm -f conftest.$ac_objext
15033if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15034 (eval $ac_compile) 2>&5
15035 ac_status=$?
15036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15037 (exit $ac_status); } &&
15038 { ac_try='test -s conftest.$ac_objext'
15039 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15040 (eval $ac_try) 2>&5
15041 ac_status=$?
15042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15043 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015044 ac_cv_c_const=yes
15045else
Martin v. Löwis11437992002-04-12 09:54:03 +000015046 echo "$as_me: failed program was:" >&5
15047cat conftest.$ac_ext >&5
15048ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015049fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015050rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015051fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015052echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
15053echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015054if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015055
15056cat >>confdefs.h <<\_ACEOF
15057#define const
15058_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015059
15060fi
15061
Michael W. Hudson54241132001-12-07 15:38:26 +000015062
Guido van Rossumda88dad1995-01-26 00:46:29 +000015063works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015064echo "$as_me:$LINENO: checking for working volatile" >&5
15065echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
15066cat >conftest.$ac_ext <<_ACEOF
15067#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015068#include "confdefs.h"
15069
Barry Warsawfe33b792003-01-07 22:42:49 +000015070#ifdef F77_DUMMY_MAIN
15071# ifdef __cplusplus
15072 extern "C"
15073# endif
15074 int F77_DUMMY_MAIN() { return 1; }
15075#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015076int
15077main ()
15078{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015079volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015080 ;
15081 return 0;
15082}
15083_ACEOF
15084rm -f conftest.$ac_objext
15085if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15086 (eval $ac_compile) 2>&5
15087 ac_status=$?
15088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15089 (exit $ac_status); } &&
15090 { ac_try='test -s conftest.$ac_objext'
15091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15092 (eval $ac_try) 2>&5
15093 ac_status=$?
15094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15095 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015096 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015097else
Martin v. Löwis11437992002-04-12 09:54:03 +000015098 echo "$as_me: failed program was:" >&5
15099cat conftest.$ac_ext >&5
15100
15101cat >>confdefs.h <<\_ACEOF
15102#define volatile
15103_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015104
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015105
Guido van Rossum627b2d71993-12-24 10:39:16 +000015106fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015107rm -f conftest.$ac_objext conftest.$ac_ext
15108echo "$as_me:$LINENO: result: $works" >&5
15109echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015110
Guido van Rossumda88dad1995-01-26 00:46:29 +000015111works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015112echo "$as_me:$LINENO: checking for working signed char" >&5
15113echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
15114cat >conftest.$ac_ext <<_ACEOF
15115#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015116#include "confdefs.h"
15117
Barry Warsawfe33b792003-01-07 22:42:49 +000015118#ifdef F77_DUMMY_MAIN
15119# ifdef __cplusplus
15120 extern "C"
15121# endif
15122 int F77_DUMMY_MAIN() { return 1; }
15123#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015124int
15125main ()
15126{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015127signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000015128 ;
15129 return 0;
15130}
15131_ACEOF
15132rm -f conftest.$ac_objext
15133if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15134 (eval $ac_compile) 2>&5
15135 ac_status=$?
15136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15137 (exit $ac_status); } &&
15138 { ac_try='test -s conftest.$ac_objext'
15139 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15140 (eval $ac_try) 2>&5
15141 ac_status=$?
15142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15143 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015144 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015145else
Martin v. Löwis11437992002-04-12 09:54:03 +000015146 echo "$as_me: failed program was:" >&5
15147cat conftest.$ac_ext >&5
15148
15149cat >>confdefs.h <<\_ACEOF
15150#define signed
15151_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000015152
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015153
Guido van Rossum7f43da71994-08-01 12:15:30 +000015154fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015155rm -f conftest.$ac_objext conftest.$ac_ext
15156echo "$as_me:$LINENO: result: $works" >&5
15157echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015158
Guido van Rossumda88dad1995-01-26 00:46:29 +000015159have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015160echo "$as_me:$LINENO: checking for prototypes" >&5
15161echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
15162cat >conftest.$ac_ext <<_ACEOF
15163#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015164#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015165int foo(int x) { return 0; }
Barry Warsawfe33b792003-01-07 22:42:49 +000015166#ifdef F77_DUMMY_MAIN
15167# ifdef __cplusplus
15168 extern "C"
15169# endif
15170 int F77_DUMMY_MAIN() { return 1; }
15171#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015172int
15173main ()
15174{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015175return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000015176 ;
15177 return 0;
15178}
15179_ACEOF
15180rm -f conftest.$ac_objext
15181if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15182 (eval $ac_compile) 2>&5
15183 ac_status=$?
15184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15185 (exit $ac_status); } &&
15186 { ac_try='test -s conftest.$ac_objext'
15187 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15188 (eval $ac_try) 2>&5
15189 ac_status=$?
15190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15191 (exit $ac_status); }; }; then
15192
15193
15194cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015195#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015196_ACEOF
15197
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015198 have_prototypes=yes
15199
Guido van Rossumf78abae1997-01-21 22:02:36 +000015200else
Martin v. Löwis11437992002-04-12 09:54:03 +000015201 echo "$as_me: failed program was:" >&5
15202cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000015203fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015204rm -f conftest.$ac_objext conftest.$ac_ext
15205echo "$as_me:$LINENO: result: $have_prototypes" >&5
15206echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015207
Guido van Rossumda88dad1995-01-26 00:46:29 +000015208works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015209echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
15210echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
15211cat >conftest.$ac_ext <<_ACEOF
15212#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015213#include "confdefs.h"
15214
15215#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000015216int foo(int x, ...) {
15217 va_list va;
15218 va_start(va, x);
15219 va_arg(va, int);
15220 va_arg(va, char *);
15221 va_arg(va, double);
15222 return 0;
15223}
Guido van Rossum7f43da71994-08-01 12:15:30 +000015224
Barry Warsawfe33b792003-01-07 22:42:49 +000015225#ifdef F77_DUMMY_MAIN
15226# ifdef __cplusplus
15227 extern "C"
15228# endif
15229 int F77_DUMMY_MAIN() { return 1; }
15230#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015231int
15232main ()
15233{
Guido van Rossum90eea071996-08-30 20:58:57 +000015234return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000015235 ;
15236 return 0;
15237}
15238_ACEOF
15239rm -f conftest.$ac_objext
15240if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15241 (eval $ac_compile) 2>&5
15242 ac_status=$?
15243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15244 (exit $ac_status); } &&
15245 { ac_try='test -s conftest.$ac_objext'
15246 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15247 (eval $ac_try) 2>&5
15248 ac_status=$?
15249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15250 (exit $ac_status); }; }; then
15251
15252
15253cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015254#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015255_ACEOF
15256
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015257 works=yes
15258
Guido van Rossumf78abae1997-01-21 22:02:36 +000015259else
Martin v. Löwis11437992002-04-12 09:54:03 +000015260 echo "$as_me: failed program was:" >&5
15261cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000015262fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015263rm -f conftest.$ac_objext conftest.$ac_ext
15264echo "$as_me:$LINENO: result: $works" >&5
15265echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015266
Guido van Rossumda88dad1995-01-26 00:46:29 +000015267if test "$have_prototypes" = yes; then
15268bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015269echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
15270echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
15271cat >conftest.$ac_ext <<_ACEOF
15272#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015273#include "confdefs.h"
15274#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000015275#ifdef F77_DUMMY_MAIN
15276# ifdef __cplusplus
15277 extern "C"
15278# endif
15279 int F77_DUMMY_MAIN() { return 1; }
15280#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015281int
15282main ()
15283{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015284char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000015285 ;
15286 return 0;
15287}
15288_ACEOF
15289rm -f conftest.$ac_objext
15290if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15291 (eval $ac_compile) 2>&5
15292 ac_status=$?
15293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15294 (exit $ac_status); } &&
15295 { ac_try='test -s conftest.$ac_objext'
15296 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15297 (eval $ac_try) 2>&5
15298 ac_status=$?
15299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15300 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000015301 :
15302else
Martin v. Löwis11437992002-04-12 09:54:03 +000015303 echo "$as_me: failed program was:" >&5
15304cat conftest.$ac_ext >&5
15305
15306cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015307#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015308_ACEOF
15309
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015310 bad_prototypes=yes
15311
Guido van Rossum627b2d71993-12-24 10:39:16 +000015312fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015313rm -f conftest.$ac_objext conftest.$ac_ext
15314echo "$as_me:$LINENO: result: $bad_prototypes" >&5
15315echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015316fi
15317
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015318# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000015319echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
15320echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
15321cat >conftest.$ac_ext <<_ACEOF
15322#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015323#include "confdefs.h"
15324#include <sys/types.h>
15325#include <sys/socket.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000015326#ifdef F77_DUMMY_MAIN
15327# ifdef __cplusplus
15328 extern "C"
15329# endif
15330 int F77_DUMMY_MAIN() { return 1; }
15331#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015332int
15333main ()
15334{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015335struct sockaddr x;
15336x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015337 ;
15338 return 0;
15339}
15340_ACEOF
15341rm -f conftest.$ac_objext
15342if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15343 (eval $ac_compile) 2>&5
15344 ac_status=$?
15345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15346 (exit $ac_status); } &&
15347 { ac_try='test -s conftest.$ac_objext'
15348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15349 (eval $ac_try) 2>&5
15350 ac_status=$?
15351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15352 (exit $ac_status); }; }; then
15353 echo "$as_me:$LINENO: result: yes" >&5
15354echo "${ECHO_T}yes" >&6
15355
15356cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015357#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015358_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015359
15360else
Martin v. Löwis11437992002-04-12 09:54:03 +000015361 echo "$as_me: failed program was:" >&5
15362cat conftest.$ac_ext >&5
15363echo "$as_me:$LINENO: result: no" >&5
15364echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015365fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015366rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015367
Guido van Rossumda88dad1995-01-26 00:46:29 +000015368va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015369echo "$as_me:$LINENO: checking whether va_list is an array" >&5
15370echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
15371cat >conftest.$ac_ext <<_ACEOF
15372#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015373#include "confdefs.h"
15374
15375#ifdef HAVE_STDARG_PROTOTYPES
15376#include <stdarg.h>
15377#else
15378#include <varargs.h>
15379#endif
15380
Barry Warsawfe33b792003-01-07 22:42:49 +000015381#ifdef F77_DUMMY_MAIN
15382# ifdef __cplusplus
15383 extern "C"
15384# endif
15385 int F77_DUMMY_MAIN() { return 1; }
15386#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015387int
15388main ()
15389{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015390va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000015391 ;
15392 return 0;
15393}
15394_ACEOF
15395rm -f conftest.$ac_objext
15396if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15397 (eval $ac_compile) 2>&5
15398 ac_status=$?
15399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15400 (exit $ac_status); } &&
15401 { ac_try='test -s conftest.$ac_objext'
15402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15403 (eval $ac_try) 2>&5
15404 ac_status=$?
15405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15406 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015407 :
15408else
Martin v. Löwis11437992002-04-12 09:54:03 +000015409 echo "$as_me: failed program was:" >&5
15410cat conftest.$ac_ext >&5
15411
15412
15413cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015414#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015415_ACEOF
15416
Guido van Rossumda88dad1995-01-26 00:46:29 +000015417 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015418
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015419fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015420rm -f conftest.$ac_objext conftest.$ac_ext
15421echo "$as_me:$LINENO: result: $va_list_is_array" >&5
15422echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015423
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015424# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000015425
15426
15427
15428echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
15429echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
15430if test "${ac_cv_func_gethostbyname_r+set}" = set; then
15431 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015432else
Martin v. Löwis11437992002-04-12 09:54:03 +000015433 cat >conftest.$ac_ext <<_ACEOF
15434#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015435#include "confdefs.h"
15436/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015437 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015438#include <assert.h>
15439/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015440#ifdef __cplusplus
15441extern "C"
15442#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015443/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015444 builtin and then its argument prototype would still apply. */
15445char gethostbyname_r ();
15446char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015447
Barry Warsawfe33b792003-01-07 22:42:49 +000015448#ifdef F77_DUMMY_MAIN
15449# ifdef __cplusplus
15450 extern "C"
15451# endif
15452 int F77_DUMMY_MAIN() { return 1; }
15453#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015454int
15455main ()
15456{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015457/* The GNU C library defines this for functions which it implements
15458 to always fail with ENOSYS. Some functions are actually named
15459 something starting with __ and the normal name is an alias. */
15460#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
15461choke me
15462#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015463f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015464#endif
15465
Martin v. Löwis11437992002-04-12 09:54:03 +000015466 ;
15467 return 0;
15468}
15469_ACEOF
15470rm -f conftest.$ac_objext conftest$ac_exeext
15471if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15472 (eval $ac_link) 2>&5
15473 ac_status=$?
15474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15475 (exit $ac_status); } &&
15476 { ac_try='test -s conftest$ac_exeext'
15477 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15478 (eval $ac_try) 2>&5
15479 ac_status=$?
15480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15481 (exit $ac_status); }; }; then
15482 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015483else
Martin v. Löwis11437992002-04-12 09:54:03 +000015484 echo "$as_me: failed program was:" >&5
15485cat conftest.$ac_ext >&5
15486ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015487fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015488rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015489fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015490echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
15491echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
15492if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015493
Martin v. Löwis11437992002-04-12 09:54:03 +000015494 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015495#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015496_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015497
Martin v. Löwis11437992002-04-12 09:54:03 +000015498 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
15499echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015500 OLD_CFLAGS=$CFLAGS
15501 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015502 cat >conftest.$ac_ext <<_ACEOF
15503#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015504#include "confdefs.h"
15505
15506# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015507
Barry Warsawfe33b792003-01-07 22:42:49 +000015508#ifdef F77_DUMMY_MAIN
15509# ifdef __cplusplus
15510 extern "C"
15511# endif
15512 int F77_DUMMY_MAIN() { return 1; }
15513#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015514int
15515main ()
15516{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015517
15518 char *name;
15519 struct hostent *he, *res;
15520 char buffer[2048];
15521 int buflen = 2048;
15522 int h_errnop;
15523
15524 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015525
15526 ;
15527 return 0;
15528}
15529_ACEOF
15530rm -f conftest.$ac_objext
15531if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15532 (eval $ac_compile) 2>&5
15533 ac_status=$?
15534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15535 (exit $ac_status); } &&
15536 { ac_try='test -s conftest.$ac_objext'
15537 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15538 (eval $ac_try) 2>&5
15539 ac_status=$?
15540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15541 (exit $ac_status); }; }; then
15542
15543 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015544#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015545_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015546
Martin v. Löwis11437992002-04-12 09:54:03 +000015547
15548cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015549#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015550_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015551
Martin v. Löwis11437992002-04-12 09:54:03 +000015552 echo "$as_me:$LINENO: result: yes" >&5
15553echo "${ECHO_T}yes" >&6
15554
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015555else
Martin v. Löwis11437992002-04-12 09:54:03 +000015556 echo "$as_me: failed program was:" >&5
15557cat conftest.$ac_ext >&5
15558
15559 echo "$as_me:$LINENO: result: no" >&5
15560echo "${ECHO_T}no" >&6
15561 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
15562echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
15563 cat >conftest.$ac_ext <<_ACEOF
15564#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015565#include "confdefs.h"
15566
15567# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015568
Barry Warsawfe33b792003-01-07 22:42:49 +000015569#ifdef F77_DUMMY_MAIN
15570# ifdef __cplusplus
15571 extern "C"
15572# endif
15573 int F77_DUMMY_MAIN() { return 1; }
15574#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015575int
15576main ()
15577{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015578
15579 char *name;
15580 struct hostent *he;
15581 char buffer[2048];
15582 int buflen = 2048;
15583 int h_errnop;
15584
15585 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015586
15587 ;
15588 return 0;
15589}
15590_ACEOF
15591rm -f conftest.$ac_objext
15592if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15593 (eval $ac_compile) 2>&5
15594 ac_status=$?
15595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15596 (exit $ac_status); } &&
15597 { ac_try='test -s conftest.$ac_objext'
15598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15599 (eval $ac_try) 2>&5
15600 ac_status=$?
15601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15602 (exit $ac_status); }; }; then
15603
15604 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015605#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015606_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015607
Martin v. Löwis11437992002-04-12 09:54:03 +000015608
15609cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015610#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015611_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015612
Martin v. Löwis11437992002-04-12 09:54:03 +000015613 echo "$as_me:$LINENO: result: yes" >&5
15614echo "${ECHO_T}yes" >&6
15615
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015616else
Martin v. Löwis11437992002-04-12 09:54:03 +000015617 echo "$as_me: failed program was:" >&5
15618cat conftest.$ac_ext >&5
15619
15620 echo "$as_me:$LINENO: result: no" >&5
15621echo "${ECHO_T}no" >&6
15622 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
15623echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
15624 cat >conftest.$ac_ext <<_ACEOF
15625#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015626#include "confdefs.h"
15627
15628# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015629
Barry Warsawfe33b792003-01-07 22:42:49 +000015630#ifdef F77_DUMMY_MAIN
15631# ifdef __cplusplus
15632 extern "C"
15633# endif
15634 int F77_DUMMY_MAIN() { return 1; }
15635#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015636int
15637main ()
15638{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015639
15640 char *name;
15641 struct hostent *he;
15642 struct hostent_data data;
15643
15644 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000015645
15646 ;
15647 return 0;
15648}
15649_ACEOF
15650rm -f conftest.$ac_objext
15651if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15652 (eval $ac_compile) 2>&5
15653 ac_status=$?
15654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15655 (exit $ac_status); } &&
15656 { ac_try='test -s conftest.$ac_objext'
15657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15658 (eval $ac_try) 2>&5
15659 ac_status=$?
15660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15661 (exit $ac_status); }; }; then
15662
15663 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015664#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015665_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015666
Martin v. Löwis11437992002-04-12 09:54:03 +000015667
15668cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015669#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015670_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015671
Martin v. Löwis11437992002-04-12 09:54:03 +000015672 echo "$as_me:$LINENO: result: yes" >&5
15673echo "${ECHO_T}yes" >&6
15674
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015675else
Martin v. Löwis11437992002-04-12 09:54:03 +000015676 echo "$as_me: failed program was:" >&5
15677cat conftest.$ac_ext >&5
15678
15679 echo "$as_me:$LINENO: result: no" >&5
15680echo "${ECHO_T}no" >&6
15681
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015682fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015683rm -f conftest.$ac_objext conftest.$ac_ext
15684
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015685fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015686rm -f conftest.$ac_objext conftest.$ac_ext
15687
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015688fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015689rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015690 CFLAGS=$OLD_CFLAGS
15691
15692else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015693
Martin v. Löwis11437992002-04-12 09:54:03 +000015694
15695for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000015696do
Martin v. Löwis11437992002-04-12 09:54:03 +000015697as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15698echo "$as_me:$LINENO: checking for $ac_func" >&5
15699echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15700if eval "test \"\${$as_ac_var+set}\" = set"; then
15701 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015702else
Martin v. Löwis11437992002-04-12 09:54:03 +000015703 cat >conftest.$ac_ext <<_ACEOF
15704#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015705#include "confdefs.h"
15706/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015707 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015708#include <assert.h>
15709/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015710#ifdef __cplusplus
15711extern "C"
15712#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015713/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015714 builtin and then its argument prototype would still apply. */
15715char $ac_func ();
15716char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015717
Barry Warsawfe33b792003-01-07 22:42:49 +000015718#ifdef F77_DUMMY_MAIN
15719# ifdef __cplusplus
15720 extern "C"
15721# endif
15722 int F77_DUMMY_MAIN() { return 1; }
15723#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015724int
15725main ()
15726{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015727/* The GNU C library defines this for functions which it implements
15728 to always fail with ENOSYS. Some functions are actually named
15729 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015730#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015731choke me
15732#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015733f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015734#endif
15735
Martin v. Löwis11437992002-04-12 09:54:03 +000015736 ;
15737 return 0;
15738}
15739_ACEOF
15740rm -f conftest.$ac_objext conftest$ac_exeext
15741if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15742 (eval $ac_link) 2>&5
15743 ac_status=$?
15744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15745 (exit $ac_status); } &&
15746 { ac_try='test -s conftest$ac_exeext'
15747 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15748 (eval $ac_try) 2>&5
15749 ac_status=$?
15750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15751 (exit $ac_status); }; }; then
15752 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015753else
Martin v. Löwis11437992002-04-12 09:54:03 +000015754 echo "$as_me: failed program was:" >&5
15755cat conftest.$ac_ext >&5
15756eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015757fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015758rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015759fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015760echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15761echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15762if test `eval echo '${'$as_ac_var'}'` = yes; then
15763 cat >>confdefs.h <<_ACEOF
15764#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15765_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015766
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015767fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015768done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015769
Michael W. Hudson54241132001-12-07 15:38:26 +000015770
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015771fi
15772
Michael W. Hudson54241132001-12-07 15:38:26 +000015773
15774
15775
15776
15777
15778
Guido van Rossum627b2d71993-12-24 10:39:16 +000015779# checks for system services
15780# (none yet)
15781
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015782# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000015783echo "$as_me:$LINENO: checking for __fpu_control" >&5
15784echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
15785if test "${ac_cv_func___fpu_control+set}" = set; then
15786 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015787else
Martin v. Löwis11437992002-04-12 09:54:03 +000015788 cat >conftest.$ac_ext <<_ACEOF
15789#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015790#include "confdefs.h"
15791/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015792 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015793#include <assert.h>
15794/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015795#ifdef __cplusplus
15796extern "C"
15797#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015798/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015799 builtin and then its argument prototype would still apply. */
15800char __fpu_control ();
15801char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015802
Barry Warsawfe33b792003-01-07 22:42:49 +000015803#ifdef F77_DUMMY_MAIN
15804# ifdef __cplusplus
15805 extern "C"
15806# endif
15807 int F77_DUMMY_MAIN() { return 1; }
15808#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015809int
15810main ()
15811{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015812/* The GNU C library defines this for functions which it implements
15813 to always fail with ENOSYS. Some functions are actually named
15814 something starting with __ and the normal name is an alias. */
15815#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
15816choke me
15817#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015818f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015819#endif
15820
Martin v. Löwis11437992002-04-12 09:54:03 +000015821 ;
15822 return 0;
15823}
15824_ACEOF
15825rm -f conftest.$ac_objext conftest$ac_exeext
15826if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15827 (eval $ac_link) 2>&5
15828 ac_status=$?
15829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15830 (exit $ac_status); } &&
15831 { ac_try='test -s conftest$ac_exeext'
15832 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15833 (eval $ac_try) 2>&5
15834 ac_status=$?
15835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15836 (exit $ac_status); }; }; then
15837 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015838else
Martin v. Löwis11437992002-04-12 09:54:03 +000015839 echo "$as_me: failed program was:" >&5
15840cat conftest.$ac_ext >&5
15841ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015842fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015843rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015844fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015845echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
15846echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
15847if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015848 :
15849else
Martin v. Löwis11437992002-04-12 09:54:03 +000015850
15851echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
15852echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
15853if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
15854 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015855else
Martin v. Löwis11437992002-04-12 09:54:03 +000015856 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015857LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015858cat >conftest.$ac_ext <<_ACEOF
15859#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015860#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015861
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015862/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015863#ifdef __cplusplus
15864extern "C"
15865#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015866/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015867 builtin and then its argument prototype would still apply. */
15868char __fpu_control ();
Barry Warsawfe33b792003-01-07 22:42:49 +000015869#ifdef F77_DUMMY_MAIN
15870# ifdef __cplusplus
15871 extern "C"
15872# endif
15873 int F77_DUMMY_MAIN() { return 1; }
15874#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015875int
15876main ()
15877{
15878__fpu_control ();
15879 ;
15880 return 0;
15881}
15882_ACEOF
15883rm -f conftest.$ac_objext conftest$ac_exeext
15884if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15885 (eval $ac_link) 2>&5
15886 ac_status=$?
15887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15888 (exit $ac_status); } &&
15889 { ac_try='test -s conftest$ac_exeext'
15890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15891 (eval $ac_try) 2>&5
15892 ac_status=$?
15893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15894 (exit $ac_status); }; }; then
15895 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015896else
Martin v. Löwis11437992002-04-12 09:54:03 +000015897 echo "$as_me: failed program was:" >&5
15898cat conftest.$ac_ext >&5
15899ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015900fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015901rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15902LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015903fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015904echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
15905echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
15906if test $ac_cv_lib_ieee___fpu_control = yes; then
15907 cat >>confdefs.h <<_ACEOF
15908#define HAVE_LIBIEEE 1
15909_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015910
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015911 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015912
Guido van Rossum627b2d71993-12-24 10:39:16 +000015913fi
15914
Michael W. Hudson54241132001-12-07 15:38:26 +000015915
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015916fi
15917
Michael W. Hudson54241132001-12-07 15:38:26 +000015918
Guido van Rossum7f253911997-05-09 02:42:48 +000015919# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000015920echo "$as_me:$LINENO: checking for --with-fpectl" >&5
15921echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
15922
Guido van Rossum7f253911997-05-09 02:42:48 +000015923# Check whether --with-fpectl or --without-fpectl was given.
15924if test "${with_fpectl+set}" = set; then
15925 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000015926
Guido van Rossum7f253911997-05-09 02:42:48 +000015927if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015928then
15929
15930cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000015931#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015932_ACEOF
15933
15934 echo "$as_me:$LINENO: result: yes" >&5
15935echo "${ECHO_T}yes" >&6
15936else echo "$as_me:$LINENO: result: no" >&5
15937echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015938fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015939else
Martin v. Löwis11437992002-04-12 09:54:03 +000015940 echo "$as_me:$LINENO: result: no" >&5
15941echo "${ECHO_T}no" >&6
15942fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000015943
Guido van Rossum7f43da71994-08-01 12:15:30 +000015944# check for --with-libm=...
15945
Guido van Rossum563e7081996-09-10 18:20:48 +000015946case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000015947Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015948BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000015949*) LIBM=-lm
15950esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015951echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
15952echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
15953
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015954# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015955if test "${with_libm+set}" = set; then
15956 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000015957
Guido van Rossum7f253911997-05-09 02:42:48 +000015958if test "$withval" = no
15959then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000015960 echo "$as_me:$LINENO: result: force LIBM empty" >&5
15961echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015962elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015963then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015964 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
15965echo "${ECHO_T}set LIBM=\"$withval\"" >&6
15966else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
15967echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
15968 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015969fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015970else
Martin v. Löwis11437992002-04-12 09:54:03 +000015971 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
15972echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
15973fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015974
15975# check for --with-libc=...
15976
Martin v. Löwis11437992002-04-12 09:54:03 +000015977echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
15978echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
15979
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015980# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015981if test "${with_libc+set}" = set; then
15982 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000015983
Guido van Rossum7f253911997-05-09 02:42:48 +000015984if test "$withval" = no
15985then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000015986 echo "$as_me:$LINENO: result: force LIBC empty" >&5
15987echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015988elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015989then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015990 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
15991echo "${ECHO_T}set LIBC=\"$withval\"" >&6
15992else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
15993echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
15994 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015995fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015996else
Martin v. Löwis11437992002-04-12 09:54:03 +000015997 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
15998echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
15999fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016000
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016001# check for hypot() in math library
16002LIBS_SAVE=$LIBS
16003LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000016004
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016005for ac_func in hypot
16006do
Martin v. Löwis11437992002-04-12 09:54:03 +000016007as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16008echo "$as_me:$LINENO: checking for $ac_func" >&5
16009echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16010if eval "test \"\${$as_ac_var+set}\" = set"; then
16011 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016012else
Martin v. Löwis11437992002-04-12 09:54:03 +000016013 cat >conftest.$ac_ext <<_ACEOF
16014#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016015#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016016/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000016017 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016018#include <assert.h>
16019/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016020#ifdef __cplusplus
16021extern "C"
16022#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016023/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016024 builtin and then its argument prototype would still apply. */
16025char $ac_func ();
16026char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016027
Barry Warsawfe33b792003-01-07 22:42:49 +000016028#ifdef F77_DUMMY_MAIN
16029# ifdef __cplusplus
16030 extern "C"
16031# endif
16032 int F77_DUMMY_MAIN() { return 1; }
16033#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016034int
16035main ()
16036{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016037/* The GNU C library defines this for functions which it implements
16038 to always fail with ENOSYS. Some functions are actually named
16039 something starting with __ and the normal name is an alias. */
16040#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16041choke me
16042#else
Martin v. Löwis11437992002-04-12 09:54:03 +000016043f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016044#endif
16045
Martin v. Löwis11437992002-04-12 09:54:03 +000016046 ;
16047 return 0;
16048}
16049_ACEOF
16050rm -f conftest.$ac_objext conftest$ac_exeext
16051if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16052 (eval $ac_link) 2>&5
16053 ac_status=$?
16054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16055 (exit $ac_status); } &&
16056 { ac_try='test -s conftest$ac_exeext'
16057 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16058 (eval $ac_try) 2>&5
16059 ac_status=$?
16060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16061 (exit $ac_status); }; }; then
16062 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016063else
Martin v. Löwis11437992002-04-12 09:54:03 +000016064 echo "$as_me: failed program was:" >&5
16065cat conftest.$ac_ext >&5
16066eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016067fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016068rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016069fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016070echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16071echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16072if test `eval echo '${'$as_ac_var'}'` = yes; then
16073 cat >>confdefs.h <<_ACEOF
16074#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16075_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000016076
Michael W. Hudson54241132001-12-07 15:38:26 +000016077else
Martin v. Löwis11437992002-04-12 09:54:03 +000016078 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016079fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016080done
16081
Michael W. Hudson54241132001-12-07 15:38:26 +000016082
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016083LIBS=$LIBS_SAVE
16084
Guido van Rossumef2255b2000-03-10 22:30:29 +000016085# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000016086if test "${ac_cv_header_wchar_h+set}" = set; then
16087 echo "$as_me:$LINENO: checking for wchar.h" >&5
16088echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16089if test "${ac_cv_header_wchar_h+set}" = set; then
16090 echo $ECHO_N "(cached) $ECHO_C" >&6
16091fi
16092echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16093echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000016094else
Martin v. Löwis11437992002-04-12 09:54:03 +000016095 # Is the header compilable?
16096echo "$as_me:$LINENO: checking wchar.h usability" >&5
16097echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
16098cat >conftest.$ac_ext <<_ACEOF
16099#line $LINENO "configure"
16100#include "confdefs.h"
16101$ac_includes_default
16102#include <wchar.h>
16103_ACEOF
16104rm -f conftest.$ac_objext
16105if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16106 (eval $ac_compile) 2>&5
16107 ac_status=$?
16108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16109 (exit $ac_status); } &&
16110 { ac_try='test -s conftest.$ac_objext'
16111 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16112 (eval $ac_try) 2>&5
16113 ac_status=$?
16114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16115 (exit $ac_status); }; }; then
16116 ac_header_compiler=yes
16117else
16118 echo "$as_me: failed program was:" >&5
16119cat conftest.$ac_ext >&5
16120ac_header_compiler=no
16121fi
16122rm -f conftest.$ac_objext conftest.$ac_ext
16123echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16124echo "${ECHO_T}$ac_header_compiler" >&6
16125
16126# Is the header present?
16127echo "$as_me:$LINENO: checking wchar.h presence" >&5
16128echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
16129cat >conftest.$ac_ext <<_ACEOF
16130#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016131#include "confdefs.h"
16132#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016133_ACEOF
16134if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16135 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16136 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000016137 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016138 rm -f conftest.er1
16139 cat conftest.err >&5
16140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16141 (exit $ac_status); } >/dev/null; then
16142 if test -s conftest.err; then
16143 ac_cpp_err=$ac_c_preproc_warn_flag
16144 else
16145 ac_cpp_err=
16146 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016147else
Martin v. Löwis11437992002-04-12 09:54:03 +000016148 ac_cpp_err=yes
16149fi
16150if test -z "$ac_cpp_err"; then
16151 ac_header_preproc=yes
16152else
16153 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000016154 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016155 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016156fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016157rm -f conftest.err conftest.$ac_ext
16158echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16159echo "${ECHO_T}$ac_header_preproc" >&6
16160
16161# So? What about this header?
16162case $ac_header_compiler:$ac_header_preproc in
16163 yes:no )
16164 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
16165echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16166 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
16167echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
16168 no:yes )
16169 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
16170echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
16171 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
16172echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
16173 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
16174echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
16175esac
16176echo "$as_me:$LINENO: checking for wchar.h" >&5
16177echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16178if test "${ac_cv_header_wchar_h+set}" = set; then
16179 echo $ECHO_N "(cached) $ECHO_C" >&6
16180else
16181 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000016182fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016183echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16184echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
16185
16186fi
16187if test $ac_cv_header_wchar_h = yes; then
16188
16189
16190cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016191#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016192_ACEOF
16193
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016194 wchar_h="yes"
16195
Guido van Rossumef2255b2000-03-10 22:30:29 +000016196else
Martin v. Löwis11437992002-04-12 09:54:03 +000016197 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016198
16199fi
16200
Michael W. Hudson54241132001-12-07 15:38:26 +000016201
Martin v. Löwis11437992002-04-12 09:54:03 +000016202
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016203# determine wchar_t size
16204if test "$wchar_h" = yes
16205then
Martin v. Löwis11437992002-04-12 09:54:03 +000016206 echo "$as_me:$LINENO: checking for wchar_t" >&5
16207echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
16208if test "${ac_cv_type_wchar_t+set}" = set; then
16209 echo $ECHO_N "(cached) $ECHO_C" >&6
16210else
16211 cat >conftest.$ac_ext <<_ACEOF
16212#line $LINENO "configure"
16213#include "confdefs.h"
16214#include <wchar.h>
16215
Barry Warsawfe33b792003-01-07 22:42:49 +000016216#ifdef F77_DUMMY_MAIN
16217# ifdef __cplusplus
16218 extern "C"
16219# endif
16220 int F77_DUMMY_MAIN() { return 1; }
16221#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016222int
16223main ()
16224{
16225if ((wchar_t *) 0)
16226 return 0;
16227if (sizeof (wchar_t))
16228 return 0;
16229 ;
16230 return 0;
16231}
16232_ACEOF
16233rm -f conftest.$ac_objext
16234if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16235 (eval $ac_compile) 2>&5
16236 ac_status=$?
16237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16238 (exit $ac_status); } &&
16239 { ac_try='test -s conftest.$ac_objext'
16240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16241 (eval $ac_try) 2>&5
16242 ac_status=$?
16243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16244 (exit $ac_status); }; }; then
16245 ac_cv_type_wchar_t=yes
16246else
16247 echo "$as_me: failed program was:" >&5
16248cat conftest.$ac_ext >&5
16249ac_cv_type_wchar_t=no
16250fi
16251rm -f conftest.$ac_objext conftest.$ac_ext
16252fi
16253echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
16254echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
16255
16256echo "$as_me:$LINENO: checking size of wchar_t" >&5
16257echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
16258if test "${ac_cv_sizeof_wchar_t+set}" = set; then
16259 echo $ECHO_N "(cached) $ECHO_C" >&6
16260else
16261 if test "$ac_cv_type_wchar_t" = yes; then
16262 # The cast to unsigned long works around a bug in the HP C Compiler
16263 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16264 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16265 # This bug is HP SR number 8606223364.
16266 if test "$cross_compiling" = yes; then
16267 # Depending upon the size, compute the lo and hi bounds.
16268cat >conftest.$ac_ext <<_ACEOF
16269#line $LINENO "configure"
16270#include "confdefs.h"
16271#include <wchar.h>
16272
Barry Warsawfe33b792003-01-07 22:42:49 +000016273#ifdef F77_DUMMY_MAIN
16274# ifdef __cplusplus
16275 extern "C"
16276# endif
16277 int F77_DUMMY_MAIN() { return 1; }
16278#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016279int
16280main ()
16281{
16282static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
16283test_array [0] = 0
16284
16285 ;
16286 return 0;
16287}
16288_ACEOF
16289rm -f conftest.$ac_objext
16290if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16291 (eval $ac_compile) 2>&5
16292 ac_status=$?
16293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16294 (exit $ac_status); } &&
16295 { ac_try='test -s conftest.$ac_objext'
16296 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16297 (eval $ac_try) 2>&5
16298 ac_status=$?
16299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16300 (exit $ac_status); }; }; then
16301 ac_lo=0 ac_mid=0
16302 while :; do
16303 cat >conftest.$ac_ext <<_ACEOF
16304#line $LINENO "configure"
16305#include "confdefs.h"
16306#include <wchar.h>
16307
Barry Warsawfe33b792003-01-07 22:42:49 +000016308#ifdef F77_DUMMY_MAIN
16309# ifdef __cplusplus
16310 extern "C"
16311# endif
16312 int F77_DUMMY_MAIN() { return 1; }
16313#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016314int
16315main ()
16316{
16317static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16318test_array [0] = 0
16319
16320 ;
16321 return 0;
16322}
16323_ACEOF
16324rm -f conftest.$ac_objext
16325if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16326 (eval $ac_compile) 2>&5
16327 ac_status=$?
16328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16329 (exit $ac_status); } &&
16330 { ac_try='test -s conftest.$ac_objext'
16331 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16332 (eval $ac_try) 2>&5
16333 ac_status=$?
16334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16335 (exit $ac_status); }; }; then
16336 ac_hi=$ac_mid; break
16337else
16338 echo "$as_me: failed program was:" >&5
16339cat conftest.$ac_ext >&5
16340ac_lo=`expr $ac_mid + 1`
16341 if test $ac_lo -le $ac_mid; then
16342 ac_lo= ac_hi=
16343 break
16344 fi
16345 ac_mid=`expr 2 '*' $ac_mid + 1`
16346fi
16347rm -f conftest.$ac_objext conftest.$ac_ext
16348 done
16349else
16350 echo "$as_me: failed program was:" >&5
16351cat conftest.$ac_ext >&5
16352cat >conftest.$ac_ext <<_ACEOF
16353#line $LINENO "configure"
16354#include "confdefs.h"
16355#include <wchar.h>
16356
Barry Warsawfe33b792003-01-07 22:42:49 +000016357#ifdef F77_DUMMY_MAIN
16358# ifdef __cplusplus
16359 extern "C"
16360# endif
16361 int F77_DUMMY_MAIN() { return 1; }
16362#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016363int
16364main ()
16365{
16366static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
16367test_array [0] = 0
16368
16369 ;
16370 return 0;
16371}
16372_ACEOF
16373rm -f conftest.$ac_objext
16374if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16375 (eval $ac_compile) 2>&5
16376 ac_status=$?
16377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16378 (exit $ac_status); } &&
16379 { ac_try='test -s conftest.$ac_objext'
16380 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16381 (eval $ac_try) 2>&5
16382 ac_status=$?
16383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16384 (exit $ac_status); }; }; then
16385 ac_hi=-1 ac_mid=-1
16386 while :; do
16387 cat >conftest.$ac_ext <<_ACEOF
16388#line $LINENO "configure"
16389#include "confdefs.h"
16390#include <wchar.h>
16391
Barry Warsawfe33b792003-01-07 22:42:49 +000016392#ifdef F77_DUMMY_MAIN
16393# ifdef __cplusplus
16394 extern "C"
16395# endif
16396 int F77_DUMMY_MAIN() { return 1; }
16397#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016398int
16399main ()
16400{
16401static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
16402test_array [0] = 0
16403
16404 ;
16405 return 0;
16406}
16407_ACEOF
16408rm -f conftest.$ac_objext
16409if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16410 (eval $ac_compile) 2>&5
16411 ac_status=$?
16412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16413 (exit $ac_status); } &&
16414 { ac_try='test -s conftest.$ac_objext'
16415 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16416 (eval $ac_try) 2>&5
16417 ac_status=$?
16418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16419 (exit $ac_status); }; }; then
16420 ac_lo=$ac_mid; break
16421else
16422 echo "$as_me: failed program was:" >&5
16423cat conftest.$ac_ext >&5
16424ac_hi=`expr '(' $ac_mid ')' - 1`
16425 if test $ac_mid -le $ac_hi; then
16426 ac_lo= ac_hi=
16427 break
16428 fi
16429 ac_mid=`expr 2 '*' $ac_mid`
16430fi
16431rm -f conftest.$ac_objext conftest.$ac_ext
16432 done
16433else
16434 echo "$as_me: failed program was:" >&5
16435cat conftest.$ac_ext >&5
16436ac_lo= ac_hi=
16437fi
16438rm -f conftest.$ac_objext conftest.$ac_ext
16439fi
16440rm -f conftest.$ac_objext conftest.$ac_ext
16441# Binary search between lo and hi bounds.
16442while test "x$ac_lo" != "x$ac_hi"; do
16443 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
16444 cat >conftest.$ac_ext <<_ACEOF
16445#line $LINENO "configure"
16446#include "confdefs.h"
16447#include <wchar.h>
16448
Barry Warsawfe33b792003-01-07 22:42:49 +000016449#ifdef F77_DUMMY_MAIN
16450# ifdef __cplusplus
16451 extern "C"
16452# endif
16453 int F77_DUMMY_MAIN() { return 1; }
16454#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016455int
16456main ()
16457{
16458static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16459test_array [0] = 0
16460
16461 ;
16462 return 0;
16463}
16464_ACEOF
16465rm -f conftest.$ac_objext
16466if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16467 (eval $ac_compile) 2>&5
16468 ac_status=$?
16469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16470 (exit $ac_status); } &&
16471 { ac_try='test -s conftest.$ac_objext'
16472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16473 (eval $ac_try) 2>&5
16474 ac_status=$?
16475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16476 (exit $ac_status); }; }; then
16477 ac_hi=$ac_mid
16478else
16479 echo "$as_me: failed program was:" >&5
16480cat conftest.$ac_ext >&5
16481ac_lo=`expr '(' $ac_mid ')' + 1`
16482fi
16483rm -f conftest.$ac_objext conftest.$ac_ext
16484done
16485case $ac_lo in
16486?*) ac_cv_sizeof_wchar_t=$ac_lo;;
16487'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
16488echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
16489 { (exit 1); exit 1; }; } ;;
16490esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016491else
16492 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016493 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
16494echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16495 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000016496else
Martin v. Löwis11437992002-04-12 09:54:03 +000016497 cat >conftest.$ac_ext <<_ACEOF
16498#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016499#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016500#include <wchar.h>
16501
16502long longval () { return (long) (sizeof (wchar_t)); }
16503unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000016504#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016505#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000016506#ifdef F77_DUMMY_MAIN
16507# ifdef __cplusplus
16508 extern "C"
16509# endif
16510 int F77_DUMMY_MAIN() { return 1; }
16511#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016512int
16513main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016514{
Martin v. Löwis11437992002-04-12 09:54:03 +000016515
16516 FILE *f = fopen ("conftest.val", "w");
16517 if (! f)
16518 exit (1);
16519 if (((long) (sizeof (wchar_t))) < 0)
16520 {
16521 long i = longval ();
16522 if (i != ((long) (sizeof (wchar_t))))
16523 exit (1);
16524 fprintf (f, "%ld\n", i);
16525 }
16526 else
16527 {
16528 unsigned long i = ulongval ();
16529 if (i != ((long) (sizeof (wchar_t))))
16530 exit (1);
16531 fprintf (f, "%lu\n", i);
16532 }
16533 exit (ferror (f) || fclose (f) != 0);
16534
16535 ;
16536 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000016537}
Martin v. Löwis11437992002-04-12 09:54:03 +000016538_ACEOF
16539rm -f conftest$ac_exeext
16540if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16541 (eval $ac_link) 2>&5
16542 ac_status=$?
16543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16544 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16545 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16546 (eval $ac_try) 2>&5
16547 ac_status=$?
16548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16549 (exit $ac_status); }; }; then
16550 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000016551else
Martin v. Löwis11437992002-04-12 09:54:03 +000016552 echo "$as_me: program exited with status $ac_status" >&5
16553echo "$as_me: failed program was:" >&5
16554cat conftest.$ac_ext >&5
16555( exit $ac_status )
16556{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
16557echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
16558 { (exit 1); exit 1; }; }
16559fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016560rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016561fi
16562fi
16563rm -f conftest.val
16564else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016565 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000016566fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016567fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016568echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
16569echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
16570cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016571#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016572_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016573
Michael W. Hudson54241132001-12-07 15:38:26 +000016574
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016575fi
16576
Martin v. Löwis11437992002-04-12 09:54:03 +000016577echo "$as_me:$LINENO: checking what type to use for unicode" >&5
16578echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016579# Check whether --enable-unicode or --disable-unicode was given.
16580if test "${enable_unicode+set}" = set; then
16581 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000016582
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016583else
16584 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000016585fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016586
16587if test $enable_unicode = yes
16588then
Martin v. Löwisfd917792001-06-27 20:22:04 +000016589 # Without any arguments, Py_UNICODE defaults to two-byte mode
16590 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016591fi
16592
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016593
16594
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016595case "$enable_unicode" in
16596ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000016597 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016598#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000016599_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016600
16601 ;;
16602ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000016603 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016604#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000016605_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016606
16607 ;;
16608esac
16609
Michael W. Hudson54241132001-12-07 15:38:26 +000016610
Martin v. Löwis11437992002-04-12 09:54:03 +000016611
16612
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016613
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016614if test "$enable_unicode" = "no"
16615then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016616 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000016617 echo "$as_me:$LINENO: result: not used" >&5
16618echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016619else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016620 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000016621
16622cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016623#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016624_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016625
16626 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
16627 then
16628 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016629
Martin v. Löwis11437992002-04-12 09:54:03 +000016630cat >>confdefs.h <<\_ACEOF
16631#define HAVE_USABLE_WCHAR_T 1
16632_ACEOF
16633
16634 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016635#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016636_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016637
16638 elif test "$ac_cv_sizeof_short" = "$unicode_size"
16639 then
16640 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000016641 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016642#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000016643_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016644
16645 elif test "$ac_cv_sizeof_long" = "$unicode_size"
16646 then
16647 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000016648 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016649#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000016650_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016651
16652 else
16653 PY_UNICODE_TYPE="no type found"
16654 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016655 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
16656echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016657fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016658
16659# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000016660echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
16661echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
16662if test "${ac_cv_c_bigendian+set}" = set; then
16663 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000016664else
Martin v. Löwis11437992002-04-12 09:54:03 +000016665 # See if sys/param.h defines the BYTE_ORDER macro.
16666cat >conftest.$ac_ext <<_ACEOF
16667#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016668#include "confdefs.h"
16669#include <sys/types.h>
16670#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000016671
Barry Warsawfe33b792003-01-07 22:42:49 +000016672#ifdef F77_DUMMY_MAIN
16673# ifdef __cplusplus
16674 extern "C"
16675# endif
16676 int F77_DUMMY_MAIN() { return 1; }
16677#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016678int
16679main ()
16680{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016681#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
16682 bogus endian macros
16683#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016684
16685 ;
16686 return 0;
16687}
16688_ACEOF
16689rm -f conftest.$ac_objext
16690if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16691 (eval $ac_compile) 2>&5
16692 ac_status=$?
16693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16694 (exit $ac_status); } &&
16695 { ac_try='test -s conftest.$ac_objext'
16696 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16697 (eval $ac_try) 2>&5
16698 ac_status=$?
16699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16700 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016701 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000016702cat >conftest.$ac_ext <<_ACEOF
16703#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016704#include "confdefs.h"
16705#include <sys/types.h>
16706#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000016707
Barry Warsawfe33b792003-01-07 22:42:49 +000016708#ifdef F77_DUMMY_MAIN
16709# ifdef __cplusplus
16710 extern "C"
16711# endif
16712 int F77_DUMMY_MAIN() { return 1; }
16713#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016714int
16715main ()
16716{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016717#if BYTE_ORDER != BIG_ENDIAN
16718 not big endian
16719#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016720
16721 ;
16722 return 0;
16723}
16724_ACEOF
16725rm -f conftest.$ac_objext
16726if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16727 (eval $ac_compile) 2>&5
16728 ac_status=$?
16729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16730 (exit $ac_status); } &&
16731 { ac_try='test -s conftest.$ac_objext'
16732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16733 (eval $ac_try) 2>&5
16734 ac_status=$?
16735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16736 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016737 ac_cv_c_bigendian=yes
16738else
Martin v. Löwis11437992002-04-12 09:54:03 +000016739 echo "$as_me: failed program was:" >&5
16740cat conftest.$ac_ext >&5
16741ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016742fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016743rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016744else
Martin v. Löwis11437992002-04-12 09:54:03 +000016745 echo "$as_me: failed program was:" >&5
16746cat conftest.$ac_ext >&5
16747# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000016748if test "$cross_compiling" = yes; then
Barry Warsawfe33b792003-01-07 22:42:49 +000016749 # try to guess the endianess by grep'ing values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000016750 ac_cv_c_bigendian=unknown
16751 cat >conftest.$ac_ext <<_ACEOF
16752#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016753#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016754short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16755short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16756void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
16757short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16758short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16759void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Barry Warsawfe33b792003-01-07 22:42:49 +000016760#ifdef F77_DUMMY_MAIN
16761# ifdef __cplusplus
16762 extern "C"
16763# endif
16764 int F77_DUMMY_MAIN() { return 1; }
16765#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016766int
16767main ()
16768{
16769 _ascii (); _ebcdic ();
16770 ;
16771 return 0;
16772}
16773_ACEOF
16774rm -f conftest.$ac_objext
16775if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16776 (eval $ac_compile) 2>&5
16777 ac_status=$?
16778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16779 (exit $ac_status); } &&
16780 { ac_try='test -s conftest.$ac_objext'
16781 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16782 (eval $ac_try) 2>&5
16783 ac_status=$?
16784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16785 (exit $ac_status); }; }; then
Barry Warsawfe33b792003-01-07 22:42:49 +000016786 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016787 ac_cv_c_bigendian=yes
16788fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016789if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016790 if test "$ac_cv_c_bigendian" = unknown; then
16791 ac_cv_c_bigendian=no
16792 else
16793 # finding both strings is unlikely to happen, but who knows?
16794 ac_cv_c_bigendian=unknown
16795 fi
16796fi
16797else
16798 echo "$as_me: failed program was:" >&5
16799cat conftest.$ac_ext >&5
16800fi
16801rm -f conftest.$ac_objext conftest.$ac_ext
16802else
16803 cat >conftest.$ac_ext <<_ACEOF
16804#line $LINENO "configure"
16805#include "confdefs.h"
16806int
16807main ()
16808{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016809 /* Are we little or big endian? From Harbison&Steele. */
16810 union
16811 {
16812 long l;
16813 char c[sizeof (long)];
16814 } u;
16815 u.l = 1;
16816 exit (u.c[sizeof (long) - 1] == 1);
16817}
Martin v. Löwis11437992002-04-12 09:54:03 +000016818_ACEOF
16819rm -f conftest$ac_exeext
16820if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16821 (eval $ac_link) 2>&5
16822 ac_status=$?
16823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16824 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16826 (eval $ac_try) 2>&5
16827 ac_status=$?
16828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16829 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016830 ac_cv_c_bigendian=no
16831else
Martin v. Löwis11437992002-04-12 09:54:03 +000016832 echo "$as_me: program exited with status $ac_status" >&5
16833echo "$as_me: failed program was:" >&5
16834cat conftest.$ac_ext >&5
16835( exit $ac_status )
16836ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000016837fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016838rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016839fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016840fi
16841rm -f conftest.$ac_objext conftest.$ac_ext
16842fi
16843echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
16844echo "${ECHO_T}$ac_cv_c_bigendian" >&6
16845case $ac_cv_c_bigendian in
16846 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000016847
Martin v. Löwis11437992002-04-12 09:54:03 +000016848cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016849#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016850_ACEOF
16851 ;;
16852 no)
16853 ;;
16854 *)
Barry Warsawfe33b792003-01-07 22:42:49 +000016855 { { echo "$as_me:$LINENO: error: unknown endianess
Martin v. Löwis11437992002-04-12 09:54:03 +000016856presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Barry Warsawfe33b792003-01-07 22:42:49 +000016857echo "$as_me: error: unknown endianess
Martin v. Löwis11437992002-04-12 09:54:03 +000016858presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
16859 { (exit 1); exit 1; }; } ;;
16860esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000016861
Michael W. Hudson54241132001-12-07 15:38:26 +000016862
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016863# Check whether right shifting a negative integer extends the sign bit
16864# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000016865echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
16866echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
16867if test "${ac_cv_rshift_extends_sign+set}" = set; then
16868 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016869else
Martin v. Löwis11437992002-04-12 09:54:03 +000016870
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016871if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000016872 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016873else
Martin v. Löwis11437992002-04-12 09:54:03 +000016874 cat >conftest.$ac_ext <<_ACEOF
16875#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016876#include "confdefs.h"
16877
16878int main()
16879{
Vladimir Marangozova6180282000-07-12 05:05:06 +000016880 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016881}
16882
Martin v. Löwis11437992002-04-12 09:54:03 +000016883_ACEOF
16884rm -f conftest$ac_exeext
16885if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16886 (eval $ac_link) 2>&5
16887 ac_status=$?
16888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16889 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16891 (eval $ac_try) 2>&5
16892 ac_status=$?
16893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16894 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000016895 ac_cv_rshift_extends_sign=yes
16896else
Martin v. Löwis11437992002-04-12 09:54:03 +000016897 echo "$as_me: program exited with status $ac_status" >&5
16898echo "$as_me: failed program was:" >&5
16899cat conftest.$ac_ext >&5
16900( exit $ac_status )
16901ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000016902fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016903rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016904fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000016905fi
16906
Martin v. Löwis11437992002-04-12 09:54:03 +000016907echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
16908echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016909if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016910then
Martin v. Löwis11437992002-04-12 09:54:03 +000016911
16912cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016913#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016914_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016915
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016916fi
16917
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016918# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016919echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
16920echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
16921if test "${ac_cv_have_getc_unlocked+set}" = set; then
16922 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016923else
Martin v. Löwis11437992002-04-12 09:54:03 +000016924
16925cat >conftest.$ac_ext <<_ACEOF
16926#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016927#include "confdefs.h"
16928#include <stdio.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000016929#ifdef F77_DUMMY_MAIN
16930# ifdef __cplusplus
16931 extern "C"
16932# endif
16933 int F77_DUMMY_MAIN() { return 1; }
16934#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016935int
16936main ()
16937{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016938
16939 FILE *f = fopen("/dev/null", "r");
16940 flockfile(f);
16941 getc_unlocked(f);
16942 funlockfile(f);
16943
Martin v. Löwis11437992002-04-12 09:54:03 +000016944 ;
16945 return 0;
16946}
16947_ACEOF
16948rm -f conftest.$ac_objext conftest$ac_exeext
16949if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16950 (eval $ac_link) 2>&5
16951 ac_status=$?
16952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16953 (exit $ac_status); } &&
16954 { ac_try='test -s conftest$ac_exeext'
16955 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16956 (eval $ac_try) 2>&5
16957 ac_status=$?
16958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16959 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016960 ac_cv_have_getc_unlocked=yes
16961else
Martin v. Löwis11437992002-04-12 09:54:03 +000016962 echo "$as_me: failed program was:" >&5
16963cat conftest.$ac_ext >&5
16964ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016965fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016966rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016967fi
16968
Martin v. Löwis11437992002-04-12 09:54:03 +000016969echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
16970echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016971if test "$ac_cv_have_getc_unlocked" = yes
16972then
Martin v. Löwis11437992002-04-12 09:54:03 +000016973
16974cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016975#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016976_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016977
16978fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016979
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000016980# check for readline 2.2
16981cat >conftest.$ac_ext <<_ACEOF
16982#line $LINENO "configure"
16983#include "confdefs.h"
16984#include <readline/readline.h>
16985_ACEOF
16986if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16987 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16988 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000016989 egrep -v '^ *\+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000016990 rm -f conftest.er1
16991 cat conftest.err >&5
16992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16993 (exit $ac_status); } >/dev/null; then
16994 if test -s conftest.err; then
16995 ac_cpp_err=$ac_c_preproc_warn_flag
16996 else
16997 ac_cpp_err=
16998 fi
16999else
17000 ac_cpp_err=yes
17001fi
17002if test -z "$ac_cpp_err"; then
17003 have_readline=yes
17004else
17005 echo "$as_me: failed program was:" >&5
17006 cat conftest.$ac_ext >&5
17007 have_readline=no
17008fi
17009rm -f conftest.err conftest.$ac_ext
17010if test $have_readline = yes
17011then
17012 cat >conftest.$ac_ext <<_ACEOF
17013#line $LINENO "configure"
17014#include "confdefs.h"
17015#include <readline/readline.h>
17016
17017_ACEOF
17018if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000017019 egrep "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017020
17021cat >>confdefs.h <<\_ACEOF
17022#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
17023_ACEOF
17024
17025fi
17026rm -f conftest*
17027
17028fi
17029
Martin v. Löwis0daad592001-09-30 21:09:59 +000017030# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000017031echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
17032echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
17033if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
17034 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000017035else
Martin v. Löwis11437992002-04-12 09:54:03 +000017036 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000017037LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017038cat >conftest.$ac_ext <<_ACEOF
17039#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000017040#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000017041
Guido van Rossum353ae582001-07-10 16:45:32 +000017042/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017043#ifdef __cplusplus
17044extern "C"
17045#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000017046/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017047 builtin and then its argument prototype would still apply. */
17048char rl_pre_input_hook ();
Barry Warsawfe33b792003-01-07 22:42:49 +000017049#ifdef F77_DUMMY_MAIN
17050# ifdef __cplusplus
17051 extern "C"
17052# endif
17053 int F77_DUMMY_MAIN() { return 1; }
17054#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017055int
17056main ()
17057{
17058rl_pre_input_hook ();
17059 ;
17060 return 0;
17061}
17062_ACEOF
17063rm -f conftest.$ac_objext conftest$ac_exeext
17064if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17065 (eval $ac_link) 2>&5
17066 ac_status=$?
17067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17068 (exit $ac_status); } &&
17069 { ac_try='test -s conftest$ac_exeext'
17070 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17071 (eval $ac_try) 2>&5
17072 ac_status=$?
17073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17074 (exit $ac_status); }; }; then
17075 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000017076else
Martin v. Löwis11437992002-04-12 09:54:03 +000017077 echo "$as_me: failed program was:" >&5
17078cat conftest.$ac_ext >&5
17079ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000017080fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017081rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17082LIBS=$ac_check_lib_save_LIBS
17083fi
17084echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
17085echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
17086if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017087
Martin v. Löwis11437992002-04-12 09:54:03 +000017088cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017089#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017090_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017091
Martin v. Löwis0daad592001-09-30 21:09:59 +000017092fi
17093
Michael W. Hudson54241132001-12-07 15:38:26 +000017094
Martin v. Löwis0daad592001-09-30 21:09:59 +000017095# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000017096echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
17097echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
17098if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
17099 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000017100else
Martin v. Löwis11437992002-04-12 09:54:03 +000017101 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000017102LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017103cat >conftest.$ac_ext <<_ACEOF
17104#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000017105#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000017106
Martin v. Löwis0daad592001-09-30 21:09:59 +000017107/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017108#ifdef __cplusplus
17109extern "C"
17110#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000017111/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017112 builtin and then its argument prototype would still apply. */
17113char rl_completion_matches ();
Barry Warsawfe33b792003-01-07 22:42:49 +000017114#ifdef F77_DUMMY_MAIN
17115# ifdef __cplusplus
17116 extern "C"
17117# endif
17118 int F77_DUMMY_MAIN() { return 1; }
17119#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017120int
17121main ()
17122{
17123rl_completion_matches ();
17124 ;
17125 return 0;
17126}
17127_ACEOF
17128rm -f conftest.$ac_objext conftest$ac_exeext
17129if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17130 (eval $ac_link) 2>&5
17131 ac_status=$?
17132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17133 (exit $ac_status); } &&
17134 { ac_try='test -s conftest$ac_exeext'
17135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17136 (eval $ac_try) 2>&5
17137 ac_status=$?
17138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17139 (exit $ac_status); }; }; then
17140 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000017141else
Martin v. Löwis11437992002-04-12 09:54:03 +000017142 echo "$as_me: failed program was:" >&5
17143cat conftest.$ac_ext >&5
17144ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000017145fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017146rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17147LIBS=$ac_check_lib_save_LIBS
17148fi
17149echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
17150echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
17151if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017152
Martin v. Löwis11437992002-04-12 09:54:03 +000017153cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017154#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017155_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017156
Guido van Rossum353ae582001-07-10 16:45:32 +000017157fi
17158
Jack Jansendd19cf82001-12-06 22:36:17 +000017159
Martin v. Löwis11437992002-04-12 09:54:03 +000017160echo "$as_me:$LINENO: checking for broken nice()" >&5
17161echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
17162if test "${ac_cv_broken_nice+set}" = set; then
17163 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017164else
Martin v. Löwis11437992002-04-12 09:54:03 +000017165
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017166if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017167 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017168else
Martin v. Löwis11437992002-04-12 09:54:03 +000017169 cat >conftest.$ac_ext <<_ACEOF
17170#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017171#include "confdefs.h"
17172
17173int main()
17174{
17175 int val1 = nice(1);
17176 if (val1 != -1 && val1 == nice(2))
17177 exit(0);
17178 exit(1);
17179}
17180
Martin v. Löwis11437992002-04-12 09:54:03 +000017181_ACEOF
17182rm -f conftest$ac_exeext
17183if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17184 (eval $ac_link) 2>&5
17185 ac_status=$?
17186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17187 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17188 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17189 (eval $ac_try) 2>&5
17190 ac_status=$?
17191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17192 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017193 ac_cv_broken_nice=yes
17194else
Martin v. Löwis11437992002-04-12 09:54:03 +000017195 echo "$as_me: program exited with status $ac_status" >&5
17196echo "$as_me: failed program was:" >&5
17197cat conftest.$ac_ext >&5
17198( exit $ac_status )
17199ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017200fi
Barry Warsawfe33b792003-01-07 22:42:49 +000017201rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017202fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017203fi
17204
Martin v. Löwis11437992002-04-12 09:54:03 +000017205echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
17206echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017207if test "$ac_cv_broken_nice" = yes
17208then
Martin v. Löwis11437992002-04-12 09:54:03 +000017209
17210cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017211#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017212_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017213
17214fi
17215
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017216# tzset(3) exists and works like we expect it to
17217echo "$as_me:$LINENO: checking for working tzset()" >&5
17218echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
17219if test "${ac_cv_working_tzset+set}" = set; then
17220 echo $ECHO_N "(cached) $ECHO_C" >&6
17221else
17222
17223if test "$cross_compiling" = yes; then
17224 ac_cv_working_tzset=no
17225else
17226 cat >conftest.$ac_ext <<_ACEOF
17227#line $LINENO "configure"
17228#include "confdefs.h"
17229
17230#include <stdlib.h>
17231#include <time.h>
17232int main()
17233{
17234 int gmt_hour;
17235 int eastern_hour;
17236 time_t now;
17237 now = time((time_t*)NULL);
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017238 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017239 tzset();
17240 gmt_hour = localtime(&now)->tm_hour;
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017241 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017242 tzset();
17243 eastern_hour = localtime(&now)->tm_hour;
17244 if (eastern_hour == gmt_hour)
17245 exit(1);
17246 exit(0);
17247}
17248
17249_ACEOF
17250rm -f conftest$ac_exeext
17251if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17252 (eval $ac_link) 2>&5
17253 ac_status=$?
17254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17255 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17256 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17257 (eval $ac_try) 2>&5
17258 ac_status=$?
17259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17260 (exit $ac_status); }; }; then
17261 ac_cv_working_tzset=yes
17262else
17263 echo "$as_me: program exited with status $ac_status" >&5
17264echo "$as_me: failed program was:" >&5
17265cat conftest.$ac_ext >&5
17266( exit $ac_status )
17267ac_cv_working_tzset=no
17268fi
17269rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17270fi
17271fi
17272
17273echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
17274echo "${ECHO_T}$ac_cv_working_tzset" >&6
17275if test "$ac_cv_working_tzset" = yes
17276then
17277
17278cat >>confdefs.h <<\_ACEOF
17279#define HAVE_WORKING_TZSET 1
17280_ACEOF
17281
17282fi
17283
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017284# Look for subsecond timestamps in struct stat
17285echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
17286echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
17287if test "${ac_cv_stat_tv_nsec+set}" = set; then
17288 echo $ECHO_N "(cached) $ECHO_C" >&6
17289else
17290 cat >conftest.$ac_ext <<_ACEOF
17291#line $LINENO "configure"
17292#include "confdefs.h"
17293#include <sys/stat.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000017294#ifdef F77_DUMMY_MAIN
17295# ifdef __cplusplus
17296 extern "C"
17297# endif
17298 int F77_DUMMY_MAIN() { return 1; }
17299#endif
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017300int
17301main ()
17302{
17303
17304struct stat st;
17305st.st_mtim.tv_nsec = 1;
17306
17307 ;
17308 return 0;
17309}
17310_ACEOF
17311rm -f conftest.$ac_objext
17312if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17313 (eval $ac_compile) 2>&5
17314 ac_status=$?
17315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17316 (exit $ac_status); } &&
17317 { ac_try='test -s conftest.$ac_objext'
17318 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17319 (eval $ac_try) 2>&5
17320 ac_status=$?
17321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17322 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000017323 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017324else
17325 echo "$as_me: failed program was:" >&5
17326cat conftest.$ac_ext >&5
17327ac_cv_stat_tv_nsec=no
17328fi
17329rm -f conftest.$ac_objext conftest.$ac_ext
17330fi
17331
17332echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
17333echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
17334if test "$ac_cv_stat_tv_nsec" = yes
17335then
17336
17337cat >>confdefs.h <<\_ACEOF
17338#define HAVE_STAT_TV_NSEC 1
17339_ACEOF
17340
17341fi
17342
Jack Jansen666b1e72001-10-31 12:11:48 +000017343# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000017344echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
17345echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
17346if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
17347 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017348else
Martin v. Löwis11437992002-04-12 09:54:03 +000017349 cat >conftest.$ac_ext <<_ACEOF
17350#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000017351#include "confdefs.h"
17352#include <curses.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000017353#ifdef F77_DUMMY_MAIN
17354# ifdef __cplusplus
17355 extern "C"
17356# endif
17357 int F77_DUMMY_MAIN() { return 1; }
17358#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017359int
17360main ()
17361{
Jack Jansen666b1e72001-10-31 12:11:48 +000017362
17363 int rtn;
17364 rtn = mvwdelch(0,0,0);
17365
Martin v. Löwis11437992002-04-12 09:54:03 +000017366 ;
17367 return 0;
17368}
17369_ACEOF
17370rm -f conftest.$ac_objext
17371if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17372 (eval $ac_compile) 2>&5
17373 ac_status=$?
17374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17375 (exit $ac_status); } &&
17376 { ac_try='test -s conftest.$ac_objext'
17377 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17378 (eval $ac_try) 2>&5
17379 ac_status=$?
17380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17381 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017382 ac_cv_mvwdelch_is_expression=yes
17383else
Martin v. Löwis11437992002-04-12 09:54:03 +000017384 echo "$as_me: failed program was:" >&5
17385cat conftest.$ac_ext >&5
17386ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017387fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017388rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017389fi
17390
Martin v. Löwis11437992002-04-12 09:54:03 +000017391echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
17392echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017393
17394if test "$ac_cv_mvwdelch_is_expression" = yes
17395then
Martin v. Löwis11437992002-04-12 09:54:03 +000017396
17397cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017398#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017399_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017400
17401fi
17402
Martin v. Löwis11437992002-04-12 09:54:03 +000017403echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
17404echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
17405if test "${ac_cv_window_has_flags+set}" = set; then
17406 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017407else
Martin v. Löwis11437992002-04-12 09:54:03 +000017408 cat >conftest.$ac_ext <<_ACEOF
17409#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000017410#include "confdefs.h"
17411#include <curses.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000017412#ifdef F77_DUMMY_MAIN
17413# ifdef __cplusplus
17414 extern "C"
17415# endif
17416 int F77_DUMMY_MAIN() { return 1; }
17417#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017418int
17419main ()
17420{
Jack Jansen666b1e72001-10-31 12:11:48 +000017421
17422 WINDOW *w;
17423 w->_flags = 0;
17424
Martin v. Löwis11437992002-04-12 09:54:03 +000017425 ;
17426 return 0;
17427}
17428_ACEOF
17429rm -f conftest.$ac_objext
17430if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17431 (eval $ac_compile) 2>&5
17432 ac_status=$?
17433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17434 (exit $ac_status); } &&
17435 { ac_try='test -s conftest.$ac_objext'
17436 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17437 (eval $ac_try) 2>&5
17438 ac_status=$?
17439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17440 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017441 ac_cv_window_has_flags=yes
17442else
Martin v. Löwis11437992002-04-12 09:54:03 +000017443 echo "$as_me: failed program was:" >&5
17444cat conftest.$ac_ext >&5
17445ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017446fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017447rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017448fi
17449
Martin v. Löwis11437992002-04-12 09:54:03 +000017450echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
17451echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017452
Jack Jansen666b1e72001-10-31 12:11:48 +000017453
17454if test "$ac_cv_window_has_flags" = yes
17455then
Martin v. Löwis11437992002-04-12 09:54:03 +000017456
17457cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017458#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017459_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017460
17461fi
17462
Martin v. Löwis24a880b2002-12-31 12:55:15 +000017463echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
17464echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
17465
17466if test -e /dev/ptmx
17467then
17468 echo "$as_me:$LINENO: result: yes" >&5
17469echo "${ECHO_T}yes" >&6
17470
17471cat >>confdefs.h <<\_ACEOF
17472#define HAVE_DEV_PTMX 1
17473_ACEOF
17474
17475else
17476 echo "$as_me:$LINENO: result: no" >&5
17477echo "${ECHO_T}no" >&6
17478fi
17479
Neal Norwitz865400f2003-03-21 01:42:58 +000017480echo "$as_me:$LINENO: checking for /dev/ptc" >&5
17481echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
17482
17483if test -e /dev/ptc
17484then
17485 echo "$as_me:$LINENO: result: yes" >&5
17486echo "${ECHO_T}yes" >&6
17487
17488cat >>confdefs.h <<\_ACEOF
17489#define HAVE_DEV_PTC 1
17490_ACEOF
17491
17492else
17493 echo "$as_me:$LINENO: result: no" >&5
17494echo "${ECHO_T}no" >&6
17495fi
17496
Martin v. Löwis11437992002-04-12 09:54:03 +000017497echo "$as_me:$LINENO: checking for socklen_t" >&5
17498echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
17499if test "${ac_cv_type_socklen_t+set}" = set; then
17500 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000017501else
Martin v. Löwis11437992002-04-12 09:54:03 +000017502 cat >conftest.$ac_ext <<_ACEOF
17503#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000017504#include "confdefs.h"
Martin v. Löwis01c04012002-11-11 14:58:44 +000017505
17506#ifdef HAVE_SYS_TYPES_H
17507#include <sys/types.h>
17508#endif
17509#ifdef HAVE_SYS_SOCKET_H
17510#include <sys/socket.h>
17511#endif
17512
17513
Barry Warsawfe33b792003-01-07 22:42:49 +000017514#ifdef F77_DUMMY_MAIN
17515# ifdef __cplusplus
17516 extern "C"
17517# endif
17518 int F77_DUMMY_MAIN() { return 1; }
17519#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017520int
17521main ()
17522{
17523if ((socklen_t *) 0)
17524 return 0;
17525if (sizeof (socklen_t))
17526 return 0;
17527 ;
17528 return 0;
17529}
17530_ACEOF
17531rm -f conftest.$ac_objext
17532if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17533 (eval $ac_compile) 2>&5
17534 ac_status=$?
17535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17536 (exit $ac_status); } &&
17537 { ac_try='test -s conftest.$ac_objext'
17538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17539 (eval $ac_try) 2>&5
17540 ac_status=$?
17541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17542 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000017543 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000017544else
Martin v. Löwis11437992002-04-12 09:54:03 +000017545 echo "$as_me: failed program was:" >&5
17546cat conftest.$ac_ext >&5
17547ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000017548fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017549rm -f conftest.$ac_objext conftest.$ac_ext
17550fi
17551echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
17552echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
17553if test $ac_cv_type_socklen_t = yes; then
17554 :
17555else
Guido van Rossum95713eb2000-05-18 20:53:31 +000017556
Martin v. Löwis01c04012002-11-11 14:58:44 +000017557cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017558#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000017559_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017560
17561fi
17562
Michael W. Hudson54241132001-12-07 15:38:26 +000017563
Michael W. Hudson54241132001-12-07 15:38:26 +000017564
17565
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000017566for h in `(cd $srcdir;echo Python/thread_*.h)`
17567do
17568 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
17569done
17570
Michael W. Hudson54241132001-12-07 15:38:26 +000017571
Jack Jansen0b06be72002-06-21 14:48:38 +000017572SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000017573echo "$as_me:$LINENO: checking for build directories" >&5
17574echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017575for dir in $SRCDIRS; do
17576 if test ! -d $dir; then
17577 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000017578 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017579done
Martin v. Löwis11437992002-04-12 09:54:03 +000017580echo "$as_me:$LINENO: result: done" >&5
17581echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000017582
Guido van Rossum627b2d71993-12-24 10:39:16 +000017583# generate output files
Barry Warsawfe33b792003-01-07 22:42:49 +000017584ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017585
Martin v. Löwis11437992002-04-12 09:54:03 +000017586cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017587# This file is a shell script that caches the results of configure
17588# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017589# scripts and configure runs, see configure's option --config-cache.
17590# It is not useful on other systems. If it contains results you don't
17591# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017592#
Martin v. Löwis11437992002-04-12 09:54:03 +000017593# config.status only pays attention to the cache file if you give it
17594# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017595#
Barry Warsawfe33b792003-01-07 22:42:49 +000017596# `ac_cv_env_foo' variables (set or unset) will be overriden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017597# loading this file, other *unset* `ac_cv_foo' will be assigned the
17598# following values.
17599
17600_ACEOF
17601
Guido van Rossumf78abae1997-01-21 22:02:36 +000017602# The following way of writing the cache mishandles newlines in values,
17603# but we know of no workaround that is simple, portable, and efficient.
17604# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017605# Ultrix sh set writes to stderr and can't be redirected directly,
17606# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000017607{
17608 (set) 2>&1 |
17609 case `(ac_space=' '; set | grep ac_space) 2>&1` in
17610 *ac_space=\ *)
17611 # `set' does not quote correctly, so add quotes (double-quote
17612 # substitution turns \\\\ into \\, and sed turns \\ into \).
17613 sed -n \
17614 "s/'/'\\\\''/g;
17615 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17616 ;;
17617 *)
17618 # `set' quotes correctly as required by POSIX, so do not add quotes.
17619 sed -n \
17620 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17621 ;;
17622 esac;
17623} |
17624 sed '
17625 t clear
17626 : clear
17627 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17628 t end
17629 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17630 : end' >>confcache
17631if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017632 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017633 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17634 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017635 else
17636 echo "not updating unwritable cache $cache_file"
17637 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017638fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017639rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017640
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017641test "x$prefix" = xNONE && prefix=$ac_default_prefix
17642# Let make expand exec_prefix.
17643test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017644
Martin v. Löwis11437992002-04-12 09:54:03 +000017645# VPATH may cause trouble with some makes, so we remove $(srcdir),
17646# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17647# trailing colons and then remove the whole line if VPATH becomes empty
17648# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000017649if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017650 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17651s/:*\$(srcdir):*/:/;
17652s/:*\${srcdir}:*/:/;
17653s/:*@srcdir@:*/:/;
17654s/^\([^=]*=[ ]*\):*/\1/;
17655s/:*$//;
17656s/^[^=]*=[ ]*$//;
17657}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017658fi
17659
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017660DEFS=-DHAVE_CONFIG_H
17661
Martin v. Löwis11437992002-04-12 09:54:03 +000017662
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017663: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000017664ac_clean_files_save=$ac_clean_files
17665ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17666{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
17667echo "$as_me: creating $CONFIG_STATUS" >&6;}
17668cat >$CONFIG_STATUS <<_ACEOF
17669#! $SHELL
17670# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017671# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017672# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017673# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017674
Martin v. Löwis11437992002-04-12 09:54:03 +000017675debug=false
17676SHELL=\${CONFIG_SHELL-$SHELL}
17677_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000017678
Martin v. Löwis11437992002-04-12 09:54:03 +000017679cat >>$CONFIG_STATUS <<\_ACEOF
Barry Warsawfe33b792003-01-07 22:42:49 +000017680
Martin v. Löwis11437992002-04-12 09:54:03 +000017681## --------------------- ##
17682## M4sh Initialization. ##
17683## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017684
Martin v. Löwis11437992002-04-12 09:54:03 +000017685# Be Bourne compatible
17686if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17687 emulate sh
17688 NULLCMD=:
17689elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17690 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000017691fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017692
Barry Warsawfe33b792003-01-07 22:42:49 +000017693# NLS nuisances.
Martin v. Löwis11437992002-04-12 09:54:03 +000017694# Support unset when possible.
17695if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17696 as_unset=unset
17697else
17698 as_unset=false
17699fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017700
Barry Warsawfe33b792003-01-07 22:42:49 +000017701(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
17702 { $as_unset LANG || test "${LANG+set}" != set; } ||
17703 { LANG=C; export LANG; }
17704(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
17705 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
17706 { LC_ALL=C; export LC_ALL; }
17707(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
17708 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
17709 { LC_TIME=C; export LC_TIME; }
17710(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
17711 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
17712 { LC_CTYPE=C; export LC_CTYPE; }
17713(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
17714 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
17715 { LANGUAGE=C; export LANGUAGE; }
17716(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
17717 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
17718 { LC_COLLATE=C; export LC_COLLATE; }
17719(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
17720 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
17721 { LC_NUMERIC=C; export LC_NUMERIC; }
17722(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
17723 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
17724 { LC_MESSAGES=C; export LC_MESSAGES; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017725
17726
17727# Name of the executable.
Barry Warsawfe33b792003-01-07 22:42:49 +000017728as_me=`(basename "$0") 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017729$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17730 X"$0" : 'X\(//\)$' \| \
17731 X"$0" : 'X\(/\)$' \| \
17732 . : '\(.\)' 2>/dev/null ||
17733echo X/"$0" |
17734 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
17735 /^X\/\(\/\/\)$/{ s//\1/; q; }
17736 /^X\/\(\/\).*/{ s//\1/; q; }
17737 s/.*/./; q'`
17738
17739# PATH needs CR, and LINENO needs CR and PATH.
17740# Avoid depending upon Character Ranges.
17741as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17742as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17743as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17744as_cr_digits='0123456789'
17745as_cr_alnum=$as_cr_Letters$as_cr_digits
17746
17747# The user is always right.
17748if test "${PATH_SEPARATOR+set}" != set; then
17749 echo "#! /bin/sh" >conftest.sh
17750 echo "exit 0" >>conftest.sh
17751 chmod +x conftest.sh
Barry Warsawfe33b792003-01-07 22:42:49 +000017752 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017753 PATH_SEPARATOR=';'
17754 else
17755 PATH_SEPARATOR=:
17756 fi
17757 rm -f conftest.sh
17758fi
17759
17760
17761 as_lineno_1=$LINENO
17762 as_lineno_2=$LINENO
17763 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17764 test "x$as_lineno_1" != "x$as_lineno_2" &&
17765 test "x$as_lineno_3" = "x$as_lineno_2" || {
17766 # Find who we are. Look in the path if we contain no path at all
17767 # relative or not.
17768 case $0 in
17769 *[\\/]* ) as_myself=$0 ;;
17770 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17771for as_dir in $PATH
17772do
17773 IFS=$as_save_IFS
17774 test -z "$as_dir" && as_dir=.
17775 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17776done
17777
17778 ;;
17779 esac
17780 # We did not find ourselves, most probably we were run as `sh COMMAND'
17781 # in which case we are not to be found in the path.
17782 if test "x$as_myself" = x; then
17783 as_myself=$0
17784 fi
17785 if test ! -f "$as_myself"; then
17786 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
17787echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
17788 { (exit 1); exit 1; }; }
17789 fi
17790 case $CONFIG_SHELL in
17791 '')
17792 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17793for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
17794do
17795 IFS=$as_save_IFS
17796 test -z "$as_dir" && as_dir=.
17797 for as_base in sh bash ksh sh5; do
17798 case $as_dir in
17799 /*)
17800 if ("$as_dir/$as_base" -c '
17801 as_lineno_1=$LINENO
17802 as_lineno_2=$LINENO
17803 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17804 test "x$as_lineno_1" != "x$as_lineno_2" &&
17805 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
17806 CONFIG_SHELL=$as_dir/$as_base
17807 export CONFIG_SHELL
17808 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
17809 fi;;
17810 esac
17811 done
17812done
17813;;
Jack Jansendd19cf82001-12-06 22:36:17 +000017814 esac
17815
Martin v. Löwis11437992002-04-12 09:54:03 +000017816 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
17817 # uniformly replaced by the line number. The first 'sed' inserts a
17818 # line-number line before each line; the second 'sed' does the real
17819 # work. The second script uses 'N' to pair each line-number line
17820 # with the numbered line, and appends trailing '-' during
17821 # substitution so that $LINENO is not a special case at line end.
17822 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
17823 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
17824 sed '=' <$as_myself |
17825 sed '
17826 N
17827 s,$,-,
17828 : loop
17829 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
17830 t loop
17831 s,-$,,
17832 s,^['$as_cr_digits']*\n,,
17833 ' >$as_me.lineno &&
17834 chmod +x $as_me.lineno ||
17835 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
17836echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
17837 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017838
Martin v. Löwis11437992002-04-12 09:54:03 +000017839 # Don't try to exec as it changes $[0], causing all sort of problems
17840 # (the dirname of $[0] is not the place where we might find the
17841 # original and so on. Autoconf is especially sensible to this).
17842 . ./$as_me.lineno
17843 # Exit status is that of the last command.
17844 exit
17845}
17846
17847
17848case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
17849 *c*,-n*) ECHO_N= ECHO_C='
17850' ECHO_T=' ' ;;
17851 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
17852 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
17853esac
17854
17855if expr a : '\(a\)' >/dev/null 2>&1; then
17856 as_expr=expr
17857else
17858 as_expr=false
17859fi
17860
17861rm -f conf$$ conf$$.exe conf$$.file
17862echo >conf$$.file
17863if ln -s conf$$.file conf$$ 2>/dev/null; then
17864 # We could just check for DJGPP; but this test a) works b) is more generic
17865 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17866 if test -f conf$$.exe; then
17867 # Don't use ln at all; we don't have any links
17868 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017869 else
Martin v. Löwis11437992002-04-12 09:54:03 +000017870 as_ln_s='ln -s'
17871 fi
17872elif ln conf$$.file conf$$ 2>/dev/null; then
17873 as_ln_s=ln
17874else
17875 as_ln_s='cp -p'
17876fi
17877rm -f conf$$ conf$$.exe conf$$.file
17878
17879as_executable_p="test -f"
17880
17881# Sed expression to map a string onto a valid CPP name.
17882as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
17883
17884# Sed expression to map a string onto a valid variable name.
17885as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
17886
17887
17888# IFS
17889# We need space, tab and new line, in precisely that order.
17890as_nl='
17891'
17892IFS=" $as_nl"
17893
17894# CDPATH.
Barry Warsawfe33b792003-01-07 22:42:49 +000017895$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017896
17897exec 6>&1
17898
17899# Open the log real soon, to keep \$[0] and so on meaningful, and to
17900# report actual input values of CONFIG_FILES etc. instead of their
17901# values after options handling. Logging --version etc. is OK.
17902exec 5>>config.log
17903{
17904 echo
17905 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17906## Running $as_me. ##
17907_ASBOX
17908} >&5
17909cat >&5 <<_CSEOF
17910
Martin v. Löwis88afe662002-10-26 13:47:44 +000017911This file was extended by python $as_me 2.3, which was
Barry Warsawfe33b792003-01-07 22:42:49 +000017912generated by GNU Autoconf 2.53. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017913
17914 CONFIG_FILES = $CONFIG_FILES
17915 CONFIG_HEADERS = $CONFIG_HEADERS
17916 CONFIG_LINKS = $CONFIG_LINKS
17917 CONFIG_COMMANDS = $CONFIG_COMMANDS
17918 $ $0 $@
17919
17920_CSEOF
17921echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
17922echo >&5
17923_ACEOF
17924
17925# Files that config.status was made for.
17926if test -n "$ac_config_files"; then
17927 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17928fi
17929
17930if test -n "$ac_config_headers"; then
17931 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17932fi
17933
17934if test -n "$ac_config_links"; then
17935 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17936fi
17937
17938if test -n "$ac_config_commands"; then
17939 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17940fi
17941
17942cat >>$CONFIG_STATUS <<\_ACEOF
17943
17944ac_cs_usage="\
17945\`$as_me' instantiates files from templates according to the
17946current configuration.
17947
17948Usage: $0 [OPTIONS] [FILE]...
17949
17950 -h, --help print this help, then exit
17951 -V, --version print version number, then exit
17952 -d, --debug don't remove temporary files
17953 --recheck update $as_me by reconfiguring in the same conditions
17954 --file=FILE[:TEMPLATE]
17955 instantiate the configuration file FILE
17956 --header=FILE[:TEMPLATE]
17957 instantiate the configuration header FILE
17958
17959Configuration files:
17960$config_files
17961
17962Configuration headers:
17963$config_headers
17964
17965Report bugs to <bug-autoconf@gnu.org>."
17966_ACEOF
17967
17968cat >>$CONFIG_STATUS <<_ACEOF
17969ac_cs_version="\\
Martin v. Löwis88afe662002-10-26 13:47:44 +000017970python config.status 2.3
Barry Warsawfe33b792003-01-07 22:42:49 +000017971configured by $0, generated by GNU Autoconf 2.53,
Martin v. Löwis11437992002-04-12 09:54:03 +000017972 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17973
17974Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17975Free Software Foundation, Inc.
17976This config.status script is free software; the Free Software Foundation
17977gives unlimited permission to copy, distribute and modify it."
17978srcdir=$srcdir
17979INSTALL="$INSTALL"
17980_ACEOF
17981
17982cat >>$CONFIG_STATUS <<\_ACEOF
17983# If no file are specified by the user, then we need to provide default
17984# value. By we need to know if files were specified by the user.
17985ac_need_defaults=:
17986while test $# != 0
17987do
17988 case $1 in
17989 --*=*)
17990 ac_option=`expr "x$1" : 'x\([^=]*\)='`
17991 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Barry Warsawfe33b792003-01-07 22:42:49 +000017992 shift
17993 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17994 shift
Martin v. Löwis11437992002-04-12 09:54:03 +000017995 ;;
Barry Warsawfe33b792003-01-07 22:42:49 +000017996 -*);;
Martin v. Löwis11437992002-04-12 09:54:03 +000017997 *) # This is not an option, so the user has probably given explicit
17998 # arguments.
17999 ac_need_defaults=false;;
18000 esac
18001
Barry Warsawfe33b792003-01-07 22:42:49 +000018002 case $1 in
Martin v. Löwis11437992002-04-12 09:54:03 +000018003 # Handling of the options.
18004_ACEOF
18005cat >>$CONFIG_STATUS <<_ACEOF
18006 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18007 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18008 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18009_ACEOF
18010cat >>$CONFIG_STATUS <<\_ACEOF
18011 --version | --vers* | -V )
18012 echo "$ac_cs_version"; exit 0 ;;
18013 --he | --h)
18014 # Conflict between --help and --header
18015 { { echo "$as_me:$LINENO: error: ambiguous option: $1
18016Try \`$0 --help' for more information." >&5
18017echo "$as_me: error: ambiguous option: $1
18018Try \`$0 --help' for more information." >&2;}
18019 { (exit 1); exit 1; }; };;
18020 --help | --hel | -h )
18021 echo "$ac_cs_usage"; exit 0 ;;
18022 --debug | --d* | -d )
18023 debug=: ;;
18024 --file | --fil | --fi | --f )
Barry Warsawfe33b792003-01-07 22:42:49 +000018025 shift
18026 CONFIG_FILES="$CONFIG_FILES $1"
Martin v. Löwis11437992002-04-12 09:54:03 +000018027 ac_need_defaults=false;;
18028 --header | --heade | --head | --hea )
Barry Warsawfe33b792003-01-07 22:42:49 +000018029 shift
18030 CONFIG_HEADERS="$CONFIG_HEADERS $1"
Martin v. Löwis11437992002-04-12 09:54:03 +000018031 ac_need_defaults=false;;
18032
18033 # This is an error.
18034 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
18035Try \`$0 --help' for more information." >&5
18036echo "$as_me: error: unrecognized option: $1
18037Try \`$0 --help' for more information." >&2;}
18038 { (exit 1); exit 1; }; } ;;
18039
18040 *) ac_config_targets="$ac_config_targets $1" ;;
18041
18042 esac
18043 shift
18044done
18045
18046_ACEOF
18047
18048
18049
18050
18051
18052cat >>$CONFIG_STATUS <<\_ACEOF
18053for ac_config_target in $ac_config_targets
18054do
18055 case "$ac_config_target" in
18056 # Handling of arguments.
18057 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
18058 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
18059 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18060 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
18061echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18062 { (exit 1); exit 1; }; };;
18063 esac
18064done
18065
18066# If the user did not use the arguments to specify the items to instantiate,
18067# then the envvar interface is used. Set only those that are not.
18068# We use the long form for the default assignment because of an extremely
18069# bizarre bug on SunOS 4.1.3.
18070if $ac_need_defaults; then
18071 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18072 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18073fi
18074
18075# Create a temporary directory, and hook for its removal unless debugging.
18076$debug ||
18077{
18078 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18079 trap '{ (exit 1); exit 1; }' 1 2 13 15
18080}
18081
18082# Create a (secure) tmp directory for tmp files.
18083: ${TMPDIR=/tmp}
18084{
18085 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18086 test -n "$tmp" && test -d "$tmp"
18087} ||
18088{
18089 tmp=$TMPDIR/cs$$-$RANDOM
18090 (umask 077 && mkdir $tmp)
18091} ||
18092{
18093 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18094 { (exit 1); exit 1; }
18095}
18096
18097_ACEOF
18098
18099cat >>$CONFIG_STATUS <<_ACEOF
18100
18101#
18102# CONFIG_FILES section.
18103#
18104
18105# No need to generate the scripts if there are no CONFIG_FILES.
18106# This happens for instance when ./config.status config.h
18107if test -n "\$CONFIG_FILES"; then
18108 # Protect against being on the right side of a sed subst in config.status.
18109 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18110 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18111s,@SHELL@,$SHELL,;t t
18112s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18113s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18114s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18115s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18116s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18117s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18118s,@exec_prefix@,$exec_prefix,;t t
18119s,@prefix@,$prefix,;t t
18120s,@program_transform_name@,$program_transform_name,;t t
18121s,@bindir@,$bindir,;t t
18122s,@sbindir@,$sbindir,;t t
18123s,@libexecdir@,$libexecdir,;t t
18124s,@datadir@,$datadir,;t t
18125s,@sysconfdir@,$sysconfdir,;t t
18126s,@sharedstatedir@,$sharedstatedir,;t t
18127s,@localstatedir@,$localstatedir,;t t
18128s,@libdir@,$libdir,;t t
18129s,@includedir@,$includedir,;t t
18130s,@oldincludedir@,$oldincludedir,;t t
18131s,@infodir@,$infodir,;t t
18132s,@mandir@,$mandir,;t t
18133s,@build_alias@,$build_alias,;t t
18134s,@host_alias@,$host_alias,;t t
18135s,@target_alias@,$target_alias,;t t
18136s,@DEFS@,$DEFS,;t t
18137s,@ECHO_C@,$ECHO_C,;t t
18138s,@ECHO_N@,$ECHO_N,;t t
18139s,@ECHO_T@,$ECHO_T,;t t
18140s,@LIBS@,$LIBS,;t t
18141s,@VERSION@,$VERSION,;t t
18142s,@SOVERSION@,$SOVERSION,;t t
18143s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
18144s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
18145s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
18146s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
18147s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
18148s,@MACHDEP@,$MACHDEP,;t t
18149s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000018150s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000018151s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018152s,@CXX@,$CXX,;t t
18153s,@MAINOBJ@,$MAINOBJ,;t t
18154s,@EXEEXT@,$EXEEXT,;t t
18155s,@CC@,$CC,;t t
18156s,@CFLAGS@,$CFLAGS,;t t
18157s,@LDFLAGS@,$LDFLAGS,;t t
18158s,@CPPFLAGS@,$CPPFLAGS,;t t
18159s,@ac_ct_CC@,$ac_ct_CC,;t t
18160s,@OBJEXT@,$OBJEXT,;t t
18161s,@CPP@,$CPP,;t t
18162s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
18163s,@LIBRARY@,$LIBRARY,;t t
18164s,@LDLIBRARY@,$LDLIBRARY,;t t
18165s,@DLLLIBRARY@,$DLLLIBRARY,;t t
18166s,@BLDLIBRARY@,$BLDLIBRARY,;t t
18167s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
18168s,@INSTSONAME@,$INSTSONAME,;t t
18169s,@RUNSHARED@,$RUNSHARED,;t t
18170s,@LINKCC@,$LINKCC,;t t
18171s,@RANLIB@,$RANLIB,;t t
18172s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18173s,@AR@,$AR,;t t
18174s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18175s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18176s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18177s,@LN@,$LN,;t t
18178s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000018179s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018180s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
18181s,@SO@,$SO,;t t
18182s,@LDSHARED@,$LDSHARED,;t t
18183s,@BLDSHARED@,$BLDSHARED,;t t
18184s,@CCSHARED@,$CCSHARED,;t t
18185s,@LINKFORSHARED@,$LINKFORSHARED,;t t
18186s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018187s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018188s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
18189s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
18190s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
18191s,@LDLAST@,$LDLAST,;t t
18192s,@THREADOBJ@,$THREADOBJ,;t t
18193s,@DLINCLDIR@,$DLINCLDIR,;t t
18194s,@DYNLOADFILE@,$DYNLOADFILE,;t t
18195s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018196s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018197s,@LIBOBJS@,$LIBOBJS,;t t
18198s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
18199s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
18200s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
18201s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
18202s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
18203s,@LIBM@,$LIBM,;t t
18204s,@LIBC@,$LIBC,;t t
18205s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
18206s,@THREADHEADERS@,$THREADHEADERS,;t t
18207s,@SRCDIRS@,$SRCDIRS,;t t
18208CEOF
18209
18210_ACEOF
18211
18212 cat >>$CONFIG_STATUS <<\_ACEOF
18213 # Split the substitutions into bite-sized pieces for seds with
18214 # small command number limits, like on Digital OSF/1 and HP-UX.
18215 ac_max_sed_lines=48
18216 ac_sed_frag=1 # Number of current file.
18217 ac_beg=1 # First line for current file.
18218 ac_end=$ac_max_sed_lines # Line after last line for current file.
18219 ac_more_lines=:
18220 ac_sed_cmds=
18221 while $ac_more_lines; do
18222 if test $ac_beg -gt 1; then
18223 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18224 else
18225 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18226 fi
18227 if test ! -s $tmp/subs.frag; then
18228 ac_more_lines=false
18229 else
18230 # The purpose of the label and of the branching condition is to
18231 # speed up the sed processing (if there are no `@' at all, there
18232 # is no need to browse any of the substitutions).
18233 # These are the two extra sed commands mentioned above.
18234 (echo ':t
18235 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18236 if test -z "$ac_sed_cmds"; then
18237 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18238 else
18239 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18240 fi
18241 ac_sed_frag=`expr $ac_sed_frag + 1`
18242 ac_beg=$ac_end
18243 ac_end=`expr $ac_end + $ac_max_sed_lines`
18244 fi
18245 done
18246 if test -z "$ac_sed_cmds"; then
18247 ac_sed_cmds=cat
18248 fi
18249fi # test -n "$CONFIG_FILES"
18250
18251_ACEOF
18252cat >>$CONFIG_STATUS <<\_ACEOF
18253for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18254 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18255 case $ac_file in
18256 - | *:- | *:-:* ) # input from stdin
18257 cat >$tmp/stdin
18258 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18259 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18260 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18261 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18262 * ) ac_file_in=$ac_file.in ;;
18263 esac
18264
18265 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18266 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18267$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18268 X"$ac_file" : 'X\(//\)[^/]' \| \
18269 X"$ac_file" : 'X\(//\)$' \| \
18270 X"$ac_file" : 'X\(/\)' \| \
18271 . : '\(.\)' 2>/dev/null ||
18272echo X"$ac_file" |
18273 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18274 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18275 /^X\(\/\/\)$/{ s//\1/; q; }
18276 /^X\(\/\).*/{ s//\1/; q; }
18277 s/.*/./; q'`
Barry Warsawfe33b792003-01-07 22:42:49 +000018278 { case "$ac_dir" in
18279 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18280 *) as_incr_dir=.;;
18281esac
18282as_dummy="$ac_dir"
18283for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18284 case $as_mkdir_dir in
18285 # Skip DOS drivespec
18286 ?:) as_incr_dir=$as_mkdir_dir ;;
18287 *)
18288 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18289 test -d "$as_incr_dir" ||
18290 mkdir "$as_incr_dir" ||
18291 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18292echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18293 { (exit 1); exit 1; }; }
18294 ;;
18295 esac
18296done; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018297
18298 ac_builddir=.
18299
18300if test "$ac_dir" != .; then
18301 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18302 # A "../" for each directory in $ac_dir_suffix.
18303 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18304else
18305 ac_dir_suffix= ac_top_builddir=
18306fi
18307
18308case $srcdir in
18309 .) # No --srcdir option. We are building in place.
18310 ac_srcdir=.
18311 if test -z "$ac_top_builddir"; then
18312 ac_top_srcdir=.
18313 else
18314 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18315 fi ;;
18316 [\\/]* | ?:[\\/]* ) # Absolute path.
18317 ac_srcdir=$srcdir$ac_dir_suffix;
18318 ac_top_srcdir=$srcdir ;;
18319 *) # Relative path.
18320 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18321 ac_top_srcdir=$ac_top_builddir$srcdir ;;
18322esac
18323# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18324# absolute.
18325ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwis858f8172003-05-24 12:35:47 +000018326ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000018327ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18328ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18329
18330
18331 case $INSTALL in
18332 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18333 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
18334 esac
18335
18336 if test x"$ac_file" != x-; then
18337 { echo "$as_me:$LINENO: creating $ac_file" >&5
18338echo "$as_me: creating $ac_file" >&6;}
18339 rm -f "$ac_file"
18340 fi
18341 # Let's still pretend it is `configure' which instantiates (i.e., don't
18342 # use $as_me), people would be surprised to read:
18343 # /* config.h. Generated by config.status. */
18344 if test x"$ac_file" = x-; then
18345 configure_input=
18346 else
18347 configure_input="$ac_file. "
18348 fi
18349 configure_input=$configure_input"Generated from `echo $ac_file_in |
18350 sed 's,.*/,,'` by configure."
18351
18352 # First look for the input files in the build tree, otherwise in the
18353 # src tree.
18354 ac_file_inputs=`IFS=:
18355 for f in $ac_file_in; do
18356 case $f in
18357 -) echo $tmp/stdin ;;
18358 [\\/$]*)
18359 # Absolute (can't be DOS-style, as IFS=:)
18360 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18361echo "$as_me: error: cannot find input file: $f" >&2;}
18362 { (exit 1); exit 1; }; }
18363 echo $f;;
18364 *) # Relative
18365 if test -f "$f"; then
18366 # Build tree
18367 echo $f
18368 elif test -f "$srcdir/$f"; then
18369 # Source tree
18370 echo $srcdir/$f
18371 else
18372 # /dev/null tree
18373 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18374echo "$as_me: error: cannot find input file: $f" >&2;}
18375 { (exit 1); exit 1; }; }
18376 fi;;
18377 esac
18378 done` || { (exit 1); exit 1; }
18379_ACEOF
18380cat >>$CONFIG_STATUS <<_ACEOF
18381 sed "$ac_vpsub
18382$extrasub
18383_ACEOF
18384cat >>$CONFIG_STATUS <<\_ACEOF
18385:t
18386/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18387s,@configure_input@,$configure_input,;t t
18388s,@srcdir@,$ac_srcdir,;t t
18389s,@abs_srcdir@,$ac_abs_srcdir,;t t
18390s,@top_srcdir@,$ac_top_srcdir,;t t
18391s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18392s,@builddir@,$ac_builddir,;t t
18393s,@abs_builddir@,$ac_abs_builddir,;t t
18394s,@top_builddir@,$ac_top_builddir,;t t
18395s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
18396s,@INSTALL@,$ac_INSTALL,;t t
18397" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18398 rm -f $tmp/stdin
18399 if test x"$ac_file" != x-; then
18400 mv $tmp/out $ac_file
18401 else
18402 cat $tmp/out
18403 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018404 fi
18405
Martin v. Löwis11437992002-04-12 09:54:03 +000018406done
18407_ACEOF
18408cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018409
Martin v. Löwis11437992002-04-12 09:54:03 +000018410#
18411# CONFIG_HEADER section.
18412#
Guido van Rossum627b2d71993-12-24 10:39:16 +000018413
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018414# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18415# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000018416#
18417# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000018418ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18419ac_dB='[ ].*$,\1#\2'
18420ac_dC=' '
18421ac_dD=',;t'
18422# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18423ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18424ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018425ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000018426ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018427
Martin v. Löwis11437992002-04-12 09:54:03 +000018428for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000018429 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000018430 case $ac_file in
18431 - | *:- | *:-:* ) # input from stdin
18432 cat >$tmp/stdin
18433 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18434 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18435 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18436 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18437 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018438 esac
18439
Martin v. Löwis11437992002-04-12 09:54:03 +000018440 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
18441echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000018442
Martin v. Löwis11437992002-04-12 09:54:03 +000018443 # First look for the input files in the build tree, otherwise in the
18444 # src tree.
18445 ac_file_inputs=`IFS=:
18446 for f in $ac_file_in; do
18447 case $f in
18448 -) echo $tmp/stdin ;;
18449 [\\/$]*)
18450 # Absolute (can't be DOS-style, as IFS=:)
18451 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18452echo "$as_me: error: cannot find input file: $f" >&2;}
18453 { (exit 1); exit 1; }; }
18454 echo $f;;
18455 *) # Relative
18456 if test -f "$f"; then
18457 # Build tree
18458 echo $f
18459 elif test -f "$srcdir/$f"; then
18460 # Source tree
18461 echo $srcdir/$f
18462 else
18463 # /dev/null tree
18464 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18465echo "$as_me: error: cannot find input file: $f" >&2;}
18466 { (exit 1); exit 1; }; }
18467 fi;;
18468 esac
18469 done` || { (exit 1); exit 1; }
18470 # Remove the trailing spaces.
18471 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018472
Martin v. Löwis11437992002-04-12 09:54:03 +000018473_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018474
Martin v. Löwis11437992002-04-12 09:54:03 +000018475# Transform confdefs.h into two sed scripts, `conftest.defines' and
18476# `conftest.undefs', that substitutes the proper values into
18477# config.h.in to produce config.h. The first handles `#define'
18478# templates, and the second `#undef' templates.
18479# And first: Protect against being on the right side of a sed subst in
18480# config.status. Protect against being in an unquoted here document
18481# in config.status.
18482rm -f conftest.defines conftest.undefs
18483# Using a here document instead of a string reduces the quoting nightmare.
18484# Putting comments in sed scripts is not portable.
18485#
18486# `end' is used to avoid that the second main sed command (meant for
18487# 0-ary CPP macros) applies to n-ary macro definitions.
18488# See the Autoconf documentation for `clear'.
18489cat >confdef2sed.sed <<\_ACEOF
18490s/[\\&,]/\\&/g
18491s,[\\$`],\\&,g
18492t clear
18493: clear
18494s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
18495t end
18496s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
18497: end
18498_ACEOF
18499# If some macros were called several times there might be several times
18500# the same #defines, which is useless. Nevertheless, we may not want to
18501# sort them, since we want the *last* AC-DEFINE to be honored.
18502uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
18503sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
18504rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018505
18506# This sed command replaces #undef with comments. This is necessary, for
18507# example, in the case of _POSIX_SOURCE, which is predefined and required
18508# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000018509cat >>conftest.undefs <<\_ACEOF
18510s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
18511_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018512
Martin v. Löwis11437992002-04-12 09:54:03 +000018513# Break up conftest.defines because some shells have a limit on the size
18514# of here documents, and old seds have small limits too (100 cmds).
18515echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Barry Warsawfe33b792003-01-07 22:42:49 +000018516echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018517echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
18518echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018519rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000018520while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000018521do
Martin v. Löwis11437992002-04-12 09:54:03 +000018522 # Write a limited-size here document to $tmp/defines.sed.
18523 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
18524 # Speed up: don't consider the non `#define' lines.
18525 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
18526 # Work around the forget-to-reset-the-flag bug.
18527 echo 't clr' >>$CONFIG_STATUS
18528 echo ': clr' >>$CONFIG_STATUS
18529 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018530 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018531 sed -f $tmp/defines.sed $tmp/in >$tmp/out
18532 rm -f $tmp/in
18533 mv $tmp/out $tmp/in
18534' >>$CONFIG_STATUS
18535 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
18536 rm -f conftest.defines
18537 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000018538done
Martin v. Löwis11437992002-04-12 09:54:03 +000018539rm -f conftest.defines
Barry Warsawfe33b792003-01-07 22:42:49 +000018540echo ' fi # egrep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018541echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018542
Martin v. Löwis11437992002-04-12 09:54:03 +000018543# Break up conftest.undefs because some shells have a limit on the size
18544# of here documents, and old seds have small limits too (100 cmds).
18545echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
18546rm -f conftest.tail
18547while grep . conftest.undefs >/dev/null
18548do
18549 # Write a limited-size here document to $tmp/undefs.sed.
18550 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
18551 # Speed up: don't consider the non `#undef'
18552 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
18553 # Work around the forget-to-reset-the-flag bug.
18554 echo 't clr' >>$CONFIG_STATUS
18555 echo ': clr' >>$CONFIG_STATUS
18556 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
18557 echo 'CEOF
18558 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
18559 rm -f $tmp/in
18560 mv $tmp/out $tmp/in
18561' >>$CONFIG_STATUS
18562 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
18563 rm -f conftest.undefs
18564 mv conftest.tail conftest.undefs
18565done
18566rm -f conftest.undefs
18567
18568cat >>$CONFIG_STATUS <<\_ACEOF
18569 # Let's still pretend it is `configure' which instantiates (i.e., don't
18570 # use $as_me), people would be surprised to read:
18571 # /* config.h. Generated by config.status. */
18572 if test x"$ac_file" = x-; then
18573 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000018574 else
Martin v. Löwis11437992002-04-12 09:54:03 +000018575 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000018576 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018577 cat $tmp/in >>$tmp/config.h
18578 rm -f $tmp/in
18579 if test x"$ac_file" != x-; then
18580 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
18581 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
18582echo "$as_me: $ac_file is unchanged" >&6;}
18583 else
18584 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18585$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18586 X"$ac_file" : 'X\(//\)[^/]' \| \
18587 X"$ac_file" : 'X\(//\)$' \| \
18588 X"$ac_file" : 'X\(/\)' \| \
18589 . : '\(.\)' 2>/dev/null ||
18590echo X"$ac_file" |
18591 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18592 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18593 /^X\(\/\/\)$/{ s//\1/; q; }
18594 /^X\(\/\).*/{ s//\1/; q; }
18595 s/.*/./; q'`
Barry Warsawfe33b792003-01-07 22:42:49 +000018596 { case "$ac_dir" in
18597 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18598 *) as_incr_dir=.;;
18599esac
18600as_dummy="$ac_dir"
18601for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18602 case $as_mkdir_dir in
18603 # Skip DOS drivespec
18604 ?:) as_incr_dir=$as_mkdir_dir ;;
18605 *)
18606 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18607 test -d "$as_incr_dir" ||
18608 mkdir "$as_incr_dir" ||
18609 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18610echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18611 { (exit 1); exit 1; }; }
18612 ;;
18613 esac
18614done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018615
Martin v. Löwis11437992002-04-12 09:54:03 +000018616 rm -f $ac_file
18617 mv $tmp/config.h $ac_file
18618 fi
18619 else
18620 cat $tmp/config.h
18621 rm -f $tmp/config.h
18622 fi
18623done
18624_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000018625
Martin v. Löwis11437992002-04-12 09:54:03 +000018626cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018627
Martin v. Löwis11437992002-04-12 09:54:03 +000018628{ (exit 0); exit 0; }
18629_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018630chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018631ac_clean_files=$ac_clean_files_save
18632
18633
18634# configure is writing to config.log, and then calls config.status.
18635# config.status does its own redirection, appending to config.log.
18636# Unfortunately, on DOS this fails, as config.log is still kept open
18637# by configure, so config.status won't be able to write to it; its
18638# output is simply discarded. So we exec the FD to /dev/null,
18639# effectively closing config.log, so it can be properly (re)opened and
18640# appended to by config.status. When coming back to configure, we
18641# need to make the FD available again.
18642if test "$no_create" != yes; then
18643 ac_cs_success=:
18644 exec 5>/dev/null
18645 $SHELL $CONFIG_STATUS || ac_cs_success=false
18646 exec 5>>config.log
18647 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18648 # would make configure fail if this is the last instruction.
18649 $ac_cs_success || { (exit 1); exit 1; }
18650fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018651
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018652
18653echo "creating Setup"
18654if test ! -f Modules/Setup
18655then
18656 cp $srcdir/Modules/Setup.dist Modules/Setup
18657fi
18658
18659echo "creating Setup.local"
18660if test ! -f Modules/Setup.local
18661then
18662 echo "# Edit this file for local setup changes" >Modules/Setup.local
18663fi
18664
18665echo "creating Makefile"
18666$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
18667 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000018668 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018669mv config.c Modules