blob: 810e718981f7798ecb930d933c36b2b71dc2f55a [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwis19d17342003-06-14 21:03:05 +00002# From configure.in Revision: 1.417 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Barry Warsawfe33b792003-01-07 22:42:49 +00004# Generated by GNU Autoconf 2.53 for python 2.3.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis11437992002-04-12 09:54:03 +00006# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
7# Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008# This configure script is free software; the Free Software Foundation
9# gives unlimited permission to copy, distribute and modify it.
Barry Warsawfe33b792003-01-07 22:42:49 +000010
11if expr a : '\(a\)' >/dev/null 2>&1; then
12 as_expr=expr
13else
14 as_expr=false
15fi
16
17
Martin v. Löwis11437992002-04-12 09:54:03 +000018## --------------------- ##
19## M4sh Initialization. ##
20## --------------------- ##
21
22# Be Bourne compatible
23if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24 emulate sh
25 NULLCMD=:
26elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
27 set -o posix
28fi
29
Barry Warsawfe33b792003-01-07 22:42:49 +000030# NLS nuisances.
Martin v. Löwis11437992002-04-12 09:54:03 +000031# Support unset when possible.
32if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
33 as_unset=unset
34else
35 as_unset=false
36fi
37
Barry Warsawfe33b792003-01-07 22:42:49 +000038(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
39 { $as_unset LANG || test "${LANG+set}" != set; } ||
40 { LANG=C; export LANG; }
41(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
42 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
43 { LC_ALL=C; export LC_ALL; }
44(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
45 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
46 { LC_TIME=C; export LC_TIME; }
47(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
48 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
49 { LC_CTYPE=C; export LC_CTYPE; }
50(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
51 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
52 { LANGUAGE=C; export LANGUAGE; }
53(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
54 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
55 { LC_COLLATE=C; export LC_COLLATE; }
56(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
57 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
58 { LC_NUMERIC=C; export LC_NUMERIC; }
59(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
60 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
61 { LC_MESSAGES=C; export LC_MESSAGES; }
Martin v. Löwis11437992002-04-12 09:54:03 +000062
63
64# Name of the executable.
Barry Warsawfe33b792003-01-07 22:42:49 +000065as_me=`(basename "$0") 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000066$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67 X"$0" : 'X\(//\)$' \| \
68 X"$0" : 'X\(/\)$' \| \
69 . : '\(.\)' 2>/dev/null ||
70echo X/"$0" |
71 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
72 /^X\/\(\/\/\)$/{ s//\1/; q; }
73 /^X\/\(\/\).*/{ s//\1/; q; }
74 s/.*/./; q'`
75
76# PATH needs CR, and LINENO needs CR and PATH.
77# Avoid depending upon Character Ranges.
78as_cr_letters='abcdefghijklmnopqrstuvwxyz'
79as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
80as_cr_Letters=$as_cr_letters$as_cr_LETTERS
81as_cr_digits='0123456789'
82as_cr_alnum=$as_cr_Letters$as_cr_digits
83
84# The user is always right.
85if test "${PATH_SEPARATOR+set}" != set; then
86 echo "#! /bin/sh" >conftest.sh
87 echo "exit 0" >>conftest.sh
88 chmod +x conftest.sh
Barry Warsawfe33b792003-01-07 22:42:49 +000089 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000090 PATH_SEPARATOR=';'
91 else
92 PATH_SEPARATOR=:
93 fi
94 rm -f conftest.sh
95fi
96
97
98 as_lineno_1=$LINENO
99 as_lineno_2=$LINENO
100 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
101 test "x$as_lineno_1" != "x$as_lineno_2" &&
102 test "x$as_lineno_3" = "x$as_lineno_2" || {
103 # Find who we are. Look in the path if we contain no path at all
104 # relative or not.
105 case $0 in
106 *[\\/]* ) as_myself=$0 ;;
107 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
108for as_dir in $PATH
109do
110 IFS=$as_save_IFS
111 test -z "$as_dir" && as_dir=.
112 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
113done
114
115 ;;
116 esac
117 # We did not find ourselves, most probably we were run as `sh COMMAND'
118 # in which case we are not to be found in the path.
119 if test "x$as_myself" = x; then
120 as_myself=$0
121 fi
122 if test ! -f "$as_myself"; then
123 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
124 { (exit 1); exit 1; }; }
125 fi
126 case $CONFIG_SHELL in
127 '')
128 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
129for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
130do
131 IFS=$as_save_IFS
132 test -z "$as_dir" && as_dir=.
133 for as_base in sh bash ksh sh5; do
134 case $as_dir in
135 /*)
136 if ("$as_dir/$as_base" -c '
137 as_lineno_1=$LINENO
138 as_lineno_2=$LINENO
139 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
140 test "x$as_lineno_1" != "x$as_lineno_2" &&
141 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
142 CONFIG_SHELL=$as_dir/$as_base
143 export CONFIG_SHELL
144 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
145 fi;;
146 esac
147 done
148done
149;;
150 esac
151
152 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
153 # uniformly replaced by the line number. The first 'sed' inserts a
154 # line-number line before each line; the second 'sed' does the real
155 # work. The second script uses 'N' to pair each line-number line
156 # with the numbered line, and appends trailing '-' during
157 # substitution so that $LINENO is not a special case at line end.
158 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
159 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
160 sed '=' <$as_myself |
161 sed '
162 N
163 s,$,-,
164 : loop
165 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
166 t loop
167 s,-$,,
168 s,^['$as_cr_digits']*\n,,
169 ' >$as_me.lineno &&
170 chmod +x $as_me.lineno ||
171 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
172 { (exit 1); exit 1; }; }
173
174 # Don't try to exec as it changes $[0], causing all sort of problems
175 # (the dirname of $[0] is not the place where we might find the
176 # original and so on. Autoconf is especially sensible to this).
177 . ./$as_me.lineno
178 # Exit status is that of the last command.
179 exit
180}
181
182
183case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
184 *c*,-n*) ECHO_N= ECHO_C='
185' ECHO_T=' ' ;;
186 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
187 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
188esac
189
190if expr a : '\(a\)' >/dev/null 2>&1; then
191 as_expr=expr
192else
193 as_expr=false
194fi
195
196rm -f conf$$ conf$$.exe conf$$.file
197echo >conf$$.file
198if ln -s conf$$.file conf$$ 2>/dev/null; then
199 # We could just check for DJGPP; but this test a) works b) is more generic
200 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
201 if test -f conf$$.exe; then
202 # Don't use ln at all; we don't have any links
203 as_ln_s='cp -p'
204 else
205 as_ln_s='ln -s'
206 fi
207elif ln conf$$.file conf$$ 2>/dev/null; then
208 as_ln_s=ln
209else
210 as_ln_s='cp -p'
211fi
212rm -f conf$$ conf$$.exe conf$$.file
213
214as_executable_p="test -f"
215
216# Sed expression to map a string onto a valid CPP name.
217as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
218
219# Sed expression to map a string onto a valid variable name.
220as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
221
222
223# IFS
224# We need space, tab and new line, in precisely that order.
225as_nl='
226'
227IFS=" $as_nl"
228
229# CDPATH.
Barry Warsawfe33b792003-01-07 22:42:49 +0000230$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000231
232
233# Name of the host.
234# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
235# so uname gets run too.
236ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
237
238exec 6>&1
239
240#
241# Initializations.
242#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000243ac_default_prefix=/usr/local
Martin v. Löwis11437992002-04-12 09:54:03 +0000244cross_compiling=no
245subdirs=
246MFLAGS=
247MAKEFLAGS=
248SHELL=${CONFIG_SHELL-/bin/sh}
249
250# Maximum number of lines to put in a shell here document.
251# This variable seems obsolete. It should probably be removed, and
252# only ac_max_sed_lines should be used.
253: ${ac_max_here_lines=38}
254
255# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000256PACKAGE_NAME='python'
257PACKAGE_TARNAME='python'
258PACKAGE_VERSION='2.3'
259PACKAGE_STRING='python 2.3'
260PACKAGE_BUGREPORT=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000261
262ac_unique_file="Include/object.h"
263# Factoring default headers for most tests.
264ac_includes_default="\
265#include <stdio.h>
266#if HAVE_SYS_TYPES_H
267# include <sys/types.h>
268#endif
269#if HAVE_SYS_STAT_H
270# include <sys/stat.h>
271#endif
272#if STDC_HEADERS
273# include <stdlib.h>
274# include <stddef.h>
275#else
276# if HAVE_STDLIB_H
277# include <stdlib.h>
278# endif
279#endif
280#if HAVE_STRING_H
281# if !STDC_HEADERS && HAVE_MEMORY_H
282# include <memory.h>
283# endif
284# include <string.h>
285#endif
286#if HAVE_STRINGS_H
287# include <strings.h>
288#endif
289#if HAVE_INTTYPES_H
290# include <inttypes.h>
291#else
292# if HAVE_STDINT_H
293# include <stdint.h>
294# endif
295#endif
296#if HAVE_UNISTD_H
297# include <unistd.h>
298#endif"
299
Guido van Rossum627b2d71993-12-24 10:39:16 +0000300
Guido van Rossum7f43da71994-08-01 12:15:30 +0000301# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000302ac_init_help=
303ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000304# The variables have the same names as the options, with
305# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000306cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000307exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000308no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000309no_recursion=
310prefix=NONE
311program_prefix=NONE
312program_suffix=NONE
313program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000314silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000315site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000316srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000317verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000318x_includes=NONE
319x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000320
321# Installation directory options.
322# These are left unexpanded so users can "make install exec_prefix=/foo"
323# and all the variables that are supposed to be based on exec_prefix
324# by default will actually change.
325# Use braces instead of parens because sh, perl, etc. also accept them.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000326bindir='${exec_prefix}/bin'
327sbindir='${exec_prefix}/sbin'
328libexecdir='${exec_prefix}/libexec'
329datadir='${prefix}/share'
330sysconfdir='${prefix}/etc'
331sharedstatedir='${prefix}/com'
332localstatedir='${prefix}/var'
333libdir='${exec_prefix}/lib'
334includedir='${prefix}/include'
335oldincludedir='/usr/include'
336infodir='${prefix}/info'
337mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000338
Guido van Rossum7f43da71994-08-01 12:15:30 +0000339ac_prev=
340for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000341do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000342 # If the previous option needs an argument, assign it.
343 if test -n "$ac_prev"; then
344 eval "$ac_prev=\$ac_option"
345 ac_prev=
346 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000347 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000348
Martin v. Löwis11437992002-04-12 09:54:03 +0000349 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000350
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000351 # Accept the important Cygnus configure options, so we can diagnose typos.
352
Martin v. Löwis11437992002-04-12 09:54:03 +0000353 case $ac_option in
Guido van Rossum7f43da71994-08-01 12:15:30 +0000354
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000355 -bindir | --bindir | --bindi | --bind | --bin | --bi)
356 ac_prev=bindir ;;
357 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000358 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000359
360 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000361 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000362 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000363 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000364
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000365 -cache-file | --cache-file | --cache-fil | --cache-fi \
366 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
367 ac_prev=cache_file ;;
368 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
369 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000370 cache_file=$ac_optarg ;;
371
372 --config-cache | -C)
373 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000374
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000375 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
376 ac_prev=datadir ;;
377 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
378 | --da=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000379 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000380
Guido van Rossum7f43da71994-08-01 12:15:30 +0000381 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000382 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000383 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000384 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
385 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
386 { (exit 1); exit 1; }; }
387 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
388 eval "enable_$ac_feature=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000389
390 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000391 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000392 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000393 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
394 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
395 { (exit 1); exit 1; }; }
396 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
397 case $ac_option in
398 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000399 *) ac_optarg=yes ;;
400 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000401 eval "enable_$ac_feature='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000402
Guido van Rossum7f43da71994-08-01 12:15:30 +0000403 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
404 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
405 | --exec | --exe | --ex)
406 ac_prev=exec_prefix ;;
407 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
408 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
409 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000410 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000411
412 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000413 # Obsolete; use --with-gas.
414 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000415
Martin v. Löwis11437992002-04-12 09:54:03 +0000416 -help | --help | --hel | --he | -h)
417 ac_init_help=long ;;
418 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
419 ac_init_help=recursive ;;
420 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
421 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000422
423 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000424 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000425 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000426 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000427
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000428 -includedir | --includedir | --includedi | --included | --include \
429 | --includ | --inclu | --incl | --inc)
430 ac_prev=includedir ;;
431 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
432 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000433 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000434
435 -infodir | --infodir | --infodi | --infod | --info | --inf)
436 ac_prev=infodir ;;
437 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000439
440 -libdir | --libdir | --libdi | --libd)
441 ac_prev=libdir ;;
442 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000443 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000444
445 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
446 | --libexe | --libex | --libe)
447 ac_prev=libexecdir ;;
448 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
449 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000451
452 -localstatedir | --localstatedir | --localstatedi | --localstated \
453 | --localstate | --localstat | --localsta | --localst \
454 | --locals | --local | --loca | --loc | --lo)
455 ac_prev=localstatedir ;;
456 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
457 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
458 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000459 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000460
461 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
462 ac_prev=mandir ;;
463 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000465
Guido van Rossum7f43da71994-08-01 12:15:30 +0000466 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000467 # Obsolete; use --without-fp.
468 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000469
470 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000471 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000472 no_create=yes ;;
473
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000474 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
475 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
476 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000477
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000478 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
479 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
480 | --oldin | --oldi | --old | --ol | --o)
481 ac_prev=oldincludedir ;;
482 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
483 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
484 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000486
Guido van Rossum7f43da71994-08-01 12:15:30 +0000487 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
488 ac_prev=prefix ;;
489 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000490 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000491
492 -program-prefix | --program-prefix | --program-prefi | --program-pref \
493 | --program-pre | --program-pr | --program-p)
494 ac_prev=program_prefix ;;
495 -program-prefix=* | --program-prefix=* | --program-prefi=* \
496 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000497 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000498
499 -program-suffix | --program-suffix | --program-suffi | --program-suff \
500 | --program-suf | --program-su | --program-s)
501 ac_prev=program_suffix ;;
502 -program-suffix=* | --program-suffix=* | --program-suffi=* \
503 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000504 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000505
506 -program-transform-name | --program-transform-name \
507 | --program-transform-nam | --program-transform-na \
508 | --program-transform-n | --program-transform- \
509 | --program-transform | --program-transfor \
510 | --program-transfo | --program-transf \
511 | --program-trans | --program-tran \
512 | --progr-tra | --program-tr | --program-t)
513 ac_prev=program_transform_name ;;
514 -program-transform-name=* | --program-transform-name=* \
515 | --program-transform-nam=* | --program-transform-na=* \
516 | --program-transform-n=* | --program-transform-=* \
517 | --program-transform=* | --program-transfor=* \
518 | --program-transfo=* | --program-transf=* \
519 | --program-trans=* | --program-tran=* \
520 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000521 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000522
523 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
524 | -silent | --silent | --silen | --sile | --sil)
525 silent=yes ;;
526
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000527 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
528 ac_prev=sbindir ;;
529 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
530 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000531 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000532
533 -sharedstatedir | --sharedstatedir | --sharedstatedi \
534 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
535 | --sharedst | --shareds | --shared | --share | --shar \
536 | --sha | --sh)
537 ac_prev=sharedstatedir ;;
538 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
539 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
540 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
541 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000542 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000543
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544 -site | --site | --sit)
545 ac_prev=site ;;
546 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000547 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000548
Guido van Rossum7f43da71994-08-01 12:15:30 +0000549 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
550 ac_prev=srcdir ;;
551 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000552 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000553
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000554 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
555 | --syscon | --sysco | --sysc | --sys | --sy)
556 ac_prev=sysconfdir ;;
557 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
558 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000559 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000560
Guido van Rossum7f43da71994-08-01 12:15:30 +0000561 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +0000562 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000563 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000564 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000565
566 -v | -verbose | --verbose | --verbos | --verbo | --verb)
567 verbose=yes ;;
568
Martin v. Löwis11437992002-04-12 09:54:03 +0000569 -version | --version | --versio | --versi | --vers | -V)
570 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000571
572 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000573 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000574 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000575 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
576 { echo "$as_me: error: invalid package name: $ac_package" >&2
577 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000578 ac_package=`echo $ac_package| sed 's/-/_/g'`
Martin v. Löwis11437992002-04-12 09:54:03 +0000579 case $ac_option in
580 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000581 *) ac_optarg=yes ;;
582 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000583 eval "with_$ac_package='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000584
585 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000586 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000587 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000588 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
589 { echo "$as_me: error: invalid package name: $ac_package" >&2
590 { (exit 1); exit 1; }; }
591 ac_package=`echo $ac_package | sed 's/-/_/g'`
592 eval "with_$ac_package=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000593
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000594 --x)
595 # Obsolete; use --with-x.
596 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000597
598 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
599 | --x-incl | --x-inc | --x-in | --x-i)
600 ac_prev=x_includes ;;
601 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
602 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000603 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000604
605 -x-libraries | --x-libraries | --x-librarie | --x-librari \
606 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
607 ac_prev=x_libraries ;;
608 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
609 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000610 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000611
Martin v. Löwis11437992002-04-12 09:54:03 +0000612 -*) { echo "$as_me: error: unrecognized option: $ac_option
613Try \`$0 --help' for more information." >&2
614 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000615 ;;
616
Martin v. Löwis11437992002-04-12 09:54:03 +0000617 *=*)
618 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
619 # Reject names that are not valid shell variable names.
620 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
621 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
622 { (exit 1); exit 1; }; }
623 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
624 eval "$ac_envvar='$ac_optarg'"
625 export $ac_envvar ;;
626
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000627 *)
Martin v. Löwis11437992002-04-12 09:54:03 +0000628 # FIXME: should be removed in autoconf 3.0.
629 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
630 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
631 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
632 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000633 ;;
634
635 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000636done
637
Guido van Rossum7f43da71994-08-01 12:15:30 +0000638if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000639 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
640 { echo "$as_me: error: missing argument to $ac_option" >&2
641 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000642fi
643
Martin v. Löwis11437992002-04-12 09:54:03 +0000644# Be sure to have absolute paths.
645for ac_var in exec_prefix prefix
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000646do
Martin v. Löwis11437992002-04-12 09:54:03 +0000647 eval ac_val=$`echo $ac_var`
648 case $ac_val in
649 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
650 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
651 { (exit 1); exit 1; }; };;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000652 esac
653done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000654
Martin v. Löwis11437992002-04-12 09:54:03 +0000655# Be sure to have absolute paths.
656for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
657 localstatedir libdir includedir oldincludedir infodir mandir
658do
659 eval ac_val=$`echo $ac_var`
660 case $ac_val in
661 [\\/$]* | ?:[\\/]* ) ;;
662 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
663 { (exit 1); exit 1; }; };;
664 esac
665done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000666
Martin v. Löwis11437992002-04-12 09:54:03 +0000667# There might be people who depend on the old broken behavior: `$host'
668# used to hold the argument of --host etc.
669# FIXME: To remove some day.
670build=$build_alias
671host=$host_alias
672target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +0000673
Martin v. Löwis11437992002-04-12 09:54:03 +0000674# FIXME: To remove some day.
675if test "x$host_alias" != x; then
676 if test "x$build_alias" = x; then
677 cross_compiling=maybe
678 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
679 If a cross compiler is detected then cross compile mode will be used." >&2
680 elif test "x$build_alias" != "x$host_alias"; then
681 cross_compiling=yes
682 fi
683fi
684
685ac_tool_prefix=
686test -n "$host_alias" && ac_tool_prefix=$host_alias-
687
688test "$silent" = yes && exec 6>/dev/null
689
Guido van Rossum627b2d71993-12-24 10:39:16 +0000690
691# Find the source files, if location was not specified.
692if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000693 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000694 # Try the directory containing this script, then its parent.
Martin v. Löwis11437992002-04-12 09:54:03 +0000695 ac_confdir=`(dirname "$0") 2>/dev/null ||
696$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
697 X"$0" : 'X\(//\)[^/]' \| \
698 X"$0" : 'X\(//\)$' \| \
699 X"$0" : 'X\(/\)' \| \
700 . : '\(.\)' 2>/dev/null ||
701echo X"$0" |
702 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
703 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
704 /^X\(\/\/\)$/{ s//\1/; q; }
705 /^X\(\/\).*/{ s//\1/; q; }
706 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000707 srcdir=$ac_confdir
708 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000709 srcdir=..
710 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000711else
712 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000713fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000714if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000715 if test "$ac_srcdir_defaulted" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000716 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
717 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000718 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000719 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
720 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000721 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000722fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000723srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
724ac_env_build_alias_set=${build_alias+set}
725ac_env_build_alias_value=$build_alias
726ac_cv_env_build_alias_set=${build_alias+set}
727ac_cv_env_build_alias_value=$build_alias
728ac_env_host_alias_set=${host_alias+set}
729ac_env_host_alias_value=$host_alias
730ac_cv_env_host_alias_set=${host_alias+set}
731ac_cv_env_host_alias_value=$host_alias
732ac_env_target_alias_set=${target_alias+set}
733ac_env_target_alias_value=$target_alias
734ac_cv_env_target_alias_set=${target_alias+set}
735ac_cv_env_target_alias_value=$target_alias
736ac_env_CC_set=${CC+set}
737ac_env_CC_value=$CC
738ac_cv_env_CC_set=${CC+set}
739ac_cv_env_CC_value=$CC
740ac_env_CFLAGS_set=${CFLAGS+set}
741ac_env_CFLAGS_value=$CFLAGS
742ac_cv_env_CFLAGS_set=${CFLAGS+set}
743ac_cv_env_CFLAGS_value=$CFLAGS
744ac_env_LDFLAGS_set=${LDFLAGS+set}
745ac_env_LDFLAGS_value=$LDFLAGS
746ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
747ac_cv_env_LDFLAGS_value=$LDFLAGS
748ac_env_CPPFLAGS_set=${CPPFLAGS+set}
749ac_env_CPPFLAGS_value=$CPPFLAGS
750ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
751ac_cv_env_CPPFLAGS_value=$CPPFLAGS
752ac_env_CPP_set=${CPP+set}
753ac_env_CPP_value=$CPP
754ac_cv_env_CPP_set=${CPP+set}
755ac_cv_env_CPP_value=$CPP
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000756
Martin v. Löwis11437992002-04-12 09:54:03 +0000757#
758# Report the --help message.
759#
760if test "$ac_init_help" = "long"; then
761 # Omit some internal or obsolete options to make the list less imposing.
762 # This message is too long to be a string in the A/UX 3.1 sh.
763 cat <<_ACEOF
Martin v. Löwis88afe662002-10-26 13:47:44 +0000764\`configure' configures python 2.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +0000765
766Usage: $0 [OPTION]... [VAR=VALUE]...
767
768To assign environment variables (e.g., CC, CFLAGS...), specify them as
769VAR=VALUE. See below for descriptions of some of the useful variables.
770
771Defaults for the options are specified in brackets.
772
773Configuration:
774 -h, --help display this help and exit
775 --help=short display options specific to this package
776 --help=recursive display the short help of all the included packages
777 -V, --version display version information and exit
778 -q, --quiet, --silent do not print \`checking...' messages
779 --cache-file=FILE cache test results in FILE [disabled]
780 -C, --config-cache alias for \`--cache-file=config.cache'
781 -n, --no-create do not create output files
782 --srcdir=DIR find the sources in DIR [configure dir or \`..']
783
784_ACEOF
785
786 cat <<_ACEOF
787Installation directories:
788 --prefix=PREFIX install architecture-independent files in PREFIX
789 [$ac_default_prefix]
790 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
791 [PREFIX]
792
793By default, \`make install' will install all the files in
794\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
795an installation prefix other than \`$ac_default_prefix' using \`--prefix',
796for instance \`--prefix=\$HOME'.
797
798For better control, use the options below.
799
800Fine tuning of the installation directories:
801 --bindir=DIR user executables [EPREFIX/bin]
802 --sbindir=DIR system admin executables [EPREFIX/sbin]
803 --libexecdir=DIR program executables [EPREFIX/libexec]
804 --datadir=DIR read-only architecture-independent data [PREFIX/share]
805 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
806 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
807 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
808 --libdir=DIR object code libraries [EPREFIX/lib]
809 --includedir=DIR C header files [PREFIX/include]
810 --oldincludedir=DIR C header files for non-gcc [/usr/include]
811 --infodir=DIR info documentation [PREFIX/info]
812 --mandir=DIR man documentation [PREFIX/man]
813_ACEOF
814
815 cat <<\_ACEOF
816_ACEOF
817fi
818
819if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +0000820 case $ac_init_help in
821 short | recursive ) echo "Configuration of python 2.3:";;
822 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 cat <<\_ACEOF
824
825Optional Features:
826 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
827 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000828 --enable-framework[=INSTALLDIR]
829 Build (MacOSX|Darwin) framework
830 --enable-shared disable/enable building shared python library
831 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
832 --enable-ipv6 Enable ipv6 (with ipv4) support
833 --disable-ipv6 Disable ipv6 support
834 --enable-unicode[=ucs[24]]
835 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +0000836
837Optional Packages:
838 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
839 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000840 --without-gcc never use gcc
841 --with-cxx=<compiler> enable C++ support
842 --with-suffix=.exe set executable suffix
843 --with-pydebug build with Py_DEBUG defined
844 --with-libs='lib1 ...' link against additional libs
845 --with-signal-module disable/enable signal module
846 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
847 --with(out)-threads[=DIRECTORY]
848 disable/enable thread support
849 --with(out)-thread[=DIRECTORY]
850 deprecated; use --with(out)-threads
851 --with-pth use GNU pth threading libraries
852 --with(out)-universal-newlines
853 disable/enable foreign newlines
854 --with(out)-doc-strings disable/enable documentation strings
855 --with(out)-pymalloc disable/enable specialized mallocs
856 --with-wctype-functions use wctype.h functions
857 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking
858 --with-dl-dld=DL_DIR GNU dynamic linking
859 --with-fpectl enable SIGFPE catching
860 --with-libm=STRING math library
861 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +0000862
863Some influential environment variables:
864 CC C compiler command
865 CFLAGS C compiler flags
866 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
867 nonstandard directory <lib dir>
868 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
869 headers in a nonstandard directory <include dir>
870 CPP C preprocessor
871
872Use these variables to override the choices made by `configure' or to help
873it to find libraries and programs with nonstandard names/locations.
874
875_ACEOF
876fi
877
878if test "$ac_init_help" = "recursive"; then
879 # If there are subdirs, report their specific --help.
880 ac_popdir=`pwd`
881 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
882 test -d $ac_dir || continue
883 ac_builddir=.
884
885if test "$ac_dir" != .; then
886 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
887 # A "../" for each directory in $ac_dir_suffix.
888 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
889else
890 ac_dir_suffix= ac_top_builddir=
891fi
892
893case $srcdir in
894 .) # No --srcdir option. We are building in place.
895 ac_srcdir=.
896 if test -z "$ac_top_builddir"; then
897 ac_top_srcdir=.
898 else
899 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
900 fi ;;
901 [\\/]* | ?:[\\/]* ) # Absolute path.
902 ac_srcdir=$srcdir$ac_dir_suffix;
903 ac_top_srcdir=$srcdir ;;
904 *) # Relative path.
905 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
906 ac_top_srcdir=$ac_top_builddir$srcdir ;;
907esac
908# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
909# absolute.
910ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwis858f8172003-05-24 12:35:47 +0000911ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +0000912ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
913ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
914
915 cd $ac_dir
916 # Check for guested configure; otherwise get Cygnus style configure.
917 if test -f $ac_srcdir/configure.gnu; then
918 echo
919 $SHELL $ac_srcdir/configure.gnu --help=recursive
920 elif test -f $ac_srcdir/configure; then
921 echo
922 $SHELL $ac_srcdir/configure --help=recursive
923 elif test -f $ac_srcdir/configure.ac ||
924 test -f $ac_srcdir/configure.in; then
925 echo
926 $ac_configure --help
927 else
928 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
929 fi
930 cd $ac_popdir
931 done
932fi
933
934test -n "$ac_init_help" && exit 0
935if $ac_init_version; then
936 cat <<\_ACEOF
Martin v. Löwis88afe662002-10-26 13:47:44 +0000937python configure 2.3
Barry Warsawfe33b792003-01-07 22:42:49 +0000938generated by GNU Autoconf 2.53
Martin v. Löwis11437992002-04-12 09:54:03 +0000939
940Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
941Free Software Foundation, Inc.
942This configure script is free software; the Free Software Foundation
943gives unlimited permission to copy, distribute and modify it.
944_ACEOF
945 exit 0
946fi
947exec 5>config.log
948cat >&5 <<_ACEOF
949This file contains any messages produced by compilers while
950running configure, to aid debugging if configure makes a mistake.
951
Martin v. Löwis88afe662002-10-26 13:47:44 +0000952It was created by python $as_me 2.3, which was
Barry Warsawfe33b792003-01-07 22:42:49 +0000953generated by GNU Autoconf 2.53. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +0000954
955 $ $0 $@
956
957_ACEOF
958{
959cat <<_ASUNAME
960## --------- ##
961## Platform. ##
962## --------- ##
963
964hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
965uname -m = `(uname -m) 2>/dev/null || echo unknown`
966uname -r = `(uname -r) 2>/dev/null || echo unknown`
967uname -s = `(uname -s) 2>/dev/null || echo unknown`
968uname -v = `(uname -v) 2>/dev/null || echo unknown`
969
970/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
971/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
972
973/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
974/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
975/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
976hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
977/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
978/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
979/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
980
981_ASUNAME
982
983as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
984for as_dir in $PATH
985do
986 IFS=$as_save_IFS
987 test -z "$as_dir" && as_dir=.
988 echo "PATH: $as_dir"
989done
990
991} >&5
992
993cat >&5 <<_ACEOF
994
995
996## ----------- ##
997## Core tests. ##
998## ----------- ##
999
1000_ACEOF
1001
1002
1003# Keep a trace of the command line.
1004# Strip out --no-create and --no-recursion so they do not pile up.
1005# Also quote any args containing shell meta-characters.
1006ac_configure_args=
1007ac_sep=
1008for ac_arg
1009do
1010 case $ac_arg in
1011 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1012 | --no-cr | --no-c | -n ) continue ;;
1013 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1014 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1015 continue ;;
1016 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1017 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1018 esac
Barry Warsawfe33b792003-01-07 22:42:49 +00001019 case " $ac_configure_args " in
1020 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1021 *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1022 ac_sep=" " ;;
1023 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 # Get rid of the leading space.
1025done
1026
1027# When interrupted or exit'd, cleanup temporary files, and complete
1028# config.log. We remove comments because anyway the quotes in there
1029# would cause problems or look ugly.
1030# WARNING: Be sure not to use single quotes in there, as some shells,
1031# such as our DU 5.0 friend, will then `close' the trap.
1032trap 'exit_status=$?
1033 # Save into config.log some information that might help in debugging.
1034 {
1035 echo
1036 cat <<\_ASBOX
1037## ---------------- ##
1038## Cache variables. ##
1039## ---------------- ##
1040_ASBOX
1041 echo
1042 # The following way of writing the cache mishandles newlines in values,
1043{
1044 (set) 2>&1 |
1045 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1046 *ac_space=\ *)
1047 sed -n \
1048 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1049 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1050 ;;
1051 *)
1052 sed -n \
1053 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1054 ;;
1055 esac;
1056}
1057 echo
1058 if test -s confdefs.h; then
1059 cat <<\_ASBOX
1060## ----------- ##
1061## confdefs.h. ##
1062## ----------- ##
1063_ASBOX
1064 echo
Barry Warsawfe33b792003-01-07 22:42:49 +00001065 sed "/^$/d" confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001066 echo
1067 fi
1068 test "$ac_signal" != 0 &&
1069 echo "$as_me: caught signal $ac_signal"
1070 echo "$as_me: exit $exit_status"
1071 } >&5
1072 rm -f core core.* *.core &&
1073 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1074 exit $exit_status
1075 ' 0
1076for ac_signal in 1 2 13 15; do
1077 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1078done
1079ac_signal=0
1080
1081# confdefs.h avoids OS command line length limits that DEFS can exceed.
1082rm -rf conftest* confdefs.h
1083# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1084echo >confdefs.h
1085
1086# Predefined preprocessor variables.
1087
1088cat >>confdefs.h <<_ACEOF
1089#define PACKAGE_NAME "$PACKAGE_NAME"
1090_ACEOF
1091
1092
1093cat >>confdefs.h <<_ACEOF
1094#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1095_ACEOF
1096
1097
1098cat >>confdefs.h <<_ACEOF
1099#define PACKAGE_VERSION "$PACKAGE_VERSION"
1100_ACEOF
1101
1102
1103cat >>confdefs.h <<_ACEOF
1104#define PACKAGE_STRING "$PACKAGE_STRING"
1105_ACEOF
1106
1107
1108cat >>confdefs.h <<_ACEOF
1109#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1110_ACEOF
1111
1112
1113# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001114# Prefer explicitly selected file to automatically selected ones.
1115if test -z "$CONFIG_SITE"; then
1116 if test "x$prefix" != xNONE; then
1117 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1118 else
1119 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1120 fi
1121fi
1122for ac_site_file in $CONFIG_SITE; do
1123 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1125echo "$as_me: loading site script $ac_site_file" >&6;}
1126 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001127 . "$ac_site_file"
1128 fi
1129done
1130
1131if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 # Some versions of bash will fail to source /dev/null (special
1133 # files actually), so we avoid doing that.
1134 if test -f "$cache_file"; then
1135 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1136echo "$as_me: loading cache $cache_file" >&6;}
1137 case $cache_file in
1138 [\\/]* | ?:[\\/]* ) . $cache_file;;
1139 *) . ./$cache_file;;
1140 esac
1141 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001142else
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1144echo "$as_me: creating cache $cache_file" >&6;}
1145 >$cache_file
1146fi
1147
1148# Check that the precious variables saved in the cache have kept the same
1149# value.
1150ac_cache_corrupted=false
1151for ac_var in `(set) 2>&1 |
1152 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1153 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1154 eval ac_new_set=\$ac_env_${ac_var}_set
1155 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1156 eval ac_new_val="\$ac_env_${ac_var}_value"
1157 case $ac_old_set,$ac_new_set in
1158 set,)
1159 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1160echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1161 ac_cache_corrupted=: ;;
1162 ,set)
1163 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1164echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1165 ac_cache_corrupted=: ;;
1166 ,);;
1167 *)
1168 if test "x$ac_old_val" != "x$ac_new_val"; then
1169 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1170echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1171 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1172echo "$as_me: former value: $ac_old_val" >&2;}
1173 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1174echo "$as_me: current value: $ac_new_val" >&2;}
1175 ac_cache_corrupted=:
1176 fi;;
1177 esac
1178 # Pass precious variables to config.status.
1179 if test "$ac_new_set" = set; then
1180 case $ac_new_val in
1181 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1182 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1183 *) ac_arg=$ac_var=$ac_new_val ;;
1184 esac
1185 case " $ac_configure_args " in
1186 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1187 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1188 esac
1189 fi
1190done
1191if $ac_cache_corrupted; then
1192 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1193echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1194 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1195echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1196 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001197fi
1198
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001200ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001201ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1202ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1203ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001204
Guido van Rossum627b2d71993-12-24 10:39:16 +00001205
Michael W. Hudson54241132001-12-07 15:38:26 +00001206
1207
Guido van Rossum627b2d71993-12-24 10:39:16 +00001208
Martin v. Löwis11437992002-04-12 09:54:03 +00001209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
Martin v. Löwis88afe662002-10-26 13:47:44 +00001222
1223
1224
1225
1226
1227
1228
1229
1230
Barry Warsawfe33b792003-01-07 22:42:49 +00001231ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001232
1233
Martin v. Löwis11437992002-04-12 09:54:03 +00001234
1235
1236
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001237
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001238
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001239# We don't use PACKAGE_ variables, and they cause conflicts
1240# with other autoconf-based packages that include Python.h
1241grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1242rm confdefs.h
1243mv confdefs.h.new confdefs.h
1244
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001245
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00001246VERSION=2.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001247
Martin v. Löwis1142de32002-03-29 16:28:31 +00001248
1249SOVERSION=1.0
1250
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001251# The later defininition of _XOPEN_SOURCE disables certain features
1252# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1253
1254cat >>confdefs.h <<\_ACEOF
1255#define _GNU_SOURCE 1
1256_ACEOF
1257
1258
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001259# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1260# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1261# them.
1262
1263cat >>confdefs.h <<\_ACEOF
1264#define _NETBSD_SOURCE 1
1265_ACEOF
1266
1267
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001268define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001269
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001270# Arguments passed to configure.
1271
1272CONFIG_ARGS="$ac_configure_args"
1273
Jack Jansene578a632001-08-15 01:27:14 +00001274# Check whether --enable-framework or --disable-framework was given.
1275if test "${enable_framework+set}" = set; then
1276 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001277
Jack Jansene578a632001-08-15 01:27:14 +00001278 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001279 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001280 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001281 esac
1282 case $enableval in
1283 no)
1284 PYTHONFRAMEWORK=
1285 PYTHONFRAMEWORKDIR=no-framework
1286 PYTHONFRAMEWORKPREFIX=
1287 PYTHONFRAMEWORKINSTALLDIR=
1288 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001289 ;;
1290 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001291 PYTHONFRAMEWORK=Python
1292 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001293 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001294 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1295 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001296 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001297
Guido van Rossum563e7081996-09-10 18:20:48 +00001298else
Martin v. Löwis11437992002-04-12 09:54:03 +00001299
Jack Jansene578a632001-08-15 01:27:14 +00001300 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001301 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001302 PYTHONFRAMEWORKPREFIX=
1303 PYTHONFRAMEWORKINSTALLDIR=
1304 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001305
Martin v. Löwis11437992002-04-12 09:54:03 +00001306fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001307
1308
1309
1310
Jack Jansene578a632001-08-15 01:27:14 +00001311
1312##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001313## AC_HELP_STRING(--with-dyld,
1314## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001315##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001316# Set name for machine-dependent library files
1317
Martin v. Löwis11437992002-04-12 09:54:03 +00001318echo "$as_me:$LINENO: checking MACHDEP" >&5
1319echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001320if test -z "$MACHDEP"
1321then
Guido van Rossum563e7081996-09-10 18:20:48 +00001322 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001323 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1324 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001325 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001326 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001327 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001328 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001329 ac_md_system=`echo $ac_sys_system |
1330 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1331 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001332 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001333 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001334
Guido van Rossum07397971997-04-29 21:49:50 +00001335 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001336 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001337 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001338 atheos*) MACHDEP="atheos";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001339 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001340 esac
1341fi
Guido van Rossum91922671997-10-09 20:24:13 +00001342
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001343# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1344# disable features if it is defined, without any means to access these
1345# features as extensions. For these systems, we skip the definition of
1346# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1347# some feature, make sure there is no alternative way to access this
1348# feature. Also, when using wildcards, make sure you have verified the
1349# need for not defining _XOPEN_SOURCE on all systems matching the
1350# wildcard, and that the wildcard does not include future systems
1351# (which may remove their limitations).
1352case $ac_sys_system/$ac_sys_release in
1353 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1354 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis858f8172003-05-24 12:35:47 +00001355 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm.
1356 OpenBSD/2.* | OpenBSD/3.[0123])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001357 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00001358 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
1359 # of union __?sigval. Reported by Stuart Bishop.
1360 SunOS/5.6)
1361 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001362 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
1363 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
1364 OpenUNIX/8.0.0| UnixWare/7.1.[0-3])
1365 define_xopen_source=no;;
1366 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001367 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001368 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001369 define_xopen_source=no;;
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001370esac
1371
1372if test $define_xopen_source = yes
1373then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001374
1375cat >>confdefs.h <<\_ACEOF
1376#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001377_ACEOF
1378
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001379
1380 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1381 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1382 # several APIs are not declared. Since this is also needed in some
1383 # cases for HP-UX, we define it globally.
1384
1385
1386cat >>confdefs.h <<\_ACEOF
1387#define _XOPEN_SOURCE_EXTENDED 1
1388_ACEOF
1389
1390
1391cat >>confdefs.h <<\_ACEOF
1392#define _POSIX_C_SOURCE 200112L
1393_ACEOF
1394
1395
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001396fi
1397
Guido van Rossum91922671997-10-09 20:24:13 +00001398#
1399# SGI compilers allow the specification of the both the ABI and the
1400# ISA on the command line. Depending on the values of these switches,
1401# different and often incompatable code will be generated.
1402#
1403# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1404# thus supply support for various ABI/ISA combinations. The MACHDEP
1405# variable is also adjusted.
1406#
1407
1408if test ! -z "$SGI_ABI"
1409then
1410 CC="cc $SGI_ABI"
1411 LDFLAGS="$SGI_ABI $LDFLAGS"
1412 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1413fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001414echo "$as_me:$LINENO: result: $MACHDEP" >&5
1415echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001416
Jack Jansen83f898c2002-12-30 22:23:40 +00001417# And add extra plat-mac for darwin
1418
Jack Jansen7b59b422003-03-17 15:44:10 +00001419
Jack Jansen83f898c2002-12-30 22:23:40 +00001420echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1421echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1422if test -z "$EXTRAPLATDIR"
1423then
1424 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001425 darwin)
1426 EXTRAPLATDIR="\$(PLATMACDIRS)"
1427 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1428 ;;
1429 *)
1430 EXTRAPLATDIR=""
1431 EXTRAMACHDEPPATH=""
1432 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001433 esac
1434fi
1435echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1436echo "${ECHO_T}$EXTRAPLATDIR" >&6
1437
Guido van Rossum627b2d71993-12-24 10:39:16 +00001438# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001439
1440# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1441# for debug/optimization stuff. BASECFLAGS is for flags that are required
1442# just to get things to compile and link. Users are free to override OPT
1443# when running configure or make. The build should not break if they do.
1444# BASECFLAGS should generally not be messed with, however.
1445
1446# XXX shouldn't some/most/all of this code be merged with the stuff later
1447# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001448echo "$as_me:$LINENO: checking for --without-gcc" >&5
1449echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1450
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001451# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001452if test "${with_gcc+set}" = set; then
1453 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001454
Guido van Rossum7f43da71994-08-01 12:15:30 +00001455 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001456 no) CC=cc
1457 without_gcc=yes;;
1458 yes) CC=gcc
1459 without_gcc=no;;
1460 *) CC=$withval
1461 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001462 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001463else
Martin v. Löwis11437992002-04-12 09:54:03 +00001464
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001465 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001466 AIX*) CC=cc_r
1467 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001468 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001469 case $BE_HOST_CPU in
1470 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001471 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001472 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001473 BASECFLAGS="$BASECFLAGS -export pragma"
1474 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001475 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001476 ;;
1477 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001478 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001479 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001480 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001481 ;;
1482 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001483 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1484echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1485 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001486 ;;
1487 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001488 AR="\$(srcdir)/Modules/ar_beos"
1489 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001490 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001491 Monterey*)
1492 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001493 without_gcc=;;
1494 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001495 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001496fi;
1497echo "$as_me:$LINENO: result: $without_gcc" >&5
1498echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001499
1500
Guido van Rossum95012191999-12-16 17:50:52 +00001501
Fred Drakea1a84e72001-03-06 05:52:16 +00001502MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001503echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1504echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1505
Guido van Rossum95012191999-12-16 17:50:52 +00001506# Check whether --with-cxx or --without-cxx was given.
1507if test "${with_cxx+set}" = set; then
1508 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001509
Martin v. Löwis22352952000-12-13 17:37:02 +00001510 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001511 case $withval in
1512 no) CXX=
1513 with_cxx=no;;
1514 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001515 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001516 with_cxx=$withval;;
1517 esac
1518else
Martin v. Löwis11437992002-04-12 09:54:03 +00001519
Guido van Rossum95012191999-12-16 17:50:52 +00001520 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001521 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001522
Martin v. Löwis11437992002-04-12 09:54:03 +00001523fi;
1524echo "$as_me:$LINENO: result: $with_cxx" >&5
1525echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001526
1527if test "$with_cxx" = "yes"
1528then
Martin v. Löwis11437992002-04-12 09:54:03 +00001529 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1530echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1531 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001532fi
1533
1534
1535
1536
Martin v. Löwis11437992002-04-12 09:54:03 +00001537if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001538then
1539 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1540do
Martin v. Löwis11437992002-04-12 09:54:03 +00001541 # Extract the first word of "$ac_prog", so it can be a program name with args.
Martin v. Löwis22352952000-12-13 17:37:02 +00001542set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001543echo "$as_me:$LINENO: checking for $ac_word" >&5
1544echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1545if test "${ac_cv_prog_CXX+set}" = set; then
1546 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001547else
1548 if test -n "$CXX"; then
1549 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1550else
Martin v. Löwis11437992002-04-12 09:54:03 +00001551as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1552for as_dir in $PATH
1553do
1554 IFS=$as_save_IFS
1555 test -z "$as_dir" && as_dir=.
1556 for ac_exec_ext in '' $ac_executable_extensions; do
1557 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1558 ac_cv_prog_CXX="$ac_prog"
1559 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1560 break 2
1561 fi
1562done
1563done
1564
Martin v. Löwis22352952000-12-13 17:37:02 +00001565fi
1566fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001567CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001568if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001569 echo "$as_me:$LINENO: result: $CXX" >&5
1570echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001571else
Martin v. Löwis11437992002-04-12 09:54:03 +00001572 echo "$as_me:$LINENO: result: no" >&5
1573echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001574fi
1575
Martin v. Löwis11437992002-04-12 09:54:03 +00001576 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001577done
1578test -n "$CXX" || CXX="notfound"
1579
1580 if test "$CXX" = "notfound"
1581 then
1582 CXX=
1583 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001584 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001585ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001586ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1587ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1588ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1589 cat >conftest.$ac_ext <<_ACEOF
1590#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001591#include "confdefs.h"
1592
Barry Warsawfe33b792003-01-07 22:42:49 +00001593#ifdef F77_DUMMY_MAIN
1594# ifdef __cplusplus
1595 extern "C"
1596# endif
1597 int F77_DUMMY_MAIN() { return 1; }
1598#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00001599int
1600main ()
1601{
Michael W. Hudson54241132001-12-07 15:38:26 +00001602
Martin v. Löwis11437992002-04-12 09:54:03 +00001603 ;
1604 return 0;
1605}
1606_ACEOF
1607ac_clean_files_save=$ac_clean_files
1608ac_clean_files="$ac_clean_files a.out a.exe"
1609# Try to create an executable without -o first, disregard a.out.
1610# It will help us diagnose broken compilers, and finding out an intuition
1611# of exeext.
1612echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1613echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1614ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1615if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1616 (eval $ac_link_default) 2>&5
1617 ac_status=$?
1618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1619 (exit $ac_status); }; then
1620 # Find the output, starting from the most likely. This scheme is
1621# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1622# resort.
1623
1624# Be careful to initialize this variable, since it used to be cached.
1625# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1626ac_cv_exeext=
Barry Warsawfe33b792003-01-07 22:42:49 +00001627for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1628 ls a.out conftest 2>/dev/null;
1629 ls a.* conftest.* 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001630 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00001631 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001632 a.out ) # We found the default executable, but exeext='' is most
1633 # certainly right.
1634 break;;
1635 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1636 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1637 export ac_cv_exeext
1638 break;;
1639 * ) break;;
1640 esac
1641done
1642else
1643 echo "$as_me: failed program was:" >&5
1644cat conftest.$ac_ext >&5
Barry Warsawfe33b792003-01-07 22:42:49 +00001645{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1646echo "$as_me: error: C++ compiler cannot create executables" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001647 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001648fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001649
1650ac_exeext=$ac_cv_exeext
1651echo "$as_me:$LINENO: result: $ac_file" >&5
1652echo "${ECHO_T}$ac_file" >&6
1653
1654# Check the compiler produces executables we can run. If not, either
1655# the compiler is broken, or we cross compile.
1656echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1657echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1658# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1659# If not cross compiling, check that we can run a simple program.
1660if test "$cross_compiling" != yes; then
1661 if { ac_try='./$ac_file'
1662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1663 (eval $ac_try) 2>&5
1664 ac_status=$?
1665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1666 (exit $ac_status); }; }; then
1667 cross_compiling=no
1668 else
1669 if test "$cross_compiling" = maybe; then
1670 cross_compiling=yes
1671 else
1672 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1673If you meant to cross compile, use \`--host'." >&5
1674echo "$as_me: error: cannot run C++ compiled programs.
1675If you meant to cross compile, use \`--host'." >&2;}
1676 { (exit 1); exit 1; }; }
1677 fi
1678 fi
1679fi
1680echo "$as_me:$LINENO: result: yes" >&5
1681echo "${ECHO_T}yes" >&6
1682
1683rm -f a.out a.exe conftest$ac_cv_exeext
1684ac_clean_files=$ac_clean_files_save
1685# Check the compiler produces executables we can run. If not, either
1686# the compiler is broken, or we cross compile.
1687echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1688echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1689echo "$as_me:$LINENO: result: $cross_compiling" >&5
1690echo "${ECHO_T}$cross_compiling" >&6
1691
1692echo "$as_me:$LINENO: checking for suffix of executables" >&5
1693echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1694if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1695 (eval $ac_link) 2>&5
1696 ac_status=$?
1697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1698 (exit $ac_status); }; then
1699 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1700# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1701# work properly (i.e., refer to `conftest.exe'), while it won't with
1702# `rm'.
Barry Warsawfe33b792003-01-07 22:42:49 +00001703for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001704 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00001705 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001706 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1707 export ac_cv_exeext
1708 break;;
1709 * ) break;;
1710 esac
1711done
1712else
1713 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1714echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1715 { (exit 1); exit 1; }; }
1716fi
1717
1718rm -f conftest$ac_cv_exeext
1719echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1720echo "${ECHO_T}$ac_cv_exeext" >&6
1721
1722rm -f conftest.$ac_ext
1723EXEEXT=$ac_cv_exeext
1724ac_exeext=$EXEEXT
1725
1726 ac_ext=c
1727ac_cpp='$CPP $CPPFLAGS'
1728ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1729ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1730ac_compiler_gnu=$ac_cv_c_compiler_gnu
1731
1732
Martin v. Löwis22352952000-12-13 17:37:02 +00001733
1734 fi
1735fi
1736
Guido van Rossum8b131c51995-03-09 14:10:13 +00001737# If the user switches compilers, we can't believe the cache
1738if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1739then
Martin v. Löwis11437992002-04-12 09:54:03 +00001740 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1741(it is also a good idea to do 'make clean' before compiling)" >&5
1742echo "$as_me: error: cached CC is different -- throw away $cache_file
1743(it is also a good idea to do 'make clean' before compiling)" >&2;}
1744 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001745fi
1746
Martin v. Löwis11437992002-04-12 09:54:03 +00001747ac_ext=c
1748ac_cpp='$CPP $CPPFLAGS'
1749ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1750ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1751ac_compiler_gnu=$ac_cv_c_compiler_gnu
1752if test -n "$ac_tool_prefix"; then
1753 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1754set dummy ${ac_tool_prefix}gcc; ac_word=$2
1755echo "$as_me:$LINENO: checking for $ac_word" >&5
1756echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1757if test "${ac_cv_prog_CC+set}" = set; then
1758 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001759else
1760 if test -n "$CC"; then
1761 ac_cv_prog_CC="$CC" # Let the user override the test.
1762else
Martin v. Löwis11437992002-04-12 09:54:03 +00001763as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1764for as_dir in $PATH
1765do
1766 IFS=$as_save_IFS
1767 test -z "$as_dir" && as_dir=.
1768 for ac_exec_ext in '' $ac_executable_extensions; do
1769 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1770 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1771 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1772 break 2
1773 fi
1774done
1775done
1776
Jack Jansendd19cf82001-12-06 22:36:17 +00001777fi
1778fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001779CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001780if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001781 echo "$as_me:$LINENO: result: $CC" >&5
1782echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001783else
Martin v. Löwis11437992002-04-12 09:54:03 +00001784 echo "$as_me:$LINENO: result: no" >&5
1785echo "${ECHO_T}no" >&6
1786fi
1787
1788fi
1789if test -z "$ac_cv_prog_CC"; then
1790 ac_ct_CC=$CC
1791 # Extract the first word of "gcc", so it can be a program name with args.
1792set dummy gcc; ac_word=$2
1793echo "$as_me:$LINENO: checking for $ac_word" >&5
1794echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1795if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1796 echo $ECHO_N "(cached) $ECHO_C" >&6
1797else
1798 if test -n "$ac_ct_CC"; then
1799 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1800else
1801as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1802for as_dir in $PATH
1803do
1804 IFS=$as_save_IFS
1805 test -z "$as_dir" && as_dir=.
1806 for ac_exec_ext in '' $ac_executable_extensions; do
1807 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1808 ac_cv_prog_ac_ct_CC="gcc"
1809 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1810 break 2
1811 fi
1812done
1813done
1814
1815fi
1816fi
1817ac_ct_CC=$ac_cv_prog_ac_ct_CC
1818if test -n "$ac_ct_CC"; then
1819 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1820echo "${ECHO_T}$ac_ct_CC" >&6
1821else
1822 echo "$as_me:$LINENO: result: no" >&5
1823echo "${ECHO_T}no" >&6
1824fi
1825
1826 CC=$ac_ct_CC
1827else
1828 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001829fi
1830
Jack Jansendd19cf82001-12-06 22:36:17 +00001831if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001832 if test -n "$ac_tool_prefix"; then
1833 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1834set dummy ${ac_tool_prefix}cc; ac_word=$2
1835echo "$as_me:$LINENO: checking for $ac_word" >&5
1836echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1837if test "${ac_cv_prog_CC+set}" = set; then
1838 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001839else
1840 if test -n "$CC"; then
1841 ac_cv_prog_CC="$CC" # Let the user override the test.
1842else
Martin v. Löwis11437992002-04-12 09:54:03 +00001843as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1844for as_dir in $PATH
1845do
1846 IFS=$as_save_IFS
1847 test -z "$as_dir" && as_dir=.
1848 for ac_exec_ext in '' $ac_executable_extensions; do
1849 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1850 ac_cv_prog_CC="${ac_tool_prefix}cc"
1851 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1852 break 2
1853 fi
1854done
1855done
1856
1857fi
1858fi
1859CC=$ac_cv_prog_CC
1860if test -n "$CC"; then
1861 echo "$as_me:$LINENO: result: $CC" >&5
1862echo "${ECHO_T}$CC" >&6
1863else
1864 echo "$as_me:$LINENO: result: no" >&5
1865echo "${ECHO_T}no" >&6
1866fi
1867
1868fi
1869if test -z "$ac_cv_prog_CC"; then
1870 ac_ct_CC=$CC
1871 # Extract the first word of "cc", so it can be a program name with args.
1872set dummy cc; ac_word=$2
1873echo "$as_me:$LINENO: checking for $ac_word" >&5
1874echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1875if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1876 echo $ECHO_N "(cached) $ECHO_C" >&6
1877else
1878 if test -n "$ac_ct_CC"; then
1879 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1880else
1881as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1882for as_dir in $PATH
1883do
1884 IFS=$as_save_IFS
1885 test -z "$as_dir" && as_dir=.
1886 for ac_exec_ext in '' $ac_executable_extensions; do
1887 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1888 ac_cv_prog_ac_ct_CC="cc"
1889 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1890 break 2
1891 fi
1892done
1893done
1894
1895fi
1896fi
1897ac_ct_CC=$ac_cv_prog_ac_ct_CC
1898if test -n "$ac_ct_CC"; then
1899 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1900echo "${ECHO_T}$ac_ct_CC" >&6
1901else
1902 echo "$as_me:$LINENO: result: no" >&5
1903echo "${ECHO_T}no" >&6
1904fi
1905
1906 CC=$ac_ct_CC
1907else
1908 CC="$ac_cv_prog_CC"
1909fi
1910
1911fi
1912if test -z "$CC"; then
1913 # Extract the first word of "cc", so it can be a program name with args.
1914set dummy cc; ac_word=$2
1915echo "$as_me:$LINENO: checking for $ac_word" >&5
1916echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1917if test "${ac_cv_prog_CC+set}" = set; then
1918 echo $ECHO_N "(cached) $ECHO_C" >&6
1919else
1920 if test -n "$CC"; then
1921 ac_cv_prog_CC="$CC" # Let the user override the test.
1922else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001923 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001924as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1925for as_dir in $PATH
1926do
1927 IFS=$as_save_IFS
1928 test -z "$as_dir" && as_dir=.
1929 for ac_exec_ext in '' $ac_executable_extensions; do
1930 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1931 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1932 ac_prog_rejected=yes
1933 continue
1934 fi
1935 ac_cv_prog_CC="cc"
1936 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1937 break 2
1938 fi
1939done
1940done
1941
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001942if test $ac_prog_rejected = yes; then
1943 # We found a bogon in the path, so make sure we never use it.
1944 set dummy $ac_cv_prog_CC
1945 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001946 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001947 # We chose a different compiler from the bogus one.
1948 # However, it has the same basename, so the bogon will be chosen
1949 # first if we set CC to just the basename; use the full file name.
1950 shift
Barry Warsawfe33b792003-01-07 22:42:49 +00001951 set dummy "$as_dir/$ac_word" ${1+"$@"}
1952 shift
1953 ac_cv_prog_CC="$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001954 fi
1955fi
1956fi
1957fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001958CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001959if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001960 echo "$as_me:$LINENO: result: $CC" >&5
1961echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001962else
Martin v. Löwis11437992002-04-12 09:54:03 +00001963 echo "$as_me:$LINENO: result: no" >&5
1964echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001965fi
1966
Martin v. Löwis11437992002-04-12 09:54:03 +00001967fi
1968if test -z "$CC"; then
1969 if test -n "$ac_tool_prefix"; then
1970 for ac_prog in cl
1971 do
1972 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1973set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1974echo "$as_me:$LINENO: checking for $ac_word" >&5
1975echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1976if test "${ac_cv_prog_CC+set}" = set; then
1977 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001978else
1979 if test -n "$CC"; then
1980 ac_cv_prog_CC="$CC" # Let the user override the test.
1981else
Martin v. Löwis11437992002-04-12 09:54:03 +00001982as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1983for as_dir in $PATH
1984do
1985 IFS=$as_save_IFS
1986 test -z "$as_dir" && as_dir=.
1987 for ac_exec_ext in '' $ac_executable_extensions; do
1988 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1989 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1990 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1991 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001992 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001993done
1994done
1995
1996fi
1997fi
1998CC=$ac_cv_prog_CC
1999if test -n "$CC"; then
2000 echo "$as_me:$LINENO: result: $CC" >&5
2001echo "${ECHO_T}$CC" >&6
2002else
2003 echo "$as_me:$LINENO: result: no" >&5
2004echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002005fi
2006
Martin v. Löwis11437992002-04-12 09:54:03 +00002007 test -n "$CC" && break
2008 done
2009fi
2010if test -z "$CC"; then
2011 ac_ct_CC=$CC
2012 for ac_prog in cl
2013do
2014 # Extract the first word of "$ac_prog", so it can be a program name with args.
2015set dummy $ac_prog; ac_word=$2
2016echo "$as_me:$LINENO: checking for $ac_word" >&5
2017echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2018if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2019 echo $ECHO_N "(cached) $ECHO_C" >&6
2020else
2021 if test -n "$ac_ct_CC"; then
2022 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2023else
2024as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2025for as_dir in $PATH
2026do
2027 IFS=$as_save_IFS
2028 test -z "$as_dir" && as_dir=.
2029 for ac_exec_ext in '' $ac_executable_extensions; do
2030 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2031 ac_cv_prog_ac_ct_CC="$ac_prog"
2032 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2033 break 2
2034 fi
2035done
2036done
Jack Jansendd19cf82001-12-06 22:36:17 +00002037
Martin v. Löwis11437992002-04-12 09:54:03 +00002038fi
2039fi
2040ac_ct_CC=$ac_cv_prog_ac_ct_CC
2041if test -n "$ac_ct_CC"; then
2042 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2043echo "${ECHO_T}$ac_ct_CC" >&6
2044else
2045 echo "$as_me:$LINENO: result: no" >&5
2046echo "${ECHO_T}no" >&6
2047fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002048
Martin v. Löwis11437992002-04-12 09:54:03 +00002049 test -n "$ac_ct_CC" && break
2050done
Michael W. Hudson54241132001-12-07 15:38:26 +00002051
Martin v. Löwis11437992002-04-12 09:54:03 +00002052 CC=$ac_ct_CC
2053fi
2054
2055fi
2056
2057
2058test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
2059echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
2060 { (exit 1); exit 1; }; }
2061
2062# Provide some information about the compiler.
2063echo "$as_me:$LINENO:" \
2064 "checking for C compiler version" >&5
2065ac_compiler=`set X $ac_compile; echo $2`
2066{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2067 (eval $ac_compiler --version </dev/null >&5) 2>&5
2068 ac_status=$?
2069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2070 (exit $ac_status); }
2071{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2072 (eval $ac_compiler -v </dev/null >&5) 2>&5
2073 ac_status=$?
2074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2075 (exit $ac_status); }
2076{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2077 (eval $ac_compiler -V </dev/null >&5) 2>&5
2078 ac_status=$?
2079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2080 (exit $ac_status); }
2081
2082cat >conftest.$ac_ext <<_ACEOF
2083#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00002084#include "confdefs.h"
2085
Barry Warsawfe33b792003-01-07 22:42:49 +00002086#ifdef F77_DUMMY_MAIN
2087# ifdef __cplusplus
2088 extern "C"
2089# endif
2090 int F77_DUMMY_MAIN() { return 1; }
2091#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002092int
2093main ()
2094{
2095
2096 ;
2097 return 0;
2098}
2099_ACEOF
2100ac_clean_files_save=$ac_clean_files
2101ac_clean_files="$ac_clean_files a.out a.exe"
2102# Try to create an executable without -o first, disregard a.out.
2103# It will help us diagnose broken compilers, and finding out an intuition
2104# of exeext.
2105echo "$as_me:$LINENO: checking for C compiler default output" >&5
2106echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2107ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2108if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2109 (eval $ac_link_default) 2>&5
2110 ac_status=$?
2111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2112 (exit $ac_status); }; then
2113 # Find the output, starting from the most likely. This scheme is
2114# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2115# resort.
2116
2117# Be careful to initialize this variable, since it used to be cached.
2118# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2119ac_cv_exeext=
Barry Warsawfe33b792003-01-07 22:42:49 +00002120for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
2121 ls a.out conftest 2>/dev/null;
2122 ls a.* conftest.* 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002123 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00002124 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002125 a.out ) # We found the default executable, but exeext='' is most
2126 # certainly right.
2127 break;;
2128 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2129 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2130 export ac_cv_exeext
2131 break;;
2132 * ) break;;
2133 esac
2134done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002135else
Martin v. Löwis11437992002-04-12 09:54:03 +00002136 echo "$as_me: failed program was:" >&5
2137cat conftest.$ac_ext >&5
Barry Warsawfe33b792003-01-07 22:42:49 +00002138{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2139echo "$as_me: error: C compiler cannot create executables" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002140 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002141fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002142
Martin v. Löwis11437992002-04-12 09:54:03 +00002143ac_exeext=$ac_cv_exeext
2144echo "$as_me:$LINENO: result: $ac_file" >&5
2145echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002146
Martin v. Löwis11437992002-04-12 09:54:03 +00002147# Check the compiler produces executables we can run. If not, either
2148# the compiler is broken, or we cross compile.
2149echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2150echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2151# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2152# If not cross compiling, check that we can run a simple program.
2153if test "$cross_compiling" != yes; then
2154 if { ac_try='./$ac_file'
2155 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2156 (eval $ac_try) 2>&5
2157 ac_status=$?
2158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2159 (exit $ac_status); }; }; then
2160 cross_compiling=no
2161 else
2162 if test "$cross_compiling" = maybe; then
2163 cross_compiling=yes
2164 else
2165 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2166If you meant to cross compile, use \`--host'." >&5
2167echo "$as_me: error: cannot run C compiled programs.
2168If you meant to cross compile, use \`--host'." >&2;}
2169 { (exit 1); exit 1; }; }
2170 fi
2171 fi
2172fi
2173echo "$as_me:$LINENO: result: yes" >&5
2174echo "${ECHO_T}yes" >&6
2175
2176rm -f a.out a.exe conftest$ac_cv_exeext
2177ac_clean_files=$ac_clean_files_save
2178# Check the compiler produces executables we can run. If not, either
2179# the compiler is broken, or we cross compile.
2180echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2181echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2182echo "$as_me:$LINENO: result: $cross_compiling" >&5
2183echo "${ECHO_T}$cross_compiling" >&6
2184
2185echo "$as_me:$LINENO: checking for suffix of executables" >&5
2186echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2187if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2188 (eval $ac_link) 2>&5
2189 ac_status=$?
2190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2191 (exit $ac_status); }; then
2192 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2193# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2194# work properly (i.e., refer to `conftest.exe'), while it won't with
2195# `rm'.
Barry Warsawfe33b792003-01-07 22:42:49 +00002196for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002197 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00002198 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002199 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2200 export ac_cv_exeext
2201 break;;
2202 * ) break;;
2203 esac
2204done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002205else
Martin v. Löwis11437992002-04-12 09:54:03 +00002206 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2207echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2208 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002209fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002210
Martin v. Löwis11437992002-04-12 09:54:03 +00002211rm -f conftest$ac_cv_exeext
2212echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2213echo "${ECHO_T}$ac_cv_exeext" >&6
2214
2215rm -f conftest.$ac_ext
2216EXEEXT=$ac_cv_exeext
2217ac_exeext=$EXEEXT
2218echo "$as_me:$LINENO: checking for suffix of object files" >&5
2219echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2220if test "${ac_cv_objext+set}" = set; then
2221 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002222else
Martin v. Löwis11437992002-04-12 09:54:03 +00002223 cat >conftest.$ac_ext <<_ACEOF
2224#line $LINENO "configure"
2225#include "confdefs.h"
2226
Barry Warsawfe33b792003-01-07 22:42:49 +00002227#ifdef F77_DUMMY_MAIN
2228# ifdef __cplusplus
2229 extern "C"
2230# endif
2231 int F77_DUMMY_MAIN() { return 1; }
2232#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002233int
2234main ()
2235{
2236
2237 ;
2238 return 0;
2239}
2240_ACEOF
2241rm -f conftest.o conftest.obj
2242if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2243 (eval $ac_compile) 2>&5
2244 ac_status=$?
2245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2246 (exit $ac_status); }; then
2247 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2248 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00002249 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002250 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2251 break;;
2252 esac
2253done
2254else
2255 echo "$as_me: failed program was:" >&5
2256cat conftest.$ac_ext >&5
2257{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2258echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2259 { (exit 1); exit 1; }; }
2260fi
2261
2262rm -f conftest.$ac_cv_objext conftest.$ac_ext
2263fi
2264echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2265echo "${ECHO_T}$ac_cv_objext" >&6
2266OBJEXT=$ac_cv_objext
2267ac_objext=$OBJEXT
2268echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2269echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2270if test "${ac_cv_c_compiler_gnu+set}" = set; then
2271 echo $ECHO_N "(cached) $ECHO_C" >&6
2272else
2273 cat >conftest.$ac_ext <<_ACEOF
2274#line $LINENO "configure"
2275#include "confdefs.h"
2276
Barry Warsawfe33b792003-01-07 22:42:49 +00002277#ifdef F77_DUMMY_MAIN
2278# ifdef __cplusplus
2279 extern "C"
2280# endif
2281 int F77_DUMMY_MAIN() { return 1; }
2282#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002283int
2284main ()
2285{
2286#ifndef __GNUC__
2287 choke me
2288#endif
2289
2290 ;
2291 return 0;
2292}
2293_ACEOF
2294rm -f conftest.$ac_objext
2295if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2296 (eval $ac_compile) 2>&5
2297 ac_status=$?
2298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2299 (exit $ac_status); } &&
2300 { ac_try='test -s conftest.$ac_objext'
2301 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2302 (eval $ac_try) 2>&5
2303 ac_status=$?
2304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2305 (exit $ac_status); }; }; then
2306 ac_compiler_gnu=yes
2307else
2308 echo "$as_me: failed program was:" >&5
2309cat conftest.$ac_ext >&5
2310ac_compiler_gnu=no
2311fi
2312rm -f conftest.$ac_objext conftest.$ac_ext
2313ac_cv_c_compiler_gnu=$ac_compiler_gnu
2314
2315fi
2316echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2317echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2318GCC=`test $ac_compiler_gnu = yes && echo yes`
2319ac_test_CFLAGS=${CFLAGS+set}
2320ac_save_CFLAGS=$CFLAGS
2321CFLAGS="-g"
2322echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2323echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2324if test "${ac_cv_prog_cc_g+set}" = set; then
2325 echo $ECHO_N "(cached) $ECHO_C" >&6
2326else
2327 cat >conftest.$ac_ext <<_ACEOF
2328#line $LINENO "configure"
2329#include "confdefs.h"
2330
Barry Warsawfe33b792003-01-07 22:42:49 +00002331#ifdef F77_DUMMY_MAIN
2332# ifdef __cplusplus
2333 extern "C"
2334# endif
2335 int F77_DUMMY_MAIN() { return 1; }
2336#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002337int
2338main ()
2339{
2340
2341 ;
2342 return 0;
2343}
2344_ACEOF
2345rm -f conftest.$ac_objext
2346if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2347 (eval $ac_compile) 2>&5
2348 ac_status=$?
2349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2350 (exit $ac_status); } &&
2351 { ac_try='test -s conftest.$ac_objext'
2352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2353 (eval $ac_try) 2>&5
2354 ac_status=$?
2355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2356 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002357 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002358else
Martin v. Löwis11437992002-04-12 09:54:03 +00002359 echo "$as_me: failed program was:" >&5
2360cat conftest.$ac_ext >&5
2361ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002362fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002363rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002364fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002365echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2366echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002367if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002368 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002369elif test $ac_cv_prog_cc_g = yes; then
2370 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002371 CFLAGS="-g -O2"
2372 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002373 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002374 fi
2375else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002376 if test "$GCC" = yes; then
2377 CFLAGS="-O2"
2378 else
2379 CFLAGS=
2380 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002381fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002382# Some people use a C++ compiler to compile C. Since we use `exit',
2383# in C++ we need to declare it. In case someone uses the same compiler
2384# for both compiling C and C++ we need to have the C++ compiler decide
2385# the declaration of exit, since it's the most demanding environment.
2386cat >conftest.$ac_ext <<_ACEOF
2387#ifndef __cplusplus
2388 choke me
2389#endif
2390_ACEOF
2391rm -f conftest.$ac_objext
2392if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2393 (eval $ac_compile) 2>&5
2394 ac_status=$?
2395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2396 (exit $ac_status); } &&
2397 { ac_try='test -s conftest.$ac_objext'
2398 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2399 (eval $ac_try) 2>&5
2400 ac_status=$?
2401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2402 (exit $ac_status); }; }; then
2403 for ac_declaration in \
2404 ''\
2405 '#include <stdlib.h>' \
2406 'extern "C" void std::exit (int) throw (); using std::exit;' \
2407 'extern "C" void std::exit (int); using std::exit;' \
2408 'extern "C" void exit (int) throw ();' \
2409 'extern "C" void exit (int);' \
2410 'void exit (int);'
2411do
2412 cat >conftest.$ac_ext <<_ACEOF
2413#line $LINENO "configure"
2414#include "confdefs.h"
2415#include <stdlib.h>
2416$ac_declaration
Barry Warsawfe33b792003-01-07 22:42:49 +00002417#ifdef F77_DUMMY_MAIN
2418# ifdef __cplusplus
2419 extern "C"
2420# endif
2421 int F77_DUMMY_MAIN() { return 1; }
2422#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002423int
2424main ()
2425{
2426exit (42);
2427 ;
2428 return 0;
2429}
2430_ACEOF
2431rm -f conftest.$ac_objext
2432if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2433 (eval $ac_compile) 2>&5
2434 ac_status=$?
2435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2436 (exit $ac_status); } &&
2437 { ac_try='test -s conftest.$ac_objext'
2438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2439 (eval $ac_try) 2>&5
2440 ac_status=$?
2441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2442 (exit $ac_status); }; }; then
2443 :
2444else
2445 echo "$as_me: failed program was:" >&5
2446cat conftest.$ac_ext >&5
2447continue
2448fi
2449rm -f conftest.$ac_objext conftest.$ac_ext
2450 cat >conftest.$ac_ext <<_ACEOF
2451#line $LINENO "configure"
2452#include "confdefs.h"
2453$ac_declaration
Barry Warsawfe33b792003-01-07 22:42:49 +00002454#ifdef F77_DUMMY_MAIN
2455# ifdef __cplusplus
2456 extern "C"
2457# endif
2458 int F77_DUMMY_MAIN() { return 1; }
2459#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002460int
2461main ()
2462{
2463exit (42);
2464 ;
2465 return 0;
2466}
2467_ACEOF
2468rm -f conftest.$ac_objext
2469if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2470 (eval $ac_compile) 2>&5
2471 ac_status=$?
2472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2473 (exit $ac_status); } &&
2474 { ac_try='test -s conftest.$ac_objext'
2475 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2476 (eval $ac_try) 2>&5
2477 ac_status=$?
2478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2479 (exit $ac_status); }; }; then
2480 break
2481else
2482 echo "$as_me: failed program was:" >&5
2483cat conftest.$ac_ext >&5
2484fi
2485rm -f conftest.$ac_objext conftest.$ac_ext
2486done
2487rm -f conftest*
2488if test -n "$ac_declaration"; then
2489 echo '#ifdef __cplusplus' >>confdefs.h
2490 echo $ac_declaration >>confdefs.h
2491 echo '#endif' >>confdefs.h
2492fi
2493
2494else
2495 echo "$as_me: failed program was:" >&5
2496cat conftest.$ac_ext >&5
2497fi
2498rm -f conftest.$ac_objext conftest.$ac_ext
2499ac_ext=c
2500ac_cpp='$CPP $CPPFLAGS'
2501ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2502ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2503ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002504
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002505
2506# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002507
2508ac_ext=c
2509ac_cpp='$CPP $CPPFLAGS'
2510ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2511ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2512ac_compiler_gnu=$ac_cv_c_compiler_gnu
2513echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2514echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002515# On Suns, sometimes $CPP names a directory.
2516if test -n "$CPP" && test -d "$CPP"; then
2517 CPP=
2518fi
2519if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002520 if test "${ac_cv_prog_CPP+set}" = set; then
2521 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002522else
Martin v. Löwis11437992002-04-12 09:54:03 +00002523 # Double quotes because CPP needs to be expanded
2524 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2525 do
2526 ac_preproc_ok=false
2527for ac_c_preproc_warn_flag in '' yes
2528do
2529 # Use a header file that comes with gcc, so configuring glibc
2530 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002531 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 # not just through cpp. "Syntax error" is here to catch this case.
2533 cat >conftest.$ac_ext <<_ACEOF
2534#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002535#include "confdefs.h"
2536#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002537 Syntax error
2538_ACEOF
2539if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2540 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2541 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002542 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002543 rm -f conftest.er1
2544 cat conftest.err >&5
2545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2546 (exit $ac_status); } >/dev/null; then
2547 if test -s conftest.err; then
2548 ac_cpp_err=$ac_c_preproc_warn_flag
2549 else
2550 ac_cpp_err=
2551 fi
2552else
2553 ac_cpp_err=yes
2554fi
2555if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002556 :
2557else
Martin v. Löwis11437992002-04-12 09:54:03 +00002558 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002559 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002560 # Broken: fails on valid input.
2561continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002562fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002563rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002564
Martin v. Löwis11437992002-04-12 09:54:03 +00002565 # OK, works on sane cases. Now check whether non-existent headers
2566 # can be detected and how.
2567 cat >conftest.$ac_ext <<_ACEOF
2568#line $LINENO "configure"
2569#include "confdefs.h"
2570#include <ac_nonexistent.h>
2571_ACEOF
2572if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2573 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2574 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002575 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002576 rm -f conftest.er1
2577 cat conftest.err >&5
2578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2579 (exit $ac_status); } >/dev/null; then
2580 if test -s conftest.err; then
2581 ac_cpp_err=$ac_c_preproc_warn_flag
2582 else
2583 ac_cpp_err=
2584 fi
2585else
2586 ac_cpp_err=yes
2587fi
2588if test -z "$ac_cpp_err"; then
2589 # Broken: success on invalid input.
2590continue
2591else
2592 echo "$as_me: failed program was:" >&5
2593 cat conftest.$ac_ext >&5
2594 # Passes both tests.
2595ac_preproc_ok=:
2596break
2597fi
2598rm -f conftest.err conftest.$ac_ext
2599
2600done
2601# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2602rm -f conftest.err conftest.$ac_ext
2603if $ac_preproc_ok; then
2604 break
2605fi
2606
2607 done
2608 ac_cv_prog_CPP=$CPP
2609
2610fi
2611 CPP=$ac_cv_prog_CPP
2612else
2613 ac_cv_prog_CPP=$CPP
2614fi
2615echo "$as_me:$LINENO: result: $CPP" >&5
2616echo "${ECHO_T}$CPP" >&6
2617ac_preproc_ok=false
2618for ac_c_preproc_warn_flag in '' yes
2619do
2620 # Use a header file that comes with gcc, so configuring glibc
2621 # with a fresh cross-compiler works.
2622 # On the NeXT, cc -E runs the code through the compiler's parser,
2623 # not just through cpp. "Syntax error" is here to catch this case.
2624 cat >conftest.$ac_ext <<_ACEOF
2625#line $LINENO "configure"
2626#include "confdefs.h"
2627#include <assert.h>
2628 Syntax error
2629_ACEOF
2630if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2631 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2632 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002633 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002634 rm -f conftest.er1
2635 cat conftest.err >&5
2636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2637 (exit $ac_status); } >/dev/null; then
2638 if test -s conftest.err; then
2639 ac_cpp_err=$ac_c_preproc_warn_flag
2640 else
2641 ac_cpp_err=
2642 fi
2643else
2644 ac_cpp_err=yes
2645fi
2646if test -z "$ac_cpp_err"; then
2647 :
2648else
2649 echo "$as_me: failed program was:" >&5
2650 cat conftest.$ac_ext >&5
2651 # Broken: fails on valid input.
2652continue
2653fi
2654rm -f conftest.err conftest.$ac_ext
2655
2656 # OK, works on sane cases. Now check whether non-existent headers
2657 # can be detected and how.
2658 cat >conftest.$ac_ext <<_ACEOF
2659#line $LINENO "configure"
2660#include "confdefs.h"
2661#include <ac_nonexistent.h>
2662_ACEOF
2663if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2664 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2665 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002666 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002667 rm -f conftest.er1
2668 cat conftest.err >&5
2669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2670 (exit $ac_status); } >/dev/null; then
2671 if test -s conftest.err; then
2672 ac_cpp_err=$ac_c_preproc_warn_flag
2673 else
2674 ac_cpp_err=
2675 fi
2676else
2677 ac_cpp_err=yes
2678fi
2679if test -z "$ac_cpp_err"; then
2680 # Broken: success on invalid input.
2681continue
2682else
2683 echo "$as_me: failed program was:" >&5
2684 cat conftest.$ac_ext >&5
2685 # Passes both tests.
2686ac_preproc_ok=:
2687break
2688fi
2689rm -f conftest.err conftest.$ac_ext
2690
2691done
2692# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2693rm -f conftest.err conftest.$ac_ext
2694if $ac_preproc_ok; then
2695 :
2696else
2697 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2698echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2699 { (exit 1); exit 1; }; }
2700fi
2701
2702ac_ext=c
2703ac_cpp='$CPP $CPPFLAGS'
2704ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2705ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2706ac_compiler_gnu=$ac_cv_c_compiler_gnu
2707
2708
2709
2710echo "$as_me:$LINENO: checking for AIX" >&5
2711echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2712cat >conftest.$ac_ext <<_ACEOF
2713#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002714#include "confdefs.h"
2715#ifdef _AIX
2716 yes
2717#endif
2718
Martin v. Löwis11437992002-04-12 09:54:03 +00002719_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002720if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00002721 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002722 echo "$as_me:$LINENO: result: yes" >&5
2723echo "${ECHO_T}yes" >&6
2724cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002725#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002726_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002727
2728else
Martin v. Löwis11437992002-04-12 09:54:03 +00002729 echo "$as_me:$LINENO: result: no" >&5
2730echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002731fi
2732rm -f conftest*
2733
Michael W. Hudson54241132001-12-07 15:38:26 +00002734
Martin v. Löwis11437992002-04-12 09:54:03 +00002735echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2736echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2737if test "${ac_cv_header_stdc+set}" = set; then
2738 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002739else
Martin v. Löwis11437992002-04-12 09:54:03 +00002740 cat >conftest.$ac_ext <<_ACEOF
2741#line $LINENO "configure"
2742#include "confdefs.h"
2743#include <stdlib.h>
2744#include <stdarg.h>
2745#include <string.h>
2746#include <float.h>
2747
2748_ACEOF
2749if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2750 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2751 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002752 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002753 rm -f conftest.er1
2754 cat conftest.err >&5
2755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2756 (exit $ac_status); } >/dev/null; then
2757 if test -s conftest.err; then
2758 ac_cpp_err=$ac_c_preproc_warn_flag
2759 else
2760 ac_cpp_err=
2761 fi
2762else
2763 ac_cpp_err=yes
2764fi
2765if test -z "$ac_cpp_err"; then
2766 ac_cv_header_stdc=yes
2767else
2768 echo "$as_me: failed program was:" >&5
2769 cat conftest.$ac_ext >&5
2770 ac_cv_header_stdc=no
2771fi
2772rm -f conftest.err conftest.$ac_ext
2773
2774if test $ac_cv_header_stdc = yes; then
2775 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2776 cat >conftest.$ac_ext <<_ACEOF
2777#line $LINENO "configure"
2778#include "confdefs.h"
2779#include <string.h>
2780
2781_ACEOF
2782if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00002783 egrep "memchr" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002784 :
2785else
2786 ac_cv_header_stdc=no
2787fi
2788rm -f conftest*
2789
2790fi
2791
2792if test $ac_cv_header_stdc = yes; then
2793 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2794 cat >conftest.$ac_ext <<_ACEOF
2795#line $LINENO "configure"
2796#include "confdefs.h"
2797#include <stdlib.h>
2798
2799_ACEOF
2800if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00002801 egrep "free" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002802 :
2803else
2804 ac_cv_header_stdc=no
2805fi
2806rm -f conftest*
2807
2808fi
2809
2810if test $ac_cv_header_stdc = yes; then
2811 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2812 if test "$cross_compiling" = yes; then
2813 :
2814else
2815 cat >conftest.$ac_ext <<_ACEOF
2816#line $LINENO "configure"
2817#include "confdefs.h"
2818#include <ctype.h>
2819#if ((' ' & 0x0FF) == 0x020)
2820# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2821# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2822#else
2823# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2824 || ('j' <= (c) && (c) <= 'r') \
2825 || ('s' <= (c) && (c) <= 'z'))
2826# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2827#endif
2828
2829#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2830int
2831main ()
2832{
2833 int i;
2834 for (i = 0; i < 256; i++)
2835 if (XOR (islower (i), ISLOWER (i))
2836 || toupper (i) != TOUPPER (i))
2837 exit(2);
2838 exit (0);
2839}
2840_ACEOF
2841rm -f conftest$ac_exeext
2842if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2843 (eval $ac_link) 2>&5
2844 ac_status=$?
2845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2846 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2848 (eval $ac_try) 2>&5
2849 ac_status=$?
2850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2851 (exit $ac_status); }; }; then
2852 :
2853else
2854 echo "$as_me: program exited with status $ac_status" >&5
2855echo "$as_me: failed program was:" >&5
2856cat conftest.$ac_ext >&5
2857( exit $ac_status )
2858ac_cv_header_stdc=no
2859fi
Barry Warsawfe33b792003-01-07 22:42:49 +00002860rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002861fi
2862fi
2863fi
2864echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2865echo "${ECHO_T}$ac_cv_header_stdc" >&6
2866if test $ac_cv_header_stdc = yes; then
2867
2868cat >>confdefs.h <<\_ACEOF
2869#define STDC_HEADERS 1
2870_ACEOF
2871
2872fi
2873
2874# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2885 inttypes.h stdint.h unistd.h
2886do
2887as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2888echo "$as_me:$LINENO: checking for $ac_header" >&5
2889echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2890if eval "test \"\${$as_ac_Header+set}\" = set"; then
2891 echo $ECHO_N "(cached) $ECHO_C" >&6
2892else
2893 cat >conftest.$ac_ext <<_ACEOF
2894#line $LINENO "configure"
2895#include "confdefs.h"
2896$ac_includes_default
2897
2898#include <$ac_header>
2899_ACEOF
2900rm -f conftest.$ac_objext
2901if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2902 (eval $ac_compile) 2>&5
2903 ac_status=$?
2904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2905 (exit $ac_status); } &&
2906 { ac_try='test -s conftest.$ac_objext'
2907 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2908 (eval $ac_try) 2>&5
2909 ac_status=$?
2910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2911 (exit $ac_status); }; }; then
2912 eval "$as_ac_Header=yes"
2913else
2914 echo "$as_me: failed program was:" >&5
2915cat conftest.$ac_ext >&5
2916eval "$as_ac_Header=no"
2917fi
2918rm -f conftest.$ac_objext conftest.$ac_ext
2919fi
2920echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2921echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2922if test `eval echo '${'$as_ac_Header'}'` = yes; then
2923 cat >>confdefs.h <<_ACEOF
2924#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2925_ACEOF
2926
2927fi
2928
2929done
2930
2931
2932if test "${ac_cv_header_minix_config_h+set}" = set; then
2933 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2934echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2935if test "${ac_cv_header_minix_config_h+set}" = set; then
2936 echo $ECHO_N "(cached) $ECHO_C" >&6
2937fi
2938echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2939echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2940else
2941 # Is the header compilable?
2942echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2943echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2944cat >conftest.$ac_ext <<_ACEOF
2945#line $LINENO "configure"
2946#include "confdefs.h"
2947$ac_includes_default
2948#include <minix/config.h>
2949_ACEOF
2950rm -f conftest.$ac_objext
2951if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2952 (eval $ac_compile) 2>&5
2953 ac_status=$?
2954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2955 (exit $ac_status); } &&
2956 { ac_try='test -s conftest.$ac_objext'
2957 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2958 (eval $ac_try) 2>&5
2959 ac_status=$?
2960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2961 (exit $ac_status); }; }; then
2962 ac_header_compiler=yes
2963else
2964 echo "$as_me: failed program was:" >&5
2965cat conftest.$ac_ext >&5
2966ac_header_compiler=no
2967fi
2968rm -f conftest.$ac_objext conftest.$ac_ext
2969echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2970echo "${ECHO_T}$ac_header_compiler" >&6
2971
2972# Is the header present?
2973echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2974echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2975cat >conftest.$ac_ext <<_ACEOF
2976#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002977#include "confdefs.h"
2978#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002979_ACEOF
2980if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2981 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2982 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002983 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002984 rm -f conftest.er1
2985 cat conftest.err >&5
2986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2987 (exit $ac_status); } >/dev/null; then
2988 if test -s conftest.err; then
2989 ac_cpp_err=$ac_c_preproc_warn_flag
2990 else
2991 ac_cpp_err=
2992 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002993else
Martin v. Löwis11437992002-04-12 09:54:03 +00002994 ac_cpp_err=yes
2995fi
2996if test -z "$ac_cpp_err"; then
2997 ac_header_preproc=yes
2998else
2999 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003000 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003001 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003002fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003003rm -f conftest.err conftest.$ac_ext
3004echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3005echo "${ECHO_T}$ac_header_preproc" >&6
3006
3007# So? What about this header?
3008case $ac_header_compiler:$ac_header_preproc in
3009 yes:no )
3010 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
3011echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3012 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
3013echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
3014 no:yes )
3015 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
3016echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
3017 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
3018echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
3019 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
3020echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
3021esac
3022echo "$as_me:$LINENO: checking for minix/config.h" >&5
3023echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3024if test "${ac_cv_header_minix_config_h+set}" = set; then
3025 echo $ECHO_N "(cached) $ECHO_C" >&6
3026else
3027 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003028fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003029echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3030echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3031
3032fi
3033if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003034 MINIX=yes
3035else
Martin v. Löwis11437992002-04-12 09:54:03 +00003036 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003037fi
3038
Martin v. Löwis11437992002-04-12 09:54:03 +00003039
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003040if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003041
3042cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003043#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003044_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003045
Martin v. Löwis11437992002-04-12 09:54:03 +00003046
3047cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003048#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00003049_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003050
Martin v. Löwis11437992002-04-12 09:54:03 +00003051
3052cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003053#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003054_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003055
3056fi
3057
3058
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003059# Check for unsupported systems
3060case $ac_sys_system/$ac_sys_release in
3061SunOS/4*|DYNIX/*|dgux*/*|IRIX/4*|Linux*/1*)
3062 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3063 echo See README for details.
3064 exit 1;;
3065esac
3066
3067if test "$MINIX" = yes; then
3068 echo This system \(MINIX\) is no longer supported.
3069 echo Read README for details.
3070 exit 1
3071fi
3072
Michael W. Hudson54241132001-12-07 15:38:26 +00003073
Martin v. Löwis11437992002-04-12 09:54:03 +00003074echo "$as_me:$LINENO: checking for --with-suffix" >&5
3075echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003076
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003077# Check whether --with-suffix or --without-suffix was given.
3078if test "${with_suffix+set}" = set; then
3079 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003080
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003081 case $withval in
3082 no) EXEEXT=;;
3083 yes) EXEEXT=.exe;;
3084 *) EXEEXT=$withval;;
3085 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003086fi;
3087echo "$as_me:$LINENO: result: $EXEEXT" >&5
3088echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003089
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003090# Test whether we're running on a non-case-sensitive system, in which
3091# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003092
Martin v. Löwis11437992002-04-12 09:54:03 +00003093echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3094echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003095if test ! -d CaseSensitiveTestDir; then
3096mkdir CaseSensitiveTestDir
3097fi
3098
3099if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003100then
Martin v. Löwis11437992002-04-12 09:54:03 +00003101 echo "$as_me:$LINENO: result: yes" >&5
3102echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003103 BUILDEXEEXT=.exe
3104else
Martin v. Löwis11437992002-04-12 09:54:03 +00003105 echo "$as_me:$LINENO: result: no" >&5
3106echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003107 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003108fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003109rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003110
Guido van Rossumdd997f71998-10-07 19:58:26 +00003111case $MACHDEP in
3112bsdos*)
3113 case $CC in
3114 gcc) CC="$CC -D_HAVE_BSDI";;
3115 esac;;
3116esac
3117
Guido van Rossum24b1e751997-08-21 02:29:16 +00003118case $ac_sys_system in
3119hp*|HP*)
3120 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003121 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003122 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003123Monterey*)
3124 case $CC in
3125 cc) CC="$CC -Wl,-Bexport";;
3126 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003127SunOS*)
3128 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003129
3130cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003131#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003132_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003133
3134 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003135esac
3136
Michael W. Hudson54241132001-12-07 15:38:26 +00003137
3138
Martin v. Löwis11437992002-04-12 09:54:03 +00003139echo "$as_me:$LINENO: checking LIBRARY" >&5
3140echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003141if test -z "$LIBRARY"
3142then
3143 LIBRARY='libpython$(VERSION).a'
3144fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003145echo "$as_me:$LINENO: result: $LIBRARY" >&5
3146echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003147
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003148# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003149# name of the library into which to insert object files). BLDLIBRARY is also
3150# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3151# is blank as the main program is not linked directly against LDLIBRARY.
3152# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3153# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3154# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3155# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003156#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003157# RUNSHARED is used to run shared python without installed libraries
3158#
3159# INSTSONAME is the name of the shared library that will be use to install
3160# on the system - some systems like version suffix, others don't
3161
3162
Michael W. Hudson54241132001-12-07 15:38:26 +00003163
3164
3165
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003166
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003167LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003168BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003169INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003170DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003171LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003172RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003173
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003174# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003175# If CXX is set, and if it is needed to link a main function that was
3176# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3177# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003178# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003179# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003180
Martin v. Löwis11437992002-04-12 09:54:03 +00003181echo "$as_me:$LINENO: checking LINKCC" >&5
3182echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003183if test -z "$LINKCC"
3184then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003185 if test -z "$CXX"; then
3186 LINKCC="\$(PURIFY) \$(CC)"
3187 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003188 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003189 $CXX -c conftest.$ac_ext 2>&5
3190 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3191 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3192 then
3193 LINKCC="\$(PURIFY) \$(CC)"
3194 else
3195 LINKCC="\$(PURIFY) \$(CXX)"
3196 fi
3197 rm -fr conftest*
3198 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003199 case $ac_sys_system in
3200 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003201 exp_extra="\"\""
3202 if test $ac_sys_release -ge 5 -o \
3203 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3204 exp_extra="."
3205 fi
3206 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003207 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003208 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003209 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003210 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003211 esac
3212fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003213echo "$as_me:$LINENO: result: $LINKCC" >&5
3214echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003215
Martin v. Löwis11437992002-04-12 09:54:03 +00003216echo "$as_me:$LINENO: checking for --enable-shared" >&5
3217echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003218# Check whether --enable-shared or --disable-shared was given.
3219if test "${enable_shared+set}" = set; then
3220 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003221
Martin v. Löwis11437992002-04-12 09:54:03 +00003222fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003223
3224if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003225then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003226 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003227 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003228 enable_shared="yes";;
3229 *)
3230 enable_shared="no";;
3231 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003232fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003233echo "$as_me:$LINENO: result: $enable_shared" >&5
3234echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003235
3236
Martin v. Löwis11437992002-04-12 09:54:03 +00003237echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3238echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003239
Guido van Rossumb8552162001-09-05 14:58:11 +00003240# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3241# library that we build, but we do not want to link against it (we
3242# will find it with a -framework option). For this reason there is an
3243# extra variable BLDLIBRARY against which Python and the extension
3244# modules are linked, BLDLIBRARY. This is normally the same as
3245# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003246if test "$enable_framework"
3247then
3248 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3249 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3250 BLDLIBRARY=''
3251else
3252 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003253fi
Jack Jansene578a632001-08-15 01:27:14 +00003254
Martin v. Löwis1142de32002-03-29 16:28:31 +00003255# Other platforms follow
3256if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003257
3258cat >>confdefs.h <<\_ACEOF
3259#define Py_ENABLE_SHARED 1
3260_ACEOF
3261
Martin v. Löwis1142de32002-03-29 16:28:31 +00003262 case $ac_sys_system in
3263 BeOS*)
3264 LDLIBRARY='libpython$(VERSION).so'
3265 ;;
3266 CYGWIN*)
3267 LDLIBRARY='libpython$(VERSION).dll.a'
3268 DLLLIBRARY='libpython$(VERSION).dll'
3269 ;;
3270 SunOS*)
3271 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00003272 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwis1142de32002-03-29 16:28:31 +00003273 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3274 ;;
Martin v. Löwis96ce8052003-05-31 07:58:45 +00003275 Linux*|GNU*|NetBSD*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003276 LDLIBRARY='libpython$(VERSION).so'
3277 BLDLIBRARY='-L. -lpython$(VERSION)'
3278 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3279 INSTSONAME="$LDLIBRARY".$SOVERSION
3280 ;;
3281 hp*|HP*)
3282 LDLIBRARY='libpython$(VERSION).sl'
3283 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3284 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3285 ;;
3286 OSF*)
3287 LDLIBRARY='libpython$(VERSION).so'
3288 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3289 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3290 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003291 atheos*)
3292 LDLIBRARY='libpython$(VERSION).so'
3293 BLDLIBRARY='-L. -lpython$(VERSION)'
3294 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3295 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003296 esac
3297 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3298 case $MACHDEP in
3299 dguxR4)
3300 LDLIBRARY='libpython$(VERSION).so'
Skip Montanarodecc6a42003-01-01 20:07:49 +00003301 BASECFLAGS="$BASECFLAGS -pic"
Martin v. Löwis1142de32002-03-29 16:28:31 +00003302 ;;
3303 esac
3304fi
3305
Martin v. Löwis11437992002-04-12 09:54:03 +00003306echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3307echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003308
Martin v. Löwis11437992002-04-12 09:54:03 +00003309if test -n "$ac_tool_prefix"; then
3310 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3311set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3312echo "$as_me:$LINENO: checking for $ac_word" >&5
3313echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3314if test "${ac_cv_prog_RANLIB+set}" = set; then
3315 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003316else
3317 if test -n "$RANLIB"; then
3318 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3319else
Martin v. Löwis11437992002-04-12 09:54:03 +00003320as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3321for as_dir in $PATH
3322do
3323 IFS=$as_save_IFS
3324 test -z "$as_dir" && as_dir=.
3325 for ac_exec_ext in '' $ac_executable_extensions; do
3326 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3327 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3328 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3329 break 2
3330 fi
3331done
3332done
3333
Guido van Rossum627b2d71993-12-24 10:39:16 +00003334fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003335fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003336RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003337if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003338 echo "$as_me:$LINENO: result: $RANLIB" >&5
3339echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003340else
Martin v. Löwis11437992002-04-12 09:54:03 +00003341 echo "$as_me:$LINENO: result: no" >&5
3342echo "${ECHO_T}no" >&6
3343fi
3344
3345fi
3346if test -z "$ac_cv_prog_RANLIB"; then
3347 ac_ct_RANLIB=$RANLIB
3348 # Extract the first word of "ranlib", so it can be a program name with args.
3349set dummy ranlib; ac_word=$2
3350echo "$as_me:$LINENO: checking for $ac_word" >&5
3351echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3352if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3353 echo $ECHO_N "(cached) $ECHO_C" >&6
3354else
3355 if test -n "$ac_ct_RANLIB"; then
3356 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3357else
3358as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3359for as_dir in $PATH
3360do
3361 IFS=$as_save_IFS
3362 test -z "$as_dir" && as_dir=.
3363 for ac_exec_ext in '' $ac_executable_extensions; do
3364 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3365 ac_cv_prog_ac_ct_RANLIB="ranlib"
3366 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3367 break 2
3368 fi
3369done
3370done
3371
3372 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3373fi
3374fi
3375ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3376if test -n "$ac_ct_RANLIB"; then
3377 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3378echo "${ECHO_T}$ac_ct_RANLIB" >&6
3379else
3380 echo "$as_me:$LINENO: result: no" >&5
3381echo "${ECHO_T}no" >&6
3382fi
3383
3384 RANLIB=$ac_ct_RANLIB
3385else
3386 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003387fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003388
3389
Guido van Rossum7f43da71994-08-01 12:15:30 +00003390for ac_prog in ar aal
3391do
Martin v. Löwis11437992002-04-12 09:54:03 +00003392 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003393set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003394echo "$as_me:$LINENO: checking for $ac_word" >&5
3395echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3396if test "${ac_cv_prog_AR+set}" = set; then
3397 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003398else
3399 if test -n "$AR"; then
3400 ac_cv_prog_AR="$AR" # Let the user override the test.
3401else
Martin v. Löwis11437992002-04-12 09:54:03 +00003402as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3403for as_dir in $PATH
3404do
3405 IFS=$as_save_IFS
3406 test -z "$as_dir" && as_dir=.
3407 for ac_exec_ext in '' $ac_executable_extensions; do
3408 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3409 ac_cv_prog_AR="$ac_prog"
3410 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3411 break 2
3412 fi
3413done
3414done
3415
Guido van Rossum7f43da71994-08-01 12:15:30 +00003416fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003417fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003418AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003419if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003420 echo "$as_me:$LINENO: result: $AR" >&5
3421echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003422else
Martin v. Löwis11437992002-04-12 09:54:03 +00003423 echo "$as_me:$LINENO: result: no" >&5
3424echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003425fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003426
Martin v. Löwis11437992002-04-12 09:54:03 +00003427 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003428done
3429test -n "$AR" || AR="ar"
3430
Michael W. Hudson54241132001-12-07 15:38:26 +00003431
Neil Schemenauera42c8272001-03-31 00:01:55 +00003432case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003433bsdos*|hp*|HP*)
3434 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003435 if test -z "$INSTALL"
3436 then
3437 INSTALL="${srcdir}/install-sh -c"
3438 fi
3439esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003440ac_aux_dir=
3441for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3442 if test -f $ac_dir/install-sh; then
3443 ac_aux_dir=$ac_dir
3444 ac_install_sh="$ac_aux_dir/install-sh -c"
3445 break
3446 elif test -f $ac_dir/install.sh; then
3447 ac_aux_dir=$ac_dir
3448 ac_install_sh="$ac_aux_dir/install.sh -c"
3449 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003450 elif test -f $ac_dir/shtool; then
3451 ac_aux_dir=$ac_dir
3452 ac_install_sh="$ac_aux_dir/shtool install -c"
3453 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003454 fi
3455done
3456if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003457 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3458echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3459 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003460fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003461ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3462ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3463ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003464
3465# Find a good install program. We prefer a C program (faster),
3466# so one script is as good as another. But avoid the broken or
3467# incompatible versions:
3468# SysV /etc/install, /usr/sbin/install
3469# SunOS /usr/etc/install
3470# IRIX /sbin/install
3471# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003472# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003473# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3474# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3475# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3476# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003477echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3478echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003479if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003480if test "${ac_cv_path_install+set}" = set; then
3481 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003482else
Martin v. Löwis11437992002-04-12 09:54:03 +00003483 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3484for as_dir in $PATH
3485do
3486 IFS=$as_save_IFS
3487 test -z "$as_dir" && as_dir=.
3488 # Account for people who put trailing slashes in PATH elements.
3489case $as_dir/ in
3490 ./ | .// | /cC/* | \
3491 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3492 /usr/ucb/* ) ;;
3493 *)
3494 # OSF1 and SCO ODT 3.0 have their own names for install.
3495 # Don't use installbsd from OSF since it installs stuff as root
3496 # by default.
3497 for ac_prog in ginstall scoinst install; do
3498 for ac_exec_ext in '' $ac_executable_extensions; do
3499 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3500 if test $ac_prog = install &&
3501 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3502 # AIX install. It has an incompatible calling convention.
3503 :
3504 elif test $ac_prog = install &&
3505 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3506 # program-specific install script used by HP pwplus--don't use.
3507 :
3508 else
3509 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3510 break 3
3511 fi
3512 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003513 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003514 done
3515 ;;
3516esac
3517done
3518
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003519
3520fi
3521 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003522 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003523 else
3524 # As a last resort, use the slow shell script. We don't cache a
3525 # path for INSTALL within a source directory, because that will
3526 # break other packages using the cache if that directory is
3527 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003528 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003529 fi
3530fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003531echo "$as_me:$LINENO: result: $INSTALL" >&5
3532echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003533
3534# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3535# It thinks the first close brace ends the variable substitution.
3536test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3537
Martin v. Löwis11437992002-04-12 09:54:03 +00003538test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003539
3540test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3541
Michael W. Hudson54241132001-12-07 15:38:26 +00003542
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003543# Not every filesystem supports hard links
3544
3545if test -z "$LN" ; then
3546 case $ac_sys_system in
3547 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003548 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003549 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003550 *) LN=ln;;
3551 esac
3552fi
3553
Fred Drake109d9862001-07-11 06:27:56 +00003554# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003555echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3556echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3557
Fred Drake109d9862001-07-11 06:27:56 +00003558# Check whether --with-pydebug or --without-pydebug was given.
3559if test "${with_pydebug+set}" = set; then
3560 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003561
Fred Drake109d9862001-07-11 06:27:56 +00003562if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003563then
3564
3565cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003566#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003567_ACEOF
3568
3569 echo "$as_me:$LINENO: result: yes" >&5
3570echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003571 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003572else echo "$as_me:$LINENO: result: no" >&5
3573echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003574fi
3575else
Martin v. Löwis11437992002-04-12 09:54:03 +00003576 echo "$as_me:$LINENO: result: no" >&5
3577echo "${ECHO_T}no" >&6
3578fi;
Fred Drake109d9862001-07-11 06:27:56 +00003579
Skip Montanarodecc6a42003-01-01 20:07:49 +00003580# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3581# merged with this chunk of code?
3582
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003583# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003584# ------------------------
3585# (The following bit of code is complicated enough - please keep things
3586# indented properly. Just pretend you're editing Python code. ;-)
3587
3588# There are two parallel sets of case statements below, one that checks to
3589# see if OPT was set and one that does BASECFLAGS setting based upon
3590# compiler and platform. BASECFLAGS tweaks need to be made even if the
3591# user set OPT.
3592
3593# tweak OPT based on compiler and platform, only if the user didn't set
3594# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003595
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003596if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003597then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003598 case $GCC in
3599 yes)
3600 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003601 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003602 if test "$Py_DEBUG" = 'true' ; then
3603 # Optimization messes up debuggers, so turn it off for
3604 # debug builds.
3605 OPT="-g -Wall -Wstrict-prototypes"
3606 else
3607 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003608 fi
3609 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003610 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003611 OPT="-O3 -Wall -Wstrict-prototypes"
3612 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003613 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003614 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003615 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3616 ;;
3617 esac
Fred Drake109d9862001-07-11 06:27:56 +00003618 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003619
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003620 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003621 OPT="-O"
3622 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003623 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003624
3625 # The current (beta) Monterey compiler dies with optimizations
3626 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003627 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003628 Monterey*)
3629 OPT=""
3630 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003631 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003632
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003633fi
3634
Skip Montanarodecc6a42003-01-01 20:07:49 +00003635
3636# tweak BASECFLAGS based on compiler and platform
3637case $GCC in
3638yes)
3639 case $ac_sys_system in
3640 SCO_SV*)
3641 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3642 ;;
3643 # is there any other compiler on Darwin besides gcc?
3644 Darwin*)
3645 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp"
3646 ;;
3647 esac
3648 ;;
3649
3650*)
3651 case $ac_sys_system in
3652 OpenUNIX*|UnixWare*)
3653 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3654 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00003655 OSF*)
3656 BASECFLAGS="$BASECFLAGS -ieee -std"
3657 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003658 SCO_SV*)
3659 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3660 ;;
3661 esac
3662 ;;
3663esac
3664
Fred Drakee1ceaa02001-12-04 20:55:47 +00003665if test "$Py_DEBUG" = 'true'; then
3666 :
3667else
3668 OPT="-DNDEBUG $OPT"
3669fi
3670
Guido van Rossum563e7081996-09-10 18:20:48 +00003671if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003672then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003673 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003674fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003675
Martin v. Löwis11437992002-04-12 09:54:03 +00003676echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3677echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3678if test "${ac_cv_opt_olimit_ok+set}" = set; then
3679 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003680else
3681 ac_save_cc="$CC"
3682CC="$CC -OPT:Olimit=0"
3683if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003684 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003685else
Martin v. Löwis11437992002-04-12 09:54:03 +00003686 cat >conftest.$ac_ext <<_ACEOF
3687#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003688#include "confdefs.h"
3689int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003690_ACEOF
3691rm -f conftest$ac_exeext
3692if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3693 (eval $ac_link) 2>&5
3694 ac_status=$?
3695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3696 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3698 (eval $ac_try) 2>&5
3699 ac_status=$?
3700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3701 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003702 ac_cv_opt_olimit_ok=yes
3703else
Martin v. Löwis11437992002-04-12 09:54:03 +00003704 echo "$as_me: program exited with status $ac_status" >&5
3705echo "$as_me: failed program was:" >&5
3706cat conftest.$ac_ext >&5
3707( exit $ac_status )
3708ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003709fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003710rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003711fi
Guido van Rossum91922671997-10-09 20:24:13 +00003712CC="$ac_save_cc"
3713fi
3714
Martin v. Löwis11437992002-04-12 09:54:03 +00003715echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3716echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003717if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003718 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003719 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3720 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3721 # environment?
3722 Darwin*)
3723 ;;
3724 *)
3725 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3726 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003727 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003728else
Martin v. Löwis11437992002-04-12 09:54:03 +00003729 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3730echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3731 if test "${ac_cv_olimit_ok+set}" = set; then
3732 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003733else
3734 ac_save_cc="$CC"
3735 CC="$CC -Olimit 1500"
3736 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003737 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003738else
Martin v. Löwis11437992002-04-12 09:54:03 +00003739 cat >conftest.$ac_ext <<_ACEOF
3740#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003741#include "confdefs.h"
3742int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003743_ACEOF
3744rm -f conftest$ac_exeext
3745if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3746 (eval $ac_link) 2>&5
3747 ac_status=$?
3748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3749 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3751 (eval $ac_try) 2>&5
3752 ac_status=$?
3753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3754 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003755 ac_cv_olimit_ok=yes
3756else
Martin v. Löwis11437992002-04-12 09:54:03 +00003757 echo "$as_me: program exited with status $ac_status" >&5
3758echo "$as_me: failed program was:" >&5
3759cat conftest.$ac_ext >&5
3760( exit $ac_status )
3761ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003762fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003763rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003764fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003765 CC="$ac_save_cc"
3766fi
3767
Martin v. Löwis11437992002-04-12 09:54:03 +00003768 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3769echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003770 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003771 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003772 fi
3773fi
3774
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003775# On some compilers, pthreads are available without further options
3776# (e.g. MacOS X). On some of these systems, the compiler will not
3777# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3778# So we have to see first whether pthreads are available without
3779# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003780echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3781echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3782if test "${ac_cv_pthread_is_default+set}" = set; then
3783 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003784else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003785 if test "$cross_compiling" = yes; then
3786 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003787else
Martin v. Löwis11437992002-04-12 09:54:03 +00003788 cat >conftest.$ac_ext <<_ACEOF
3789#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003790#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003791
Martin v. Löwis130fb172001-07-19 11:00:41 +00003792#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003793
3794void* routine(void* p){return NULL;}
3795
3796int main(){
3797 pthread_t p;
3798 if(pthread_create(&p,NULL,routine,NULL)!=0)
3799 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003800 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003801 return 0;
3802}
3803
Martin v. Löwis11437992002-04-12 09:54:03 +00003804_ACEOF
3805rm -f conftest$ac_exeext
3806if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3807 (eval $ac_link) 2>&5
3808 ac_status=$?
3809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3810 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3812 (eval $ac_try) 2>&5
3813 ac_status=$?
3814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3815 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003816 ac_cv_pthread_is_default=yes
3817else
Martin v. Löwis11437992002-04-12 09:54:03 +00003818 echo "$as_me: program exited with status $ac_status" >&5
3819echo "$as_me: failed program was:" >&5
3820cat conftest.$ac_ext >&5
3821( exit $ac_status )
3822ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003823fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003824rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003825fi
3826
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003827fi
3828
Martin v. Löwis11437992002-04-12 09:54:03 +00003829echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3830echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003831
Michael W. Hudson54241132001-12-07 15:38:26 +00003832
Martin v. Löwis11437992002-04-12 09:54:03 +00003833if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003834then
3835 ac_cv_kpthread=no
3836else
3837# -Kpthread, if available, provides the right #defines
3838# and linker options to make pthread_create available
3839# Some compilers won't report that they do not support -Kpthread,
3840# so we need to run a program to see whether it really made the
3841# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003842echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3843echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3844if test "${ac_cv_kpthread+set}" = set; then
3845 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003846else
3847 ac_save_cc="$CC"
3848CC="$CC -Kpthread"
3849if test "$cross_compiling" = yes; then
3850 ac_cv_kpthread=no
3851else
Martin v. Löwis11437992002-04-12 09:54:03 +00003852 cat >conftest.$ac_ext <<_ACEOF
3853#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003854#include "confdefs.h"
3855
3856#include <pthread.h>
3857
3858void* routine(void* p){return NULL;}
3859
3860int main(){
3861 pthread_t p;
3862 if(pthread_create(&p,NULL,routine,NULL)!=0)
3863 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003864 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003865 return 0;
3866}
3867
Martin v. Löwis11437992002-04-12 09:54:03 +00003868_ACEOF
3869rm -f conftest$ac_exeext
3870if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3871 (eval $ac_link) 2>&5
3872 ac_status=$?
3873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3874 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3875 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3876 (eval $ac_try) 2>&5
3877 ac_status=$?
3878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3879 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003880 ac_cv_kpthread=yes
3881else
Martin v. Löwis11437992002-04-12 09:54:03 +00003882 echo "$as_me: program exited with status $ac_status" >&5
3883echo "$as_me: failed program was:" >&5
3884cat conftest.$ac_ext >&5
3885( exit $ac_status )
3886ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003887fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003888rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003889fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003890CC="$ac_save_cc"
3891fi
3892
Martin v. Löwis11437992002-04-12 09:54:03 +00003893echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3894echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003895fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003896
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003897if test $ac_cv_kpthread = no
3898then
3899# -Kthread, if available, provides the right #defines
3900# and linker options to make pthread_create available
3901# Some compilers won't report that they do not support -Kthread,
3902# so we need to run a program to see whether it really made the
3903# function available.
3904echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
3905echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
3906if test "${ac_cv_kthread+set}" = set; then
3907 echo $ECHO_N "(cached) $ECHO_C" >&6
3908else
3909 ac_save_cc="$CC"
3910CC="$CC -Kthread"
3911if test "$cross_compiling" = yes; then
3912 ac_cv_kthread=no
3913else
3914 cat >conftest.$ac_ext <<_ACEOF
3915#line $LINENO "configure"
3916#include "confdefs.h"
3917
3918#include <pthread.h>
3919
3920void* routine(void* p){return NULL;}
3921
3922int main(){
3923 pthread_t p;
3924 if(pthread_create(&p,NULL,routine,NULL)!=0)
3925 return 1;
3926 (void)pthread_detach(p);
3927 return 0;
3928}
3929
3930_ACEOF
3931rm -f conftest$ac_exeext
3932if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3933 (eval $ac_link) 2>&5
3934 ac_status=$?
3935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3936 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3937 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3938 (eval $ac_try) 2>&5
3939 ac_status=$?
3940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3941 (exit $ac_status); }; }; then
3942 ac_cv_kthread=yes
3943else
3944 echo "$as_me: program exited with status $ac_status" >&5
3945echo "$as_me: failed program was:" >&5
3946cat conftest.$ac_ext >&5
3947( exit $ac_status )
3948ac_cv_kthread=no
3949fi
3950rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3951fi
3952CC="$ac_save_cc"
3953fi
3954
3955echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
3956echo "${ECHO_T}$ac_cv_kthread" >&6
3957fi
3958
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00003959if test $ac_cv_kthread = no
3960then
3961# -pthread, if available, provides the right #defines
3962# and linker options to make pthread_create available
3963# Some compilers won't report that they do not support -pthread,
3964# so we need to run a program to see whether it really made the
3965# function available.
3966echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
3967echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
3968if test "${ac_cv_thread+set}" = set; then
3969 echo $ECHO_N "(cached) $ECHO_C" >&6
3970else
3971 ac_save_cc="$CC"
3972CC="$CC -pthread"
3973if test "$cross_compiling" = yes; then
3974 ac_cv_pthread=no
3975else
3976 cat >conftest.$ac_ext <<_ACEOF
3977#line $LINENO "configure"
3978#include "confdefs.h"
3979
3980#include <pthread.h>
3981
3982void* routine(void* p){return NULL;}
3983
3984int main(){
3985 pthread_t p;
3986 if(pthread_create(&p,NULL,routine,NULL)!=0)
3987 return 1;
3988 (void)pthread_detach(p);
3989 return 0;
3990}
3991
3992_ACEOF
3993rm -f conftest$ac_exeext
3994if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3995 (eval $ac_link) 2>&5
3996 ac_status=$?
3997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3998 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3999 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4000 (eval $ac_try) 2>&5
4001 ac_status=$?
4002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4003 (exit $ac_status); }; }; then
4004 ac_cv_pthread=yes
4005else
4006 echo "$as_me: program exited with status $ac_status" >&5
4007echo "$as_me: failed program was:" >&5
4008cat conftest.$ac_ext >&5
4009( exit $ac_status )
4010ac_cv_pthread=no
4011fi
4012rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4013fi
4014CC="$ac_save_cc"
4015fi
4016
4017echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4018echo "${ECHO_T}$ac_cv_pthread" >&6
4019fi
4020
Michael W. Hudson54241132001-12-07 15:38:26 +00004021
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004022# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00004023echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4024echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4025if test "${ac_cv_header_stdc+set}" = set; then
4026 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004027else
Martin v. Löwis11437992002-04-12 09:54:03 +00004028 cat >conftest.$ac_ext <<_ACEOF
4029#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004030#include "confdefs.h"
4031#include <stdlib.h>
4032#include <stdarg.h>
4033#include <string.h>
4034#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004035
4036_ACEOF
4037if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4038 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4039 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004040 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004041 rm -f conftest.er1
4042 cat conftest.err >&5
4043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4044 (exit $ac_status); } >/dev/null; then
4045 if test -s conftest.err; then
4046 ac_cpp_err=$ac_c_preproc_warn_flag
4047 else
4048 ac_cpp_err=
4049 fi
4050else
4051 ac_cpp_err=yes
4052fi
4053if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004054 ac_cv_header_stdc=yes
4055else
Martin v. Löwis11437992002-04-12 09:54:03 +00004056 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00004057 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004058 ac_cv_header_stdc=no
4059fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004060rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004061
4062if test $ac_cv_header_stdc = yes; then
4063 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004064 cat >conftest.$ac_ext <<_ACEOF
4065#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004066#include "confdefs.h"
4067#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004068
4069_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004070if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00004071 egrep "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004072 :
4073else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004074 ac_cv_header_stdc=no
4075fi
4076rm -f conftest*
4077
4078fi
4079
4080if test $ac_cv_header_stdc = yes; then
4081 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004082 cat >conftest.$ac_ext <<_ACEOF
4083#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004084#include "confdefs.h"
4085#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004086
4087_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004088if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00004089 egrep "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004090 :
4091else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004092 ac_cv_header_stdc=no
4093fi
4094rm -f conftest*
4095
4096fi
4097
4098if test $ac_cv_header_stdc = yes; then
4099 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004100 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004101 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004102else
Martin v. Löwis11437992002-04-12 09:54:03 +00004103 cat >conftest.$ac_ext <<_ACEOF
4104#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004105#include "confdefs.h"
4106#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004107#if ((' ' & 0x0FF) == 0x020)
4108# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4109# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4110#else
4111# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4112 || ('j' <= (c) && (c) <= 'r') \
4113 || ('s' <= (c) && (c) <= 'z'))
4114# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4115#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004116
Martin v. Löwis11437992002-04-12 09:54:03 +00004117#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4118int
4119main ()
4120{
4121 int i;
4122 for (i = 0; i < 256; i++)
4123 if (XOR (islower (i), ISLOWER (i))
4124 || toupper (i) != TOUPPER (i))
4125 exit(2);
4126 exit (0);
4127}
4128_ACEOF
4129rm -f conftest$ac_exeext
4130if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4131 (eval $ac_link) 2>&5
4132 ac_status=$?
4133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4134 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4136 (eval $ac_try) 2>&5
4137 ac_status=$?
4138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4139 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004140 :
4141else
Martin v. Löwis11437992002-04-12 09:54:03 +00004142 echo "$as_me: program exited with status $ac_status" >&5
4143echo "$as_me: failed program was:" >&5
4144cat conftest.$ac_ext >&5
4145( exit $ac_status )
4146ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004147fi
Barry Warsawfe33b792003-01-07 22:42:49 +00004148rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004149fi
4150fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004151fi
4152echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4153echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004154if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004155
4156cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004157#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004158_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004159
4160fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004161
Martin v. Löwis11437992002-04-12 09:54:03 +00004162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004199
Barry Warsawfe33b792003-01-07 22:42:49 +00004200
Neal Norwitz82251032003-05-23 14:35:24 +00004201
Martin v. Löwis11437992002-04-12 09:54:03 +00004202for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004203libintl.h locale.h ncurses.h poll.h pthread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004204signal.h stdarg.h stddef.h stdlib.h stropts.h termios.h thread.h \
4205unistd.h utime.h \
Neal Norwitz82251032003-05-23 14:35:24 +00004206sys/audioio.h sys/bsdtty.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004207sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00004208sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Barry Warsawfe33b792003-01-07 22:42:49 +00004209sys/resource.h netpacket/packet.h sysexits.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004210do
Martin v. Löwis11437992002-04-12 09:54:03 +00004211as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4212if eval "test \"\${$as_ac_Header+set}\" = set"; then
4213 echo "$as_me:$LINENO: checking for $ac_header" >&5
4214echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4215if eval "test \"\${$as_ac_Header+set}\" = set"; then
4216 echo $ECHO_N "(cached) $ECHO_C" >&6
4217fi
4218echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4219echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004220else
Martin v. Löwis11437992002-04-12 09:54:03 +00004221 # Is the header compilable?
4222echo "$as_me:$LINENO: checking $ac_header usability" >&5
4223echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4224cat >conftest.$ac_ext <<_ACEOF
4225#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004226#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004227$ac_includes_default
4228#include <$ac_header>
4229_ACEOF
4230rm -f conftest.$ac_objext
4231if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4232 (eval $ac_compile) 2>&5
4233 ac_status=$?
4234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4235 (exit $ac_status); } &&
4236 { ac_try='test -s conftest.$ac_objext'
4237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4238 (eval $ac_try) 2>&5
4239 ac_status=$?
4240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4241 (exit $ac_status); }; }; then
4242 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004243else
Martin v. Löwis11437992002-04-12 09:54:03 +00004244 echo "$as_me: failed program was:" >&5
4245cat conftest.$ac_ext >&5
4246ac_header_compiler=no
4247fi
4248rm -f conftest.$ac_objext conftest.$ac_ext
4249echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4250echo "${ECHO_T}$ac_header_compiler" >&6
4251
4252# Is the header present?
4253echo "$as_me:$LINENO: checking $ac_header presence" >&5
4254echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4255cat >conftest.$ac_ext <<_ACEOF
4256#line $LINENO "configure"
4257#include "confdefs.h"
4258#include <$ac_header>
4259_ACEOF
4260if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4261 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4262 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004263 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004264 rm -f conftest.er1
4265 cat conftest.err >&5
4266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4267 (exit $ac_status); } >/dev/null; then
4268 if test -s conftest.err; then
4269 ac_cpp_err=$ac_c_preproc_warn_flag
4270 else
4271 ac_cpp_err=
4272 fi
4273else
4274 ac_cpp_err=yes
4275fi
4276if test -z "$ac_cpp_err"; then
4277 ac_header_preproc=yes
4278else
4279 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004280 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004281 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004282fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004283rm -f conftest.err conftest.$ac_ext
4284echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4285echo "${ECHO_T}$ac_header_preproc" >&6
4286
4287# So? What about this header?
4288case $ac_header_compiler:$ac_header_preproc in
4289 yes:no )
4290 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4291echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4292 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4293echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4294 no:yes )
4295 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4296echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4297 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4298echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4299 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4300echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4301esac
4302echo "$as_me:$LINENO: checking for $ac_header" >&5
4303echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4304if eval "test \"\${$as_ac_Header+set}\" = set"; then
4305 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004306else
Martin v. Löwis11437992002-04-12 09:54:03 +00004307 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004308fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004309echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4310echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4311
4312fi
4313if test `eval echo '${'$as_ac_Header'}'` = yes; then
4314 cat >>confdefs.h <<_ACEOF
4315#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4316_ACEOF
4317
4318fi
4319
Guido van Rossum627b2d71993-12-24 10:39:16 +00004320done
4321
Martin v. Löwis11437992002-04-12 09:54:03 +00004322
4323
4324
4325
4326
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004327ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004328for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4329 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4330echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4331echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4332if eval "test \"\${$as_ac_Header+set}\" = set"; then
4333 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004334else
Martin v. Löwis11437992002-04-12 09:54:03 +00004335 cat >conftest.$ac_ext <<_ACEOF
4336#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004337#include "confdefs.h"
4338#include <sys/types.h>
4339#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004340
Barry Warsawfe33b792003-01-07 22:42:49 +00004341#ifdef F77_DUMMY_MAIN
4342# ifdef __cplusplus
4343 extern "C"
4344# endif
4345 int F77_DUMMY_MAIN() { return 1; }
4346#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004347int
4348main ()
4349{
4350if ((DIR *) 0)
4351return 0;
4352 ;
4353 return 0;
4354}
4355_ACEOF
4356rm -f conftest.$ac_objext
4357if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4358 (eval $ac_compile) 2>&5
4359 ac_status=$?
4360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4361 (exit $ac_status); } &&
4362 { ac_try='test -s conftest.$ac_objext'
4363 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4364 (eval $ac_try) 2>&5
4365 ac_status=$?
4366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4367 (exit $ac_status); }; }; then
4368 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004369else
Martin v. Löwis11437992002-04-12 09:54:03 +00004370 echo "$as_me: failed program was:" >&5
4371cat conftest.$ac_ext >&5
4372eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004373fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004374rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004375fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004376echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4377echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4378if test `eval echo '${'$as_ac_Header'}'` = yes; then
4379 cat >>confdefs.h <<_ACEOF
4380#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4381_ACEOF
4382
4383ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004384fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004385
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004386done
4387# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4388if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004389 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4390echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4391if test "${ac_cv_search_opendir+set}" = set; then
4392 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004393else
Martin v. Löwis11437992002-04-12 09:54:03 +00004394 ac_func_search_save_LIBS=$LIBS
4395ac_cv_search_opendir=no
4396cat >conftest.$ac_ext <<_ACEOF
4397#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004398#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004399
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004400/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004401#ifdef __cplusplus
4402extern "C"
4403#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004404/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004405 builtin and then its argument prototype would still apply. */
4406char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004407#ifdef F77_DUMMY_MAIN
4408# ifdef __cplusplus
4409 extern "C"
4410# endif
4411 int F77_DUMMY_MAIN() { return 1; }
4412#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004413int
4414main ()
4415{
4416opendir ();
4417 ;
4418 return 0;
4419}
4420_ACEOF
4421rm -f conftest.$ac_objext conftest$ac_exeext
4422if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4423 (eval $ac_link) 2>&5
4424 ac_status=$?
4425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4426 (exit $ac_status); } &&
4427 { ac_try='test -s conftest$ac_exeext'
4428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4429 (eval $ac_try) 2>&5
4430 ac_status=$?
4431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4432 (exit $ac_status); }; }; then
4433 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004434else
Martin v. Löwis11437992002-04-12 09:54:03 +00004435 echo "$as_me: failed program was:" >&5
4436cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004437fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004438rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4439if test "$ac_cv_search_opendir" = no; then
4440 for ac_lib in dir; do
4441 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4442 cat >conftest.$ac_ext <<_ACEOF
4443#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004444#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004445
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004446/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004447#ifdef __cplusplus
4448extern "C"
4449#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004450/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004451 builtin and then its argument prototype would still apply. */
4452char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004453#ifdef F77_DUMMY_MAIN
4454# ifdef __cplusplus
4455 extern "C"
4456# endif
4457 int F77_DUMMY_MAIN() { return 1; }
4458#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004459int
4460main ()
4461{
4462opendir ();
4463 ;
4464 return 0;
4465}
4466_ACEOF
4467rm -f conftest.$ac_objext conftest$ac_exeext
4468if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4469 (eval $ac_link) 2>&5
4470 ac_status=$?
4471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4472 (exit $ac_status); } &&
4473 { ac_try='test -s conftest$ac_exeext'
4474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4475 (eval $ac_try) 2>&5
4476 ac_status=$?
4477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4478 (exit $ac_status); }; }; then
4479 ac_cv_search_opendir="-l$ac_lib"
4480break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004481else
Martin v. Löwis11437992002-04-12 09:54:03 +00004482 echo "$as_me: failed program was:" >&5
4483cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004484fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004485rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4486 done
4487fi
4488LIBS=$ac_func_search_save_LIBS
4489fi
4490echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4491echo "${ECHO_T}$ac_cv_search_opendir" >&6
4492if test "$ac_cv_search_opendir" != no; then
4493 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004494
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004495fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004496
Michael W. Hudson54241132001-12-07 15:38:26 +00004497else
Martin v. Löwis11437992002-04-12 09:54:03 +00004498 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4499echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4500if test "${ac_cv_search_opendir+set}" = set; then
4501 echo $ECHO_N "(cached) $ECHO_C" >&6
4502else
4503 ac_func_search_save_LIBS=$LIBS
4504ac_cv_search_opendir=no
4505cat >conftest.$ac_ext <<_ACEOF
4506#line $LINENO "configure"
4507#include "confdefs.h"
4508
4509/* Override any gcc2 internal prototype to avoid an error. */
4510#ifdef __cplusplus
4511extern "C"
4512#endif
4513/* We use char because int might match the return type of a gcc2
4514 builtin and then its argument prototype would still apply. */
4515char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004516#ifdef F77_DUMMY_MAIN
4517# ifdef __cplusplus
4518 extern "C"
4519# endif
4520 int F77_DUMMY_MAIN() { return 1; }
4521#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004522int
4523main ()
4524{
4525opendir ();
4526 ;
4527 return 0;
4528}
4529_ACEOF
4530rm -f conftest.$ac_objext conftest$ac_exeext
4531if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4532 (eval $ac_link) 2>&5
4533 ac_status=$?
4534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4535 (exit $ac_status); } &&
4536 { ac_try='test -s conftest$ac_exeext'
4537 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4538 (eval $ac_try) 2>&5
4539 ac_status=$?
4540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4541 (exit $ac_status); }; }; then
4542 ac_cv_search_opendir="none required"
4543else
4544 echo "$as_me: failed program was:" >&5
4545cat conftest.$ac_ext >&5
4546fi
4547rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4548if test "$ac_cv_search_opendir" = no; then
4549 for ac_lib in x; do
4550 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4551 cat >conftest.$ac_ext <<_ACEOF
4552#line $LINENO "configure"
4553#include "confdefs.h"
4554
4555/* Override any gcc2 internal prototype to avoid an error. */
4556#ifdef __cplusplus
4557extern "C"
4558#endif
4559/* We use char because int might match the return type of a gcc2
4560 builtin and then its argument prototype would still apply. */
4561char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004562#ifdef F77_DUMMY_MAIN
4563# ifdef __cplusplus
4564 extern "C"
4565# endif
4566 int F77_DUMMY_MAIN() { return 1; }
4567#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004568int
4569main ()
4570{
4571opendir ();
4572 ;
4573 return 0;
4574}
4575_ACEOF
4576rm -f conftest.$ac_objext conftest$ac_exeext
4577if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4578 (eval $ac_link) 2>&5
4579 ac_status=$?
4580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4581 (exit $ac_status); } &&
4582 { ac_try='test -s conftest$ac_exeext'
4583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4584 (eval $ac_try) 2>&5
4585 ac_status=$?
4586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4587 (exit $ac_status); }; }; then
4588 ac_cv_search_opendir="-l$ac_lib"
4589break
4590else
4591 echo "$as_me: failed program was:" >&5
4592cat conftest.$ac_ext >&5
4593fi
4594rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4595 done
4596fi
4597LIBS=$ac_func_search_save_LIBS
4598fi
4599echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4600echo "${ECHO_T}$ac_cv_search_opendir" >&6
4601if test "$ac_cv_search_opendir" != no; then
4602 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4603
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004604fi
4605
4606fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004607
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004608echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4609echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4610if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4611 echo $ECHO_N "(cached) $ECHO_C" >&6
4612else
4613 cat >conftest.$ac_ext <<_ACEOF
4614#line $LINENO "configure"
4615#include "confdefs.h"
4616#include <sys/types.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00004617#ifdef F77_DUMMY_MAIN
4618# ifdef __cplusplus
4619 extern "C"
4620# endif
4621 int F77_DUMMY_MAIN() { return 1; }
4622#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004623int
4624main ()
4625{
4626return makedev(0, 0);
4627 ;
4628 return 0;
4629}
4630_ACEOF
4631rm -f conftest.$ac_objext conftest$ac_exeext
4632if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4633 (eval $ac_link) 2>&5
4634 ac_status=$?
4635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4636 (exit $ac_status); } &&
4637 { ac_try='test -s conftest$ac_exeext'
4638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4639 (eval $ac_try) 2>&5
4640 ac_status=$?
4641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4642 (exit $ac_status); }; }; then
4643 ac_cv_header_sys_types_h_makedev=yes
4644else
4645 echo "$as_me: failed program was:" >&5
4646cat conftest.$ac_ext >&5
4647ac_cv_header_sys_types_h_makedev=no
4648fi
4649rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4650
4651fi
4652echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4653echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4654
4655if test $ac_cv_header_sys_types_h_makedev = no; then
4656if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4657 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4658echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4659if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4660 echo $ECHO_N "(cached) $ECHO_C" >&6
4661fi
4662echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4663echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4664else
4665 # Is the header compilable?
4666echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4667echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4668cat >conftest.$ac_ext <<_ACEOF
4669#line $LINENO "configure"
4670#include "confdefs.h"
4671$ac_includes_default
4672#include <sys/mkdev.h>
4673_ACEOF
4674rm -f conftest.$ac_objext
4675if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4676 (eval $ac_compile) 2>&5
4677 ac_status=$?
4678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4679 (exit $ac_status); } &&
4680 { ac_try='test -s conftest.$ac_objext'
4681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4682 (eval $ac_try) 2>&5
4683 ac_status=$?
4684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4685 (exit $ac_status); }; }; then
4686 ac_header_compiler=yes
4687else
4688 echo "$as_me: failed program was:" >&5
4689cat conftest.$ac_ext >&5
4690ac_header_compiler=no
4691fi
4692rm -f conftest.$ac_objext conftest.$ac_ext
4693echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4694echo "${ECHO_T}$ac_header_compiler" >&6
4695
4696# Is the header present?
4697echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4698echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4699cat >conftest.$ac_ext <<_ACEOF
4700#line $LINENO "configure"
4701#include "confdefs.h"
4702#include <sys/mkdev.h>
4703_ACEOF
4704if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4705 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4706 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004707 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004708 rm -f conftest.er1
4709 cat conftest.err >&5
4710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4711 (exit $ac_status); } >/dev/null; then
4712 if test -s conftest.err; then
4713 ac_cpp_err=$ac_c_preproc_warn_flag
4714 else
4715 ac_cpp_err=
4716 fi
4717else
4718 ac_cpp_err=yes
4719fi
4720if test -z "$ac_cpp_err"; then
4721 ac_header_preproc=yes
4722else
4723 echo "$as_me: failed program was:" >&5
4724 cat conftest.$ac_ext >&5
4725 ac_header_preproc=no
4726fi
4727rm -f conftest.err conftest.$ac_ext
4728echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4729echo "${ECHO_T}$ac_header_preproc" >&6
4730
4731# So? What about this header?
4732case $ac_header_compiler:$ac_header_preproc in
4733 yes:no )
4734 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4735echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4736 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4737echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4738 no:yes )
4739 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4740echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4741 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4742echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4743 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4744echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4745esac
4746echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4747echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4748if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4749 echo $ECHO_N "(cached) $ECHO_C" >&6
4750else
4751 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4752fi
4753echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4754echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4755
4756fi
4757if test $ac_cv_header_sys_mkdev_h = yes; then
4758
4759cat >>confdefs.h <<\_ACEOF
4760#define MAJOR_IN_MKDEV 1
4761_ACEOF
4762
4763fi
4764
4765
4766
4767 if test $ac_cv_header_sys_mkdev_h = no; then
4768 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4769 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4770echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4771if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4772 echo $ECHO_N "(cached) $ECHO_C" >&6
4773fi
4774echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4775echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4776else
4777 # Is the header compilable?
4778echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4779echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4780cat >conftest.$ac_ext <<_ACEOF
4781#line $LINENO "configure"
4782#include "confdefs.h"
4783$ac_includes_default
4784#include <sys/sysmacros.h>
4785_ACEOF
4786rm -f conftest.$ac_objext
4787if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4788 (eval $ac_compile) 2>&5
4789 ac_status=$?
4790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4791 (exit $ac_status); } &&
4792 { ac_try='test -s conftest.$ac_objext'
4793 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4794 (eval $ac_try) 2>&5
4795 ac_status=$?
4796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4797 (exit $ac_status); }; }; then
4798 ac_header_compiler=yes
4799else
4800 echo "$as_me: failed program was:" >&5
4801cat conftest.$ac_ext >&5
4802ac_header_compiler=no
4803fi
4804rm -f conftest.$ac_objext conftest.$ac_ext
4805echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4806echo "${ECHO_T}$ac_header_compiler" >&6
4807
4808# Is the header present?
4809echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
4810echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
4811cat >conftest.$ac_ext <<_ACEOF
4812#line $LINENO "configure"
4813#include "confdefs.h"
4814#include <sys/sysmacros.h>
4815_ACEOF
4816if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4817 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4818 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004819 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004820 rm -f conftest.er1
4821 cat conftest.err >&5
4822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4823 (exit $ac_status); } >/dev/null; then
4824 if test -s conftest.err; then
4825 ac_cpp_err=$ac_c_preproc_warn_flag
4826 else
4827 ac_cpp_err=
4828 fi
4829else
4830 ac_cpp_err=yes
4831fi
4832if test -z "$ac_cpp_err"; then
4833 ac_header_preproc=yes
4834else
4835 echo "$as_me: failed program was:" >&5
4836 cat conftest.$ac_ext >&5
4837 ac_header_preproc=no
4838fi
4839rm -f conftest.err conftest.$ac_ext
4840echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4841echo "${ECHO_T}$ac_header_preproc" >&6
4842
4843# So? What about this header?
4844case $ac_header_compiler:$ac_header_preproc in
4845 yes:no )
4846 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
4847echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4848 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4849echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4850 no:yes )
4851 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
4852echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
4853 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
4854echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
4855 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4856echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4857esac
4858echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4859echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4860if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4861 echo $ECHO_N "(cached) $ECHO_C" >&6
4862else
4863 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
4864fi
4865echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4866echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4867
4868fi
4869if test $ac_cv_header_sys_sysmacros_h = yes; then
4870
4871cat >>confdefs.h <<\_ACEOF
4872#define MAJOR_IN_SYSMACROS 1
4873_ACEOF
4874
4875fi
4876
4877
4878 fi
4879fi
4880
Michael W. Hudson54241132001-12-07 15:38:26 +00004881
Guido van Rossum627b2d71993-12-24 10:39:16 +00004882# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004883was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004884echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4885echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4886cat >conftest.$ac_ext <<_ACEOF
4887#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004888#include "confdefs.h"
4889#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004890
4891_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004892if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00004893 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004894 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004895else
Martin v. Löwis11437992002-04-12 09:54:03 +00004896
4897
4898cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004899#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004900_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004901
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004902
Guido van Rossum627b2d71993-12-24 10:39:16 +00004903fi
4904rm -f conftest*
4905
Martin v. Löwis11437992002-04-12 09:54:03 +00004906echo "$as_me:$LINENO: result: $was_it_defined" >&5
4907echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004908
Neal Norwitz11690112002-07-30 01:08:28 +00004909# Check whether using makedev requires defining _OSF_SOURCE
4910echo "$as_me:$LINENO: checking for makedev" >&5
4911echo $ECHO_N "checking for makedev... $ECHO_C" >&6
4912cat >conftest.$ac_ext <<_ACEOF
4913#line $LINENO "configure"
4914#include "confdefs.h"
Neal Norwitz6eb37f02003-02-23 23:28:15 +00004915#include <sys/types.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00004916#ifdef F77_DUMMY_MAIN
4917# ifdef __cplusplus
4918 extern "C"
4919# endif
4920 int F77_DUMMY_MAIN() { return 1; }
4921#endif
Neal Norwitz11690112002-07-30 01:08:28 +00004922int
4923main ()
4924{
4925 makedev(0, 0)
4926 ;
4927 return 0;
4928}
4929_ACEOF
4930rm -f conftest.$ac_objext conftest$ac_exeext
4931if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4932 (eval $ac_link) 2>&5
4933 ac_status=$?
4934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4935 (exit $ac_status); } &&
4936 { ac_try='test -s conftest$ac_exeext'
4937 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4938 (eval $ac_try) 2>&5
4939 ac_status=$?
4940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4941 (exit $ac_status); }; }; then
4942 ac_cv_has_makedev=yes
4943else
4944 echo "$as_me: failed program was:" >&5
4945cat conftest.$ac_ext >&5
4946ac_cv_has_makedev=no
4947fi
4948rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4949if test "$ac_cv_has_makedev" = "no"; then
4950 # we didn't link, try if _OSF_SOURCE will allow us to link
4951 cat >conftest.$ac_ext <<_ACEOF
4952#line $LINENO "configure"
4953#include "confdefs.h"
4954
Neal Norwitz6eb37f02003-02-23 23:28:15 +00004955#define _OSF_SOURCE 1
4956#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00004957
Barry Warsawfe33b792003-01-07 22:42:49 +00004958#ifdef F77_DUMMY_MAIN
4959# ifdef __cplusplus
4960 extern "C"
4961# endif
4962 int F77_DUMMY_MAIN() { return 1; }
4963#endif
Neal Norwitz11690112002-07-30 01:08:28 +00004964int
4965main ()
4966{
4967 makedev(0, 0)
4968 ;
4969 return 0;
4970}
4971_ACEOF
4972rm -f conftest.$ac_objext conftest$ac_exeext
4973if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4974 (eval $ac_link) 2>&5
4975 ac_status=$?
4976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4977 (exit $ac_status); } &&
4978 { ac_try='test -s conftest$ac_exeext'
4979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4980 (eval $ac_try) 2>&5
4981 ac_status=$?
4982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4983 (exit $ac_status); }; }; then
4984 ac_cv_has_makedev=yes
4985else
4986 echo "$as_me: failed program was:" >&5
4987cat conftest.$ac_ext >&5
4988ac_cv_has_makedev=no
4989fi
4990rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4991 if test "$ac_cv_has_makedev" = "yes"; then
4992
4993cat >>confdefs.h <<\_ACEOF
4994#define _OSF_SOURCE 1
4995_ACEOF
4996
4997 fi
4998fi
4999echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
5000echo "${ECHO_T}$ac_cv_has_makedev" >&6
5001if test "$ac_cv_has_makedev" = "yes"; then
5002
5003cat >>confdefs.h <<\_ACEOF
5004#define HAVE_MAKEDEV 1
5005_ACEOF
5006
5007fi
5008
Martin v. Löwis399a6892002-10-04 10:22:02 +00005009# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5010# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5011# defined, but the compiler does not support pragma redefine_extname,
5012# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5013# structures (such as rlimit64) without declaring them. As a
5014# work-around, disable LFS on such configurations
5015
5016use_lfs=yes
5017echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5018echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
5019cat >conftest.$ac_ext <<_ACEOF
5020#line $LINENO "configure"
5021#include "confdefs.h"
5022
5023#define _LARGEFILE_SOURCE 1
5024#define _FILE_OFFSET_BITS 64
5025#include <sys/resource.h>
5026
Barry Warsawfe33b792003-01-07 22:42:49 +00005027#ifdef F77_DUMMY_MAIN
5028# ifdef __cplusplus
5029 extern "C"
5030# endif
5031 int F77_DUMMY_MAIN() { return 1; }
5032#endif
Martin v. Löwis399a6892002-10-04 10:22:02 +00005033int
5034main ()
5035{
5036struct rlimit foo;
5037 ;
5038 return 0;
5039}
5040_ACEOF
5041rm -f conftest.$ac_objext
5042if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5043 (eval $ac_compile) 2>&5
5044 ac_status=$?
5045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5046 (exit $ac_status); } &&
5047 { ac_try='test -s conftest.$ac_objext'
5048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5049 (eval $ac_try) 2>&5
5050 ac_status=$?
5051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5052 (exit $ac_status); }; }; then
5053 sol_lfs_bug=no
5054else
5055 echo "$as_me: failed program was:" >&5
5056cat conftest.$ac_ext >&5
5057sol_lfs_bug=yes
5058fi
5059rm -f conftest.$ac_objext conftest.$ac_ext
5060echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5061echo "${ECHO_T}$sol_lfs_bug" >&6
5062if test "$sol_lfs_bug" = "yes"; then
5063 use_lfs=no
5064fi
5065
5066if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005067# Two defines needed to enable largefile support on various platforms
5068# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005069
Martin v. Löwis11437992002-04-12 09:54:03 +00005070cat >>confdefs.h <<\_ACEOF
5071#define _LARGEFILE_SOURCE 1
5072_ACEOF
5073
5074
5075cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005076#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005077_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005078
Martin v. Löwis399a6892002-10-04 10:22:02 +00005079fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005080
Guido van Rossum84e7b241996-08-19 21:59:00 +00005081# Add some code to confdefs.h so that the test for off_t works on SCO
5082cat >> confdefs.h <<\EOF
5083#if defined(SCO_DS)
5084#undef _OFF_T
5085#endif
5086EOF
5087
Guido van Rossumef2255b2000-03-10 22:30:29 +00005088# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005089echo "$as_me:$LINENO: checking for mode_t" >&5
5090echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5091if test "${ac_cv_type_mode_t+set}" = set; then
5092 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005093else
Martin v. Löwis11437992002-04-12 09:54:03 +00005094 cat >conftest.$ac_ext <<_ACEOF
5095#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005096#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005097$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005098#ifdef F77_DUMMY_MAIN
5099# ifdef __cplusplus
5100 extern "C"
5101# endif
5102 int F77_DUMMY_MAIN() { return 1; }
5103#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005104int
5105main ()
5106{
5107if ((mode_t *) 0)
5108 return 0;
5109if (sizeof (mode_t))
5110 return 0;
5111 ;
5112 return 0;
5113}
5114_ACEOF
5115rm -f conftest.$ac_objext
5116if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5117 (eval $ac_compile) 2>&5
5118 ac_status=$?
5119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5120 (exit $ac_status); } &&
5121 { ac_try='test -s conftest.$ac_objext'
5122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5123 (eval $ac_try) 2>&5
5124 ac_status=$?
5125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5126 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005127 ac_cv_type_mode_t=yes
5128else
Martin v. Löwis11437992002-04-12 09:54:03 +00005129 echo "$as_me: failed program was:" >&5
5130cat conftest.$ac_ext >&5
5131ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005132fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005133rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005134fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005135echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5136echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5137if test $ac_cv_type_mode_t = yes; then
5138 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005139else
Martin v. Löwis11437992002-04-12 09:54:03 +00005140
5141cat >>confdefs.h <<_ACEOF
5142#define mode_t int
5143_ACEOF
5144
5145fi
5146
5147echo "$as_me:$LINENO: checking for off_t" >&5
5148echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5149if test "${ac_cv_type_off_t+set}" = set; then
5150 echo $ECHO_N "(cached) $ECHO_C" >&6
5151else
5152 cat >conftest.$ac_ext <<_ACEOF
5153#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005154#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005155$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005156#ifdef F77_DUMMY_MAIN
5157# ifdef __cplusplus
5158 extern "C"
5159# endif
5160 int F77_DUMMY_MAIN() { return 1; }
5161#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005162int
5163main ()
5164{
5165if ((off_t *) 0)
5166 return 0;
5167if (sizeof (off_t))
5168 return 0;
5169 ;
5170 return 0;
5171}
5172_ACEOF
5173rm -f conftest.$ac_objext
5174if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5175 (eval $ac_compile) 2>&5
5176 ac_status=$?
5177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5178 (exit $ac_status); } &&
5179 { ac_try='test -s conftest.$ac_objext'
5180 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5181 (eval $ac_try) 2>&5
5182 ac_status=$?
5183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5184 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005185 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005186else
Martin v. Löwis11437992002-04-12 09:54:03 +00005187 echo "$as_me: failed program was:" >&5
5188cat conftest.$ac_ext >&5
5189ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005190fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005191rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005192fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005193echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5194echo "${ECHO_T}$ac_cv_type_off_t" >&6
5195if test $ac_cv_type_off_t = yes; then
5196 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005197else
Martin v. Löwis11437992002-04-12 09:54:03 +00005198
5199cat >>confdefs.h <<_ACEOF
5200#define off_t long
5201_ACEOF
5202
5203fi
5204
5205echo "$as_me:$LINENO: checking for pid_t" >&5
5206echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5207if test "${ac_cv_type_pid_t+set}" = set; then
5208 echo $ECHO_N "(cached) $ECHO_C" >&6
5209else
5210 cat >conftest.$ac_ext <<_ACEOF
5211#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005212#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005213$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005214#ifdef F77_DUMMY_MAIN
5215# ifdef __cplusplus
5216 extern "C"
5217# endif
5218 int F77_DUMMY_MAIN() { return 1; }
5219#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005220int
5221main ()
5222{
5223if ((pid_t *) 0)
5224 return 0;
5225if (sizeof (pid_t))
5226 return 0;
5227 ;
5228 return 0;
5229}
5230_ACEOF
5231rm -f conftest.$ac_objext
5232if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5233 (eval $ac_compile) 2>&5
5234 ac_status=$?
5235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5236 (exit $ac_status); } &&
5237 { ac_try='test -s conftest.$ac_objext'
5238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5239 (eval $ac_try) 2>&5
5240 ac_status=$?
5241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5242 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005243 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005244else
Martin v. Löwis11437992002-04-12 09:54:03 +00005245 echo "$as_me: failed program was:" >&5
5246cat conftest.$ac_ext >&5
5247ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005248fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005249rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005250fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005251echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5252echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5253if test $ac_cv_type_pid_t = yes; then
5254 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005255else
Martin v. Löwis11437992002-04-12 09:54:03 +00005256
5257cat >>confdefs.h <<_ACEOF
5258#define pid_t int
5259_ACEOF
5260
5261fi
5262
5263echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5264echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5265if test "${ac_cv_type_signal+set}" = set; then
5266 echo $ECHO_N "(cached) $ECHO_C" >&6
5267else
5268 cat >conftest.$ac_ext <<_ACEOF
5269#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005270#include "confdefs.h"
5271#include <sys/types.h>
5272#include <signal.h>
5273#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005274# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005275#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005276#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005277extern "C" void (*signal (int, void (*)(int)))(int);
5278#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005279void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005280#endif
5281
Barry Warsawfe33b792003-01-07 22:42:49 +00005282#ifdef F77_DUMMY_MAIN
5283# ifdef __cplusplus
5284 extern "C"
5285# endif
5286 int F77_DUMMY_MAIN() { return 1; }
5287#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005288int
5289main ()
5290{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005291int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005292 ;
5293 return 0;
5294}
5295_ACEOF
5296rm -f conftest.$ac_objext
5297if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5298 (eval $ac_compile) 2>&5
5299 ac_status=$?
5300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5301 (exit $ac_status); } &&
5302 { ac_try='test -s conftest.$ac_objext'
5303 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5304 (eval $ac_try) 2>&5
5305 ac_status=$?
5306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5307 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005308 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005309else
Martin v. Löwis11437992002-04-12 09:54:03 +00005310 echo "$as_me: failed program was:" >&5
5311cat conftest.$ac_ext >&5
5312ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005313fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005314rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005315fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005316echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5317echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005318
Martin v. Löwis11437992002-04-12 09:54:03 +00005319cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005320#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005321_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005322
Michael W. Hudson54241132001-12-07 15:38:26 +00005323
Martin v. Löwis11437992002-04-12 09:54:03 +00005324echo "$as_me:$LINENO: checking for size_t" >&5
5325echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5326if test "${ac_cv_type_size_t+set}" = set; then
5327 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005328else
Martin v. Löwis11437992002-04-12 09:54:03 +00005329 cat >conftest.$ac_ext <<_ACEOF
5330#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005331#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005332$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005333#ifdef F77_DUMMY_MAIN
5334# ifdef __cplusplus
5335 extern "C"
5336# endif
5337 int F77_DUMMY_MAIN() { return 1; }
5338#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005339int
5340main ()
5341{
5342if ((size_t *) 0)
5343 return 0;
5344if (sizeof (size_t))
5345 return 0;
5346 ;
5347 return 0;
5348}
5349_ACEOF
5350rm -f conftest.$ac_objext
5351if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5352 (eval $ac_compile) 2>&5
5353 ac_status=$?
5354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5355 (exit $ac_status); } &&
5356 { ac_try='test -s conftest.$ac_objext'
5357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5358 (eval $ac_try) 2>&5
5359 ac_status=$?
5360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5361 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005362 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005363else
Martin v. Löwis11437992002-04-12 09:54:03 +00005364 echo "$as_me: failed program was:" >&5
5365cat conftest.$ac_ext >&5
5366ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005367fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005368rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005369fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005370echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5371echo "${ECHO_T}$ac_cv_type_size_t" >&6
5372if test $ac_cv_type_size_t = yes; then
5373 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005374else
Martin v. Löwis11437992002-04-12 09:54:03 +00005375
5376cat >>confdefs.h <<_ACEOF
5377#define size_t unsigned
5378_ACEOF
5379
5380fi
5381
5382echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5383echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5384if test "${ac_cv_type_uid_t+set}" = set; then
5385 echo $ECHO_N "(cached) $ECHO_C" >&6
5386else
5387 cat >conftest.$ac_ext <<_ACEOF
5388#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005389#include "confdefs.h"
5390#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005391
5392_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005393if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00005394 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005395 ac_cv_type_uid_t=yes
5396else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005397 ac_cv_type_uid_t=no
5398fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005399rm -f conftest*
5400
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005401fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005402echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5403echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005404if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005405
Martin v. Löwis11437992002-04-12 09:54:03 +00005406cat >>confdefs.h <<\_ACEOF
5407#define uid_t int
5408_ACEOF
5409
5410
5411cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005412#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005413_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005414
5415fi
5416
Jack Jansendd19cf82001-12-06 22:36:17 +00005417
Michael W. Hudson54241132001-12-07 15:38:26 +00005418# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00005419echo "$as_me:$LINENO: checking for int" >&5
5420echo $ECHO_N "checking for int... $ECHO_C" >&6
5421if test "${ac_cv_type_int+set}" = set; then
5422 echo $ECHO_N "(cached) $ECHO_C" >&6
5423else
5424 cat >conftest.$ac_ext <<_ACEOF
5425#line $LINENO "configure"
5426#include "confdefs.h"
5427$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005428#ifdef F77_DUMMY_MAIN
5429# ifdef __cplusplus
5430 extern "C"
5431# endif
5432 int F77_DUMMY_MAIN() { return 1; }
5433#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005434int
5435main ()
5436{
5437if ((int *) 0)
5438 return 0;
5439if (sizeof (int))
5440 return 0;
5441 ;
5442 return 0;
5443}
5444_ACEOF
5445rm -f conftest.$ac_objext
5446if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5447 (eval $ac_compile) 2>&5
5448 ac_status=$?
5449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5450 (exit $ac_status); } &&
5451 { ac_try='test -s conftest.$ac_objext'
5452 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5453 (eval $ac_try) 2>&5
5454 ac_status=$?
5455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5456 (exit $ac_status); }; }; then
5457 ac_cv_type_int=yes
5458else
5459 echo "$as_me: failed program was:" >&5
5460cat conftest.$ac_ext >&5
5461ac_cv_type_int=no
5462fi
5463rm -f conftest.$ac_objext conftest.$ac_ext
5464fi
5465echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5466echo "${ECHO_T}$ac_cv_type_int" >&6
5467
5468echo "$as_me:$LINENO: checking size of int" >&5
5469echo $ECHO_N "checking size of int... $ECHO_C" >&6
5470if test "${ac_cv_sizeof_int+set}" = set; then
5471 echo $ECHO_N "(cached) $ECHO_C" >&6
5472else
5473 if test "$ac_cv_type_int" = yes; then
5474 # The cast to unsigned long works around a bug in the HP C Compiler
5475 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5476 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5477 # This bug is HP SR number 8606223364.
5478 if test "$cross_compiling" = yes; then
5479 # Depending upon the size, compute the lo and hi bounds.
5480cat >conftest.$ac_ext <<_ACEOF
5481#line $LINENO "configure"
5482#include "confdefs.h"
5483$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005484#ifdef F77_DUMMY_MAIN
5485# ifdef __cplusplus
5486 extern "C"
5487# endif
5488 int F77_DUMMY_MAIN() { return 1; }
5489#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005490int
5491main ()
5492{
5493static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5494test_array [0] = 0
5495
5496 ;
5497 return 0;
5498}
5499_ACEOF
5500rm -f conftest.$ac_objext
5501if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5502 (eval $ac_compile) 2>&5
5503 ac_status=$?
5504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5505 (exit $ac_status); } &&
5506 { ac_try='test -s conftest.$ac_objext'
5507 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5508 (eval $ac_try) 2>&5
5509 ac_status=$?
5510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5511 (exit $ac_status); }; }; then
5512 ac_lo=0 ac_mid=0
5513 while :; do
5514 cat >conftest.$ac_ext <<_ACEOF
5515#line $LINENO "configure"
5516#include "confdefs.h"
5517$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005518#ifdef F77_DUMMY_MAIN
5519# ifdef __cplusplus
5520 extern "C"
5521# endif
5522 int F77_DUMMY_MAIN() { return 1; }
5523#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005524int
5525main ()
5526{
5527static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5528test_array [0] = 0
5529
5530 ;
5531 return 0;
5532}
5533_ACEOF
5534rm -f conftest.$ac_objext
5535if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5536 (eval $ac_compile) 2>&5
5537 ac_status=$?
5538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5539 (exit $ac_status); } &&
5540 { ac_try='test -s conftest.$ac_objext'
5541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5542 (eval $ac_try) 2>&5
5543 ac_status=$?
5544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5545 (exit $ac_status); }; }; then
5546 ac_hi=$ac_mid; break
5547else
5548 echo "$as_me: failed program was:" >&5
5549cat conftest.$ac_ext >&5
5550ac_lo=`expr $ac_mid + 1`
5551 if test $ac_lo -le $ac_mid; then
5552 ac_lo= ac_hi=
5553 break
5554 fi
5555 ac_mid=`expr 2 '*' $ac_mid + 1`
5556fi
5557rm -f conftest.$ac_objext conftest.$ac_ext
5558 done
5559else
5560 echo "$as_me: failed program was:" >&5
5561cat conftest.$ac_ext >&5
5562cat >conftest.$ac_ext <<_ACEOF
5563#line $LINENO "configure"
5564#include "confdefs.h"
5565$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005566#ifdef F77_DUMMY_MAIN
5567# ifdef __cplusplus
5568 extern "C"
5569# endif
5570 int F77_DUMMY_MAIN() { return 1; }
5571#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005572int
5573main ()
5574{
5575static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5576test_array [0] = 0
5577
5578 ;
5579 return 0;
5580}
5581_ACEOF
5582rm -f conftest.$ac_objext
5583if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5584 (eval $ac_compile) 2>&5
5585 ac_status=$?
5586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5587 (exit $ac_status); } &&
5588 { ac_try='test -s conftest.$ac_objext'
5589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5590 (eval $ac_try) 2>&5
5591 ac_status=$?
5592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5593 (exit $ac_status); }; }; then
5594 ac_hi=-1 ac_mid=-1
5595 while :; do
5596 cat >conftest.$ac_ext <<_ACEOF
5597#line $LINENO "configure"
5598#include "confdefs.h"
5599$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005600#ifdef F77_DUMMY_MAIN
5601# ifdef __cplusplus
5602 extern "C"
5603# endif
5604 int F77_DUMMY_MAIN() { return 1; }
5605#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005606int
5607main ()
5608{
5609static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5610test_array [0] = 0
5611
5612 ;
5613 return 0;
5614}
5615_ACEOF
5616rm -f conftest.$ac_objext
5617if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5618 (eval $ac_compile) 2>&5
5619 ac_status=$?
5620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5621 (exit $ac_status); } &&
5622 { ac_try='test -s conftest.$ac_objext'
5623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5624 (eval $ac_try) 2>&5
5625 ac_status=$?
5626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5627 (exit $ac_status); }; }; then
5628 ac_lo=$ac_mid; break
5629else
5630 echo "$as_me: failed program was:" >&5
5631cat conftest.$ac_ext >&5
5632ac_hi=`expr '(' $ac_mid ')' - 1`
5633 if test $ac_mid -le $ac_hi; then
5634 ac_lo= ac_hi=
5635 break
5636 fi
5637 ac_mid=`expr 2 '*' $ac_mid`
5638fi
5639rm -f conftest.$ac_objext conftest.$ac_ext
5640 done
5641else
5642 echo "$as_me: failed program was:" >&5
5643cat conftest.$ac_ext >&5
5644ac_lo= ac_hi=
5645fi
5646rm -f conftest.$ac_objext conftest.$ac_ext
5647fi
5648rm -f conftest.$ac_objext conftest.$ac_ext
5649# Binary search between lo and hi bounds.
5650while test "x$ac_lo" != "x$ac_hi"; do
5651 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5652 cat >conftest.$ac_ext <<_ACEOF
5653#line $LINENO "configure"
5654#include "confdefs.h"
5655$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005656#ifdef F77_DUMMY_MAIN
5657# ifdef __cplusplus
5658 extern "C"
5659# endif
5660 int F77_DUMMY_MAIN() { return 1; }
5661#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005662int
5663main ()
5664{
5665static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5666test_array [0] = 0
5667
5668 ;
5669 return 0;
5670}
5671_ACEOF
5672rm -f conftest.$ac_objext
5673if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5674 (eval $ac_compile) 2>&5
5675 ac_status=$?
5676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5677 (exit $ac_status); } &&
5678 { ac_try='test -s conftest.$ac_objext'
5679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5680 (eval $ac_try) 2>&5
5681 ac_status=$?
5682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5683 (exit $ac_status); }; }; then
5684 ac_hi=$ac_mid
5685else
5686 echo "$as_me: failed program was:" >&5
5687cat conftest.$ac_ext >&5
5688ac_lo=`expr '(' $ac_mid ')' + 1`
5689fi
5690rm -f conftest.$ac_objext conftest.$ac_ext
5691done
5692case $ac_lo in
5693?*) ac_cv_sizeof_int=$ac_lo;;
5694'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5695echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5696 { (exit 1); exit 1; }; } ;;
5697esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005698else
5699 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005700 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5701echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5702 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005703else
Martin v. Löwis11437992002-04-12 09:54:03 +00005704 cat >conftest.$ac_ext <<_ACEOF
5705#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005706#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005707$ac_includes_default
5708long longval () { return (long) (sizeof (int)); }
5709unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005710#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005711#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00005712#ifdef F77_DUMMY_MAIN
5713# ifdef __cplusplus
5714 extern "C"
5715# endif
5716 int F77_DUMMY_MAIN() { return 1; }
5717#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005718int
5719main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005720{
Martin v. Löwis11437992002-04-12 09:54:03 +00005721
5722 FILE *f = fopen ("conftest.val", "w");
5723 if (! f)
5724 exit (1);
5725 if (((long) (sizeof (int))) < 0)
5726 {
5727 long i = longval ();
5728 if (i != ((long) (sizeof (int))))
5729 exit (1);
5730 fprintf (f, "%ld\n", i);
5731 }
5732 else
5733 {
5734 unsigned long i = ulongval ();
5735 if (i != ((long) (sizeof (int))))
5736 exit (1);
5737 fprintf (f, "%lu\n", i);
5738 }
5739 exit (ferror (f) || fclose (f) != 0);
5740
5741 ;
5742 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005743}
Martin v. Löwis11437992002-04-12 09:54:03 +00005744_ACEOF
5745rm -f conftest$ac_exeext
5746if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5747 (eval $ac_link) 2>&5
5748 ac_status=$?
5749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5750 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5751 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5752 (eval $ac_try) 2>&5
5753 ac_status=$?
5754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5755 (exit $ac_status); }; }; then
5756 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005757else
Martin v. Löwis11437992002-04-12 09:54:03 +00005758 echo "$as_me: program exited with status $ac_status" >&5
5759echo "$as_me: failed program was:" >&5
5760cat conftest.$ac_ext >&5
5761( exit $ac_status )
5762{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5763echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5764 { (exit 1); exit 1; }; }
5765fi
Barry Warsawfe33b792003-01-07 22:42:49 +00005766rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005767fi
5768fi
5769rm -f conftest.val
5770else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005771 ac_cv_sizeof_int=0
5772fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005773fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005774echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5775echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5776cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005777#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005778_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005779
5780
Martin v. Löwis11437992002-04-12 09:54:03 +00005781echo "$as_me:$LINENO: checking for long" >&5
5782echo $ECHO_N "checking for long... $ECHO_C" >&6
5783if test "${ac_cv_type_long+set}" = set; then
5784 echo $ECHO_N "(cached) $ECHO_C" >&6
5785else
5786 cat >conftest.$ac_ext <<_ACEOF
5787#line $LINENO "configure"
5788#include "confdefs.h"
5789$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005790#ifdef F77_DUMMY_MAIN
5791# ifdef __cplusplus
5792 extern "C"
5793# endif
5794 int F77_DUMMY_MAIN() { return 1; }
5795#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005796int
5797main ()
5798{
5799if ((long *) 0)
5800 return 0;
5801if (sizeof (long))
5802 return 0;
5803 ;
5804 return 0;
5805}
5806_ACEOF
5807rm -f conftest.$ac_objext
5808if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5809 (eval $ac_compile) 2>&5
5810 ac_status=$?
5811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5812 (exit $ac_status); } &&
5813 { ac_try='test -s conftest.$ac_objext'
5814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5815 (eval $ac_try) 2>&5
5816 ac_status=$?
5817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5818 (exit $ac_status); }; }; then
5819 ac_cv_type_long=yes
5820else
5821 echo "$as_me: failed program was:" >&5
5822cat conftest.$ac_ext >&5
5823ac_cv_type_long=no
5824fi
5825rm -f conftest.$ac_objext conftest.$ac_ext
5826fi
5827echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5828echo "${ECHO_T}$ac_cv_type_long" >&6
5829
5830echo "$as_me:$LINENO: checking size of long" >&5
5831echo $ECHO_N "checking size of long... $ECHO_C" >&6
5832if test "${ac_cv_sizeof_long+set}" = set; then
5833 echo $ECHO_N "(cached) $ECHO_C" >&6
5834else
5835 if test "$ac_cv_type_long" = yes; then
5836 # The cast to unsigned long works around a bug in the HP C Compiler
5837 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5838 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5839 # This bug is HP SR number 8606223364.
5840 if test "$cross_compiling" = yes; then
5841 # Depending upon the size, compute the lo and hi bounds.
5842cat >conftest.$ac_ext <<_ACEOF
5843#line $LINENO "configure"
5844#include "confdefs.h"
5845$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005846#ifdef F77_DUMMY_MAIN
5847# ifdef __cplusplus
5848 extern "C"
5849# endif
5850 int F77_DUMMY_MAIN() { return 1; }
5851#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005852int
5853main ()
5854{
5855static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5856test_array [0] = 0
5857
5858 ;
5859 return 0;
5860}
5861_ACEOF
5862rm -f conftest.$ac_objext
5863if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5864 (eval $ac_compile) 2>&5
5865 ac_status=$?
5866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5867 (exit $ac_status); } &&
5868 { ac_try='test -s conftest.$ac_objext'
5869 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5870 (eval $ac_try) 2>&5
5871 ac_status=$?
5872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5873 (exit $ac_status); }; }; then
5874 ac_lo=0 ac_mid=0
5875 while :; do
5876 cat >conftest.$ac_ext <<_ACEOF
5877#line $LINENO "configure"
5878#include "confdefs.h"
5879$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005880#ifdef F77_DUMMY_MAIN
5881# ifdef __cplusplus
5882 extern "C"
5883# endif
5884 int F77_DUMMY_MAIN() { return 1; }
5885#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005886int
5887main ()
5888{
5889static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5890test_array [0] = 0
5891
5892 ;
5893 return 0;
5894}
5895_ACEOF
5896rm -f conftest.$ac_objext
5897if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5898 (eval $ac_compile) 2>&5
5899 ac_status=$?
5900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5901 (exit $ac_status); } &&
5902 { ac_try='test -s conftest.$ac_objext'
5903 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5904 (eval $ac_try) 2>&5
5905 ac_status=$?
5906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5907 (exit $ac_status); }; }; then
5908 ac_hi=$ac_mid; break
5909else
5910 echo "$as_me: failed program was:" >&5
5911cat conftest.$ac_ext >&5
5912ac_lo=`expr $ac_mid + 1`
5913 if test $ac_lo -le $ac_mid; then
5914 ac_lo= ac_hi=
5915 break
5916 fi
5917 ac_mid=`expr 2 '*' $ac_mid + 1`
5918fi
5919rm -f conftest.$ac_objext conftest.$ac_ext
5920 done
5921else
5922 echo "$as_me: failed program was:" >&5
5923cat conftest.$ac_ext >&5
5924cat >conftest.$ac_ext <<_ACEOF
5925#line $LINENO "configure"
5926#include "confdefs.h"
5927$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005928#ifdef F77_DUMMY_MAIN
5929# ifdef __cplusplus
5930 extern "C"
5931# endif
5932 int F77_DUMMY_MAIN() { return 1; }
5933#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005934int
5935main ()
5936{
5937static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5938test_array [0] = 0
5939
5940 ;
5941 return 0;
5942}
5943_ACEOF
5944rm -f conftest.$ac_objext
5945if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5946 (eval $ac_compile) 2>&5
5947 ac_status=$?
5948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5949 (exit $ac_status); } &&
5950 { ac_try='test -s conftest.$ac_objext'
5951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5952 (eval $ac_try) 2>&5
5953 ac_status=$?
5954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5955 (exit $ac_status); }; }; then
5956 ac_hi=-1 ac_mid=-1
5957 while :; do
5958 cat >conftest.$ac_ext <<_ACEOF
5959#line $LINENO "configure"
5960#include "confdefs.h"
5961$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005962#ifdef F77_DUMMY_MAIN
5963# ifdef __cplusplus
5964 extern "C"
5965# endif
5966 int F77_DUMMY_MAIN() { return 1; }
5967#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005968int
5969main ()
5970{
5971static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5972test_array [0] = 0
5973
5974 ;
5975 return 0;
5976}
5977_ACEOF
5978rm -f conftest.$ac_objext
5979if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5980 (eval $ac_compile) 2>&5
5981 ac_status=$?
5982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5983 (exit $ac_status); } &&
5984 { ac_try='test -s conftest.$ac_objext'
5985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5986 (eval $ac_try) 2>&5
5987 ac_status=$?
5988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5989 (exit $ac_status); }; }; then
5990 ac_lo=$ac_mid; break
5991else
5992 echo "$as_me: failed program was:" >&5
5993cat conftest.$ac_ext >&5
5994ac_hi=`expr '(' $ac_mid ')' - 1`
5995 if test $ac_mid -le $ac_hi; then
5996 ac_lo= ac_hi=
5997 break
5998 fi
5999 ac_mid=`expr 2 '*' $ac_mid`
6000fi
6001rm -f conftest.$ac_objext conftest.$ac_ext
6002 done
6003else
6004 echo "$as_me: failed program was:" >&5
6005cat conftest.$ac_ext >&5
6006ac_lo= ac_hi=
6007fi
6008rm -f conftest.$ac_objext conftest.$ac_ext
6009fi
6010rm -f conftest.$ac_objext conftest.$ac_ext
6011# Binary search between lo and hi bounds.
6012while test "x$ac_lo" != "x$ac_hi"; do
6013 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6014 cat >conftest.$ac_ext <<_ACEOF
6015#line $LINENO "configure"
6016#include "confdefs.h"
6017$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006018#ifdef F77_DUMMY_MAIN
6019# ifdef __cplusplus
6020 extern "C"
6021# endif
6022 int F77_DUMMY_MAIN() { return 1; }
6023#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006024int
6025main ()
6026{
6027static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6028test_array [0] = 0
6029
6030 ;
6031 return 0;
6032}
6033_ACEOF
6034rm -f conftest.$ac_objext
6035if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6036 (eval $ac_compile) 2>&5
6037 ac_status=$?
6038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6039 (exit $ac_status); } &&
6040 { ac_try='test -s conftest.$ac_objext'
6041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6042 (eval $ac_try) 2>&5
6043 ac_status=$?
6044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6045 (exit $ac_status); }; }; then
6046 ac_hi=$ac_mid
6047else
6048 echo "$as_me: failed program was:" >&5
6049cat conftest.$ac_ext >&5
6050ac_lo=`expr '(' $ac_mid ')' + 1`
6051fi
6052rm -f conftest.$ac_objext conftest.$ac_ext
6053done
6054case $ac_lo in
6055?*) ac_cv_sizeof_long=$ac_lo;;
6056'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
6057echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
6058 { (exit 1); exit 1; }; } ;;
6059esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006060else
6061 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006062 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6063echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6064 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006065else
Martin v. Löwis11437992002-04-12 09:54:03 +00006066 cat >conftest.$ac_ext <<_ACEOF
6067#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006068#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006069$ac_includes_default
6070long longval () { return (long) (sizeof (long)); }
6071unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006072#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006073#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00006074#ifdef F77_DUMMY_MAIN
6075# ifdef __cplusplus
6076 extern "C"
6077# endif
6078 int F77_DUMMY_MAIN() { return 1; }
6079#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006080int
6081main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006082{
Martin v. Löwis11437992002-04-12 09:54:03 +00006083
6084 FILE *f = fopen ("conftest.val", "w");
6085 if (! f)
6086 exit (1);
6087 if (((long) (sizeof (long))) < 0)
6088 {
6089 long i = longval ();
6090 if (i != ((long) (sizeof (long))))
6091 exit (1);
6092 fprintf (f, "%ld\n", i);
6093 }
6094 else
6095 {
6096 unsigned long i = ulongval ();
6097 if (i != ((long) (sizeof (long))))
6098 exit (1);
6099 fprintf (f, "%lu\n", i);
6100 }
6101 exit (ferror (f) || fclose (f) != 0);
6102
6103 ;
6104 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006105}
Martin v. Löwis11437992002-04-12 09:54:03 +00006106_ACEOF
6107rm -f conftest$ac_exeext
6108if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6109 (eval $ac_link) 2>&5
6110 ac_status=$?
6111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6112 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6113 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6114 (eval $ac_try) 2>&5
6115 ac_status=$?
6116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6117 (exit $ac_status); }; }; then
6118 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006119else
Martin v. Löwis11437992002-04-12 09:54:03 +00006120 echo "$as_me: program exited with status $ac_status" >&5
6121echo "$as_me: failed program was:" >&5
6122cat conftest.$ac_ext >&5
6123( exit $ac_status )
6124{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
6125echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
6126 { (exit 1); exit 1; }; }
6127fi
Barry Warsawfe33b792003-01-07 22:42:49 +00006128rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006129fi
6130fi
6131rm -f conftest.val
6132else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006133 ac_cv_sizeof_long=0
6134fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006135fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006136echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6137echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6138cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006139#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006140_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006141
6142
Martin v. Löwis11437992002-04-12 09:54:03 +00006143echo "$as_me:$LINENO: checking for void *" >&5
6144echo $ECHO_N "checking for void *... $ECHO_C" >&6
6145if test "${ac_cv_type_void_p+set}" = set; then
6146 echo $ECHO_N "(cached) $ECHO_C" >&6
6147else
6148 cat >conftest.$ac_ext <<_ACEOF
6149#line $LINENO "configure"
6150#include "confdefs.h"
6151$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006152#ifdef F77_DUMMY_MAIN
6153# ifdef __cplusplus
6154 extern "C"
6155# endif
6156 int F77_DUMMY_MAIN() { return 1; }
6157#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006158int
6159main ()
6160{
6161if ((void * *) 0)
6162 return 0;
6163if (sizeof (void *))
6164 return 0;
6165 ;
6166 return 0;
6167}
6168_ACEOF
6169rm -f conftest.$ac_objext
6170if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6171 (eval $ac_compile) 2>&5
6172 ac_status=$?
6173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6174 (exit $ac_status); } &&
6175 { ac_try='test -s conftest.$ac_objext'
6176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6177 (eval $ac_try) 2>&5
6178 ac_status=$?
6179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6180 (exit $ac_status); }; }; then
6181 ac_cv_type_void_p=yes
6182else
6183 echo "$as_me: failed program was:" >&5
6184cat conftest.$ac_ext >&5
6185ac_cv_type_void_p=no
6186fi
6187rm -f conftest.$ac_objext conftest.$ac_ext
6188fi
6189echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
6190echo "${ECHO_T}$ac_cv_type_void_p" >&6
6191
6192echo "$as_me:$LINENO: checking size of void *" >&5
6193echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6194if test "${ac_cv_sizeof_void_p+set}" = set; then
6195 echo $ECHO_N "(cached) $ECHO_C" >&6
6196else
6197 if test "$ac_cv_type_void_p" = yes; then
6198 # The cast to unsigned long works around a bug in the HP C Compiler
6199 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6200 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6201 # This bug is HP SR number 8606223364.
6202 if test "$cross_compiling" = yes; then
6203 # Depending upon the size, compute the lo and hi bounds.
6204cat >conftest.$ac_ext <<_ACEOF
6205#line $LINENO "configure"
6206#include "confdefs.h"
6207$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006208#ifdef F77_DUMMY_MAIN
6209# ifdef __cplusplus
6210 extern "C"
6211# endif
6212 int F77_DUMMY_MAIN() { return 1; }
6213#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006214int
6215main ()
6216{
6217static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
6218test_array [0] = 0
6219
6220 ;
6221 return 0;
6222}
6223_ACEOF
6224rm -f conftest.$ac_objext
6225if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6226 (eval $ac_compile) 2>&5
6227 ac_status=$?
6228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6229 (exit $ac_status); } &&
6230 { ac_try='test -s conftest.$ac_objext'
6231 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6232 (eval $ac_try) 2>&5
6233 ac_status=$?
6234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6235 (exit $ac_status); }; }; then
6236 ac_lo=0 ac_mid=0
6237 while :; do
6238 cat >conftest.$ac_ext <<_ACEOF
6239#line $LINENO "configure"
6240#include "confdefs.h"
6241$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006242#ifdef F77_DUMMY_MAIN
6243# ifdef __cplusplus
6244 extern "C"
6245# endif
6246 int F77_DUMMY_MAIN() { return 1; }
6247#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006248int
6249main ()
6250{
6251static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6252test_array [0] = 0
6253
6254 ;
6255 return 0;
6256}
6257_ACEOF
6258rm -f conftest.$ac_objext
6259if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6260 (eval $ac_compile) 2>&5
6261 ac_status=$?
6262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6263 (exit $ac_status); } &&
6264 { ac_try='test -s conftest.$ac_objext'
6265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6266 (eval $ac_try) 2>&5
6267 ac_status=$?
6268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6269 (exit $ac_status); }; }; then
6270 ac_hi=$ac_mid; break
6271else
6272 echo "$as_me: failed program was:" >&5
6273cat conftest.$ac_ext >&5
6274ac_lo=`expr $ac_mid + 1`
6275 if test $ac_lo -le $ac_mid; then
6276 ac_lo= ac_hi=
6277 break
6278 fi
6279 ac_mid=`expr 2 '*' $ac_mid + 1`
6280fi
6281rm -f conftest.$ac_objext conftest.$ac_ext
6282 done
6283else
6284 echo "$as_me: failed program was:" >&5
6285cat conftest.$ac_ext >&5
6286cat >conftest.$ac_ext <<_ACEOF
6287#line $LINENO "configure"
6288#include "confdefs.h"
6289$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006290#ifdef F77_DUMMY_MAIN
6291# ifdef __cplusplus
6292 extern "C"
6293# endif
6294 int F77_DUMMY_MAIN() { return 1; }
6295#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006296int
6297main ()
6298{
6299static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6300test_array [0] = 0
6301
6302 ;
6303 return 0;
6304}
6305_ACEOF
6306rm -f conftest.$ac_objext
6307if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6308 (eval $ac_compile) 2>&5
6309 ac_status=$?
6310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6311 (exit $ac_status); } &&
6312 { ac_try='test -s conftest.$ac_objext'
6313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6314 (eval $ac_try) 2>&5
6315 ac_status=$?
6316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6317 (exit $ac_status); }; }; then
6318 ac_hi=-1 ac_mid=-1
6319 while :; do
6320 cat >conftest.$ac_ext <<_ACEOF
6321#line $LINENO "configure"
6322#include "confdefs.h"
6323$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006324#ifdef F77_DUMMY_MAIN
6325# ifdef __cplusplus
6326 extern "C"
6327# endif
6328 int F77_DUMMY_MAIN() { return 1; }
6329#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006330int
6331main ()
6332{
6333static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6334test_array [0] = 0
6335
6336 ;
6337 return 0;
6338}
6339_ACEOF
6340rm -f conftest.$ac_objext
6341if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6342 (eval $ac_compile) 2>&5
6343 ac_status=$?
6344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6345 (exit $ac_status); } &&
6346 { ac_try='test -s conftest.$ac_objext'
6347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6348 (eval $ac_try) 2>&5
6349 ac_status=$?
6350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6351 (exit $ac_status); }; }; then
6352 ac_lo=$ac_mid; break
6353else
6354 echo "$as_me: failed program was:" >&5
6355cat conftest.$ac_ext >&5
6356ac_hi=`expr '(' $ac_mid ')' - 1`
6357 if test $ac_mid -le $ac_hi; then
6358 ac_lo= ac_hi=
6359 break
6360 fi
6361 ac_mid=`expr 2 '*' $ac_mid`
6362fi
6363rm -f conftest.$ac_objext conftest.$ac_ext
6364 done
6365else
6366 echo "$as_me: failed program was:" >&5
6367cat conftest.$ac_ext >&5
6368ac_lo= ac_hi=
6369fi
6370rm -f conftest.$ac_objext conftest.$ac_ext
6371fi
6372rm -f conftest.$ac_objext conftest.$ac_ext
6373# Binary search between lo and hi bounds.
6374while test "x$ac_lo" != "x$ac_hi"; do
6375 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6376 cat >conftest.$ac_ext <<_ACEOF
6377#line $LINENO "configure"
6378#include "confdefs.h"
6379$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006380#ifdef F77_DUMMY_MAIN
6381# ifdef __cplusplus
6382 extern "C"
6383# endif
6384 int F77_DUMMY_MAIN() { return 1; }
6385#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006386int
6387main ()
6388{
6389static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6390test_array [0] = 0
6391
6392 ;
6393 return 0;
6394}
6395_ACEOF
6396rm -f conftest.$ac_objext
6397if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6398 (eval $ac_compile) 2>&5
6399 ac_status=$?
6400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6401 (exit $ac_status); } &&
6402 { ac_try='test -s conftest.$ac_objext'
6403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6404 (eval $ac_try) 2>&5
6405 ac_status=$?
6406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6407 (exit $ac_status); }; }; then
6408 ac_hi=$ac_mid
6409else
6410 echo "$as_me: failed program was:" >&5
6411cat conftest.$ac_ext >&5
6412ac_lo=`expr '(' $ac_mid ')' + 1`
6413fi
6414rm -f conftest.$ac_objext conftest.$ac_ext
6415done
6416case $ac_lo in
6417?*) ac_cv_sizeof_void_p=$ac_lo;;
6418'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6419echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6420 { (exit 1); exit 1; }; } ;;
6421esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006422else
6423 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006424 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6425echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6426 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006427else
Martin v. Löwis11437992002-04-12 09:54:03 +00006428 cat >conftest.$ac_ext <<_ACEOF
6429#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00006430#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006431$ac_includes_default
6432long longval () { return (long) (sizeof (void *)); }
6433unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006434#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006435#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00006436#ifdef F77_DUMMY_MAIN
6437# ifdef __cplusplus
6438 extern "C"
6439# endif
6440 int F77_DUMMY_MAIN() { return 1; }
6441#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006442int
6443main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006444{
Martin v. Löwis11437992002-04-12 09:54:03 +00006445
6446 FILE *f = fopen ("conftest.val", "w");
6447 if (! f)
6448 exit (1);
6449 if (((long) (sizeof (void *))) < 0)
6450 {
6451 long i = longval ();
6452 if (i != ((long) (sizeof (void *))))
6453 exit (1);
6454 fprintf (f, "%ld\n", i);
6455 }
6456 else
6457 {
6458 unsigned long i = ulongval ();
6459 if (i != ((long) (sizeof (void *))))
6460 exit (1);
6461 fprintf (f, "%lu\n", i);
6462 }
6463 exit (ferror (f) || fclose (f) != 0);
6464
6465 ;
6466 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006467}
Martin v. Löwis11437992002-04-12 09:54:03 +00006468_ACEOF
6469rm -f conftest$ac_exeext
6470if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6471 (eval $ac_link) 2>&5
6472 ac_status=$?
6473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6474 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6475 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6476 (eval $ac_try) 2>&5
6477 ac_status=$?
6478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6479 (exit $ac_status); }; }; then
6480 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006481else
Martin v. Löwis11437992002-04-12 09:54:03 +00006482 echo "$as_me: program exited with status $ac_status" >&5
6483echo "$as_me: failed program was:" >&5
6484cat conftest.$ac_ext >&5
6485( exit $ac_status )
6486{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6487echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6488 { (exit 1); exit 1; }; }
6489fi
Barry Warsawfe33b792003-01-07 22:42:49 +00006490rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006491fi
6492fi
6493rm -f conftest.val
6494else
Guido van Rossumad678af1998-10-02 14:42:15 +00006495 ac_cv_sizeof_void_p=0
6496fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006497fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006498echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6499echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6500cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006501#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006502_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006503
6504
Martin v. Löwis11437992002-04-12 09:54:03 +00006505echo "$as_me:$LINENO: checking for char" >&5
6506echo $ECHO_N "checking for char... $ECHO_C" >&6
6507if test "${ac_cv_type_char+set}" = set; then
6508 echo $ECHO_N "(cached) $ECHO_C" >&6
6509else
6510 cat >conftest.$ac_ext <<_ACEOF
6511#line $LINENO "configure"
6512#include "confdefs.h"
6513$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006514#ifdef F77_DUMMY_MAIN
6515# ifdef __cplusplus
6516 extern "C"
6517# endif
6518 int F77_DUMMY_MAIN() { return 1; }
6519#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006520int
6521main ()
6522{
6523if ((char *) 0)
6524 return 0;
6525if (sizeof (char))
6526 return 0;
6527 ;
6528 return 0;
6529}
6530_ACEOF
6531rm -f conftest.$ac_objext
6532if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6533 (eval $ac_compile) 2>&5
6534 ac_status=$?
6535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6536 (exit $ac_status); } &&
6537 { ac_try='test -s conftest.$ac_objext'
6538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6539 (eval $ac_try) 2>&5
6540 ac_status=$?
6541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6542 (exit $ac_status); }; }; then
6543 ac_cv_type_char=yes
6544else
6545 echo "$as_me: failed program was:" >&5
6546cat conftest.$ac_ext >&5
6547ac_cv_type_char=no
6548fi
6549rm -f conftest.$ac_objext conftest.$ac_ext
6550fi
6551echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
6552echo "${ECHO_T}$ac_cv_type_char" >&6
6553
6554echo "$as_me:$LINENO: checking size of char" >&5
6555echo $ECHO_N "checking size of char... $ECHO_C" >&6
6556if test "${ac_cv_sizeof_char+set}" = set; then
6557 echo $ECHO_N "(cached) $ECHO_C" >&6
6558else
6559 if test "$ac_cv_type_char" = yes; then
6560 # The cast to unsigned long works around a bug in the HP C Compiler
6561 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6562 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6563 # This bug is HP SR number 8606223364.
6564 if test "$cross_compiling" = yes; then
6565 # Depending upon the size, compute the lo and hi bounds.
6566cat >conftest.$ac_ext <<_ACEOF
6567#line $LINENO "configure"
6568#include "confdefs.h"
6569$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006570#ifdef F77_DUMMY_MAIN
6571# ifdef __cplusplus
6572 extern "C"
6573# endif
6574 int F77_DUMMY_MAIN() { return 1; }
6575#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006576int
6577main ()
6578{
6579static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
6580test_array [0] = 0
6581
6582 ;
6583 return 0;
6584}
6585_ACEOF
6586rm -f conftest.$ac_objext
6587if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6588 (eval $ac_compile) 2>&5
6589 ac_status=$?
6590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6591 (exit $ac_status); } &&
6592 { ac_try='test -s conftest.$ac_objext'
6593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6594 (eval $ac_try) 2>&5
6595 ac_status=$?
6596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6597 (exit $ac_status); }; }; then
6598 ac_lo=0 ac_mid=0
6599 while :; do
6600 cat >conftest.$ac_ext <<_ACEOF
6601#line $LINENO "configure"
6602#include "confdefs.h"
6603$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006604#ifdef F77_DUMMY_MAIN
6605# ifdef __cplusplus
6606 extern "C"
6607# endif
6608 int F77_DUMMY_MAIN() { return 1; }
6609#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006610int
6611main ()
6612{
6613static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6614test_array [0] = 0
6615
6616 ;
6617 return 0;
6618}
6619_ACEOF
6620rm -f conftest.$ac_objext
6621if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6622 (eval $ac_compile) 2>&5
6623 ac_status=$?
6624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6625 (exit $ac_status); } &&
6626 { ac_try='test -s conftest.$ac_objext'
6627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6628 (eval $ac_try) 2>&5
6629 ac_status=$?
6630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6631 (exit $ac_status); }; }; then
6632 ac_hi=$ac_mid; break
6633else
6634 echo "$as_me: failed program was:" >&5
6635cat conftest.$ac_ext >&5
6636ac_lo=`expr $ac_mid + 1`
6637 if test $ac_lo -le $ac_mid; then
6638 ac_lo= ac_hi=
6639 break
6640 fi
6641 ac_mid=`expr 2 '*' $ac_mid + 1`
6642fi
6643rm -f conftest.$ac_objext conftest.$ac_ext
6644 done
6645else
6646 echo "$as_me: failed program was:" >&5
6647cat conftest.$ac_ext >&5
6648cat >conftest.$ac_ext <<_ACEOF
6649#line $LINENO "configure"
6650#include "confdefs.h"
6651$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006652#ifdef F77_DUMMY_MAIN
6653# ifdef __cplusplus
6654 extern "C"
6655# endif
6656 int F77_DUMMY_MAIN() { return 1; }
6657#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006658int
6659main ()
6660{
6661static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
6662test_array [0] = 0
6663
6664 ;
6665 return 0;
6666}
6667_ACEOF
6668rm -f conftest.$ac_objext
6669if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6670 (eval $ac_compile) 2>&5
6671 ac_status=$?
6672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6673 (exit $ac_status); } &&
6674 { ac_try='test -s conftest.$ac_objext'
6675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6676 (eval $ac_try) 2>&5
6677 ac_status=$?
6678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6679 (exit $ac_status); }; }; then
6680 ac_hi=-1 ac_mid=-1
6681 while :; do
6682 cat >conftest.$ac_ext <<_ACEOF
6683#line $LINENO "configure"
6684#include "confdefs.h"
6685$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006686#ifdef F77_DUMMY_MAIN
6687# ifdef __cplusplus
6688 extern "C"
6689# endif
6690 int F77_DUMMY_MAIN() { return 1; }
6691#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006692int
6693main ()
6694{
6695static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
6696test_array [0] = 0
6697
6698 ;
6699 return 0;
6700}
6701_ACEOF
6702rm -f conftest.$ac_objext
6703if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6704 (eval $ac_compile) 2>&5
6705 ac_status=$?
6706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6707 (exit $ac_status); } &&
6708 { ac_try='test -s conftest.$ac_objext'
6709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6710 (eval $ac_try) 2>&5
6711 ac_status=$?
6712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6713 (exit $ac_status); }; }; then
6714 ac_lo=$ac_mid; break
6715else
6716 echo "$as_me: failed program was:" >&5
6717cat conftest.$ac_ext >&5
6718ac_hi=`expr '(' $ac_mid ')' - 1`
6719 if test $ac_mid -le $ac_hi; then
6720 ac_lo= ac_hi=
6721 break
6722 fi
6723 ac_mid=`expr 2 '*' $ac_mid`
6724fi
6725rm -f conftest.$ac_objext conftest.$ac_ext
6726 done
6727else
6728 echo "$as_me: failed program was:" >&5
6729cat conftest.$ac_ext >&5
6730ac_lo= ac_hi=
6731fi
6732rm -f conftest.$ac_objext conftest.$ac_ext
6733fi
6734rm -f conftest.$ac_objext conftest.$ac_ext
6735# Binary search between lo and hi bounds.
6736while test "x$ac_lo" != "x$ac_hi"; do
6737 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6738 cat >conftest.$ac_ext <<_ACEOF
6739#line $LINENO "configure"
6740#include "confdefs.h"
6741$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006742#ifdef F77_DUMMY_MAIN
6743# ifdef __cplusplus
6744 extern "C"
6745# endif
6746 int F77_DUMMY_MAIN() { return 1; }
6747#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006748int
6749main ()
6750{
6751static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6752test_array [0] = 0
6753
6754 ;
6755 return 0;
6756}
6757_ACEOF
6758rm -f conftest.$ac_objext
6759if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6760 (eval $ac_compile) 2>&5
6761 ac_status=$?
6762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6763 (exit $ac_status); } &&
6764 { ac_try='test -s conftest.$ac_objext'
6765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6766 (eval $ac_try) 2>&5
6767 ac_status=$?
6768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6769 (exit $ac_status); }; }; then
6770 ac_hi=$ac_mid
6771else
6772 echo "$as_me: failed program was:" >&5
6773cat conftest.$ac_ext >&5
6774ac_lo=`expr '(' $ac_mid ')' + 1`
6775fi
6776rm -f conftest.$ac_objext conftest.$ac_ext
6777done
6778case $ac_lo in
6779?*) ac_cv_sizeof_char=$ac_lo;;
6780'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6781echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6782 { (exit 1); exit 1; }; } ;;
6783esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006784else
6785 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006786 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6787echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6788 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006789else
Martin v. Löwis11437992002-04-12 09:54:03 +00006790 cat >conftest.$ac_ext <<_ACEOF
6791#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006792#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006793$ac_includes_default
6794long longval () { return (long) (sizeof (char)); }
6795unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006796#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006797#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00006798#ifdef F77_DUMMY_MAIN
6799# ifdef __cplusplus
6800 extern "C"
6801# endif
6802 int F77_DUMMY_MAIN() { return 1; }
6803#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006804int
6805main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006806{
Martin v. Löwis11437992002-04-12 09:54:03 +00006807
6808 FILE *f = fopen ("conftest.val", "w");
6809 if (! f)
6810 exit (1);
6811 if (((long) (sizeof (char))) < 0)
6812 {
6813 long i = longval ();
6814 if (i != ((long) (sizeof (char))))
6815 exit (1);
6816 fprintf (f, "%ld\n", i);
6817 }
6818 else
6819 {
6820 unsigned long i = ulongval ();
6821 if (i != ((long) (sizeof (char))))
6822 exit (1);
6823 fprintf (f, "%lu\n", i);
6824 }
6825 exit (ferror (f) || fclose (f) != 0);
6826
6827 ;
6828 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006829}
Martin v. Löwis11437992002-04-12 09:54:03 +00006830_ACEOF
6831rm -f conftest$ac_exeext
6832if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6833 (eval $ac_link) 2>&5
6834 ac_status=$?
6835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6836 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6837 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6838 (eval $ac_try) 2>&5
6839 ac_status=$?
6840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6841 (exit $ac_status); }; }; then
6842 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006843else
Martin v. Löwis11437992002-04-12 09:54:03 +00006844 echo "$as_me: program exited with status $ac_status" >&5
6845echo "$as_me: failed program was:" >&5
6846cat conftest.$ac_ext >&5
6847( exit $ac_status )
6848{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6849echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6850 { (exit 1); exit 1; }; }
6851fi
Barry Warsawfe33b792003-01-07 22:42:49 +00006852rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006853fi
6854fi
6855rm -f conftest.val
6856else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006857 ac_cv_sizeof_char=0
6858fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006859fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006860echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6861echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6862cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006863#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006864_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006865
6866
Martin v. Löwis11437992002-04-12 09:54:03 +00006867echo "$as_me:$LINENO: checking for short" >&5
6868echo $ECHO_N "checking for short... $ECHO_C" >&6
6869if test "${ac_cv_type_short+set}" = set; then
6870 echo $ECHO_N "(cached) $ECHO_C" >&6
6871else
6872 cat >conftest.$ac_ext <<_ACEOF
6873#line $LINENO "configure"
6874#include "confdefs.h"
6875$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006876#ifdef F77_DUMMY_MAIN
6877# ifdef __cplusplus
6878 extern "C"
6879# endif
6880 int F77_DUMMY_MAIN() { return 1; }
6881#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006882int
6883main ()
6884{
6885if ((short *) 0)
6886 return 0;
6887if (sizeof (short))
6888 return 0;
6889 ;
6890 return 0;
6891}
6892_ACEOF
6893rm -f conftest.$ac_objext
6894if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6895 (eval $ac_compile) 2>&5
6896 ac_status=$?
6897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6898 (exit $ac_status); } &&
6899 { ac_try='test -s conftest.$ac_objext'
6900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6901 (eval $ac_try) 2>&5
6902 ac_status=$?
6903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6904 (exit $ac_status); }; }; then
6905 ac_cv_type_short=yes
6906else
6907 echo "$as_me: failed program was:" >&5
6908cat conftest.$ac_ext >&5
6909ac_cv_type_short=no
6910fi
6911rm -f conftest.$ac_objext conftest.$ac_ext
6912fi
6913echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6914echo "${ECHO_T}$ac_cv_type_short" >&6
6915
6916echo "$as_me:$LINENO: checking size of short" >&5
6917echo $ECHO_N "checking size of short... $ECHO_C" >&6
6918if test "${ac_cv_sizeof_short+set}" = set; then
6919 echo $ECHO_N "(cached) $ECHO_C" >&6
6920else
6921 if test "$ac_cv_type_short" = yes; then
6922 # The cast to unsigned long works around a bug in the HP C Compiler
6923 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6924 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6925 # This bug is HP SR number 8606223364.
6926 if test "$cross_compiling" = yes; then
6927 # Depending upon the size, compute the lo and hi bounds.
6928cat >conftest.$ac_ext <<_ACEOF
6929#line $LINENO "configure"
6930#include "confdefs.h"
6931$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006932#ifdef F77_DUMMY_MAIN
6933# ifdef __cplusplus
6934 extern "C"
6935# endif
6936 int F77_DUMMY_MAIN() { return 1; }
6937#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006938int
6939main ()
6940{
6941static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6942test_array [0] = 0
6943
6944 ;
6945 return 0;
6946}
6947_ACEOF
6948rm -f conftest.$ac_objext
6949if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6950 (eval $ac_compile) 2>&5
6951 ac_status=$?
6952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6953 (exit $ac_status); } &&
6954 { ac_try='test -s conftest.$ac_objext'
6955 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6956 (eval $ac_try) 2>&5
6957 ac_status=$?
6958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6959 (exit $ac_status); }; }; then
6960 ac_lo=0 ac_mid=0
6961 while :; do
6962 cat >conftest.$ac_ext <<_ACEOF
6963#line $LINENO "configure"
6964#include "confdefs.h"
6965$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006966#ifdef F77_DUMMY_MAIN
6967# ifdef __cplusplus
6968 extern "C"
6969# endif
6970 int F77_DUMMY_MAIN() { return 1; }
6971#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006972int
6973main ()
6974{
6975static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6976test_array [0] = 0
6977
6978 ;
6979 return 0;
6980}
6981_ACEOF
6982rm -f conftest.$ac_objext
6983if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6984 (eval $ac_compile) 2>&5
6985 ac_status=$?
6986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6987 (exit $ac_status); } &&
6988 { ac_try='test -s conftest.$ac_objext'
6989 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6990 (eval $ac_try) 2>&5
6991 ac_status=$?
6992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6993 (exit $ac_status); }; }; then
6994 ac_hi=$ac_mid; break
6995else
6996 echo "$as_me: failed program was:" >&5
6997cat conftest.$ac_ext >&5
6998ac_lo=`expr $ac_mid + 1`
6999 if test $ac_lo -le $ac_mid; then
7000 ac_lo= ac_hi=
7001 break
7002 fi
7003 ac_mid=`expr 2 '*' $ac_mid + 1`
7004fi
7005rm -f conftest.$ac_objext conftest.$ac_ext
7006 done
7007else
7008 echo "$as_me: failed program was:" >&5
7009cat conftest.$ac_ext >&5
7010cat >conftest.$ac_ext <<_ACEOF
7011#line $LINENO "configure"
7012#include "confdefs.h"
7013$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007014#ifdef F77_DUMMY_MAIN
7015# ifdef __cplusplus
7016 extern "C"
7017# endif
7018 int F77_DUMMY_MAIN() { return 1; }
7019#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007020int
7021main ()
7022{
7023static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
7024test_array [0] = 0
7025
7026 ;
7027 return 0;
7028}
7029_ACEOF
7030rm -f conftest.$ac_objext
7031if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7032 (eval $ac_compile) 2>&5
7033 ac_status=$?
7034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7035 (exit $ac_status); } &&
7036 { ac_try='test -s conftest.$ac_objext'
7037 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7038 (eval $ac_try) 2>&5
7039 ac_status=$?
7040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7041 (exit $ac_status); }; }; then
7042 ac_hi=-1 ac_mid=-1
7043 while :; do
7044 cat >conftest.$ac_ext <<_ACEOF
7045#line $LINENO "configure"
7046#include "confdefs.h"
7047$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007048#ifdef F77_DUMMY_MAIN
7049# ifdef __cplusplus
7050 extern "C"
7051# endif
7052 int F77_DUMMY_MAIN() { return 1; }
7053#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007054int
7055main ()
7056{
7057static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
7058test_array [0] = 0
7059
7060 ;
7061 return 0;
7062}
7063_ACEOF
7064rm -f conftest.$ac_objext
7065if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7066 (eval $ac_compile) 2>&5
7067 ac_status=$?
7068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7069 (exit $ac_status); } &&
7070 { ac_try='test -s conftest.$ac_objext'
7071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7072 (eval $ac_try) 2>&5
7073 ac_status=$?
7074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7075 (exit $ac_status); }; }; then
7076 ac_lo=$ac_mid; break
7077else
7078 echo "$as_me: failed program was:" >&5
7079cat conftest.$ac_ext >&5
7080ac_hi=`expr '(' $ac_mid ')' - 1`
7081 if test $ac_mid -le $ac_hi; then
7082 ac_lo= ac_hi=
7083 break
7084 fi
7085 ac_mid=`expr 2 '*' $ac_mid`
7086fi
7087rm -f conftest.$ac_objext conftest.$ac_ext
7088 done
7089else
7090 echo "$as_me: failed program was:" >&5
7091cat conftest.$ac_ext >&5
7092ac_lo= ac_hi=
7093fi
7094rm -f conftest.$ac_objext conftest.$ac_ext
7095fi
7096rm -f conftest.$ac_objext conftest.$ac_ext
7097# Binary search between lo and hi bounds.
7098while test "x$ac_lo" != "x$ac_hi"; do
7099 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7100 cat >conftest.$ac_ext <<_ACEOF
7101#line $LINENO "configure"
7102#include "confdefs.h"
7103$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007104#ifdef F77_DUMMY_MAIN
7105# ifdef __cplusplus
7106 extern "C"
7107# endif
7108 int F77_DUMMY_MAIN() { return 1; }
7109#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007110int
7111main ()
7112{
7113static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7114test_array [0] = 0
7115
7116 ;
7117 return 0;
7118}
7119_ACEOF
7120rm -f conftest.$ac_objext
7121if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7122 (eval $ac_compile) 2>&5
7123 ac_status=$?
7124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7125 (exit $ac_status); } &&
7126 { ac_try='test -s conftest.$ac_objext'
7127 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7128 (eval $ac_try) 2>&5
7129 ac_status=$?
7130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7131 (exit $ac_status); }; }; then
7132 ac_hi=$ac_mid
7133else
7134 echo "$as_me: failed program was:" >&5
7135cat conftest.$ac_ext >&5
7136ac_lo=`expr '(' $ac_mid ')' + 1`
7137fi
7138rm -f conftest.$ac_objext conftest.$ac_ext
7139done
7140case $ac_lo in
7141?*) ac_cv_sizeof_short=$ac_lo;;
7142'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
7143echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
7144 { (exit 1); exit 1; }; } ;;
7145esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007146else
7147 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007148 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7149echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7150 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007151else
Martin v. Löwis11437992002-04-12 09:54:03 +00007152 cat >conftest.$ac_ext <<_ACEOF
7153#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007154#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007155$ac_includes_default
7156long longval () { return (long) (sizeof (short)); }
7157unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007158#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007159#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00007160#ifdef F77_DUMMY_MAIN
7161# ifdef __cplusplus
7162 extern "C"
7163# endif
7164 int F77_DUMMY_MAIN() { return 1; }
7165#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007166int
7167main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007168{
Martin v. Löwis11437992002-04-12 09:54:03 +00007169
7170 FILE *f = fopen ("conftest.val", "w");
7171 if (! f)
7172 exit (1);
7173 if (((long) (sizeof (short))) < 0)
7174 {
7175 long i = longval ();
7176 if (i != ((long) (sizeof (short))))
7177 exit (1);
7178 fprintf (f, "%ld\n", i);
7179 }
7180 else
7181 {
7182 unsigned long i = ulongval ();
7183 if (i != ((long) (sizeof (short))))
7184 exit (1);
7185 fprintf (f, "%lu\n", i);
7186 }
7187 exit (ferror (f) || fclose (f) != 0);
7188
7189 ;
7190 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007191}
Martin v. Löwis11437992002-04-12 09:54:03 +00007192_ACEOF
7193rm -f conftest$ac_exeext
7194if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7195 (eval $ac_link) 2>&5
7196 ac_status=$?
7197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7198 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7200 (eval $ac_try) 2>&5
7201 ac_status=$?
7202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7203 (exit $ac_status); }; }; then
7204 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007205else
Martin v. Löwis11437992002-04-12 09:54:03 +00007206 echo "$as_me: program exited with status $ac_status" >&5
7207echo "$as_me: failed program was:" >&5
7208cat conftest.$ac_ext >&5
7209( exit $ac_status )
7210{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
7211echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
7212 { (exit 1); exit 1; }; }
7213fi
Barry Warsawfe33b792003-01-07 22:42:49 +00007214rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007215fi
7216fi
7217rm -f conftest.val
7218else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007219 ac_cv_sizeof_short=0
7220fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007221fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007222echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7223echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7224cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007225#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007226_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007227
7228
Martin v. Löwis11437992002-04-12 09:54:03 +00007229echo "$as_me:$LINENO: checking for float" >&5
7230echo $ECHO_N "checking for float... $ECHO_C" >&6
7231if test "${ac_cv_type_float+set}" = set; then
7232 echo $ECHO_N "(cached) $ECHO_C" >&6
7233else
7234 cat >conftest.$ac_ext <<_ACEOF
7235#line $LINENO "configure"
7236#include "confdefs.h"
7237$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007238#ifdef F77_DUMMY_MAIN
7239# ifdef __cplusplus
7240 extern "C"
7241# endif
7242 int F77_DUMMY_MAIN() { return 1; }
7243#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007244int
7245main ()
7246{
7247if ((float *) 0)
7248 return 0;
7249if (sizeof (float))
7250 return 0;
7251 ;
7252 return 0;
7253}
7254_ACEOF
7255rm -f conftest.$ac_objext
7256if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7257 (eval $ac_compile) 2>&5
7258 ac_status=$?
7259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7260 (exit $ac_status); } &&
7261 { ac_try='test -s conftest.$ac_objext'
7262 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7263 (eval $ac_try) 2>&5
7264 ac_status=$?
7265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7266 (exit $ac_status); }; }; then
7267 ac_cv_type_float=yes
7268else
7269 echo "$as_me: failed program was:" >&5
7270cat conftest.$ac_ext >&5
7271ac_cv_type_float=no
7272fi
7273rm -f conftest.$ac_objext conftest.$ac_ext
7274fi
7275echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7276echo "${ECHO_T}$ac_cv_type_float" >&6
7277
7278echo "$as_me:$LINENO: checking size of float" >&5
7279echo $ECHO_N "checking size of float... $ECHO_C" >&6
7280if test "${ac_cv_sizeof_float+set}" = set; then
7281 echo $ECHO_N "(cached) $ECHO_C" >&6
7282else
7283 if test "$ac_cv_type_float" = yes; then
7284 # The cast to unsigned long works around a bug in the HP C Compiler
7285 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7286 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7287 # This bug is HP SR number 8606223364.
7288 if test "$cross_compiling" = yes; then
7289 # Depending upon the size, compute the lo and hi bounds.
7290cat >conftest.$ac_ext <<_ACEOF
7291#line $LINENO "configure"
7292#include "confdefs.h"
7293$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007294#ifdef F77_DUMMY_MAIN
7295# ifdef __cplusplus
7296 extern "C"
7297# endif
7298 int F77_DUMMY_MAIN() { return 1; }
7299#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007300int
7301main ()
7302{
7303static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7304test_array [0] = 0
7305
7306 ;
7307 return 0;
7308}
7309_ACEOF
7310rm -f conftest.$ac_objext
7311if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7312 (eval $ac_compile) 2>&5
7313 ac_status=$?
7314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7315 (exit $ac_status); } &&
7316 { ac_try='test -s conftest.$ac_objext'
7317 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7318 (eval $ac_try) 2>&5
7319 ac_status=$?
7320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7321 (exit $ac_status); }; }; then
7322 ac_lo=0 ac_mid=0
7323 while :; do
7324 cat >conftest.$ac_ext <<_ACEOF
7325#line $LINENO "configure"
7326#include "confdefs.h"
7327$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007328#ifdef F77_DUMMY_MAIN
7329# ifdef __cplusplus
7330 extern "C"
7331# endif
7332 int F77_DUMMY_MAIN() { return 1; }
7333#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007334int
7335main ()
7336{
7337static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7338test_array [0] = 0
7339
7340 ;
7341 return 0;
7342}
7343_ACEOF
7344rm -f conftest.$ac_objext
7345if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7346 (eval $ac_compile) 2>&5
7347 ac_status=$?
7348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7349 (exit $ac_status); } &&
7350 { ac_try='test -s conftest.$ac_objext'
7351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7352 (eval $ac_try) 2>&5
7353 ac_status=$?
7354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7355 (exit $ac_status); }; }; then
7356 ac_hi=$ac_mid; break
7357else
7358 echo "$as_me: failed program was:" >&5
7359cat conftest.$ac_ext >&5
7360ac_lo=`expr $ac_mid + 1`
7361 if test $ac_lo -le $ac_mid; then
7362 ac_lo= ac_hi=
7363 break
7364 fi
7365 ac_mid=`expr 2 '*' $ac_mid + 1`
7366fi
7367rm -f conftest.$ac_objext conftest.$ac_ext
7368 done
7369else
7370 echo "$as_me: failed program was:" >&5
7371cat conftest.$ac_ext >&5
7372cat >conftest.$ac_ext <<_ACEOF
7373#line $LINENO "configure"
7374#include "confdefs.h"
7375$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007376#ifdef F77_DUMMY_MAIN
7377# ifdef __cplusplus
7378 extern "C"
7379# endif
7380 int F77_DUMMY_MAIN() { return 1; }
7381#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007382int
7383main ()
7384{
7385static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7386test_array [0] = 0
7387
7388 ;
7389 return 0;
7390}
7391_ACEOF
7392rm -f conftest.$ac_objext
7393if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7394 (eval $ac_compile) 2>&5
7395 ac_status=$?
7396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7397 (exit $ac_status); } &&
7398 { ac_try='test -s conftest.$ac_objext'
7399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7400 (eval $ac_try) 2>&5
7401 ac_status=$?
7402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7403 (exit $ac_status); }; }; then
7404 ac_hi=-1 ac_mid=-1
7405 while :; do
7406 cat >conftest.$ac_ext <<_ACEOF
7407#line $LINENO "configure"
7408#include "confdefs.h"
7409$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007410#ifdef F77_DUMMY_MAIN
7411# ifdef __cplusplus
7412 extern "C"
7413# endif
7414 int F77_DUMMY_MAIN() { return 1; }
7415#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007416int
7417main ()
7418{
7419static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7420test_array [0] = 0
7421
7422 ;
7423 return 0;
7424}
7425_ACEOF
7426rm -f conftest.$ac_objext
7427if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7428 (eval $ac_compile) 2>&5
7429 ac_status=$?
7430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7431 (exit $ac_status); } &&
7432 { ac_try='test -s conftest.$ac_objext'
7433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7434 (eval $ac_try) 2>&5
7435 ac_status=$?
7436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7437 (exit $ac_status); }; }; then
7438 ac_lo=$ac_mid; break
7439else
7440 echo "$as_me: failed program was:" >&5
7441cat conftest.$ac_ext >&5
7442ac_hi=`expr '(' $ac_mid ')' - 1`
7443 if test $ac_mid -le $ac_hi; then
7444 ac_lo= ac_hi=
7445 break
7446 fi
7447 ac_mid=`expr 2 '*' $ac_mid`
7448fi
7449rm -f conftest.$ac_objext conftest.$ac_ext
7450 done
7451else
7452 echo "$as_me: failed program was:" >&5
7453cat conftest.$ac_ext >&5
7454ac_lo= ac_hi=
7455fi
7456rm -f conftest.$ac_objext conftest.$ac_ext
7457fi
7458rm -f conftest.$ac_objext conftest.$ac_ext
7459# Binary search between lo and hi bounds.
7460while test "x$ac_lo" != "x$ac_hi"; do
7461 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7462 cat >conftest.$ac_ext <<_ACEOF
7463#line $LINENO "configure"
7464#include "confdefs.h"
7465$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007466#ifdef F77_DUMMY_MAIN
7467# ifdef __cplusplus
7468 extern "C"
7469# endif
7470 int F77_DUMMY_MAIN() { return 1; }
7471#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007472int
7473main ()
7474{
7475static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7476test_array [0] = 0
7477
7478 ;
7479 return 0;
7480}
7481_ACEOF
7482rm -f conftest.$ac_objext
7483if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7484 (eval $ac_compile) 2>&5
7485 ac_status=$?
7486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7487 (exit $ac_status); } &&
7488 { ac_try='test -s conftest.$ac_objext'
7489 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7490 (eval $ac_try) 2>&5
7491 ac_status=$?
7492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7493 (exit $ac_status); }; }; then
7494 ac_hi=$ac_mid
7495else
7496 echo "$as_me: failed program was:" >&5
7497cat conftest.$ac_ext >&5
7498ac_lo=`expr '(' $ac_mid ')' + 1`
7499fi
7500rm -f conftest.$ac_objext conftest.$ac_ext
7501done
7502case $ac_lo in
7503?*) ac_cv_sizeof_float=$ac_lo;;
7504'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7505echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7506 { (exit 1); exit 1; }; } ;;
7507esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007508else
7509 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007510 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7511echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7512 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007513else
Martin v. Löwis11437992002-04-12 09:54:03 +00007514 cat >conftest.$ac_ext <<_ACEOF
7515#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007516#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007517$ac_includes_default
7518long longval () { return (long) (sizeof (float)); }
7519unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007520#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007521#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00007522#ifdef F77_DUMMY_MAIN
7523# ifdef __cplusplus
7524 extern "C"
7525# endif
7526 int F77_DUMMY_MAIN() { return 1; }
7527#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007528int
7529main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007530{
Martin v. Löwis11437992002-04-12 09:54:03 +00007531
7532 FILE *f = fopen ("conftest.val", "w");
7533 if (! f)
7534 exit (1);
7535 if (((long) (sizeof (float))) < 0)
7536 {
7537 long i = longval ();
7538 if (i != ((long) (sizeof (float))))
7539 exit (1);
7540 fprintf (f, "%ld\n", i);
7541 }
7542 else
7543 {
7544 unsigned long i = ulongval ();
7545 if (i != ((long) (sizeof (float))))
7546 exit (1);
7547 fprintf (f, "%lu\n", i);
7548 }
7549 exit (ferror (f) || fclose (f) != 0);
7550
7551 ;
7552 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007553}
Martin v. Löwis11437992002-04-12 09:54:03 +00007554_ACEOF
7555rm -f conftest$ac_exeext
7556if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7557 (eval $ac_link) 2>&5
7558 ac_status=$?
7559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7560 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7562 (eval $ac_try) 2>&5
7563 ac_status=$?
7564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7565 (exit $ac_status); }; }; then
7566 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007567else
Martin v. Löwis11437992002-04-12 09:54:03 +00007568 echo "$as_me: program exited with status $ac_status" >&5
7569echo "$as_me: failed program was:" >&5
7570cat conftest.$ac_ext >&5
7571( exit $ac_status )
7572{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7573echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7574 { (exit 1); exit 1; }; }
7575fi
Barry Warsawfe33b792003-01-07 22:42:49 +00007576rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007577fi
7578fi
7579rm -f conftest.val
7580else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007581 ac_cv_sizeof_float=0
7582fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007583fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007584echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7585echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7586cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007587#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007588_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007589
7590
Martin v. Löwis11437992002-04-12 09:54:03 +00007591echo "$as_me:$LINENO: checking for double" >&5
7592echo $ECHO_N "checking for double... $ECHO_C" >&6
7593if test "${ac_cv_type_double+set}" = set; then
7594 echo $ECHO_N "(cached) $ECHO_C" >&6
7595else
7596 cat >conftest.$ac_ext <<_ACEOF
7597#line $LINENO "configure"
7598#include "confdefs.h"
7599$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007600#ifdef F77_DUMMY_MAIN
7601# ifdef __cplusplus
7602 extern "C"
7603# endif
7604 int F77_DUMMY_MAIN() { return 1; }
7605#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007606int
7607main ()
7608{
7609if ((double *) 0)
7610 return 0;
7611if (sizeof (double))
7612 return 0;
7613 ;
7614 return 0;
7615}
7616_ACEOF
7617rm -f conftest.$ac_objext
7618if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7619 (eval $ac_compile) 2>&5
7620 ac_status=$?
7621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7622 (exit $ac_status); } &&
7623 { ac_try='test -s conftest.$ac_objext'
7624 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7625 (eval $ac_try) 2>&5
7626 ac_status=$?
7627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7628 (exit $ac_status); }; }; then
7629 ac_cv_type_double=yes
7630else
7631 echo "$as_me: failed program was:" >&5
7632cat conftest.$ac_ext >&5
7633ac_cv_type_double=no
7634fi
7635rm -f conftest.$ac_objext conftest.$ac_ext
7636fi
7637echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7638echo "${ECHO_T}$ac_cv_type_double" >&6
7639
7640echo "$as_me:$LINENO: checking size of double" >&5
7641echo $ECHO_N "checking size of double... $ECHO_C" >&6
7642if test "${ac_cv_sizeof_double+set}" = set; then
7643 echo $ECHO_N "(cached) $ECHO_C" >&6
7644else
7645 if test "$ac_cv_type_double" = yes; then
7646 # The cast to unsigned long works around a bug in the HP C Compiler
7647 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7648 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7649 # This bug is HP SR number 8606223364.
7650 if test "$cross_compiling" = yes; then
7651 # Depending upon the size, compute the lo and hi bounds.
7652cat >conftest.$ac_ext <<_ACEOF
7653#line $LINENO "configure"
7654#include "confdefs.h"
7655$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007656#ifdef F77_DUMMY_MAIN
7657# ifdef __cplusplus
7658 extern "C"
7659# endif
7660 int F77_DUMMY_MAIN() { return 1; }
7661#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007662int
7663main ()
7664{
7665static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7666test_array [0] = 0
7667
7668 ;
7669 return 0;
7670}
7671_ACEOF
7672rm -f conftest.$ac_objext
7673if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7674 (eval $ac_compile) 2>&5
7675 ac_status=$?
7676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7677 (exit $ac_status); } &&
7678 { ac_try='test -s conftest.$ac_objext'
7679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7680 (eval $ac_try) 2>&5
7681 ac_status=$?
7682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7683 (exit $ac_status); }; }; then
7684 ac_lo=0 ac_mid=0
7685 while :; do
7686 cat >conftest.$ac_ext <<_ACEOF
7687#line $LINENO "configure"
7688#include "confdefs.h"
7689$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007690#ifdef F77_DUMMY_MAIN
7691# ifdef __cplusplus
7692 extern "C"
7693# endif
7694 int F77_DUMMY_MAIN() { return 1; }
7695#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007696int
7697main ()
7698{
7699static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7700test_array [0] = 0
7701
7702 ;
7703 return 0;
7704}
7705_ACEOF
7706rm -f conftest.$ac_objext
7707if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7708 (eval $ac_compile) 2>&5
7709 ac_status=$?
7710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7711 (exit $ac_status); } &&
7712 { ac_try='test -s conftest.$ac_objext'
7713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7714 (eval $ac_try) 2>&5
7715 ac_status=$?
7716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7717 (exit $ac_status); }; }; then
7718 ac_hi=$ac_mid; break
7719else
7720 echo "$as_me: failed program was:" >&5
7721cat conftest.$ac_ext >&5
7722ac_lo=`expr $ac_mid + 1`
7723 if test $ac_lo -le $ac_mid; then
7724 ac_lo= ac_hi=
7725 break
7726 fi
7727 ac_mid=`expr 2 '*' $ac_mid + 1`
7728fi
7729rm -f conftest.$ac_objext conftest.$ac_ext
7730 done
7731else
7732 echo "$as_me: failed program was:" >&5
7733cat conftest.$ac_ext >&5
7734cat >conftest.$ac_ext <<_ACEOF
7735#line $LINENO "configure"
7736#include "confdefs.h"
7737$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007738#ifdef F77_DUMMY_MAIN
7739# ifdef __cplusplus
7740 extern "C"
7741# endif
7742 int F77_DUMMY_MAIN() { return 1; }
7743#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007744int
7745main ()
7746{
7747static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7748test_array [0] = 0
7749
7750 ;
7751 return 0;
7752}
7753_ACEOF
7754rm -f conftest.$ac_objext
7755if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7756 (eval $ac_compile) 2>&5
7757 ac_status=$?
7758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7759 (exit $ac_status); } &&
7760 { ac_try='test -s conftest.$ac_objext'
7761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7762 (eval $ac_try) 2>&5
7763 ac_status=$?
7764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7765 (exit $ac_status); }; }; then
7766 ac_hi=-1 ac_mid=-1
7767 while :; do
7768 cat >conftest.$ac_ext <<_ACEOF
7769#line $LINENO "configure"
7770#include "confdefs.h"
7771$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007772#ifdef F77_DUMMY_MAIN
7773# ifdef __cplusplus
7774 extern "C"
7775# endif
7776 int F77_DUMMY_MAIN() { return 1; }
7777#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007778int
7779main ()
7780{
7781static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7782test_array [0] = 0
7783
7784 ;
7785 return 0;
7786}
7787_ACEOF
7788rm -f conftest.$ac_objext
7789if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7790 (eval $ac_compile) 2>&5
7791 ac_status=$?
7792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7793 (exit $ac_status); } &&
7794 { ac_try='test -s conftest.$ac_objext'
7795 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7796 (eval $ac_try) 2>&5
7797 ac_status=$?
7798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7799 (exit $ac_status); }; }; then
7800 ac_lo=$ac_mid; break
7801else
7802 echo "$as_me: failed program was:" >&5
7803cat conftest.$ac_ext >&5
7804ac_hi=`expr '(' $ac_mid ')' - 1`
7805 if test $ac_mid -le $ac_hi; then
7806 ac_lo= ac_hi=
7807 break
7808 fi
7809 ac_mid=`expr 2 '*' $ac_mid`
7810fi
7811rm -f conftest.$ac_objext conftest.$ac_ext
7812 done
7813else
7814 echo "$as_me: failed program was:" >&5
7815cat conftest.$ac_ext >&5
7816ac_lo= ac_hi=
7817fi
7818rm -f conftest.$ac_objext conftest.$ac_ext
7819fi
7820rm -f conftest.$ac_objext conftest.$ac_ext
7821# Binary search between lo and hi bounds.
7822while test "x$ac_lo" != "x$ac_hi"; do
7823 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7824 cat >conftest.$ac_ext <<_ACEOF
7825#line $LINENO "configure"
7826#include "confdefs.h"
7827$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007828#ifdef F77_DUMMY_MAIN
7829# ifdef __cplusplus
7830 extern "C"
7831# endif
7832 int F77_DUMMY_MAIN() { return 1; }
7833#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007834int
7835main ()
7836{
7837static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7838test_array [0] = 0
7839
7840 ;
7841 return 0;
7842}
7843_ACEOF
7844rm -f conftest.$ac_objext
7845if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7846 (eval $ac_compile) 2>&5
7847 ac_status=$?
7848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7849 (exit $ac_status); } &&
7850 { ac_try='test -s conftest.$ac_objext'
7851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7852 (eval $ac_try) 2>&5
7853 ac_status=$?
7854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7855 (exit $ac_status); }; }; then
7856 ac_hi=$ac_mid
7857else
7858 echo "$as_me: failed program was:" >&5
7859cat conftest.$ac_ext >&5
7860ac_lo=`expr '(' $ac_mid ')' + 1`
7861fi
7862rm -f conftest.$ac_objext conftest.$ac_ext
7863done
7864case $ac_lo in
7865?*) ac_cv_sizeof_double=$ac_lo;;
7866'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7867echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7868 { (exit 1); exit 1; }; } ;;
7869esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007870else
7871 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007872 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7873echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7874 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007875else
Martin v. Löwis11437992002-04-12 09:54:03 +00007876 cat >conftest.$ac_ext <<_ACEOF
7877#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007878#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007879$ac_includes_default
7880long longval () { return (long) (sizeof (double)); }
7881unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007882#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007883#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00007884#ifdef F77_DUMMY_MAIN
7885# ifdef __cplusplus
7886 extern "C"
7887# endif
7888 int F77_DUMMY_MAIN() { return 1; }
7889#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007890int
7891main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007892{
Martin v. Löwis11437992002-04-12 09:54:03 +00007893
7894 FILE *f = fopen ("conftest.val", "w");
7895 if (! f)
7896 exit (1);
7897 if (((long) (sizeof (double))) < 0)
7898 {
7899 long i = longval ();
7900 if (i != ((long) (sizeof (double))))
7901 exit (1);
7902 fprintf (f, "%ld\n", i);
7903 }
7904 else
7905 {
7906 unsigned long i = ulongval ();
7907 if (i != ((long) (sizeof (double))))
7908 exit (1);
7909 fprintf (f, "%lu\n", i);
7910 }
7911 exit (ferror (f) || fclose (f) != 0);
7912
7913 ;
7914 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007915}
Martin v. Löwis11437992002-04-12 09:54:03 +00007916_ACEOF
7917rm -f conftest$ac_exeext
7918if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7919 (eval $ac_link) 2>&5
7920 ac_status=$?
7921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7922 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7923 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7924 (eval $ac_try) 2>&5
7925 ac_status=$?
7926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7927 (exit $ac_status); }; }; then
7928 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007929else
Martin v. Löwis11437992002-04-12 09:54:03 +00007930 echo "$as_me: program exited with status $ac_status" >&5
7931echo "$as_me: failed program was:" >&5
7932cat conftest.$ac_ext >&5
7933( exit $ac_status )
7934{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7935echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7936 { (exit 1); exit 1; }; }
7937fi
Barry Warsawfe33b792003-01-07 22:42:49 +00007938rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007939fi
7940fi
7941rm -f conftest.val
7942else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007943 ac_cv_sizeof_double=0
7944fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007945fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007946echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7947echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7948cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007949#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007950_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007951
7952
Martin v. Löwis11437992002-04-12 09:54:03 +00007953echo "$as_me:$LINENO: checking for fpos_t" >&5
7954echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7955if test "${ac_cv_type_fpos_t+set}" = set; then
7956 echo $ECHO_N "(cached) $ECHO_C" >&6
7957else
7958 cat >conftest.$ac_ext <<_ACEOF
7959#line $LINENO "configure"
7960#include "confdefs.h"
7961$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007962#ifdef F77_DUMMY_MAIN
7963# ifdef __cplusplus
7964 extern "C"
7965# endif
7966 int F77_DUMMY_MAIN() { return 1; }
7967#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007968int
7969main ()
7970{
7971if ((fpos_t *) 0)
7972 return 0;
7973if (sizeof (fpos_t))
7974 return 0;
7975 ;
7976 return 0;
7977}
7978_ACEOF
7979rm -f conftest.$ac_objext
7980if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7981 (eval $ac_compile) 2>&5
7982 ac_status=$?
7983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7984 (exit $ac_status); } &&
7985 { ac_try='test -s conftest.$ac_objext'
7986 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7987 (eval $ac_try) 2>&5
7988 ac_status=$?
7989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7990 (exit $ac_status); }; }; then
7991 ac_cv_type_fpos_t=yes
7992else
7993 echo "$as_me: failed program was:" >&5
7994cat conftest.$ac_ext >&5
7995ac_cv_type_fpos_t=no
7996fi
7997rm -f conftest.$ac_objext conftest.$ac_ext
7998fi
7999echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
8000echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
8001
8002echo "$as_me:$LINENO: checking size of fpos_t" >&5
8003echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
8004if test "${ac_cv_sizeof_fpos_t+set}" = set; then
8005 echo $ECHO_N "(cached) $ECHO_C" >&6
8006else
8007 if test "$ac_cv_type_fpos_t" = yes; then
8008 # The cast to unsigned long works around a bug in the HP C Compiler
8009 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8010 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8011 # This bug is HP SR number 8606223364.
8012 if test "$cross_compiling" = yes; then
8013 # Depending upon the size, compute the lo and hi bounds.
8014cat >conftest.$ac_ext <<_ACEOF
8015#line $LINENO "configure"
8016#include "confdefs.h"
8017$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008018#ifdef F77_DUMMY_MAIN
8019# ifdef __cplusplus
8020 extern "C"
8021# endif
8022 int F77_DUMMY_MAIN() { return 1; }
8023#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008024int
8025main ()
8026{
8027static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
8028test_array [0] = 0
8029
8030 ;
8031 return 0;
8032}
8033_ACEOF
8034rm -f conftest.$ac_objext
8035if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8036 (eval $ac_compile) 2>&5
8037 ac_status=$?
8038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8039 (exit $ac_status); } &&
8040 { ac_try='test -s conftest.$ac_objext'
8041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8042 (eval $ac_try) 2>&5
8043 ac_status=$?
8044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8045 (exit $ac_status); }; }; then
8046 ac_lo=0 ac_mid=0
8047 while :; do
8048 cat >conftest.$ac_ext <<_ACEOF
8049#line $LINENO "configure"
8050#include "confdefs.h"
8051$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008052#ifdef F77_DUMMY_MAIN
8053# ifdef __cplusplus
8054 extern "C"
8055# endif
8056 int F77_DUMMY_MAIN() { return 1; }
8057#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008058int
8059main ()
8060{
8061static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8062test_array [0] = 0
8063
8064 ;
8065 return 0;
8066}
8067_ACEOF
8068rm -f conftest.$ac_objext
8069if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8070 (eval $ac_compile) 2>&5
8071 ac_status=$?
8072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8073 (exit $ac_status); } &&
8074 { ac_try='test -s conftest.$ac_objext'
8075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8076 (eval $ac_try) 2>&5
8077 ac_status=$?
8078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8079 (exit $ac_status); }; }; then
8080 ac_hi=$ac_mid; break
8081else
8082 echo "$as_me: failed program was:" >&5
8083cat conftest.$ac_ext >&5
8084ac_lo=`expr $ac_mid + 1`
8085 if test $ac_lo -le $ac_mid; then
8086 ac_lo= ac_hi=
8087 break
8088 fi
8089 ac_mid=`expr 2 '*' $ac_mid + 1`
8090fi
8091rm -f conftest.$ac_objext conftest.$ac_ext
8092 done
8093else
8094 echo "$as_me: failed program was:" >&5
8095cat conftest.$ac_ext >&5
8096cat >conftest.$ac_ext <<_ACEOF
8097#line $LINENO "configure"
8098#include "confdefs.h"
8099$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008100#ifdef F77_DUMMY_MAIN
8101# ifdef __cplusplus
8102 extern "C"
8103# endif
8104 int F77_DUMMY_MAIN() { return 1; }
8105#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008106int
8107main ()
8108{
8109static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
8110test_array [0] = 0
8111
8112 ;
8113 return 0;
8114}
8115_ACEOF
8116rm -f conftest.$ac_objext
8117if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8118 (eval $ac_compile) 2>&5
8119 ac_status=$?
8120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8121 (exit $ac_status); } &&
8122 { ac_try='test -s conftest.$ac_objext'
8123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8124 (eval $ac_try) 2>&5
8125 ac_status=$?
8126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8127 (exit $ac_status); }; }; then
8128 ac_hi=-1 ac_mid=-1
8129 while :; do
8130 cat >conftest.$ac_ext <<_ACEOF
8131#line $LINENO "configure"
8132#include "confdefs.h"
8133$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008134#ifdef F77_DUMMY_MAIN
8135# ifdef __cplusplus
8136 extern "C"
8137# endif
8138 int F77_DUMMY_MAIN() { return 1; }
8139#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008140int
8141main ()
8142{
8143static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8144test_array [0] = 0
8145
8146 ;
8147 return 0;
8148}
8149_ACEOF
8150rm -f conftest.$ac_objext
8151if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8152 (eval $ac_compile) 2>&5
8153 ac_status=$?
8154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8155 (exit $ac_status); } &&
8156 { ac_try='test -s conftest.$ac_objext'
8157 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8158 (eval $ac_try) 2>&5
8159 ac_status=$?
8160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8161 (exit $ac_status); }; }; then
8162 ac_lo=$ac_mid; break
8163else
8164 echo "$as_me: failed program was:" >&5
8165cat conftest.$ac_ext >&5
8166ac_hi=`expr '(' $ac_mid ')' - 1`
8167 if test $ac_mid -le $ac_hi; then
8168 ac_lo= ac_hi=
8169 break
8170 fi
8171 ac_mid=`expr 2 '*' $ac_mid`
8172fi
8173rm -f conftest.$ac_objext conftest.$ac_ext
8174 done
8175else
8176 echo "$as_me: failed program was:" >&5
8177cat conftest.$ac_ext >&5
8178ac_lo= ac_hi=
8179fi
8180rm -f conftest.$ac_objext conftest.$ac_ext
8181fi
8182rm -f conftest.$ac_objext conftest.$ac_ext
8183# Binary search between lo and hi bounds.
8184while test "x$ac_lo" != "x$ac_hi"; do
8185 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8186 cat >conftest.$ac_ext <<_ACEOF
8187#line $LINENO "configure"
8188#include "confdefs.h"
8189$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008190#ifdef F77_DUMMY_MAIN
8191# ifdef __cplusplus
8192 extern "C"
8193# endif
8194 int F77_DUMMY_MAIN() { return 1; }
8195#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008196int
8197main ()
8198{
8199static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8200test_array [0] = 0
8201
8202 ;
8203 return 0;
8204}
8205_ACEOF
8206rm -f conftest.$ac_objext
8207if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8208 (eval $ac_compile) 2>&5
8209 ac_status=$?
8210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8211 (exit $ac_status); } &&
8212 { ac_try='test -s conftest.$ac_objext'
8213 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8214 (eval $ac_try) 2>&5
8215 ac_status=$?
8216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8217 (exit $ac_status); }; }; then
8218 ac_hi=$ac_mid
8219else
8220 echo "$as_me: failed program was:" >&5
8221cat conftest.$ac_ext >&5
8222ac_lo=`expr '(' $ac_mid ')' + 1`
8223fi
8224rm -f conftest.$ac_objext conftest.$ac_ext
8225done
8226case $ac_lo in
8227?*) ac_cv_sizeof_fpos_t=$ac_lo;;
8228'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8229echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
8230 { (exit 1); exit 1; }; } ;;
8231esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008232else
8233 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008234 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8235echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8236 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008237else
Martin v. Löwis11437992002-04-12 09:54:03 +00008238 cat >conftest.$ac_ext <<_ACEOF
8239#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008240#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008241$ac_includes_default
8242long longval () { return (long) (sizeof (fpos_t)); }
8243unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008244#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008245#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00008246#ifdef F77_DUMMY_MAIN
8247# ifdef __cplusplus
8248 extern "C"
8249# endif
8250 int F77_DUMMY_MAIN() { return 1; }
8251#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008252int
8253main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008254{
Martin v. Löwis11437992002-04-12 09:54:03 +00008255
8256 FILE *f = fopen ("conftest.val", "w");
8257 if (! f)
8258 exit (1);
8259 if (((long) (sizeof (fpos_t))) < 0)
8260 {
8261 long i = longval ();
8262 if (i != ((long) (sizeof (fpos_t))))
8263 exit (1);
8264 fprintf (f, "%ld\n", i);
8265 }
8266 else
8267 {
8268 unsigned long i = ulongval ();
8269 if (i != ((long) (sizeof (fpos_t))))
8270 exit (1);
8271 fprintf (f, "%lu\n", i);
8272 }
8273 exit (ferror (f) || fclose (f) != 0);
8274
8275 ;
8276 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008277}
Martin v. Löwis11437992002-04-12 09:54:03 +00008278_ACEOF
8279rm -f conftest$ac_exeext
8280if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8281 (eval $ac_link) 2>&5
8282 ac_status=$?
8283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8284 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8285 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8286 (eval $ac_try) 2>&5
8287 ac_status=$?
8288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8289 (exit $ac_status); }; }; then
8290 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008291else
Martin v. Löwis11437992002-04-12 09:54:03 +00008292 echo "$as_me: program exited with status $ac_status" >&5
8293echo "$as_me: failed program was:" >&5
8294cat conftest.$ac_ext >&5
8295( exit $ac_status )
8296{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8297echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
8298 { (exit 1); exit 1; }; }
8299fi
Barry Warsawfe33b792003-01-07 22:42:49 +00008300rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008301fi
8302fi
8303rm -f conftest.val
8304else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008305 ac_cv_sizeof_fpos_t=0
8306fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008307fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008308echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8309echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8310cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008311#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008312_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008313
Michael W. Hudson54241132001-12-07 15:38:26 +00008314
8315
Martin v. Löwis11437992002-04-12 09:54:03 +00008316echo "$as_me:$LINENO: checking for long long support" >&5
8317echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008318have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008319cat >conftest.$ac_ext <<_ACEOF
8320#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008321#include "confdefs.h"
8322
Barry Warsawfe33b792003-01-07 22:42:49 +00008323#ifdef F77_DUMMY_MAIN
8324# ifdef __cplusplus
8325 extern "C"
8326# endif
8327 int F77_DUMMY_MAIN() { return 1; }
8328#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008329int
8330main ()
8331{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008332long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008333 ;
8334 return 0;
8335}
8336_ACEOF
8337rm -f conftest.$ac_objext
8338if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8339 (eval $ac_compile) 2>&5
8340 ac_status=$?
8341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8342 (exit $ac_status); } &&
8343 { ac_try='test -s conftest.$ac_objext'
8344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8345 (eval $ac_try) 2>&5
8346 ac_status=$?
8347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8348 (exit $ac_status); }; }; then
8349
8350
8351cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008352#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008353_ACEOF
8354
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008355 have_long_long=yes
8356
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008357else
Martin v. Löwis11437992002-04-12 09:54:03 +00008358 echo "$as_me: failed program was:" >&5
8359cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008360fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008361rm -f conftest.$ac_objext conftest.$ac_ext
8362echo "$as_me:$LINENO: result: $have_long_long" >&5
8363echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008364if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008365echo "$as_me:$LINENO: checking for long long" >&5
8366echo $ECHO_N "checking for long long... $ECHO_C" >&6
8367if test "${ac_cv_type_long_long+set}" = set; then
8368 echo $ECHO_N "(cached) $ECHO_C" >&6
8369else
8370 cat >conftest.$ac_ext <<_ACEOF
8371#line $LINENO "configure"
8372#include "confdefs.h"
8373$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008374#ifdef F77_DUMMY_MAIN
8375# ifdef __cplusplus
8376 extern "C"
8377# endif
8378 int F77_DUMMY_MAIN() { return 1; }
8379#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008380int
8381main ()
8382{
8383if ((long long *) 0)
8384 return 0;
8385if (sizeof (long long))
8386 return 0;
8387 ;
8388 return 0;
8389}
8390_ACEOF
8391rm -f conftest.$ac_objext
8392if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8393 (eval $ac_compile) 2>&5
8394 ac_status=$?
8395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8396 (exit $ac_status); } &&
8397 { ac_try='test -s conftest.$ac_objext'
8398 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8399 (eval $ac_try) 2>&5
8400 ac_status=$?
8401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8402 (exit $ac_status); }; }; then
8403 ac_cv_type_long_long=yes
8404else
8405 echo "$as_me: failed program was:" >&5
8406cat conftest.$ac_ext >&5
8407ac_cv_type_long_long=no
8408fi
8409rm -f conftest.$ac_objext conftest.$ac_ext
8410fi
8411echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8412echo "${ECHO_T}$ac_cv_type_long_long" >&6
8413
8414echo "$as_me:$LINENO: checking size of long long" >&5
8415echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8416if test "${ac_cv_sizeof_long_long+set}" = set; then
8417 echo $ECHO_N "(cached) $ECHO_C" >&6
8418else
8419 if test "$ac_cv_type_long_long" = yes; then
8420 # The cast to unsigned long works around a bug in the HP C Compiler
8421 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8422 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8423 # This bug is HP SR number 8606223364.
8424 if test "$cross_compiling" = yes; then
8425 # Depending upon the size, compute the lo and hi bounds.
8426cat >conftest.$ac_ext <<_ACEOF
8427#line $LINENO "configure"
8428#include "confdefs.h"
8429$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008430#ifdef F77_DUMMY_MAIN
8431# ifdef __cplusplus
8432 extern "C"
8433# endif
8434 int F77_DUMMY_MAIN() { return 1; }
8435#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008436int
8437main ()
8438{
8439static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8440test_array [0] = 0
8441
8442 ;
8443 return 0;
8444}
8445_ACEOF
8446rm -f conftest.$ac_objext
8447if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8448 (eval $ac_compile) 2>&5
8449 ac_status=$?
8450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8451 (exit $ac_status); } &&
8452 { ac_try='test -s conftest.$ac_objext'
8453 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8454 (eval $ac_try) 2>&5
8455 ac_status=$?
8456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8457 (exit $ac_status); }; }; then
8458 ac_lo=0 ac_mid=0
8459 while :; do
8460 cat >conftest.$ac_ext <<_ACEOF
8461#line $LINENO "configure"
8462#include "confdefs.h"
8463$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008464#ifdef F77_DUMMY_MAIN
8465# ifdef __cplusplus
8466 extern "C"
8467# endif
8468 int F77_DUMMY_MAIN() { return 1; }
8469#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008470int
8471main ()
8472{
8473static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8474test_array [0] = 0
8475
8476 ;
8477 return 0;
8478}
8479_ACEOF
8480rm -f conftest.$ac_objext
8481if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8482 (eval $ac_compile) 2>&5
8483 ac_status=$?
8484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8485 (exit $ac_status); } &&
8486 { ac_try='test -s conftest.$ac_objext'
8487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8488 (eval $ac_try) 2>&5
8489 ac_status=$?
8490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8491 (exit $ac_status); }; }; then
8492 ac_hi=$ac_mid; break
8493else
8494 echo "$as_me: failed program was:" >&5
8495cat conftest.$ac_ext >&5
8496ac_lo=`expr $ac_mid + 1`
8497 if test $ac_lo -le $ac_mid; then
8498 ac_lo= ac_hi=
8499 break
8500 fi
8501 ac_mid=`expr 2 '*' $ac_mid + 1`
8502fi
8503rm -f conftest.$ac_objext conftest.$ac_ext
8504 done
8505else
8506 echo "$as_me: failed program was:" >&5
8507cat conftest.$ac_ext >&5
8508cat >conftest.$ac_ext <<_ACEOF
8509#line $LINENO "configure"
8510#include "confdefs.h"
8511$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008512#ifdef F77_DUMMY_MAIN
8513# ifdef __cplusplus
8514 extern "C"
8515# endif
8516 int F77_DUMMY_MAIN() { return 1; }
8517#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008518int
8519main ()
8520{
8521static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8522test_array [0] = 0
8523
8524 ;
8525 return 0;
8526}
8527_ACEOF
8528rm -f conftest.$ac_objext
8529if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8530 (eval $ac_compile) 2>&5
8531 ac_status=$?
8532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8533 (exit $ac_status); } &&
8534 { ac_try='test -s conftest.$ac_objext'
8535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8536 (eval $ac_try) 2>&5
8537 ac_status=$?
8538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8539 (exit $ac_status); }; }; then
8540 ac_hi=-1 ac_mid=-1
8541 while :; do
8542 cat >conftest.$ac_ext <<_ACEOF
8543#line $LINENO "configure"
8544#include "confdefs.h"
8545$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008546#ifdef F77_DUMMY_MAIN
8547# ifdef __cplusplus
8548 extern "C"
8549# endif
8550 int F77_DUMMY_MAIN() { return 1; }
8551#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008552int
8553main ()
8554{
8555static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8556test_array [0] = 0
8557
8558 ;
8559 return 0;
8560}
8561_ACEOF
8562rm -f conftest.$ac_objext
8563if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8564 (eval $ac_compile) 2>&5
8565 ac_status=$?
8566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8567 (exit $ac_status); } &&
8568 { ac_try='test -s conftest.$ac_objext'
8569 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8570 (eval $ac_try) 2>&5
8571 ac_status=$?
8572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8573 (exit $ac_status); }; }; then
8574 ac_lo=$ac_mid; break
8575else
8576 echo "$as_me: failed program was:" >&5
8577cat conftest.$ac_ext >&5
8578ac_hi=`expr '(' $ac_mid ')' - 1`
8579 if test $ac_mid -le $ac_hi; then
8580 ac_lo= ac_hi=
8581 break
8582 fi
8583 ac_mid=`expr 2 '*' $ac_mid`
8584fi
8585rm -f conftest.$ac_objext conftest.$ac_ext
8586 done
8587else
8588 echo "$as_me: failed program was:" >&5
8589cat conftest.$ac_ext >&5
8590ac_lo= ac_hi=
8591fi
8592rm -f conftest.$ac_objext conftest.$ac_ext
8593fi
8594rm -f conftest.$ac_objext conftest.$ac_ext
8595# Binary search between lo and hi bounds.
8596while test "x$ac_lo" != "x$ac_hi"; do
8597 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8598 cat >conftest.$ac_ext <<_ACEOF
8599#line $LINENO "configure"
8600#include "confdefs.h"
8601$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008602#ifdef F77_DUMMY_MAIN
8603# ifdef __cplusplus
8604 extern "C"
8605# endif
8606 int F77_DUMMY_MAIN() { return 1; }
8607#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008608int
8609main ()
8610{
8611static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8612test_array [0] = 0
8613
8614 ;
8615 return 0;
8616}
8617_ACEOF
8618rm -f conftest.$ac_objext
8619if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8620 (eval $ac_compile) 2>&5
8621 ac_status=$?
8622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8623 (exit $ac_status); } &&
8624 { ac_try='test -s conftest.$ac_objext'
8625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8626 (eval $ac_try) 2>&5
8627 ac_status=$?
8628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8629 (exit $ac_status); }; }; then
8630 ac_hi=$ac_mid
8631else
8632 echo "$as_me: failed program was:" >&5
8633cat conftest.$ac_ext >&5
8634ac_lo=`expr '(' $ac_mid ')' + 1`
8635fi
8636rm -f conftest.$ac_objext conftest.$ac_ext
8637done
8638case $ac_lo in
8639?*) ac_cv_sizeof_long_long=$ac_lo;;
8640'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8641echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8642 { (exit 1); exit 1; }; } ;;
8643esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008644else
8645 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008646 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8647echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8648 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008649else
Martin v. Löwis11437992002-04-12 09:54:03 +00008650 cat >conftest.$ac_ext <<_ACEOF
8651#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008652#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008653$ac_includes_default
8654long longval () { return (long) (sizeof (long long)); }
8655unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008656#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008657#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00008658#ifdef F77_DUMMY_MAIN
8659# ifdef __cplusplus
8660 extern "C"
8661# endif
8662 int F77_DUMMY_MAIN() { return 1; }
8663#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008664int
8665main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008666{
Martin v. Löwis11437992002-04-12 09:54:03 +00008667
8668 FILE *f = fopen ("conftest.val", "w");
8669 if (! f)
8670 exit (1);
8671 if (((long) (sizeof (long long))) < 0)
8672 {
8673 long i = longval ();
8674 if (i != ((long) (sizeof (long long))))
8675 exit (1);
8676 fprintf (f, "%ld\n", i);
8677 }
8678 else
8679 {
8680 unsigned long i = ulongval ();
8681 if (i != ((long) (sizeof (long long))))
8682 exit (1);
8683 fprintf (f, "%lu\n", i);
8684 }
8685 exit (ferror (f) || fclose (f) != 0);
8686
8687 ;
8688 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008689}
Martin v. Löwis11437992002-04-12 09:54:03 +00008690_ACEOF
8691rm -f conftest$ac_exeext
8692if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8693 (eval $ac_link) 2>&5
8694 ac_status=$?
8695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8696 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8698 (eval $ac_try) 2>&5
8699 ac_status=$?
8700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8701 (exit $ac_status); }; }; then
8702 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008703else
Martin v. Löwis11437992002-04-12 09:54:03 +00008704 echo "$as_me: program exited with status $ac_status" >&5
8705echo "$as_me: failed program was:" >&5
8706cat conftest.$ac_ext >&5
8707( exit $ac_status )
8708{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8709echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8710 { (exit 1); exit 1; }; }
8711fi
Barry Warsawfe33b792003-01-07 22:42:49 +00008712rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008713fi
8714fi
8715rm -f conftest.val
8716else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008717 ac_cv_sizeof_long_long=0
8718fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008719fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008720echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8721echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8722cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008723#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008724_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008725
Michael W. Hudson54241132001-12-07 15:38:26 +00008726
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008727fi
8728
Martin v. Löwis11437992002-04-12 09:54:03 +00008729echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8730echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008731have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008732cat >conftest.$ac_ext <<_ACEOF
8733#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008734#include "confdefs.h"
8735
Barry Warsawfe33b792003-01-07 22:42:49 +00008736#ifdef F77_DUMMY_MAIN
8737# ifdef __cplusplus
8738 extern "C"
8739# endif
8740 int F77_DUMMY_MAIN() { return 1; }
8741#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008742int
8743main ()
8744{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008745uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008746 ;
8747 return 0;
8748}
8749_ACEOF
8750rm -f conftest.$ac_objext
8751if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8752 (eval $ac_compile) 2>&5
8753 ac_status=$?
8754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8755 (exit $ac_status); } &&
8756 { ac_try='test -s conftest.$ac_objext'
8757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8758 (eval $ac_try) 2>&5
8759 ac_status=$?
8760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8761 (exit $ac_status); }; }; then
8762
8763
8764cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008765#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008766_ACEOF
8767
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008768 have_uintptr_t=yes
8769
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008770else
Martin v. Löwis11437992002-04-12 09:54:03 +00008771 echo "$as_me: failed program was:" >&5
8772cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008773fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008774rm -f conftest.$ac_objext conftest.$ac_ext
8775echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8776echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008777if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008778echo "$as_me:$LINENO: checking for uintptr_t" >&5
8779echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8780if test "${ac_cv_type_uintptr_t+set}" = set; then
8781 echo $ECHO_N "(cached) $ECHO_C" >&6
8782else
8783 cat >conftest.$ac_ext <<_ACEOF
8784#line $LINENO "configure"
8785#include "confdefs.h"
8786$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008787#ifdef F77_DUMMY_MAIN
8788# ifdef __cplusplus
8789 extern "C"
8790# endif
8791 int F77_DUMMY_MAIN() { return 1; }
8792#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008793int
8794main ()
8795{
8796if ((uintptr_t *) 0)
8797 return 0;
8798if (sizeof (uintptr_t))
8799 return 0;
8800 ;
8801 return 0;
8802}
8803_ACEOF
8804rm -f conftest.$ac_objext
8805if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8806 (eval $ac_compile) 2>&5
8807 ac_status=$?
8808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8809 (exit $ac_status); } &&
8810 { ac_try='test -s conftest.$ac_objext'
8811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8812 (eval $ac_try) 2>&5
8813 ac_status=$?
8814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8815 (exit $ac_status); }; }; then
8816 ac_cv_type_uintptr_t=yes
8817else
8818 echo "$as_me: failed program was:" >&5
8819cat conftest.$ac_ext >&5
8820ac_cv_type_uintptr_t=no
8821fi
8822rm -f conftest.$ac_objext conftest.$ac_ext
8823fi
8824echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8825echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8826
8827echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8828echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8829if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8830 echo $ECHO_N "(cached) $ECHO_C" >&6
8831else
8832 if test "$ac_cv_type_uintptr_t" = yes; then
8833 # The cast to unsigned long works around a bug in the HP C Compiler
8834 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8835 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8836 # This bug is HP SR number 8606223364.
8837 if test "$cross_compiling" = yes; then
8838 # Depending upon the size, compute the lo and hi bounds.
8839cat >conftest.$ac_ext <<_ACEOF
8840#line $LINENO "configure"
8841#include "confdefs.h"
8842$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008843#ifdef F77_DUMMY_MAIN
8844# ifdef __cplusplus
8845 extern "C"
8846# endif
8847 int F77_DUMMY_MAIN() { return 1; }
8848#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008849int
8850main ()
8851{
8852static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8853test_array [0] = 0
8854
8855 ;
8856 return 0;
8857}
8858_ACEOF
8859rm -f conftest.$ac_objext
8860if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8861 (eval $ac_compile) 2>&5
8862 ac_status=$?
8863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8864 (exit $ac_status); } &&
8865 { ac_try='test -s conftest.$ac_objext'
8866 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8867 (eval $ac_try) 2>&5
8868 ac_status=$?
8869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8870 (exit $ac_status); }; }; then
8871 ac_lo=0 ac_mid=0
8872 while :; do
8873 cat >conftest.$ac_ext <<_ACEOF
8874#line $LINENO "configure"
8875#include "confdefs.h"
8876$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008877#ifdef F77_DUMMY_MAIN
8878# ifdef __cplusplus
8879 extern "C"
8880# endif
8881 int F77_DUMMY_MAIN() { return 1; }
8882#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008883int
8884main ()
8885{
8886static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8887test_array [0] = 0
8888
8889 ;
8890 return 0;
8891}
8892_ACEOF
8893rm -f conftest.$ac_objext
8894if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8895 (eval $ac_compile) 2>&5
8896 ac_status=$?
8897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8898 (exit $ac_status); } &&
8899 { ac_try='test -s conftest.$ac_objext'
8900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8901 (eval $ac_try) 2>&5
8902 ac_status=$?
8903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8904 (exit $ac_status); }; }; then
8905 ac_hi=$ac_mid; break
8906else
8907 echo "$as_me: failed program was:" >&5
8908cat conftest.$ac_ext >&5
8909ac_lo=`expr $ac_mid + 1`
8910 if test $ac_lo -le $ac_mid; then
8911 ac_lo= ac_hi=
8912 break
8913 fi
8914 ac_mid=`expr 2 '*' $ac_mid + 1`
8915fi
8916rm -f conftest.$ac_objext conftest.$ac_ext
8917 done
8918else
8919 echo "$as_me: failed program was:" >&5
8920cat conftest.$ac_ext >&5
8921cat >conftest.$ac_ext <<_ACEOF
8922#line $LINENO "configure"
8923#include "confdefs.h"
8924$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008925#ifdef F77_DUMMY_MAIN
8926# ifdef __cplusplus
8927 extern "C"
8928# endif
8929 int F77_DUMMY_MAIN() { return 1; }
8930#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008931int
8932main ()
8933{
8934static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8935test_array [0] = 0
8936
8937 ;
8938 return 0;
8939}
8940_ACEOF
8941rm -f conftest.$ac_objext
8942if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8943 (eval $ac_compile) 2>&5
8944 ac_status=$?
8945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8946 (exit $ac_status); } &&
8947 { ac_try='test -s conftest.$ac_objext'
8948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8949 (eval $ac_try) 2>&5
8950 ac_status=$?
8951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8952 (exit $ac_status); }; }; then
8953 ac_hi=-1 ac_mid=-1
8954 while :; do
8955 cat >conftest.$ac_ext <<_ACEOF
8956#line $LINENO "configure"
8957#include "confdefs.h"
8958$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008959#ifdef F77_DUMMY_MAIN
8960# ifdef __cplusplus
8961 extern "C"
8962# endif
8963 int F77_DUMMY_MAIN() { return 1; }
8964#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008965int
8966main ()
8967{
8968static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8969test_array [0] = 0
8970
8971 ;
8972 return 0;
8973}
8974_ACEOF
8975rm -f conftest.$ac_objext
8976if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8977 (eval $ac_compile) 2>&5
8978 ac_status=$?
8979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8980 (exit $ac_status); } &&
8981 { ac_try='test -s conftest.$ac_objext'
8982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8983 (eval $ac_try) 2>&5
8984 ac_status=$?
8985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8986 (exit $ac_status); }; }; then
8987 ac_lo=$ac_mid; break
8988else
8989 echo "$as_me: failed program was:" >&5
8990cat conftest.$ac_ext >&5
8991ac_hi=`expr '(' $ac_mid ')' - 1`
8992 if test $ac_mid -le $ac_hi; then
8993 ac_lo= ac_hi=
8994 break
8995 fi
8996 ac_mid=`expr 2 '*' $ac_mid`
8997fi
8998rm -f conftest.$ac_objext conftest.$ac_ext
8999 done
9000else
9001 echo "$as_me: failed program was:" >&5
9002cat conftest.$ac_ext >&5
9003ac_lo= ac_hi=
9004fi
9005rm -f conftest.$ac_objext conftest.$ac_ext
9006fi
9007rm -f conftest.$ac_objext conftest.$ac_ext
9008# Binary search between lo and hi bounds.
9009while test "x$ac_lo" != "x$ac_hi"; do
9010 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9011 cat >conftest.$ac_ext <<_ACEOF
9012#line $LINENO "configure"
9013#include "confdefs.h"
9014$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00009015#ifdef F77_DUMMY_MAIN
9016# ifdef __cplusplus
9017 extern "C"
9018# endif
9019 int F77_DUMMY_MAIN() { return 1; }
9020#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009021int
9022main ()
9023{
9024static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
9025test_array [0] = 0
9026
9027 ;
9028 return 0;
9029}
9030_ACEOF
9031rm -f conftest.$ac_objext
9032if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9033 (eval $ac_compile) 2>&5
9034 ac_status=$?
9035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9036 (exit $ac_status); } &&
9037 { ac_try='test -s conftest.$ac_objext'
9038 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9039 (eval $ac_try) 2>&5
9040 ac_status=$?
9041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9042 (exit $ac_status); }; }; then
9043 ac_hi=$ac_mid
9044else
9045 echo "$as_me: failed program was:" >&5
9046cat conftest.$ac_ext >&5
9047ac_lo=`expr '(' $ac_mid ')' + 1`
9048fi
9049rm -f conftest.$ac_objext conftest.$ac_ext
9050done
9051case $ac_lo in
9052?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
9053'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
9054echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
9055 { (exit 1); exit 1; }; } ;;
9056esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009057else
9058 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009059 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
9060echo "$as_me: error: cannot run test program while cross compiling" >&2;}
9061 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009062else
Martin v. Löwis11437992002-04-12 09:54:03 +00009063 cat >conftest.$ac_ext <<_ACEOF
9064#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009065#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009066$ac_includes_default
9067long longval () { return (long) (sizeof (uintptr_t)); }
9068unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009069#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009070#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00009071#ifdef F77_DUMMY_MAIN
9072# ifdef __cplusplus
9073 extern "C"
9074# endif
9075 int F77_DUMMY_MAIN() { return 1; }
9076#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009077int
9078main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009079{
Martin v. Löwis11437992002-04-12 09:54:03 +00009080
9081 FILE *f = fopen ("conftest.val", "w");
9082 if (! f)
9083 exit (1);
9084 if (((long) (sizeof (uintptr_t))) < 0)
9085 {
9086 long i = longval ();
9087 if (i != ((long) (sizeof (uintptr_t))))
9088 exit (1);
9089 fprintf (f, "%ld\n", i);
9090 }
9091 else
9092 {
9093 unsigned long i = ulongval ();
9094 if (i != ((long) (sizeof (uintptr_t))))
9095 exit (1);
9096 fprintf (f, "%lu\n", i);
9097 }
9098 exit (ferror (f) || fclose (f) != 0);
9099
9100 ;
9101 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009102}
Martin v. Löwis11437992002-04-12 09:54:03 +00009103_ACEOF
9104rm -f conftest$ac_exeext
9105if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9106 (eval $ac_link) 2>&5
9107 ac_status=$?
9108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9109 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9110 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9111 (eval $ac_try) 2>&5
9112 ac_status=$?
9113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9114 (exit $ac_status); }; }; then
9115 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009116else
Martin v. Löwis11437992002-04-12 09:54:03 +00009117 echo "$as_me: program exited with status $ac_status" >&5
9118echo "$as_me: failed program was:" >&5
9119cat conftest.$ac_ext >&5
9120( exit $ac_status )
9121{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
9122echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
9123 { (exit 1); exit 1; }; }
9124fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009125rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009126fi
9127fi
9128rm -f conftest.val
9129else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009130 ac_cv_sizeof_uintptr_t=0
9131fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009132fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009133echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
9134echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
9135cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009136#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009137_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009138
Michael W. Hudson54241132001-12-07 15:38:26 +00009139
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009140fi
9141
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009142# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009143echo "$as_me:$LINENO: checking size of off_t" >&5
9144echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
9145if test "${ac_cv_sizeof_off_t+set}" = set; then
9146 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009147else
9148 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009149 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009150else
Martin v. Löwis11437992002-04-12 09:54:03 +00009151 cat >conftest.$ac_ext <<_ACEOF
9152#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009153#include "confdefs.h"
9154#include <stdio.h>
9155#include <sys/types.h>
9156main()
9157{
9158 FILE *f=fopen("conftestval", "w");
9159 if (!f) exit(1);
9160 fprintf(f, "%d\n", sizeof(off_t));
9161 exit(0);
9162}
Martin v. Löwis11437992002-04-12 09:54:03 +00009163_ACEOF
9164rm -f conftest$ac_exeext
9165if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9166 (eval $ac_link) 2>&5
9167 ac_status=$?
9168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9169 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9170 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9171 (eval $ac_try) 2>&5
9172 ac_status=$?
9173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9174 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009175 ac_cv_sizeof_off_t=`cat conftestval`
9176else
Martin v. Löwis11437992002-04-12 09:54:03 +00009177 echo "$as_me: program exited with status $ac_status" >&5
9178echo "$as_me: failed program was:" >&5
9179cat conftest.$ac_ext >&5
9180( exit $ac_status )
9181ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009182fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009183rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009184fi
9185
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009186fi
9187
Martin v. Löwis11437992002-04-12 09:54:03 +00009188echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
9189echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
9190
9191cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009192#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009193_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009194
Michael W. Hudson54241132001-12-07 15:38:26 +00009195
Martin v. Löwis11437992002-04-12 09:54:03 +00009196echo "$as_me:$LINENO: checking whether to enable large file support" >&5
9197echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009198if test "$have_long_long" = yes -a \
9199 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
9200 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009201
Martin v. Löwis11437992002-04-12 09:54:03 +00009202cat >>confdefs.h <<\_ACEOF
9203#define HAVE_LARGEFILE_SUPPORT 1
9204_ACEOF
9205
9206 echo "$as_me:$LINENO: result: yes" >&5
9207echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009208else
Martin v. Löwis11437992002-04-12 09:54:03 +00009209 echo "$as_me:$LINENO: result: no" >&5
9210echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009211fi
9212
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009213# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009214echo "$as_me:$LINENO: checking size of time_t" >&5
9215echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
9216if test "${ac_cv_sizeof_time_t+set}" = set; then
9217 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009218else
9219 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009220 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009221else
Martin v. Löwis11437992002-04-12 09:54:03 +00009222 cat >conftest.$ac_ext <<_ACEOF
9223#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009224#include "confdefs.h"
9225#include <stdio.h>
9226#include <time.h>
9227main()
9228{
9229 FILE *f=fopen("conftestval", "w");
9230 if (!f) exit(1);
9231 fprintf(f, "%d\n", sizeof(time_t));
9232 exit(0);
9233}
Martin v. Löwis11437992002-04-12 09:54:03 +00009234_ACEOF
9235rm -f conftest$ac_exeext
9236if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9237 (eval $ac_link) 2>&5
9238 ac_status=$?
9239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9240 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9241 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9242 (eval $ac_try) 2>&5
9243 ac_status=$?
9244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9245 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009246 ac_cv_sizeof_time_t=`cat conftestval`
9247else
Martin v. Löwis11437992002-04-12 09:54:03 +00009248 echo "$as_me: program exited with status $ac_status" >&5
9249echo "$as_me: failed program was:" >&5
9250cat conftest.$ac_ext >&5
9251( exit $ac_status )
9252ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009253fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009254rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009255fi
9256
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009257fi
9258
Martin v. Löwis11437992002-04-12 09:54:03 +00009259echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9260echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9261
9262cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009263#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009264_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009265
Michael W. Hudson54241132001-12-07 15:38:26 +00009266
9267
Trent Mick635f6fb2000-08-23 21:33:05 +00009268# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009269ac_save_cc="$CC"
9270if test "$ac_cv_kpthread" = "yes"
9271then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009272elif test "$ac_cv_kthread" = "yes"
9273then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009274elif test "$ac_cv_pthread" = "yes"
9275then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009276fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009277echo "$as_me:$LINENO: checking for pthread_t" >&5
9278echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009279have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009280cat >conftest.$ac_ext <<_ACEOF
9281#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009282#include "confdefs.h"
9283#include <pthread.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00009284#ifdef F77_DUMMY_MAIN
9285# ifdef __cplusplus
9286 extern "C"
9287# endif
9288 int F77_DUMMY_MAIN() { return 1; }
9289#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009290int
9291main ()
9292{
Guido van Rossum12580492000-09-24 16:47:19 +00009293pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009294 ;
9295 return 0;
9296}
9297_ACEOF
9298rm -f conftest.$ac_objext
9299if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9300 (eval $ac_compile) 2>&5
9301 ac_status=$?
9302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9303 (exit $ac_status); } &&
9304 { ac_try='test -s conftest.$ac_objext'
9305 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9306 (eval $ac_try) 2>&5
9307 ac_status=$?
9308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9309 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009310 have_pthread_t=yes
9311else
Martin v. Löwis11437992002-04-12 09:54:03 +00009312 echo "$as_me: failed program was:" >&5
9313cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00009314fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009315rm -f conftest.$ac_objext conftest.$ac_ext
9316echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9317echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009318if test "$have_pthread_t" = yes ; then
9319 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009320 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9321echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9322 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9323 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009324else
9325 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009326 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009327else
Martin v. Löwis11437992002-04-12 09:54:03 +00009328 cat >conftest.$ac_ext <<_ACEOF
9329#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009330#include "confdefs.h"
9331#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009332#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +00009333 main()
9334 {
9335 FILE *f=fopen("conftestval", "w");
9336 if (!f) exit(1);
9337 fprintf(f, "%d\n", sizeof(pthread_t));
9338 exit(0);
9339 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009340_ACEOF
9341rm -f conftest$ac_exeext
9342if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9343 (eval $ac_link) 2>&5
9344 ac_status=$?
9345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9346 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9348 (eval $ac_try) 2>&5
9349 ac_status=$?
9350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9351 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009352 ac_cv_sizeof_pthread_t=`cat conftestval`
9353else
Martin v. Löwis11437992002-04-12 09:54:03 +00009354 echo "$as_me: program exited with status $ac_status" >&5
9355echo "$as_me: failed program was:" >&5
9356cat conftest.$ac_ext >&5
9357( exit $ac_status )
9358ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009359fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009360rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009361fi
9362
Trent Mick635f6fb2000-08-23 21:33:05 +00009363fi
9364
Martin v. Löwis11437992002-04-12 09:54:03 +00009365 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9366echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9367
9368cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009369#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009370_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009371
9372fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009373CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009374
Martin v. Löwis11437992002-04-12 09:54:03 +00009375echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9376echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009377# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9378if test "${enable_toolbox_glue+set}" = set; then
9379 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009380
Martin v. Löwis11437992002-04-12 09:54:03 +00009381fi;
Jack Jansene578a632001-08-15 01:27:14 +00009382
9383if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009384then
Jack Jansene578a632001-08-15 01:27:14 +00009385 case $ac_sys_system/$ac_sys_release in
9386 Darwin/*)
9387 enable_toolbox_glue="yes";;
9388 *)
9389 enable_toolbox_glue="no";;
9390 esac
9391fi
9392case "$enable_toolbox_glue" in
9393yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009394 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009395 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009396 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009397
9398cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009399#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009400_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009401
9402 ;;
9403*)
9404 extra_frameworks=""
9405 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009406 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009407 ;;
9408esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009409echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9410echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009411
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009412
9413case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009414 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009415 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009416 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00009417 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9418 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009419 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009420 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009421 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00009422 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9423 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009424esac
9425
Martin v. Löwis11437992002-04-12 09:54:03 +00009426echo "$as_me:$LINENO: checking for --enable-framework" >&5
9427echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009428if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009429then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009430 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009431 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009432 # in the build location.
Jack Jansenea0c3822002-08-01 21:57:49 +00009433 LDFLAGS="$LDFLAGS -Wl,-F."
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009434
Martin v. Löwis11437992002-04-12 09:54:03 +00009435cat >>confdefs.h <<\_ACEOF
9436#define WITH_NEXT_FRAMEWORK 1
9437_ACEOF
9438
9439 echo "$as_me:$LINENO: result: yes" >&5
9440echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009441else
Martin v. Löwis11437992002-04-12 09:54:03 +00009442 echo "$as_me:$LINENO: result: no" >&5
9443echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009444fi
9445
Martin v. Löwis11437992002-04-12 09:54:03 +00009446echo "$as_me:$LINENO: checking for dyld" >&5
9447echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009448case $ac_sys_system/$ac_sys_release in
9449 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009450
Martin v. Löwis11437992002-04-12 09:54:03 +00009451cat >>confdefs.h <<\_ACEOF
9452#define WITH_DYLD 1
9453_ACEOF
9454
9455 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9456echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009457 ;;
9458 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009459 echo "$as_me:$LINENO: result: no" >&5
9460echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009461 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009462esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009463
Guido van Rossum0a516c91994-09-12 10:58:40 +00009464# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009465
Michael W. Hudson54241132001-12-07 15:38:26 +00009466
9467
9468
9469
Guido van Rossum0a516c91994-09-12 10:58:40 +00009470# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009471# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009472echo "$as_me:$LINENO: checking SO" >&5
9473echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009474if test -z "$SO"
9475then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009476 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009477 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009478 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009479 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009480 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00009481else
9482 # this might also be a termcap variable, see #610332
9483 echo
9484 echo '====================================================================='
9485 echo '+ +'
9486 echo '+ WARNING: You have set SO in your environment. +'
9487 echo '+ Do you really mean to change the extension for shared libraries? +'
9488 echo '+ Continuing in 10 seconds to let you to ponder. +'
9489 echo '+ +'
9490 echo '====================================================================='
9491 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00009492fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009493echo "$as_me:$LINENO: result: $SO" >&5
9494echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009495# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00009496# -- "ld" on SunOS 4.x.x, "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009497# (Shared libraries in this instance are shared modules to be loaded into
9498# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009499echo "$as_me:$LINENO: checking LDSHARED" >&5
9500echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009501if test -z "$LDSHARED"
9502then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009503 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009504 AIX*)
9505 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009506 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009507 ;;
9508 BeOS*)
9509 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009510 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009511 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009512 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009513 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009514 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009515 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00009516 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009517 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009518 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +00009519 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009520 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009521 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
9522 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009523 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009524 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9525 if test "$enable_framework" ; then
9526 # Link against the framework. All externals should be defined.
9527 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9528 else
9529 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009530 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009531 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009532 Darwin/*)
9533 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9534 if test "$enable_framework" ; then
9535 # Link against the framework. All externals should be defined.
9536 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9537 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009538 # No framework, use the Python app as bundle-loader
9539 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009540 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009541 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009542 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00009543 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009544 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009545 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009546 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009547 then
9548 LDSHARED="cc -shared ${LDFLAGS}"
9549 else
9550 LDSHARED="ld -Bshareable ${LDFLAGS}"
9551 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009552 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009553 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009554 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009555 then LDSHARED='$(CC) -shared'
9556 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009557 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009558 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +00009559 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009560 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009561 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009562 *) LDSHARED="ld";;
9563 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009564fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009565echo "$as_me:$LINENO: result: $LDSHARED" >&5
9566echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009567BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009568# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009569# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009570echo "$as_me:$LINENO: checking CCSHARED" >&5
9571echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009572if test -z "$CCSHARED"
9573then
Guido van Rossum07397971997-04-29 21:49:50 +00009574 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009575 SunOS*) if test "$GCC" = yes;
9576 then CCSHARED="-fPIC";
9577 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009578 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009579 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009580 else CCSHARED="+z";
9581 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009582 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009583 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009584 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009585 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009586 if test "$GCC" = "yes"
9587 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009588 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009589 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009590 SCO_SV*)
9591 if test "$GCC" = "yes"
9592 then CCSHARED="-fPIC"
9593 else CCSHARED="-Kpic -belf"
9594 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009595 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009596 IRIX*/6*) case $CC in
9597 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009598 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009599 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009600 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009601 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009602fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009603echo "$as_me:$LINENO: result: $CCSHARED" >&5
9604echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009605# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009606# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009607echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9608echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009609if test -z "$LINKFORSHARED"
9610then
Guido van Rossum07397971997-04-29 21:49:50 +00009611 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009612 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009613 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009614 LINKFORSHARED="-Wl,-E -Wl,+s";;
9615# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009616 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009617 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009618 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009619 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009620 # -u __dummy makes the linker aware of the objc runtime
9621 # in System.framework; otherwise, __objcInit (referenced in
9622 # crt1.o) gets erroneously defined as common, which breaks dynamic
9623 # loading of any modules which reference it in System.framework.
9624 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9625 # not used by the core itself but which needs to be in the core so
9626 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00009627 # -prebind is no longer used, because it actually seems to give a
9628 # slowdown in stead of a speedup, maybe due to the large number of
9629 # dynamic loads Python does.
9630 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009631 if test "$enable_framework"
9632 then
9633 LINKFORSHARED="$LINKFORSHARED -framework Python"
9634 fi
9635 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009636 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009637 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009638 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009639 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009640 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9641 then
9642 LINKFORSHARED="-Wl,--export-dynamic"
9643 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009644 SunOS/5*) case $CC in
9645 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009646 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009647 then
9648 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009649 fi;;
9650 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009651 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009652fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009653echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9654echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009655
Michael W. Hudson54241132001-12-07 15:38:26 +00009656
Martin v. Löwis11437992002-04-12 09:54:03 +00009657echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9658echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009659if test ! "$LIBRARY" = "$LDLIBRARY"
9660then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009661 case $ac_sys_system in
9662 CYGWIN*)
9663 # Cygwin needs CCSHARED when building extension DLLs
9664 # but not when building the interpreter DLL.
9665 CFLAGSFORSHARED='';;
9666 *)
9667 CFLAGSFORSHARED='$(CCSHARED)'
9668 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009669fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009670echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9671echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009672
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009673# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9674# library (with --enable-shared).
9675# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009676# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9677# if it is not required, since it creates a dependency of the shared library
9678# to LIBS. This, in turn, means that applications linking the shared libpython
9679# don't need to link LIBS explicitly. The default should be only changed
9680# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009681
9682echo "$as_me:$LINENO: checking SHLIBS" >&5
9683echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9684case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009685 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009686 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009687esac
9688echo "$as_me:$LINENO: result: $SHLIBS" >&5
9689echo "${ECHO_T}$SHLIBS" >&6
9690
9691
Guido van Rossum627b2d71993-12-24 10:39:16 +00009692# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009693
9694echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9695echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9696if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9697 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009698else
Martin v. Löwis11437992002-04-12 09:54:03 +00009699 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009700LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009701cat >conftest.$ac_ext <<_ACEOF
9702#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009703#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009704
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009705/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009706#ifdef __cplusplus
9707extern "C"
9708#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009709/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009710 builtin and then its argument prototype would still apply. */
9711char dlopen ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009712#ifdef F77_DUMMY_MAIN
9713# ifdef __cplusplus
9714 extern "C"
9715# endif
9716 int F77_DUMMY_MAIN() { return 1; }
9717#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009718int
9719main ()
9720{
9721dlopen ();
9722 ;
9723 return 0;
9724}
9725_ACEOF
9726rm -f conftest.$ac_objext conftest$ac_exeext
9727if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9728 (eval $ac_link) 2>&5
9729 ac_status=$?
9730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9731 (exit $ac_status); } &&
9732 { ac_try='test -s conftest$ac_exeext'
9733 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9734 (eval $ac_try) 2>&5
9735 ac_status=$?
9736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9737 (exit $ac_status); }; }; then
9738 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009739else
Martin v. Löwis11437992002-04-12 09:54:03 +00009740 echo "$as_me: failed program was:" >&5
9741cat conftest.$ac_ext >&5
9742ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009743fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009744rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9745LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009746fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009747echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9748echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9749if test $ac_cv_lib_dl_dlopen = yes; then
9750 cat >>confdefs.h <<_ACEOF
9751#define HAVE_LIBDL 1
9752_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009753
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009754 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009755
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009756fi
9757 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009758
9759echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9760echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9761if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9762 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009763else
Martin v. Löwis11437992002-04-12 09:54:03 +00009764 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009765LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009766cat >conftest.$ac_ext <<_ACEOF
9767#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009768#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009769
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009770/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009771#ifdef __cplusplus
9772extern "C"
9773#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009774/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009775 builtin and then its argument prototype would still apply. */
9776char shl_load ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009777#ifdef F77_DUMMY_MAIN
9778# ifdef __cplusplus
9779 extern "C"
9780# endif
9781 int F77_DUMMY_MAIN() { return 1; }
9782#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009783int
9784main ()
9785{
9786shl_load ();
9787 ;
9788 return 0;
9789}
9790_ACEOF
9791rm -f conftest.$ac_objext conftest$ac_exeext
9792if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9793 (eval $ac_link) 2>&5
9794 ac_status=$?
9795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9796 (exit $ac_status); } &&
9797 { ac_try='test -s conftest$ac_exeext'
9798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9799 (eval $ac_try) 2>&5
9800 ac_status=$?
9801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9802 (exit $ac_status); }; }; then
9803 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009804else
Martin v. Löwis11437992002-04-12 09:54:03 +00009805 echo "$as_me: failed program was:" >&5
9806cat conftest.$ac_ext >&5
9807ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009808fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009809rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9810LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009811fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009812echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9813echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9814if test $ac_cv_lib_dld_shl_load = yes; then
9815 cat >>confdefs.h <<_ACEOF
9816#define HAVE_LIBDLD 1
9817_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009818
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009819 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009820
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009821fi
9822 # Dynamic linking for HP-UX
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009823echo "$as_me:$LINENO: checking for library containing sem_init" >&5
9824echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9825if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009826 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009827else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009828 ac_func_search_save_LIBS=$LIBS
9829ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009830cat >conftest.$ac_ext <<_ACEOF
9831#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009832#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009833
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009834/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009835#ifdef __cplusplus
9836extern "C"
9837#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009838/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009839 builtin and then its argument prototype would still apply. */
9840char sem_init ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009841#ifdef F77_DUMMY_MAIN
9842# ifdef __cplusplus
9843 extern "C"
9844# endif
9845 int F77_DUMMY_MAIN() { return 1; }
9846#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009847int
9848main ()
9849{
9850sem_init ();
9851 ;
9852 return 0;
9853}
9854_ACEOF
9855rm -f conftest.$ac_objext conftest$ac_exeext
9856if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9857 (eval $ac_link) 2>&5
9858 ac_status=$?
9859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9860 (exit $ac_status); } &&
9861 { ac_try='test -s conftest$ac_exeext'
9862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9863 (eval $ac_try) 2>&5
9864 ac_status=$?
9865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9866 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009867 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009868else
Martin v. Löwis11437992002-04-12 09:54:03 +00009869 echo "$as_me: failed program was:" >&5
9870cat conftest.$ac_ext >&5
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009871fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009872rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009873if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009874 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009875 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9876 cat >conftest.$ac_ext <<_ACEOF
9877#line $LINENO "configure"
9878#include "confdefs.h"
9879
9880/* Override any gcc2 internal prototype to avoid an error. */
9881#ifdef __cplusplus
9882extern "C"
9883#endif
9884/* We use char because int might match the return type of a gcc2
9885 builtin and then its argument prototype would still apply. */
9886char sem_init ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009887#ifdef F77_DUMMY_MAIN
9888# ifdef __cplusplus
9889 extern "C"
9890# endif
9891 int F77_DUMMY_MAIN() { return 1; }
9892#endif
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009893int
9894main ()
9895{
9896sem_init ();
9897 ;
9898 return 0;
9899}
Martin v. Löwis11437992002-04-12 09:54:03 +00009900_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009901rm -f conftest.$ac_objext conftest$ac_exeext
9902if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9903 (eval $ac_link) 2>&5
9904 ac_status=$?
9905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9906 (exit $ac_status); } &&
9907 { ac_try='test -s conftest$ac_exeext'
9908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9909 (eval $ac_try) 2>&5
9910 ac_status=$?
9911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9912 (exit $ac_status); }; }; then
9913 ac_cv_search_sem_init="-l$ac_lib"
9914break
9915else
9916 echo "$as_me: failed program was:" >&5
9917cat conftest.$ac_ext >&5
9918fi
9919rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9920 done
9921fi
9922LIBS=$ac_func_search_save_LIBS
9923fi
9924echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9925echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9926if test "$ac_cv_search_sem_init" != no; then
9927 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009928
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009929fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009930 # 'Real Time' functions on Solaris
9931 # posix4 on Solaris 2.6
9932 # pthread (first!) on Linux
Martin v. Löwis19d17342003-06-14 21:03:05 +00009933# check if we need libintl for locale functions
9934echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
9935echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6
9936if test "${ac_cv_lib_intl_textdomain+set}" = set; then
9937 echo $ECHO_N "(cached) $ECHO_C" >&6
9938else
9939 ac_check_lib_save_LIBS=$LIBS
9940LIBS="-lintl $LIBS"
9941cat >conftest.$ac_ext <<_ACEOF
9942#line $LINENO "configure"
9943#include "confdefs.h"
9944
9945/* Override any gcc2 internal prototype to avoid an error. */
9946#ifdef __cplusplus
9947extern "C"
9948#endif
9949/* We use char because int might match the return type of a gcc2
9950 builtin and then its argument prototype would still apply. */
9951char textdomain ();
9952#ifdef F77_DUMMY_MAIN
9953# ifdef __cplusplus
9954 extern "C"
9955# endif
9956 int F77_DUMMY_MAIN() { return 1; }
9957#endif
9958int
9959main ()
9960{
9961textdomain ();
9962 ;
9963 return 0;
9964}
9965_ACEOF
9966rm -f conftest.$ac_objext conftest$ac_exeext
9967if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9968 (eval $ac_link) 2>&5
9969 ac_status=$?
9970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9971 (exit $ac_status); } &&
9972 { ac_try='test -s conftest$ac_exeext'
9973 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9974 (eval $ac_try) 2>&5
9975 ac_status=$?
9976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9977 (exit $ac_status); }; }; then
9978 ac_cv_lib_intl_textdomain=yes
9979else
9980 echo "$as_me: failed program was:" >&5
9981cat conftest.$ac_ext >&5
9982ac_cv_lib_intl_textdomain=no
9983fi
9984rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9985LIBS=$ac_check_lib_save_LIBS
9986fi
9987echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
9988echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6
9989if test $ac_cv_lib_intl_textdomain = yes; then
9990
9991cat >>confdefs.h <<\_ACEOF
9992#define WITH_LIBINTL 1
9993_ACEOF
9994
9995fi
9996
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009997
9998# checks for system dependent C++ extensions support
9999case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +000010000 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
10001echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
10002 cat >conftest.$ac_ext <<_ACEOF
10003#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010004#include "confdefs.h"
10005#include "/usr/lpp/xlC/include/load.h"
Barry Warsawfe33b792003-01-07 22:42:49 +000010006#ifdef F77_DUMMY_MAIN
10007# ifdef __cplusplus
10008 extern "C"
10009# endif
10010 int F77_DUMMY_MAIN() { return 1; }
10011#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010012int
10013main ()
10014{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010015loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010016 ;
10017 return 0;
10018}
10019_ACEOF
10020rm -f conftest.$ac_objext conftest$ac_exeext
10021if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10022 (eval $ac_link) 2>&5
10023 ac_status=$?
10024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10025 (exit $ac_status); } &&
10026 { ac_try='test -s conftest$ac_exeext'
10027 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10028 (eval $ac_try) 2>&5
10029 ac_status=$?
10030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10031 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010032
Martin v. Löwis11437992002-04-12 09:54:03 +000010033cat >>confdefs.h <<\_ACEOF
10034#define AIX_GENUINE_CPLUSPLUS 1
10035_ACEOF
10036
10037 echo "$as_me:$LINENO: result: yes" >&5
10038echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010039else
Martin v. Löwis11437992002-04-12 09:54:03 +000010040 echo "$as_me: failed program was:" >&5
10041cat conftest.$ac_ext >&5
10042echo "$as_me:$LINENO: result: no" >&5
10043echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010044fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010045rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010046 *) ;;
10047esac
10048
Guido van Rossum70c7f481998-03-26 18:44:10 +000010049# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Martin v. Löwise1172582002-11-13 08:51:19 +000010050# However on SGI IRIX 4, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010051# BeOS' sockets are stashed in libnet.
10052case "$ac_sys_system" in
10053IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +000010054*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010055echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
10056echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
10057if test "${ac_cv_lib_nsl_t_open+set}" = set; then
10058 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010059else
Martin v. Löwis11437992002-04-12 09:54:03 +000010060 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010061LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010062cat >conftest.$ac_ext <<_ACEOF
10063#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010064#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010065
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010066/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010067#ifdef __cplusplus
10068extern "C"
10069#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010070/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010071 builtin and then its argument prototype would still apply. */
10072char t_open ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010073#ifdef F77_DUMMY_MAIN
10074# ifdef __cplusplus
10075 extern "C"
10076# endif
10077 int F77_DUMMY_MAIN() { return 1; }
10078#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010079int
10080main ()
10081{
10082t_open ();
10083 ;
10084 return 0;
10085}
10086_ACEOF
10087rm -f conftest.$ac_objext conftest$ac_exeext
10088if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10089 (eval $ac_link) 2>&5
10090 ac_status=$?
10091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10092 (exit $ac_status); } &&
10093 { ac_try='test -s conftest$ac_exeext'
10094 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10095 (eval $ac_try) 2>&5
10096 ac_status=$?
10097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10098 (exit $ac_status); }; }; then
10099 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010100else
Martin v. Löwis11437992002-04-12 09:54:03 +000010101 echo "$as_me: failed program was:" >&5
10102cat conftest.$ac_ext >&5
10103ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010104fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010105rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10106LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010107fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010108echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
10109echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
10110if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010111 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010112fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010113 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +000010114echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
10115echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
10116if test "${ac_cv_lib_socket_socket+set}" = set; then
10117 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010118else
Martin v. Löwis11437992002-04-12 09:54:03 +000010119 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010120LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010121cat >conftest.$ac_ext <<_ACEOF
10122#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010123#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010124
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010125/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010126#ifdef __cplusplus
10127extern "C"
10128#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010129/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010130 builtin and then its argument prototype would still apply. */
10131char socket ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010132#ifdef F77_DUMMY_MAIN
10133# ifdef __cplusplus
10134 extern "C"
10135# endif
10136 int F77_DUMMY_MAIN() { return 1; }
10137#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010138int
10139main ()
10140{
10141socket ();
10142 ;
10143 return 0;
10144}
10145_ACEOF
10146rm -f conftest.$ac_objext conftest$ac_exeext
10147if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10148 (eval $ac_link) 2>&5
10149 ac_status=$?
10150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10151 (exit $ac_status); } &&
10152 { ac_try='test -s conftest$ac_exeext'
10153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10154 (eval $ac_try) 2>&5
10155 ac_status=$?
10156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10157 (exit $ac_status); }; }; then
10158 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010159else
Martin v. Löwis11437992002-04-12 09:54:03 +000010160 echo "$as_me: failed program was:" >&5
10161cat conftest.$ac_ext >&5
10162ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010163fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010164rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10165LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010166fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010167echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
10168echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
10169if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000010170 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010171fi
10172 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000010173;;
10174esac
10175case "$ac_sys_system" in
10176BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010177echo "$as_me:$LINENO: checking for socket in -lnet" >&5
10178echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
10179if test "${ac_cv_lib_net_socket+set}" = set; then
10180 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010181else
Martin v. Löwis11437992002-04-12 09:54:03 +000010182 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010183LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010184cat >conftest.$ac_ext <<_ACEOF
10185#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010186#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010187
Guido van Rossumad678af1998-10-02 14:42:15 +000010188/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010189#ifdef __cplusplus
10190extern "C"
10191#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010192/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010193 builtin and then its argument prototype would still apply. */
10194char socket ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010195#ifdef F77_DUMMY_MAIN
10196# ifdef __cplusplus
10197 extern "C"
10198# endif
10199 int F77_DUMMY_MAIN() { return 1; }
10200#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010201int
10202main ()
10203{
10204socket ();
10205 ;
10206 return 0;
10207}
10208_ACEOF
10209rm -f conftest.$ac_objext conftest$ac_exeext
10210if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10211 (eval $ac_link) 2>&5
10212 ac_status=$?
10213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10214 (exit $ac_status); } &&
10215 { ac_try='test -s conftest$ac_exeext'
10216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10217 (eval $ac_try) 2>&5
10218 ac_status=$?
10219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10220 (exit $ac_status); }; }; then
10221 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010222else
Martin v. Löwis11437992002-04-12 09:54:03 +000010223 echo "$as_me: failed program was:" >&5
10224cat conftest.$ac_ext >&5
10225ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010226fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010227rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10228LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010229fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010230echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
10231echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
10232if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010233 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010234fi
10235 # BeOS
10236;;
10237esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000010238
Martin v. Löwis11437992002-04-12 09:54:03 +000010239echo "$as_me:$LINENO: checking for --with-libs" >&5
10240echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
10241
Guido van Rossuma68acba1996-07-31 17:36:39 +000010242# Check whether --with-libs or --without-libs was given.
10243if test "${with_libs+set}" = set; then
10244 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000010245
10246echo "$as_me:$LINENO: result: $withval" >&5
10247echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000010248LIBS="$withval $LIBS"
10249
10250else
Martin v. Löwis11437992002-04-12 09:54:03 +000010251 echo "$as_me:$LINENO: result: no" >&5
10252echo "${ECHO_T}no" >&6
10253fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000010254
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010255# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010256
10257
Martin v. Löwis11437992002-04-12 09:54:03 +000010258echo "$as_me:$LINENO: checking for --with-signal-module" >&5
10259echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
10260
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010261# Check whether --with-signal-module or --without-signal-module was given.
10262if test "${with_signal_module+set}" = set; then
10263 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010264
Martin v. Löwis11437992002-04-12 09:54:03 +000010265fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010266
10267if test -z "$with_signal_module"
10268then with_signal_module="yes"
10269fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010270echo "$as_me:$LINENO: result: $with_signal_module" >&5
10271echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010272
10273if test "${with_signal_module}" = "yes"; then
10274 USE_SIGNAL_MODULE=""
10275 SIGNAL_OBJS=""
10276else
10277 USE_SIGNAL_MODULE="#"
10278 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10279fi
10280
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010281# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010282
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010283USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010284
Martin v. Löwis11437992002-04-12 09:54:03 +000010285echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
10286echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
10287
Guido van Rossumec2f0731997-01-22 20:54:01 +000010288
10289# Check whether --with-dec-threads or --without-dec-threads was given.
10290if test "${with_dec_threads+set}" = set; then
10291 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000010292
10293echo "$as_me:$LINENO: result: $withval" >&5
10294echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000010295LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000010296if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000010297 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000010298fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010299else
Martin v. Löwis11437992002-04-12 09:54:03 +000010300 echo "$as_me:$LINENO: result: no" >&5
10301echo "${ECHO_T}no" >&6
10302fi;
10303
10304# Templates for things AC_DEFINEd more than once.
10305# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010306
10307
Martin v. Löwis11437992002-04-12 09:54:03 +000010308
10309
10310
10311
10312
10313echo "$as_me:$LINENO: checking for --with-threads" >&5
10314echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
10315
Guido van Rossumec2f0731997-01-22 20:54:01 +000010316# Check whether --with-threads or --without-threads was given.
10317if test "${with_threads+set}" = set; then
10318 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000010319
Martin v. Löwis11437992002-04-12 09:54:03 +000010320fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000010321
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010322# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010323
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010324# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010325if test "${with_thread+set}" = set; then
10326 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010327 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000010328fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010329
10330if test -z "$with_threads"
10331then with_threads="yes"
10332fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010333echo "$as_me:$LINENO: result: $with_threads" >&5
10334echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010335
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010336
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010337if test "$with_threads" = "no"
10338then
10339 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010340elif test "$ac_cv_pthread_is_default" = yes
10341then
Martin v. Löwis11437992002-04-12 09:54:03 +000010342 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010343#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010344_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010345
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010346 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010347 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010348#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010349_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010350
10351 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010352 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010353elif test "$ac_cv_kpthread" = "yes"
10354then
10355 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010356 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010357#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010358_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010359
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010360 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010361 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010362elif test "$ac_cv_kthread" = "yes"
10363then
10364 CC="$CC -Kthread"
10365 cat >>confdefs.h <<\_ACEOF
10366#define WITH_THREAD 1
10367_ACEOF
10368
10369 posix_threads=yes
10370 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010371elif test "$ac_cv_pthread" = "yes"
10372then
10373 CC="$CC -pthread"
10374 cat >>confdefs.h <<\_ACEOF
10375#define WITH_THREAD 1
10376_ACEOF
10377
10378 posix_threads=yes
10379 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010380else
10381 if test ! -z "$with_threads" -a -d "$with_threads"
10382 then LDFLAGS="$LDFLAGS -L$with_threads"
10383 fi
10384 if test ! -z "$withval" -a -d "$withval"
10385 then LDFLAGS="$LDFLAGS -L$withval"
10386 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010387
10388 # According to the POSIX spec, a pthreads implementation must
10389 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010390 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10391echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10392 cat >conftest.$ac_ext <<_ACEOF
10393#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010394#include "confdefs.h"
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010395
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010396#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010397#ifdef _POSIX_THREADS
10398yes
10399#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010400
10401_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010402if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000010403 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010404 unistd_defines_pthreads=yes
10405else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010406 unistd_defines_pthreads=no
10407fi
10408rm -f conftest*
10409
Martin v. Löwis11437992002-04-12 09:54:03 +000010410 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10411echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010412
Martin v. Löwis11437992002-04-12 09:54:03 +000010413 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010414#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010415_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010416
Martin v. Löwis11437992002-04-12 09:54:03 +000010417 if test "${ac_cv_header_cthreads_h+set}" = set; then
10418 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10419echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10420if test "${ac_cv_header_cthreads_h+set}" = set; then
10421 echo $ECHO_N "(cached) $ECHO_C" >&6
10422fi
10423echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10424echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010425else
Martin v. Löwis11437992002-04-12 09:54:03 +000010426 # Is the header compilable?
10427echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10428echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10429cat >conftest.$ac_ext <<_ACEOF
10430#line $LINENO "configure"
10431#include "confdefs.h"
10432$ac_includes_default
10433#include <cthreads.h>
10434_ACEOF
10435rm -f conftest.$ac_objext
10436if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10437 (eval $ac_compile) 2>&5
10438 ac_status=$?
10439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10440 (exit $ac_status); } &&
10441 { ac_try='test -s conftest.$ac_objext'
10442 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10443 (eval $ac_try) 2>&5
10444 ac_status=$?
10445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10446 (exit $ac_status); }; }; then
10447 ac_header_compiler=yes
10448else
10449 echo "$as_me: failed program was:" >&5
10450cat conftest.$ac_ext >&5
10451ac_header_compiler=no
10452fi
10453rm -f conftest.$ac_objext conftest.$ac_ext
10454echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10455echo "${ECHO_T}$ac_header_compiler" >&6
10456
10457# Is the header present?
10458echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10459echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10460cat >conftest.$ac_ext <<_ACEOF
10461#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010462#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010463#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010464_ACEOF
10465if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10466 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10467 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010468 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010469 rm -f conftest.er1
10470 cat conftest.err >&5
10471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10472 (exit $ac_status); } >/dev/null; then
10473 if test -s conftest.err; then
10474 ac_cpp_err=$ac_c_preproc_warn_flag
10475 else
10476 ac_cpp_err=
10477 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010478else
Martin v. Löwis11437992002-04-12 09:54:03 +000010479 ac_cpp_err=yes
10480fi
10481if test -z "$ac_cpp_err"; then
10482 ac_header_preproc=yes
10483else
10484 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +000010485 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010486 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010487fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010488rm -f conftest.err conftest.$ac_ext
10489echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10490echo "${ECHO_T}$ac_header_preproc" >&6
10491
10492# So? What about this header?
10493case $ac_header_compiler:$ac_header_preproc in
10494 yes:no )
10495 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10496echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10497 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10498echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10499 no:yes )
10500 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10501echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10502 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10503echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10504 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10505echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10506esac
10507echo "$as_me:$LINENO: checking for cthreads.h" >&5
10508echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10509if test "${ac_cv_header_cthreads_h+set}" = set; then
10510 echo $ECHO_N "(cached) $ECHO_C" >&6
10511else
10512 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010513fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010514echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10515echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10516
10517fi
10518if test $ac_cv_header_cthreads_h = yes; then
10519 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010520#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010521_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010522
Martin v. Löwis11437992002-04-12 09:54:03 +000010523 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010524#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010525_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010526
Martin v. Löwis11437992002-04-12 09:54:03 +000010527
10528cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010529#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010530_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010531
10532 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010533 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010534else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010535
Martin v. Löwis11437992002-04-12 09:54:03 +000010536 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10537 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10538echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10539if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10540 echo $ECHO_N "(cached) $ECHO_C" >&6
10541fi
10542echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10543echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010544else
Martin v. Löwis11437992002-04-12 09:54:03 +000010545 # Is the header compilable?
10546echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10547echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10548cat >conftest.$ac_ext <<_ACEOF
10549#line $LINENO "configure"
10550#include "confdefs.h"
10551$ac_includes_default
10552#include <mach/cthreads.h>
10553_ACEOF
10554rm -f conftest.$ac_objext
10555if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10556 (eval $ac_compile) 2>&5
10557 ac_status=$?
10558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10559 (exit $ac_status); } &&
10560 { ac_try='test -s conftest.$ac_objext'
10561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10562 (eval $ac_try) 2>&5
10563 ac_status=$?
10564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10565 (exit $ac_status); }; }; then
10566 ac_header_compiler=yes
10567else
10568 echo "$as_me: failed program was:" >&5
10569cat conftest.$ac_ext >&5
10570ac_header_compiler=no
10571fi
10572rm -f conftest.$ac_objext conftest.$ac_ext
10573echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10574echo "${ECHO_T}$ac_header_compiler" >&6
10575
10576# Is the header present?
10577echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10578echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10579cat >conftest.$ac_ext <<_ACEOF
10580#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010581#include "confdefs.h"
10582#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010583_ACEOF
10584if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10585 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10586 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010587 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010588 rm -f conftest.er1
10589 cat conftest.err >&5
10590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10591 (exit $ac_status); } >/dev/null; then
10592 if test -s conftest.err; then
10593 ac_cpp_err=$ac_c_preproc_warn_flag
10594 else
10595 ac_cpp_err=
10596 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010597else
Martin v. Löwis11437992002-04-12 09:54:03 +000010598 ac_cpp_err=yes
10599fi
10600if test -z "$ac_cpp_err"; then
10601 ac_header_preproc=yes
10602else
10603 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010604 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010605 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010606fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010607rm -f conftest.err conftest.$ac_ext
10608echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10609echo "${ECHO_T}$ac_header_preproc" >&6
10610
10611# So? What about this header?
10612case $ac_header_compiler:$ac_header_preproc in
10613 yes:no )
10614 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10615echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10616 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10617echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10618 no:yes )
10619 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10620echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10621 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10622echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10623 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10624echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10625esac
10626echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10627echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10628if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10629 echo $ECHO_N "(cached) $ECHO_C" >&6
10630else
10631 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010632fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010633echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10634echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10635
10636fi
10637if test $ac_cv_header_mach_cthreads_h = yes; then
10638 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010639#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010640_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010641
Martin v. Löwis11437992002-04-12 09:54:03 +000010642 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010643#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010644_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010645
Martin v. Löwis11437992002-04-12 09:54:03 +000010646
10647cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010648#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010649_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010650
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010651 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010652else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010653
Martin v. Löwis11437992002-04-12 09:54:03 +000010654 echo "$as_me:$LINENO: checking for --with-pth" >&5
10655echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10656
10657# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010658if test "${with_pth+set}" = set; then
10659 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010660 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010661echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010662 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010663#define WITH_THREAD 1
10664_ACEOF
10665
10666
10667cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010668#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010669_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010670
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010671 LIBS="-lpth $LIBS"
10672 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010673else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010674 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010675echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010676
10677 # Just looking for pthread_create in libpthread is not enough:
10678 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10679 # So we really have to include pthread.h, and then link.
10680 _libs=$LIBS
10681 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010682 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10683echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10684 cat >conftest.$ac_ext <<_ACEOF
10685#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010686#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010687#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010688
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010689void * start_routine (void *arg) { exit (0); }
Barry Warsawfe33b792003-01-07 22:42:49 +000010690#ifdef F77_DUMMY_MAIN
10691# ifdef __cplusplus
10692 extern "C"
10693# endif
10694 int F77_DUMMY_MAIN() { return 1; }
10695#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010696int
10697main ()
10698{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010699
10700pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010701 ;
10702 return 0;
10703}
10704_ACEOF
10705rm -f conftest.$ac_objext conftest$ac_exeext
10706if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10707 (eval $ac_link) 2>&5
10708 ac_status=$?
10709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10710 (exit $ac_status); } &&
10711 { ac_try='test -s conftest$ac_exeext'
10712 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10713 (eval $ac_try) 2>&5
10714 ac_status=$?
10715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10716 (exit $ac_status); }; }; then
10717
10718 echo "$as_me:$LINENO: result: yes" >&5
10719echo "${ECHO_T}yes" >&6
10720 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010721#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010722_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010723
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010724 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010725 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010726else
Martin v. Löwis11437992002-04-12 09:54:03 +000010727 echo "$as_me: failed program was:" >&5
10728cat conftest.$ac_ext >&5
10729
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010730 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010731 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10732echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10733if test "${ac_cv_func_pthread_detach+set}" = set; then
10734 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010735else
Martin v. Löwis11437992002-04-12 09:54:03 +000010736 cat >conftest.$ac_ext <<_ACEOF
10737#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010738#include "confdefs.h"
10739/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010740 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010741#include <assert.h>
10742/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010743#ifdef __cplusplus
10744extern "C"
10745#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010746/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010747 builtin and then its argument prototype would still apply. */
10748char pthread_detach ();
10749char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010750
Barry Warsawfe33b792003-01-07 22:42:49 +000010751#ifdef F77_DUMMY_MAIN
10752# ifdef __cplusplus
10753 extern "C"
10754# endif
10755 int F77_DUMMY_MAIN() { return 1; }
10756#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010757int
10758main ()
10759{
Guido van Rossumad678af1998-10-02 14:42:15 +000010760/* The GNU C library defines this for functions which it implements
10761 to always fail with ENOSYS. Some functions are actually named
10762 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010763#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010764choke me
10765#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010766f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +000010767#endif
10768
Martin v. Löwis11437992002-04-12 09:54:03 +000010769 ;
10770 return 0;
10771}
10772_ACEOF
10773rm -f conftest.$ac_objext conftest$ac_exeext
10774if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10775 (eval $ac_link) 2>&5
10776 ac_status=$?
10777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10778 (exit $ac_status); } &&
10779 { ac_try='test -s conftest$ac_exeext'
10780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10781 (eval $ac_try) 2>&5
10782 ac_status=$?
10783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10784 (exit $ac_status); }; }; then
10785 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010786else
Martin v. Löwis11437992002-04-12 09:54:03 +000010787 echo "$as_me: failed program was:" >&5
10788cat conftest.$ac_ext >&5
10789ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010790fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010791rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010792fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010793echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10794echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10795if test $ac_cv_func_pthread_detach = yes; then
10796 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010797#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010798_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010799
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010800 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010801 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010802else
Guido van Rossumad678af1998-10-02 14:42:15 +000010803
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010804 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10805 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10806echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10807if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10808 echo $ECHO_N "(cached) $ECHO_C" >&6
10809fi
10810echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10811echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10812else
10813 # Is the header compilable?
10814echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10815echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10816cat >conftest.$ac_ext <<_ACEOF
10817#line $LINENO "configure"
10818#include "confdefs.h"
10819$ac_includes_default
10820#include <atheos/threads.h>
10821_ACEOF
10822rm -f conftest.$ac_objext
10823if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10824 (eval $ac_compile) 2>&5
10825 ac_status=$?
10826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10827 (exit $ac_status); } &&
10828 { ac_try='test -s conftest.$ac_objext'
10829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10830 (eval $ac_try) 2>&5
10831 ac_status=$?
10832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10833 (exit $ac_status); }; }; then
10834 ac_header_compiler=yes
10835else
10836 echo "$as_me: failed program was:" >&5
10837cat conftest.$ac_ext >&5
10838ac_header_compiler=no
10839fi
10840rm -f conftest.$ac_objext conftest.$ac_ext
10841echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10842echo "${ECHO_T}$ac_header_compiler" >&6
10843
10844# Is the header present?
10845echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10846echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10847cat >conftest.$ac_ext <<_ACEOF
10848#line $LINENO "configure"
10849#include "confdefs.h"
10850#include <atheos/threads.h>
10851_ACEOF
10852if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10853 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10854 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010855 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010856 rm -f conftest.er1
10857 cat conftest.err >&5
10858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10859 (exit $ac_status); } >/dev/null; then
10860 if test -s conftest.err; then
10861 ac_cpp_err=$ac_c_preproc_warn_flag
10862 else
10863 ac_cpp_err=
10864 fi
10865else
10866 ac_cpp_err=yes
10867fi
10868if test -z "$ac_cpp_err"; then
10869 ac_header_preproc=yes
10870else
10871 echo "$as_me: failed program was:" >&5
10872 cat conftest.$ac_ext >&5
10873 ac_header_preproc=no
10874fi
10875rm -f conftest.err conftest.$ac_ext
10876echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10877echo "${ECHO_T}$ac_header_preproc" >&6
10878
10879# So? What about this header?
10880case $ac_header_compiler:$ac_header_preproc in
10881 yes:no )
10882 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10883echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10884 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10885echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10886 no:yes )
10887 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10888echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10889 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10890echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10891 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10892echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10893esac
10894echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10895echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10896if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10897 echo $ECHO_N "(cached) $ECHO_C" >&6
10898else
10899 ac_cv_header_atheos_threads_h=$ac_header_preproc
10900fi
10901echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10902echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10903
10904fi
10905if test $ac_cv_header_atheos_threads_h = yes; then
10906 cat >>confdefs.h <<\_ACEOF
10907#define WITH_THREAD 1
10908_ACEOF
10909
10910
10911cat >>confdefs.h <<\_ACEOF
10912#define ATHEOS_THREADS 1
10913_ACEOF
10914
10915 THREADOBJ="Python/thread.o"
10916else
10917
Martin v. Löwis11437992002-04-12 09:54:03 +000010918 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10919 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10920echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10921if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10922 echo $ECHO_N "(cached) $ECHO_C" >&6
10923fi
10924echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10925echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010926else
Martin v. Löwis11437992002-04-12 09:54:03 +000010927 # Is the header compilable?
10928echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10929echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10930cat >conftest.$ac_ext <<_ACEOF
10931#line $LINENO "configure"
10932#include "confdefs.h"
10933$ac_includes_default
10934#include <kernel/OS.h>
10935_ACEOF
10936rm -f conftest.$ac_objext
10937if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10938 (eval $ac_compile) 2>&5
10939 ac_status=$?
10940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10941 (exit $ac_status); } &&
10942 { ac_try='test -s conftest.$ac_objext'
10943 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10944 (eval $ac_try) 2>&5
10945 ac_status=$?
10946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10947 (exit $ac_status); }; }; then
10948 ac_header_compiler=yes
10949else
10950 echo "$as_me: failed program was:" >&5
10951cat conftest.$ac_ext >&5
10952ac_header_compiler=no
10953fi
10954rm -f conftest.$ac_objext conftest.$ac_ext
10955echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10956echo "${ECHO_T}$ac_header_compiler" >&6
10957
10958# Is the header present?
10959echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10960echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10961cat >conftest.$ac_ext <<_ACEOF
10962#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010963#include "confdefs.h"
10964#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010965_ACEOF
10966if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10967 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10968 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010969 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010970 rm -f conftest.er1
10971 cat conftest.err >&5
10972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10973 (exit $ac_status); } >/dev/null; then
10974 if test -s conftest.err; then
10975 ac_cpp_err=$ac_c_preproc_warn_flag
10976 else
10977 ac_cpp_err=
10978 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010979else
Martin v. Löwis11437992002-04-12 09:54:03 +000010980 ac_cpp_err=yes
10981fi
10982if test -z "$ac_cpp_err"; then
10983 ac_header_preproc=yes
10984else
10985 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010986 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010987 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010988fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010989rm -f conftest.err conftest.$ac_ext
10990echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10991echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010992
Martin v. Löwis11437992002-04-12 09:54:03 +000010993# So? What about this header?
10994case $ac_header_compiler:$ac_header_preproc in
10995 yes:no )
10996 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10997echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10998 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10999echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
11000 no:yes )
11001 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
11002echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
11003 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
11004echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
11005 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
11006echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
11007esac
11008echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
11009echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
11010if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11011 echo $ECHO_N "(cached) $ECHO_C" >&6
11012else
11013 ac_cv_header_kernel_OS_h=$ac_header_preproc
11014fi
11015echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
11016echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
11017
11018fi
11019if test $ac_cv_header_kernel_OS_h = yes; then
11020 cat >>confdefs.h <<\_ACEOF
11021#define WITH_THREAD 1
11022_ACEOF
11023
11024
11025cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011026#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011027_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011028
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011029 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011030else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011031
Martin v. Löwis11437992002-04-12 09:54:03 +000011032 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
11033echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
11034if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
11035 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011036else
Martin v. Löwis11437992002-04-12 09:54:03 +000011037 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011038LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011039cat >conftest.$ac_ext <<_ACEOF
11040#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000011041#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011042
Greg Steinadf63d62000-07-05 10:38:09 +000011043/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011044#ifdef __cplusplus
11045extern "C"
11046#endif
Greg Steinadf63d62000-07-05 10:38:09 +000011047/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011048 builtin and then its argument prototype would still apply. */
11049char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011050#ifdef F77_DUMMY_MAIN
11051# ifdef __cplusplus
11052 extern "C"
11053# endif
11054 int F77_DUMMY_MAIN() { return 1; }
11055#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011056int
11057main ()
11058{
11059pthread_create ();
11060 ;
11061 return 0;
11062}
11063_ACEOF
11064rm -f conftest.$ac_objext conftest$ac_exeext
11065if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11066 (eval $ac_link) 2>&5
11067 ac_status=$?
11068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11069 (exit $ac_status); } &&
11070 { ac_try='test -s conftest$ac_exeext'
11071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11072 (eval $ac_try) 2>&5
11073 ac_status=$?
11074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11075 (exit $ac_status); }; }; then
11076 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000011077else
Martin v. Löwis11437992002-04-12 09:54:03 +000011078 echo "$as_me: failed program was:" >&5
11079cat conftest.$ac_ext >&5
11080ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000011081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011082rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11083LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011084fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011085echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
11086echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
11087if test $ac_cv_lib_pthreads_pthread_create = yes; then
11088 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011089#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011090_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011091
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011092 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011093 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011094 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000011095else
Greg Steinadf63d62000-07-05 10:38:09 +000011096
Martin v. Löwis11437992002-04-12 09:54:03 +000011097 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
11098echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
11099if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
11100 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000011101else
Martin v. Löwis11437992002-04-12 09:54:03 +000011102 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011103LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011104cat >conftest.$ac_ext <<_ACEOF
11105#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000011106#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011107
Guido van Rossum49545951997-12-02 19:28:29 +000011108/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011109#ifdef __cplusplus
11110extern "C"
11111#endif
Guido van Rossum49545951997-12-02 19:28:29 +000011112/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011113 builtin and then its argument prototype would still apply. */
11114char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011115#ifdef F77_DUMMY_MAIN
11116# ifdef __cplusplus
11117 extern "C"
11118# endif
11119 int F77_DUMMY_MAIN() { return 1; }
11120#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011121int
11122main ()
11123{
11124pthread_create ();
11125 ;
11126 return 0;
11127}
11128_ACEOF
11129rm -f conftest.$ac_objext conftest$ac_exeext
11130if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11131 (eval $ac_link) 2>&5
11132 ac_status=$?
11133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11134 (exit $ac_status); } &&
11135 { ac_try='test -s conftest$ac_exeext'
11136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11137 (eval $ac_try) 2>&5
11138 ac_status=$?
11139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11140 (exit $ac_status); }; }; then
11141 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000011142else
Martin v. Löwis11437992002-04-12 09:54:03 +000011143 echo "$as_me: failed program was:" >&5
11144cat conftest.$ac_ext >&5
11145ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000011146fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011147rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11148LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000011149fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011150echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
11151echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
11152if test $ac_cv_lib_c_r_pthread_create = yes; then
11153 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011154#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011155_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011156
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011157 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011158 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011159 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011160else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011161
Martin v. Löwis11437992002-04-12 09:54:03 +000011162 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
11163echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
11164if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
11165 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011166else
Martin v. Löwis11437992002-04-12 09:54:03 +000011167 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011168LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011169cat >conftest.$ac_ext <<_ACEOF
11170#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011171#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011172
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011173/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011174#ifdef __cplusplus
11175extern "C"
11176#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011177/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011178 builtin and then its argument prototype would still apply. */
11179char __d6_pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011180#ifdef F77_DUMMY_MAIN
11181# ifdef __cplusplus
11182 extern "C"
11183# endif
11184 int F77_DUMMY_MAIN() { return 1; }
11185#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011186int
11187main ()
11188{
11189__d6_pthread_create ();
11190 ;
11191 return 0;
11192}
11193_ACEOF
11194rm -f conftest.$ac_objext conftest$ac_exeext
11195if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11196 (eval $ac_link) 2>&5
11197 ac_status=$?
11198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11199 (exit $ac_status); } &&
11200 { ac_try='test -s conftest$ac_exeext'
11201 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11202 (eval $ac_try) 2>&5
11203 ac_status=$?
11204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11205 (exit $ac_status); }; }; then
11206 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011207else
Martin v. Löwis11437992002-04-12 09:54:03 +000011208 echo "$as_me: failed program was:" >&5
11209cat conftest.$ac_ext >&5
11210ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011211fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011212rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11213LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011214fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011215echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
11216echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
11217if test $ac_cv_lib_thread___d6_pthread_create = yes; then
11218 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011219#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011220_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011221
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011222 echo Systems with __d6_pthread_create are not supported anymore.
11223 echo See README
11224 exit 1
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011225 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011226 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011227 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000011228else
Guido van Rossum49545951997-12-02 19:28:29 +000011229
Martin v. Löwis11437992002-04-12 09:54:03 +000011230 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
11231echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
11232if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
11233 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011234else
Martin v. Löwis11437992002-04-12 09:54:03 +000011235 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011236LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011237cat >conftest.$ac_ext <<_ACEOF
11238#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011239#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011240
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011241/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011242#ifdef __cplusplus
11243extern "C"
11244#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011245/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011246 builtin and then its argument prototype would still apply. */
11247char __pthread_create_system ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011248#ifdef F77_DUMMY_MAIN
11249# ifdef __cplusplus
11250 extern "C"
11251# endif
11252 int F77_DUMMY_MAIN() { return 1; }
11253#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011254int
11255main ()
11256{
11257__pthread_create_system ();
11258 ;
11259 return 0;
11260}
11261_ACEOF
11262rm -f conftest.$ac_objext conftest$ac_exeext
11263if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11264 (eval $ac_link) 2>&5
11265 ac_status=$?
11266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11267 (exit $ac_status); } &&
11268 { ac_try='test -s conftest$ac_exeext'
11269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11270 (eval $ac_try) 2>&5
11271 ac_status=$?
11272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11273 (exit $ac_status); }; }; then
11274 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011275else
Martin v. Löwis11437992002-04-12 09:54:03 +000011276 echo "$as_me: failed program was:" >&5
11277cat conftest.$ac_ext >&5
11278ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011279fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011280rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11281LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011282fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011283echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11284echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
11285if test $ac_cv_lib_pthread___pthread_create_system = yes; then
11286 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011287#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011288_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011289
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011290 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011291 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011292 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011293else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011294
Martin v. Löwis11437992002-04-12 09:54:03 +000011295 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
11296echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
11297if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
11298 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000011299else
Martin v. Löwis11437992002-04-12 09:54:03 +000011300 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011301LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011302cat >conftest.$ac_ext <<_ACEOF
11303#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011304#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011305
Guido van Rossumb93a8621998-05-07 13:27:32 +000011306/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011307#ifdef __cplusplus
11308extern "C"
11309#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000011310/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011311 builtin and then its argument prototype would still apply. */
11312char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011313#ifdef F77_DUMMY_MAIN
11314# ifdef __cplusplus
11315 extern "C"
11316# endif
11317 int F77_DUMMY_MAIN() { return 1; }
11318#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011319int
11320main ()
11321{
11322pthread_create ();
11323 ;
11324 return 0;
11325}
11326_ACEOF
11327rm -f conftest.$ac_objext conftest$ac_exeext
11328if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11329 (eval $ac_link) 2>&5
11330 ac_status=$?
11331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11332 (exit $ac_status); } &&
11333 { ac_try='test -s conftest$ac_exeext'
11334 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11335 (eval $ac_try) 2>&5
11336 ac_status=$?
11337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11338 (exit $ac_status); }; }; then
11339 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000011340else
Martin v. Löwis11437992002-04-12 09:54:03 +000011341 echo "$as_me: failed program was:" >&5
11342cat conftest.$ac_ext >&5
11343ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011344fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011345rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11346LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011347fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011348echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
11349echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
11350if test $ac_cv_lib_cma_pthread_create = yes; then
11351 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011352#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011353_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011354
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011355 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011356 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011357 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011358else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011359
Martin v. Löwis130fb172001-07-19 11:00:41 +000011360 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000011361fi
11362
Guido van Rossum627b2d71993-12-24 10:39:16 +000011363
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011364fi
11365
Guido van Rossum0be3e491997-05-22 20:33:33 +000011366fi
11367
Guido van Rossum49545951997-12-02 19:28:29 +000011368fi
11369
Guido van Rossumb93a8621998-05-07 13:27:32 +000011370fi
11371
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011372fi
11373
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011374
Michael W. Hudson54241132001-12-07 15:38:26 +000011375fi
11376
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011377
11378fi
11379
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011380fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011381rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11382fi;
11383fi
11384
11385
11386fi
11387
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011388
Michael W. Hudson54241132001-12-07 15:38:26 +000011389
Martin v. Löwis11437992002-04-12 09:54:03 +000011390 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11391echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11392if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11393 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011394else
Martin v. Löwis11437992002-04-12 09:54:03 +000011395 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011396LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011397cat >conftest.$ac_ext <<_ACEOF
11398#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011399#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011400
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011401/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011402#ifdef __cplusplus
11403extern "C"
11404#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011405/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011406 builtin and then its argument prototype would still apply. */
11407char usconfig ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011408#ifdef F77_DUMMY_MAIN
11409# ifdef __cplusplus
11410 extern "C"
11411# endif
11412 int F77_DUMMY_MAIN() { return 1; }
11413#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011414int
11415main ()
11416{
11417usconfig ();
11418 ;
11419 return 0;
11420}
11421_ACEOF
11422rm -f conftest.$ac_objext conftest$ac_exeext
11423if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11424 (eval $ac_link) 2>&5
11425 ac_status=$?
11426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11427 (exit $ac_status); } &&
11428 { ac_try='test -s conftest$ac_exeext'
11429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11430 (eval $ac_try) 2>&5
11431 ac_status=$?
11432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11433 (exit $ac_status); }; }; then
11434 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011435else
Martin v. Löwis11437992002-04-12 09:54:03 +000011436 echo "$as_me: failed program was:" >&5
11437cat conftest.$ac_ext >&5
11438ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011439fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011440rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11441LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011442fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011443echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11444echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11445if test $ac_cv_lib_mpc_usconfig = yes; then
11446 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011447#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011448_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011449
Martin v. Löwis130fb172001-07-19 11:00:41 +000011450 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011451 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011452 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011453fi
11454
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011455
Neal Norwitza978ab02002-11-02 16:58:05 +000011456 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011457 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11458echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11459if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11460 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011461else
Martin v. Löwis11437992002-04-12 09:54:03 +000011462 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011463LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011464cat >conftest.$ac_ext <<_ACEOF
11465#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011466#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011467
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011468/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011469#ifdef __cplusplus
11470extern "C"
11471#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011472/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011473 builtin and then its argument prototype would still apply. */
11474char thr_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011475#ifdef F77_DUMMY_MAIN
11476# ifdef __cplusplus
11477 extern "C"
11478# endif
11479 int F77_DUMMY_MAIN() { return 1; }
11480#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011481int
11482main ()
11483{
11484thr_create ();
11485 ;
11486 return 0;
11487}
11488_ACEOF
11489rm -f conftest.$ac_objext conftest$ac_exeext
11490if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11491 (eval $ac_link) 2>&5
11492 ac_status=$?
11493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11494 (exit $ac_status); } &&
11495 { ac_try='test -s conftest$ac_exeext'
11496 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11497 (eval $ac_try) 2>&5
11498 ac_status=$?
11499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11500 (exit $ac_status); }; }; then
11501 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011502else
Martin v. Löwis11437992002-04-12 09:54:03 +000011503 echo "$as_me: failed program was:" >&5
11504cat conftest.$ac_ext >&5
11505ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011506fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011507rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11508LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011509fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011510echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11511echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11512if test $ac_cv_lib_thread_thr_create = yes; then
11513 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011514#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011515_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011516
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011517 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011518 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011519 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011520fi
11521
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011522 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011523
Martin v. Löwis130fb172001-07-19 11:00:41 +000011524 if test "$USE_THREAD_MODULE" != "#"
11525 then
11526 # If the above checks didn't disable threads, (at least) OSF1
11527 # needs this '-threads' argument during linking.
11528 case $ac_sys_system in
11529 OSF1) LDLAST=-threads;;
11530 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011531 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011532fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011533
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011534if test "$posix_threads" = "yes"; then
11535 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011536
11537cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011538#define _POSIX_THREADS 1
11539_ACEOF
11540
11541 fi
11542
11543 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11544 case $ac_sys_system/$ac_sys_release in
11545 SunOS/5.6)
11546cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011547#define HAVE_PTHREAD_DESTRUCTOR 1
11548_ACEOF
11549
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011550 ;;
11551 SunOS/5.8)
11552cat >>confdefs.h <<\_ACEOF
11553#define HAVE_BROKEN_POSIX_SEMAPHORES 1
11554_ACEOF
11555
11556 ;;
11557 esac
11558
11559 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11560echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11561 if test "${ac_cv_pthread_system_supported+set}" = set; then
11562 echo $ECHO_N "(cached) $ECHO_C" >&6
11563else
11564 if test "$cross_compiling" = yes; then
11565 ac_cv_pthread_system_supported=no
11566else
11567 cat >conftest.$ac_ext <<_ACEOF
11568#line $LINENO "configure"
11569#include "confdefs.h"
11570#include <pthread.h>
11571 void *foo(void *parm) {
11572 return NULL;
11573 }
11574 main() {
11575 pthread_attr_t attr;
11576 pthread_t id;
11577 if (pthread_attr_init(&attr)) exit(-1);
11578 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
11579 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
11580 exit(0);
11581 }
11582_ACEOF
11583rm -f conftest$ac_exeext
11584if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11585 (eval $ac_link) 2>&5
11586 ac_status=$?
11587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11588 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11590 (eval $ac_try) 2>&5
11591 ac_status=$?
11592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11593 (exit $ac_status); }; }; then
11594 ac_cv_pthread_system_supported=yes
11595else
11596 echo "$as_me: program exited with status $ac_status" >&5
11597echo "$as_me: failed program was:" >&5
11598cat conftest.$ac_ext >&5
11599( exit $ac_status )
11600ac_cv_pthread_system_supported=no
11601fi
11602rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11603fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011604
Guido van Rossum627b2d71993-12-24 10:39:16 +000011605fi
11606
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011607 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11608echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
11609 if test "$ac_cv_pthread_system_supported" = "yes"; then
11610
11611cat >>confdefs.h <<\_ACEOF
11612#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
11613_ACEOF
11614
11615 fi
11616
11617for ac_func in pthread_sigmask
11618do
11619as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11620echo "$as_me:$LINENO: checking for $ac_func" >&5
11621echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11622if eval "test \"\${$as_ac_var+set}\" = set"; then
11623 echo $ECHO_N "(cached) $ECHO_C" >&6
11624else
11625 cat >conftest.$ac_ext <<_ACEOF
11626#line $LINENO "configure"
11627#include "confdefs.h"
11628/* System header to define __stub macros and hopefully few prototypes,
11629 which can conflict with char $ac_func (); below. */
11630#include <assert.h>
11631/* Override any gcc2 internal prototype to avoid an error. */
11632#ifdef __cplusplus
11633extern "C"
11634#endif
11635/* We use char because int might match the return type of a gcc2
11636 builtin and then its argument prototype would still apply. */
11637char $ac_func ();
11638char (*f) ();
11639
11640#ifdef F77_DUMMY_MAIN
11641# ifdef __cplusplus
11642 extern "C"
11643# endif
11644 int F77_DUMMY_MAIN() { return 1; }
11645#endif
11646int
11647main ()
11648{
11649/* The GNU C library defines this for functions which it implements
11650 to always fail with ENOSYS. Some functions are actually named
11651 something starting with __ and the normal name is an alias. */
11652#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11653choke me
11654#else
11655f = $ac_func;
11656#endif
11657
11658 ;
11659 return 0;
11660}
11661_ACEOF
11662rm -f conftest.$ac_objext conftest$ac_exeext
11663if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11664 (eval $ac_link) 2>&5
11665 ac_status=$?
11666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11667 (exit $ac_status); } &&
11668 { ac_try='test -s conftest$ac_exeext'
11669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11670 (eval $ac_try) 2>&5
11671 ac_status=$?
11672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11673 (exit $ac_status); }; }; then
11674 eval "$as_ac_var=yes"
11675else
11676 echo "$as_me: failed program was:" >&5
11677cat conftest.$ac_ext >&5
11678eval "$as_ac_var=no"
11679fi
11680rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11681fi
11682echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11683echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11684if test `eval echo '${'$as_ac_var'}'` = yes; then
11685 cat >>confdefs.h <<_ACEOF
11686#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11687_ACEOF
11688
11689fi
11690done
11691
11692fi
11693
11694
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011695# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011696
11697
11698echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11699echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011700# Check whether --enable-ipv6 or --disable-ipv6 was given.
11701if test "${enable_ipv6+set}" = set; then
11702 enableval="$enable_ipv6"
11703 case "$enableval" in
11704 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011705 echo "$as_me:$LINENO: result: no" >&5
11706echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011707 ipv6=no
11708 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011709 *) echo "$as_me:$LINENO: result: yes" >&5
11710echo "${ECHO_T}yes" >&6
11711 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011712#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011713_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011714
11715 ipv6=yes
11716 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011717 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011718else
Martin v. Löwis11437992002-04-12 09:54:03 +000011719
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011720 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011721 echo "$as_me:$LINENO: result: no" >&5
11722echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011723 ipv6=no
11724
11725else
Martin v. Löwis11437992002-04-12 09:54:03 +000011726 cat >conftest.$ac_ext <<_ACEOF
11727#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011728#include "confdefs.h"
11729 /* AF_INET6 available check */
11730#include <sys/types.h>
11731#include <sys/socket.h>
11732main()
11733{
11734 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11735 exit(1);
11736 else
11737 exit(0);
11738}
11739
Martin v. Löwis11437992002-04-12 09:54:03 +000011740_ACEOF
11741rm -f conftest$ac_exeext
11742if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11743 (eval $ac_link) 2>&5
11744 ac_status=$?
11745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11746 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11747 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11748 (eval $ac_try) 2>&5
11749 ac_status=$?
11750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11751 (exit $ac_status); }; }; then
11752 echo "$as_me:$LINENO: result: yes" >&5
11753echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011754 ipv6=yes
11755else
Martin v. Löwis11437992002-04-12 09:54:03 +000011756 echo "$as_me: program exited with status $ac_status" >&5
11757echo "$as_me: failed program was:" >&5
11758cat conftest.$ac_ext >&5
11759( exit $ac_status )
11760echo "$as_me:$LINENO: result: no" >&5
11761echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011762 ipv6=no
11763fi
Barry Warsawfe33b792003-01-07 22:42:49 +000011764rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011765fi
11766
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011767if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011768 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11769echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11770 cat >conftest.$ac_ext <<_ACEOF
11771#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011772#include "confdefs.h"
11773#include <sys/types.h>
11774#include <netinet/in.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000011775#ifdef F77_DUMMY_MAIN
11776# ifdef __cplusplus
11777 extern "C"
11778# endif
11779 int F77_DUMMY_MAIN() { return 1; }
11780#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011781int
11782main ()
11783{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011784struct sockaddr_in6 x;
11785x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011786 ;
11787 return 0;
11788}
11789_ACEOF
11790rm -f conftest.$ac_objext
11791if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11792 (eval $ac_compile) 2>&5
11793 ac_status=$?
11794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11795 (exit $ac_status); } &&
11796 { ac_try='test -s conftest.$ac_objext'
11797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11798 (eval $ac_try) 2>&5
11799 ac_status=$?
11800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11801 (exit $ac_status); }; }; then
11802 echo "$as_me:$LINENO: result: yes" >&5
11803echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011804 ipv6=yes
11805else
Martin v. Löwis11437992002-04-12 09:54:03 +000011806 echo "$as_me: failed program was:" >&5
11807cat conftest.$ac_ext >&5
11808echo "$as_me:$LINENO: result: no" >&5
11809echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011810 ipv6=no
11811fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011812rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011813fi
11814
11815if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011816 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011817#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011818_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011819
11820fi
11821
Martin v. Löwis11437992002-04-12 09:54:03 +000011822fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011823
11824ipv6type=unknown
11825ipv6lib=none
11826ipv6trylibc=no
11827
11828if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011829 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11830echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011831 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11832 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011833 case $i in
11834 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011835 cat >conftest.$ac_ext <<_ACEOF
11836#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011837#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011838
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011839#include <netinet/in.h>
11840#ifdef IPV6_INRIA_VERSION
11841yes
11842#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011843_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011844if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011845 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011846 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011847fi
11848rm -f conftest*
11849
11850 ;;
11851 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011852 cat >conftest.$ac_ext <<_ACEOF
11853#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011854#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011855
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011856#include <netinet/in.h>
11857#ifdef __KAME__
11858yes
11859#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011860_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011861if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011862 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011863 ipv6type=$i;
11864 ipv6lib=inet6
11865 ipv6libdir=/usr/local/v6/lib
11866 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011867fi
11868rm -f conftest*
11869
11870 ;;
11871 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011872 cat >conftest.$ac_ext <<_ACEOF
11873#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011874#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011875
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011876#include <features.h>
11877#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11878yes
11879#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011880_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011881if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011882 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011883 ipv6type=$i;
11884 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011885fi
11886rm -f conftest*
11887
11888 ;;
11889 linux-inet6)
11890 if test -d /usr/inet6; then
11891 ipv6type=$i
11892 ipv6lib=inet6
11893 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011894 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011895 fi
11896 ;;
11897 solaris)
11898 if test -f /etc/netconfig; then
11899 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11900 ipv6type=$i
11901 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011902 fi
11903 fi
11904 ;;
11905 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011906 cat >conftest.$ac_ext <<_ACEOF
11907#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011908#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011909
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011910#include <sys/param.h>
11911#ifdef _TOSHIBA_INET6
11912yes
11913#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011914_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011915if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011916 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011917 ipv6type=$i;
11918 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011919 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011920fi
11921rm -f conftest*
11922
11923 ;;
11924 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011925 cat >conftest.$ac_ext <<_ACEOF
11926#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011927#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011928
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011929#include </usr/local/v6/include/sys/v6config.h>
11930#ifdef __V6D__
11931yes
11932#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011933_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011934if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011935 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011936 ipv6type=$i;
11937 ipv6lib=v6;
11938 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011939 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011940fi
11941rm -f conftest*
11942
11943 ;;
11944 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011945 cat >conftest.$ac_ext <<_ACEOF
11946#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011947#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011948
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011949#include <sys/param.h>
11950#ifdef _ZETA_MINAMI_INET6
11951yes
11952#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011953_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011954if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011955 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011956 ipv6type=$i;
11957 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011958 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011959fi
11960rm -f conftest*
11961
11962 ;;
11963 esac
11964 if test "$ipv6type" != "unknown"; then
11965 break
11966 fi
11967 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011968 echo "$as_me:$LINENO: result: $ipv6type" >&5
11969echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011970fi
11971
11972if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11973 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11974 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11975 echo "using lib$ipv6lib"
11976 else
11977 if test $ipv6trylibc = "yes"; then
11978 echo "using libc"
11979 else
11980 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11981 echo "You need to fetch lib$ipv6lib.a from appropriate"
11982 echo 'ipv6 kit and compile beforehand.'
11983 exit 1
11984 fi
11985 fi
11986fi
11987
Jack Jansen7b8c7542002-04-14 20:12:41 +000011988# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000011989echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
11990echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000011991
11992# Check whether --with-universal-newlines or --without-universal-newlines was given.
11993if test "${with_universal_newlines+set}" = set; then
11994 withval="$with_universal_newlines"
11995
11996fi;
11997
11998if test -z "$with_universal_newlines"
11999then with_universal_newlines="yes"
12000fi
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000012001if test "$with_universal_newlines" = "no"
Martin v. Löwis03d00d52002-12-19 19:03:31 +000012002then
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000012003 echo --without-universal-newlines is unsupported, see README
12004 exit 1
Martin v. Löwis03d00d52002-12-19 19:03:31 +000012005else
Martin v. Löwise8aea582002-04-16 05:51:02 +000012006
12007cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000012008#define WITH_UNIVERSAL_NEWLINES 1
12009_ACEOF
12010
12011fi
12012echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
12013echo "${ECHO_T}$with_universal_newlines" >&6
12014
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000012015# Check for --with-doc-strings
12016echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
12017echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
12018
12019# Check whether --with-doc-strings or --without-doc-strings was given.
12020if test "${with_doc_strings+set}" = set; then
12021 withval="$with_doc_strings"
12022
12023fi;
12024
12025if test -z "$with_doc_strings"
12026then with_doc_strings="yes"
12027fi
12028if test "$with_doc_strings" != "no"
12029then
12030
12031cat >>confdefs.h <<\_ACEOF
12032#define WITH_DOC_STRINGS 1
12033_ACEOF
12034
12035fi
12036echo "$as_me:$LINENO: result: $with_doc_strings" >&5
12037echo "${ECHO_T}$with_doc_strings" >&6
12038
Neil Schemenauera35c6882001-02-27 04:45:05 +000012039# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000012040echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
12041echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
12042
Neil Schemenauera35c6882001-02-27 04:45:05 +000012043# Check whether --with-pymalloc or --without-pymalloc was given.
12044if test "${with_pymalloc+set}" = set; then
12045 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000012046
Martin v. Löwis11437992002-04-12 09:54:03 +000012047fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000012048
Neil Schemenauer16c22972002-03-22 15:34:49 +000012049if test -z "$with_pymalloc"
12050then with_pymalloc="yes"
12051fi
12052if test "$with_pymalloc" != "no"
12053then
Martin v. Löwis11437992002-04-12 09:54:03 +000012054
12055cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012056#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012057_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012058
12059fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012060echo "$as_me:$LINENO: result: $with_pymalloc" >&5
12061echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000012062
Barry Warsawef82cd72000-06-30 16:21:01 +000012063# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012064echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
12065echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
12066
Barry Warsawef82cd72000-06-30 16:21:01 +000012067# Check whether --with-wctype-functions or --without-wctype-functions was given.
12068if test "${with_wctype_functions+set}" = set; then
12069 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000012070
Barry Warsawef82cd72000-06-30 16:21:01 +000012071if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012072then
12073
12074cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000012075#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012076_ACEOF
12077
12078 echo "$as_me:$LINENO: result: yes" >&5
12079echo "${ECHO_T}yes" >&6
12080else echo "$as_me:$LINENO: result: no" >&5
12081echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000012082fi
12083else
Martin v. Löwis11437992002-04-12 09:54:03 +000012084 echo "$as_me:$LINENO: result: no" >&5
12085echo "${ECHO_T}no" >&6
12086fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000012087
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012088# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000012089
Guido van Rossum98935bf2001-09-05 19:13:16 +000012090DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000012091
Martin v. Löwis11437992002-04-12 09:54:03 +000012092echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
12093echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
12094
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012095# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012096if test "${with_sgi_dl+set}" = set; then
12097 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000012098
12099echo "$as_me:$LINENO: result: $withval" >&5
12100echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000012101echo --with-sgi-dl is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000012102exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012103
12104cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012105#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012106_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000012107
Guido van Rossume97ee181999-12-20 21:27:22 +000012108DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012109dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000012110if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000012111then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000012112else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
12113echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
12114 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012115fi
12116DLINCLDIR=${dldir}
12117LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000012118else
Martin v. Löwis11437992002-04-12 09:54:03 +000012119 echo "$as_me:$LINENO: result: no" >&5
12120echo "${ECHO_T}no" >&6
12121fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000012122
Martin v. Löwis11437992002-04-12 09:54:03 +000012123echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
12124echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000012125
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012126# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012127if test "${with_dl_dld+set}" = set; then
12128 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000012129
12130echo "$as_me:$LINENO: result: $withval" >&5
12131echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000012132echo --with-dl-dld is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000012133exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012134
12135cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012136#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012137_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000012138
Guido van Rossume97ee181999-12-20 21:27:22 +000012139DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012140dldir=`echo "$withval" | sed 's/,.*//'`
12141dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000012142if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000012143then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012144else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&5
12145echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&2;}
12146 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012147fi
12148DLINCLDIR=${dldir}
12149LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000012150else
Martin v. Löwis11437992002-04-12 09:54:03 +000012151 echo "$as_me:$LINENO: result: no" >&5
12152echo "${ECHO_T}no" >&6
12153fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000012154
Guido van Rossume97ee181999-12-20 21:27:22 +000012155# the dlopen() function means we might want to use dynload_shlib.o. some
12156# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012157
Thomas Wouters3a584202000-08-05 23:28:51 +000012158for ac_func in dlopen
12159do
Martin v. Löwis11437992002-04-12 09:54:03 +000012160as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12161echo "$as_me:$LINENO: checking for $ac_func" >&5
12162echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12163if eval "test \"\${$as_ac_var+set}\" = set"; then
12164 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012165else
Martin v. Löwis11437992002-04-12 09:54:03 +000012166 cat >conftest.$ac_ext <<_ACEOF
12167#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000012168#include "confdefs.h"
12169/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012170 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000012171#include <assert.h>
12172/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012173#ifdef __cplusplus
12174extern "C"
12175#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012176/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012177 builtin and then its argument prototype would still apply. */
12178char $ac_func ();
12179char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000012180
Barry Warsawfe33b792003-01-07 22:42:49 +000012181#ifdef F77_DUMMY_MAIN
12182# ifdef __cplusplus
12183 extern "C"
12184# endif
12185 int F77_DUMMY_MAIN() { return 1; }
12186#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012187int
12188main ()
12189{
Guido van Rossume97ee181999-12-20 21:27:22 +000012190/* The GNU C library defines this for functions which it implements
12191 to always fail with ENOSYS. Some functions are actually named
12192 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012193#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000012194choke me
12195#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012196f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000012197#endif
12198
Martin v. Löwis11437992002-04-12 09:54:03 +000012199 ;
12200 return 0;
12201}
12202_ACEOF
12203rm -f conftest.$ac_objext conftest$ac_exeext
12204if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12205 (eval $ac_link) 2>&5
12206 ac_status=$?
12207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12208 (exit $ac_status); } &&
12209 { ac_try='test -s conftest$ac_exeext'
12210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12211 (eval $ac_try) 2>&5
12212 ac_status=$?
12213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12214 (exit $ac_status); }; }; then
12215 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012216else
Martin v. Löwis11437992002-04-12 09:54:03 +000012217 echo "$as_me: failed program was:" >&5
12218cat conftest.$ac_ext >&5
12219eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012220fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012221rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012222fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012223echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12224echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12225if test `eval echo '${'$as_ac_var'}'` = yes; then
12226 cat >>confdefs.h <<_ACEOF
12227#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12228_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012229
Guido van Rossume97ee181999-12-20 21:27:22 +000012230fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012231done
Guido van Rossume97ee181999-12-20 21:27:22 +000012232
Michael W. Hudson54241132001-12-07 15:38:26 +000012233
Guido van Rossume97ee181999-12-20 21:27:22 +000012234# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12235# loading of modules.
12236
Martin v. Löwis11437992002-04-12 09:54:03 +000012237echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
12238echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012239if test -z "$DYNLOADFILE"
12240then
12241 case $ac_sys_system/$ac_sys_release in
12242 AIX*) DYNLOADFILE="dynload_aix.o";;
12243 BeOS*) DYNLOADFILE="dynload_beos.o";;
12244 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000012245 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012246 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000012247 *)
12248 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
12249 # out any dynamic loading
12250 if test "$ac_cv_func_dlopen" = yes
12251 then DYNLOADFILE="dynload_shlib.o"
12252 else DYNLOADFILE="dynload_stub.o"
12253 fi
12254 ;;
12255 esac
12256fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012257echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
12258echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012259if test "$DYNLOADFILE" != "dynload_stub.o"
12260then
Martin v. Löwis11437992002-04-12 09:54:03 +000012261
12262cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012263#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012264_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012265
12266fi
12267
Neil Schemenauer4e425612001-06-19 15:44:15 +000012268# MACHDEP_OBJS can be set to platform-specific object files needed by Python
12269
Michael W. Hudson54241132001-12-07 15:38:26 +000012270
Martin v. Löwis11437992002-04-12 09:54:03 +000012271echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
12272echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012273if test -z "$MACHDEP_OBJS"
12274then
Jack Jansene578a632001-08-15 01:27:14 +000012275 MACHDEP_OBJS=$extra_machdep_objs
12276else
12277 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000012278fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012279echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
12280echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012281
Guido van Rossum627b2d71993-12-24 10:39:16 +000012282# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
Martin v. Löwis9c36c292002-12-21 18:34:06 +000012356
Martin v. Löwisd5843682002-11-21 20:41:28 +000012357for ac_func in alarm chown clock confstr ctermid execv \
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012358 fchdir fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012359 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
12360 getpriority getpwent getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000012361 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000012362 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000012363 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000012364 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000012365 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012366 sigaction siginterrupt sigrelse strftime strptime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000012367 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012368 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000012369do
Martin v. Löwis11437992002-04-12 09:54:03 +000012370as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12371echo "$as_me:$LINENO: checking for $ac_func" >&5
12372echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12373if eval "test \"\${$as_ac_var+set}\" = set"; then
12374 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012375else
Martin v. Löwis11437992002-04-12 09:54:03 +000012376 cat >conftest.$ac_ext <<_ACEOF
12377#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012378#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012379/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012380 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012381#include <assert.h>
12382/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012383#ifdef __cplusplus
12384extern "C"
12385#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012386/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012387 builtin and then its argument prototype would still apply. */
12388char $ac_func ();
12389char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012390
Barry Warsawfe33b792003-01-07 22:42:49 +000012391#ifdef F77_DUMMY_MAIN
12392# ifdef __cplusplus
12393 extern "C"
12394# endif
12395 int F77_DUMMY_MAIN() { return 1; }
12396#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012397int
12398main ()
12399{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012400/* The GNU C library defines this for functions which it implements
12401 to always fail with ENOSYS. Some functions are actually named
12402 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012403#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012404choke me
12405#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012406f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012407#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012408
Martin v. Löwis11437992002-04-12 09:54:03 +000012409 ;
12410 return 0;
12411}
12412_ACEOF
12413rm -f conftest.$ac_objext conftest$ac_exeext
12414if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12415 (eval $ac_link) 2>&5
12416 ac_status=$?
12417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12418 (exit $ac_status); } &&
12419 { ac_try='test -s conftest$ac_exeext'
12420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12421 (eval $ac_try) 2>&5
12422 ac_status=$?
12423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12424 (exit $ac_status); }; }; then
12425 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012426else
Martin v. Löwis11437992002-04-12 09:54:03 +000012427 echo "$as_me: failed program was:" >&5
12428cat conftest.$ac_ext >&5
12429eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012430fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012431rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012432fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012433echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12434echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12435if test `eval echo '${'$as_ac_var'}'` = yes; then
12436 cat >>confdefs.h <<_ACEOF
12437#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12438_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012439
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012440fi
12441done
12442
Michael W. Hudson54241132001-12-07 15:38:26 +000012443
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012444# For some functions, having a definition is not sufficient, since
12445# we want to take their address.
12446echo "$as_me:$LINENO: checking for chroot" >&5
12447echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12448cat >conftest.$ac_ext <<_ACEOF
12449#line $LINENO "configure"
12450#include "confdefs.h"
12451#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012452#ifdef F77_DUMMY_MAIN
12453# ifdef __cplusplus
12454 extern "C"
12455# endif
12456 int F77_DUMMY_MAIN() { return 1; }
12457#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012458int
12459main ()
12460{
12461void *x=chroot
12462 ;
12463 return 0;
12464}
12465_ACEOF
12466rm -f conftest.$ac_objext
12467if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12468 (eval $ac_compile) 2>&5
12469 ac_status=$?
12470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12471 (exit $ac_status); } &&
12472 { ac_try='test -s conftest.$ac_objext'
12473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12474 (eval $ac_try) 2>&5
12475 ac_status=$?
12476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12477 (exit $ac_status); }; }; then
12478
12479cat >>confdefs.h <<\_ACEOF
12480#define HAVE_CHROOT 1
12481_ACEOF
12482
12483 echo "$as_me:$LINENO: result: yes" >&5
12484echo "${ECHO_T}yes" >&6
12485else
12486 echo "$as_me: failed program was:" >&5
12487cat conftest.$ac_ext >&5
12488echo "$as_me:$LINENO: result: no" >&5
12489echo "${ECHO_T}no" >&6
12490
12491fi
12492rm -f conftest.$ac_objext conftest.$ac_ext
12493echo "$as_me:$LINENO: checking for link" >&5
12494echo $ECHO_N "checking for link... $ECHO_C" >&6
12495cat >conftest.$ac_ext <<_ACEOF
12496#line $LINENO "configure"
12497#include "confdefs.h"
12498#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012499#ifdef F77_DUMMY_MAIN
12500# ifdef __cplusplus
12501 extern "C"
12502# endif
12503 int F77_DUMMY_MAIN() { return 1; }
12504#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012505int
12506main ()
12507{
12508void *x=link
12509 ;
12510 return 0;
12511}
12512_ACEOF
12513rm -f conftest.$ac_objext
12514if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12515 (eval $ac_compile) 2>&5
12516 ac_status=$?
12517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12518 (exit $ac_status); } &&
12519 { ac_try='test -s conftest.$ac_objext'
12520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12521 (eval $ac_try) 2>&5
12522 ac_status=$?
12523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12524 (exit $ac_status); }; }; then
12525
12526cat >>confdefs.h <<\_ACEOF
12527#define HAVE_LINK 1
12528_ACEOF
12529
12530 echo "$as_me:$LINENO: result: yes" >&5
12531echo "${ECHO_T}yes" >&6
12532else
12533 echo "$as_me: failed program was:" >&5
12534cat conftest.$ac_ext >&5
12535echo "$as_me:$LINENO: result: no" >&5
12536echo "${ECHO_T}no" >&6
12537
12538fi
12539rm -f conftest.$ac_objext conftest.$ac_ext
12540echo "$as_me:$LINENO: checking for symlink" >&5
12541echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12542cat >conftest.$ac_ext <<_ACEOF
12543#line $LINENO "configure"
12544#include "confdefs.h"
12545#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012546#ifdef F77_DUMMY_MAIN
12547# ifdef __cplusplus
12548 extern "C"
12549# endif
12550 int F77_DUMMY_MAIN() { return 1; }
12551#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012552int
12553main ()
12554{
12555void *x=symlink
12556 ;
12557 return 0;
12558}
12559_ACEOF
12560rm -f conftest.$ac_objext
12561if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12562 (eval $ac_compile) 2>&5
12563 ac_status=$?
12564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12565 (exit $ac_status); } &&
12566 { ac_try='test -s conftest.$ac_objext'
12567 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12568 (eval $ac_try) 2>&5
12569 ac_status=$?
12570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12571 (exit $ac_status); }; }; then
12572
12573cat >>confdefs.h <<\_ACEOF
12574#define HAVE_SYMLINK 1
12575_ACEOF
12576
12577 echo "$as_me:$LINENO: result: yes" >&5
12578echo "${ECHO_T}yes" >&6
12579else
12580 echo "$as_me: failed program was:" >&5
12581cat conftest.$ac_ext >&5
12582echo "$as_me:$LINENO: result: no" >&5
12583echo "${ECHO_T}no" >&6
12584
12585fi
12586rm -f conftest.$ac_objext conftest.$ac_ext
12587
Martin v. Löwisd5843682002-11-21 20:41:28 +000012588# On some systems (eg. FreeBSD 5), we would find a definition of the
12589# functions ctermid_r, setgroups in the library, but no prototype
12590# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12591# address to avoid compiler warnings and potential miscompilations
12592# because of the missing prototypes.
12593
12594echo "$as_me:$LINENO: checking for ctermid_r" >&5
12595echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
12596cat >conftest.$ac_ext <<_ACEOF
12597#line $LINENO "configure"
12598#include "confdefs.h"
12599
12600#include "confdefs.h"
12601#include <stdio.h>
12602
Barry Warsawfe33b792003-01-07 22:42:49 +000012603#ifdef F77_DUMMY_MAIN
12604# ifdef __cplusplus
12605 extern "C"
12606# endif
12607 int F77_DUMMY_MAIN() { return 1; }
12608#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012609int
12610main ()
12611{
12612void* p = ctermid_r
12613 ;
12614 return 0;
12615}
12616_ACEOF
12617rm -f conftest.$ac_objext
12618if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12619 (eval $ac_compile) 2>&5
12620 ac_status=$?
12621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12622 (exit $ac_status); } &&
12623 { ac_try='test -s conftest.$ac_objext'
12624 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12625 (eval $ac_try) 2>&5
12626 ac_status=$?
12627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12628 (exit $ac_status); }; }; then
12629
12630cat >>confdefs.h <<\_ACEOF
12631#define HAVE_CTERMID_R 1
12632_ACEOF
12633
12634 echo "$as_me:$LINENO: result: yes" >&5
12635echo "${ECHO_T}yes" >&6
12636else
12637 echo "$as_me: failed program was:" >&5
12638cat conftest.$ac_ext >&5
12639echo "$as_me:$LINENO: result: no" >&5
12640echo "${ECHO_T}no" >&6
12641
12642fi
12643rm -f conftest.$ac_objext conftest.$ac_ext
12644
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012645echo "$as_me:$LINENO: checking for flock" >&5
12646echo $ECHO_N "checking for flock... $ECHO_C" >&6
12647cat >conftest.$ac_ext <<_ACEOF
12648#line $LINENO "configure"
12649#include "confdefs.h"
12650
12651#include "confdefs.h"
12652#include <sys/file.h>
12653
12654#ifdef F77_DUMMY_MAIN
12655# ifdef __cplusplus
12656 extern "C"
12657# endif
12658 int F77_DUMMY_MAIN() { return 1; }
12659#endif
12660int
12661main ()
12662{
12663void* p = flock
12664 ;
12665 return 0;
12666}
12667_ACEOF
12668rm -f conftest.$ac_objext
12669if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12670 (eval $ac_compile) 2>&5
12671 ac_status=$?
12672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12673 (exit $ac_status); } &&
12674 { ac_try='test -s conftest.$ac_objext'
12675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12676 (eval $ac_try) 2>&5
12677 ac_status=$?
12678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12679 (exit $ac_status); }; }; then
12680
12681cat >>confdefs.h <<\_ACEOF
12682#define HAVE_FLOCK 1
12683_ACEOF
12684
12685 echo "$as_me:$LINENO: result: yes" >&5
12686echo "${ECHO_T}yes" >&6
12687else
12688 echo "$as_me: failed program was:" >&5
12689cat conftest.$ac_ext >&5
12690echo "$as_me:$LINENO: result: no" >&5
12691echo "${ECHO_T}no" >&6
12692
12693fi
12694rm -f conftest.$ac_objext conftest.$ac_ext
12695
12696echo "$as_me:$LINENO: checking for getpagesize" >&5
12697echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
12698cat >conftest.$ac_ext <<_ACEOF
12699#line $LINENO "configure"
12700#include "confdefs.h"
12701
12702#include "confdefs.h"
12703#include <unistd.h>
12704
12705#ifdef F77_DUMMY_MAIN
12706# ifdef __cplusplus
12707 extern "C"
12708# endif
12709 int F77_DUMMY_MAIN() { return 1; }
12710#endif
12711int
12712main ()
12713{
12714void* p = getpagesize
12715 ;
12716 return 0;
12717}
12718_ACEOF
12719rm -f conftest.$ac_objext
12720if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12721 (eval $ac_compile) 2>&5
12722 ac_status=$?
12723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12724 (exit $ac_status); } &&
12725 { ac_try='test -s conftest.$ac_objext'
12726 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12727 (eval $ac_try) 2>&5
12728 ac_status=$?
12729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12730 (exit $ac_status); }; }; then
12731
12732cat >>confdefs.h <<\_ACEOF
12733#define HAVE_GETPAGESIZE 1
12734_ACEOF
12735
12736 echo "$as_me:$LINENO: result: yes" >&5
12737echo "${ECHO_T}yes" >&6
12738else
12739 echo "$as_me: failed program was:" >&5
12740cat conftest.$ac_ext >&5
12741echo "$as_me:$LINENO: result: no" >&5
12742echo "${ECHO_T}no" >&6
12743
12744fi
12745rm -f conftest.$ac_objext conftest.$ac_ext
12746
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012747for ac_prog in true
12748do
12749 # Extract the first word of "$ac_prog", so it can be a program name with args.
12750set dummy $ac_prog; ac_word=$2
12751echo "$as_me:$LINENO: checking for $ac_word" >&5
12752echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12753if test "${ac_cv_prog_TRUE+set}" = set; then
12754 echo $ECHO_N "(cached) $ECHO_C" >&6
12755else
12756 if test -n "$TRUE"; then
12757 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12758else
12759as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12760for as_dir in $PATH
12761do
12762 IFS=$as_save_IFS
12763 test -z "$as_dir" && as_dir=.
12764 for ac_exec_ext in '' $ac_executable_extensions; do
12765 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12766 ac_cv_prog_TRUE="$ac_prog"
12767 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12768 break 2
12769 fi
12770done
12771done
12772
12773fi
12774fi
12775TRUE=$ac_cv_prog_TRUE
12776if test -n "$TRUE"; then
12777 echo "$as_me:$LINENO: result: $TRUE" >&5
12778echo "${ECHO_T}$TRUE" >&6
12779else
12780 echo "$as_me:$LINENO: result: no" >&5
12781echo "${ECHO_T}no" >&6
12782fi
12783
12784 test -n "$TRUE" && break
12785done
12786test -n "$TRUE" || TRUE="/bin/true"
12787
12788
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012789echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
12790echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
12791if test "${ac_cv_lib_c_inet_aton+set}" = set; then
12792 echo $ECHO_N "(cached) $ECHO_C" >&6
12793else
12794 ac_check_lib_save_LIBS=$LIBS
12795LIBS="-lc $LIBS"
12796cat >conftest.$ac_ext <<_ACEOF
12797#line $LINENO "configure"
12798#include "confdefs.h"
12799
12800/* Override any gcc2 internal prototype to avoid an error. */
12801#ifdef __cplusplus
12802extern "C"
12803#endif
12804/* We use char because int might match the return type of a gcc2
12805 builtin and then its argument prototype would still apply. */
12806char inet_aton ();
12807#ifdef F77_DUMMY_MAIN
12808# ifdef __cplusplus
12809 extern "C"
12810# endif
12811 int F77_DUMMY_MAIN() { return 1; }
12812#endif
12813int
12814main ()
12815{
12816inet_aton ();
12817 ;
12818 return 0;
12819}
12820_ACEOF
12821rm -f conftest.$ac_objext conftest$ac_exeext
12822if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12823 (eval $ac_link) 2>&5
12824 ac_status=$?
12825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12826 (exit $ac_status); } &&
12827 { ac_try='test -s conftest$ac_exeext'
12828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12829 (eval $ac_try) 2>&5
12830 ac_status=$?
12831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12832 (exit $ac_status); }; }; then
12833 ac_cv_lib_c_inet_aton=yes
12834else
12835 echo "$as_me: failed program was:" >&5
12836cat conftest.$ac_ext >&5
12837ac_cv_lib_c_inet_aton=no
12838fi
12839rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12840LIBS=$ac_check_lib_save_LIBS
12841fi
12842echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
12843echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
12844if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012845 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012846else
12847
12848echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
12849echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
12850if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
12851 echo $ECHO_N "(cached) $ECHO_C" >&6
12852else
12853 ac_check_lib_save_LIBS=$LIBS
12854LIBS="-lresolv $LIBS"
12855cat >conftest.$ac_ext <<_ACEOF
12856#line $LINENO "configure"
12857#include "confdefs.h"
12858
12859/* Override any gcc2 internal prototype to avoid an error. */
12860#ifdef __cplusplus
12861extern "C"
12862#endif
12863/* We use char because int might match the return type of a gcc2
12864 builtin and then its argument prototype would still apply. */
12865char inet_aton ();
12866#ifdef F77_DUMMY_MAIN
12867# ifdef __cplusplus
12868 extern "C"
12869# endif
12870 int F77_DUMMY_MAIN() { return 1; }
12871#endif
12872int
12873main ()
12874{
12875inet_aton ();
12876 ;
12877 return 0;
12878}
12879_ACEOF
12880rm -f conftest.$ac_objext conftest$ac_exeext
12881if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12882 (eval $ac_link) 2>&5
12883 ac_status=$?
12884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12885 (exit $ac_status); } &&
12886 { ac_try='test -s conftest$ac_exeext'
12887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12888 (eval $ac_try) 2>&5
12889 ac_status=$?
12890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12891 (exit $ac_status); }; }; then
12892 ac_cv_lib_resolv_inet_aton=yes
12893else
12894 echo "$as_me: failed program was:" >&5
12895cat conftest.$ac_ext >&5
12896ac_cv_lib_resolv_inet_aton=no
12897fi
12898rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12899LIBS=$ac_check_lib_save_LIBS
12900fi
12901echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
12902echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
12903if test $ac_cv_lib_resolv_inet_aton = yes; then
12904 cat >>confdefs.h <<_ACEOF
12905#define HAVE_LIBRESOLV 1
12906_ACEOF
12907
12908 LIBS="-lresolv $LIBS"
12909
12910fi
12911
12912
12913fi
12914
12915
Martin v. Löwise9416172003-05-03 10:12:45 +000012916echo "$as_me:$LINENO: checking for hstrerror" >&5
12917echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
12918cat >conftest.$ac_ext <<_ACEOF
12919#line $LINENO "configure"
12920#include "confdefs.h"
12921
12922#include "confdefs.h"
12923#include <netdb.h>
12924
12925#ifdef F77_DUMMY_MAIN
12926# ifdef __cplusplus
12927 extern "C"
12928# endif
12929 int F77_DUMMY_MAIN() { return 1; }
12930#endif
12931int
12932main ()
12933{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012934void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012935 ;
12936 return 0;
12937}
12938_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012939rm -f conftest.$ac_objext conftest$ac_exeext
12940if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12941 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000012942 ac_status=$?
12943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12944 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012945 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000012946 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12947 (eval $ac_try) 2>&5
12948 ac_status=$?
12949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12950 (exit $ac_status); }; }; then
12951
12952cat >>confdefs.h <<\_ACEOF
12953#define HAVE_HSTRERROR 1
12954_ACEOF
12955
12956 echo "$as_me:$LINENO: result: yes" >&5
12957echo "${ECHO_T}yes" >&6
12958else
12959 echo "$as_me: failed program was:" >&5
12960cat conftest.$ac_ext >&5
12961echo "$as_me:$LINENO: result: no" >&5
12962echo "${ECHO_T}no" >&6
12963
12964fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012965rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012966
12967echo "$as_me:$LINENO: checking for inet_aton" >&5
12968echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
12969cat >conftest.$ac_ext <<_ACEOF
12970#line $LINENO "configure"
12971#include "confdefs.h"
12972
12973#include "confdefs.h"
12974#include <sys/socket.h>
12975#include <netinet/in.h>
12976#include <arpa/inet.h>
12977
12978#ifdef F77_DUMMY_MAIN
12979# ifdef __cplusplus
12980 extern "C"
12981# endif
12982 int F77_DUMMY_MAIN() { return 1; }
12983#endif
12984int
12985main ()
12986{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012987void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012988 ;
12989 return 0;
12990}
12991_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012992rm -f conftest.$ac_objext conftest$ac_exeext
12993if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12994 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000012995 ac_status=$?
12996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12997 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012998 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000012999 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13000 (eval $ac_try) 2>&5
13001 ac_status=$?
13002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13003 (exit $ac_status); }; }; then
13004
13005cat >>confdefs.h <<\_ACEOF
13006#define HAVE_INET_ATON 1
13007_ACEOF
13008
13009 echo "$as_me:$LINENO: result: yes" >&5
13010echo "${ECHO_T}yes" >&6
13011else
13012 echo "$as_me: failed program was:" >&5
13013cat conftest.$ac_ext >&5
13014echo "$as_me:$LINENO: result: no" >&5
13015echo "${ECHO_T}no" >&6
13016
13017fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013018rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013019
13020echo "$as_me:$LINENO: checking for inet_pton" >&5
13021echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
13022cat >conftest.$ac_ext <<_ACEOF
13023#line $LINENO "configure"
13024#include "confdefs.h"
13025
13026#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013027#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000013028#include <sys/socket.h>
13029#include <netinet/in.h>
13030#include <arpa/inet.h>
13031
13032#ifdef F77_DUMMY_MAIN
13033# ifdef __cplusplus
13034 extern "C"
13035# endif
13036 int F77_DUMMY_MAIN() { return 1; }
13037#endif
13038int
13039main ()
13040{
13041void* p = inet_pton
13042 ;
13043 return 0;
13044}
13045_ACEOF
13046rm -f conftest.$ac_objext
13047if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13048 (eval $ac_compile) 2>&5
13049 ac_status=$?
13050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13051 (exit $ac_status); } &&
13052 { ac_try='test -s conftest.$ac_objext'
13053 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13054 (eval $ac_try) 2>&5
13055 ac_status=$?
13056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13057 (exit $ac_status); }; }; then
13058
13059cat >>confdefs.h <<\_ACEOF
13060#define HAVE_INET_PTON 1
13061_ACEOF
13062
13063 echo "$as_me:$LINENO: result: yes" >&5
13064echo "${ECHO_T}yes" >&6
13065else
13066 echo "$as_me: failed program was:" >&5
13067cat conftest.$ac_ext >&5
13068echo "$as_me:$LINENO: result: no" >&5
13069echo "${ECHO_T}no" >&6
13070
13071fi
13072rm -f conftest.$ac_objext conftest.$ac_ext
13073
Martin v. Löwisd5843682002-11-21 20:41:28 +000013074echo "$as_me:$LINENO: checking for setgroups" >&5
13075echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
13076cat >conftest.$ac_ext <<_ACEOF
13077#line $LINENO "configure"
13078#include "confdefs.h"
13079
13080#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013081#include <unistd.h>
Martin v. Löwisd5843682002-11-21 20:41:28 +000013082
Barry Warsawfe33b792003-01-07 22:42:49 +000013083#ifdef F77_DUMMY_MAIN
13084# ifdef __cplusplus
13085 extern "C"
13086# endif
13087 int F77_DUMMY_MAIN() { return 1; }
13088#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000013089int
13090main ()
13091{
13092void* p = setgroups
13093 ;
13094 return 0;
13095}
13096_ACEOF
13097rm -f conftest.$ac_objext
13098if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13099 (eval $ac_compile) 2>&5
13100 ac_status=$?
13101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13102 (exit $ac_status); } &&
13103 { ac_try='test -s conftest.$ac_objext'
13104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13105 (eval $ac_try) 2>&5
13106 ac_status=$?
13107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13108 (exit $ac_status); }; }; then
13109
13110cat >>confdefs.h <<\_ACEOF
13111#define HAVE_SETGROUPS 1
13112_ACEOF
13113
13114 echo "$as_me:$LINENO: result: yes" >&5
13115echo "${ECHO_T}yes" >&6
13116else
13117 echo "$as_me: failed program was:" >&5
13118cat conftest.$ac_ext >&5
13119echo "$as_me:$LINENO: result: no" >&5
13120echo "${ECHO_T}no" >&6
13121
13122fi
13123rm -f conftest.$ac_objext conftest.$ac_ext
13124
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013125# check for openpty and forkpty
13126
Martin v. Löwis11437992002-04-12 09:54:03 +000013127
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013128for ac_func in openpty
13129do
Martin v. Löwis11437992002-04-12 09:54:03 +000013130as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13131echo "$as_me:$LINENO: checking for $ac_func" >&5
13132echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13133if eval "test \"\${$as_ac_var+set}\" = set"; then
13134 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013135else
Martin v. Löwis11437992002-04-12 09:54:03 +000013136 cat >conftest.$ac_ext <<_ACEOF
13137#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013138#include "confdefs.h"
13139/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013140 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013141#include <assert.h>
13142/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013143#ifdef __cplusplus
13144extern "C"
13145#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013146/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013147 builtin and then its argument prototype would still apply. */
13148char $ac_func ();
13149char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013150
Barry Warsawfe33b792003-01-07 22:42:49 +000013151#ifdef F77_DUMMY_MAIN
13152# ifdef __cplusplus
13153 extern "C"
13154# endif
13155 int F77_DUMMY_MAIN() { return 1; }
13156#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013157int
13158main ()
13159{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013160/* The GNU C library defines this for functions which it implements
13161 to always fail with ENOSYS. Some functions are actually named
13162 something starting with __ and the normal name is an alias. */
13163#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13164choke me
13165#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013166f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013167#endif
13168
Martin v. Löwis11437992002-04-12 09:54:03 +000013169 ;
13170 return 0;
13171}
13172_ACEOF
13173rm -f conftest.$ac_objext conftest$ac_exeext
13174if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13175 (eval $ac_link) 2>&5
13176 ac_status=$?
13177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13178 (exit $ac_status); } &&
13179 { ac_try='test -s conftest$ac_exeext'
13180 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13181 (eval $ac_try) 2>&5
13182 ac_status=$?
13183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13184 (exit $ac_status); }; }; then
13185 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013186else
Martin v. Löwis11437992002-04-12 09:54:03 +000013187 echo "$as_me: failed program was:" >&5
13188cat conftest.$ac_ext >&5
13189eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013190fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013191rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013192fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013193echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13194echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13195if test `eval echo '${'$as_ac_var'}'` = yes; then
13196 cat >>confdefs.h <<_ACEOF
13197#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13198_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013199
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013200else
Martin v. Löwis11437992002-04-12 09:54:03 +000013201 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
13202echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
13203if test "${ac_cv_lib_util_openpty+set}" = set; then
13204 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013205else
Martin v. Löwis11437992002-04-12 09:54:03 +000013206 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013207LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013208cat >conftest.$ac_ext <<_ACEOF
13209#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013210#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013211
Fred Drake8cef4cf2000-06-28 16:40:38 +000013212/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013213#ifdef __cplusplus
13214extern "C"
13215#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013216/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013217 builtin and then its argument prototype would still apply. */
13218char openpty ();
Barry Warsawfe33b792003-01-07 22:42:49 +000013219#ifdef F77_DUMMY_MAIN
13220# ifdef __cplusplus
13221 extern "C"
13222# endif
13223 int F77_DUMMY_MAIN() { return 1; }
13224#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013225int
13226main ()
13227{
13228openpty ();
13229 ;
13230 return 0;
13231}
13232_ACEOF
13233rm -f conftest.$ac_objext conftest$ac_exeext
13234if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13235 (eval $ac_link) 2>&5
13236 ac_status=$?
13237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13238 (exit $ac_status); } &&
13239 { ac_try='test -s conftest$ac_exeext'
13240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13241 (eval $ac_try) 2>&5
13242 ac_status=$?
13243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13244 (exit $ac_status); }; }; then
13245 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013246else
Martin v. Löwis11437992002-04-12 09:54:03 +000013247 echo "$as_me: failed program was:" >&5
13248cat conftest.$ac_ext >&5
13249ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013250fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013251rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13252LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013253fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013254echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
13255echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
13256if test $ac_cv_lib_util_openpty = yes; then
13257 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013258#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013259_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013260 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013261fi
13262
13263fi
13264done
13265
Martin v. Löwis11437992002-04-12 09:54:03 +000013266
Fred Drake8cef4cf2000-06-28 16:40:38 +000013267for ac_func in forkpty
13268do
Martin v. Löwis11437992002-04-12 09:54:03 +000013269as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13270echo "$as_me:$LINENO: checking for $ac_func" >&5
13271echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13272if eval "test \"\${$as_ac_var+set}\" = set"; then
13273 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013274else
Martin v. Löwis11437992002-04-12 09:54:03 +000013275 cat >conftest.$ac_ext <<_ACEOF
13276#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013277#include "confdefs.h"
13278/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013279 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000013280#include <assert.h>
13281/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013282#ifdef __cplusplus
13283extern "C"
13284#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013285/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013286 builtin and then its argument prototype would still apply. */
13287char $ac_func ();
13288char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000013289
Barry Warsawfe33b792003-01-07 22:42:49 +000013290#ifdef F77_DUMMY_MAIN
13291# ifdef __cplusplus
13292 extern "C"
13293# endif
13294 int F77_DUMMY_MAIN() { return 1; }
13295#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013296int
13297main ()
13298{
Fred Drake8cef4cf2000-06-28 16:40:38 +000013299/* The GNU C library defines this for functions which it implements
13300 to always fail with ENOSYS. Some functions are actually named
13301 something starting with __ and the normal name is an alias. */
13302#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13303choke me
13304#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013305f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000013306#endif
13307
Martin v. Löwis11437992002-04-12 09:54:03 +000013308 ;
13309 return 0;
13310}
13311_ACEOF
13312rm -f conftest.$ac_objext conftest$ac_exeext
13313if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13314 (eval $ac_link) 2>&5
13315 ac_status=$?
13316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13317 (exit $ac_status); } &&
13318 { ac_try='test -s conftest$ac_exeext'
13319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13320 (eval $ac_try) 2>&5
13321 ac_status=$?
13322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13323 (exit $ac_status); }; }; then
13324 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013325else
Martin v. Löwis11437992002-04-12 09:54:03 +000013326 echo "$as_me: failed program was:" >&5
13327cat conftest.$ac_ext >&5
13328eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013329fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013330rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013331fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013332echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13333echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13334if test `eval echo '${'$as_ac_var'}'` = yes; then
13335 cat >>confdefs.h <<_ACEOF
13336#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13337_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013338
Fred Drake8cef4cf2000-06-28 16:40:38 +000013339else
Martin v. Löwis11437992002-04-12 09:54:03 +000013340 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
13341echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
13342if test "${ac_cv_lib_util_forkpty+set}" = set; then
13343 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013344else
Martin v. Löwis11437992002-04-12 09:54:03 +000013345 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013346LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013347cat >conftest.$ac_ext <<_ACEOF
13348#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013349#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013350
Fred Drake8cef4cf2000-06-28 16:40:38 +000013351/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013352#ifdef __cplusplus
13353extern "C"
13354#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013355/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013356 builtin and then its argument prototype would still apply. */
13357char forkpty ();
Barry Warsawfe33b792003-01-07 22:42:49 +000013358#ifdef F77_DUMMY_MAIN
13359# ifdef __cplusplus
13360 extern "C"
13361# endif
13362 int F77_DUMMY_MAIN() { return 1; }
13363#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013364int
13365main ()
13366{
13367forkpty ();
13368 ;
13369 return 0;
13370}
13371_ACEOF
13372rm -f conftest.$ac_objext conftest$ac_exeext
13373if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13374 (eval $ac_link) 2>&5
13375 ac_status=$?
13376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13377 (exit $ac_status); } &&
13378 { ac_try='test -s conftest$ac_exeext'
13379 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13380 (eval $ac_try) 2>&5
13381 ac_status=$?
13382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13383 (exit $ac_status); }; }; then
13384 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013385else
Martin v. Löwis11437992002-04-12 09:54:03 +000013386 echo "$as_me: failed program was:" >&5
13387cat conftest.$ac_ext >&5
13388ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013389fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013390rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13391LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013392fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013393echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
13394echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
13395if test $ac_cv_lib_util_forkpty = yes; then
13396 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013397#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013398_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013399 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013400fi
13401
13402fi
13403done
13404
Jack Jansendd19cf82001-12-06 22:36:17 +000013405
Michael W. Hudson54241132001-12-07 15:38:26 +000013406# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013407
13408
13409
13410
13411
13412
Fred Drake8cef4cf2000-06-28 16:40:38 +000013413for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
13414do
Martin v. Löwis11437992002-04-12 09:54:03 +000013415as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13416echo "$as_me:$LINENO: checking for $ac_func" >&5
13417echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13418if eval "test \"\${$as_ac_var+set}\" = set"; then
13419 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013420else
Martin v. Löwis11437992002-04-12 09:54:03 +000013421 cat >conftest.$ac_ext <<_ACEOF
13422#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013423#include "confdefs.h"
13424/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013425 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013426#include <assert.h>
13427/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013428#ifdef __cplusplus
13429extern "C"
13430#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013431/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013432 builtin and then its argument prototype would still apply. */
13433char $ac_func ();
13434char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013435
Barry Warsawfe33b792003-01-07 22:42:49 +000013436#ifdef F77_DUMMY_MAIN
13437# ifdef __cplusplus
13438 extern "C"
13439# endif
13440 int F77_DUMMY_MAIN() { return 1; }
13441#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013442int
13443main ()
13444{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013445/* The GNU C library defines this for functions which it implements
13446 to always fail with ENOSYS. Some functions are actually named
13447 something starting with __ and the normal name is an alias. */
13448#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13449choke me
13450#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013451f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013452#endif
13453
Martin v. Löwis11437992002-04-12 09:54:03 +000013454 ;
13455 return 0;
13456}
13457_ACEOF
13458rm -f conftest.$ac_objext conftest$ac_exeext
13459if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13460 (eval $ac_link) 2>&5
13461 ac_status=$?
13462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13463 (exit $ac_status); } &&
13464 { ac_try='test -s conftest$ac_exeext'
13465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13466 (eval $ac_try) 2>&5
13467 ac_status=$?
13468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13469 (exit $ac_status); }; }; then
13470 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013471else
Martin v. Löwis11437992002-04-12 09:54:03 +000013472 echo "$as_me: failed program was:" >&5
13473cat conftest.$ac_ext >&5
13474eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013475fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013476rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013477fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013478echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13479echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13480if test `eval echo '${'$as_ac_var'}'` = yes; then
13481 cat >>confdefs.h <<_ACEOF
13482#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13483_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000013484
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013485fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000013486done
13487
Michael W. Hudson54241132001-12-07 15:38:26 +000013488
Martin v. Löwis11437992002-04-12 09:54:03 +000013489
13490
13491
13492
13493
Martin v. Löwis1142de32002-03-29 16:28:31 +000013494for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000013495do
Martin v. Löwis11437992002-04-12 09:54:03 +000013496as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13497echo "$as_me:$LINENO: checking for $ac_func" >&5
13498echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13499if eval "test \"\${$as_ac_var+set}\" = set"; then
13500 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013501else
Martin v. Löwis11437992002-04-12 09:54:03 +000013502 cat >conftest.$ac_ext <<_ACEOF
13503#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013504#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013505/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013506 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013507#include <assert.h>
13508/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013509#ifdef __cplusplus
13510extern "C"
13511#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013512/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013513 builtin and then its argument prototype would still apply. */
13514char $ac_func ();
13515char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013516
Barry Warsawfe33b792003-01-07 22:42:49 +000013517#ifdef F77_DUMMY_MAIN
13518# ifdef __cplusplus
13519 extern "C"
13520# endif
13521 int F77_DUMMY_MAIN() { return 1; }
13522#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013523int
13524main ()
13525{
Guido van Rossum627b2d71993-12-24 10:39:16 +000013526/* The GNU C library defines this for functions which it implements
13527 to always fail with ENOSYS. Some functions are actually named
13528 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013529#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013530choke me
13531#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013532f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013533#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013534
Martin v. Löwis11437992002-04-12 09:54:03 +000013535 ;
13536 return 0;
13537}
13538_ACEOF
13539rm -f conftest.$ac_objext conftest$ac_exeext
13540if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13541 (eval $ac_link) 2>&5
13542 ac_status=$?
13543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13544 (exit $ac_status); } &&
13545 { ac_try='test -s conftest$ac_exeext'
13546 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13547 (eval $ac_try) 2>&5
13548 ac_status=$?
13549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13550 (exit $ac_status); }; }; then
13551 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013552else
Martin v. Löwis11437992002-04-12 09:54:03 +000013553 echo "$as_me: failed program was:" >&5
13554cat conftest.$ac_ext >&5
13555eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013556fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013557rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000013558fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013559echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13560echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13561if test `eval echo '${'$as_ac_var'}'` = yes; then
13562 cat >>confdefs.h <<_ACEOF
13563#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13564_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000013565
Martin v. Löwis1142de32002-03-29 16:28:31 +000013566else
Martin v. Löwis11437992002-04-12 09:54:03 +000013567 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013568fi
13569done
13570
13571
Martin v. Löwis11437992002-04-12 09:54:03 +000013572
Martin v. Löwis1142de32002-03-29 16:28:31 +000013573for ac_func in getpgrp
13574do
Martin v. Löwis11437992002-04-12 09:54:03 +000013575as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13576echo "$as_me:$LINENO: checking for $ac_func" >&5
13577echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13578if eval "test \"\${$as_ac_var+set}\" = set"; then
13579 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000013580else
Martin v. Löwis11437992002-04-12 09:54:03 +000013581 cat >conftest.$ac_ext <<_ACEOF
13582#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013583#include "confdefs.h"
13584/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013585 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000013586#include <assert.h>
13587/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013588#ifdef __cplusplus
13589extern "C"
13590#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013591/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013592 builtin and then its argument prototype would still apply. */
13593char $ac_func ();
13594char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000013595
Barry Warsawfe33b792003-01-07 22:42:49 +000013596#ifdef F77_DUMMY_MAIN
13597# ifdef __cplusplus
13598 extern "C"
13599# endif
13600 int F77_DUMMY_MAIN() { return 1; }
13601#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013602int
13603main ()
13604{
Martin v. Löwis1142de32002-03-29 16:28:31 +000013605/* The GNU C library defines this for functions which it implements
13606 to always fail with ENOSYS. Some functions are actually named
13607 something starting with __ and the normal name is an alias. */
13608#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13609choke me
13610#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013611f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000013612#endif
13613
Martin v. Löwis11437992002-04-12 09:54:03 +000013614 ;
13615 return 0;
13616}
13617_ACEOF
13618rm -f conftest.$ac_objext conftest$ac_exeext
13619if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13620 (eval $ac_link) 2>&5
13621 ac_status=$?
13622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13623 (exit $ac_status); } &&
13624 { ac_try='test -s conftest$ac_exeext'
13625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13626 (eval $ac_try) 2>&5
13627 ac_status=$?
13628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13629 (exit $ac_status); }; }; then
13630 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013631else
Martin v. Löwis11437992002-04-12 09:54:03 +000013632 echo "$as_me: failed program was:" >&5
13633cat conftest.$ac_ext >&5
13634eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013635fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013636rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013637fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013638echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13639echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13640if test `eval echo '${'$as_ac_var'}'` = yes; then
13641 cat >>confdefs.h <<_ACEOF
13642#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13643_ACEOF
13644 cat >conftest.$ac_ext <<_ACEOF
13645#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013646#include "confdefs.h"
13647#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000013648#ifdef F77_DUMMY_MAIN
13649# ifdef __cplusplus
13650 extern "C"
13651# endif
13652 int F77_DUMMY_MAIN() { return 1; }
13653#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013654int
13655main ()
13656{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013657getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013658 ;
13659 return 0;
13660}
13661_ACEOF
13662rm -f conftest.$ac_objext
13663if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13664 (eval $ac_compile) 2>&5
13665 ac_status=$?
13666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13667 (exit $ac_status); } &&
13668 { ac_try='test -s conftest.$ac_objext'
13669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13670 (eval $ac_try) 2>&5
13671 ac_status=$?
13672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13673 (exit $ac_status); }; }; then
13674
13675cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013676#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013677_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013678
Martin v. Löwis11437992002-04-12 09:54:03 +000013679
Guido van Rossumf78abae1997-01-21 22:02:36 +000013680else
Martin v. Löwis11437992002-04-12 09:54:03 +000013681 echo "$as_me: failed program was:" >&5
13682cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013683fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013684rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013685
Guido van Rossum627b2d71993-12-24 10:39:16 +000013686fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013687done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013688
Jack Jansen150753c2003-03-29 22:07:47 +000013689
13690for ac_func in setpgrp
13691do
13692as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13693echo "$as_me:$LINENO: checking for $ac_func" >&5
13694echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13695if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013696 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013697else
Martin v. Löwis11437992002-04-12 09:54:03 +000013698 cat >conftest.$ac_ext <<_ACEOF
13699#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013700#include "confdefs.h"
Jack Jansen150753c2003-03-29 22:07:47 +000013701/* System header to define __stub macros and hopefully few prototypes,
13702 which can conflict with char $ac_func (); below. */
13703#include <assert.h>
13704/* Override any gcc2 internal prototype to avoid an error. */
13705#ifdef __cplusplus
13706extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000013707#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013708/* We use char because int might match the return type of a gcc2
13709 builtin and then its argument prototype would still apply. */
13710char $ac_func ();
13711char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013712
Barry Warsawfe33b792003-01-07 22:42:49 +000013713#ifdef F77_DUMMY_MAIN
13714# ifdef __cplusplus
13715 extern "C"
13716# endif
13717 int F77_DUMMY_MAIN() { return 1; }
13718#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013719int
13720main ()
13721{
Jack Jansen150753c2003-03-29 22:07:47 +000013722/* The GNU C library defines this for functions which it implements
13723 to always fail with ENOSYS. Some functions are actually named
13724 something starting with __ and the normal name is an alias. */
13725#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13726choke me
13727#else
13728f = $ac_func;
13729#endif
13730
Martin v. Löwis11437992002-04-12 09:54:03 +000013731 ;
13732 return 0;
13733}
13734_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013735rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000013736if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13737 (eval $ac_link) 2>&5
13738 ac_status=$?
13739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013740 (exit $ac_status); } &&
13741 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13743 (eval $ac_try) 2>&5
13744 ac_status=$?
13745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13746 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000013747 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013748else
Jack Jansen150753c2003-03-29 22:07:47 +000013749 echo "$as_me: failed program was:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013750cat conftest.$ac_ext >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013751eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013752fi
Jack Jansen150753c2003-03-29 22:07:47 +000013753rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013754fi
Jack Jansen150753c2003-03-29 22:07:47 +000013755echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13756echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13757if test `eval echo '${'$as_ac_var'}'` = yes; then
13758 cat >>confdefs.h <<_ACEOF
13759#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13760_ACEOF
13761 cat >conftest.$ac_ext <<_ACEOF
13762#line $LINENO "configure"
13763#include "confdefs.h"
13764#include <unistd.h>
13765#ifdef F77_DUMMY_MAIN
13766# ifdef __cplusplus
13767 extern "C"
13768# endif
13769 int F77_DUMMY_MAIN() { return 1; }
13770#endif
13771int
13772main ()
13773{
13774setpgrp(0,0);
13775 ;
13776 return 0;
13777}
13778_ACEOF
13779rm -f conftest.$ac_objext
13780if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13781 (eval $ac_compile) 2>&5
13782 ac_status=$?
13783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13784 (exit $ac_status); } &&
13785 { ac_try='test -s conftest.$ac_objext'
13786 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13787 (eval $ac_try) 2>&5
13788 ac_status=$?
13789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13790 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013791
13792cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013793#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013794_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013795
Jack Jansen150753c2003-03-29 22:07:47 +000013796
13797else
13798 echo "$as_me: failed program was:" >&5
13799cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013800fi
Jack Jansen150753c2003-03-29 22:07:47 +000013801rm -f conftest.$ac_objext conftest.$ac_ext
13802
13803fi
13804done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013805
Martin v. Löwis11437992002-04-12 09:54:03 +000013806
Thomas Wouters3a584202000-08-05 23:28:51 +000013807for ac_func in gettimeofday
13808do
Martin v. Löwis11437992002-04-12 09:54:03 +000013809as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13810echo "$as_me:$LINENO: checking for $ac_func" >&5
13811echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13812if eval "test \"\${$as_ac_var+set}\" = set"; then
13813 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013814else
Martin v. Löwis11437992002-04-12 09:54:03 +000013815 cat >conftest.$ac_ext <<_ACEOF
13816#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013817#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013818/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013819 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013820#include <assert.h>
13821/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013822#ifdef __cplusplus
13823extern "C"
13824#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013825/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013826 builtin and then its argument prototype would still apply. */
13827char $ac_func ();
13828char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013829
Barry Warsawfe33b792003-01-07 22:42:49 +000013830#ifdef F77_DUMMY_MAIN
13831# ifdef __cplusplus
13832 extern "C"
13833# endif
13834 int F77_DUMMY_MAIN() { return 1; }
13835#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013836int
13837main ()
13838{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013839/* The GNU C library defines this for functions which it implements
13840 to always fail with ENOSYS. Some functions are actually named
13841 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013842#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013843choke me
13844#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013845f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013846#endif
13847
Martin v. Löwis11437992002-04-12 09:54:03 +000013848 ;
13849 return 0;
13850}
13851_ACEOF
13852rm -f conftest.$ac_objext conftest$ac_exeext
13853if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13854 (eval $ac_link) 2>&5
13855 ac_status=$?
13856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13857 (exit $ac_status); } &&
13858 { ac_try='test -s conftest$ac_exeext'
13859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13860 (eval $ac_try) 2>&5
13861 ac_status=$?
13862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13863 (exit $ac_status); }; }; then
13864 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013865else
Martin v. Löwis11437992002-04-12 09:54:03 +000013866 echo "$as_me: failed program was:" >&5
13867cat conftest.$ac_ext >&5
13868eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013869fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013870rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013871fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013872echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13873echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13874if test `eval echo '${'$as_ac_var'}'` = yes; then
13875 cat >>confdefs.h <<_ACEOF
13876#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13877_ACEOF
13878 cat >conftest.$ac_ext <<_ACEOF
13879#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013880#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013881#include <sys/time.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000013882#ifdef F77_DUMMY_MAIN
13883# ifdef __cplusplus
13884 extern "C"
13885# endif
13886 int F77_DUMMY_MAIN() { return 1; }
13887#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013888int
13889main ()
13890{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013891gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013892 ;
13893 return 0;
13894}
13895_ACEOF
13896rm -f conftest.$ac_objext
13897if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13898 (eval $ac_compile) 2>&5
13899 ac_status=$?
13900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13901 (exit $ac_status); } &&
13902 { ac_try='test -s conftest.$ac_objext'
13903 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13904 (eval $ac_try) 2>&5
13905 ac_status=$?
13906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13907 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013908 :
13909else
Martin v. Löwis11437992002-04-12 09:54:03 +000013910 echo "$as_me: failed program was:" >&5
13911cat conftest.$ac_ext >&5
13912
13913cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013914#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013915_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013916
Martin v. Löwis11437992002-04-12 09:54:03 +000013917
Guido van Rossum627b2d71993-12-24 10:39:16 +000013918fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013919rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013920
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013921fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013922done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013923
Michael W. Hudson54241132001-12-07 15:38:26 +000013924
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013925echo "$as_me:$LINENO: checking for major" >&5
13926echo $ECHO_N "checking for major... $ECHO_C" >&6
13927cat >conftest.$ac_ext <<_ACEOF
13928#line $LINENO "configure"
13929#include "confdefs.h"
13930
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013931#if defined(MAJOR_IN_MKDEV)
13932#include <sys/mkdev.h>
13933#elif defined(MAJOR_IN_SYSMACROS)
13934#include <sys/sysmacros.h>
13935#else
13936#include <sys/types.h>
13937#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013938
Barry Warsawfe33b792003-01-07 22:42:49 +000013939#ifdef F77_DUMMY_MAIN
13940# ifdef __cplusplus
13941 extern "C"
13942# endif
13943 int F77_DUMMY_MAIN() { return 1; }
13944#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013945int
13946main ()
13947{
13948
13949 makedev(major(0),minor(0));
13950
13951 ;
13952 return 0;
13953}
13954_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000013955rm -f conftest.$ac_objext conftest$ac_exeext
13956if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13957 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013958 ac_status=$?
13959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13960 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000013961 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13963 (eval $ac_try) 2>&5
13964 ac_status=$?
13965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13966 (exit $ac_status); }; }; then
13967
13968
13969cat >>confdefs.h <<\_ACEOF
13970#define HAVE_DEVICE_MACROS 1
13971_ACEOF
13972
13973 echo "$as_me:$LINENO: result: yes" >&5
13974echo "${ECHO_T}yes" >&6
13975
13976else
13977 echo "$as_me: failed program was:" >&5
13978cat conftest.$ac_ext >&5
13979
13980 echo "$as_me:$LINENO: result: no" >&5
13981echo "${ECHO_T}no" >&6
13982
13983fi
Martin v. Löwise3271202002-11-07 07:42:30 +000013984rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013985
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013986# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013987# for [no]getaddrinfo in netdb.h.
13988echo "$as_me:$LINENO: checking for getaddrinfo" >&5
13989echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
13990cat >conftest.$ac_ext <<_ACEOF
13991#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013992#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013993
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013994#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013995#include <sys/socket.h>
13996#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013997#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013998
Barry Warsawfe33b792003-01-07 22:42:49 +000013999#ifdef F77_DUMMY_MAIN
14000# ifdef __cplusplus
14001 extern "C"
14002# endif
14003 int F77_DUMMY_MAIN() { return 1; }
14004#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014005int
14006main ()
14007{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014008
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014009getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014010
Martin v. Löwis11437992002-04-12 09:54:03 +000014011 ;
14012 return 0;
14013}
14014_ACEOF
14015rm -f conftest.$ac_objext conftest$ac_exeext
14016if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14017 (eval $ac_link) 2>&5
14018 ac_status=$?
14019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14020 (exit $ac_status); } &&
14021 { ac_try='test -s conftest$ac_exeext'
14022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14023 (eval $ac_try) 2>&5
14024 ac_status=$?
14025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14026 (exit $ac_status); }; }; then
14027
14028echo "$as_me:$LINENO: result: yes" >&5
14029echo "${ECHO_T}yes" >&6
14030echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
14031echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014032if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014033 echo "$as_me:$LINENO: result: buggy" >&5
14034echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014035buggygetaddrinfo=yes
14036else
Martin v. Löwis11437992002-04-12 09:54:03 +000014037 cat >conftest.$ac_ext <<_ACEOF
14038#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014039#include "confdefs.h"
14040
14041#include <sys/types.h>
14042#include <netdb.h>
14043#include <string.h>
14044#include <sys/socket.h>
14045#include <netinet/in.h>
14046
14047main()
14048{
14049 int passive, gaierr, inet4 = 0, inet6 = 0;
14050 struct addrinfo hints, *ai, *aitop;
14051 char straddr[INET6_ADDRSTRLEN], strport[16];
14052
14053 for (passive = 0; passive <= 1; passive++) {
14054 memset(&hints, 0, sizeof(hints));
14055 hints.ai_family = AF_UNSPEC;
14056 hints.ai_flags = passive ? AI_PASSIVE : 0;
14057 hints.ai_socktype = SOCK_STREAM;
14058 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
14059 (void)gai_strerror(gaierr);
14060 goto bad;
14061 }
14062 for (ai = aitop; ai; ai = ai->ai_next) {
14063 if (ai->ai_addr == NULL ||
14064 ai->ai_addrlen == 0 ||
14065 getnameinfo(ai->ai_addr, ai->ai_addrlen,
14066 straddr, sizeof(straddr), strport, sizeof(strport),
14067 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
14068 goto bad;
14069 }
14070 switch (ai->ai_family) {
14071 case AF_INET:
14072 if (strcmp(strport, "54321") != 0) {
14073 goto bad;
14074 }
14075 if (passive) {
14076 if (strcmp(straddr, "0.0.0.0") != 0) {
14077 goto bad;
14078 }
14079 } else {
14080 if (strcmp(straddr, "127.0.0.1") != 0) {
14081 goto bad;
14082 }
14083 }
14084 inet4++;
14085 break;
14086 case AF_INET6:
14087 if (strcmp(strport, "54321") != 0) {
14088 goto bad;
14089 }
14090 if (passive) {
14091 if (strcmp(straddr, "::") != 0) {
14092 goto bad;
14093 }
14094 } else {
14095 if (strcmp(straddr, "::1") != 0) {
14096 goto bad;
14097 }
14098 }
14099 inet6++;
14100 break;
14101 case AF_UNSPEC:
14102 goto bad;
14103 break;
14104 default:
14105 /* another family support? */
14106 break;
14107 }
14108 }
14109 }
14110
14111 if (!(inet4 == 0 || inet4 == 2))
14112 goto bad;
14113 if (!(inet6 == 0 || inet6 == 2))
14114 goto bad;
14115
14116 if (aitop)
14117 freeaddrinfo(aitop);
14118 exit(0);
14119
14120 bad:
14121 if (aitop)
14122 freeaddrinfo(aitop);
14123 exit(1);
14124}
14125
Martin v. Löwis11437992002-04-12 09:54:03 +000014126_ACEOF
14127rm -f conftest$ac_exeext
14128if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14129 (eval $ac_link) 2>&5
14130 ac_status=$?
14131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14132 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14133 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14134 (eval $ac_try) 2>&5
14135 ac_status=$?
14136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14137 (exit $ac_status); }; }; then
14138 echo "$as_me:$LINENO: result: good" >&5
14139echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014140buggygetaddrinfo=no
14141else
Martin v. Löwis11437992002-04-12 09:54:03 +000014142 echo "$as_me: program exited with status $ac_status" >&5
14143echo "$as_me: failed program was:" >&5
14144cat conftest.$ac_ext >&5
14145( exit $ac_status )
14146echo "$as_me:$LINENO: result: buggy" >&5
14147echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014148buggygetaddrinfo=yes
14149fi
Barry Warsawfe33b792003-01-07 22:42:49 +000014150rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014151fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014152else
Martin v. Löwis11437992002-04-12 09:54:03 +000014153 echo "$as_me: failed program was:" >&5
14154cat conftest.$ac_ext >&5
14155
14156echo "$as_me:$LINENO: result: no" >&5
14157echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014158buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014159
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014160fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014161rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014162
14163if test "$buggygetaddrinfo" = "yes"; then
14164 if test "$ipv6" = "yes"; then
14165 echo 'Fatal: You must get working getaddrinfo() function.'
14166 echo ' or you can specify "--disable-ipv6"'.
14167 exit 1
14168 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014169else
Martin v. Löwis11437992002-04-12 09:54:03 +000014170
14171cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014172#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014173_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014174
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014175fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014176
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014177for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014178do
Martin v. Löwis11437992002-04-12 09:54:03 +000014179as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14180echo "$as_me:$LINENO: checking for $ac_func" >&5
14181echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14182if eval "test \"\${$as_ac_var+set}\" = set"; then
14183 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014184else
Martin v. Löwis11437992002-04-12 09:54:03 +000014185 cat >conftest.$ac_ext <<_ACEOF
14186#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014187#include "confdefs.h"
14188/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014189 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014190#include <assert.h>
14191/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014192#ifdef __cplusplus
14193extern "C"
14194#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014195/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014196 builtin and then its argument prototype would still apply. */
14197char $ac_func ();
14198char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014199
Barry Warsawfe33b792003-01-07 22:42:49 +000014200#ifdef F77_DUMMY_MAIN
14201# ifdef __cplusplus
14202 extern "C"
14203# endif
14204 int F77_DUMMY_MAIN() { return 1; }
14205#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014206int
14207main ()
14208{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014209/* The GNU C library defines this for functions which it implements
14210 to always fail with ENOSYS. Some functions are actually named
14211 something starting with __ and the normal name is an alias. */
14212#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14213choke me
14214#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014215f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014216#endif
14217
Martin v. Löwis11437992002-04-12 09:54:03 +000014218 ;
14219 return 0;
14220}
14221_ACEOF
14222rm -f conftest.$ac_objext conftest$ac_exeext
14223if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14224 (eval $ac_link) 2>&5
14225 ac_status=$?
14226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14227 (exit $ac_status); } &&
14228 { ac_try='test -s conftest$ac_exeext'
14229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14230 (eval $ac_try) 2>&5
14231 ac_status=$?
14232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14233 (exit $ac_status); }; }; then
14234 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014235else
Martin v. Löwis11437992002-04-12 09:54:03 +000014236 echo "$as_me: failed program was:" >&5
14237cat conftest.$ac_ext >&5
14238eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014239fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014240rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014241fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014242echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14243echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14244if test `eval echo '${'$as_ac_var'}'` = yes; then
14245 cat >>confdefs.h <<_ACEOF
14246#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14247_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014248
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014249fi
14250done
14251
Michael W. Hudson54241132001-12-07 15:38:26 +000014252
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014253# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000014254echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
14255echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14256if test "${ac_cv_header_time+set}" = set; then
14257 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014258else
Martin v. Löwis11437992002-04-12 09:54:03 +000014259 cat >conftest.$ac_ext <<_ACEOF
14260#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014261#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014262#include <sys/types.h>
14263#include <sys/time.h>
14264#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014265
Barry Warsawfe33b792003-01-07 22:42:49 +000014266#ifdef F77_DUMMY_MAIN
14267# ifdef __cplusplus
14268 extern "C"
14269# endif
14270 int F77_DUMMY_MAIN() { return 1; }
14271#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014272int
14273main ()
14274{
14275if ((struct tm *) 0)
14276return 0;
14277 ;
14278 return 0;
14279}
14280_ACEOF
14281rm -f conftest.$ac_objext
14282if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14283 (eval $ac_compile) 2>&5
14284 ac_status=$?
14285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14286 (exit $ac_status); } &&
14287 { ac_try='test -s conftest.$ac_objext'
14288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14289 (eval $ac_try) 2>&5
14290 ac_status=$?
14291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14292 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014293 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014294else
Martin v. Löwis11437992002-04-12 09:54:03 +000014295 echo "$as_me: failed program was:" >&5
14296cat conftest.$ac_ext >&5
14297ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014298fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014299rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014300fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014301echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
14302echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014303if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014304
14305cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014306#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014307_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014308
14309fi
14310
Martin v. Löwis11437992002-04-12 09:54:03 +000014311echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
14312echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
14313if test "${ac_cv_struct_tm+set}" = set; then
14314 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014315else
Martin v. Löwis11437992002-04-12 09:54:03 +000014316 cat >conftest.$ac_ext <<_ACEOF
14317#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014318#include "confdefs.h"
14319#include <sys/types.h>
14320#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014321
Barry Warsawfe33b792003-01-07 22:42:49 +000014322#ifdef F77_DUMMY_MAIN
14323# ifdef __cplusplus
14324 extern "C"
14325# endif
14326 int F77_DUMMY_MAIN() { return 1; }
14327#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014328int
14329main ()
14330{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014331struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000014332 ;
14333 return 0;
14334}
14335_ACEOF
14336rm -f conftest.$ac_objext
14337if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14338 (eval $ac_compile) 2>&5
14339 ac_status=$?
14340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14341 (exit $ac_status); } &&
14342 { ac_try='test -s conftest.$ac_objext'
14343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14344 (eval $ac_try) 2>&5
14345 ac_status=$?
14346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14347 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014348 ac_cv_struct_tm=time.h
14349else
Martin v. Löwis11437992002-04-12 09:54:03 +000014350 echo "$as_me: failed program was:" >&5
14351cat conftest.$ac_ext >&5
14352ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014353fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014354rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014355fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014356echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
14357echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014358if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014359
14360cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014361#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014362_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014363
14364fi
14365
Martin v. Löwis11437992002-04-12 09:54:03 +000014366echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
14367echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
14368if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
14369 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014370else
Martin v. Löwis11437992002-04-12 09:54:03 +000014371 cat >conftest.$ac_ext <<_ACEOF
14372#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014373#include "confdefs.h"
14374#include <sys/types.h>
14375#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000014376
14377
Barry Warsawfe33b792003-01-07 22:42:49 +000014378#ifdef F77_DUMMY_MAIN
14379# ifdef __cplusplus
14380 extern "C"
14381# endif
14382 int F77_DUMMY_MAIN() { return 1; }
14383#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014384int
14385main ()
14386{
14387static struct tm ac_aggr;
14388if (ac_aggr.tm_zone)
14389return 0;
14390 ;
14391 return 0;
14392}
14393_ACEOF
14394rm -f conftest.$ac_objext
14395if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14396 (eval $ac_compile) 2>&5
14397 ac_status=$?
14398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14399 (exit $ac_status); } &&
14400 { ac_try='test -s conftest.$ac_objext'
14401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14402 (eval $ac_try) 2>&5
14403 ac_status=$?
14404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14405 (exit $ac_status); }; }; then
14406 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014407else
Martin v. Löwis11437992002-04-12 09:54:03 +000014408 echo "$as_me: failed program was:" >&5
14409cat conftest.$ac_ext >&5
14410ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014411fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014412rm -f conftest.$ac_objext conftest.$ac_ext
14413fi
14414echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
14415echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
14416if test $ac_cv_member_struct_tm_tm_zone = yes; then
14417
14418cat >>confdefs.h <<_ACEOF
14419#define HAVE_STRUCT_TM_TM_ZONE 1
14420_ACEOF
14421
14422
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014423fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014424
Martin v. Löwis11437992002-04-12 09:54:03 +000014425if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14426
14427cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014428#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014429_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014430
14431else
Martin v. Löwis11437992002-04-12 09:54:03 +000014432 echo "$as_me:$LINENO: checking for tzname" >&5
14433echo $ECHO_N "checking for tzname... $ECHO_C" >&6
14434if test "${ac_cv_var_tzname+set}" = set; then
14435 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014436else
Martin v. Löwis11437992002-04-12 09:54:03 +000014437 cat >conftest.$ac_ext <<_ACEOF
14438#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014439#include "confdefs.h"
14440#include <time.h>
14441#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014442extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014443#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014444
Barry Warsawfe33b792003-01-07 22:42:49 +000014445#ifdef F77_DUMMY_MAIN
14446# ifdef __cplusplus
14447 extern "C"
14448# endif
14449 int F77_DUMMY_MAIN() { return 1; }
14450#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014451int
14452main ()
14453{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014454atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000014455 ;
14456 return 0;
14457}
14458_ACEOF
14459rm -f conftest.$ac_objext conftest$ac_exeext
14460if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14461 (eval $ac_link) 2>&5
14462 ac_status=$?
14463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14464 (exit $ac_status); } &&
14465 { ac_try='test -s conftest$ac_exeext'
14466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14467 (eval $ac_try) 2>&5
14468 ac_status=$?
14469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14470 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014471 ac_cv_var_tzname=yes
14472else
Martin v. Löwis11437992002-04-12 09:54:03 +000014473 echo "$as_me: failed program was:" >&5
14474cat conftest.$ac_ext >&5
14475ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014476fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014477rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000014478fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014479echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
14480echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014481 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014482
14483cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014484#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014485_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014486
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014487 fi
14488fi
14489
Martin v. Löwis11437992002-04-12 09:54:03 +000014490echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
14491echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
14492if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
14493 echo $ECHO_N "(cached) $ECHO_C" >&6
14494else
14495 cat >conftest.$ac_ext <<_ACEOF
14496#line $LINENO "configure"
14497#include "confdefs.h"
14498$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014499#ifdef F77_DUMMY_MAIN
14500# ifdef __cplusplus
14501 extern "C"
14502# endif
14503 int F77_DUMMY_MAIN() { return 1; }
14504#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014505int
14506main ()
14507{
14508static struct stat ac_aggr;
14509if (ac_aggr.st_rdev)
14510return 0;
14511 ;
14512 return 0;
14513}
14514_ACEOF
14515rm -f conftest.$ac_objext
14516if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14517 (eval $ac_compile) 2>&5
14518 ac_status=$?
14519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14520 (exit $ac_status); } &&
14521 { ac_try='test -s conftest.$ac_objext'
14522 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14523 (eval $ac_try) 2>&5
14524 ac_status=$?
14525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14526 (exit $ac_status); }; }; then
14527 ac_cv_member_struct_stat_st_rdev=yes
14528else
14529 echo "$as_me: failed program was:" >&5
14530cat conftest.$ac_ext >&5
14531ac_cv_member_struct_stat_st_rdev=no
14532fi
14533rm -f conftest.$ac_objext conftest.$ac_ext
14534fi
14535echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
14536echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
14537if test $ac_cv_member_struct_stat_st_rdev = yes; then
14538
14539cat >>confdefs.h <<_ACEOF
14540#define HAVE_STRUCT_STAT_ST_RDEV 1
14541_ACEOF
14542
14543
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014544fi
14545
Martin v. Löwis11437992002-04-12 09:54:03 +000014546echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
14547echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
14548if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
14549 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014550else
Martin v. Löwis11437992002-04-12 09:54:03 +000014551 cat >conftest.$ac_ext <<_ACEOF
14552#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014553#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014554$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014555#ifdef F77_DUMMY_MAIN
14556# ifdef __cplusplus
14557 extern "C"
14558# endif
14559 int F77_DUMMY_MAIN() { return 1; }
14560#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014561int
14562main ()
14563{
14564static struct stat ac_aggr;
14565if (ac_aggr.st_blksize)
14566return 0;
14567 ;
14568 return 0;
14569}
14570_ACEOF
14571rm -f conftest.$ac_objext
14572if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14573 (eval $ac_compile) 2>&5
14574 ac_status=$?
14575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14576 (exit $ac_status); } &&
14577 { ac_try='test -s conftest.$ac_objext'
14578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14579 (eval $ac_try) 2>&5
14580 ac_status=$?
14581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14582 (exit $ac_status); }; }; then
14583 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014584else
Martin v. Löwis11437992002-04-12 09:54:03 +000014585 echo "$as_me: failed program was:" >&5
14586cat conftest.$ac_ext >&5
14587ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014588fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014589rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014590fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014591echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
14592echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
14593if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014594
Martin v. Löwis11437992002-04-12 09:54:03 +000014595cat >>confdefs.h <<_ACEOF
14596#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
14597_ACEOF
14598
14599
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014600fi
14601
Martin v. Löwis11437992002-04-12 09:54:03 +000014602echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
14603echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
14604if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
14605 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014606else
Martin v. Löwis11437992002-04-12 09:54:03 +000014607 cat >conftest.$ac_ext <<_ACEOF
14608#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014609#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014610$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014611#ifdef F77_DUMMY_MAIN
14612# ifdef __cplusplus
14613 extern "C"
14614# endif
14615 int F77_DUMMY_MAIN() { return 1; }
14616#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014617int
14618main ()
14619{
14620static struct stat ac_aggr;
14621if (ac_aggr.st_blocks)
14622return 0;
14623 ;
14624 return 0;
14625}
14626_ACEOF
14627rm -f conftest.$ac_objext
14628if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14629 (eval $ac_compile) 2>&5
14630 ac_status=$?
14631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14632 (exit $ac_status); } &&
14633 { ac_try='test -s conftest.$ac_objext'
14634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14635 (eval $ac_try) 2>&5
14636 ac_status=$?
14637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14638 (exit $ac_status); }; }; then
14639 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014640else
Martin v. Löwis11437992002-04-12 09:54:03 +000014641 echo "$as_me: failed program was:" >&5
14642cat conftest.$ac_ext >&5
14643ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014644fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014645rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014646fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014647echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
14648echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
14649if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014650
Martin v. Löwis11437992002-04-12 09:54:03 +000014651cat >>confdefs.h <<_ACEOF
14652#define HAVE_STRUCT_STAT_ST_BLOCKS 1
14653_ACEOF
14654
14655
14656cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014657#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014658_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014659
14660else
Martin v. Löwis11437992002-04-12 09:54:03 +000014661 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014662fi
14663
Michael W. Hudson54241132001-12-07 15:38:26 +000014664
Martin v. Löwis11437992002-04-12 09:54:03 +000014665
14666echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
14667echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
14668if test "${ac_cv_header_time_altzone+set}" = set; then
14669 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014670else
Martin v. Löwis11437992002-04-12 09:54:03 +000014671 cat >conftest.$ac_ext <<_ACEOF
14672#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014673#include "confdefs.h"
14674#include <time.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014675#ifdef F77_DUMMY_MAIN
14676# ifdef __cplusplus
14677 extern "C"
14678# endif
14679 int F77_DUMMY_MAIN() { return 1; }
14680#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014681int
14682main ()
14683{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014684return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000014685 ;
14686 return 0;
14687}
14688_ACEOF
14689rm -f conftest.$ac_objext
14690if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14691 (eval $ac_compile) 2>&5
14692 ac_status=$?
14693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14694 (exit $ac_status); } &&
14695 { ac_try='test -s conftest.$ac_objext'
14696 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14697 (eval $ac_try) 2>&5
14698 ac_status=$?
14699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14700 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014701 ac_cv_header_time_altzone=yes
14702else
Martin v. Löwis11437992002-04-12 09:54:03 +000014703 echo "$as_me: failed program was:" >&5
14704cat conftest.$ac_ext >&5
14705ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000014706fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014707rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014708fi
14709
Martin v. Löwis11437992002-04-12 09:54:03 +000014710echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
14711echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014712if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014713
14714cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014715#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014716_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014717
14718fi
14719
Guido van Rossumda88dad1995-01-26 00:46:29 +000014720was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014721echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
14722echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
14723cat >conftest.$ac_ext <<_ACEOF
14724#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014725#include "confdefs.h"
14726
14727#include <sys/types.h>
14728#include <sys/select.h>
14729#include <sys/time.h>
14730
Barry Warsawfe33b792003-01-07 22:42:49 +000014731#ifdef F77_DUMMY_MAIN
14732# ifdef __cplusplus
14733 extern "C"
14734# endif
14735 int F77_DUMMY_MAIN() { return 1; }
14736#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014737int
14738main ()
14739{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014740;
Martin v. Löwis11437992002-04-12 09:54:03 +000014741 ;
14742 return 0;
14743}
14744_ACEOF
14745rm -f conftest.$ac_objext
14746if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14747 (eval $ac_compile) 2>&5
14748 ac_status=$?
14749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14750 (exit $ac_status); } &&
14751 { ac_try='test -s conftest.$ac_objext'
14752 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14753 (eval $ac_try) 2>&5
14754 ac_status=$?
14755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14756 (exit $ac_status); }; }; then
14757
14758
14759cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014760#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014761_ACEOF
14762
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014763 was_it_defined=yes
14764
Guido van Rossumf78abae1997-01-21 22:02:36 +000014765else
Martin v. Löwis11437992002-04-12 09:54:03 +000014766 echo "$as_me: failed program was:" >&5
14767cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014768fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014769rm -f conftest.$ac_objext conftest.$ac_ext
14770echo "$as_me:$LINENO: result: $was_it_defined" >&5
14771echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000014772
Martin v. Löwis11437992002-04-12 09:54:03 +000014773echo "$as_me:$LINENO: checking for addrinfo" >&5
14774echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
14775if test "${ac_cv_struct_addrinfo+set}" = set; then
14776 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014777else
Martin v. Löwis11437992002-04-12 09:54:03 +000014778 cat >conftest.$ac_ext <<_ACEOF
14779#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014780#include "confdefs.h"
14781
14782# include <netdb.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014783#ifdef F77_DUMMY_MAIN
14784# ifdef __cplusplus
14785 extern "C"
14786# endif
14787 int F77_DUMMY_MAIN() { return 1; }
14788#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014789int
14790main ()
14791{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014792struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000014793 ;
14794 return 0;
14795}
14796_ACEOF
14797rm -f conftest.$ac_objext
14798if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14799 (eval $ac_compile) 2>&5
14800 ac_status=$?
14801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14802 (exit $ac_status); } &&
14803 { ac_try='test -s conftest.$ac_objext'
14804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14805 (eval $ac_try) 2>&5
14806 ac_status=$?
14807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14808 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014809 ac_cv_struct_addrinfo=yes
14810else
Martin v. Löwis11437992002-04-12 09:54:03 +000014811 echo "$as_me: failed program was:" >&5
14812cat conftest.$ac_ext >&5
14813ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014814fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014815rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014816fi
14817
Martin v. Löwis11437992002-04-12 09:54:03 +000014818echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
14819echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014820if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014821
14822cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014823#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014824_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014825
14826fi
14827
Martin v. Löwis11437992002-04-12 09:54:03 +000014828echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
14829echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
14830if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
14831 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014832else
Martin v. Löwis11437992002-04-12 09:54:03 +000014833 cat >conftest.$ac_ext <<_ACEOF
14834#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014835#include "confdefs.h"
14836
14837# include <sys/types.h>
14838# include <sys/socket.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014839#ifdef F77_DUMMY_MAIN
14840# ifdef __cplusplus
14841 extern "C"
14842# endif
14843 int F77_DUMMY_MAIN() { return 1; }
14844#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014845int
14846main ()
14847{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014848struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000014849 ;
14850 return 0;
14851}
14852_ACEOF
14853rm -f conftest.$ac_objext
14854if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14855 (eval $ac_compile) 2>&5
14856 ac_status=$?
14857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14858 (exit $ac_status); } &&
14859 { ac_try='test -s conftest.$ac_objext'
14860 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14861 (eval $ac_try) 2>&5
14862 ac_status=$?
14863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14864 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014865 ac_cv_struct_sockaddr_storage=yes
14866else
Martin v. Löwis11437992002-04-12 09:54:03 +000014867 echo "$as_me: failed program was:" >&5
14868cat conftest.$ac_ext >&5
14869ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014870fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014871rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014872fi
14873
Martin v. Löwis11437992002-04-12 09:54:03 +000014874echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
14875echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014876if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014877
14878cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014879#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014880_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014881
14882fi
14883
Guido van Rossum627b2d71993-12-24 10:39:16 +000014884# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000014885
Michael W. Hudson54241132001-12-07 15:38:26 +000014886
Martin v. Löwis11437992002-04-12 09:54:03 +000014887echo "$as_me:$LINENO: checking whether char is unsigned" >&5
14888echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
14889if test "${ac_cv_c_char_unsigned+set}" = set; then
14890 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000014891else
Martin v. Löwis11437992002-04-12 09:54:03 +000014892 cat >conftest.$ac_ext <<_ACEOF
14893#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000014894#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014895$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014896#ifdef F77_DUMMY_MAIN
14897# ifdef __cplusplus
14898 extern "C"
14899# endif
14900 int F77_DUMMY_MAIN() { return 1; }
14901#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014902int
14903main ()
14904{
14905static int test_array [1 - 2 * !(((char) -1) < 0)];
14906test_array [0] = 0
14907
14908 ;
14909 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000014910}
Martin v. Löwis11437992002-04-12 09:54:03 +000014911_ACEOF
14912rm -f conftest.$ac_objext
14913if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14914 (eval $ac_compile) 2>&5
14915 ac_status=$?
14916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14917 (exit $ac_status); } &&
14918 { ac_try='test -s conftest.$ac_objext'
14919 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14920 (eval $ac_try) 2>&5
14921 ac_status=$?
14922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14923 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000014924 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014925else
14926 echo "$as_me: failed program was:" >&5
14927cat conftest.$ac_ext >&5
14928ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014929fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014930rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014931fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014932echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
14933echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014934if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014935 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014936#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014937_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014938
14939fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000014940
Barry Warsawfe33b792003-01-07 22:42:49 +000014941echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
14942echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
14943if test "${ac_cv_prog_cc_stdc+set}" = set; then
14944 echo $ECHO_N "(cached) $ECHO_C" >&6
14945else
14946 ac_cv_prog_cc_stdc=no
14947ac_save_CC=$CC
14948cat >conftest.$ac_ext <<_ACEOF
14949#line $LINENO "configure"
14950#include "confdefs.h"
14951#include <stdarg.h>
14952#include <stdio.h>
14953#include <sys/types.h>
14954#include <sys/stat.h>
14955/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
14956struct buf { int x; };
14957FILE * (*rcsopen) (struct buf *, struct stat *, int);
14958static char *e (p, i)
14959 char **p;
14960 int i;
14961{
14962 return p[i];
14963}
14964static char *f (char * (*g) (char **, int), char **p, ...)
14965{
14966 char *s;
14967 va_list v;
14968 va_start (v,p);
14969 s = g (p, va_arg (v,int));
14970 va_end (v);
14971 return s;
14972}
14973int test (int i, double x);
14974struct s1 {int (*f) (int a);};
14975struct s2 {int (*f) (double a);};
14976int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
14977int argc;
14978char **argv;
14979#ifdef F77_DUMMY_MAIN
14980# ifdef __cplusplus
14981 extern "C"
14982# endif
14983 int F77_DUMMY_MAIN() { return 1; }
14984#endif
14985int
14986main ()
14987{
14988return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
14989 ;
14990 return 0;
14991}
14992_ACEOF
14993# Don't try gcc -ansi; that turns off useful extensions and
14994# breaks some systems' header files.
14995# AIX -qlanglvl=ansi
14996# Ultrix and OSF/1 -std1
14997# HP-UX 10.20 and later -Ae
14998# HP-UX older versions -Aa -D_HPUX_SOURCE
14999# SVR4 -Xc -D__EXTENSIONS__
15000for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
15001do
15002 CC="$ac_save_CC $ac_arg"
15003 rm -f conftest.$ac_objext
15004if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15005 (eval $ac_compile) 2>&5
15006 ac_status=$?
15007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15008 (exit $ac_status); } &&
15009 { ac_try='test -s conftest.$ac_objext'
15010 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15011 (eval $ac_try) 2>&5
15012 ac_status=$?
15013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15014 (exit $ac_status); }; }; then
15015 ac_cv_prog_cc_stdc=$ac_arg
15016break
15017else
15018 echo "$as_me: failed program was:" >&5
15019cat conftest.$ac_ext >&5
15020fi
15021rm -f conftest.$ac_objext
15022done
15023rm -f conftest.$ac_ext conftest.$ac_objext
15024CC=$ac_save_CC
15025
15026fi
15027
15028case "x$ac_cv_prog_cc_stdc" in
15029 x|xno)
15030 echo "$as_me:$LINENO: result: none needed" >&5
15031echo "${ECHO_T}none needed" >&6 ;;
15032 *)
15033 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
15034echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
15035 CC="$CC $ac_cv_prog_cc_stdc" ;;
15036esac
15037
Martin v. Löwis11437992002-04-12 09:54:03 +000015038echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
15039echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15040if test "${ac_cv_c_const+set}" = set; then
15041 echo $ECHO_N "(cached) $ECHO_C" >&6
15042else
15043 cat >conftest.$ac_ext <<_ACEOF
15044#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015045#include "confdefs.h"
15046
Barry Warsawfe33b792003-01-07 22:42:49 +000015047#ifdef F77_DUMMY_MAIN
15048# ifdef __cplusplus
15049 extern "C"
15050# endif
15051 int F77_DUMMY_MAIN() { return 1; }
15052#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015053int
15054main ()
15055{
15056/* FIXME: Include the comments suggested by Paul. */
15057#ifndef __cplusplus
15058 /* Ultrix mips cc rejects this. */
15059 typedef int charset[2];
15060 const charset x;
15061 /* SunOS 4.1.1 cc rejects this. */
15062 char const *const *ccp;
15063 char **p;
15064 /* NEC SVR4.0.2 mips cc rejects this. */
15065 struct point {int x, y;};
15066 static struct point const zero = {0,0};
15067 /* AIX XL C 1.02.0.0 rejects this.
15068 It does not let you subtract one const X* pointer from another in
15069 an arm of an if-expression whose if-part is not a constant
15070 expression */
15071 const char *g = "string";
15072 ccp = &g + (g ? g-g : 0);
15073 /* HPUX 7.0 cc rejects these. */
15074 ++ccp;
15075 p = (char**) ccp;
15076 ccp = (char const *const *) p;
15077 { /* SCO 3.2v4 cc rejects this. */
15078 char *t;
15079 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015080
Martin v. Löwis11437992002-04-12 09:54:03 +000015081 *t++ = 0;
15082 }
15083 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
15084 int x[] = {25, 17};
15085 const int *foo = &x[0];
15086 ++foo;
15087 }
15088 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15089 typedef const int *iptr;
15090 iptr p = 0;
15091 ++p;
15092 }
15093 { /* AIX XL C 1.02.0.0 rejects this saying
15094 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15095 struct s { int j; const int *ap[3]; };
15096 struct s *b; b->j = 5;
15097 }
15098 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15099 const int foo = 10;
15100 }
15101#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000015102
Martin v. Löwis11437992002-04-12 09:54:03 +000015103 ;
15104 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000015105}
Martin v. Löwis11437992002-04-12 09:54:03 +000015106_ACEOF
15107rm -f conftest.$ac_objext
15108if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15109 (eval $ac_compile) 2>&5
15110 ac_status=$?
15111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15112 (exit $ac_status); } &&
15113 { ac_try='test -s conftest.$ac_objext'
15114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15115 (eval $ac_try) 2>&5
15116 ac_status=$?
15117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15118 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015119 ac_cv_c_const=yes
15120else
Martin v. Löwis11437992002-04-12 09:54:03 +000015121 echo "$as_me: failed program was:" >&5
15122cat conftest.$ac_ext >&5
15123ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015124fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015125rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015126fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015127echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
15128echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015129if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015130
15131cat >>confdefs.h <<\_ACEOF
15132#define const
15133_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015134
15135fi
15136
Michael W. Hudson54241132001-12-07 15:38:26 +000015137
Guido van Rossumda88dad1995-01-26 00:46:29 +000015138works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015139echo "$as_me:$LINENO: checking for working volatile" >&5
15140echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
15141cat >conftest.$ac_ext <<_ACEOF
15142#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015143#include "confdefs.h"
15144
Barry Warsawfe33b792003-01-07 22:42:49 +000015145#ifdef F77_DUMMY_MAIN
15146# ifdef __cplusplus
15147 extern "C"
15148# endif
15149 int F77_DUMMY_MAIN() { return 1; }
15150#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015151int
15152main ()
15153{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015154volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015155 ;
15156 return 0;
15157}
15158_ACEOF
15159rm -f conftest.$ac_objext
15160if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15161 (eval $ac_compile) 2>&5
15162 ac_status=$?
15163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15164 (exit $ac_status); } &&
15165 { ac_try='test -s conftest.$ac_objext'
15166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15167 (eval $ac_try) 2>&5
15168 ac_status=$?
15169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15170 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015171 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015172else
Martin v. Löwis11437992002-04-12 09:54:03 +000015173 echo "$as_me: failed program was:" >&5
15174cat conftest.$ac_ext >&5
15175
15176cat >>confdefs.h <<\_ACEOF
15177#define volatile
15178_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015179
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015180
Guido van Rossum627b2d71993-12-24 10:39:16 +000015181fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015182rm -f conftest.$ac_objext conftest.$ac_ext
15183echo "$as_me:$LINENO: result: $works" >&5
15184echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015185
Guido van Rossumda88dad1995-01-26 00:46:29 +000015186works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015187echo "$as_me:$LINENO: checking for working signed char" >&5
15188echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
15189cat >conftest.$ac_ext <<_ACEOF
15190#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015191#include "confdefs.h"
15192
Barry Warsawfe33b792003-01-07 22:42:49 +000015193#ifdef F77_DUMMY_MAIN
15194# ifdef __cplusplus
15195 extern "C"
15196# endif
15197 int F77_DUMMY_MAIN() { return 1; }
15198#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015199int
15200main ()
15201{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015202signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000015203 ;
15204 return 0;
15205}
15206_ACEOF
15207rm -f conftest.$ac_objext
15208if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15209 (eval $ac_compile) 2>&5
15210 ac_status=$?
15211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15212 (exit $ac_status); } &&
15213 { ac_try='test -s conftest.$ac_objext'
15214 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15215 (eval $ac_try) 2>&5
15216 ac_status=$?
15217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15218 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015219 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015220else
Martin v. Löwis11437992002-04-12 09:54:03 +000015221 echo "$as_me: failed program was:" >&5
15222cat conftest.$ac_ext >&5
15223
15224cat >>confdefs.h <<\_ACEOF
15225#define signed
15226_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000015227
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015228
Guido van Rossum7f43da71994-08-01 12:15:30 +000015229fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015230rm -f conftest.$ac_objext conftest.$ac_ext
15231echo "$as_me:$LINENO: result: $works" >&5
15232echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015233
Guido van Rossumda88dad1995-01-26 00:46:29 +000015234have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015235echo "$as_me:$LINENO: checking for prototypes" >&5
15236echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
15237cat >conftest.$ac_ext <<_ACEOF
15238#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015239#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015240int foo(int x) { return 0; }
Barry Warsawfe33b792003-01-07 22:42:49 +000015241#ifdef F77_DUMMY_MAIN
15242# ifdef __cplusplus
15243 extern "C"
15244# endif
15245 int F77_DUMMY_MAIN() { return 1; }
15246#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015247int
15248main ()
15249{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015250return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000015251 ;
15252 return 0;
15253}
15254_ACEOF
15255rm -f conftest.$ac_objext
15256if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15257 (eval $ac_compile) 2>&5
15258 ac_status=$?
15259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15260 (exit $ac_status); } &&
15261 { ac_try='test -s conftest.$ac_objext'
15262 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15263 (eval $ac_try) 2>&5
15264 ac_status=$?
15265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15266 (exit $ac_status); }; }; then
15267
15268
15269cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015270#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015271_ACEOF
15272
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015273 have_prototypes=yes
15274
Guido van Rossumf78abae1997-01-21 22:02:36 +000015275else
Martin v. Löwis11437992002-04-12 09:54:03 +000015276 echo "$as_me: failed program was:" >&5
15277cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000015278fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015279rm -f conftest.$ac_objext conftest.$ac_ext
15280echo "$as_me:$LINENO: result: $have_prototypes" >&5
15281echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015282
Guido van Rossumda88dad1995-01-26 00:46:29 +000015283works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015284echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
15285echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
15286cat >conftest.$ac_ext <<_ACEOF
15287#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015288#include "confdefs.h"
15289
15290#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000015291int foo(int x, ...) {
15292 va_list va;
15293 va_start(va, x);
15294 va_arg(va, int);
15295 va_arg(va, char *);
15296 va_arg(va, double);
15297 return 0;
15298}
Guido van Rossum7f43da71994-08-01 12:15:30 +000015299
Barry Warsawfe33b792003-01-07 22:42:49 +000015300#ifdef F77_DUMMY_MAIN
15301# ifdef __cplusplus
15302 extern "C"
15303# endif
15304 int F77_DUMMY_MAIN() { return 1; }
15305#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015306int
15307main ()
15308{
Guido van Rossum90eea071996-08-30 20:58:57 +000015309return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000015310 ;
15311 return 0;
15312}
15313_ACEOF
15314rm -f conftest.$ac_objext
15315if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15316 (eval $ac_compile) 2>&5
15317 ac_status=$?
15318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15319 (exit $ac_status); } &&
15320 { ac_try='test -s conftest.$ac_objext'
15321 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15322 (eval $ac_try) 2>&5
15323 ac_status=$?
15324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15325 (exit $ac_status); }; }; then
15326
15327
15328cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015329#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015330_ACEOF
15331
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015332 works=yes
15333
Guido van Rossumf78abae1997-01-21 22:02:36 +000015334else
Martin v. Löwis11437992002-04-12 09:54:03 +000015335 echo "$as_me: failed program was:" >&5
15336cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000015337fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015338rm -f conftest.$ac_objext conftest.$ac_ext
15339echo "$as_me:$LINENO: result: $works" >&5
15340echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015341
Guido van Rossumda88dad1995-01-26 00:46:29 +000015342if test "$have_prototypes" = yes; then
15343bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015344echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
15345echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
15346cat >conftest.$ac_ext <<_ACEOF
15347#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015348#include "confdefs.h"
15349#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000015350#ifdef F77_DUMMY_MAIN
15351# ifdef __cplusplus
15352 extern "C"
15353# endif
15354 int F77_DUMMY_MAIN() { return 1; }
15355#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015356int
15357main ()
15358{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015359char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000015360 ;
15361 return 0;
15362}
15363_ACEOF
15364rm -f conftest.$ac_objext
15365if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15366 (eval $ac_compile) 2>&5
15367 ac_status=$?
15368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15369 (exit $ac_status); } &&
15370 { ac_try='test -s conftest.$ac_objext'
15371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15372 (eval $ac_try) 2>&5
15373 ac_status=$?
15374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15375 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000015376 :
15377else
Martin v. Löwis11437992002-04-12 09:54:03 +000015378 echo "$as_me: failed program was:" >&5
15379cat conftest.$ac_ext >&5
15380
15381cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015382#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015383_ACEOF
15384
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015385 bad_prototypes=yes
15386
Guido van Rossum627b2d71993-12-24 10:39:16 +000015387fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015388rm -f conftest.$ac_objext conftest.$ac_ext
15389echo "$as_me:$LINENO: result: $bad_prototypes" >&5
15390echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015391fi
15392
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015393# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000015394echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
15395echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
15396cat >conftest.$ac_ext <<_ACEOF
15397#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015398#include "confdefs.h"
15399#include <sys/types.h>
15400#include <sys/socket.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000015401#ifdef F77_DUMMY_MAIN
15402# ifdef __cplusplus
15403 extern "C"
15404# endif
15405 int F77_DUMMY_MAIN() { return 1; }
15406#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015407int
15408main ()
15409{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015410struct sockaddr x;
15411x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015412 ;
15413 return 0;
15414}
15415_ACEOF
15416rm -f conftest.$ac_objext
15417if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15418 (eval $ac_compile) 2>&5
15419 ac_status=$?
15420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15421 (exit $ac_status); } &&
15422 { ac_try='test -s conftest.$ac_objext'
15423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15424 (eval $ac_try) 2>&5
15425 ac_status=$?
15426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15427 (exit $ac_status); }; }; then
15428 echo "$as_me:$LINENO: result: yes" >&5
15429echo "${ECHO_T}yes" >&6
15430
15431cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015432#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015433_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015434
15435else
Martin v. Löwis11437992002-04-12 09:54:03 +000015436 echo "$as_me: failed program was:" >&5
15437cat conftest.$ac_ext >&5
15438echo "$as_me:$LINENO: result: no" >&5
15439echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015440fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015441rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015442
Guido van Rossumda88dad1995-01-26 00:46:29 +000015443va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015444echo "$as_me:$LINENO: checking whether va_list is an array" >&5
15445echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
15446cat >conftest.$ac_ext <<_ACEOF
15447#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015448#include "confdefs.h"
15449
15450#ifdef HAVE_STDARG_PROTOTYPES
15451#include <stdarg.h>
15452#else
15453#include <varargs.h>
15454#endif
15455
Barry Warsawfe33b792003-01-07 22:42:49 +000015456#ifdef F77_DUMMY_MAIN
15457# ifdef __cplusplus
15458 extern "C"
15459# endif
15460 int F77_DUMMY_MAIN() { return 1; }
15461#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015462int
15463main ()
15464{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015465va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000015466 ;
15467 return 0;
15468}
15469_ACEOF
15470rm -f conftest.$ac_objext
15471if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15472 (eval $ac_compile) 2>&5
15473 ac_status=$?
15474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15475 (exit $ac_status); } &&
15476 { ac_try='test -s conftest.$ac_objext'
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
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015482 :
15483else
Martin v. Löwis11437992002-04-12 09:54:03 +000015484 echo "$as_me: failed program was:" >&5
15485cat conftest.$ac_ext >&5
15486
15487
15488cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015489#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015490_ACEOF
15491
Guido van Rossumda88dad1995-01-26 00:46:29 +000015492 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015493
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015494fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015495rm -f conftest.$ac_objext conftest.$ac_ext
15496echo "$as_me:$LINENO: result: $va_list_is_array" >&5
15497echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015498
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015499# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000015500
15501
15502
15503echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
15504echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
15505if test "${ac_cv_func_gethostbyname_r+set}" = set; then
15506 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015507else
Martin v. Löwis11437992002-04-12 09:54:03 +000015508 cat >conftest.$ac_ext <<_ACEOF
15509#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015510#include "confdefs.h"
15511/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015512 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015513#include <assert.h>
15514/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015515#ifdef __cplusplus
15516extern "C"
15517#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015518/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015519 builtin and then its argument prototype would still apply. */
15520char gethostbyname_r ();
15521char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015522
Barry Warsawfe33b792003-01-07 22:42:49 +000015523#ifdef F77_DUMMY_MAIN
15524# ifdef __cplusplus
15525 extern "C"
15526# endif
15527 int F77_DUMMY_MAIN() { return 1; }
15528#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015529int
15530main ()
15531{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015532/* The GNU C library defines this for functions which it implements
15533 to always fail with ENOSYS. Some functions are actually named
15534 something starting with __ and the normal name is an alias. */
15535#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
15536choke me
15537#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015538f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015539#endif
15540
Martin v. Löwis11437992002-04-12 09:54:03 +000015541 ;
15542 return 0;
15543}
15544_ACEOF
15545rm -f conftest.$ac_objext conftest$ac_exeext
15546if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15547 (eval $ac_link) 2>&5
15548 ac_status=$?
15549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15550 (exit $ac_status); } &&
15551 { ac_try='test -s conftest$ac_exeext'
15552 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15553 (eval $ac_try) 2>&5
15554 ac_status=$?
15555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15556 (exit $ac_status); }; }; then
15557 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015558else
Martin v. Löwis11437992002-04-12 09:54:03 +000015559 echo "$as_me: failed program was:" >&5
15560cat conftest.$ac_ext >&5
15561ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015562fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015563rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015564fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015565echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
15566echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
15567if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015568
Martin v. Löwis11437992002-04-12 09:54:03 +000015569 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015570#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015571_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015572
Martin v. Löwis11437992002-04-12 09:54:03 +000015573 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
15574echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015575 OLD_CFLAGS=$CFLAGS
15576 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015577 cat >conftest.$ac_ext <<_ACEOF
15578#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015579#include "confdefs.h"
15580
15581# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015582
Barry Warsawfe33b792003-01-07 22:42:49 +000015583#ifdef F77_DUMMY_MAIN
15584# ifdef __cplusplus
15585 extern "C"
15586# endif
15587 int F77_DUMMY_MAIN() { return 1; }
15588#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015589int
15590main ()
15591{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015592
15593 char *name;
15594 struct hostent *he, *res;
15595 char buffer[2048];
15596 int buflen = 2048;
15597 int h_errnop;
15598
15599 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015600
15601 ;
15602 return 0;
15603}
15604_ACEOF
15605rm -f conftest.$ac_objext
15606if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15607 (eval $ac_compile) 2>&5
15608 ac_status=$?
15609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15610 (exit $ac_status); } &&
15611 { ac_try='test -s conftest.$ac_objext'
15612 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15613 (eval $ac_try) 2>&5
15614 ac_status=$?
15615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15616 (exit $ac_status); }; }; then
15617
15618 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015619#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015620_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015621
Martin v. Löwis11437992002-04-12 09:54:03 +000015622
15623cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015624#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015625_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015626
Martin v. Löwis11437992002-04-12 09:54:03 +000015627 echo "$as_me:$LINENO: result: yes" >&5
15628echo "${ECHO_T}yes" >&6
15629
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015630else
Martin v. Löwis11437992002-04-12 09:54:03 +000015631 echo "$as_me: failed program was:" >&5
15632cat conftest.$ac_ext >&5
15633
15634 echo "$as_me:$LINENO: result: no" >&5
15635echo "${ECHO_T}no" >&6
15636 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
15637echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
15638 cat >conftest.$ac_ext <<_ACEOF
15639#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015640#include "confdefs.h"
15641
15642# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015643
Barry Warsawfe33b792003-01-07 22:42:49 +000015644#ifdef F77_DUMMY_MAIN
15645# ifdef __cplusplus
15646 extern "C"
15647# endif
15648 int F77_DUMMY_MAIN() { return 1; }
15649#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015650int
15651main ()
15652{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015653
15654 char *name;
15655 struct hostent *he;
15656 char buffer[2048];
15657 int buflen = 2048;
15658 int h_errnop;
15659
15660 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015661
15662 ;
15663 return 0;
15664}
15665_ACEOF
15666rm -f conftest.$ac_objext
15667if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15668 (eval $ac_compile) 2>&5
15669 ac_status=$?
15670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15671 (exit $ac_status); } &&
15672 { ac_try='test -s conftest.$ac_objext'
15673 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15674 (eval $ac_try) 2>&5
15675 ac_status=$?
15676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15677 (exit $ac_status); }; }; then
15678
15679 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015680#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015681_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015682
Martin v. Löwis11437992002-04-12 09:54:03 +000015683
15684cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015685#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015686_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015687
Martin v. Löwis11437992002-04-12 09:54:03 +000015688 echo "$as_me:$LINENO: result: yes" >&5
15689echo "${ECHO_T}yes" >&6
15690
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015691else
Martin v. Löwis11437992002-04-12 09:54:03 +000015692 echo "$as_me: failed program was:" >&5
15693cat conftest.$ac_ext >&5
15694
15695 echo "$as_me:$LINENO: result: no" >&5
15696echo "${ECHO_T}no" >&6
15697 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
15698echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
15699 cat >conftest.$ac_ext <<_ACEOF
15700#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015701#include "confdefs.h"
15702
15703# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015704
Barry Warsawfe33b792003-01-07 22:42:49 +000015705#ifdef F77_DUMMY_MAIN
15706# ifdef __cplusplus
15707 extern "C"
15708# endif
15709 int F77_DUMMY_MAIN() { return 1; }
15710#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015711int
15712main ()
15713{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015714
15715 char *name;
15716 struct hostent *he;
15717 struct hostent_data data;
15718
15719 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000015720
15721 ;
15722 return 0;
15723}
15724_ACEOF
15725rm -f conftest.$ac_objext
15726if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15727 (eval $ac_compile) 2>&5
15728 ac_status=$?
15729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15730 (exit $ac_status); } &&
15731 { ac_try='test -s conftest.$ac_objext'
15732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15733 (eval $ac_try) 2>&5
15734 ac_status=$?
15735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15736 (exit $ac_status); }; }; then
15737
15738 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015739#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015740_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015741
Martin v. Löwis11437992002-04-12 09:54:03 +000015742
15743cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015744#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015745_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015746
Martin v. Löwis11437992002-04-12 09:54:03 +000015747 echo "$as_me:$LINENO: result: yes" >&5
15748echo "${ECHO_T}yes" >&6
15749
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015750else
Martin v. Löwis11437992002-04-12 09:54:03 +000015751 echo "$as_me: failed program was:" >&5
15752cat conftest.$ac_ext >&5
15753
15754 echo "$as_me:$LINENO: result: no" >&5
15755echo "${ECHO_T}no" >&6
15756
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015757fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015758rm -f conftest.$ac_objext conftest.$ac_ext
15759
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015760fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015761rm -f conftest.$ac_objext conftest.$ac_ext
15762
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015763fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015764rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015765 CFLAGS=$OLD_CFLAGS
15766
15767else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015768
Martin v. Löwis11437992002-04-12 09:54:03 +000015769
15770for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000015771do
Martin v. Löwis11437992002-04-12 09:54:03 +000015772as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15773echo "$as_me:$LINENO: checking for $ac_func" >&5
15774echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15775if eval "test \"\${$as_ac_var+set}\" = set"; then
15776 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015777else
Martin v. Löwis11437992002-04-12 09:54:03 +000015778 cat >conftest.$ac_ext <<_ACEOF
15779#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015780#include "confdefs.h"
15781/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015782 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015783#include <assert.h>
15784/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015785#ifdef __cplusplus
15786extern "C"
15787#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015788/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015789 builtin and then its argument prototype would still apply. */
15790char $ac_func ();
15791char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015792
Barry Warsawfe33b792003-01-07 22:42:49 +000015793#ifdef F77_DUMMY_MAIN
15794# ifdef __cplusplus
15795 extern "C"
15796# endif
15797 int F77_DUMMY_MAIN() { return 1; }
15798#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015799int
15800main ()
15801{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015802/* The GNU C library defines this for functions which it implements
15803 to always fail with ENOSYS. Some functions are actually named
15804 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015805#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015806choke me
15807#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015808f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015809#endif
15810
Martin v. Löwis11437992002-04-12 09:54:03 +000015811 ;
15812 return 0;
15813}
15814_ACEOF
15815rm -f conftest.$ac_objext conftest$ac_exeext
15816if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15817 (eval $ac_link) 2>&5
15818 ac_status=$?
15819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15820 (exit $ac_status); } &&
15821 { ac_try='test -s conftest$ac_exeext'
15822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15823 (eval $ac_try) 2>&5
15824 ac_status=$?
15825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15826 (exit $ac_status); }; }; then
15827 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015828else
Martin v. Löwis11437992002-04-12 09:54:03 +000015829 echo "$as_me: failed program was:" >&5
15830cat conftest.$ac_ext >&5
15831eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015832fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015833rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015834fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015835echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15836echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15837if test `eval echo '${'$as_ac_var'}'` = yes; then
15838 cat >>confdefs.h <<_ACEOF
15839#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15840_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015841
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015842fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015843done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015844
Michael W. Hudson54241132001-12-07 15:38:26 +000015845
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015846fi
15847
Michael W. Hudson54241132001-12-07 15:38:26 +000015848
15849
15850
15851
15852
15853
Guido van Rossum627b2d71993-12-24 10:39:16 +000015854# checks for system services
15855# (none yet)
15856
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015857# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000015858echo "$as_me:$LINENO: checking for __fpu_control" >&5
15859echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
15860if test "${ac_cv_func___fpu_control+set}" = set; then
15861 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015862else
Martin v. Löwis11437992002-04-12 09:54:03 +000015863 cat >conftest.$ac_ext <<_ACEOF
15864#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015865#include "confdefs.h"
15866/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015867 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015868#include <assert.h>
15869/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015870#ifdef __cplusplus
15871extern "C"
15872#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015873/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015874 builtin and then its argument prototype would still apply. */
15875char __fpu_control ();
15876char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015877
Barry Warsawfe33b792003-01-07 22:42:49 +000015878#ifdef F77_DUMMY_MAIN
15879# ifdef __cplusplus
15880 extern "C"
15881# endif
15882 int F77_DUMMY_MAIN() { return 1; }
15883#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015884int
15885main ()
15886{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015887/* The GNU C library defines this for functions which it implements
15888 to always fail with ENOSYS. Some functions are actually named
15889 something starting with __ and the normal name is an alias. */
15890#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
15891choke me
15892#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015893f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015894#endif
15895
Martin v. Löwis11437992002-04-12 09:54:03 +000015896 ;
15897 return 0;
15898}
15899_ACEOF
15900rm -f conftest.$ac_objext conftest$ac_exeext
15901if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15902 (eval $ac_link) 2>&5
15903 ac_status=$?
15904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15905 (exit $ac_status); } &&
15906 { ac_try='test -s conftest$ac_exeext'
15907 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15908 (eval $ac_try) 2>&5
15909 ac_status=$?
15910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15911 (exit $ac_status); }; }; then
15912 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015913else
Martin v. Löwis11437992002-04-12 09:54:03 +000015914 echo "$as_me: failed program was:" >&5
15915cat conftest.$ac_ext >&5
15916ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015917fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015918rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015919fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015920echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
15921echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
15922if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015923 :
15924else
Martin v. Löwis11437992002-04-12 09:54:03 +000015925
15926echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
15927echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
15928if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
15929 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015930else
Martin v. Löwis11437992002-04-12 09:54:03 +000015931 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015932LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015933cat >conftest.$ac_ext <<_ACEOF
15934#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015935#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015936
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015937/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015938#ifdef __cplusplus
15939extern "C"
15940#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015941/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015942 builtin and then its argument prototype would still apply. */
15943char __fpu_control ();
Barry Warsawfe33b792003-01-07 22:42:49 +000015944#ifdef F77_DUMMY_MAIN
15945# ifdef __cplusplus
15946 extern "C"
15947# endif
15948 int F77_DUMMY_MAIN() { return 1; }
15949#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015950int
15951main ()
15952{
15953__fpu_control ();
15954 ;
15955 return 0;
15956}
15957_ACEOF
15958rm -f conftest.$ac_objext conftest$ac_exeext
15959if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15960 (eval $ac_link) 2>&5
15961 ac_status=$?
15962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15963 (exit $ac_status); } &&
15964 { ac_try='test -s conftest$ac_exeext'
15965 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15966 (eval $ac_try) 2>&5
15967 ac_status=$?
15968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15969 (exit $ac_status); }; }; then
15970 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015971else
Martin v. Löwis11437992002-04-12 09:54:03 +000015972 echo "$as_me: failed program was:" >&5
15973cat conftest.$ac_ext >&5
15974ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015975fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015976rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15977LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015978fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015979echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
15980echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
15981if test $ac_cv_lib_ieee___fpu_control = yes; then
15982 cat >>confdefs.h <<_ACEOF
15983#define HAVE_LIBIEEE 1
15984_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015985
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015986 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015987
Guido van Rossum627b2d71993-12-24 10:39:16 +000015988fi
15989
Michael W. Hudson54241132001-12-07 15:38:26 +000015990
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015991fi
15992
Michael W. Hudson54241132001-12-07 15:38:26 +000015993
Guido van Rossum7f253911997-05-09 02:42:48 +000015994# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000015995echo "$as_me:$LINENO: checking for --with-fpectl" >&5
15996echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
15997
Guido van Rossum7f253911997-05-09 02:42:48 +000015998# Check whether --with-fpectl or --without-fpectl was given.
15999if test "${with_fpectl+set}" = set; then
16000 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000016001
Guido van Rossum7f253911997-05-09 02:42:48 +000016002if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016003then
16004
16005cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000016006#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016007_ACEOF
16008
16009 echo "$as_me:$LINENO: result: yes" >&5
16010echo "${ECHO_T}yes" >&6
16011else echo "$as_me:$LINENO: result: no" >&5
16012echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016013fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016014else
Martin v. Löwis11437992002-04-12 09:54:03 +000016015 echo "$as_me:$LINENO: result: no" >&5
16016echo "${ECHO_T}no" >&6
16017fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000016018
Guido van Rossum7f43da71994-08-01 12:15:30 +000016019# check for --with-libm=...
16020
Guido van Rossum563e7081996-09-10 18:20:48 +000016021case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000016022Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016023BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000016024*) LIBM=-lm
16025esac
Martin v. Löwis11437992002-04-12 09:54:03 +000016026echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
16027echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
16028
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016029# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016030if test "${with_libm+set}" = set; then
16031 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000016032
Guido van Rossum7f253911997-05-09 02:42:48 +000016033if test "$withval" = no
16034then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000016035 echo "$as_me:$LINENO: result: force LIBM empty" >&5
16036echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016037elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016038then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000016039 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
16040echo "${ECHO_T}set LIBM=\"$withval\"" >&6
16041else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
16042echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
16043 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016044fi
Guido van Rossum7f253911997-05-09 02:42:48 +000016045else
Martin v. Löwis11437992002-04-12 09:54:03 +000016046 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
16047echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
16048fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016049
16050# check for --with-libc=...
16051
Martin v. Löwis11437992002-04-12 09:54:03 +000016052echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
16053echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
16054
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016055# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016056if test "${with_libc+set}" = set; then
16057 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000016058
Guido van Rossum7f253911997-05-09 02:42:48 +000016059if test "$withval" = no
16060then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000016061 echo "$as_me:$LINENO: result: force LIBC empty" >&5
16062echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016063elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016064then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000016065 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
16066echo "${ECHO_T}set LIBC=\"$withval\"" >&6
16067else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
16068echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
16069 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016070fi
Guido van Rossum7f253911997-05-09 02:42:48 +000016071else
Martin v. Löwis11437992002-04-12 09:54:03 +000016072 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
16073echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
16074fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016075
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016076# check for hypot() in math library
16077LIBS_SAVE=$LIBS
16078LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000016079
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016080for ac_func in hypot
16081do
Martin v. Löwis11437992002-04-12 09:54:03 +000016082as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16083echo "$as_me:$LINENO: checking for $ac_func" >&5
16084echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16085if eval "test \"\${$as_ac_var+set}\" = set"; then
16086 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016087else
Martin v. Löwis11437992002-04-12 09:54:03 +000016088 cat >conftest.$ac_ext <<_ACEOF
16089#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016090#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016091/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000016092 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016093#include <assert.h>
16094/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016095#ifdef __cplusplus
16096extern "C"
16097#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016098/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016099 builtin and then its argument prototype would still apply. */
16100char $ac_func ();
16101char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016102
Barry Warsawfe33b792003-01-07 22:42:49 +000016103#ifdef F77_DUMMY_MAIN
16104# ifdef __cplusplus
16105 extern "C"
16106# endif
16107 int F77_DUMMY_MAIN() { return 1; }
16108#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016109int
16110main ()
16111{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016112/* The GNU C library defines this for functions which it implements
16113 to always fail with ENOSYS. Some functions are actually named
16114 something starting with __ and the normal name is an alias. */
16115#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16116choke me
16117#else
Martin v. Löwis11437992002-04-12 09:54:03 +000016118f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016119#endif
16120
Martin v. Löwis11437992002-04-12 09:54:03 +000016121 ;
16122 return 0;
16123}
16124_ACEOF
16125rm -f conftest.$ac_objext conftest$ac_exeext
16126if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16127 (eval $ac_link) 2>&5
16128 ac_status=$?
16129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16130 (exit $ac_status); } &&
16131 { ac_try='test -s conftest$ac_exeext'
16132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16133 (eval $ac_try) 2>&5
16134 ac_status=$?
16135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16136 (exit $ac_status); }; }; then
16137 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016138else
Martin v. Löwis11437992002-04-12 09:54:03 +000016139 echo "$as_me: failed program was:" >&5
16140cat conftest.$ac_ext >&5
16141eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016142fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016143rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016144fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016145echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16146echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16147if test `eval echo '${'$as_ac_var'}'` = yes; then
16148 cat >>confdefs.h <<_ACEOF
16149#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16150_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000016151
Michael W. Hudson54241132001-12-07 15:38:26 +000016152else
Martin v. Löwis11437992002-04-12 09:54:03 +000016153 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016154fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016155done
16156
Michael W. Hudson54241132001-12-07 15:38:26 +000016157
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016158LIBS=$LIBS_SAVE
16159
Guido van Rossumef2255b2000-03-10 22:30:29 +000016160# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000016161if test "${ac_cv_header_wchar_h+set}" = set; then
16162 echo "$as_me:$LINENO: checking for wchar.h" >&5
16163echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16164if test "${ac_cv_header_wchar_h+set}" = set; then
16165 echo $ECHO_N "(cached) $ECHO_C" >&6
16166fi
16167echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16168echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000016169else
Martin v. Löwis11437992002-04-12 09:54:03 +000016170 # Is the header compilable?
16171echo "$as_me:$LINENO: checking wchar.h usability" >&5
16172echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
16173cat >conftest.$ac_ext <<_ACEOF
16174#line $LINENO "configure"
16175#include "confdefs.h"
16176$ac_includes_default
16177#include <wchar.h>
16178_ACEOF
16179rm -f conftest.$ac_objext
16180if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16181 (eval $ac_compile) 2>&5
16182 ac_status=$?
16183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16184 (exit $ac_status); } &&
16185 { ac_try='test -s conftest.$ac_objext'
16186 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16187 (eval $ac_try) 2>&5
16188 ac_status=$?
16189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16190 (exit $ac_status); }; }; then
16191 ac_header_compiler=yes
16192else
16193 echo "$as_me: failed program was:" >&5
16194cat conftest.$ac_ext >&5
16195ac_header_compiler=no
16196fi
16197rm -f conftest.$ac_objext conftest.$ac_ext
16198echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16199echo "${ECHO_T}$ac_header_compiler" >&6
16200
16201# Is the header present?
16202echo "$as_me:$LINENO: checking wchar.h presence" >&5
16203echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
16204cat >conftest.$ac_ext <<_ACEOF
16205#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016206#include "confdefs.h"
16207#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016208_ACEOF
16209if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16210 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16211 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000016212 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016213 rm -f conftest.er1
16214 cat conftest.err >&5
16215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16216 (exit $ac_status); } >/dev/null; then
16217 if test -s conftest.err; then
16218 ac_cpp_err=$ac_c_preproc_warn_flag
16219 else
16220 ac_cpp_err=
16221 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016222else
Martin v. Löwis11437992002-04-12 09:54:03 +000016223 ac_cpp_err=yes
16224fi
16225if test -z "$ac_cpp_err"; then
16226 ac_header_preproc=yes
16227else
16228 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000016229 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016230 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016231fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016232rm -f conftest.err conftest.$ac_ext
16233echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16234echo "${ECHO_T}$ac_header_preproc" >&6
16235
16236# So? What about this header?
16237case $ac_header_compiler:$ac_header_preproc in
16238 yes:no )
16239 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
16240echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16241 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
16242echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
16243 no:yes )
16244 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
16245echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
16246 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
16247echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
16248 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
16249echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
16250esac
16251echo "$as_me:$LINENO: checking for wchar.h" >&5
16252echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16253if test "${ac_cv_header_wchar_h+set}" = set; then
16254 echo $ECHO_N "(cached) $ECHO_C" >&6
16255else
16256 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000016257fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016258echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16259echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
16260
16261fi
16262if test $ac_cv_header_wchar_h = yes; then
16263
16264
16265cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016266#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016267_ACEOF
16268
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016269 wchar_h="yes"
16270
Guido van Rossumef2255b2000-03-10 22:30:29 +000016271else
Martin v. Löwis11437992002-04-12 09:54:03 +000016272 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016273
16274fi
16275
Michael W. Hudson54241132001-12-07 15:38:26 +000016276
Martin v. Löwis11437992002-04-12 09:54:03 +000016277
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016278# determine wchar_t size
16279if test "$wchar_h" = yes
16280then
Martin v. Löwis11437992002-04-12 09:54:03 +000016281 echo "$as_me:$LINENO: checking for wchar_t" >&5
16282echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
16283if test "${ac_cv_type_wchar_t+set}" = set; then
16284 echo $ECHO_N "(cached) $ECHO_C" >&6
16285else
16286 cat >conftest.$ac_ext <<_ACEOF
16287#line $LINENO "configure"
16288#include "confdefs.h"
16289#include <wchar.h>
16290
Barry Warsawfe33b792003-01-07 22:42:49 +000016291#ifdef F77_DUMMY_MAIN
16292# ifdef __cplusplus
16293 extern "C"
16294# endif
16295 int F77_DUMMY_MAIN() { return 1; }
16296#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016297int
16298main ()
16299{
16300if ((wchar_t *) 0)
16301 return 0;
16302if (sizeof (wchar_t))
16303 return 0;
16304 ;
16305 return 0;
16306}
16307_ACEOF
16308rm -f conftest.$ac_objext
16309if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16310 (eval $ac_compile) 2>&5
16311 ac_status=$?
16312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16313 (exit $ac_status); } &&
16314 { ac_try='test -s conftest.$ac_objext'
16315 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16316 (eval $ac_try) 2>&5
16317 ac_status=$?
16318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16319 (exit $ac_status); }; }; then
16320 ac_cv_type_wchar_t=yes
16321else
16322 echo "$as_me: failed program was:" >&5
16323cat conftest.$ac_ext >&5
16324ac_cv_type_wchar_t=no
16325fi
16326rm -f conftest.$ac_objext conftest.$ac_ext
16327fi
16328echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
16329echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
16330
16331echo "$as_me:$LINENO: checking size of wchar_t" >&5
16332echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
16333if test "${ac_cv_sizeof_wchar_t+set}" = set; then
16334 echo $ECHO_N "(cached) $ECHO_C" >&6
16335else
16336 if test "$ac_cv_type_wchar_t" = yes; then
16337 # The cast to unsigned long works around a bug in the HP C Compiler
16338 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16339 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16340 # This bug is HP SR number 8606223364.
16341 if test "$cross_compiling" = yes; then
16342 # Depending upon the size, compute the lo and hi bounds.
16343cat >conftest.$ac_ext <<_ACEOF
16344#line $LINENO "configure"
16345#include "confdefs.h"
16346#include <wchar.h>
16347
Barry Warsawfe33b792003-01-07 22:42:49 +000016348#ifdef F77_DUMMY_MAIN
16349# ifdef __cplusplus
16350 extern "C"
16351# endif
16352 int F77_DUMMY_MAIN() { return 1; }
16353#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016354int
16355main ()
16356{
16357static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
16358test_array [0] = 0
16359
16360 ;
16361 return 0;
16362}
16363_ACEOF
16364rm -f conftest.$ac_objext
16365if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16366 (eval $ac_compile) 2>&5
16367 ac_status=$?
16368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16369 (exit $ac_status); } &&
16370 { ac_try='test -s conftest.$ac_objext'
16371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16372 (eval $ac_try) 2>&5
16373 ac_status=$?
16374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16375 (exit $ac_status); }; }; then
16376 ac_lo=0 ac_mid=0
16377 while :; do
16378 cat >conftest.$ac_ext <<_ACEOF
16379#line $LINENO "configure"
16380#include "confdefs.h"
16381#include <wchar.h>
16382
Barry Warsawfe33b792003-01-07 22:42:49 +000016383#ifdef F77_DUMMY_MAIN
16384# ifdef __cplusplus
16385 extern "C"
16386# endif
16387 int F77_DUMMY_MAIN() { return 1; }
16388#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016389int
16390main ()
16391{
16392static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16393test_array [0] = 0
16394
16395 ;
16396 return 0;
16397}
16398_ACEOF
16399rm -f conftest.$ac_objext
16400if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16401 (eval $ac_compile) 2>&5
16402 ac_status=$?
16403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16404 (exit $ac_status); } &&
16405 { ac_try='test -s conftest.$ac_objext'
16406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16407 (eval $ac_try) 2>&5
16408 ac_status=$?
16409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16410 (exit $ac_status); }; }; then
16411 ac_hi=$ac_mid; break
16412else
16413 echo "$as_me: failed program was:" >&5
16414cat conftest.$ac_ext >&5
16415ac_lo=`expr $ac_mid + 1`
16416 if test $ac_lo -le $ac_mid; then
16417 ac_lo= ac_hi=
16418 break
16419 fi
16420 ac_mid=`expr 2 '*' $ac_mid + 1`
16421fi
16422rm -f conftest.$ac_objext conftest.$ac_ext
16423 done
16424else
16425 echo "$as_me: failed program was:" >&5
16426cat conftest.$ac_ext >&5
16427cat >conftest.$ac_ext <<_ACEOF
16428#line $LINENO "configure"
16429#include "confdefs.h"
16430#include <wchar.h>
16431
Barry Warsawfe33b792003-01-07 22:42:49 +000016432#ifdef F77_DUMMY_MAIN
16433# ifdef __cplusplus
16434 extern "C"
16435# endif
16436 int F77_DUMMY_MAIN() { return 1; }
16437#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016438int
16439main ()
16440{
16441static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
16442test_array [0] = 0
16443
16444 ;
16445 return 0;
16446}
16447_ACEOF
16448rm -f conftest.$ac_objext
16449if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16450 (eval $ac_compile) 2>&5
16451 ac_status=$?
16452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16453 (exit $ac_status); } &&
16454 { ac_try='test -s conftest.$ac_objext'
16455 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16456 (eval $ac_try) 2>&5
16457 ac_status=$?
16458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16459 (exit $ac_status); }; }; then
16460 ac_hi=-1 ac_mid=-1
16461 while :; do
16462 cat >conftest.$ac_ext <<_ACEOF
16463#line $LINENO "configure"
16464#include "confdefs.h"
16465#include <wchar.h>
16466
Barry Warsawfe33b792003-01-07 22:42:49 +000016467#ifdef F77_DUMMY_MAIN
16468# ifdef __cplusplus
16469 extern "C"
16470# endif
16471 int F77_DUMMY_MAIN() { return 1; }
16472#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016473int
16474main ()
16475{
16476static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
16477test_array [0] = 0
16478
16479 ;
16480 return 0;
16481}
16482_ACEOF
16483rm -f conftest.$ac_objext
16484if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16485 (eval $ac_compile) 2>&5
16486 ac_status=$?
16487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16488 (exit $ac_status); } &&
16489 { ac_try='test -s conftest.$ac_objext'
16490 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16491 (eval $ac_try) 2>&5
16492 ac_status=$?
16493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16494 (exit $ac_status); }; }; then
16495 ac_lo=$ac_mid; break
16496else
16497 echo "$as_me: failed program was:" >&5
16498cat conftest.$ac_ext >&5
16499ac_hi=`expr '(' $ac_mid ')' - 1`
16500 if test $ac_mid -le $ac_hi; then
16501 ac_lo= ac_hi=
16502 break
16503 fi
16504 ac_mid=`expr 2 '*' $ac_mid`
16505fi
16506rm -f conftest.$ac_objext conftest.$ac_ext
16507 done
16508else
16509 echo "$as_me: failed program was:" >&5
16510cat conftest.$ac_ext >&5
16511ac_lo= ac_hi=
16512fi
16513rm -f conftest.$ac_objext conftest.$ac_ext
16514fi
16515rm -f conftest.$ac_objext conftest.$ac_ext
16516# Binary search between lo and hi bounds.
16517while test "x$ac_lo" != "x$ac_hi"; do
16518 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
16519 cat >conftest.$ac_ext <<_ACEOF
16520#line $LINENO "configure"
16521#include "confdefs.h"
16522#include <wchar.h>
16523
Barry Warsawfe33b792003-01-07 22:42:49 +000016524#ifdef F77_DUMMY_MAIN
16525# ifdef __cplusplus
16526 extern "C"
16527# endif
16528 int F77_DUMMY_MAIN() { return 1; }
16529#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016530int
16531main ()
16532{
16533static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16534test_array [0] = 0
16535
16536 ;
16537 return 0;
16538}
16539_ACEOF
16540rm -f conftest.$ac_objext
16541if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16542 (eval $ac_compile) 2>&5
16543 ac_status=$?
16544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16545 (exit $ac_status); } &&
16546 { ac_try='test -s conftest.$ac_objext'
16547 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16548 (eval $ac_try) 2>&5
16549 ac_status=$?
16550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16551 (exit $ac_status); }; }; then
16552 ac_hi=$ac_mid
16553else
16554 echo "$as_me: failed program was:" >&5
16555cat conftest.$ac_ext >&5
16556ac_lo=`expr '(' $ac_mid ')' + 1`
16557fi
16558rm -f conftest.$ac_objext conftest.$ac_ext
16559done
16560case $ac_lo in
16561?*) ac_cv_sizeof_wchar_t=$ac_lo;;
16562'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
16563echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
16564 { (exit 1); exit 1; }; } ;;
16565esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016566else
16567 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016568 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
16569echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16570 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000016571else
Martin v. Löwis11437992002-04-12 09:54:03 +000016572 cat >conftest.$ac_ext <<_ACEOF
16573#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016574#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016575#include <wchar.h>
16576
16577long longval () { return (long) (sizeof (wchar_t)); }
16578unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000016579#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016580#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000016581#ifdef F77_DUMMY_MAIN
16582# ifdef __cplusplus
16583 extern "C"
16584# endif
16585 int F77_DUMMY_MAIN() { return 1; }
16586#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016587int
16588main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016589{
Martin v. Löwis11437992002-04-12 09:54:03 +000016590
16591 FILE *f = fopen ("conftest.val", "w");
16592 if (! f)
16593 exit (1);
16594 if (((long) (sizeof (wchar_t))) < 0)
16595 {
16596 long i = longval ();
16597 if (i != ((long) (sizeof (wchar_t))))
16598 exit (1);
16599 fprintf (f, "%ld\n", i);
16600 }
16601 else
16602 {
16603 unsigned long i = ulongval ();
16604 if (i != ((long) (sizeof (wchar_t))))
16605 exit (1);
16606 fprintf (f, "%lu\n", i);
16607 }
16608 exit (ferror (f) || fclose (f) != 0);
16609
16610 ;
16611 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000016612}
Martin v. Löwis11437992002-04-12 09:54:03 +000016613_ACEOF
16614rm -f conftest$ac_exeext
16615if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16616 (eval $ac_link) 2>&5
16617 ac_status=$?
16618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16619 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16621 (eval $ac_try) 2>&5
16622 ac_status=$?
16623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16624 (exit $ac_status); }; }; then
16625 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000016626else
Martin v. Löwis11437992002-04-12 09:54:03 +000016627 echo "$as_me: program exited with status $ac_status" >&5
16628echo "$as_me: failed program was:" >&5
16629cat conftest.$ac_ext >&5
16630( exit $ac_status )
16631{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
16632echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
16633 { (exit 1); exit 1; }; }
16634fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016635rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016636fi
16637fi
16638rm -f conftest.val
16639else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016640 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000016641fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016642fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016643echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
16644echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
16645cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016646#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016647_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016648
Michael W. Hudson54241132001-12-07 15:38:26 +000016649
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016650fi
16651
Martin v. Löwis11437992002-04-12 09:54:03 +000016652echo "$as_me:$LINENO: checking what type to use for unicode" >&5
16653echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016654# Check whether --enable-unicode or --disable-unicode was given.
16655if test "${enable_unicode+set}" = set; then
16656 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000016657
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016658else
16659 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000016660fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016661
16662if test $enable_unicode = yes
16663then
Martin v. Löwisfd917792001-06-27 20:22:04 +000016664 # Without any arguments, Py_UNICODE defaults to two-byte mode
16665 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016666fi
16667
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016668
16669
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016670case "$enable_unicode" in
16671ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000016672 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016673#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000016674_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016675
16676 ;;
16677ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000016678 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016679#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000016680_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016681
16682 ;;
16683esac
16684
Michael W. Hudson54241132001-12-07 15:38:26 +000016685
Martin v. Löwis11437992002-04-12 09:54:03 +000016686
16687
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016688
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016689if test "$enable_unicode" = "no"
16690then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016691 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000016692 echo "$as_me:$LINENO: result: not used" >&5
16693echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016694else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016695 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000016696
16697cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016698#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016699_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016700
16701 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
16702 then
16703 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016704
Martin v. Löwis11437992002-04-12 09:54:03 +000016705cat >>confdefs.h <<\_ACEOF
16706#define HAVE_USABLE_WCHAR_T 1
16707_ACEOF
16708
16709 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016710#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016711_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016712
16713 elif test "$ac_cv_sizeof_short" = "$unicode_size"
16714 then
16715 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000016716 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016717#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000016718_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016719
16720 elif test "$ac_cv_sizeof_long" = "$unicode_size"
16721 then
16722 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000016723 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016724#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000016725_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016726
16727 else
16728 PY_UNICODE_TYPE="no type found"
16729 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016730 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
16731echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016732fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016733
16734# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000016735echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
16736echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
16737if test "${ac_cv_c_bigendian+set}" = set; then
16738 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000016739else
Martin v. Löwis11437992002-04-12 09:54:03 +000016740 # See if sys/param.h defines the BYTE_ORDER macro.
16741cat >conftest.$ac_ext <<_ACEOF
16742#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016743#include "confdefs.h"
16744#include <sys/types.h>
16745#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000016746
Barry Warsawfe33b792003-01-07 22:42:49 +000016747#ifdef F77_DUMMY_MAIN
16748# ifdef __cplusplus
16749 extern "C"
16750# endif
16751 int F77_DUMMY_MAIN() { return 1; }
16752#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016753int
16754main ()
16755{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016756#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
16757 bogus endian macros
16758#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016759
16760 ;
16761 return 0;
16762}
16763_ACEOF
16764rm -f conftest.$ac_objext
16765if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16766 (eval $ac_compile) 2>&5
16767 ac_status=$?
16768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16769 (exit $ac_status); } &&
16770 { ac_try='test -s conftest.$ac_objext'
16771 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16772 (eval $ac_try) 2>&5
16773 ac_status=$?
16774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16775 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016776 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000016777cat >conftest.$ac_ext <<_ACEOF
16778#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016779#include "confdefs.h"
16780#include <sys/types.h>
16781#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000016782
Barry Warsawfe33b792003-01-07 22:42:49 +000016783#ifdef F77_DUMMY_MAIN
16784# ifdef __cplusplus
16785 extern "C"
16786# endif
16787 int F77_DUMMY_MAIN() { return 1; }
16788#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016789int
16790main ()
16791{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016792#if BYTE_ORDER != BIG_ENDIAN
16793 not big endian
16794#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016795
16796 ;
16797 return 0;
16798}
16799_ACEOF
16800rm -f conftest.$ac_objext
16801if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16802 (eval $ac_compile) 2>&5
16803 ac_status=$?
16804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16805 (exit $ac_status); } &&
16806 { ac_try='test -s conftest.$ac_objext'
16807 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16808 (eval $ac_try) 2>&5
16809 ac_status=$?
16810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16811 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016812 ac_cv_c_bigendian=yes
16813else
Martin v. Löwis11437992002-04-12 09:54:03 +000016814 echo "$as_me: failed program was:" >&5
16815cat conftest.$ac_ext >&5
16816ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016817fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016818rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016819else
Martin v. Löwis11437992002-04-12 09:54:03 +000016820 echo "$as_me: failed program was:" >&5
16821cat conftest.$ac_ext >&5
16822# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000016823if test "$cross_compiling" = yes; then
Barry Warsawfe33b792003-01-07 22:42:49 +000016824 # try to guess the endianess by grep'ing values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000016825 ac_cv_c_bigendian=unknown
16826 cat >conftest.$ac_ext <<_ACEOF
16827#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016828#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016829short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16830short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16831void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
16832short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16833short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16834void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Barry Warsawfe33b792003-01-07 22:42:49 +000016835#ifdef F77_DUMMY_MAIN
16836# ifdef __cplusplus
16837 extern "C"
16838# endif
16839 int F77_DUMMY_MAIN() { return 1; }
16840#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016841int
16842main ()
16843{
16844 _ascii (); _ebcdic ();
16845 ;
16846 return 0;
16847}
16848_ACEOF
16849rm -f conftest.$ac_objext
16850if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16851 (eval $ac_compile) 2>&5
16852 ac_status=$?
16853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16854 (exit $ac_status); } &&
16855 { ac_try='test -s conftest.$ac_objext'
16856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16857 (eval $ac_try) 2>&5
16858 ac_status=$?
16859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16860 (exit $ac_status); }; }; then
Barry Warsawfe33b792003-01-07 22:42:49 +000016861 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016862 ac_cv_c_bigendian=yes
16863fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016864if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016865 if test "$ac_cv_c_bigendian" = unknown; then
16866 ac_cv_c_bigendian=no
16867 else
16868 # finding both strings is unlikely to happen, but who knows?
16869 ac_cv_c_bigendian=unknown
16870 fi
16871fi
16872else
16873 echo "$as_me: failed program was:" >&5
16874cat conftest.$ac_ext >&5
16875fi
16876rm -f conftest.$ac_objext conftest.$ac_ext
16877else
16878 cat >conftest.$ac_ext <<_ACEOF
16879#line $LINENO "configure"
16880#include "confdefs.h"
16881int
16882main ()
16883{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016884 /* Are we little or big endian? From Harbison&Steele. */
16885 union
16886 {
16887 long l;
16888 char c[sizeof (long)];
16889 } u;
16890 u.l = 1;
16891 exit (u.c[sizeof (long) - 1] == 1);
16892}
Martin v. Löwis11437992002-04-12 09:54:03 +000016893_ACEOF
16894rm -f conftest$ac_exeext
16895if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16896 (eval $ac_link) 2>&5
16897 ac_status=$?
16898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16899 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16901 (eval $ac_try) 2>&5
16902 ac_status=$?
16903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16904 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016905 ac_cv_c_bigendian=no
16906else
Martin v. Löwis11437992002-04-12 09:54:03 +000016907 echo "$as_me: program exited with status $ac_status" >&5
16908echo "$as_me: failed program was:" >&5
16909cat conftest.$ac_ext >&5
16910( exit $ac_status )
16911ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000016912fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016913rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016914fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016915fi
16916rm -f conftest.$ac_objext conftest.$ac_ext
16917fi
16918echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
16919echo "${ECHO_T}$ac_cv_c_bigendian" >&6
16920case $ac_cv_c_bigendian in
16921 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000016922
Martin v. Löwis11437992002-04-12 09:54:03 +000016923cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016924#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016925_ACEOF
16926 ;;
16927 no)
16928 ;;
16929 *)
Barry Warsawfe33b792003-01-07 22:42:49 +000016930 { { echo "$as_me:$LINENO: error: unknown endianess
Martin v. Löwis11437992002-04-12 09:54:03 +000016931presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Barry Warsawfe33b792003-01-07 22:42:49 +000016932echo "$as_me: error: unknown endianess
Martin v. Löwis11437992002-04-12 09:54:03 +000016933presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
16934 { (exit 1); exit 1; }; } ;;
16935esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000016936
Michael W. Hudson54241132001-12-07 15:38:26 +000016937
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016938# Check whether right shifting a negative integer extends the sign bit
16939# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000016940echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
16941echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
16942if test "${ac_cv_rshift_extends_sign+set}" = set; then
16943 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016944else
Martin v. Löwis11437992002-04-12 09:54:03 +000016945
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016946if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000016947 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016948else
Martin v. Löwis11437992002-04-12 09:54:03 +000016949 cat >conftest.$ac_ext <<_ACEOF
16950#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016951#include "confdefs.h"
16952
16953int main()
16954{
Vladimir Marangozova6180282000-07-12 05:05:06 +000016955 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016956}
16957
Martin v. Löwis11437992002-04-12 09:54:03 +000016958_ACEOF
16959rm -f conftest$ac_exeext
16960if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16961 (eval $ac_link) 2>&5
16962 ac_status=$?
16963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16964 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16965 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16966 (eval $ac_try) 2>&5
16967 ac_status=$?
16968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16969 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000016970 ac_cv_rshift_extends_sign=yes
16971else
Martin v. Löwis11437992002-04-12 09:54:03 +000016972 echo "$as_me: program exited with status $ac_status" >&5
16973echo "$as_me: failed program was:" >&5
16974cat conftest.$ac_ext >&5
16975( exit $ac_status )
16976ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000016977fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016978rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016979fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000016980fi
16981
Martin v. Löwis11437992002-04-12 09:54:03 +000016982echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
16983echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016984if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016985then
Martin v. Löwis11437992002-04-12 09:54:03 +000016986
16987cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016988#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016989_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016990
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016991fi
16992
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016993# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016994echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
16995echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
16996if test "${ac_cv_have_getc_unlocked+set}" = set; then
16997 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016998else
Martin v. Löwis11437992002-04-12 09:54:03 +000016999
17000cat >conftest.$ac_ext <<_ACEOF
17001#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017002#include "confdefs.h"
17003#include <stdio.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000017004#ifdef F77_DUMMY_MAIN
17005# ifdef __cplusplus
17006 extern "C"
17007# endif
17008 int F77_DUMMY_MAIN() { return 1; }
17009#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017010int
17011main ()
17012{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017013
17014 FILE *f = fopen("/dev/null", "r");
17015 flockfile(f);
17016 getc_unlocked(f);
17017 funlockfile(f);
17018
Martin v. Löwis11437992002-04-12 09:54:03 +000017019 ;
17020 return 0;
17021}
17022_ACEOF
17023rm -f conftest.$ac_objext conftest$ac_exeext
17024if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17025 (eval $ac_link) 2>&5
17026 ac_status=$?
17027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17028 (exit $ac_status); } &&
17029 { ac_try='test -s conftest$ac_exeext'
17030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17031 (eval $ac_try) 2>&5
17032 ac_status=$?
17033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17034 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017035 ac_cv_have_getc_unlocked=yes
17036else
Martin v. Löwis11437992002-04-12 09:54:03 +000017037 echo "$as_me: failed program was:" >&5
17038cat conftest.$ac_ext >&5
17039ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017040fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017041rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017042fi
17043
Martin v. Löwis11437992002-04-12 09:54:03 +000017044echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
17045echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017046if test "$ac_cv_have_getc_unlocked" = yes
17047then
Martin v. Löwis11437992002-04-12 09:54:03 +000017048
17049cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017050#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017051_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017052
17053fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017054
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017055# check for readline 2.2
17056cat >conftest.$ac_ext <<_ACEOF
17057#line $LINENO "configure"
17058#include "confdefs.h"
17059#include <readline/readline.h>
17060_ACEOF
17061if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17062 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17063 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000017064 egrep -v '^ *\+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017065 rm -f conftest.er1
17066 cat conftest.err >&5
17067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17068 (exit $ac_status); } >/dev/null; then
17069 if test -s conftest.err; then
17070 ac_cpp_err=$ac_c_preproc_warn_flag
17071 else
17072 ac_cpp_err=
17073 fi
17074else
17075 ac_cpp_err=yes
17076fi
17077if test -z "$ac_cpp_err"; then
17078 have_readline=yes
17079else
17080 echo "$as_me: failed program was:" >&5
17081 cat conftest.$ac_ext >&5
17082 have_readline=no
17083fi
17084rm -f conftest.err conftest.$ac_ext
17085if test $have_readline = yes
17086then
17087 cat >conftest.$ac_ext <<_ACEOF
17088#line $LINENO "configure"
17089#include "confdefs.h"
17090#include <readline/readline.h>
17091
17092_ACEOF
17093if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000017094 egrep "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017095
17096cat >>confdefs.h <<\_ACEOF
17097#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
17098_ACEOF
17099
17100fi
17101rm -f conftest*
17102
17103fi
17104
Martin v. Löwis0daad592001-09-30 21:09:59 +000017105# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000017106echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
17107echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
17108if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
17109 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000017110else
Martin v. Löwis11437992002-04-12 09:54:03 +000017111 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000017112LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017113cat >conftest.$ac_ext <<_ACEOF
17114#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000017115#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000017116
Guido van Rossum353ae582001-07-10 16:45:32 +000017117/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017118#ifdef __cplusplus
17119extern "C"
17120#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000017121/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017122 builtin and then its argument prototype would still apply. */
17123char rl_pre_input_hook ();
Barry Warsawfe33b792003-01-07 22:42:49 +000017124#ifdef F77_DUMMY_MAIN
17125# ifdef __cplusplus
17126 extern "C"
17127# endif
17128 int F77_DUMMY_MAIN() { return 1; }
17129#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017130int
17131main ()
17132{
17133rl_pre_input_hook ();
17134 ;
17135 return 0;
17136}
17137_ACEOF
17138rm -f conftest.$ac_objext conftest$ac_exeext
17139if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17140 (eval $ac_link) 2>&5
17141 ac_status=$?
17142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17143 (exit $ac_status); } &&
17144 { ac_try='test -s conftest$ac_exeext'
17145 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17146 (eval $ac_try) 2>&5
17147 ac_status=$?
17148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17149 (exit $ac_status); }; }; then
17150 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000017151else
Martin v. Löwis11437992002-04-12 09:54:03 +000017152 echo "$as_me: failed program was:" >&5
17153cat conftest.$ac_ext >&5
17154ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000017155fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017156rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17157LIBS=$ac_check_lib_save_LIBS
17158fi
17159echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
17160echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
17161if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017162
Martin v. Löwis11437992002-04-12 09:54:03 +000017163cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017164#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017165_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017166
Martin v. Löwis0daad592001-09-30 21:09:59 +000017167fi
17168
Michael W. Hudson54241132001-12-07 15:38:26 +000017169
Martin v. Löwis0daad592001-09-30 21:09:59 +000017170# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000017171echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
17172echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
17173if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
17174 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000017175else
Martin v. Löwis11437992002-04-12 09:54:03 +000017176 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000017177LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017178cat >conftest.$ac_ext <<_ACEOF
17179#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000017180#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000017181
Martin v. Löwis0daad592001-09-30 21:09:59 +000017182/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017183#ifdef __cplusplus
17184extern "C"
17185#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000017186/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017187 builtin and then its argument prototype would still apply. */
17188char rl_completion_matches ();
Barry Warsawfe33b792003-01-07 22:42:49 +000017189#ifdef F77_DUMMY_MAIN
17190# ifdef __cplusplus
17191 extern "C"
17192# endif
17193 int F77_DUMMY_MAIN() { return 1; }
17194#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017195int
17196main ()
17197{
17198rl_completion_matches ();
17199 ;
17200 return 0;
17201}
17202_ACEOF
17203rm -f conftest.$ac_objext conftest$ac_exeext
17204if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17205 (eval $ac_link) 2>&5
17206 ac_status=$?
17207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17208 (exit $ac_status); } &&
17209 { ac_try='test -s conftest$ac_exeext'
17210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17211 (eval $ac_try) 2>&5
17212 ac_status=$?
17213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17214 (exit $ac_status); }; }; then
17215 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000017216else
Martin v. Löwis11437992002-04-12 09:54:03 +000017217 echo "$as_me: failed program was:" >&5
17218cat conftest.$ac_ext >&5
17219ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000017220fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017221rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17222LIBS=$ac_check_lib_save_LIBS
17223fi
17224echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
17225echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
17226if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017227
Martin v. Löwis11437992002-04-12 09:54:03 +000017228cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017229#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017230_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017231
Guido van Rossum353ae582001-07-10 16:45:32 +000017232fi
17233
Jack Jansendd19cf82001-12-06 22:36:17 +000017234
Martin v. Löwis11437992002-04-12 09:54:03 +000017235echo "$as_me:$LINENO: checking for broken nice()" >&5
17236echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
17237if test "${ac_cv_broken_nice+set}" = set; then
17238 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017239else
Martin v. Löwis11437992002-04-12 09:54:03 +000017240
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017241if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017242 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017243else
Martin v. Löwis11437992002-04-12 09:54:03 +000017244 cat >conftest.$ac_ext <<_ACEOF
17245#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017246#include "confdefs.h"
17247
17248int main()
17249{
17250 int val1 = nice(1);
17251 if (val1 != -1 && val1 == nice(2))
17252 exit(0);
17253 exit(1);
17254}
17255
Martin v. Löwis11437992002-04-12 09:54:03 +000017256_ACEOF
17257rm -f conftest$ac_exeext
17258if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17259 (eval $ac_link) 2>&5
17260 ac_status=$?
17261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17262 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17264 (eval $ac_try) 2>&5
17265 ac_status=$?
17266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17267 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017268 ac_cv_broken_nice=yes
17269else
Martin v. Löwis11437992002-04-12 09:54:03 +000017270 echo "$as_me: program exited with status $ac_status" >&5
17271echo "$as_me: failed program was:" >&5
17272cat conftest.$ac_ext >&5
17273( exit $ac_status )
17274ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017275fi
Barry Warsawfe33b792003-01-07 22:42:49 +000017276rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017277fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017278fi
17279
Martin v. Löwis11437992002-04-12 09:54:03 +000017280echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
17281echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017282if test "$ac_cv_broken_nice" = yes
17283then
Martin v. Löwis11437992002-04-12 09:54:03 +000017284
17285cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017286#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017287_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017288
17289fi
17290
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017291# tzset(3) exists and works like we expect it to
17292echo "$as_me:$LINENO: checking for working tzset()" >&5
17293echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
17294if test "${ac_cv_working_tzset+set}" = set; then
17295 echo $ECHO_N "(cached) $ECHO_C" >&6
17296else
17297
17298if test "$cross_compiling" = yes; then
17299 ac_cv_working_tzset=no
17300else
17301 cat >conftest.$ac_ext <<_ACEOF
17302#line $LINENO "configure"
17303#include "confdefs.h"
17304
17305#include <stdlib.h>
17306#include <time.h>
17307int main()
17308{
17309 int gmt_hour;
17310 int eastern_hour;
17311 time_t now;
17312 now = time((time_t*)NULL);
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017313 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017314 tzset();
17315 gmt_hour = localtime(&now)->tm_hour;
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017316 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017317 tzset();
17318 eastern_hour = localtime(&now)->tm_hour;
17319 if (eastern_hour == gmt_hour)
17320 exit(1);
17321 exit(0);
17322}
17323
17324_ACEOF
17325rm -f conftest$ac_exeext
17326if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17327 (eval $ac_link) 2>&5
17328 ac_status=$?
17329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17330 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17331 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17332 (eval $ac_try) 2>&5
17333 ac_status=$?
17334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17335 (exit $ac_status); }; }; then
17336 ac_cv_working_tzset=yes
17337else
17338 echo "$as_me: program exited with status $ac_status" >&5
17339echo "$as_me: failed program was:" >&5
17340cat conftest.$ac_ext >&5
17341( exit $ac_status )
17342ac_cv_working_tzset=no
17343fi
17344rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17345fi
17346fi
17347
17348echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
17349echo "${ECHO_T}$ac_cv_working_tzset" >&6
17350if test "$ac_cv_working_tzset" = yes
17351then
17352
17353cat >>confdefs.h <<\_ACEOF
17354#define HAVE_WORKING_TZSET 1
17355_ACEOF
17356
17357fi
17358
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017359# Look for subsecond timestamps in struct stat
17360echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
17361echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
17362if test "${ac_cv_stat_tv_nsec+set}" = set; then
17363 echo $ECHO_N "(cached) $ECHO_C" >&6
17364else
17365 cat >conftest.$ac_ext <<_ACEOF
17366#line $LINENO "configure"
17367#include "confdefs.h"
17368#include <sys/stat.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000017369#ifdef F77_DUMMY_MAIN
17370# ifdef __cplusplus
17371 extern "C"
17372# endif
17373 int F77_DUMMY_MAIN() { return 1; }
17374#endif
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017375int
17376main ()
17377{
17378
17379struct stat st;
17380st.st_mtim.tv_nsec = 1;
17381
17382 ;
17383 return 0;
17384}
17385_ACEOF
17386rm -f conftest.$ac_objext
17387if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17388 (eval $ac_compile) 2>&5
17389 ac_status=$?
17390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17391 (exit $ac_status); } &&
17392 { ac_try='test -s conftest.$ac_objext'
17393 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17394 (eval $ac_try) 2>&5
17395 ac_status=$?
17396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17397 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000017398 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017399else
17400 echo "$as_me: failed program was:" >&5
17401cat conftest.$ac_ext >&5
17402ac_cv_stat_tv_nsec=no
17403fi
17404rm -f conftest.$ac_objext conftest.$ac_ext
17405fi
17406
17407echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
17408echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
17409if test "$ac_cv_stat_tv_nsec" = yes
17410then
17411
17412cat >>confdefs.h <<\_ACEOF
17413#define HAVE_STAT_TV_NSEC 1
17414_ACEOF
17415
17416fi
17417
Jack Jansen666b1e72001-10-31 12:11:48 +000017418# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000017419echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
17420echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
17421if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
17422 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017423else
Martin v. Löwis11437992002-04-12 09:54:03 +000017424 cat >conftest.$ac_ext <<_ACEOF
17425#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000017426#include "confdefs.h"
17427#include <curses.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000017428#ifdef F77_DUMMY_MAIN
17429# ifdef __cplusplus
17430 extern "C"
17431# endif
17432 int F77_DUMMY_MAIN() { return 1; }
17433#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017434int
17435main ()
17436{
Jack Jansen666b1e72001-10-31 12:11:48 +000017437
17438 int rtn;
17439 rtn = mvwdelch(0,0,0);
17440
Martin v. Löwis11437992002-04-12 09:54:03 +000017441 ;
17442 return 0;
17443}
17444_ACEOF
17445rm -f conftest.$ac_objext
17446if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17447 (eval $ac_compile) 2>&5
17448 ac_status=$?
17449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17450 (exit $ac_status); } &&
17451 { ac_try='test -s conftest.$ac_objext'
17452 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17453 (eval $ac_try) 2>&5
17454 ac_status=$?
17455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17456 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017457 ac_cv_mvwdelch_is_expression=yes
17458else
Martin v. Löwis11437992002-04-12 09:54:03 +000017459 echo "$as_me: failed program was:" >&5
17460cat conftest.$ac_ext >&5
17461ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017462fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017463rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017464fi
17465
Martin v. Löwis11437992002-04-12 09:54:03 +000017466echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
17467echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017468
17469if test "$ac_cv_mvwdelch_is_expression" = yes
17470then
Martin v. Löwis11437992002-04-12 09:54:03 +000017471
17472cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017473#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017474_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017475
17476fi
17477
Martin v. Löwis11437992002-04-12 09:54:03 +000017478echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
17479echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
17480if test "${ac_cv_window_has_flags+set}" = set; then
17481 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017482else
Martin v. Löwis11437992002-04-12 09:54:03 +000017483 cat >conftest.$ac_ext <<_ACEOF
17484#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000017485#include "confdefs.h"
17486#include <curses.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000017487#ifdef F77_DUMMY_MAIN
17488# ifdef __cplusplus
17489 extern "C"
17490# endif
17491 int F77_DUMMY_MAIN() { return 1; }
17492#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017493int
17494main ()
17495{
Jack Jansen666b1e72001-10-31 12:11:48 +000017496
17497 WINDOW *w;
17498 w->_flags = 0;
17499
Martin v. Löwis11437992002-04-12 09:54:03 +000017500 ;
17501 return 0;
17502}
17503_ACEOF
17504rm -f conftest.$ac_objext
17505if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17506 (eval $ac_compile) 2>&5
17507 ac_status=$?
17508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17509 (exit $ac_status); } &&
17510 { ac_try='test -s conftest.$ac_objext'
17511 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17512 (eval $ac_try) 2>&5
17513 ac_status=$?
17514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17515 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017516 ac_cv_window_has_flags=yes
17517else
Martin v. Löwis11437992002-04-12 09:54:03 +000017518 echo "$as_me: failed program was:" >&5
17519cat conftest.$ac_ext >&5
17520ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017521fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017522rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017523fi
17524
Martin v. Löwis11437992002-04-12 09:54:03 +000017525echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
17526echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017527
Jack Jansen666b1e72001-10-31 12:11:48 +000017528
17529if test "$ac_cv_window_has_flags" = yes
17530then
Martin v. Löwis11437992002-04-12 09:54:03 +000017531
17532cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017533#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017534_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017535
17536fi
17537
Martin v. Löwis24a880b2002-12-31 12:55:15 +000017538echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
17539echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
17540
17541if test -e /dev/ptmx
17542then
17543 echo "$as_me:$LINENO: result: yes" >&5
17544echo "${ECHO_T}yes" >&6
17545
17546cat >>confdefs.h <<\_ACEOF
17547#define HAVE_DEV_PTMX 1
17548_ACEOF
17549
17550else
17551 echo "$as_me:$LINENO: result: no" >&5
17552echo "${ECHO_T}no" >&6
17553fi
17554
Neal Norwitz865400f2003-03-21 01:42:58 +000017555echo "$as_me:$LINENO: checking for /dev/ptc" >&5
17556echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
17557
17558if test -e /dev/ptc
17559then
17560 echo "$as_me:$LINENO: result: yes" >&5
17561echo "${ECHO_T}yes" >&6
17562
17563cat >>confdefs.h <<\_ACEOF
17564#define HAVE_DEV_PTC 1
17565_ACEOF
17566
17567else
17568 echo "$as_me:$LINENO: result: no" >&5
17569echo "${ECHO_T}no" >&6
17570fi
17571
Martin v. Löwis11437992002-04-12 09:54:03 +000017572echo "$as_me:$LINENO: checking for socklen_t" >&5
17573echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
17574if test "${ac_cv_type_socklen_t+set}" = set; then
17575 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000017576else
Martin v. Löwis11437992002-04-12 09:54:03 +000017577 cat >conftest.$ac_ext <<_ACEOF
17578#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000017579#include "confdefs.h"
Martin v. Löwis01c04012002-11-11 14:58:44 +000017580
17581#ifdef HAVE_SYS_TYPES_H
17582#include <sys/types.h>
17583#endif
17584#ifdef HAVE_SYS_SOCKET_H
17585#include <sys/socket.h>
17586#endif
17587
17588
Barry Warsawfe33b792003-01-07 22:42:49 +000017589#ifdef F77_DUMMY_MAIN
17590# ifdef __cplusplus
17591 extern "C"
17592# endif
17593 int F77_DUMMY_MAIN() { return 1; }
17594#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017595int
17596main ()
17597{
17598if ((socklen_t *) 0)
17599 return 0;
17600if (sizeof (socklen_t))
17601 return 0;
17602 ;
17603 return 0;
17604}
17605_ACEOF
17606rm -f conftest.$ac_objext
17607if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17608 (eval $ac_compile) 2>&5
17609 ac_status=$?
17610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17611 (exit $ac_status); } &&
17612 { ac_try='test -s conftest.$ac_objext'
17613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17614 (eval $ac_try) 2>&5
17615 ac_status=$?
17616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17617 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000017618 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000017619else
Martin v. Löwis11437992002-04-12 09:54:03 +000017620 echo "$as_me: failed program was:" >&5
17621cat conftest.$ac_ext >&5
17622ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000017623fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017624rm -f conftest.$ac_objext conftest.$ac_ext
17625fi
17626echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
17627echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
17628if test $ac_cv_type_socklen_t = yes; then
17629 :
17630else
Guido van Rossum95713eb2000-05-18 20:53:31 +000017631
Martin v. Löwis01c04012002-11-11 14:58:44 +000017632cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017633#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000017634_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017635
17636fi
17637
Michael W. Hudson54241132001-12-07 15:38:26 +000017638
Michael W. Hudson54241132001-12-07 15:38:26 +000017639
17640
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000017641for h in `(cd $srcdir;echo Python/thread_*.h)`
17642do
17643 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
17644done
17645
Michael W. Hudson54241132001-12-07 15:38:26 +000017646
Jack Jansen0b06be72002-06-21 14:48:38 +000017647SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000017648echo "$as_me:$LINENO: checking for build directories" >&5
17649echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017650for dir in $SRCDIRS; do
17651 if test ! -d $dir; then
17652 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000017653 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017654done
Martin v. Löwis11437992002-04-12 09:54:03 +000017655echo "$as_me:$LINENO: result: done" >&5
17656echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000017657
Guido van Rossum627b2d71993-12-24 10:39:16 +000017658# generate output files
Barry Warsawfe33b792003-01-07 22:42:49 +000017659ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017660
Martin v. Löwis11437992002-04-12 09:54:03 +000017661cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017662# This file is a shell script that caches the results of configure
17663# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017664# scripts and configure runs, see configure's option --config-cache.
17665# It is not useful on other systems. If it contains results you don't
17666# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017667#
Martin v. Löwis11437992002-04-12 09:54:03 +000017668# config.status only pays attention to the cache file if you give it
17669# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017670#
Barry Warsawfe33b792003-01-07 22:42:49 +000017671# `ac_cv_env_foo' variables (set or unset) will be overriden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017672# loading this file, other *unset* `ac_cv_foo' will be assigned the
17673# following values.
17674
17675_ACEOF
17676
Guido van Rossumf78abae1997-01-21 22:02:36 +000017677# The following way of writing the cache mishandles newlines in values,
17678# but we know of no workaround that is simple, portable, and efficient.
17679# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017680# Ultrix sh set writes to stderr and can't be redirected directly,
17681# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000017682{
17683 (set) 2>&1 |
17684 case `(ac_space=' '; set | grep ac_space) 2>&1` in
17685 *ac_space=\ *)
17686 # `set' does not quote correctly, so add quotes (double-quote
17687 # substitution turns \\\\ into \\, and sed turns \\ into \).
17688 sed -n \
17689 "s/'/'\\\\''/g;
17690 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17691 ;;
17692 *)
17693 # `set' quotes correctly as required by POSIX, so do not add quotes.
17694 sed -n \
17695 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17696 ;;
17697 esac;
17698} |
17699 sed '
17700 t clear
17701 : clear
17702 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17703 t end
17704 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17705 : end' >>confcache
17706if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017707 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017708 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17709 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017710 else
17711 echo "not updating unwritable cache $cache_file"
17712 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017713fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017714rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017715
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017716test "x$prefix" = xNONE && prefix=$ac_default_prefix
17717# Let make expand exec_prefix.
17718test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017719
Martin v. Löwis11437992002-04-12 09:54:03 +000017720# VPATH may cause trouble with some makes, so we remove $(srcdir),
17721# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17722# trailing colons and then remove the whole line if VPATH becomes empty
17723# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000017724if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017725 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17726s/:*\$(srcdir):*/:/;
17727s/:*\${srcdir}:*/:/;
17728s/:*@srcdir@:*/:/;
17729s/^\([^=]*=[ ]*\):*/\1/;
17730s/:*$//;
17731s/^[^=]*=[ ]*$//;
17732}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017733fi
17734
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017735DEFS=-DHAVE_CONFIG_H
17736
Martin v. Löwis11437992002-04-12 09:54:03 +000017737
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017738: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000017739ac_clean_files_save=$ac_clean_files
17740ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17741{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
17742echo "$as_me: creating $CONFIG_STATUS" >&6;}
17743cat >$CONFIG_STATUS <<_ACEOF
17744#! $SHELL
17745# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017746# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017747# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017748# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017749
Martin v. Löwis11437992002-04-12 09:54:03 +000017750debug=false
17751SHELL=\${CONFIG_SHELL-$SHELL}
17752_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000017753
Martin v. Löwis11437992002-04-12 09:54:03 +000017754cat >>$CONFIG_STATUS <<\_ACEOF
Barry Warsawfe33b792003-01-07 22:42:49 +000017755
Martin v. Löwis11437992002-04-12 09:54:03 +000017756## --------------------- ##
17757## M4sh Initialization. ##
17758## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017759
Martin v. Löwis11437992002-04-12 09:54:03 +000017760# Be Bourne compatible
17761if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17762 emulate sh
17763 NULLCMD=:
17764elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17765 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000017766fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017767
Barry Warsawfe33b792003-01-07 22:42:49 +000017768# NLS nuisances.
Martin v. Löwis11437992002-04-12 09:54:03 +000017769# Support unset when possible.
17770if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17771 as_unset=unset
17772else
17773 as_unset=false
17774fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017775
Barry Warsawfe33b792003-01-07 22:42:49 +000017776(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
17777 { $as_unset LANG || test "${LANG+set}" != set; } ||
17778 { LANG=C; export LANG; }
17779(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
17780 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
17781 { LC_ALL=C; export LC_ALL; }
17782(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
17783 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
17784 { LC_TIME=C; export LC_TIME; }
17785(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
17786 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
17787 { LC_CTYPE=C; export LC_CTYPE; }
17788(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
17789 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
17790 { LANGUAGE=C; export LANGUAGE; }
17791(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
17792 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
17793 { LC_COLLATE=C; export LC_COLLATE; }
17794(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
17795 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
17796 { LC_NUMERIC=C; export LC_NUMERIC; }
17797(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
17798 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
17799 { LC_MESSAGES=C; export LC_MESSAGES; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017800
17801
17802# Name of the executable.
Barry Warsawfe33b792003-01-07 22:42:49 +000017803as_me=`(basename "$0") 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017804$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17805 X"$0" : 'X\(//\)$' \| \
17806 X"$0" : 'X\(/\)$' \| \
17807 . : '\(.\)' 2>/dev/null ||
17808echo X/"$0" |
17809 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
17810 /^X\/\(\/\/\)$/{ s//\1/; q; }
17811 /^X\/\(\/\).*/{ s//\1/; q; }
17812 s/.*/./; q'`
17813
17814# PATH needs CR, and LINENO needs CR and PATH.
17815# Avoid depending upon Character Ranges.
17816as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17817as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17818as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17819as_cr_digits='0123456789'
17820as_cr_alnum=$as_cr_Letters$as_cr_digits
17821
17822# The user is always right.
17823if test "${PATH_SEPARATOR+set}" != set; then
17824 echo "#! /bin/sh" >conftest.sh
17825 echo "exit 0" >>conftest.sh
17826 chmod +x conftest.sh
Barry Warsawfe33b792003-01-07 22:42:49 +000017827 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017828 PATH_SEPARATOR=';'
17829 else
17830 PATH_SEPARATOR=:
17831 fi
17832 rm -f conftest.sh
17833fi
17834
17835
17836 as_lineno_1=$LINENO
17837 as_lineno_2=$LINENO
17838 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17839 test "x$as_lineno_1" != "x$as_lineno_2" &&
17840 test "x$as_lineno_3" = "x$as_lineno_2" || {
17841 # Find who we are. Look in the path if we contain no path at all
17842 # relative or not.
17843 case $0 in
17844 *[\\/]* ) as_myself=$0 ;;
17845 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17846for as_dir in $PATH
17847do
17848 IFS=$as_save_IFS
17849 test -z "$as_dir" && as_dir=.
17850 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17851done
17852
17853 ;;
17854 esac
17855 # We did not find ourselves, most probably we were run as `sh COMMAND'
17856 # in which case we are not to be found in the path.
17857 if test "x$as_myself" = x; then
17858 as_myself=$0
17859 fi
17860 if test ! -f "$as_myself"; then
17861 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
17862echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
17863 { (exit 1); exit 1; }; }
17864 fi
17865 case $CONFIG_SHELL in
17866 '')
17867 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17868for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
17869do
17870 IFS=$as_save_IFS
17871 test -z "$as_dir" && as_dir=.
17872 for as_base in sh bash ksh sh5; do
17873 case $as_dir in
17874 /*)
17875 if ("$as_dir/$as_base" -c '
17876 as_lineno_1=$LINENO
17877 as_lineno_2=$LINENO
17878 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17879 test "x$as_lineno_1" != "x$as_lineno_2" &&
17880 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
17881 CONFIG_SHELL=$as_dir/$as_base
17882 export CONFIG_SHELL
17883 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
17884 fi;;
17885 esac
17886 done
17887done
17888;;
Jack Jansendd19cf82001-12-06 22:36:17 +000017889 esac
17890
Martin v. Löwis11437992002-04-12 09:54:03 +000017891 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
17892 # uniformly replaced by the line number. The first 'sed' inserts a
17893 # line-number line before each line; the second 'sed' does the real
17894 # work. The second script uses 'N' to pair each line-number line
17895 # with the numbered line, and appends trailing '-' during
17896 # substitution so that $LINENO is not a special case at line end.
17897 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
17898 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
17899 sed '=' <$as_myself |
17900 sed '
17901 N
17902 s,$,-,
17903 : loop
17904 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
17905 t loop
17906 s,-$,,
17907 s,^['$as_cr_digits']*\n,,
17908 ' >$as_me.lineno &&
17909 chmod +x $as_me.lineno ||
17910 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
17911echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
17912 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017913
Martin v. Löwis11437992002-04-12 09:54:03 +000017914 # Don't try to exec as it changes $[0], causing all sort of problems
17915 # (the dirname of $[0] is not the place where we might find the
17916 # original and so on. Autoconf is especially sensible to this).
17917 . ./$as_me.lineno
17918 # Exit status is that of the last command.
17919 exit
17920}
17921
17922
17923case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
17924 *c*,-n*) ECHO_N= ECHO_C='
17925' ECHO_T=' ' ;;
17926 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
17927 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
17928esac
17929
17930if expr a : '\(a\)' >/dev/null 2>&1; then
17931 as_expr=expr
17932else
17933 as_expr=false
17934fi
17935
17936rm -f conf$$ conf$$.exe conf$$.file
17937echo >conf$$.file
17938if ln -s conf$$.file conf$$ 2>/dev/null; then
17939 # We could just check for DJGPP; but this test a) works b) is more generic
17940 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17941 if test -f conf$$.exe; then
17942 # Don't use ln at all; we don't have any links
17943 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017944 else
Martin v. Löwis11437992002-04-12 09:54:03 +000017945 as_ln_s='ln -s'
17946 fi
17947elif ln conf$$.file conf$$ 2>/dev/null; then
17948 as_ln_s=ln
17949else
17950 as_ln_s='cp -p'
17951fi
17952rm -f conf$$ conf$$.exe conf$$.file
17953
17954as_executable_p="test -f"
17955
17956# Sed expression to map a string onto a valid CPP name.
17957as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
17958
17959# Sed expression to map a string onto a valid variable name.
17960as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
17961
17962
17963# IFS
17964# We need space, tab and new line, in precisely that order.
17965as_nl='
17966'
17967IFS=" $as_nl"
17968
17969# CDPATH.
Barry Warsawfe33b792003-01-07 22:42:49 +000017970$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017971
17972exec 6>&1
17973
17974# Open the log real soon, to keep \$[0] and so on meaningful, and to
17975# report actual input values of CONFIG_FILES etc. instead of their
17976# values after options handling. Logging --version etc. is OK.
17977exec 5>>config.log
17978{
17979 echo
17980 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17981## Running $as_me. ##
17982_ASBOX
17983} >&5
17984cat >&5 <<_CSEOF
17985
Martin v. Löwis88afe662002-10-26 13:47:44 +000017986This file was extended by python $as_me 2.3, which was
Barry Warsawfe33b792003-01-07 22:42:49 +000017987generated by GNU Autoconf 2.53. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017988
17989 CONFIG_FILES = $CONFIG_FILES
17990 CONFIG_HEADERS = $CONFIG_HEADERS
17991 CONFIG_LINKS = $CONFIG_LINKS
17992 CONFIG_COMMANDS = $CONFIG_COMMANDS
17993 $ $0 $@
17994
17995_CSEOF
17996echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
17997echo >&5
17998_ACEOF
17999
18000# Files that config.status was made for.
18001if test -n "$ac_config_files"; then
18002 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18003fi
18004
18005if test -n "$ac_config_headers"; then
18006 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18007fi
18008
18009if test -n "$ac_config_links"; then
18010 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18011fi
18012
18013if test -n "$ac_config_commands"; then
18014 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18015fi
18016
18017cat >>$CONFIG_STATUS <<\_ACEOF
18018
18019ac_cs_usage="\
18020\`$as_me' instantiates files from templates according to the
18021current configuration.
18022
18023Usage: $0 [OPTIONS] [FILE]...
18024
18025 -h, --help print this help, then exit
18026 -V, --version print version number, then exit
18027 -d, --debug don't remove temporary files
18028 --recheck update $as_me by reconfiguring in the same conditions
18029 --file=FILE[:TEMPLATE]
18030 instantiate the configuration file FILE
18031 --header=FILE[:TEMPLATE]
18032 instantiate the configuration header FILE
18033
18034Configuration files:
18035$config_files
18036
18037Configuration headers:
18038$config_headers
18039
18040Report bugs to <bug-autoconf@gnu.org>."
18041_ACEOF
18042
18043cat >>$CONFIG_STATUS <<_ACEOF
18044ac_cs_version="\\
Martin v. Löwis88afe662002-10-26 13:47:44 +000018045python config.status 2.3
Barry Warsawfe33b792003-01-07 22:42:49 +000018046configured by $0, generated by GNU Autoconf 2.53,
Martin v. Löwis11437992002-04-12 09:54:03 +000018047 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18048
18049Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18050Free Software Foundation, Inc.
18051This config.status script is free software; the Free Software Foundation
18052gives unlimited permission to copy, distribute and modify it."
18053srcdir=$srcdir
18054INSTALL="$INSTALL"
18055_ACEOF
18056
18057cat >>$CONFIG_STATUS <<\_ACEOF
18058# If no file are specified by the user, then we need to provide default
18059# value. By we need to know if files were specified by the user.
18060ac_need_defaults=:
18061while test $# != 0
18062do
18063 case $1 in
18064 --*=*)
18065 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18066 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Barry Warsawfe33b792003-01-07 22:42:49 +000018067 shift
18068 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18069 shift
Martin v. Löwis11437992002-04-12 09:54:03 +000018070 ;;
Barry Warsawfe33b792003-01-07 22:42:49 +000018071 -*);;
Martin v. Löwis11437992002-04-12 09:54:03 +000018072 *) # This is not an option, so the user has probably given explicit
18073 # arguments.
18074 ac_need_defaults=false;;
18075 esac
18076
Barry Warsawfe33b792003-01-07 22:42:49 +000018077 case $1 in
Martin v. Löwis11437992002-04-12 09:54:03 +000018078 # Handling of the options.
18079_ACEOF
18080cat >>$CONFIG_STATUS <<_ACEOF
18081 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18082 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18083 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18084_ACEOF
18085cat >>$CONFIG_STATUS <<\_ACEOF
18086 --version | --vers* | -V )
18087 echo "$ac_cs_version"; exit 0 ;;
18088 --he | --h)
18089 # Conflict between --help and --header
18090 { { echo "$as_me:$LINENO: error: ambiguous option: $1
18091Try \`$0 --help' for more information." >&5
18092echo "$as_me: error: ambiguous option: $1
18093Try \`$0 --help' for more information." >&2;}
18094 { (exit 1); exit 1; }; };;
18095 --help | --hel | -h )
18096 echo "$ac_cs_usage"; exit 0 ;;
18097 --debug | --d* | -d )
18098 debug=: ;;
18099 --file | --fil | --fi | --f )
Barry Warsawfe33b792003-01-07 22:42:49 +000018100 shift
18101 CONFIG_FILES="$CONFIG_FILES $1"
Martin v. Löwis11437992002-04-12 09:54:03 +000018102 ac_need_defaults=false;;
18103 --header | --heade | --head | --hea )
Barry Warsawfe33b792003-01-07 22:42:49 +000018104 shift
18105 CONFIG_HEADERS="$CONFIG_HEADERS $1"
Martin v. Löwis11437992002-04-12 09:54:03 +000018106 ac_need_defaults=false;;
18107
18108 # This is an error.
18109 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
18110Try \`$0 --help' for more information." >&5
18111echo "$as_me: error: unrecognized option: $1
18112Try \`$0 --help' for more information." >&2;}
18113 { (exit 1); exit 1; }; } ;;
18114
18115 *) ac_config_targets="$ac_config_targets $1" ;;
18116
18117 esac
18118 shift
18119done
18120
18121_ACEOF
18122
18123
18124
18125
18126
18127cat >>$CONFIG_STATUS <<\_ACEOF
18128for ac_config_target in $ac_config_targets
18129do
18130 case "$ac_config_target" in
18131 # Handling of arguments.
18132 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
18133 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
18134 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18135 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
18136echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18137 { (exit 1); exit 1; }; };;
18138 esac
18139done
18140
18141# If the user did not use the arguments to specify the items to instantiate,
18142# then the envvar interface is used. Set only those that are not.
18143# We use the long form for the default assignment because of an extremely
18144# bizarre bug on SunOS 4.1.3.
18145if $ac_need_defaults; then
18146 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18147 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18148fi
18149
18150# Create a temporary directory, and hook for its removal unless debugging.
18151$debug ||
18152{
18153 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18154 trap '{ (exit 1); exit 1; }' 1 2 13 15
18155}
18156
18157# Create a (secure) tmp directory for tmp files.
18158: ${TMPDIR=/tmp}
18159{
18160 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18161 test -n "$tmp" && test -d "$tmp"
18162} ||
18163{
18164 tmp=$TMPDIR/cs$$-$RANDOM
18165 (umask 077 && mkdir $tmp)
18166} ||
18167{
18168 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18169 { (exit 1); exit 1; }
18170}
18171
18172_ACEOF
18173
18174cat >>$CONFIG_STATUS <<_ACEOF
18175
18176#
18177# CONFIG_FILES section.
18178#
18179
18180# No need to generate the scripts if there are no CONFIG_FILES.
18181# This happens for instance when ./config.status config.h
18182if test -n "\$CONFIG_FILES"; then
18183 # Protect against being on the right side of a sed subst in config.status.
18184 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18185 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18186s,@SHELL@,$SHELL,;t t
18187s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18188s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18189s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18190s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18191s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18192s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18193s,@exec_prefix@,$exec_prefix,;t t
18194s,@prefix@,$prefix,;t t
18195s,@program_transform_name@,$program_transform_name,;t t
18196s,@bindir@,$bindir,;t t
18197s,@sbindir@,$sbindir,;t t
18198s,@libexecdir@,$libexecdir,;t t
18199s,@datadir@,$datadir,;t t
18200s,@sysconfdir@,$sysconfdir,;t t
18201s,@sharedstatedir@,$sharedstatedir,;t t
18202s,@localstatedir@,$localstatedir,;t t
18203s,@libdir@,$libdir,;t t
18204s,@includedir@,$includedir,;t t
18205s,@oldincludedir@,$oldincludedir,;t t
18206s,@infodir@,$infodir,;t t
18207s,@mandir@,$mandir,;t t
18208s,@build_alias@,$build_alias,;t t
18209s,@host_alias@,$host_alias,;t t
18210s,@target_alias@,$target_alias,;t t
18211s,@DEFS@,$DEFS,;t t
18212s,@ECHO_C@,$ECHO_C,;t t
18213s,@ECHO_N@,$ECHO_N,;t t
18214s,@ECHO_T@,$ECHO_T,;t t
18215s,@LIBS@,$LIBS,;t t
18216s,@VERSION@,$VERSION,;t t
18217s,@SOVERSION@,$SOVERSION,;t t
18218s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
18219s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
18220s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
18221s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
18222s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
18223s,@MACHDEP@,$MACHDEP,;t t
18224s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000018225s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000018226s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018227s,@CXX@,$CXX,;t t
18228s,@MAINOBJ@,$MAINOBJ,;t t
18229s,@EXEEXT@,$EXEEXT,;t t
18230s,@CC@,$CC,;t t
18231s,@CFLAGS@,$CFLAGS,;t t
18232s,@LDFLAGS@,$LDFLAGS,;t t
18233s,@CPPFLAGS@,$CPPFLAGS,;t t
18234s,@ac_ct_CC@,$ac_ct_CC,;t t
18235s,@OBJEXT@,$OBJEXT,;t t
18236s,@CPP@,$CPP,;t t
18237s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
18238s,@LIBRARY@,$LIBRARY,;t t
18239s,@LDLIBRARY@,$LDLIBRARY,;t t
18240s,@DLLLIBRARY@,$DLLLIBRARY,;t t
18241s,@BLDLIBRARY@,$BLDLIBRARY,;t t
18242s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
18243s,@INSTSONAME@,$INSTSONAME,;t t
18244s,@RUNSHARED@,$RUNSHARED,;t t
18245s,@LINKCC@,$LINKCC,;t t
18246s,@RANLIB@,$RANLIB,;t t
18247s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18248s,@AR@,$AR,;t t
18249s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18250s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18251s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18252s,@LN@,$LN,;t t
18253s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000018254s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018255s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
18256s,@SO@,$SO,;t t
18257s,@LDSHARED@,$LDSHARED,;t t
18258s,@BLDSHARED@,$BLDSHARED,;t t
18259s,@CCSHARED@,$CCSHARED,;t t
18260s,@LINKFORSHARED@,$LINKFORSHARED,;t t
18261s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018262s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018263s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
18264s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
18265s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
18266s,@LDLAST@,$LDLAST,;t t
18267s,@THREADOBJ@,$THREADOBJ,;t t
18268s,@DLINCLDIR@,$DLINCLDIR,;t t
18269s,@DYNLOADFILE@,$DYNLOADFILE,;t t
18270s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018271s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018272s,@LIBOBJS@,$LIBOBJS,;t t
18273s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
18274s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
18275s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
18276s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
18277s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
18278s,@LIBM@,$LIBM,;t t
18279s,@LIBC@,$LIBC,;t t
18280s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
18281s,@THREADHEADERS@,$THREADHEADERS,;t t
18282s,@SRCDIRS@,$SRCDIRS,;t t
18283CEOF
18284
18285_ACEOF
18286
18287 cat >>$CONFIG_STATUS <<\_ACEOF
18288 # Split the substitutions into bite-sized pieces for seds with
18289 # small command number limits, like on Digital OSF/1 and HP-UX.
18290 ac_max_sed_lines=48
18291 ac_sed_frag=1 # Number of current file.
18292 ac_beg=1 # First line for current file.
18293 ac_end=$ac_max_sed_lines # Line after last line for current file.
18294 ac_more_lines=:
18295 ac_sed_cmds=
18296 while $ac_more_lines; do
18297 if test $ac_beg -gt 1; then
18298 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18299 else
18300 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18301 fi
18302 if test ! -s $tmp/subs.frag; then
18303 ac_more_lines=false
18304 else
18305 # The purpose of the label and of the branching condition is to
18306 # speed up the sed processing (if there are no `@' at all, there
18307 # is no need to browse any of the substitutions).
18308 # These are the two extra sed commands mentioned above.
18309 (echo ':t
18310 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18311 if test -z "$ac_sed_cmds"; then
18312 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18313 else
18314 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18315 fi
18316 ac_sed_frag=`expr $ac_sed_frag + 1`
18317 ac_beg=$ac_end
18318 ac_end=`expr $ac_end + $ac_max_sed_lines`
18319 fi
18320 done
18321 if test -z "$ac_sed_cmds"; then
18322 ac_sed_cmds=cat
18323 fi
18324fi # test -n "$CONFIG_FILES"
18325
18326_ACEOF
18327cat >>$CONFIG_STATUS <<\_ACEOF
18328for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18329 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18330 case $ac_file in
18331 - | *:- | *:-:* ) # input from stdin
18332 cat >$tmp/stdin
18333 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18334 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18335 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18336 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18337 * ) ac_file_in=$ac_file.in ;;
18338 esac
18339
18340 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18341 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18342$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18343 X"$ac_file" : 'X\(//\)[^/]' \| \
18344 X"$ac_file" : 'X\(//\)$' \| \
18345 X"$ac_file" : 'X\(/\)' \| \
18346 . : '\(.\)' 2>/dev/null ||
18347echo X"$ac_file" |
18348 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18349 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18350 /^X\(\/\/\)$/{ s//\1/; q; }
18351 /^X\(\/\).*/{ s//\1/; q; }
18352 s/.*/./; q'`
Barry Warsawfe33b792003-01-07 22:42:49 +000018353 { case "$ac_dir" in
18354 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18355 *) as_incr_dir=.;;
18356esac
18357as_dummy="$ac_dir"
18358for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18359 case $as_mkdir_dir in
18360 # Skip DOS drivespec
18361 ?:) as_incr_dir=$as_mkdir_dir ;;
18362 *)
18363 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18364 test -d "$as_incr_dir" ||
18365 mkdir "$as_incr_dir" ||
18366 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18367echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18368 { (exit 1); exit 1; }; }
18369 ;;
18370 esac
18371done; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018372
18373 ac_builddir=.
18374
18375if test "$ac_dir" != .; then
18376 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18377 # A "../" for each directory in $ac_dir_suffix.
18378 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18379else
18380 ac_dir_suffix= ac_top_builddir=
18381fi
18382
18383case $srcdir in
18384 .) # No --srcdir option. We are building in place.
18385 ac_srcdir=.
18386 if test -z "$ac_top_builddir"; then
18387 ac_top_srcdir=.
18388 else
18389 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18390 fi ;;
18391 [\\/]* | ?:[\\/]* ) # Absolute path.
18392 ac_srcdir=$srcdir$ac_dir_suffix;
18393 ac_top_srcdir=$srcdir ;;
18394 *) # Relative path.
18395 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18396 ac_top_srcdir=$ac_top_builddir$srcdir ;;
18397esac
18398# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18399# absolute.
18400ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwis858f8172003-05-24 12:35:47 +000018401ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000018402ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18403ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18404
18405
18406 case $INSTALL in
18407 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18408 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
18409 esac
18410
18411 if test x"$ac_file" != x-; then
18412 { echo "$as_me:$LINENO: creating $ac_file" >&5
18413echo "$as_me: creating $ac_file" >&6;}
18414 rm -f "$ac_file"
18415 fi
18416 # Let's still pretend it is `configure' which instantiates (i.e., don't
18417 # use $as_me), people would be surprised to read:
18418 # /* config.h. Generated by config.status. */
18419 if test x"$ac_file" = x-; then
18420 configure_input=
18421 else
18422 configure_input="$ac_file. "
18423 fi
18424 configure_input=$configure_input"Generated from `echo $ac_file_in |
18425 sed 's,.*/,,'` by configure."
18426
18427 # First look for the input files in the build tree, otherwise in the
18428 # src tree.
18429 ac_file_inputs=`IFS=:
18430 for f in $ac_file_in; do
18431 case $f in
18432 -) echo $tmp/stdin ;;
18433 [\\/$]*)
18434 # Absolute (can't be DOS-style, as IFS=:)
18435 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18436echo "$as_me: error: cannot find input file: $f" >&2;}
18437 { (exit 1); exit 1; }; }
18438 echo $f;;
18439 *) # Relative
18440 if test -f "$f"; then
18441 # Build tree
18442 echo $f
18443 elif test -f "$srcdir/$f"; then
18444 # Source tree
18445 echo $srcdir/$f
18446 else
18447 # /dev/null tree
18448 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18449echo "$as_me: error: cannot find input file: $f" >&2;}
18450 { (exit 1); exit 1; }; }
18451 fi;;
18452 esac
18453 done` || { (exit 1); exit 1; }
18454_ACEOF
18455cat >>$CONFIG_STATUS <<_ACEOF
18456 sed "$ac_vpsub
18457$extrasub
18458_ACEOF
18459cat >>$CONFIG_STATUS <<\_ACEOF
18460:t
18461/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18462s,@configure_input@,$configure_input,;t t
18463s,@srcdir@,$ac_srcdir,;t t
18464s,@abs_srcdir@,$ac_abs_srcdir,;t t
18465s,@top_srcdir@,$ac_top_srcdir,;t t
18466s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18467s,@builddir@,$ac_builddir,;t t
18468s,@abs_builddir@,$ac_abs_builddir,;t t
18469s,@top_builddir@,$ac_top_builddir,;t t
18470s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
18471s,@INSTALL@,$ac_INSTALL,;t t
18472" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18473 rm -f $tmp/stdin
18474 if test x"$ac_file" != x-; then
18475 mv $tmp/out $ac_file
18476 else
18477 cat $tmp/out
18478 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018479 fi
18480
Martin v. Löwis11437992002-04-12 09:54:03 +000018481done
18482_ACEOF
18483cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018484
Martin v. Löwis11437992002-04-12 09:54:03 +000018485#
18486# CONFIG_HEADER section.
18487#
Guido van Rossum627b2d71993-12-24 10:39:16 +000018488
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018489# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18490# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000018491#
18492# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000018493ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18494ac_dB='[ ].*$,\1#\2'
18495ac_dC=' '
18496ac_dD=',;t'
18497# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18498ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18499ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018500ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000018501ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018502
Martin v. Löwis11437992002-04-12 09:54:03 +000018503for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000018504 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000018505 case $ac_file in
18506 - | *:- | *:-:* ) # input from stdin
18507 cat >$tmp/stdin
18508 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18509 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18510 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18511 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18512 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018513 esac
18514
Martin v. Löwis11437992002-04-12 09:54:03 +000018515 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
18516echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000018517
Martin v. Löwis11437992002-04-12 09:54:03 +000018518 # First look for the input files in the build tree, otherwise in the
18519 # src tree.
18520 ac_file_inputs=`IFS=:
18521 for f in $ac_file_in; do
18522 case $f in
18523 -) echo $tmp/stdin ;;
18524 [\\/$]*)
18525 # Absolute (can't be DOS-style, as IFS=:)
18526 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18527echo "$as_me: error: cannot find input file: $f" >&2;}
18528 { (exit 1); exit 1; }; }
18529 echo $f;;
18530 *) # Relative
18531 if test -f "$f"; then
18532 # Build tree
18533 echo $f
18534 elif test -f "$srcdir/$f"; then
18535 # Source tree
18536 echo $srcdir/$f
18537 else
18538 # /dev/null tree
18539 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18540echo "$as_me: error: cannot find input file: $f" >&2;}
18541 { (exit 1); exit 1; }; }
18542 fi;;
18543 esac
18544 done` || { (exit 1); exit 1; }
18545 # Remove the trailing spaces.
18546 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018547
Martin v. Löwis11437992002-04-12 09:54:03 +000018548_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018549
Martin v. Löwis11437992002-04-12 09:54:03 +000018550# Transform confdefs.h into two sed scripts, `conftest.defines' and
18551# `conftest.undefs', that substitutes the proper values into
18552# config.h.in to produce config.h. The first handles `#define'
18553# templates, and the second `#undef' templates.
18554# And first: Protect against being on the right side of a sed subst in
18555# config.status. Protect against being in an unquoted here document
18556# in config.status.
18557rm -f conftest.defines conftest.undefs
18558# Using a here document instead of a string reduces the quoting nightmare.
18559# Putting comments in sed scripts is not portable.
18560#
18561# `end' is used to avoid that the second main sed command (meant for
18562# 0-ary CPP macros) applies to n-ary macro definitions.
18563# See the Autoconf documentation for `clear'.
18564cat >confdef2sed.sed <<\_ACEOF
18565s/[\\&,]/\\&/g
18566s,[\\$`],\\&,g
18567t clear
18568: clear
18569s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
18570t end
18571s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
18572: end
18573_ACEOF
18574# If some macros were called several times there might be several times
18575# the same #defines, which is useless. Nevertheless, we may not want to
18576# sort them, since we want the *last* AC-DEFINE to be honored.
18577uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
18578sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
18579rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018580
18581# This sed command replaces #undef with comments. This is necessary, for
18582# example, in the case of _POSIX_SOURCE, which is predefined and required
18583# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000018584cat >>conftest.undefs <<\_ACEOF
18585s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
18586_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018587
Martin v. Löwis11437992002-04-12 09:54:03 +000018588# Break up conftest.defines because some shells have a limit on the size
18589# of here documents, and old seds have small limits too (100 cmds).
18590echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Barry Warsawfe33b792003-01-07 22:42:49 +000018591echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018592echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
18593echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018594rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000018595while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000018596do
Martin v. Löwis11437992002-04-12 09:54:03 +000018597 # Write a limited-size here document to $tmp/defines.sed.
18598 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
18599 # Speed up: don't consider the non `#define' lines.
18600 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
18601 # Work around the forget-to-reset-the-flag bug.
18602 echo 't clr' >>$CONFIG_STATUS
18603 echo ': clr' >>$CONFIG_STATUS
18604 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018605 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018606 sed -f $tmp/defines.sed $tmp/in >$tmp/out
18607 rm -f $tmp/in
18608 mv $tmp/out $tmp/in
18609' >>$CONFIG_STATUS
18610 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
18611 rm -f conftest.defines
18612 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000018613done
Martin v. Löwis11437992002-04-12 09:54:03 +000018614rm -f conftest.defines
Barry Warsawfe33b792003-01-07 22:42:49 +000018615echo ' fi # egrep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018616echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018617
Martin v. Löwis11437992002-04-12 09:54:03 +000018618# Break up conftest.undefs because some shells have a limit on the size
18619# of here documents, and old seds have small limits too (100 cmds).
18620echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
18621rm -f conftest.tail
18622while grep . conftest.undefs >/dev/null
18623do
18624 # Write a limited-size here document to $tmp/undefs.sed.
18625 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
18626 # Speed up: don't consider the non `#undef'
18627 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
18628 # Work around the forget-to-reset-the-flag bug.
18629 echo 't clr' >>$CONFIG_STATUS
18630 echo ': clr' >>$CONFIG_STATUS
18631 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
18632 echo 'CEOF
18633 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
18634 rm -f $tmp/in
18635 mv $tmp/out $tmp/in
18636' >>$CONFIG_STATUS
18637 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
18638 rm -f conftest.undefs
18639 mv conftest.tail conftest.undefs
18640done
18641rm -f conftest.undefs
18642
18643cat >>$CONFIG_STATUS <<\_ACEOF
18644 # Let's still pretend it is `configure' which instantiates (i.e., don't
18645 # use $as_me), people would be surprised to read:
18646 # /* config.h. Generated by config.status. */
18647 if test x"$ac_file" = x-; then
18648 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000018649 else
Martin v. Löwis11437992002-04-12 09:54:03 +000018650 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000018651 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018652 cat $tmp/in >>$tmp/config.h
18653 rm -f $tmp/in
18654 if test x"$ac_file" != x-; then
18655 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
18656 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
18657echo "$as_me: $ac_file is unchanged" >&6;}
18658 else
18659 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18660$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18661 X"$ac_file" : 'X\(//\)[^/]' \| \
18662 X"$ac_file" : 'X\(//\)$' \| \
18663 X"$ac_file" : 'X\(/\)' \| \
18664 . : '\(.\)' 2>/dev/null ||
18665echo X"$ac_file" |
18666 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18667 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18668 /^X\(\/\/\)$/{ s//\1/; q; }
18669 /^X\(\/\).*/{ s//\1/; q; }
18670 s/.*/./; q'`
Barry Warsawfe33b792003-01-07 22:42:49 +000018671 { case "$ac_dir" in
18672 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18673 *) as_incr_dir=.;;
18674esac
18675as_dummy="$ac_dir"
18676for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18677 case $as_mkdir_dir in
18678 # Skip DOS drivespec
18679 ?:) as_incr_dir=$as_mkdir_dir ;;
18680 *)
18681 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18682 test -d "$as_incr_dir" ||
18683 mkdir "$as_incr_dir" ||
18684 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18685echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18686 { (exit 1); exit 1; }; }
18687 ;;
18688 esac
18689done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018690
Martin v. Löwis11437992002-04-12 09:54:03 +000018691 rm -f $ac_file
18692 mv $tmp/config.h $ac_file
18693 fi
18694 else
18695 cat $tmp/config.h
18696 rm -f $tmp/config.h
18697 fi
18698done
18699_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000018700
Martin v. Löwis11437992002-04-12 09:54:03 +000018701cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018702
Martin v. Löwis11437992002-04-12 09:54:03 +000018703{ (exit 0); exit 0; }
18704_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018705chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018706ac_clean_files=$ac_clean_files_save
18707
18708
18709# configure is writing to config.log, and then calls config.status.
18710# config.status does its own redirection, appending to config.log.
18711# Unfortunately, on DOS this fails, as config.log is still kept open
18712# by configure, so config.status won't be able to write to it; its
18713# output is simply discarded. So we exec the FD to /dev/null,
18714# effectively closing config.log, so it can be properly (re)opened and
18715# appended to by config.status. When coming back to configure, we
18716# need to make the FD available again.
18717if test "$no_create" != yes; then
18718 ac_cs_success=:
18719 exec 5>/dev/null
18720 $SHELL $CONFIG_STATUS || ac_cs_success=false
18721 exec 5>>config.log
18722 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18723 # would make configure fail if this is the last instruction.
18724 $ac_cs_success || { (exit 1); exit 1; }
18725fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018726
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018727
18728echo "creating Setup"
18729if test ! -f Modules/Setup
18730then
18731 cp $srcdir/Modules/Setup.dist Modules/Setup
18732fi
18733
18734echo "creating Setup.local"
18735if test ! -f Modules/Setup.local
18736then
18737 echo "# Edit this file for local setup changes" >Modules/Setup.local
18738fi
18739
18740echo "creating Makefile"
18741$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
18742 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000018743 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018744mv config.c Modules