blob: 165b742af9bc66e39753870eac7a9bf9b972f301 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002# From configure.in Revision: 1.408 .
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öwise9416172003-05-03 10:12:45 +0000911ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +0000912ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
913ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
914
915 cd $ac_dir
916 # Check for guested configure; otherwise get Cygnus style configure.
917 if test -f $ac_srcdir/configure.gnu; then
918 echo
919 $SHELL $ac_srcdir/configure.gnu --help=recursive
920 elif test -f $ac_srcdir/configure; then
921 echo
922 $SHELL $ac_srcdir/configure --help=recursive
923 elif test -f $ac_srcdir/configure.ac ||
924 test -f $ac_srcdir/configure.in; then
925 echo
926 $ac_configure --help
927 else
928 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
929 fi
930 cd $ac_popdir
931 done
932fi
933
934test -n "$ac_init_help" && exit 0
935if $ac_init_version; then
936 cat <<\_ACEOF
Martin v. Löwis88afe662002-10-26 13:47:44 +0000937python configure 2.3
Barry Warsawfe33b792003-01-07 22:42:49 +0000938generated by GNU Autoconf 2.53
Martin v. Löwis11437992002-04-12 09:54:03 +0000939
940Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
941Free Software Foundation, Inc.
942This configure script is free software; the Free Software Foundation
943gives unlimited permission to copy, distribute and modify it.
944_ACEOF
945 exit 0
946fi
947exec 5>config.log
948cat >&5 <<_ACEOF
949This file contains any messages produced by compilers while
950running configure, to aid debugging if configure makes a mistake.
951
Martin v. Löwis88afe662002-10-26 13:47:44 +0000952It was created by python $as_me 2.3, which was
Barry Warsawfe33b792003-01-07 22:42:49 +0000953generated by GNU Autoconf 2.53. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +0000954
955 $ $0 $@
956
957_ACEOF
958{
959cat <<_ASUNAME
960## --------- ##
961## Platform. ##
962## --------- ##
963
964hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
965uname -m = `(uname -m) 2>/dev/null || echo unknown`
966uname -r = `(uname -r) 2>/dev/null || echo unknown`
967uname -s = `(uname -s) 2>/dev/null || echo unknown`
968uname -v = `(uname -v) 2>/dev/null || echo unknown`
969
970/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
971/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
972
973/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
974/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
975/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
976hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
977/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
978/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
979/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
980
981_ASUNAME
982
983as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
984for as_dir in $PATH
985do
986 IFS=$as_save_IFS
987 test -z "$as_dir" && as_dir=.
988 echo "PATH: $as_dir"
989done
990
991} >&5
992
993cat >&5 <<_ACEOF
994
995
996## ----------- ##
997## Core tests. ##
998## ----------- ##
999
1000_ACEOF
1001
1002
1003# Keep a trace of the command line.
1004# Strip out --no-create and --no-recursion so they do not pile up.
1005# Also quote any args containing shell meta-characters.
1006ac_configure_args=
1007ac_sep=
1008for ac_arg
1009do
1010 case $ac_arg in
1011 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1012 | --no-cr | --no-c | -n ) continue ;;
1013 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1014 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1015 continue ;;
1016 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1017 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1018 esac
Barry Warsawfe33b792003-01-07 22:42:49 +00001019 case " $ac_configure_args " in
1020 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1021 *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1022 ac_sep=" " ;;
1023 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 # Get rid of the leading space.
1025done
1026
1027# When interrupted or exit'd, cleanup temporary files, and complete
1028# config.log. We remove comments because anyway the quotes in there
1029# would cause problems or look ugly.
1030# WARNING: Be sure not to use single quotes in there, as some shells,
1031# such as our DU 5.0 friend, will then `close' the trap.
1032trap 'exit_status=$?
1033 # Save into config.log some information that might help in debugging.
1034 {
1035 echo
1036 cat <<\_ASBOX
1037## ---------------- ##
1038## Cache variables. ##
1039## ---------------- ##
1040_ASBOX
1041 echo
1042 # The following way of writing the cache mishandles newlines in values,
1043{
1044 (set) 2>&1 |
1045 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1046 *ac_space=\ *)
1047 sed -n \
1048 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1049 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1050 ;;
1051 *)
1052 sed -n \
1053 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1054 ;;
1055 esac;
1056}
1057 echo
1058 if test -s confdefs.h; then
1059 cat <<\_ASBOX
1060## ----------- ##
1061## confdefs.h. ##
1062## ----------- ##
1063_ASBOX
1064 echo
Barry Warsawfe33b792003-01-07 22:42:49 +00001065 sed "/^$/d" confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001066 echo
1067 fi
1068 test "$ac_signal" != 0 &&
1069 echo "$as_me: caught signal $ac_signal"
1070 echo "$as_me: exit $exit_status"
1071 } >&5
1072 rm -f core core.* *.core &&
1073 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1074 exit $exit_status
1075 ' 0
1076for ac_signal in 1 2 13 15; do
1077 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1078done
1079ac_signal=0
1080
1081# confdefs.h avoids OS command line length limits that DEFS can exceed.
1082rm -rf conftest* confdefs.h
1083# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1084echo >confdefs.h
1085
1086# Predefined preprocessor variables.
1087
1088cat >>confdefs.h <<_ACEOF
1089#define PACKAGE_NAME "$PACKAGE_NAME"
1090_ACEOF
1091
1092
1093cat >>confdefs.h <<_ACEOF
1094#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1095_ACEOF
1096
1097
1098cat >>confdefs.h <<_ACEOF
1099#define PACKAGE_VERSION "$PACKAGE_VERSION"
1100_ACEOF
1101
1102
1103cat >>confdefs.h <<_ACEOF
1104#define PACKAGE_STRING "$PACKAGE_STRING"
1105_ACEOF
1106
1107
1108cat >>confdefs.h <<_ACEOF
1109#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1110_ACEOF
1111
1112
1113# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001114# Prefer explicitly selected file to automatically selected ones.
1115if test -z "$CONFIG_SITE"; then
1116 if test "x$prefix" != xNONE; then
1117 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1118 else
1119 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1120 fi
1121fi
1122for ac_site_file in $CONFIG_SITE; do
1123 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1125echo "$as_me: loading site script $ac_site_file" >&6;}
1126 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001127 . "$ac_site_file"
1128 fi
1129done
1130
1131if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 # Some versions of bash will fail to source /dev/null (special
1133 # files actually), so we avoid doing that.
1134 if test -f "$cache_file"; then
1135 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1136echo "$as_me: loading cache $cache_file" >&6;}
1137 case $cache_file in
1138 [\\/]* | ?:[\\/]* ) . $cache_file;;
1139 *) . ./$cache_file;;
1140 esac
1141 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001142else
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1144echo "$as_me: creating cache $cache_file" >&6;}
1145 >$cache_file
1146fi
1147
1148# Check that the precious variables saved in the cache have kept the same
1149# value.
1150ac_cache_corrupted=false
1151for ac_var in `(set) 2>&1 |
1152 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1153 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1154 eval ac_new_set=\$ac_env_${ac_var}_set
1155 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1156 eval ac_new_val="\$ac_env_${ac_var}_value"
1157 case $ac_old_set,$ac_new_set in
1158 set,)
1159 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1160echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1161 ac_cache_corrupted=: ;;
1162 ,set)
1163 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1164echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1165 ac_cache_corrupted=: ;;
1166 ,);;
1167 *)
1168 if test "x$ac_old_val" != "x$ac_new_val"; then
1169 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1170echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1171 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1172echo "$as_me: former value: $ac_old_val" >&2;}
1173 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1174echo "$as_me: current value: $ac_new_val" >&2;}
1175 ac_cache_corrupted=:
1176 fi;;
1177 esac
1178 # Pass precious variables to config.status.
1179 if test "$ac_new_set" = set; then
1180 case $ac_new_val in
1181 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1182 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1183 *) ac_arg=$ac_var=$ac_new_val ;;
1184 esac
1185 case " $ac_configure_args " in
1186 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1187 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1188 esac
1189 fi
1190done
1191if $ac_cache_corrupted; then
1192 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1193echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1194 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1195echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1196 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001197fi
1198
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001200ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001201ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1202ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1203ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001204
Guido van Rossum627b2d71993-12-24 10:39:16 +00001205
Michael W. Hudson54241132001-12-07 15:38:26 +00001206
1207
Guido van Rossum627b2d71993-12-24 10:39:16 +00001208
Martin v. Löwis11437992002-04-12 09:54:03 +00001209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
Martin v. Löwis88afe662002-10-26 13:47:44 +00001222
1223
1224
1225
1226
1227
1228
1229
1230
Barry Warsawfe33b792003-01-07 22:42:49 +00001231ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001232
1233
1234# This is for stuff that absolutely must end up in pyconfig.h.
1235# Please use pyport.h instead, if possible.
1236
1237
1238
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001239
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001240
1241
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00001242VERSION=2.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001243
Martin v. Löwis1142de32002-03-29 16:28:31 +00001244
1245SOVERSION=1.0
1246
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001247# The later defininition of _XOPEN_SOURCE disables certain features
1248# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1249
1250cat >>confdefs.h <<\_ACEOF
1251#define _GNU_SOURCE 1
1252_ACEOF
1253
1254
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001255# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1256# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1257# them.
1258
1259cat >>confdefs.h <<\_ACEOF
1260#define _NETBSD_SOURCE 1
1261_ACEOF
1262
1263
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001264define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001265
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001266# Arguments passed to configure.
1267
1268CONFIG_ARGS="$ac_configure_args"
1269
Jack Jansene578a632001-08-15 01:27:14 +00001270# Check whether --enable-framework or --disable-framework was given.
1271if test "${enable_framework+set}" = set; then
1272 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001273
Jack Jansene578a632001-08-15 01:27:14 +00001274 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001275 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001276 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001277 esac
1278 case $enableval in
1279 no)
1280 PYTHONFRAMEWORK=
1281 PYTHONFRAMEWORKDIR=no-framework
1282 PYTHONFRAMEWORKPREFIX=
1283 PYTHONFRAMEWORKINSTALLDIR=
1284 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001285 ;;
1286 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001287 PYTHONFRAMEWORK=Python
1288 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001289 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001290 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1291 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001292 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001293
Guido van Rossum563e7081996-09-10 18:20:48 +00001294else
Martin v. Löwis11437992002-04-12 09:54:03 +00001295
Jack Jansene578a632001-08-15 01:27:14 +00001296 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001297 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001298 PYTHONFRAMEWORKPREFIX=
1299 PYTHONFRAMEWORKINSTALLDIR=
1300 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001301
Martin v. Löwis11437992002-04-12 09:54:03 +00001302fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001303
1304
1305
1306
Jack Jansene578a632001-08-15 01:27:14 +00001307
1308##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001309## AC_HELP_STRING(--with-dyld,
1310## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001311##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001312# Set name for machine-dependent library files
1313
Martin v. Löwis11437992002-04-12 09:54:03 +00001314echo "$as_me:$LINENO: checking MACHDEP" >&5
1315echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001316if test -z "$MACHDEP"
1317then
Guido van Rossum563e7081996-09-10 18:20:48 +00001318 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001319 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1320 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001321 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001322 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001323 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001324 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001325 ac_md_system=`echo $ac_sys_system |
1326 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1327 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001328 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001329 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001330
Guido van Rossum07397971997-04-29 21:49:50 +00001331 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001332 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001333 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001334 atheos*) MACHDEP="atheos";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001335 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001336 esac
1337fi
Guido van Rossum91922671997-10-09 20:24:13 +00001338
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001339# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1340# disable features if it is defined, without any means to access these
1341# features as extensions. For these systems, we skip the definition of
1342# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1343# some feature, make sure there is no alternative way to access this
1344# feature. Also, when using wildcards, make sure you have verified the
1345# need for not defining _XOPEN_SOURCE on all systems matching the
1346# wildcard, and that the wildcard does not include future systems
1347# (which may remove their limitations).
1348case $ac_sys_system/$ac_sys_release in
1349 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1350 # even though select is a POSIX function. Reported by J. Ribbens.
1351 OpenBSD/2.* | OpenBSD/3.[012])
1352 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00001353 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
1354 # of union __?sigval. Reported by Stuart Bishop.
1355 SunOS/5.6)
1356 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001357 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
1358 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
1359 OpenUNIX/8.0.0| UnixWare/7.1.[0-3])
1360 define_xopen_source=no;;
1361 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001362 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001363 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001364 define_xopen_source=no;;
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001365esac
1366
1367if test $define_xopen_source = yes
1368then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001369
1370cat >>confdefs.h <<\_ACEOF
1371#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001372_ACEOF
1373
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001374
1375 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1376 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1377 # several APIs are not declared. Since this is also needed in some
1378 # cases for HP-UX, we define it globally.
1379
1380
1381cat >>confdefs.h <<\_ACEOF
1382#define _XOPEN_SOURCE_EXTENDED 1
1383_ACEOF
1384
1385
1386cat >>confdefs.h <<\_ACEOF
1387#define _POSIX_C_SOURCE 200112L
1388_ACEOF
1389
1390
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001391fi
1392
Guido van Rossum91922671997-10-09 20:24:13 +00001393#
1394# SGI compilers allow the specification of the both the ABI and the
1395# ISA on the command line. Depending on the values of these switches,
1396# different and often incompatable code will be generated.
1397#
1398# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1399# thus supply support for various ABI/ISA combinations. The MACHDEP
1400# variable is also adjusted.
1401#
1402
1403if test ! -z "$SGI_ABI"
1404then
1405 CC="cc $SGI_ABI"
1406 LDFLAGS="$SGI_ABI $LDFLAGS"
1407 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1408fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001409echo "$as_me:$LINENO: result: $MACHDEP" >&5
1410echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001411
Jack Jansen83f898c2002-12-30 22:23:40 +00001412# And add extra plat-mac for darwin
1413
Jack Jansen7b59b422003-03-17 15:44:10 +00001414
Jack Jansen83f898c2002-12-30 22:23:40 +00001415echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1416echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1417if test -z "$EXTRAPLATDIR"
1418then
1419 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001420 darwin)
1421 EXTRAPLATDIR="\$(PLATMACDIRS)"
1422 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1423 ;;
1424 *)
1425 EXTRAPLATDIR=""
1426 EXTRAMACHDEPPATH=""
1427 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001428 esac
1429fi
1430echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1431echo "${ECHO_T}$EXTRAPLATDIR" >&6
1432
Guido van Rossum627b2d71993-12-24 10:39:16 +00001433# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001434
1435# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1436# for debug/optimization stuff. BASECFLAGS is for flags that are required
1437# just to get things to compile and link. Users are free to override OPT
1438# when running configure or make. The build should not break if they do.
1439# BASECFLAGS should generally not be messed with, however.
1440
1441# XXX shouldn't some/most/all of this code be merged with the stuff later
1442# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001443echo "$as_me:$LINENO: checking for --without-gcc" >&5
1444echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1445
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001446# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001447if test "${with_gcc+set}" = set; then
1448 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001449
Guido van Rossum7f43da71994-08-01 12:15:30 +00001450 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001451 no) CC=cc
1452 without_gcc=yes;;
1453 yes) CC=gcc
1454 without_gcc=no;;
1455 *) CC=$withval
1456 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001457 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001458else
Martin v. Löwis11437992002-04-12 09:54:03 +00001459
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001460 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001461 AIX*) CC=cc_r
1462 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001463 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001464 case $BE_HOST_CPU in
1465 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001466 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001467 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001468 BASECFLAGS="$BASECFLAGS -export pragma"
1469 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001470 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001471 ;;
1472 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001473 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001474 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001475 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001476 ;;
1477 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001478 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1479echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1480 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001481 ;;
1482 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001483 AR="\$(srcdir)/Modules/ar_beos"
1484 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001485 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001486 Monterey*)
1487 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001488 without_gcc=;;
1489 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001490 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001491fi;
1492echo "$as_me:$LINENO: result: $without_gcc" >&5
1493echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001494
1495
Guido van Rossum95012191999-12-16 17:50:52 +00001496
Fred Drakea1a84e72001-03-06 05:52:16 +00001497MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001498echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1499echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1500
Guido van Rossum95012191999-12-16 17:50:52 +00001501# Check whether --with-cxx or --without-cxx was given.
1502if test "${with_cxx+set}" = set; then
1503 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001504
Martin v. Löwis22352952000-12-13 17:37:02 +00001505 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001506 case $withval in
1507 no) CXX=
1508 with_cxx=no;;
1509 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001510 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001511 with_cxx=$withval;;
1512 esac
1513else
Martin v. Löwis11437992002-04-12 09:54:03 +00001514
Guido van Rossum95012191999-12-16 17:50:52 +00001515 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001516 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001517
Martin v. Löwis11437992002-04-12 09:54:03 +00001518fi;
1519echo "$as_me:$LINENO: result: $with_cxx" >&5
1520echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001521
1522if test "$with_cxx" = "yes"
1523then
Martin v. Löwis11437992002-04-12 09:54:03 +00001524 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1525echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1526 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001527fi
1528
1529
1530
1531
Martin v. Löwis11437992002-04-12 09:54:03 +00001532if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001533then
1534 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1535do
Martin v. Löwis11437992002-04-12 09:54:03 +00001536 # 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 +00001537set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001538echo "$as_me:$LINENO: checking for $ac_word" >&5
1539echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1540if test "${ac_cv_prog_CXX+set}" = set; then
1541 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001542else
1543 if test -n "$CXX"; then
1544 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1545else
Martin v. Löwis11437992002-04-12 09:54:03 +00001546as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1547for as_dir in $PATH
1548do
1549 IFS=$as_save_IFS
1550 test -z "$as_dir" && as_dir=.
1551 for ac_exec_ext in '' $ac_executable_extensions; do
1552 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1553 ac_cv_prog_CXX="$ac_prog"
1554 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1555 break 2
1556 fi
1557done
1558done
1559
Martin v. Löwis22352952000-12-13 17:37:02 +00001560fi
1561fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001562CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001563if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001564 echo "$as_me:$LINENO: result: $CXX" >&5
1565echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001566else
Martin v. Löwis11437992002-04-12 09:54:03 +00001567 echo "$as_me:$LINENO: result: no" >&5
1568echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001569fi
1570
Martin v. Löwis11437992002-04-12 09:54:03 +00001571 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001572done
1573test -n "$CXX" || CXX="notfound"
1574
1575 if test "$CXX" = "notfound"
1576 then
1577 CXX=
1578 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001579 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001580ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001581ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1582ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1583ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1584 cat >conftest.$ac_ext <<_ACEOF
1585#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001586#include "confdefs.h"
1587
Barry Warsawfe33b792003-01-07 22:42:49 +00001588#ifdef F77_DUMMY_MAIN
1589# ifdef __cplusplus
1590 extern "C"
1591# endif
1592 int F77_DUMMY_MAIN() { return 1; }
1593#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00001594int
1595main ()
1596{
Michael W. Hudson54241132001-12-07 15:38:26 +00001597
Martin v. Löwis11437992002-04-12 09:54:03 +00001598 ;
1599 return 0;
1600}
1601_ACEOF
1602ac_clean_files_save=$ac_clean_files
1603ac_clean_files="$ac_clean_files a.out a.exe"
1604# Try to create an executable without -o first, disregard a.out.
1605# It will help us diagnose broken compilers, and finding out an intuition
1606# of exeext.
1607echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1608echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1609ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1610if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1611 (eval $ac_link_default) 2>&5
1612 ac_status=$?
1613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1614 (exit $ac_status); }; then
1615 # Find the output, starting from the most likely. This scheme is
1616# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1617# resort.
1618
1619# Be careful to initialize this variable, since it used to be cached.
1620# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1621ac_cv_exeext=
Barry Warsawfe33b792003-01-07 22:42:49 +00001622for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1623 ls a.out conftest 2>/dev/null;
1624 ls a.* conftest.* 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001625 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00001626 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001627 a.out ) # We found the default executable, but exeext='' is most
1628 # certainly right.
1629 break;;
1630 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1631 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1632 export ac_cv_exeext
1633 break;;
1634 * ) break;;
1635 esac
1636done
1637else
1638 echo "$as_me: failed program was:" >&5
1639cat conftest.$ac_ext >&5
Barry Warsawfe33b792003-01-07 22:42:49 +00001640{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1641echo "$as_me: error: C++ compiler cannot create executables" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001642 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001643fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001644
1645ac_exeext=$ac_cv_exeext
1646echo "$as_me:$LINENO: result: $ac_file" >&5
1647echo "${ECHO_T}$ac_file" >&6
1648
1649# Check the compiler produces executables we can run. If not, either
1650# the compiler is broken, or we cross compile.
1651echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1652echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1653# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1654# If not cross compiling, check that we can run a simple program.
1655if test "$cross_compiling" != yes; then
1656 if { ac_try='./$ac_file'
1657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1658 (eval $ac_try) 2>&5
1659 ac_status=$?
1660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1661 (exit $ac_status); }; }; then
1662 cross_compiling=no
1663 else
1664 if test "$cross_compiling" = maybe; then
1665 cross_compiling=yes
1666 else
1667 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1668If you meant to cross compile, use \`--host'." >&5
1669echo "$as_me: error: cannot run C++ compiled programs.
1670If you meant to cross compile, use \`--host'." >&2;}
1671 { (exit 1); exit 1; }; }
1672 fi
1673 fi
1674fi
1675echo "$as_me:$LINENO: result: yes" >&5
1676echo "${ECHO_T}yes" >&6
1677
1678rm -f a.out a.exe conftest$ac_cv_exeext
1679ac_clean_files=$ac_clean_files_save
1680# Check the compiler produces executables we can run. If not, either
1681# the compiler is broken, or we cross compile.
1682echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1683echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1684echo "$as_me:$LINENO: result: $cross_compiling" >&5
1685echo "${ECHO_T}$cross_compiling" >&6
1686
1687echo "$as_me:$LINENO: checking for suffix of executables" >&5
1688echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1689if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1690 (eval $ac_link) 2>&5
1691 ac_status=$?
1692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1693 (exit $ac_status); }; then
1694 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1695# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1696# work properly (i.e., refer to `conftest.exe'), while it won't with
1697# `rm'.
Barry Warsawfe33b792003-01-07 22:42:49 +00001698for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001699 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00001700 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001701 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1702 export ac_cv_exeext
1703 break;;
1704 * ) break;;
1705 esac
1706done
1707else
1708 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1709echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1710 { (exit 1); exit 1; }; }
1711fi
1712
1713rm -f conftest$ac_cv_exeext
1714echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1715echo "${ECHO_T}$ac_cv_exeext" >&6
1716
1717rm -f conftest.$ac_ext
1718EXEEXT=$ac_cv_exeext
1719ac_exeext=$EXEEXT
1720
1721 ac_ext=c
1722ac_cpp='$CPP $CPPFLAGS'
1723ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1724ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1725ac_compiler_gnu=$ac_cv_c_compiler_gnu
1726
1727
Martin v. Löwis22352952000-12-13 17:37:02 +00001728
1729 fi
1730fi
1731
Guido van Rossum8b131c51995-03-09 14:10:13 +00001732# If the user switches compilers, we can't believe the cache
1733if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1734then
Martin v. Löwis11437992002-04-12 09:54:03 +00001735 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1736(it is also a good idea to do 'make clean' before compiling)" >&5
1737echo "$as_me: error: cached CC is different -- throw away $cache_file
1738(it is also a good idea to do 'make clean' before compiling)" >&2;}
1739 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001740fi
1741
Martin v. Löwis11437992002-04-12 09:54:03 +00001742ac_ext=c
1743ac_cpp='$CPP $CPPFLAGS'
1744ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1745ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1746ac_compiler_gnu=$ac_cv_c_compiler_gnu
1747if test -n "$ac_tool_prefix"; then
1748 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1749set dummy ${ac_tool_prefix}gcc; ac_word=$2
1750echo "$as_me:$LINENO: checking for $ac_word" >&5
1751echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1752if test "${ac_cv_prog_CC+set}" = set; then
1753 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001754else
1755 if test -n "$CC"; then
1756 ac_cv_prog_CC="$CC" # Let the user override the test.
1757else
Martin v. Löwis11437992002-04-12 09:54:03 +00001758as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1759for as_dir in $PATH
1760do
1761 IFS=$as_save_IFS
1762 test -z "$as_dir" && as_dir=.
1763 for ac_exec_ext in '' $ac_executable_extensions; do
1764 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1765 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1766 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1767 break 2
1768 fi
1769done
1770done
1771
Jack Jansendd19cf82001-12-06 22:36:17 +00001772fi
1773fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001774CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001775if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001776 echo "$as_me:$LINENO: result: $CC" >&5
1777echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001778else
Martin v. Löwis11437992002-04-12 09:54:03 +00001779 echo "$as_me:$LINENO: result: no" >&5
1780echo "${ECHO_T}no" >&6
1781fi
1782
1783fi
1784if test -z "$ac_cv_prog_CC"; then
1785 ac_ct_CC=$CC
1786 # Extract the first word of "gcc", so it can be a program name with args.
1787set dummy gcc; ac_word=$2
1788echo "$as_me:$LINENO: checking for $ac_word" >&5
1789echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1790if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1791 echo $ECHO_N "(cached) $ECHO_C" >&6
1792else
1793 if test -n "$ac_ct_CC"; then
1794 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1795else
1796as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1797for as_dir in $PATH
1798do
1799 IFS=$as_save_IFS
1800 test -z "$as_dir" && as_dir=.
1801 for ac_exec_ext in '' $ac_executable_extensions; do
1802 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1803 ac_cv_prog_ac_ct_CC="gcc"
1804 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1805 break 2
1806 fi
1807done
1808done
1809
1810fi
1811fi
1812ac_ct_CC=$ac_cv_prog_ac_ct_CC
1813if test -n "$ac_ct_CC"; then
1814 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1815echo "${ECHO_T}$ac_ct_CC" >&6
1816else
1817 echo "$as_me:$LINENO: result: no" >&5
1818echo "${ECHO_T}no" >&6
1819fi
1820
1821 CC=$ac_ct_CC
1822else
1823 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001824fi
1825
Jack Jansendd19cf82001-12-06 22:36:17 +00001826if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001827 if test -n "$ac_tool_prefix"; then
1828 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1829set dummy ${ac_tool_prefix}cc; ac_word=$2
1830echo "$as_me:$LINENO: checking for $ac_word" >&5
1831echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1832if test "${ac_cv_prog_CC+set}" = set; then
1833 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001834else
1835 if test -n "$CC"; then
1836 ac_cv_prog_CC="$CC" # Let the user override the test.
1837else
Martin v. Löwis11437992002-04-12 09:54:03 +00001838as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1839for as_dir in $PATH
1840do
1841 IFS=$as_save_IFS
1842 test -z "$as_dir" && as_dir=.
1843 for ac_exec_ext in '' $ac_executable_extensions; do
1844 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1845 ac_cv_prog_CC="${ac_tool_prefix}cc"
1846 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1847 break 2
1848 fi
1849done
1850done
1851
1852fi
1853fi
1854CC=$ac_cv_prog_CC
1855if test -n "$CC"; then
1856 echo "$as_me:$LINENO: result: $CC" >&5
1857echo "${ECHO_T}$CC" >&6
1858else
1859 echo "$as_me:$LINENO: result: no" >&5
1860echo "${ECHO_T}no" >&6
1861fi
1862
1863fi
1864if test -z "$ac_cv_prog_CC"; then
1865 ac_ct_CC=$CC
1866 # Extract the first word of "cc", so it can be a program name with args.
1867set dummy cc; ac_word=$2
1868echo "$as_me:$LINENO: checking for $ac_word" >&5
1869echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1870if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1871 echo $ECHO_N "(cached) $ECHO_C" >&6
1872else
1873 if test -n "$ac_ct_CC"; then
1874 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1875else
1876as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1877for as_dir in $PATH
1878do
1879 IFS=$as_save_IFS
1880 test -z "$as_dir" && as_dir=.
1881 for ac_exec_ext in '' $ac_executable_extensions; do
1882 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1883 ac_cv_prog_ac_ct_CC="cc"
1884 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1885 break 2
1886 fi
1887done
1888done
1889
1890fi
1891fi
1892ac_ct_CC=$ac_cv_prog_ac_ct_CC
1893if test -n "$ac_ct_CC"; then
1894 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1895echo "${ECHO_T}$ac_ct_CC" >&6
1896else
1897 echo "$as_me:$LINENO: result: no" >&5
1898echo "${ECHO_T}no" >&6
1899fi
1900
1901 CC=$ac_ct_CC
1902else
1903 CC="$ac_cv_prog_CC"
1904fi
1905
1906fi
1907if test -z "$CC"; then
1908 # Extract the first word of "cc", so it can be a program name with args.
1909set dummy cc; ac_word=$2
1910echo "$as_me:$LINENO: checking for $ac_word" >&5
1911echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1912if test "${ac_cv_prog_CC+set}" = set; then
1913 echo $ECHO_N "(cached) $ECHO_C" >&6
1914else
1915 if test -n "$CC"; then
1916 ac_cv_prog_CC="$CC" # Let the user override the test.
1917else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001918 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001919as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1920for as_dir in $PATH
1921do
1922 IFS=$as_save_IFS
1923 test -z "$as_dir" && as_dir=.
1924 for ac_exec_ext in '' $ac_executable_extensions; do
1925 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1926 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1927 ac_prog_rejected=yes
1928 continue
1929 fi
1930 ac_cv_prog_CC="cc"
1931 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1932 break 2
1933 fi
1934done
1935done
1936
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001937if test $ac_prog_rejected = yes; then
1938 # We found a bogon in the path, so make sure we never use it.
1939 set dummy $ac_cv_prog_CC
1940 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001941 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001942 # We chose a different compiler from the bogus one.
1943 # However, it has the same basename, so the bogon will be chosen
1944 # first if we set CC to just the basename; use the full file name.
1945 shift
Barry Warsawfe33b792003-01-07 22:42:49 +00001946 set dummy "$as_dir/$ac_word" ${1+"$@"}
1947 shift
1948 ac_cv_prog_CC="$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001949 fi
1950fi
1951fi
1952fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001953CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001954if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001955 echo "$as_me:$LINENO: result: $CC" >&5
1956echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001957else
Martin v. Löwis11437992002-04-12 09:54:03 +00001958 echo "$as_me:$LINENO: result: no" >&5
1959echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001960fi
1961
Martin v. Löwis11437992002-04-12 09:54:03 +00001962fi
1963if test -z "$CC"; then
1964 if test -n "$ac_tool_prefix"; then
1965 for ac_prog in cl
1966 do
1967 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1968set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1969echo "$as_me:$LINENO: checking for $ac_word" >&5
1970echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1971if test "${ac_cv_prog_CC+set}" = set; then
1972 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001973else
1974 if test -n "$CC"; then
1975 ac_cv_prog_CC="$CC" # Let the user override the test.
1976else
Martin v. Löwis11437992002-04-12 09:54:03 +00001977as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1978for as_dir in $PATH
1979do
1980 IFS=$as_save_IFS
1981 test -z "$as_dir" && as_dir=.
1982 for ac_exec_ext in '' $ac_executable_extensions; do
1983 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1984 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1985 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1986 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001987 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001988done
1989done
1990
1991fi
1992fi
1993CC=$ac_cv_prog_CC
1994if test -n "$CC"; then
1995 echo "$as_me:$LINENO: result: $CC" >&5
1996echo "${ECHO_T}$CC" >&6
1997else
1998 echo "$as_me:$LINENO: result: no" >&5
1999echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002000fi
2001
Martin v. Löwis11437992002-04-12 09:54:03 +00002002 test -n "$CC" && break
2003 done
2004fi
2005if test -z "$CC"; then
2006 ac_ct_CC=$CC
2007 for ac_prog in cl
2008do
2009 # Extract the first word of "$ac_prog", so it can be a program name with args.
2010set dummy $ac_prog; ac_word=$2
2011echo "$as_me:$LINENO: checking for $ac_word" >&5
2012echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2013if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2014 echo $ECHO_N "(cached) $ECHO_C" >&6
2015else
2016 if test -n "$ac_ct_CC"; then
2017 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2018else
2019as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2020for as_dir in $PATH
2021do
2022 IFS=$as_save_IFS
2023 test -z "$as_dir" && as_dir=.
2024 for ac_exec_ext in '' $ac_executable_extensions; do
2025 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2026 ac_cv_prog_ac_ct_CC="$ac_prog"
2027 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2028 break 2
2029 fi
2030done
2031done
Jack Jansendd19cf82001-12-06 22:36:17 +00002032
Martin v. Löwis11437992002-04-12 09:54:03 +00002033fi
2034fi
2035ac_ct_CC=$ac_cv_prog_ac_ct_CC
2036if test -n "$ac_ct_CC"; then
2037 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2038echo "${ECHO_T}$ac_ct_CC" >&6
2039else
2040 echo "$as_me:$LINENO: result: no" >&5
2041echo "${ECHO_T}no" >&6
2042fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002043
Martin v. Löwis11437992002-04-12 09:54:03 +00002044 test -n "$ac_ct_CC" && break
2045done
Michael W. Hudson54241132001-12-07 15:38:26 +00002046
Martin v. Löwis11437992002-04-12 09:54:03 +00002047 CC=$ac_ct_CC
2048fi
2049
2050fi
2051
2052
2053test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
2054echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
2055 { (exit 1); exit 1; }; }
2056
2057# Provide some information about the compiler.
2058echo "$as_me:$LINENO:" \
2059 "checking for C compiler version" >&5
2060ac_compiler=`set X $ac_compile; echo $2`
2061{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2062 (eval $ac_compiler --version </dev/null >&5) 2>&5
2063 ac_status=$?
2064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2065 (exit $ac_status); }
2066{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2067 (eval $ac_compiler -v </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
2077cat >conftest.$ac_ext <<_ACEOF
2078#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00002079#include "confdefs.h"
2080
Barry Warsawfe33b792003-01-07 22:42:49 +00002081#ifdef F77_DUMMY_MAIN
2082# ifdef __cplusplus
2083 extern "C"
2084# endif
2085 int F77_DUMMY_MAIN() { return 1; }
2086#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002087int
2088main ()
2089{
2090
2091 ;
2092 return 0;
2093}
2094_ACEOF
2095ac_clean_files_save=$ac_clean_files
2096ac_clean_files="$ac_clean_files a.out a.exe"
2097# Try to create an executable without -o first, disregard a.out.
2098# It will help us diagnose broken compilers, and finding out an intuition
2099# of exeext.
2100echo "$as_me:$LINENO: checking for C compiler default output" >&5
2101echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2102ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2103if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2104 (eval $ac_link_default) 2>&5
2105 ac_status=$?
2106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2107 (exit $ac_status); }; then
2108 # Find the output, starting from the most likely. This scheme is
2109# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2110# resort.
2111
2112# Be careful to initialize this variable, since it used to be cached.
2113# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2114ac_cv_exeext=
Barry Warsawfe33b792003-01-07 22:42:49 +00002115for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
2116 ls a.out conftest 2>/dev/null;
2117 ls a.* conftest.* 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002118 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00002119 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002120 a.out ) # We found the default executable, but exeext='' is most
2121 # certainly right.
2122 break;;
2123 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2124 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2125 export ac_cv_exeext
2126 break;;
2127 * ) break;;
2128 esac
2129done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002130else
Martin v. Löwis11437992002-04-12 09:54:03 +00002131 echo "$as_me: failed program was:" >&5
2132cat conftest.$ac_ext >&5
Barry Warsawfe33b792003-01-07 22:42:49 +00002133{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2134echo "$as_me: error: C compiler cannot create executables" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002135 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002136fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002137
Martin v. Löwis11437992002-04-12 09:54:03 +00002138ac_exeext=$ac_cv_exeext
2139echo "$as_me:$LINENO: result: $ac_file" >&5
2140echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002141
Martin v. Löwis11437992002-04-12 09:54:03 +00002142# Check the compiler produces executables we can run. If not, either
2143# the compiler is broken, or we cross compile.
2144echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2145echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2146# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2147# If not cross compiling, check that we can run a simple program.
2148if test "$cross_compiling" != yes; then
2149 if { ac_try='./$ac_file'
2150 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2151 (eval $ac_try) 2>&5
2152 ac_status=$?
2153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2154 (exit $ac_status); }; }; then
2155 cross_compiling=no
2156 else
2157 if test "$cross_compiling" = maybe; then
2158 cross_compiling=yes
2159 else
2160 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2161If you meant to cross compile, use \`--host'." >&5
2162echo "$as_me: error: cannot run C compiled programs.
2163If you meant to cross compile, use \`--host'." >&2;}
2164 { (exit 1); exit 1; }; }
2165 fi
2166 fi
2167fi
2168echo "$as_me:$LINENO: result: yes" >&5
2169echo "${ECHO_T}yes" >&6
2170
2171rm -f a.out a.exe conftest$ac_cv_exeext
2172ac_clean_files=$ac_clean_files_save
2173# Check the compiler produces executables we can run. If not, either
2174# the compiler is broken, or we cross compile.
2175echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2176echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2177echo "$as_me:$LINENO: result: $cross_compiling" >&5
2178echo "${ECHO_T}$cross_compiling" >&6
2179
2180echo "$as_me:$LINENO: checking for suffix of executables" >&5
2181echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2182if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2183 (eval $ac_link) 2>&5
2184 ac_status=$?
2185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2186 (exit $ac_status); }; then
2187 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2188# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2189# work properly (i.e., refer to `conftest.exe'), while it won't with
2190# `rm'.
Barry Warsawfe33b792003-01-07 22:42:49 +00002191for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002192 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00002193 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002194 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2195 export ac_cv_exeext
2196 break;;
2197 * ) break;;
2198 esac
2199done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002200else
Martin v. Löwis11437992002-04-12 09:54:03 +00002201 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2202echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2203 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002204fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002205
Martin v. Löwis11437992002-04-12 09:54:03 +00002206rm -f conftest$ac_cv_exeext
2207echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2208echo "${ECHO_T}$ac_cv_exeext" >&6
2209
2210rm -f conftest.$ac_ext
2211EXEEXT=$ac_cv_exeext
2212ac_exeext=$EXEEXT
2213echo "$as_me:$LINENO: checking for suffix of object files" >&5
2214echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2215if test "${ac_cv_objext+set}" = set; then
2216 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002217else
Martin v. Löwis11437992002-04-12 09:54:03 +00002218 cat >conftest.$ac_ext <<_ACEOF
2219#line $LINENO "configure"
2220#include "confdefs.h"
2221
Barry Warsawfe33b792003-01-07 22:42:49 +00002222#ifdef F77_DUMMY_MAIN
2223# ifdef __cplusplus
2224 extern "C"
2225# endif
2226 int F77_DUMMY_MAIN() { return 1; }
2227#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002228int
2229main ()
2230{
2231
2232 ;
2233 return 0;
2234}
2235_ACEOF
2236rm -f conftest.o conftest.obj
2237if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2238 (eval $ac_compile) 2>&5
2239 ac_status=$?
2240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2241 (exit $ac_status); }; then
2242 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2243 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00002244 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002245 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2246 break;;
2247 esac
2248done
2249else
2250 echo "$as_me: failed program was:" >&5
2251cat conftest.$ac_ext >&5
2252{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2253echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2254 { (exit 1); exit 1; }; }
2255fi
2256
2257rm -f conftest.$ac_cv_objext conftest.$ac_ext
2258fi
2259echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2260echo "${ECHO_T}$ac_cv_objext" >&6
2261OBJEXT=$ac_cv_objext
2262ac_objext=$OBJEXT
2263echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2264echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2265if test "${ac_cv_c_compiler_gnu+set}" = set; then
2266 echo $ECHO_N "(cached) $ECHO_C" >&6
2267else
2268 cat >conftest.$ac_ext <<_ACEOF
2269#line $LINENO "configure"
2270#include "confdefs.h"
2271
Barry Warsawfe33b792003-01-07 22:42:49 +00002272#ifdef F77_DUMMY_MAIN
2273# ifdef __cplusplus
2274 extern "C"
2275# endif
2276 int F77_DUMMY_MAIN() { return 1; }
2277#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002278int
2279main ()
2280{
2281#ifndef __GNUC__
2282 choke me
2283#endif
2284
2285 ;
2286 return 0;
2287}
2288_ACEOF
2289rm -f conftest.$ac_objext
2290if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2291 (eval $ac_compile) 2>&5
2292 ac_status=$?
2293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2294 (exit $ac_status); } &&
2295 { ac_try='test -s conftest.$ac_objext'
2296 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2297 (eval $ac_try) 2>&5
2298 ac_status=$?
2299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2300 (exit $ac_status); }; }; then
2301 ac_compiler_gnu=yes
2302else
2303 echo "$as_me: failed program was:" >&5
2304cat conftest.$ac_ext >&5
2305ac_compiler_gnu=no
2306fi
2307rm -f conftest.$ac_objext conftest.$ac_ext
2308ac_cv_c_compiler_gnu=$ac_compiler_gnu
2309
2310fi
2311echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2312echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2313GCC=`test $ac_compiler_gnu = yes && echo yes`
2314ac_test_CFLAGS=${CFLAGS+set}
2315ac_save_CFLAGS=$CFLAGS
2316CFLAGS="-g"
2317echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2318echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2319if test "${ac_cv_prog_cc_g+set}" = set; then
2320 echo $ECHO_N "(cached) $ECHO_C" >&6
2321else
2322 cat >conftest.$ac_ext <<_ACEOF
2323#line $LINENO "configure"
2324#include "confdefs.h"
2325
Barry Warsawfe33b792003-01-07 22:42:49 +00002326#ifdef F77_DUMMY_MAIN
2327# ifdef __cplusplus
2328 extern "C"
2329# endif
2330 int F77_DUMMY_MAIN() { return 1; }
2331#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002332int
2333main ()
2334{
2335
2336 ;
2337 return 0;
2338}
2339_ACEOF
2340rm -f conftest.$ac_objext
2341if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2342 (eval $ac_compile) 2>&5
2343 ac_status=$?
2344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2345 (exit $ac_status); } &&
2346 { ac_try='test -s conftest.$ac_objext'
2347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2348 (eval $ac_try) 2>&5
2349 ac_status=$?
2350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2351 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002352 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002353else
Martin v. Löwis11437992002-04-12 09:54:03 +00002354 echo "$as_me: failed program was:" >&5
2355cat conftest.$ac_ext >&5
2356ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002357fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002358rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002359fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002360echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2361echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002362if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002363 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002364elif test $ac_cv_prog_cc_g = yes; then
2365 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002366 CFLAGS="-g -O2"
2367 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002368 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002369 fi
2370else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002371 if test "$GCC" = yes; then
2372 CFLAGS="-O2"
2373 else
2374 CFLAGS=
2375 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002376fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002377# Some people use a C++ compiler to compile C. Since we use `exit',
2378# in C++ we need to declare it. In case someone uses the same compiler
2379# for both compiling C and C++ we need to have the C++ compiler decide
2380# the declaration of exit, since it's the most demanding environment.
2381cat >conftest.$ac_ext <<_ACEOF
2382#ifndef __cplusplus
2383 choke me
2384#endif
2385_ACEOF
2386rm -f conftest.$ac_objext
2387if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2388 (eval $ac_compile) 2>&5
2389 ac_status=$?
2390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2391 (exit $ac_status); } &&
2392 { ac_try='test -s conftest.$ac_objext'
2393 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2394 (eval $ac_try) 2>&5
2395 ac_status=$?
2396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2397 (exit $ac_status); }; }; then
2398 for ac_declaration in \
2399 ''\
2400 '#include <stdlib.h>' \
2401 'extern "C" void std::exit (int) throw (); using std::exit;' \
2402 'extern "C" void std::exit (int); using std::exit;' \
2403 'extern "C" void exit (int) throw ();' \
2404 'extern "C" void exit (int);' \
2405 'void exit (int);'
2406do
2407 cat >conftest.$ac_ext <<_ACEOF
2408#line $LINENO "configure"
2409#include "confdefs.h"
2410#include <stdlib.h>
2411$ac_declaration
Barry Warsawfe33b792003-01-07 22:42:49 +00002412#ifdef F77_DUMMY_MAIN
2413# ifdef __cplusplus
2414 extern "C"
2415# endif
2416 int F77_DUMMY_MAIN() { return 1; }
2417#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002418int
2419main ()
2420{
2421exit (42);
2422 ;
2423 return 0;
2424}
2425_ACEOF
2426rm -f conftest.$ac_objext
2427if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2428 (eval $ac_compile) 2>&5
2429 ac_status=$?
2430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2431 (exit $ac_status); } &&
2432 { ac_try='test -s conftest.$ac_objext'
2433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2434 (eval $ac_try) 2>&5
2435 ac_status=$?
2436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2437 (exit $ac_status); }; }; then
2438 :
2439else
2440 echo "$as_me: failed program was:" >&5
2441cat conftest.$ac_ext >&5
2442continue
2443fi
2444rm -f conftest.$ac_objext conftest.$ac_ext
2445 cat >conftest.$ac_ext <<_ACEOF
2446#line $LINENO "configure"
2447#include "confdefs.h"
2448$ac_declaration
Barry Warsawfe33b792003-01-07 22:42:49 +00002449#ifdef F77_DUMMY_MAIN
2450# ifdef __cplusplus
2451 extern "C"
2452# endif
2453 int F77_DUMMY_MAIN() { return 1; }
2454#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002455int
2456main ()
2457{
2458exit (42);
2459 ;
2460 return 0;
2461}
2462_ACEOF
2463rm -f conftest.$ac_objext
2464if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2465 (eval $ac_compile) 2>&5
2466 ac_status=$?
2467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2468 (exit $ac_status); } &&
2469 { ac_try='test -s conftest.$ac_objext'
2470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2471 (eval $ac_try) 2>&5
2472 ac_status=$?
2473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2474 (exit $ac_status); }; }; then
2475 break
2476else
2477 echo "$as_me: failed program was:" >&5
2478cat conftest.$ac_ext >&5
2479fi
2480rm -f conftest.$ac_objext conftest.$ac_ext
2481done
2482rm -f conftest*
2483if test -n "$ac_declaration"; then
2484 echo '#ifdef __cplusplus' >>confdefs.h
2485 echo $ac_declaration >>confdefs.h
2486 echo '#endif' >>confdefs.h
2487fi
2488
2489else
2490 echo "$as_me: failed program was:" >&5
2491cat conftest.$ac_ext >&5
2492fi
2493rm -f conftest.$ac_objext conftest.$ac_ext
2494ac_ext=c
2495ac_cpp='$CPP $CPPFLAGS'
2496ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2497ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2498ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002499
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002500
2501# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002502
2503ac_ext=c
2504ac_cpp='$CPP $CPPFLAGS'
2505ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2506ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2507ac_compiler_gnu=$ac_cv_c_compiler_gnu
2508echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2509echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002510# On Suns, sometimes $CPP names a directory.
2511if test -n "$CPP" && test -d "$CPP"; then
2512 CPP=
2513fi
2514if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002515 if test "${ac_cv_prog_CPP+set}" = set; then
2516 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002517else
Martin v. Löwis11437992002-04-12 09:54:03 +00002518 # Double quotes because CPP needs to be expanded
2519 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2520 do
2521 ac_preproc_ok=false
2522for ac_c_preproc_warn_flag in '' yes
2523do
2524 # Use a header file that comes with gcc, so configuring glibc
2525 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002526 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002527 # not just through cpp. "Syntax error" is here to catch this case.
2528 cat >conftest.$ac_ext <<_ACEOF
2529#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002530#include "confdefs.h"
2531#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 Syntax error
2533_ACEOF
2534if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2535 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2536 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002537 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002538 rm -f conftest.er1
2539 cat conftest.err >&5
2540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2541 (exit $ac_status); } >/dev/null; then
2542 if test -s conftest.err; then
2543 ac_cpp_err=$ac_c_preproc_warn_flag
2544 else
2545 ac_cpp_err=
2546 fi
2547else
2548 ac_cpp_err=yes
2549fi
2550if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002551 :
2552else
Martin v. Löwis11437992002-04-12 09:54:03 +00002553 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002554 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002555 # Broken: fails on valid input.
2556continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002557fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002558rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002559
Martin v. Löwis11437992002-04-12 09:54:03 +00002560 # OK, works on sane cases. Now check whether non-existent headers
2561 # can be detected and how.
2562 cat >conftest.$ac_ext <<_ACEOF
2563#line $LINENO "configure"
2564#include "confdefs.h"
2565#include <ac_nonexistent.h>
2566_ACEOF
2567if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2568 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2569 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002570 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002571 rm -f conftest.er1
2572 cat conftest.err >&5
2573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2574 (exit $ac_status); } >/dev/null; then
2575 if test -s conftest.err; then
2576 ac_cpp_err=$ac_c_preproc_warn_flag
2577 else
2578 ac_cpp_err=
2579 fi
2580else
2581 ac_cpp_err=yes
2582fi
2583if test -z "$ac_cpp_err"; then
2584 # Broken: success on invalid input.
2585continue
2586else
2587 echo "$as_me: failed program was:" >&5
2588 cat conftest.$ac_ext >&5
2589 # Passes both tests.
2590ac_preproc_ok=:
2591break
2592fi
2593rm -f conftest.err conftest.$ac_ext
2594
2595done
2596# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2597rm -f conftest.err conftest.$ac_ext
2598if $ac_preproc_ok; then
2599 break
2600fi
2601
2602 done
2603 ac_cv_prog_CPP=$CPP
2604
2605fi
2606 CPP=$ac_cv_prog_CPP
2607else
2608 ac_cv_prog_CPP=$CPP
2609fi
2610echo "$as_me:$LINENO: result: $CPP" >&5
2611echo "${ECHO_T}$CPP" >&6
2612ac_preproc_ok=false
2613for ac_c_preproc_warn_flag in '' yes
2614do
2615 # Use a header file that comes with gcc, so configuring glibc
2616 # with a fresh cross-compiler works.
2617 # On the NeXT, cc -E runs the code through the compiler's parser,
2618 # not just through cpp. "Syntax error" is here to catch this case.
2619 cat >conftest.$ac_ext <<_ACEOF
2620#line $LINENO "configure"
2621#include "confdefs.h"
2622#include <assert.h>
2623 Syntax error
2624_ACEOF
2625if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2626 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2627 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002628 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 rm -f conftest.er1
2630 cat conftest.err >&5
2631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2632 (exit $ac_status); } >/dev/null; then
2633 if test -s conftest.err; then
2634 ac_cpp_err=$ac_c_preproc_warn_flag
2635 else
2636 ac_cpp_err=
2637 fi
2638else
2639 ac_cpp_err=yes
2640fi
2641if test -z "$ac_cpp_err"; then
2642 :
2643else
2644 echo "$as_me: failed program was:" >&5
2645 cat conftest.$ac_ext >&5
2646 # Broken: fails on valid input.
2647continue
2648fi
2649rm -f conftest.err conftest.$ac_ext
2650
2651 # OK, works on sane cases. Now check whether non-existent headers
2652 # can be detected and how.
2653 cat >conftest.$ac_ext <<_ACEOF
2654#line $LINENO "configure"
2655#include "confdefs.h"
2656#include <ac_nonexistent.h>
2657_ACEOF
2658if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2659 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2660 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002661 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002662 rm -f conftest.er1
2663 cat conftest.err >&5
2664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2665 (exit $ac_status); } >/dev/null; then
2666 if test -s conftest.err; then
2667 ac_cpp_err=$ac_c_preproc_warn_flag
2668 else
2669 ac_cpp_err=
2670 fi
2671else
2672 ac_cpp_err=yes
2673fi
2674if test -z "$ac_cpp_err"; then
2675 # Broken: success on invalid input.
2676continue
2677else
2678 echo "$as_me: failed program was:" >&5
2679 cat conftest.$ac_ext >&5
2680 # Passes both tests.
2681ac_preproc_ok=:
2682break
2683fi
2684rm -f conftest.err conftest.$ac_ext
2685
2686done
2687# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2688rm -f conftest.err conftest.$ac_ext
2689if $ac_preproc_ok; then
2690 :
2691else
2692 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2693echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2694 { (exit 1); exit 1; }; }
2695fi
2696
2697ac_ext=c
2698ac_cpp='$CPP $CPPFLAGS'
2699ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2700ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2701ac_compiler_gnu=$ac_cv_c_compiler_gnu
2702
2703
2704
2705echo "$as_me:$LINENO: checking for AIX" >&5
2706echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2707cat >conftest.$ac_ext <<_ACEOF
2708#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002709#include "confdefs.h"
2710#ifdef _AIX
2711 yes
2712#endif
2713
Martin v. Löwis11437992002-04-12 09:54:03 +00002714_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002715if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00002716 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002717 echo "$as_me:$LINENO: result: yes" >&5
2718echo "${ECHO_T}yes" >&6
2719cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002720#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002721_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002722
2723else
Martin v. Löwis11437992002-04-12 09:54:03 +00002724 echo "$as_me:$LINENO: result: no" >&5
2725echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002726fi
2727rm -f conftest*
2728
Michael W. Hudson54241132001-12-07 15:38:26 +00002729
Martin v. Löwis11437992002-04-12 09:54:03 +00002730echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2731echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2732if test "${ac_cv_header_stdc+set}" = set; then
2733 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002734else
Martin v. Löwis11437992002-04-12 09:54:03 +00002735 cat >conftest.$ac_ext <<_ACEOF
2736#line $LINENO "configure"
2737#include "confdefs.h"
2738#include <stdlib.h>
2739#include <stdarg.h>
2740#include <string.h>
2741#include <float.h>
2742
2743_ACEOF
2744if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2745 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2746 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002747 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002748 rm -f conftest.er1
2749 cat conftest.err >&5
2750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2751 (exit $ac_status); } >/dev/null; then
2752 if test -s conftest.err; then
2753 ac_cpp_err=$ac_c_preproc_warn_flag
2754 else
2755 ac_cpp_err=
2756 fi
2757else
2758 ac_cpp_err=yes
2759fi
2760if test -z "$ac_cpp_err"; then
2761 ac_cv_header_stdc=yes
2762else
2763 echo "$as_me: failed program was:" >&5
2764 cat conftest.$ac_ext >&5
2765 ac_cv_header_stdc=no
2766fi
2767rm -f conftest.err conftest.$ac_ext
2768
2769if test $ac_cv_header_stdc = yes; then
2770 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2771 cat >conftest.$ac_ext <<_ACEOF
2772#line $LINENO "configure"
2773#include "confdefs.h"
2774#include <string.h>
2775
2776_ACEOF
2777if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00002778 egrep "memchr" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002779 :
2780else
2781 ac_cv_header_stdc=no
2782fi
2783rm -f conftest*
2784
2785fi
2786
2787if test $ac_cv_header_stdc = yes; then
2788 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2789 cat >conftest.$ac_ext <<_ACEOF
2790#line $LINENO "configure"
2791#include "confdefs.h"
2792#include <stdlib.h>
2793
2794_ACEOF
2795if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00002796 egrep "free" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002797 :
2798else
2799 ac_cv_header_stdc=no
2800fi
2801rm -f conftest*
2802
2803fi
2804
2805if test $ac_cv_header_stdc = yes; then
2806 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2807 if test "$cross_compiling" = yes; then
2808 :
2809else
2810 cat >conftest.$ac_ext <<_ACEOF
2811#line $LINENO "configure"
2812#include "confdefs.h"
2813#include <ctype.h>
2814#if ((' ' & 0x0FF) == 0x020)
2815# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2816# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2817#else
2818# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2819 || ('j' <= (c) && (c) <= 'r') \
2820 || ('s' <= (c) && (c) <= 'z'))
2821# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2822#endif
2823
2824#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2825int
2826main ()
2827{
2828 int i;
2829 for (i = 0; i < 256; i++)
2830 if (XOR (islower (i), ISLOWER (i))
2831 || toupper (i) != TOUPPER (i))
2832 exit(2);
2833 exit (0);
2834}
2835_ACEOF
2836rm -f conftest$ac_exeext
2837if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2838 (eval $ac_link) 2>&5
2839 ac_status=$?
2840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2841 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2842 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2843 (eval $ac_try) 2>&5
2844 ac_status=$?
2845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2846 (exit $ac_status); }; }; then
2847 :
2848else
2849 echo "$as_me: program exited with status $ac_status" >&5
2850echo "$as_me: failed program was:" >&5
2851cat conftest.$ac_ext >&5
2852( exit $ac_status )
2853ac_cv_header_stdc=no
2854fi
Barry Warsawfe33b792003-01-07 22:42:49 +00002855rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002856fi
2857fi
2858fi
2859echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2860echo "${ECHO_T}$ac_cv_header_stdc" >&6
2861if test $ac_cv_header_stdc = yes; then
2862
2863cat >>confdefs.h <<\_ACEOF
2864#define STDC_HEADERS 1
2865_ACEOF
2866
2867fi
2868
2869# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2880 inttypes.h stdint.h unistd.h
2881do
2882as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2883echo "$as_me:$LINENO: checking for $ac_header" >&5
2884echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2885if eval "test \"\${$as_ac_Header+set}\" = set"; then
2886 echo $ECHO_N "(cached) $ECHO_C" >&6
2887else
2888 cat >conftest.$ac_ext <<_ACEOF
2889#line $LINENO "configure"
2890#include "confdefs.h"
2891$ac_includes_default
2892
2893#include <$ac_header>
2894_ACEOF
2895rm -f conftest.$ac_objext
2896if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2897 (eval $ac_compile) 2>&5
2898 ac_status=$?
2899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2900 (exit $ac_status); } &&
2901 { ac_try='test -s conftest.$ac_objext'
2902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2903 (eval $ac_try) 2>&5
2904 ac_status=$?
2905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2906 (exit $ac_status); }; }; then
2907 eval "$as_ac_Header=yes"
2908else
2909 echo "$as_me: failed program was:" >&5
2910cat conftest.$ac_ext >&5
2911eval "$as_ac_Header=no"
2912fi
2913rm -f conftest.$ac_objext conftest.$ac_ext
2914fi
2915echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2916echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2917if test `eval echo '${'$as_ac_Header'}'` = yes; then
2918 cat >>confdefs.h <<_ACEOF
2919#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2920_ACEOF
2921
2922fi
2923
2924done
2925
2926
2927if test "${ac_cv_header_minix_config_h+set}" = set; then
2928 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2929echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2930if test "${ac_cv_header_minix_config_h+set}" = set; then
2931 echo $ECHO_N "(cached) $ECHO_C" >&6
2932fi
2933echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2934echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2935else
2936 # Is the header compilable?
2937echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2938echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2939cat >conftest.$ac_ext <<_ACEOF
2940#line $LINENO "configure"
2941#include "confdefs.h"
2942$ac_includes_default
2943#include <minix/config.h>
2944_ACEOF
2945rm -f conftest.$ac_objext
2946if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2947 (eval $ac_compile) 2>&5
2948 ac_status=$?
2949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2950 (exit $ac_status); } &&
2951 { ac_try='test -s conftest.$ac_objext'
2952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2953 (eval $ac_try) 2>&5
2954 ac_status=$?
2955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2956 (exit $ac_status); }; }; then
2957 ac_header_compiler=yes
2958else
2959 echo "$as_me: failed program was:" >&5
2960cat conftest.$ac_ext >&5
2961ac_header_compiler=no
2962fi
2963rm -f conftest.$ac_objext conftest.$ac_ext
2964echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2965echo "${ECHO_T}$ac_header_compiler" >&6
2966
2967# Is the header present?
2968echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2969echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2970cat >conftest.$ac_ext <<_ACEOF
2971#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002972#include "confdefs.h"
2973#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002974_ACEOF
2975if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2976 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2977 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002978 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002979 rm -f conftest.er1
2980 cat conftest.err >&5
2981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2982 (exit $ac_status); } >/dev/null; then
2983 if test -s conftest.err; then
2984 ac_cpp_err=$ac_c_preproc_warn_flag
2985 else
2986 ac_cpp_err=
2987 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002988else
Martin v. Löwis11437992002-04-12 09:54:03 +00002989 ac_cpp_err=yes
2990fi
2991if test -z "$ac_cpp_err"; then
2992 ac_header_preproc=yes
2993else
2994 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002995 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002996 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002997fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002998rm -f conftest.err conftest.$ac_ext
2999echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3000echo "${ECHO_T}$ac_header_preproc" >&6
3001
3002# So? What about this header?
3003case $ac_header_compiler:$ac_header_preproc in
3004 yes:no )
3005 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
3006echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3007 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
3008echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
3009 no:yes )
3010 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
3011echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
3012 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
3013echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
3014 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
3015echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
3016esac
3017echo "$as_me:$LINENO: checking for minix/config.h" >&5
3018echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3019if test "${ac_cv_header_minix_config_h+set}" = set; then
3020 echo $ECHO_N "(cached) $ECHO_C" >&6
3021else
3022 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003023fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003024echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3025echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3026
3027fi
3028if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003029 MINIX=yes
3030else
Martin v. Löwis11437992002-04-12 09:54:03 +00003031 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003032fi
3033
Martin v. Löwis11437992002-04-12 09:54:03 +00003034
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003035if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003036
3037cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003038#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003039_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003040
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_1_SOURCE 2
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 _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003049_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003050
3051fi
3052
3053
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003054# Check for unsupported systems
3055case $ac_sys_system/$ac_sys_release in
3056SunOS/4*|DYNIX/*|dgux*/*|IRIX/4*|Linux*/1*)
3057 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3058 echo See README for details.
3059 exit 1;;
3060esac
3061
3062if test "$MINIX" = yes; then
3063 echo This system \(MINIX\) is no longer supported.
3064 echo Read README for details.
3065 exit 1
3066fi
3067
Michael W. Hudson54241132001-12-07 15:38:26 +00003068
Martin v. Löwis11437992002-04-12 09:54:03 +00003069echo "$as_me:$LINENO: checking for --with-suffix" >&5
3070echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003071
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003072# Check whether --with-suffix or --without-suffix was given.
3073if test "${with_suffix+set}" = set; then
3074 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003075
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003076 case $withval in
3077 no) EXEEXT=;;
3078 yes) EXEEXT=.exe;;
3079 *) EXEEXT=$withval;;
3080 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003081fi;
3082echo "$as_me:$LINENO: result: $EXEEXT" >&5
3083echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003084
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003085# Test whether we're running on a non-case-sensitive system, in which
3086# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003087
Martin v. Löwis11437992002-04-12 09:54:03 +00003088echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3089echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003090if test ! -d CaseSensitiveTestDir; then
3091mkdir CaseSensitiveTestDir
3092fi
3093
3094if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003095then
Martin v. Löwis11437992002-04-12 09:54:03 +00003096 echo "$as_me:$LINENO: result: yes" >&5
3097echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003098 BUILDEXEEXT=.exe
3099else
Martin v. Löwis11437992002-04-12 09:54:03 +00003100 echo "$as_me:$LINENO: result: no" >&5
3101echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003102 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003103fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003104rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003105
Guido van Rossumdd997f71998-10-07 19:58:26 +00003106case $MACHDEP in
3107bsdos*)
3108 case $CC in
3109 gcc) CC="$CC -D_HAVE_BSDI";;
3110 esac;;
3111esac
3112
Guido van Rossum24b1e751997-08-21 02:29:16 +00003113case $ac_sys_system in
3114hp*|HP*)
3115 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003116 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003117 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003118Monterey*)
3119 case $CC in
3120 cc) CC="$CC -Wl,-Bexport";;
3121 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003122SunOS*)
3123 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003124
3125cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003126#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003127_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003128
3129 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003130esac
3131
Michael W. Hudson54241132001-12-07 15:38:26 +00003132
3133
Martin v. Löwis11437992002-04-12 09:54:03 +00003134echo "$as_me:$LINENO: checking LIBRARY" >&5
3135echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003136if test -z "$LIBRARY"
3137then
3138 LIBRARY='libpython$(VERSION).a'
3139fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003140echo "$as_me:$LINENO: result: $LIBRARY" >&5
3141echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003142
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003143# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003144# name of the library into which to insert object files). BLDLIBRARY is also
3145# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3146# is blank as the main program is not linked directly against LDLIBRARY.
3147# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3148# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3149# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3150# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003151#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003152# RUNSHARED is used to run shared python without installed libraries
3153#
3154# INSTSONAME is the name of the shared library that will be use to install
3155# on the system - some systems like version suffix, others don't
3156
3157
Michael W. Hudson54241132001-12-07 15:38:26 +00003158
3159
3160
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003161
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003162LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003163BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003164INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003165DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003166LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003167RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003168
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003169# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003170# If CXX is set, and if it is needed to link a main function that was
3171# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3172# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003173# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003174# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003175
Martin v. Löwis11437992002-04-12 09:54:03 +00003176echo "$as_me:$LINENO: checking LINKCC" >&5
3177echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003178if test -z "$LINKCC"
3179then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003180 if test -z "$CXX"; then
3181 LINKCC="\$(PURIFY) \$(CC)"
3182 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003183 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003184 $CXX -c conftest.$ac_ext 2>&5
3185 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3186 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3187 then
3188 LINKCC="\$(PURIFY) \$(CC)"
3189 else
3190 LINKCC="\$(PURIFY) \$(CXX)"
3191 fi
3192 rm -fr conftest*
3193 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003194 case $ac_sys_system in
3195 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003196 exp_extra="\"\""
3197 if test $ac_sys_release -ge 5 -o \
3198 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3199 exp_extra="."
3200 fi
3201 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003202 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003203 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003204 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003205 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003206 esac
3207fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003208echo "$as_me:$LINENO: result: $LINKCC" >&5
3209echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003210
Martin v. Löwis11437992002-04-12 09:54:03 +00003211echo "$as_me:$LINENO: checking for --enable-shared" >&5
3212echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003213# Check whether --enable-shared or --disable-shared was given.
3214if test "${enable_shared+set}" = set; then
3215 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003216
Martin v. Löwis11437992002-04-12 09:54:03 +00003217fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003218
3219if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003220then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003221 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003222 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003223 enable_shared="yes";;
3224 *)
3225 enable_shared="no";;
3226 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003227fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003228echo "$as_me:$LINENO: result: $enable_shared" >&5
3229echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003230
3231
Martin v. Löwis11437992002-04-12 09:54:03 +00003232echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3233echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003234
Guido van Rossumb8552162001-09-05 14:58:11 +00003235# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3236# library that we build, but we do not want to link against it (we
3237# will find it with a -framework option). For this reason there is an
3238# extra variable BLDLIBRARY against which Python and the extension
3239# modules are linked, BLDLIBRARY. This is normally the same as
3240# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003241if test "$enable_framework"
3242then
3243 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3244 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3245 BLDLIBRARY=''
3246else
3247 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003248fi
Jack Jansene578a632001-08-15 01:27:14 +00003249
Martin v. Löwis1142de32002-03-29 16:28:31 +00003250# Other platforms follow
3251if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003252
3253cat >>confdefs.h <<\_ACEOF
3254#define Py_ENABLE_SHARED 1
3255_ACEOF
3256
Martin v. Löwis1142de32002-03-29 16:28:31 +00003257 case $ac_sys_system in
3258 BeOS*)
3259 LDLIBRARY='libpython$(VERSION).so'
3260 ;;
3261 CYGWIN*)
3262 LDLIBRARY='libpython$(VERSION).dll.a'
3263 DLLLIBRARY='libpython$(VERSION).dll'
3264 ;;
3265 SunOS*)
3266 LDLIBRARY='libpython$(VERSION).so'
3267 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3268 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3269 ;;
Martin v. Löwis1bc894b2002-07-30 20:19:58 +00003270 Linux*|GNU*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003271 LDLIBRARY='libpython$(VERSION).so'
3272 BLDLIBRARY='-L. -lpython$(VERSION)'
3273 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3274 INSTSONAME="$LDLIBRARY".$SOVERSION
3275 ;;
3276 hp*|HP*)
3277 LDLIBRARY='libpython$(VERSION).sl'
3278 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3279 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3280 ;;
3281 OSF*)
3282 LDLIBRARY='libpython$(VERSION).so'
3283 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3284 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3285 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003286 atheos*)
3287 LDLIBRARY='libpython$(VERSION).so'
3288 BLDLIBRARY='-L. -lpython$(VERSION)'
3289 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3290 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003291 esac
3292 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3293 case $MACHDEP in
3294 dguxR4)
3295 LDLIBRARY='libpython$(VERSION).so'
Skip Montanarodecc6a42003-01-01 20:07:49 +00003296 BASECFLAGS="$BASECFLAGS -pic"
Martin v. Löwis1142de32002-03-29 16:28:31 +00003297 ;;
3298 esac
3299fi
3300
Martin v. Löwis11437992002-04-12 09:54:03 +00003301echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3302echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003303
Martin v. Löwis11437992002-04-12 09:54:03 +00003304if test -n "$ac_tool_prefix"; then
3305 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3306set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3307echo "$as_me:$LINENO: checking for $ac_word" >&5
3308echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3309if test "${ac_cv_prog_RANLIB+set}" = set; then
3310 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003311else
3312 if test -n "$RANLIB"; then
3313 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3314else
Martin v. Löwis11437992002-04-12 09:54:03 +00003315as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3316for as_dir in $PATH
3317do
3318 IFS=$as_save_IFS
3319 test -z "$as_dir" && as_dir=.
3320 for ac_exec_ext in '' $ac_executable_extensions; do
3321 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3322 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3323 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3324 break 2
3325 fi
3326done
3327done
3328
Guido van Rossum627b2d71993-12-24 10:39:16 +00003329fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003330fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003331RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003332if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003333 echo "$as_me:$LINENO: result: $RANLIB" >&5
3334echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003335else
Martin v. Löwis11437992002-04-12 09:54:03 +00003336 echo "$as_me:$LINENO: result: no" >&5
3337echo "${ECHO_T}no" >&6
3338fi
3339
3340fi
3341if test -z "$ac_cv_prog_RANLIB"; then
3342 ac_ct_RANLIB=$RANLIB
3343 # Extract the first word of "ranlib", so it can be a program name with args.
3344set dummy ranlib; ac_word=$2
3345echo "$as_me:$LINENO: checking for $ac_word" >&5
3346echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3347if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3348 echo $ECHO_N "(cached) $ECHO_C" >&6
3349else
3350 if test -n "$ac_ct_RANLIB"; then
3351 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3352else
3353as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3354for as_dir in $PATH
3355do
3356 IFS=$as_save_IFS
3357 test -z "$as_dir" && as_dir=.
3358 for ac_exec_ext in '' $ac_executable_extensions; do
3359 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3360 ac_cv_prog_ac_ct_RANLIB="ranlib"
3361 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3362 break 2
3363 fi
3364done
3365done
3366
3367 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3368fi
3369fi
3370ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3371if test -n "$ac_ct_RANLIB"; then
3372 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3373echo "${ECHO_T}$ac_ct_RANLIB" >&6
3374else
3375 echo "$as_me:$LINENO: result: no" >&5
3376echo "${ECHO_T}no" >&6
3377fi
3378
3379 RANLIB=$ac_ct_RANLIB
3380else
3381 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003382fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003383
3384
Guido van Rossum7f43da71994-08-01 12:15:30 +00003385for ac_prog in ar aal
3386do
Martin v. Löwis11437992002-04-12 09:54:03 +00003387 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003388set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003389echo "$as_me:$LINENO: checking for $ac_word" >&5
3390echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3391if test "${ac_cv_prog_AR+set}" = set; then
3392 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003393else
3394 if test -n "$AR"; then
3395 ac_cv_prog_AR="$AR" # Let the user override the test.
3396else
Martin v. Löwis11437992002-04-12 09:54:03 +00003397as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3398for as_dir in $PATH
3399do
3400 IFS=$as_save_IFS
3401 test -z "$as_dir" && as_dir=.
3402 for ac_exec_ext in '' $ac_executable_extensions; do
3403 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3404 ac_cv_prog_AR="$ac_prog"
3405 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3406 break 2
3407 fi
3408done
3409done
3410
Guido van Rossum7f43da71994-08-01 12:15:30 +00003411fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003412fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003413AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003414if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003415 echo "$as_me:$LINENO: result: $AR" >&5
3416echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003417else
Martin v. Löwis11437992002-04-12 09:54:03 +00003418 echo "$as_me:$LINENO: result: no" >&5
3419echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003420fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003421
Martin v. Löwis11437992002-04-12 09:54:03 +00003422 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003423done
3424test -n "$AR" || AR="ar"
3425
Michael W. Hudson54241132001-12-07 15:38:26 +00003426
Neil Schemenauera42c8272001-03-31 00:01:55 +00003427case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003428bsdos*|hp*|HP*)
3429 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003430 if test -z "$INSTALL"
3431 then
3432 INSTALL="${srcdir}/install-sh -c"
3433 fi
3434esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003435ac_aux_dir=
3436for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3437 if test -f $ac_dir/install-sh; then
3438 ac_aux_dir=$ac_dir
3439 ac_install_sh="$ac_aux_dir/install-sh -c"
3440 break
3441 elif test -f $ac_dir/install.sh; then
3442 ac_aux_dir=$ac_dir
3443 ac_install_sh="$ac_aux_dir/install.sh -c"
3444 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003445 elif test -f $ac_dir/shtool; then
3446 ac_aux_dir=$ac_dir
3447 ac_install_sh="$ac_aux_dir/shtool install -c"
3448 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003449 fi
3450done
3451if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003452 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3453echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3454 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003455fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003456ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3457ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3458ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003459
3460# Find a good install program. We prefer a C program (faster),
3461# so one script is as good as another. But avoid the broken or
3462# incompatible versions:
3463# SysV /etc/install, /usr/sbin/install
3464# SunOS /usr/etc/install
3465# IRIX /sbin/install
3466# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003467# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003468# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3469# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3470# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3471# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003472echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3473echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003474if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003475if test "${ac_cv_path_install+set}" = set; then
3476 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003477else
Martin v. Löwis11437992002-04-12 09:54:03 +00003478 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3479for as_dir in $PATH
3480do
3481 IFS=$as_save_IFS
3482 test -z "$as_dir" && as_dir=.
3483 # Account for people who put trailing slashes in PATH elements.
3484case $as_dir/ in
3485 ./ | .// | /cC/* | \
3486 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3487 /usr/ucb/* ) ;;
3488 *)
3489 # OSF1 and SCO ODT 3.0 have their own names for install.
3490 # Don't use installbsd from OSF since it installs stuff as root
3491 # by default.
3492 for ac_prog in ginstall scoinst install; do
3493 for ac_exec_ext in '' $ac_executable_extensions; do
3494 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3495 if test $ac_prog = install &&
3496 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3497 # AIX install. It has an incompatible calling convention.
3498 :
3499 elif test $ac_prog = install &&
3500 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3501 # program-specific install script used by HP pwplus--don't use.
3502 :
3503 else
3504 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3505 break 3
3506 fi
3507 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003508 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003509 done
3510 ;;
3511esac
3512done
3513
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003514
3515fi
3516 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003517 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003518 else
3519 # As a last resort, use the slow shell script. We don't cache a
3520 # path for INSTALL within a source directory, because that will
3521 # break other packages using the cache if that directory is
3522 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003523 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003524 fi
3525fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003526echo "$as_me:$LINENO: result: $INSTALL" >&5
3527echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003528
3529# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3530# It thinks the first close brace ends the variable substitution.
3531test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3532
Martin v. Löwis11437992002-04-12 09:54:03 +00003533test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003534
3535test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3536
Michael W. Hudson54241132001-12-07 15:38:26 +00003537
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003538# Not every filesystem supports hard links
3539
3540if test -z "$LN" ; then
3541 case $ac_sys_system in
3542 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003543 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003544 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003545 *) LN=ln;;
3546 esac
3547fi
3548
Fred Drake109d9862001-07-11 06:27:56 +00003549# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003550echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3551echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3552
Fred Drake109d9862001-07-11 06:27:56 +00003553# Check whether --with-pydebug or --without-pydebug was given.
3554if test "${with_pydebug+set}" = set; then
3555 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003556
Fred Drake109d9862001-07-11 06:27:56 +00003557if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003558then
3559
3560cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003561#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003562_ACEOF
3563
3564 echo "$as_me:$LINENO: result: yes" >&5
3565echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003566 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003567else echo "$as_me:$LINENO: result: no" >&5
3568echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003569fi
3570else
Martin v. Löwis11437992002-04-12 09:54:03 +00003571 echo "$as_me:$LINENO: result: no" >&5
3572echo "${ECHO_T}no" >&6
3573fi;
Fred Drake109d9862001-07-11 06:27:56 +00003574
Skip Montanarodecc6a42003-01-01 20:07:49 +00003575# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3576# merged with this chunk of code?
3577
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003578# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003579# ------------------------
3580# (The following bit of code is complicated enough - please keep things
3581# indented properly. Just pretend you're editing Python code. ;-)
3582
3583# There are two parallel sets of case statements below, one that checks to
3584# see if OPT was set and one that does BASECFLAGS setting based upon
3585# compiler and platform. BASECFLAGS tweaks need to be made even if the
3586# user set OPT.
3587
3588# tweak OPT based on compiler and platform, only if the user didn't set
3589# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003590
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003591if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003592then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003593 case $GCC in
3594 yes)
3595 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003596 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003597 if test "$Py_DEBUG" = 'true' ; then
3598 # Optimization messes up debuggers, so turn it off for
3599 # debug builds.
3600 OPT="-g -Wall -Wstrict-prototypes"
3601 else
3602 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003603 fi
3604 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003605 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003606 OPT="-O3 -Wall -Wstrict-prototypes"
3607 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003608 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003609 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003610 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3611 ;;
3612 esac
Fred Drake109d9862001-07-11 06:27:56 +00003613 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003614
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003615 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003616 OPT="-O"
3617 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003618 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003619
3620 # The current (beta) Monterey compiler dies with optimizations
3621 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003622 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003623 Monterey*)
3624 OPT=""
3625 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003626 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003627
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003628fi
3629
Skip Montanarodecc6a42003-01-01 20:07:49 +00003630
3631# tweak BASECFLAGS based on compiler and platform
3632case $GCC in
3633yes)
3634 case $ac_sys_system in
3635 SCO_SV*)
3636 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3637 ;;
3638 # is there any other compiler on Darwin besides gcc?
3639 Darwin*)
3640 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp"
3641 ;;
3642 esac
3643 ;;
3644
3645*)
3646 case $ac_sys_system in
3647 OpenUNIX*|UnixWare*)
3648 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3649 ;;
3650 SCO_SV*)
3651 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3652 ;;
3653 esac
3654 ;;
3655esac
3656
Fred Drakee1ceaa02001-12-04 20:55:47 +00003657if test "$Py_DEBUG" = 'true'; then
3658 :
3659else
3660 OPT="-DNDEBUG $OPT"
3661fi
3662
Guido van Rossum563e7081996-09-10 18:20:48 +00003663if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003664then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003665 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003666fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003667
Martin v. Löwis11437992002-04-12 09:54:03 +00003668echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3669echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3670if test "${ac_cv_opt_olimit_ok+set}" = set; then
3671 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003672else
3673 ac_save_cc="$CC"
3674CC="$CC -OPT:Olimit=0"
3675if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003676 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003677else
Martin v. Löwis11437992002-04-12 09:54:03 +00003678 cat >conftest.$ac_ext <<_ACEOF
3679#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003680#include "confdefs.h"
3681int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003682_ACEOF
3683rm -f conftest$ac_exeext
3684if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3685 (eval $ac_link) 2>&5
3686 ac_status=$?
3687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3688 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3689 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3690 (eval $ac_try) 2>&5
3691 ac_status=$?
3692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3693 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003694 ac_cv_opt_olimit_ok=yes
3695else
Martin v. Löwis11437992002-04-12 09:54:03 +00003696 echo "$as_me: program exited with status $ac_status" >&5
3697echo "$as_me: failed program was:" >&5
3698cat conftest.$ac_ext >&5
3699( exit $ac_status )
3700ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003701fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003702rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003703fi
Guido van Rossum91922671997-10-09 20:24:13 +00003704CC="$ac_save_cc"
3705fi
3706
Martin v. Löwis11437992002-04-12 09:54:03 +00003707echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3708echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003709if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003710 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003711 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3712 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3713 # environment?
3714 Darwin*)
3715 ;;
3716 *)
3717 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3718 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003719 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003720else
Martin v. Löwis11437992002-04-12 09:54:03 +00003721 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3722echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3723 if test "${ac_cv_olimit_ok+set}" = set; then
3724 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003725else
3726 ac_save_cc="$CC"
3727 CC="$CC -Olimit 1500"
3728 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003729 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003730else
Martin v. Löwis11437992002-04-12 09:54:03 +00003731 cat >conftest.$ac_ext <<_ACEOF
3732#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003733#include "confdefs.h"
3734int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003735_ACEOF
3736rm -f conftest$ac_exeext
3737if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3738 (eval $ac_link) 2>&5
3739 ac_status=$?
3740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3741 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3743 (eval $ac_try) 2>&5
3744 ac_status=$?
3745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3746 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003747 ac_cv_olimit_ok=yes
3748else
Martin v. Löwis11437992002-04-12 09:54:03 +00003749 echo "$as_me: program exited with status $ac_status" >&5
3750echo "$as_me: failed program was:" >&5
3751cat conftest.$ac_ext >&5
3752( exit $ac_status )
3753ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003754fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003755rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003756fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003757 CC="$ac_save_cc"
3758fi
3759
Martin v. Löwis11437992002-04-12 09:54:03 +00003760 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3761echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003762 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003763 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003764 fi
3765fi
3766
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003767# On some compilers, pthreads are available without further options
3768# (e.g. MacOS X). On some of these systems, the compiler will not
3769# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3770# So we have to see first whether pthreads are available without
3771# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003772echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3773echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3774if test "${ac_cv_pthread_is_default+set}" = set; then
3775 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003776else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003777 if test "$cross_compiling" = yes; then
3778 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003779else
Martin v. Löwis11437992002-04-12 09:54:03 +00003780 cat >conftest.$ac_ext <<_ACEOF
3781#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003782#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003783
Martin v. Löwis130fb172001-07-19 11:00:41 +00003784#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003785
3786void* routine(void* p){return NULL;}
3787
3788int main(){
3789 pthread_t p;
3790 if(pthread_create(&p,NULL,routine,NULL)!=0)
3791 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003792 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003793 return 0;
3794}
3795
Martin v. Löwis11437992002-04-12 09:54:03 +00003796_ACEOF
3797rm -f conftest$ac_exeext
3798if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3799 (eval $ac_link) 2>&5
3800 ac_status=$?
3801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3802 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3803 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3804 (eval $ac_try) 2>&5
3805 ac_status=$?
3806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3807 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003808 ac_cv_pthread_is_default=yes
3809else
Martin v. Löwis11437992002-04-12 09:54:03 +00003810 echo "$as_me: program exited with status $ac_status" >&5
3811echo "$as_me: failed program was:" >&5
3812cat conftest.$ac_ext >&5
3813( exit $ac_status )
3814ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003815fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003816rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003817fi
3818
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003819fi
3820
Martin v. Löwis11437992002-04-12 09:54:03 +00003821echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3822echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003823
Michael W. Hudson54241132001-12-07 15:38:26 +00003824
Martin v. Löwis11437992002-04-12 09:54:03 +00003825if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003826then
3827 ac_cv_kpthread=no
3828else
3829# -Kpthread, if available, provides the right #defines
3830# and linker options to make pthread_create available
3831# Some compilers won't report that they do not support -Kpthread,
3832# so we need to run a program to see whether it really made the
3833# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003834echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3835echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3836if test "${ac_cv_kpthread+set}" = set; then
3837 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003838else
3839 ac_save_cc="$CC"
3840CC="$CC -Kpthread"
3841if test "$cross_compiling" = yes; then
3842 ac_cv_kpthread=no
3843else
Martin v. Löwis11437992002-04-12 09:54:03 +00003844 cat >conftest.$ac_ext <<_ACEOF
3845#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003846#include "confdefs.h"
3847
3848#include <pthread.h>
3849
3850void* routine(void* p){return NULL;}
3851
3852int main(){
3853 pthread_t p;
3854 if(pthread_create(&p,NULL,routine,NULL)!=0)
3855 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003856 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003857 return 0;
3858}
3859
Martin v. Löwis11437992002-04-12 09:54:03 +00003860_ACEOF
3861rm -f conftest$ac_exeext
3862if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3863 (eval $ac_link) 2>&5
3864 ac_status=$?
3865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3866 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3867 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3868 (eval $ac_try) 2>&5
3869 ac_status=$?
3870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3871 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003872 ac_cv_kpthread=yes
3873else
Martin v. Löwis11437992002-04-12 09:54:03 +00003874 echo "$as_me: program exited with status $ac_status" >&5
3875echo "$as_me: failed program was:" >&5
3876cat conftest.$ac_ext >&5
3877( exit $ac_status )
3878ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003879fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003880rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003881fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003882CC="$ac_save_cc"
3883fi
3884
Martin v. Löwis11437992002-04-12 09:54:03 +00003885echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3886echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003887fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003888
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003889if test $ac_cv_kpthread = no
3890then
3891# -Kthread, if available, provides the right #defines
3892# and linker options to make pthread_create available
3893# Some compilers won't report that they do not support -Kthread,
3894# so we need to run a program to see whether it really made the
3895# function available.
3896echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
3897echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
3898if test "${ac_cv_kthread+set}" = set; then
3899 echo $ECHO_N "(cached) $ECHO_C" >&6
3900else
3901 ac_save_cc="$CC"
3902CC="$CC -Kthread"
3903if test "$cross_compiling" = yes; then
3904 ac_cv_kthread=no
3905else
3906 cat >conftest.$ac_ext <<_ACEOF
3907#line $LINENO "configure"
3908#include "confdefs.h"
3909
3910#include <pthread.h>
3911
3912void* routine(void* p){return NULL;}
3913
3914int main(){
3915 pthread_t p;
3916 if(pthread_create(&p,NULL,routine,NULL)!=0)
3917 return 1;
3918 (void)pthread_detach(p);
3919 return 0;
3920}
3921
3922_ACEOF
3923rm -f conftest$ac_exeext
3924if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3925 (eval $ac_link) 2>&5
3926 ac_status=$?
3927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3928 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3930 (eval $ac_try) 2>&5
3931 ac_status=$?
3932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3933 (exit $ac_status); }; }; then
3934 ac_cv_kthread=yes
3935else
3936 echo "$as_me: program exited with status $ac_status" >&5
3937echo "$as_me: failed program was:" >&5
3938cat conftest.$ac_ext >&5
3939( exit $ac_status )
3940ac_cv_kthread=no
3941fi
3942rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3943fi
3944CC="$ac_save_cc"
3945fi
3946
3947echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
3948echo "${ECHO_T}$ac_cv_kthread" >&6
3949fi
3950
Michael W. Hudson54241132001-12-07 15:38:26 +00003951
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003952# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003953echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3954echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3955if test "${ac_cv_header_stdc+set}" = set; then
3956 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003957else
Martin v. Löwis11437992002-04-12 09:54:03 +00003958 cat >conftest.$ac_ext <<_ACEOF
3959#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003960#include "confdefs.h"
3961#include <stdlib.h>
3962#include <stdarg.h>
3963#include <string.h>
3964#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003965
3966_ACEOF
3967if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3968 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3969 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00003970 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003971 rm -f conftest.er1
3972 cat conftest.err >&5
3973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3974 (exit $ac_status); } >/dev/null; then
3975 if test -s conftest.err; then
3976 ac_cpp_err=$ac_c_preproc_warn_flag
3977 else
3978 ac_cpp_err=
3979 fi
3980else
3981 ac_cpp_err=yes
3982fi
3983if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003984 ac_cv_header_stdc=yes
3985else
Martin v. Löwis11437992002-04-12 09:54:03 +00003986 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003987 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003988 ac_cv_header_stdc=no
3989fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003990rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003991
3992if test $ac_cv_header_stdc = yes; then
3993 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003994 cat >conftest.$ac_ext <<_ACEOF
3995#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003996#include "confdefs.h"
3997#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003998
3999_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004000if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00004001 egrep "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004002 :
4003else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004004 ac_cv_header_stdc=no
4005fi
4006rm -f conftest*
4007
4008fi
4009
4010if test $ac_cv_header_stdc = yes; then
4011 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004012 cat >conftest.$ac_ext <<_ACEOF
4013#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004014#include "confdefs.h"
4015#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004016
4017_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004018if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00004019 egrep "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004020 :
4021else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004022 ac_cv_header_stdc=no
4023fi
4024rm -f conftest*
4025
4026fi
4027
4028if test $ac_cv_header_stdc = yes; then
4029 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004030 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004031 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004032else
Martin v. Löwis11437992002-04-12 09:54:03 +00004033 cat >conftest.$ac_ext <<_ACEOF
4034#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004035#include "confdefs.h"
4036#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004037#if ((' ' & 0x0FF) == 0x020)
4038# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4039# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4040#else
4041# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4042 || ('j' <= (c) && (c) <= 'r') \
4043 || ('s' <= (c) && (c) <= 'z'))
4044# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4045#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004046
Martin v. Löwis11437992002-04-12 09:54:03 +00004047#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4048int
4049main ()
4050{
4051 int i;
4052 for (i = 0; i < 256; i++)
4053 if (XOR (islower (i), ISLOWER (i))
4054 || toupper (i) != TOUPPER (i))
4055 exit(2);
4056 exit (0);
4057}
4058_ACEOF
4059rm -f conftest$ac_exeext
4060if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4061 (eval $ac_link) 2>&5
4062 ac_status=$?
4063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4064 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4065 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4066 (eval $ac_try) 2>&5
4067 ac_status=$?
4068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4069 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004070 :
4071else
Martin v. Löwis11437992002-04-12 09:54:03 +00004072 echo "$as_me: program exited with status $ac_status" >&5
4073echo "$as_me: failed program was:" >&5
4074cat conftest.$ac_ext >&5
4075( exit $ac_status )
4076ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004077fi
Barry Warsawfe33b792003-01-07 22:42:49 +00004078rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004079fi
4080fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004081fi
4082echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4083echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004084if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004085
4086cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004087#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004088_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004089
4090fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004091
Martin v. Löwis11437992002-04-12 09:54:03 +00004092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004129
Barry Warsawfe33b792003-01-07 22:42:49 +00004130
Martin v. Löwis11437992002-04-12 09:54:03 +00004131for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004132libintl.h locale.h ncurses.h poll.h pthread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004133signal.h stdarg.h stddef.h stdlib.h stropts.h termios.h thread.h \
4134unistd.h utime.h \
Skip Montanaro57454e52002-06-14 20:30:31 +00004135sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004136sys/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 +00004137sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Barry Warsawfe33b792003-01-07 22:42:49 +00004138sys/resource.h netpacket/packet.h sysexits.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004139do
Martin v. Löwis11437992002-04-12 09:54:03 +00004140as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4141if eval "test \"\${$as_ac_Header+set}\" = set"; then
4142 echo "$as_me:$LINENO: checking for $ac_header" >&5
4143echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4144if eval "test \"\${$as_ac_Header+set}\" = set"; then
4145 echo $ECHO_N "(cached) $ECHO_C" >&6
4146fi
4147echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4148echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004149else
Martin v. Löwis11437992002-04-12 09:54:03 +00004150 # Is the header compilable?
4151echo "$as_me:$LINENO: checking $ac_header usability" >&5
4152echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4153cat >conftest.$ac_ext <<_ACEOF
4154#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004155#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004156$ac_includes_default
4157#include <$ac_header>
4158_ACEOF
4159rm -f conftest.$ac_objext
4160if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4161 (eval $ac_compile) 2>&5
4162 ac_status=$?
4163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4164 (exit $ac_status); } &&
4165 { ac_try='test -s conftest.$ac_objext'
4166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4167 (eval $ac_try) 2>&5
4168 ac_status=$?
4169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4170 (exit $ac_status); }; }; then
4171 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004172else
Martin v. Löwis11437992002-04-12 09:54:03 +00004173 echo "$as_me: failed program was:" >&5
4174cat conftest.$ac_ext >&5
4175ac_header_compiler=no
4176fi
4177rm -f conftest.$ac_objext conftest.$ac_ext
4178echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4179echo "${ECHO_T}$ac_header_compiler" >&6
4180
4181# Is the header present?
4182echo "$as_me:$LINENO: checking $ac_header presence" >&5
4183echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4184cat >conftest.$ac_ext <<_ACEOF
4185#line $LINENO "configure"
4186#include "confdefs.h"
4187#include <$ac_header>
4188_ACEOF
4189if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4190 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4191 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004192 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004193 rm -f conftest.er1
4194 cat conftest.err >&5
4195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4196 (exit $ac_status); } >/dev/null; then
4197 if test -s conftest.err; then
4198 ac_cpp_err=$ac_c_preproc_warn_flag
4199 else
4200 ac_cpp_err=
4201 fi
4202else
4203 ac_cpp_err=yes
4204fi
4205if test -z "$ac_cpp_err"; then
4206 ac_header_preproc=yes
4207else
4208 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004209 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004210 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004211fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004212rm -f conftest.err conftest.$ac_ext
4213echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4214echo "${ECHO_T}$ac_header_preproc" >&6
4215
4216# So? What about this header?
4217case $ac_header_compiler:$ac_header_preproc in
4218 yes:no )
4219 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4220echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4221 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4222echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4223 no:yes )
4224 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4225echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4226 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4227echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4228 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4229echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4230esac
4231echo "$as_me:$LINENO: checking for $ac_header" >&5
4232echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4233if eval "test \"\${$as_ac_Header+set}\" = set"; then
4234 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004235else
Martin v. Löwis11437992002-04-12 09:54:03 +00004236 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004237fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004238echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4239echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4240
4241fi
4242if test `eval echo '${'$as_ac_Header'}'` = yes; then
4243 cat >>confdefs.h <<_ACEOF
4244#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4245_ACEOF
4246
4247fi
4248
Guido van Rossum627b2d71993-12-24 10:39:16 +00004249done
4250
Martin v. Löwis11437992002-04-12 09:54:03 +00004251
4252
4253
4254
4255
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004256ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004257for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4258 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4259echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4260echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4261if eval "test \"\${$as_ac_Header+set}\" = set"; then
4262 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004263else
Martin v. Löwis11437992002-04-12 09:54:03 +00004264 cat >conftest.$ac_ext <<_ACEOF
4265#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004266#include "confdefs.h"
4267#include <sys/types.h>
4268#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004269
Barry Warsawfe33b792003-01-07 22:42:49 +00004270#ifdef F77_DUMMY_MAIN
4271# ifdef __cplusplus
4272 extern "C"
4273# endif
4274 int F77_DUMMY_MAIN() { return 1; }
4275#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004276int
4277main ()
4278{
4279if ((DIR *) 0)
4280return 0;
4281 ;
4282 return 0;
4283}
4284_ACEOF
4285rm -f conftest.$ac_objext
4286if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4287 (eval $ac_compile) 2>&5
4288 ac_status=$?
4289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4290 (exit $ac_status); } &&
4291 { ac_try='test -s conftest.$ac_objext'
4292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4293 (eval $ac_try) 2>&5
4294 ac_status=$?
4295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4296 (exit $ac_status); }; }; then
4297 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004298else
Martin v. Löwis11437992002-04-12 09:54:03 +00004299 echo "$as_me: failed program was:" >&5
4300cat conftest.$ac_ext >&5
4301eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004302fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004303rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004304fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004305echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4306echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4307if test `eval echo '${'$as_ac_Header'}'` = yes; then
4308 cat >>confdefs.h <<_ACEOF
4309#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4310_ACEOF
4311
4312ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004313fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004314
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004315done
4316# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4317if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004318 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4319echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4320if test "${ac_cv_search_opendir+set}" = set; then
4321 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004322else
Martin v. Löwis11437992002-04-12 09:54:03 +00004323 ac_func_search_save_LIBS=$LIBS
4324ac_cv_search_opendir=no
4325cat >conftest.$ac_ext <<_ACEOF
4326#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004327#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004328
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004329/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004330#ifdef __cplusplus
4331extern "C"
4332#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004333/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004334 builtin and then its argument prototype would still apply. */
4335char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004336#ifdef F77_DUMMY_MAIN
4337# ifdef __cplusplus
4338 extern "C"
4339# endif
4340 int F77_DUMMY_MAIN() { return 1; }
4341#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004342int
4343main ()
4344{
4345opendir ();
4346 ;
4347 return 0;
4348}
4349_ACEOF
4350rm -f conftest.$ac_objext conftest$ac_exeext
4351if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4352 (eval $ac_link) 2>&5
4353 ac_status=$?
4354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4355 (exit $ac_status); } &&
4356 { ac_try='test -s conftest$ac_exeext'
4357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4358 (eval $ac_try) 2>&5
4359 ac_status=$?
4360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4361 (exit $ac_status); }; }; then
4362 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004363else
Martin v. Löwis11437992002-04-12 09:54:03 +00004364 echo "$as_me: failed program was:" >&5
4365cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004366fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004367rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4368if test "$ac_cv_search_opendir" = no; then
4369 for ac_lib in dir; do
4370 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4371 cat >conftest.$ac_ext <<_ACEOF
4372#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004373#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004374
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004375/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004376#ifdef __cplusplus
4377extern "C"
4378#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004379/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004380 builtin and then its argument prototype would still apply. */
4381char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004382#ifdef F77_DUMMY_MAIN
4383# ifdef __cplusplus
4384 extern "C"
4385# endif
4386 int F77_DUMMY_MAIN() { return 1; }
4387#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004388int
4389main ()
4390{
4391opendir ();
4392 ;
4393 return 0;
4394}
4395_ACEOF
4396rm -f conftest.$ac_objext conftest$ac_exeext
4397if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4398 (eval $ac_link) 2>&5
4399 ac_status=$?
4400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4401 (exit $ac_status); } &&
4402 { ac_try='test -s conftest$ac_exeext'
4403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4404 (eval $ac_try) 2>&5
4405 ac_status=$?
4406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4407 (exit $ac_status); }; }; then
4408 ac_cv_search_opendir="-l$ac_lib"
4409break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004410else
Martin v. Löwis11437992002-04-12 09:54:03 +00004411 echo "$as_me: failed program was:" >&5
4412cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004413fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004414rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4415 done
4416fi
4417LIBS=$ac_func_search_save_LIBS
4418fi
4419echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4420echo "${ECHO_T}$ac_cv_search_opendir" >&6
4421if test "$ac_cv_search_opendir" != no; then
4422 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004423
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004424fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004425
Michael W. Hudson54241132001-12-07 15:38:26 +00004426else
Martin v. Löwis11437992002-04-12 09:54:03 +00004427 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4428echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4429if test "${ac_cv_search_opendir+set}" = set; then
4430 echo $ECHO_N "(cached) $ECHO_C" >&6
4431else
4432 ac_func_search_save_LIBS=$LIBS
4433ac_cv_search_opendir=no
4434cat >conftest.$ac_ext <<_ACEOF
4435#line $LINENO "configure"
4436#include "confdefs.h"
4437
4438/* Override any gcc2 internal prototype to avoid an error. */
4439#ifdef __cplusplus
4440extern "C"
4441#endif
4442/* We use char because int might match the return type of a gcc2
4443 builtin and then its argument prototype would still apply. */
4444char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004445#ifdef F77_DUMMY_MAIN
4446# ifdef __cplusplus
4447 extern "C"
4448# endif
4449 int F77_DUMMY_MAIN() { return 1; }
4450#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004451int
4452main ()
4453{
4454opendir ();
4455 ;
4456 return 0;
4457}
4458_ACEOF
4459rm -f conftest.$ac_objext conftest$ac_exeext
4460if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4461 (eval $ac_link) 2>&5
4462 ac_status=$?
4463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4464 (exit $ac_status); } &&
4465 { ac_try='test -s conftest$ac_exeext'
4466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4467 (eval $ac_try) 2>&5
4468 ac_status=$?
4469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4470 (exit $ac_status); }; }; then
4471 ac_cv_search_opendir="none required"
4472else
4473 echo "$as_me: failed program was:" >&5
4474cat conftest.$ac_ext >&5
4475fi
4476rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4477if test "$ac_cv_search_opendir" = no; then
4478 for ac_lib in x; do
4479 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4480 cat >conftest.$ac_ext <<_ACEOF
4481#line $LINENO "configure"
4482#include "confdefs.h"
4483
4484/* Override any gcc2 internal prototype to avoid an error. */
4485#ifdef __cplusplus
4486extern "C"
4487#endif
4488/* We use char because int might match the return type of a gcc2
4489 builtin and then its argument prototype would still apply. */
4490char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004491#ifdef F77_DUMMY_MAIN
4492# ifdef __cplusplus
4493 extern "C"
4494# endif
4495 int F77_DUMMY_MAIN() { return 1; }
4496#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004497int
4498main ()
4499{
4500opendir ();
4501 ;
4502 return 0;
4503}
4504_ACEOF
4505rm -f conftest.$ac_objext conftest$ac_exeext
4506if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4507 (eval $ac_link) 2>&5
4508 ac_status=$?
4509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4510 (exit $ac_status); } &&
4511 { ac_try='test -s conftest$ac_exeext'
4512 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4513 (eval $ac_try) 2>&5
4514 ac_status=$?
4515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4516 (exit $ac_status); }; }; then
4517 ac_cv_search_opendir="-l$ac_lib"
4518break
4519else
4520 echo "$as_me: failed program was:" >&5
4521cat conftest.$ac_ext >&5
4522fi
4523rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4524 done
4525fi
4526LIBS=$ac_func_search_save_LIBS
4527fi
4528echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4529echo "${ECHO_T}$ac_cv_search_opendir" >&6
4530if test "$ac_cv_search_opendir" != no; then
4531 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4532
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004533fi
4534
4535fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004536
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004537echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4538echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4539if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4540 echo $ECHO_N "(cached) $ECHO_C" >&6
4541else
4542 cat >conftest.$ac_ext <<_ACEOF
4543#line $LINENO "configure"
4544#include "confdefs.h"
4545#include <sys/types.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00004546#ifdef F77_DUMMY_MAIN
4547# ifdef __cplusplus
4548 extern "C"
4549# endif
4550 int F77_DUMMY_MAIN() { return 1; }
4551#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004552int
4553main ()
4554{
4555return makedev(0, 0);
4556 ;
4557 return 0;
4558}
4559_ACEOF
4560rm -f conftest.$ac_objext conftest$ac_exeext
4561if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4562 (eval $ac_link) 2>&5
4563 ac_status=$?
4564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4565 (exit $ac_status); } &&
4566 { ac_try='test -s conftest$ac_exeext'
4567 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4568 (eval $ac_try) 2>&5
4569 ac_status=$?
4570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4571 (exit $ac_status); }; }; then
4572 ac_cv_header_sys_types_h_makedev=yes
4573else
4574 echo "$as_me: failed program was:" >&5
4575cat conftest.$ac_ext >&5
4576ac_cv_header_sys_types_h_makedev=no
4577fi
4578rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4579
4580fi
4581echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4582echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4583
4584if test $ac_cv_header_sys_types_h_makedev = no; then
4585if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4586 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4587echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4588if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4589 echo $ECHO_N "(cached) $ECHO_C" >&6
4590fi
4591echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4592echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4593else
4594 # Is the header compilable?
4595echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4596echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4597cat >conftest.$ac_ext <<_ACEOF
4598#line $LINENO "configure"
4599#include "confdefs.h"
4600$ac_includes_default
4601#include <sys/mkdev.h>
4602_ACEOF
4603rm -f conftest.$ac_objext
4604if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4605 (eval $ac_compile) 2>&5
4606 ac_status=$?
4607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4608 (exit $ac_status); } &&
4609 { ac_try='test -s conftest.$ac_objext'
4610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4611 (eval $ac_try) 2>&5
4612 ac_status=$?
4613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4614 (exit $ac_status); }; }; then
4615 ac_header_compiler=yes
4616else
4617 echo "$as_me: failed program was:" >&5
4618cat conftest.$ac_ext >&5
4619ac_header_compiler=no
4620fi
4621rm -f conftest.$ac_objext conftest.$ac_ext
4622echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4623echo "${ECHO_T}$ac_header_compiler" >&6
4624
4625# Is the header present?
4626echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4627echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4628cat >conftest.$ac_ext <<_ACEOF
4629#line $LINENO "configure"
4630#include "confdefs.h"
4631#include <sys/mkdev.h>
4632_ACEOF
4633if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4634 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4635 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004636 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004637 rm -f conftest.er1
4638 cat conftest.err >&5
4639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4640 (exit $ac_status); } >/dev/null; then
4641 if test -s conftest.err; then
4642 ac_cpp_err=$ac_c_preproc_warn_flag
4643 else
4644 ac_cpp_err=
4645 fi
4646else
4647 ac_cpp_err=yes
4648fi
4649if test -z "$ac_cpp_err"; then
4650 ac_header_preproc=yes
4651else
4652 echo "$as_me: failed program was:" >&5
4653 cat conftest.$ac_ext >&5
4654 ac_header_preproc=no
4655fi
4656rm -f conftest.err conftest.$ac_ext
4657echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4658echo "${ECHO_T}$ac_header_preproc" >&6
4659
4660# So? What about this header?
4661case $ac_header_compiler:$ac_header_preproc in
4662 yes:no )
4663 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4664echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4665 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4666echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4667 no:yes )
4668 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4669echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4670 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4671echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4672 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4673echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4674esac
4675echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4676echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4677if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4678 echo $ECHO_N "(cached) $ECHO_C" >&6
4679else
4680 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4681fi
4682echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4683echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4684
4685fi
4686if test $ac_cv_header_sys_mkdev_h = yes; then
4687
4688cat >>confdefs.h <<\_ACEOF
4689#define MAJOR_IN_MKDEV 1
4690_ACEOF
4691
4692fi
4693
4694
4695
4696 if test $ac_cv_header_sys_mkdev_h = no; then
4697 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4698 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4699echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4700if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4701 echo $ECHO_N "(cached) $ECHO_C" >&6
4702fi
4703echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4704echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4705else
4706 # Is the header compilable?
4707echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4708echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4709cat >conftest.$ac_ext <<_ACEOF
4710#line $LINENO "configure"
4711#include "confdefs.h"
4712$ac_includes_default
4713#include <sys/sysmacros.h>
4714_ACEOF
4715rm -f conftest.$ac_objext
4716if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4717 (eval $ac_compile) 2>&5
4718 ac_status=$?
4719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4720 (exit $ac_status); } &&
4721 { ac_try='test -s conftest.$ac_objext'
4722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4723 (eval $ac_try) 2>&5
4724 ac_status=$?
4725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4726 (exit $ac_status); }; }; then
4727 ac_header_compiler=yes
4728else
4729 echo "$as_me: failed program was:" >&5
4730cat conftest.$ac_ext >&5
4731ac_header_compiler=no
4732fi
4733rm -f conftest.$ac_objext conftest.$ac_ext
4734echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4735echo "${ECHO_T}$ac_header_compiler" >&6
4736
4737# Is the header present?
4738echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
4739echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
4740cat >conftest.$ac_ext <<_ACEOF
4741#line $LINENO "configure"
4742#include "confdefs.h"
4743#include <sys/sysmacros.h>
4744_ACEOF
4745if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4746 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4747 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004748 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004749 rm -f conftest.er1
4750 cat conftest.err >&5
4751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4752 (exit $ac_status); } >/dev/null; then
4753 if test -s conftest.err; then
4754 ac_cpp_err=$ac_c_preproc_warn_flag
4755 else
4756 ac_cpp_err=
4757 fi
4758else
4759 ac_cpp_err=yes
4760fi
4761if test -z "$ac_cpp_err"; then
4762 ac_header_preproc=yes
4763else
4764 echo "$as_me: failed program was:" >&5
4765 cat conftest.$ac_ext >&5
4766 ac_header_preproc=no
4767fi
4768rm -f conftest.err conftest.$ac_ext
4769echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4770echo "${ECHO_T}$ac_header_preproc" >&6
4771
4772# So? What about this header?
4773case $ac_header_compiler:$ac_header_preproc in
4774 yes:no )
4775 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
4776echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4777 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4778echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4779 no:yes )
4780 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
4781echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
4782 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
4783echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
4784 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4785echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4786esac
4787echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4788echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4789if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4790 echo $ECHO_N "(cached) $ECHO_C" >&6
4791else
4792 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
4793fi
4794echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4795echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4796
4797fi
4798if test $ac_cv_header_sys_sysmacros_h = yes; then
4799
4800cat >>confdefs.h <<\_ACEOF
4801#define MAJOR_IN_SYSMACROS 1
4802_ACEOF
4803
4804fi
4805
4806
4807 fi
4808fi
4809
Michael W. Hudson54241132001-12-07 15:38:26 +00004810
Guido van Rossum627b2d71993-12-24 10:39:16 +00004811# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004812was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004813echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4814echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4815cat >conftest.$ac_ext <<_ACEOF
4816#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004817#include "confdefs.h"
4818#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004819
4820_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004821if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00004822 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004823 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004824else
Martin v. Löwis11437992002-04-12 09:54:03 +00004825
4826
4827cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004828#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004829_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004830
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004831
Guido van Rossum627b2d71993-12-24 10:39:16 +00004832fi
4833rm -f conftest*
4834
Martin v. Löwis11437992002-04-12 09:54:03 +00004835echo "$as_me:$LINENO: result: $was_it_defined" >&5
4836echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004837
Neal Norwitz11690112002-07-30 01:08:28 +00004838# Check whether using makedev requires defining _OSF_SOURCE
4839echo "$as_me:$LINENO: checking for makedev" >&5
4840echo $ECHO_N "checking for makedev... $ECHO_C" >&6
4841cat >conftest.$ac_ext <<_ACEOF
4842#line $LINENO "configure"
4843#include "confdefs.h"
Neal Norwitz6eb37f02003-02-23 23:28:15 +00004844#include <sys/types.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00004845#ifdef F77_DUMMY_MAIN
4846# ifdef __cplusplus
4847 extern "C"
4848# endif
4849 int F77_DUMMY_MAIN() { return 1; }
4850#endif
Neal Norwitz11690112002-07-30 01:08:28 +00004851int
4852main ()
4853{
4854 makedev(0, 0)
4855 ;
4856 return 0;
4857}
4858_ACEOF
4859rm -f conftest.$ac_objext conftest$ac_exeext
4860if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4861 (eval $ac_link) 2>&5
4862 ac_status=$?
4863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4864 (exit $ac_status); } &&
4865 { ac_try='test -s conftest$ac_exeext'
4866 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4867 (eval $ac_try) 2>&5
4868 ac_status=$?
4869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4870 (exit $ac_status); }; }; then
4871 ac_cv_has_makedev=yes
4872else
4873 echo "$as_me: failed program was:" >&5
4874cat conftest.$ac_ext >&5
4875ac_cv_has_makedev=no
4876fi
4877rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4878if test "$ac_cv_has_makedev" = "no"; then
4879 # we didn't link, try if _OSF_SOURCE will allow us to link
4880 cat >conftest.$ac_ext <<_ACEOF
4881#line $LINENO "configure"
4882#include "confdefs.h"
4883
Neal Norwitz6eb37f02003-02-23 23:28:15 +00004884#define _OSF_SOURCE 1
4885#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00004886
Barry Warsawfe33b792003-01-07 22:42:49 +00004887#ifdef F77_DUMMY_MAIN
4888# ifdef __cplusplus
4889 extern "C"
4890# endif
4891 int F77_DUMMY_MAIN() { return 1; }
4892#endif
Neal Norwitz11690112002-07-30 01:08:28 +00004893int
4894main ()
4895{
4896 makedev(0, 0)
4897 ;
4898 return 0;
4899}
4900_ACEOF
4901rm -f conftest.$ac_objext conftest$ac_exeext
4902if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4903 (eval $ac_link) 2>&5
4904 ac_status=$?
4905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4906 (exit $ac_status); } &&
4907 { ac_try='test -s conftest$ac_exeext'
4908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4909 (eval $ac_try) 2>&5
4910 ac_status=$?
4911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4912 (exit $ac_status); }; }; then
4913 ac_cv_has_makedev=yes
4914else
4915 echo "$as_me: failed program was:" >&5
4916cat conftest.$ac_ext >&5
4917ac_cv_has_makedev=no
4918fi
4919rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4920 if test "$ac_cv_has_makedev" = "yes"; then
4921
4922cat >>confdefs.h <<\_ACEOF
4923#define _OSF_SOURCE 1
4924_ACEOF
4925
4926 fi
4927fi
4928echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
4929echo "${ECHO_T}$ac_cv_has_makedev" >&6
4930if test "$ac_cv_has_makedev" = "yes"; then
4931
4932cat >>confdefs.h <<\_ACEOF
4933#define HAVE_MAKEDEV 1
4934_ACEOF
4935
4936fi
4937
Martin v. Löwis399a6892002-10-04 10:22:02 +00004938# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
4939# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
4940# defined, but the compiler does not support pragma redefine_extname,
4941# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
4942# structures (such as rlimit64) without declaring them. As a
4943# work-around, disable LFS on such configurations
4944
4945use_lfs=yes
4946echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
4947echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
4948cat >conftest.$ac_ext <<_ACEOF
4949#line $LINENO "configure"
4950#include "confdefs.h"
4951
4952#define _LARGEFILE_SOURCE 1
4953#define _FILE_OFFSET_BITS 64
4954#include <sys/resource.h>
4955
Barry Warsawfe33b792003-01-07 22:42:49 +00004956#ifdef F77_DUMMY_MAIN
4957# ifdef __cplusplus
4958 extern "C"
4959# endif
4960 int F77_DUMMY_MAIN() { return 1; }
4961#endif
Martin v. Löwis399a6892002-10-04 10:22:02 +00004962int
4963main ()
4964{
4965struct rlimit foo;
4966 ;
4967 return 0;
4968}
4969_ACEOF
4970rm -f conftest.$ac_objext
4971if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4972 (eval $ac_compile) 2>&5
4973 ac_status=$?
4974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4975 (exit $ac_status); } &&
4976 { ac_try='test -s conftest.$ac_objext'
4977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4978 (eval $ac_try) 2>&5
4979 ac_status=$?
4980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4981 (exit $ac_status); }; }; then
4982 sol_lfs_bug=no
4983else
4984 echo "$as_me: failed program was:" >&5
4985cat conftest.$ac_ext >&5
4986sol_lfs_bug=yes
4987fi
4988rm -f conftest.$ac_objext conftest.$ac_ext
4989echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
4990echo "${ECHO_T}$sol_lfs_bug" >&6
4991if test "$sol_lfs_bug" = "yes"; then
4992 use_lfs=no
4993fi
4994
4995if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00004996# Two defines needed to enable largefile support on various platforms
4997# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004998
Martin v. Löwis11437992002-04-12 09:54:03 +00004999cat >>confdefs.h <<\_ACEOF
5000#define _LARGEFILE_SOURCE 1
5001_ACEOF
5002
5003
5004cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005005#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005006_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005007
Martin v. Löwis399a6892002-10-04 10:22:02 +00005008fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005009
Guido van Rossum84e7b241996-08-19 21:59:00 +00005010# Add some code to confdefs.h so that the test for off_t works on SCO
5011cat >> confdefs.h <<\EOF
5012#if defined(SCO_DS)
5013#undef _OFF_T
5014#endif
5015EOF
5016
Guido van Rossumef2255b2000-03-10 22:30:29 +00005017# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005018echo "$as_me:$LINENO: checking for mode_t" >&5
5019echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5020if test "${ac_cv_type_mode_t+set}" = set; then
5021 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005022else
Martin v. Löwis11437992002-04-12 09:54:03 +00005023 cat >conftest.$ac_ext <<_ACEOF
5024#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005025#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005026$ac_includes_default
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öwis11437992002-04-12 09:54:03 +00005033int
5034main ()
5035{
5036if ((mode_t *) 0)
5037 return 0;
5038if (sizeof (mode_t))
5039 return 0;
5040 ;
5041 return 0;
5042}
5043_ACEOF
5044rm -f conftest.$ac_objext
5045if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5046 (eval $ac_compile) 2>&5
5047 ac_status=$?
5048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5049 (exit $ac_status); } &&
5050 { ac_try='test -s conftest.$ac_objext'
5051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5052 (eval $ac_try) 2>&5
5053 ac_status=$?
5054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5055 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005056 ac_cv_type_mode_t=yes
5057else
Martin v. Löwis11437992002-04-12 09:54:03 +00005058 echo "$as_me: failed program was:" >&5
5059cat conftest.$ac_ext >&5
5060ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005061fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005062rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005063fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005064echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5065echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5066if test $ac_cv_type_mode_t = yes; then
5067 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005068else
Martin v. Löwis11437992002-04-12 09:54:03 +00005069
5070cat >>confdefs.h <<_ACEOF
5071#define mode_t int
5072_ACEOF
5073
5074fi
5075
5076echo "$as_me:$LINENO: checking for off_t" >&5
5077echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5078if test "${ac_cv_type_off_t+set}" = set; then
5079 echo $ECHO_N "(cached) $ECHO_C" >&6
5080else
5081 cat >conftest.$ac_ext <<_ACEOF
5082#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005083#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005084$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005085#ifdef F77_DUMMY_MAIN
5086# ifdef __cplusplus
5087 extern "C"
5088# endif
5089 int F77_DUMMY_MAIN() { return 1; }
5090#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005091int
5092main ()
5093{
5094if ((off_t *) 0)
5095 return 0;
5096if (sizeof (off_t))
5097 return 0;
5098 ;
5099 return 0;
5100}
5101_ACEOF
5102rm -f conftest.$ac_objext
5103if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5104 (eval $ac_compile) 2>&5
5105 ac_status=$?
5106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5107 (exit $ac_status); } &&
5108 { ac_try='test -s conftest.$ac_objext'
5109 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5110 (eval $ac_try) 2>&5
5111 ac_status=$?
5112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5113 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005114 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005115else
Martin v. Löwis11437992002-04-12 09:54:03 +00005116 echo "$as_me: failed program was:" >&5
5117cat conftest.$ac_ext >&5
5118ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005119fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005120rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005121fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005122echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5123echo "${ECHO_T}$ac_cv_type_off_t" >&6
5124if test $ac_cv_type_off_t = yes; then
5125 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005126else
Martin v. Löwis11437992002-04-12 09:54:03 +00005127
5128cat >>confdefs.h <<_ACEOF
5129#define off_t long
5130_ACEOF
5131
5132fi
5133
5134echo "$as_me:$LINENO: checking for pid_t" >&5
5135echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5136if test "${ac_cv_type_pid_t+set}" = set; then
5137 echo $ECHO_N "(cached) $ECHO_C" >&6
5138else
5139 cat >conftest.$ac_ext <<_ACEOF
5140#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005141#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005142$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005143#ifdef F77_DUMMY_MAIN
5144# ifdef __cplusplus
5145 extern "C"
5146# endif
5147 int F77_DUMMY_MAIN() { return 1; }
5148#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005149int
5150main ()
5151{
5152if ((pid_t *) 0)
5153 return 0;
5154if (sizeof (pid_t))
5155 return 0;
5156 ;
5157 return 0;
5158}
5159_ACEOF
5160rm -f conftest.$ac_objext
5161if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5162 (eval $ac_compile) 2>&5
5163 ac_status=$?
5164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5165 (exit $ac_status); } &&
5166 { ac_try='test -s conftest.$ac_objext'
5167 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5168 (eval $ac_try) 2>&5
5169 ac_status=$?
5170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5171 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005172 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005173else
Martin v. Löwis11437992002-04-12 09:54:03 +00005174 echo "$as_me: failed program was:" >&5
5175cat conftest.$ac_ext >&5
5176ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005177fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005178rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005179fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005180echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5181echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5182if test $ac_cv_type_pid_t = yes; then
5183 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005184else
Martin v. Löwis11437992002-04-12 09:54:03 +00005185
5186cat >>confdefs.h <<_ACEOF
5187#define pid_t int
5188_ACEOF
5189
5190fi
5191
5192echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5193echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5194if test "${ac_cv_type_signal+set}" = set; then
5195 echo $ECHO_N "(cached) $ECHO_C" >&6
5196else
5197 cat >conftest.$ac_ext <<_ACEOF
5198#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005199#include "confdefs.h"
5200#include <sys/types.h>
5201#include <signal.h>
5202#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005203# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005204#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005205#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005206extern "C" void (*signal (int, void (*)(int)))(int);
5207#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005208void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005209#endif
5210
Barry Warsawfe33b792003-01-07 22:42:49 +00005211#ifdef F77_DUMMY_MAIN
5212# ifdef __cplusplus
5213 extern "C"
5214# endif
5215 int F77_DUMMY_MAIN() { return 1; }
5216#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005217int
5218main ()
5219{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005220int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005221 ;
5222 return 0;
5223}
5224_ACEOF
5225rm -f conftest.$ac_objext
5226if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5227 (eval $ac_compile) 2>&5
5228 ac_status=$?
5229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5230 (exit $ac_status); } &&
5231 { ac_try='test -s conftest.$ac_objext'
5232 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5233 (eval $ac_try) 2>&5
5234 ac_status=$?
5235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5236 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005237 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005238else
Martin v. Löwis11437992002-04-12 09:54:03 +00005239 echo "$as_me: failed program was:" >&5
5240cat conftest.$ac_ext >&5
5241ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005242fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005243rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005244fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005245echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5246echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005247
Martin v. Löwis11437992002-04-12 09:54:03 +00005248cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005249#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005250_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005251
Michael W. Hudson54241132001-12-07 15:38:26 +00005252
Martin v. Löwis11437992002-04-12 09:54:03 +00005253echo "$as_me:$LINENO: checking for size_t" >&5
5254echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5255if test "${ac_cv_type_size_t+set}" = set; then
5256 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005257else
Martin v. Löwis11437992002-04-12 09:54:03 +00005258 cat >conftest.$ac_ext <<_ACEOF
5259#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005260#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005261$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005262#ifdef F77_DUMMY_MAIN
5263# ifdef __cplusplus
5264 extern "C"
5265# endif
5266 int F77_DUMMY_MAIN() { return 1; }
5267#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005268int
5269main ()
5270{
5271if ((size_t *) 0)
5272 return 0;
5273if (sizeof (size_t))
5274 return 0;
5275 ;
5276 return 0;
5277}
5278_ACEOF
5279rm -f conftest.$ac_objext
5280if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5281 (eval $ac_compile) 2>&5
5282 ac_status=$?
5283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5284 (exit $ac_status); } &&
5285 { ac_try='test -s conftest.$ac_objext'
5286 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5287 (eval $ac_try) 2>&5
5288 ac_status=$?
5289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5290 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005291 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005292else
Martin v. Löwis11437992002-04-12 09:54:03 +00005293 echo "$as_me: failed program was:" >&5
5294cat conftest.$ac_ext >&5
5295ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005296fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005297rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005298fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005299echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5300echo "${ECHO_T}$ac_cv_type_size_t" >&6
5301if test $ac_cv_type_size_t = yes; then
5302 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005303else
Martin v. Löwis11437992002-04-12 09:54:03 +00005304
5305cat >>confdefs.h <<_ACEOF
5306#define size_t unsigned
5307_ACEOF
5308
5309fi
5310
5311echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5312echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5313if test "${ac_cv_type_uid_t+set}" = set; then
5314 echo $ECHO_N "(cached) $ECHO_C" >&6
5315else
5316 cat >conftest.$ac_ext <<_ACEOF
5317#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005318#include "confdefs.h"
5319#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005320
5321_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005322if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00005323 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005324 ac_cv_type_uid_t=yes
5325else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005326 ac_cv_type_uid_t=no
5327fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005328rm -f conftest*
5329
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005330fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005331echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5332echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005333if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005334
Martin v. Löwis11437992002-04-12 09:54:03 +00005335cat >>confdefs.h <<\_ACEOF
5336#define uid_t int
5337_ACEOF
5338
5339
5340cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005341#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005342_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005343
5344fi
5345
Jack Jansendd19cf82001-12-06 22:36:17 +00005346
Michael W. Hudson54241132001-12-07 15:38:26 +00005347# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00005348echo "$as_me:$LINENO: checking for int" >&5
5349echo $ECHO_N "checking for int... $ECHO_C" >&6
5350if test "${ac_cv_type_int+set}" = set; then
5351 echo $ECHO_N "(cached) $ECHO_C" >&6
5352else
5353 cat >conftest.$ac_ext <<_ACEOF
5354#line $LINENO "configure"
5355#include "confdefs.h"
5356$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005357#ifdef F77_DUMMY_MAIN
5358# ifdef __cplusplus
5359 extern "C"
5360# endif
5361 int F77_DUMMY_MAIN() { return 1; }
5362#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005363int
5364main ()
5365{
5366if ((int *) 0)
5367 return 0;
5368if (sizeof (int))
5369 return 0;
5370 ;
5371 return 0;
5372}
5373_ACEOF
5374rm -f conftest.$ac_objext
5375if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5376 (eval $ac_compile) 2>&5
5377 ac_status=$?
5378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5379 (exit $ac_status); } &&
5380 { ac_try='test -s conftest.$ac_objext'
5381 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5382 (eval $ac_try) 2>&5
5383 ac_status=$?
5384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5385 (exit $ac_status); }; }; then
5386 ac_cv_type_int=yes
5387else
5388 echo "$as_me: failed program was:" >&5
5389cat conftest.$ac_ext >&5
5390ac_cv_type_int=no
5391fi
5392rm -f conftest.$ac_objext conftest.$ac_ext
5393fi
5394echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5395echo "${ECHO_T}$ac_cv_type_int" >&6
5396
5397echo "$as_me:$LINENO: checking size of int" >&5
5398echo $ECHO_N "checking size of int... $ECHO_C" >&6
5399if test "${ac_cv_sizeof_int+set}" = set; then
5400 echo $ECHO_N "(cached) $ECHO_C" >&6
5401else
5402 if test "$ac_cv_type_int" = yes; then
5403 # The cast to unsigned long works around a bug in the HP C Compiler
5404 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5405 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5406 # This bug is HP SR number 8606223364.
5407 if test "$cross_compiling" = yes; then
5408 # Depending upon the size, compute the lo and hi bounds.
5409cat >conftest.$ac_ext <<_ACEOF
5410#line $LINENO "configure"
5411#include "confdefs.h"
5412$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005413#ifdef F77_DUMMY_MAIN
5414# ifdef __cplusplus
5415 extern "C"
5416# endif
5417 int F77_DUMMY_MAIN() { return 1; }
5418#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005419int
5420main ()
5421{
5422static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5423test_array [0] = 0
5424
5425 ;
5426 return 0;
5427}
5428_ACEOF
5429rm -f conftest.$ac_objext
5430if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5431 (eval $ac_compile) 2>&5
5432 ac_status=$?
5433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5434 (exit $ac_status); } &&
5435 { ac_try='test -s conftest.$ac_objext'
5436 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5437 (eval $ac_try) 2>&5
5438 ac_status=$?
5439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5440 (exit $ac_status); }; }; then
5441 ac_lo=0 ac_mid=0
5442 while :; do
5443 cat >conftest.$ac_ext <<_ACEOF
5444#line $LINENO "configure"
5445#include "confdefs.h"
5446$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005447#ifdef F77_DUMMY_MAIN
5448# ifdef __cplusplus
5449 extern "C"
5450# endif
5451 int F77_DUMMY_MAIN() { return 1; }
5452#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005453int
5454main ()
5455{
5456static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5457test_array [0] = 0
5458
5459 ;
5460 return 0;
5461}
5462_ACEOF
5463rm -f conftest.$ac_objext
5464if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5465 (eval $ac_compile) 2>&5
5466 ac_status=$?
5467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5468 (exit $ac_status); } &&
5469 { ac_try='test -s conftest.$ac_objext'
5470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5471 (eval $ac_try) 2>&5
5472 ac_status=$?
5473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5474 (exit $ac_status); }; }; then
5475 ac_hi=$ac_mid; break
5476else
5477 echo "$as_me: failed program was:" >&5
5478cat conftest.$ac_ext >&5
5479ac_lo=`expr $ac_mid + 1`
5480 if test $ac_lo -le $ac_mid; then
5481 ac_lo= ac_hi=
5482 break
5483 fi
5484 ac_mid=`expr 2 '*' $ac_mid + 1`
5485fi
5486rm -f conftest.$ac_objext conftest.$ac_ext
5487 done
5488else
5489 echo "$as_me: failed program was:" >&5
5490cat conftest.$ac_ext >&5
5491cat >conftest.$ac_ext <<_ACEOF
5492#line $LINENO "configure"
5493#include "confdefs.h"
5494$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005495#ifdef F77_DUMMY_MAIN
5496# ifdef __cplusplus
5497 extern "C"
5498# endif
5499 int F77_DUMMY_MAIN() { return 1; }
5500#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005501int
5502main ()
5503{
5504static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5505test_array [0] = 0
5506
5507 ;
5508 return 0;
5509}
5510_ACEOF
5511rm -f conftest.$ac_objext
5512if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5513 (eval $ac_compile) 2>&5
5514 ac_status=$?
5515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5516 (exit $ac_status); } &&
5517 { ac_try='test -s conftest.$ac_objext'
5518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5519 (eval $ac_try) 2>&5
5520 ac_status=$?
5521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5522 (exit $ac_status); }; }; then
5523 ac_hi=-1 ac_mid=-1
5524 while :; do
5525 cat >conftest.$ac_ext <<_ACEOF
5526#line $LINENO "configure"
5527#include "confdefs.h"
5528$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005529#ifdef F77_DUMMY_MAIN
5530# ifdef __cplusplus
5531 extern "C"
5532# endif
5533 int F77_DUMMY_MAIN() { return 1; }
5534#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005535int
5536main ()
5537{
5538static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5539test_array [0] = 0
5540
5541 ;
5542 return 0;
5543}
5544_ACEOF
5545rm -f conftest.$ac_objext
5546if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5547 (eval $ac_compile) 2>&5
5548 ac_status=$?
5549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5550 (exit $ac_status); } &&
5551 { ac_try='test -s conftest.$ac_objext'
5552 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5553 (eval $ac_try) 2>&5
5554 ac_status=$?
5555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5556 (exit $ac_status); }; }; then
5557 ac_lo=$ac_mid; break
5558else
5559 echo "$as_me: failed program was:" >&5
5560cat conftest.$ac_ext >&5
5561ac_hi=`expr '(' $ac_mid ')' - 1`
5562 if test $ac_mid -le $ac_hi; then
5563 ac_lo= ac_hi=
5564 break
5565 fi
5566 ac_mid=`expr 2 '*' $ac_mid`
5567fi
5568rm -f conftest.$ac_objext conftest.$ac_ext
5569 done
5570else
5571 echo "$as_me: failed program was:" >&5
5572cat conftest.$ac_ext >&5
5573ac_lo= ac_hi=
5574fi
5575rm -f conftest.$ac_objext conftest.$ac_ext
5576fi
5577rm -f conftest.$ac_objext conftest.$ac_ext
5578# Binary search between lo and hi bounds.
5579while test "x$ac_lo" != "x$ac_hi"; do
5580 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5581 cat >conftest.$ac_ext <<_ACEOF
5582#line $LINENO "configure"
5583#include "confdefs.h"
5584$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005585#ifdef F77_DUMMY_MAIN
5586# ifdef __cplusplus
5587 extern "C"
5588# endif
5589 int F77_DUMMY_MAIN() { return 1; }
5590#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005591int
5592main ()
5593{
5594static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5595test_array [0] = 0
5596
5597 ;
5598 return 0;
5599}
5600_ACEOF
5601rm -f conftest.$ac_objext
5602if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5603 (eval $ac_compile) 2>&5
5604 ac_status=$?
5605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5606 (exit $ac_status); } &&
5607 { ac_try='test -s conftest.$ac_objext'
5608 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5609 (eval $ac_try) 2>&5
5610 ac_status=$?
5611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5612 (exit $ac_status); }; }; then
5613 ac_hi=$ac_mid
5614else
5615 echo "$as_me: failed program was:" >&5
5616cat conftest.$ac_ext >&5
5617ac_lo=`expr '(' $ac_mid ')' + 1`
5618fi
5619rm -f conftest.$ac_objext conftest.$ac_ext
5620done
5621case $ac_lo in
5622?*) ac_cv_sizeof_int=$ac_lo;;
5623'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5624echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5625 { (exit 1); exit 1; }; } ;;
5626esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005627else
5628 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005629 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5630echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5631 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005632else
Martin v. Löwis11437992002-04-12 09:54:03 +00005633 cat >conftest.$ac_ext <<_ACEOF
5634#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005635#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005636$ac_includes_default
5637long longval () { return (long) (sizeof (int)); }
5638unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005639#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005640#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00005641#ifdef F77_DUMMY_MAIN
5642# ifdef __cplusplus
5643 extern "C"
5644# endif
5645 int F77_DUMMY_MAIN() { return 1; }
5646#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005647int
5648main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005649{
Martin v. Löwis11437992002-04-12 09:54:03 +00005650
5651 FILE *f = fopen ("conftest.val", "w");
5652 if (! f)
5653 exit (1);
5654 if (((long) (sizeof (int))) < 0)
5655 {
5656 long i = longval ();
5657 if (i != ((long) (sizeof (int))))
5658 exit (1);
5659 fprintf (f, "%ld\n", i);
5660 }
5661 else
5662 {
5663 unsigned long i = ulongval ();
5664 if (i != ((long) (sizeof (int))))
5665 exit (1);
5666 fprintf (f, "%lu\n", i);
5667 }
5668 exit (ferror (f) || fclose (f) != 0);
5669
5670 ;
5671 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005672}
Martin v. Löwis11437992002-04-12 09:54:03 +00005673_ACEOF
5674rm -f conftest$ac_exeext
5675if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5676 (eval $ac_link) 2>&5
5677 ac_status=$?
5678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5679 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5680 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5681 (eval $ac_try) 2>&5
5682 ac_status=$?
5683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5684 (exit $ac_status); }; }; then
5685 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005686else
Martin v. Löwis11437992002-04-12 09:54:03 +00005687 echo "$as_me: program exited with status $ac_status" >&5
5688echo "$as_me: failed program was:" >&5
5689cat conftest.$ac_ext >&5
5690( exit $ac_status )
5691{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5692echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5693 { (exit 1); exit 1; }; }
5694fi
Barry Warsawfe33b792003-01-07 22:42:49 +00005695rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005696fi
5697fi
5698rm -f conftest.val
5699else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005700 ac_cv_sizeof_int=0
5701fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005702fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005703echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5704echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5705cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005706#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005707_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005708
5709
Martin v. Löwis11437992002-04-12 09:54:03 +00005710echo "$as_me:$LINENO: checking for long" >&5
5711echo $ECHO_N "checking for long... $ECHO_C" >&6
5712if test "${ac_cv_type_long+set}" = set; then
5713 echo $ECHO_N "(cached) $ECHO_C" >&6
5714else
5715 cat >conftest.$ac_ext <<_ACEOF
5716#line $LINENO "configure"
5717#include "confdefs.h"
5718$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005719#ifdef F77_DUMMY_MAIN
5720# ifdef __cplusplus
5721 extern "C"
5722# endif
5723 int F77_DUMMY_MAIN() { return 1; }
5724#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005725int
5726main ()
5727{
5728if ((long *) 0)
5729 return 0;
5730if (sizeof (long))
5731 return 0;
5732 ;
5733 return 0;
5734}
5735_ACEOF
5736rm -f conftest.$ac_objext
5737if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5738 (eval $ac_compile) 2>&5
5739 ac_status=$?
5740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5741 (exit $ac_status); } &&
5742 { ac_try='test -s conftest.$ac_objext'
5743 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5744 (eval $ac_try) 2>&5
5745 ac_status=$?
5746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5747 (exit $ac_status); }; }; then
5748 ac_cv_type_long=yes
5749else
5750 echo "$as_me: failed program was:" >&5
5751cat conftest.$ac_ext >&5
5752ac_cv_type_long=no
5753fi
5754rm -f conftest.$ac_objext conftest.$ac_ext
5755fi
5756echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5757echo "${ECHO_T}$ac_cv_type_long" >&6
5758
5759echo "$as_me:$LINENO: checking size of long" >&5
5760echo $ECHO_N "checking size of long... $ECHO_C" >&6
5761if test "${ac_cv_sizeof_long+set}" = set; then
5762 echo $ECHO_N "(cached) $ECHO_C" >&6
5763else
5764 if test "$ac_cv_type_long" = yes; then
5765 # The cast to unsigned long works around a bug in the HP C Compiler
5766 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5767 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5768 # This bug is HP SR number 8606223364.
5769 if test "$cross_compiling" = yes; then
5770 # Depending upon the size, compute the lo and hi bounds.
5771cat >conftest.$ac_ext <<_ACEOF
5772#line $LINENO "configure"
5773#include "confdefs.h"
5774$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005775#ifdef F77_DUMMY_MAIN
5776# ifdef __cplusplus
5777 extern "C"
5778# endif
5779 int F77_DUMMY_MAIN() { return 1; }
5780#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005781int
5782main ()
5783{
5784static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5785test_array [0] = 0
5786
5787 ;
5788 return 0;
5789}
5790_ACEOF
5791rm -f conftest.$ac_objext
5792if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5793 (eval $ac_compile) 2>&5
5794 ac_status=$?
5795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5796 (exit $ac_status); } &&
5797 { ac_try='test -s conftest.$ac_objext'
5798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5799 (eval $ac_try) 2>&5
5800 ac_status=$?
5801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5802 (exit $ac_status); }; }; then
5803 ac_lo=0 ac_mid=0
5804 while :; do
5805 cat >conftest.$ac_ext <<_ACEOF
5806#line $LINENO "configure"
5807#include "confdefs.h"
5808$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005809#ifdef F77_DUMMY_MAIN
5810# ifdef __cplusplus
5811 extern "C"
5812# endif
5813 int F77_DUMMY_MAIN() { return 1; }
5814#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005815int
5816main ()
5817{
5818static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5819test_array [0] = 0
5820
5821 ;
5822 return 0;
5823}
5824_ACEOF
5825rm -f conftest.$ac_objext
5826if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5827 (eval $ac_compile) 2>&5
5828 ac_status=$?
5829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5830 (exit $ac_status); } &&
5831 { ac_try='test -s conftest.$ac_objext'
5832 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5833 (eval $ac_try) 2>&5
5834 ac_status=$?
5835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5836 (exit $ac_status); }; }; then
5837 ac_hi=$ac_mid; break
5838else
5839 echo "$as_me: failed program was:" >&5
5840cat conftest.$ac_ext >&5
5841ac_lo=`expr $ac_mid + 1`
5842 if test $ac_lo -le $ac_mid; then
5843 ac_lo= ac_hi=
5844 break
5845 fi
5846 ac_mid=`expr 2 '*' $ac_mid + 1`
5847fi
5848rm -f conftest.$ac_objext conftest.$ac_ext
5849 done
5850else
5851 echo "$as_me: failed program was:" >&5
5852cat conftest.$ac_ext >&5
5853cat >conftest.$ac_ext <<_ACEOF
5854#line $LINENO "configure"
5855#include "confdefs.h"
5856$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005857#ifdef F77_DUMMY_MAIN
5858# ifdef __cplusplus
5859 extern "C"
5860# endif
5861 int F77_DUMMY_MAIN() { return 1; }
5862#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005863int
5864main ()
5865{
5866static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5867test_array [0] = 0
5868
5869 ;
5870 return 0;
5871}
5872_ACEOF
5873rm -f conftest.$ac_objext
5874if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5875 (eval $ac_compile) 2>&5
5876 ac_status=$?
5877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5878 (exit $ac_status); } &&
5879 { ac_try='test -s conftest.$ac_objext'
5880 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5881 (eval $ac_try) 2>&5
5882 ac_status=$?
5883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5884 (exit $ac_status); }; }; then
5885 ac_hi=-1 ac_mid=-1
5886 while :; do
5887 cat >conftest.$ac_ext <<_ACEOF
5888#line $LINENO "configure"
5889#include "confdefs.h"
5890$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005891#ifdef F77_DUMMY_MAIN
5892# ifdef __cplusplus
5893 extern "C"
5894# endif
5895 int F77_DUMMY_MAIN() { return 1; }
5896#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005897int
5898main ()
5899{
5900static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5901test_array [0] = 0
5902
5903 ;
5904 return 0;
5905}
5906_ACEOF
5907rm -f conftest.$ac_objext
5908if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5909 (eval $ac_compile) 2>&5
5910 ac_status=$?
5911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5912 (exit $ac_status); } &&
5913 { ac_try='test -s conftest.$ac_objext'
5914 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5915 (eval $ac_try) 2>&5
5916 ac_status=$?
5917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5918 (exit $ac_status); }; }; then
5919 ac_lo=$ac_mid; break
5920else
5921 echo "$as_me: failed program was:" >&5
5922cat conftest.$ac_ext >&5
5923ac_hi=`expr '(' $ac_mid ')' - 1`
5924 if test $ac_mid -le $ac_hi; then
5925 ac_lo= ac_hi=
5926 break
5927 fi
5928 ac_mid=`expr 2 '*' $ac_mid`
5929fi
5930rm -f conftest.$ac_objext conftest.$ac_ext
5931 done
5932else
5933 echo "$as_me: failed program was:" >&5
5934cat conftest.$ac_ext >&5
5935ac_lo= ac_hi=
5936fi
5937rm -f conftest.$ac_objext conftest.$ac_ext
5938fi
5939rm -f conftest.$ac_objext conftest.$ac_ext
5940# Binary search between lo and hi bounds.
5941while test "x$ac_lo" != "x$ac_hi"; do
5942 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5943 cat >conftest.$ac_ext <<_ACEOF
5944#line $LINENO "configure"
5945#include "confdefs.h"
5946$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005947#ifdef F77_DUMMY_MAIN
5948# ifdef __cplusplus
5949 extern "C"
5950# endif
5951 int F77_DUMMY_MAIN() { return 1; }
5952#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005953int
5954main ()
5955{
5956static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5957test_array [0] = 0
5958
5959 ;
5960 return 0;
5961}
5962_ACEOF
5963rm -f conftest.$ac_objext
5964if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5965 (eval $ac_compile) 2>&5
5966 ac_status=$?
5967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5968 (exit $ac_status); } &&
5969 { ac_try='test -s conftest.$ac_objext'
5970 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5971 (eval $ac_try) 2>&5
5972 ac_status=$?
5973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5974 (exit $ac_status); }; }; then
5975 ac_hi=$ac_mid
5976else
5977 echo "$as_me: failed program was:" >&5
5978cat conftest.$ac_ext >&5
5979ac_lo=`expr '(' $ac_mid ')' + 1`
5980fi
5981rm -f conftest.$ac_objext conftest.$ac_ext
5982done
5983case $ac_lo in
5984?*) ac_cv_sizeof_long=$ac_lo;;
5985'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5986echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5987 { (exit 1); exit 1; }; } ;;
5988esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005989else
5990 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005991 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5992echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5993 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005994else
Martin v. Löwis11437992002-04-12 09:54:03 +00005995 cat >conftest.$ac_ext <<_ACEOF
5996#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005997#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005998$ac_includes_default
5999long longval () { return (long) (sizeof (long)); }
6000unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006001#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006002#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00006003#ifdef F77_DUMMY_MAIN
6004# ifdef __cplusplus
6005 extern "C"
6006# endif
6007 int F77_DUMMY_MAIN() { return 1; }
6008#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006009int
6010main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006011{
Martin v. Löwis11437992002-04-12 09:54:03 +00006012
6013 FILE *f = fopen ("conftest.val", "w");
6014 if (! f)
6015 exit (1);
6016 if (((long) (sizeof (long))) < 0)
6017 {
6018 long i = longval ();
6019 if (i != ((long) (sizeof (long))))
6020 exit (1);
6021 fprintf (f, "%ld\n", i);
6022 }
6023 else
6024 {
6025 unsigned long i = ulongval ();
6026 if (i != ((long) (sizeof (long))))
6027 exit (1);
6028 fprintf (f, "%lu\n", i);
6029 }
6030 exit (ferror (f) || fclose (f) != 0);
6031
6032 ;
6033 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006034}
Martin v. Löwis11437992002-04-12 09:54:03 +00006035_ACEOF
6036rm -f conftest$ac_exeext
6037if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6038 (eval $ac_link) 2>&5
6039 ac_status=$?
6040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6041 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6042 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6043 (eval $ac_try) 2>&5
6044 ac_status=$?
6045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6046 (exit $ac_status); }; }; then
6047 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006048else
Martin v. Löwis11437992002-04-12 09:54:03 +00006049 echo "$as_me: program exited with status $ac_status" >&5
6050echo "$as_me: failed program was:" >&5
6051cat conftest.$ac_ext >&5
6052( exit $ac_status )
6053{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
6054echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
6055 { (exit 1); exit 1; }; }
6056fi
Barry Warsawfe33b792003-01-07 22:42:49 +00006057rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006058fi
6059fi
6060rm -f conftest.val
6061else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006062 ac_cv_sizeof_long=0
6063fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006064fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006065echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6066echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6067cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006068#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006069_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006070
6071
Martin v. Löwis11437992002-04-12 09:54:03 +00006072echo "$as_me:$LINENO: checking for void *" >&5
6073echo $ECHO_N "checking for void *... $ECHO_C" >&6
6074if test "${ac_cv_type_void_p+set}" = set; then
6075 echo $ECHO_N "(cached) $ECHO_C" >&6
6076else
6077 cat >conftest.$ac_ext <<_ACEOF
6078#line $LINENO "configure"
6079#include "confdefs.h"
6080$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006081#ifdef F77_DUMMY_MAIN
6082# ifdef __cplusplus
6083 extern "C"
6084# endif
6085 int F77_DUMMY_MAIN() { return 1; }
6086#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006087int
6088main ()
6089{
6090if ((void * *) 0)
6091 return 0;
6092if (sizeof (void *))
6093 return 0;
6094 ;
6095 return 0;
6096}
6097_ACEOF
6098rm -f conftest.$ac_objext
6099if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6100 (eval $ac_compile) 2>&5
6101 ac_status=$?
6102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6103 (exit $ac_status); } &&
6104 { ac_try='test -s conftest.$ac_objext'
6105 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6106 (eval $ac_try) 2>&5
6107 ac_status=$?
6108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6109 (exit $ac_status); }; }; then
6110 ac_cv_type_void_p=yes
6111else
6112 echo "$as_me: failed program was:" >&5
6113cat conftest.$ac_ext >&5
6114ac_cv_type_void_p=no
6115fi
6116rm -f conftest.$ac_objext conftest.$ac_ext
6117fi
6118echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
6119echo "${ECHO_T}$ac_cv_type_void_p" >&6
6120
6121echo "$as_me:$LINENO: checking size of void *" >&5
6122echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6123if test "${ac_cv_sizeof_void_p+set}" = set; then
6124 echo $ECHO_N "(cached) $ECHO_C" >&6
6125else
6126 if test "$ac_cv_type_void_p" = yes; then
6127 # The cast to unsigned long works around a bug in the HP C Compiler
6128 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6129 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6130 # This bug is HP SR number 8606223364.
6131 if test "$cross_compiling" = yes; then
6132 # Depending upon the size, compute the lo and hi bounds.
6133cat >conftest.$ac_ext <<_ACEOF
6134#line $LINENO "configure"
6135#include "confdefs.h"
6136$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006137#ifdef F77_DUMMY_MAIN
6138# ifdef __cplusplus
6139 extern "C"
6140# endif
6141 int F77_DUMMY_MAIN() { return 1; }
6142#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006143int
6144main ()
6145{
6146static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
6147test_array [0] = 0
6148
6149 ;
6150 return 0;
6151}
6152_ACEOF
6153rm -f conftest.$ac_objext
6154if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6155 (eval $ac_compile) 2>&5
6156 ac_status=$?
6157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6158 (exit $ac_status); } &&
6159 { ac_try='test -s conftest.$ac_objext'
6160 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6161 (eval $ac_try) 2>&5
6162 ac_status=$?
6163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6164 (exit $ac_status); }; }; then
6165 ac_lo=0 ac_mid=0
6166 while :; do
6167 cat >conftest.$ac_ext <<_ACEOF
6168#line $LINENO "configure"
6169#include "confdefs.h"
6170$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006171#ifdef F77_DUMMY_MAIN
6172# ifdef __cplusplus
6173 extern "C"
6174# endif
6175 int F77_DUMMY_MAIN() { return 1; }
6176#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006177int
6178main ()
6179{
6180static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6181test_array [0] = 0
6182
6183 ;
6184 return 0;
6185}
6186_ACEOF
6187rm -f conftest.$ac_objext
6188if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6189 (eval $ac_compile) 2>&5
6190 ac_status=$?
6191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6192 (exit $ac_status); } &&
6193 { ac_try='test -s conftest.$ac_objext'
6194 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6195 (eval $ac_try) 2>&5
6196 ac_status=$?
6197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6198 (exit $ac_status); }; }; then
6199 ac_hi=$ac_mid; break
6200else
6201 echo "$as_me: failed program was:" >&5
6202cat conftest.$ac_ext >&5
6203ac_lo=`expr $ac_mid + 1`
6204 if test $ac_lo -le $ac_mid; then
6205 ac_lo= ac_hi=
6206 break
6207 fi
6208 ac_mid=`expr 2 '*' $ac_mid + 1`
6209fi
6210rm -f conftest.$ac_objext conftest.$ac_ext
6211 done
6212else
6213 echo "$as_me: failed program was:" >&5
6214cat conftest.$ac_ext >&5
6215cat >conftest.$ac_ext <<_ACEOF
6216#line $LINENO "configure"
6217#include "confdefs.h"
6218$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006219#ifdef F77_DUMMY_MAIN
6220# ifdef __cplusplus
6221 extern "C"
6222# endif
6223 int F77_DUMMY_MAIN() { return 1; }
6224#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006225int
6226main ()
6227{
6228static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6229test_array [0] = 0
6230
6231 ;
6232 return 0;
6233}
6234_ACEOF
6235rm -f conftest.$ac_objext
6236if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6237 (eval $ac_compile) 2>&5
6238 ac_status=$?
6239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6240 (exit $ac_status); } &&
6241 { ac_try='test -s conftest.$ac_objext'
6242 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6243 (eval $ac_try) 2>&5
6244 ac_status=$?
6245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6246 (exit $ac_status); }; }; then
6247 ac_hi=-1 ac_mid=-1
6248 while :; do
6249 cat >conftest.$ac_ext <<_ACEOF
6250#line $LINENO "configure"
6251#include "confdefs.h"
6252$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006253#ifdef F77_DUMMY_MAIN
6254# ifdef __cplusplus
6255 extern "C"
6256# endif
6257 int F77_DUMMY_MAIN() { return 1; }
6258#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006259int
6260main ()
6261{
6262static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6263test_array [0] = 0
6264
6265 ;
6266 return 0;
6267}
6268_ACEOF
6269rm -f conftest.$ac_objext
6270if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6271 (eval $ac_compile) 2>&5
6272 ac_status=$?
6273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6274 (exit $ac_status); } &&
6275 { ac_try='test -s conftest.$ac_objext'
6276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6277 (eval $ac_try) 2>&5
6278 ac_status=$?
6279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6280 (exit $ac_status); }; }; then
6281 ac_lo=$ac_mid; break
6282else
6283 echo "$as_me: failed program was:" >&5
6284cat conftest.$ac_ext >&5
6285ac_hi=`expr '(' $ac_mid ')' - 1`
6286 if test $ac_mid -le $ac_hi; then
6287 ac_lo= ac_hi=
6288 break
6289 fi
6290 ac_mid=`expr 2 '*' $ac_mid`
6291fi
6292rm -f conftest.$ac_objext conftest.$ac_ext
6293 done
6294else
6295 echo "$as_me: failed program was:" >&5
6296cat conftest.$ac_ext >&5
6297ac_lo= ac_hi=
6298fi
6299rm -f conftest.$ac_objext conftest.$ac_ext
6300fi
6301rm -f conftest.$ac_objext conftest.$ac_ext
6302# Binary search between lo and hi bounds.
6303while test "x$ac_lo" != "x$ac_hi"; do
6304 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6305 cat >conftest.$ac_ext <<_ACEOF
6306#line $LINENO "configure"
6307#include "confdefs.h"
6308$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006309#ifdef F77_DUMMY_MAIN
6310# ifdef __cplusplus
6311 extern "C"
6312# endif
6313 int F77_DUMMY_MAIN() { return 1; }
6314#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006315int
6316main ()
6317{
6318static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6319test_array [0] = 0
6320
6321 ;
6322 return 0;
6323}
6324_ACEOF
6325rm -f conftest.$ac_objext
6326if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6327 (eval $ac_compile) 2>&5
6328 ac_status=$?
6329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6330 (exit $ac_status); } &&
6331 { ac_try='test -s conftest.$ac_objext'
6332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6333 (eval $ac_try) 2>&5
6334 ac_status=$?
6335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6336 (exit $ac_status); }; }; then
6337 ac_hi=$ac_mid
6338else
6339 echo "$as_me: failed program was:" >&5
6340cat conftest.$ac_ext >&5
6341ac_lo=`expr '(' $ac_mid ')' + 1`
6342fi
6343rm -f conftest.$ac_objext conftest.$ac_ext
6344done
6345case $ac_lo in
6346?*) ac_cv_sizeof_void_p=$ac_lo;;
6347'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6348echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6349 { (exit 1); exit 1; }; } ;;
6350esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006351else
6352 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006353 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6354echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6355 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006356else
Martin v. Löwis11437992002-04-12 09:54:03 +00006357 cat >conftest.$ac_ext <<_ACEOF
6358#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00006359#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006360$ac_includes_default
6361long longval () { return (long) (sizeof (void *)); }
6362unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006363#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006364#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00006365#ifdef F77_DUMMY_MAIN
6366# ifdef __cplusplus
6367 extern "C"
6368# endif
6369 int F77_DUMMY_MAIN() { return 1; }
6370#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006371int
6372main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006373{
Martin v. Löwis11437992002-04-12 09:54:03 +00006374
6375 FILE *f = fopen ("conftest.val", "w");
6376 if (! f)
6377 exit (1);
6378 if (((long) (sizeof (void *))) < 0)
6379 {
6380 long i = longval ();
6381 if (i != ((long) (sizeof (void *))))
6382 exit (1);
6383 fprintf (f, "%ld\n", i);
6384 }
6385 else
6386 {
6387 unsigned long i = ulongval ();
6388 if (i != ((long) (sizeof (void *))))
6389 exit (1);
6390 fprintf (f, "%lu\n", i);
6391 }
6392 exit (ferror (f) || fclose (f) != 0);
6393
6394 ;
6395 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006396}
Martin v. Löwis11437992002-04-12 09:54:03 +00006397_ACEOF
6398rm -f conftest$ac_exeext
6399if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6400 (eval $ac_link) 2>&5
6401 ac_status=$?
6402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6403 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6405 (eval $ac_try) 2>&5
6406 ac_status=$?
6407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6408 (exit $ac_status); }; }; then
6409 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006410else
Martin v. Löwis11437992002-04-12 09:54:03 +00006411 echo "$as_me: program exited with status $ac_status" >&5
6412echo "$as_me: failed program was:" >&5
6413cat conftest.$ac_ext >&5
6414( exit $ac_status )
6415{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6416echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6417 { (exit 1); exit 1; }; }
6418fi
Barry Warsawfe33b792003-01-07 22:42:49 +00006419rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006420fi
6421fi
6422rm -f conftest.val
6423else
Guido van Rossumad678af1998-10-02 14:42:15 +00006424 ac_cv_sizeof_void_p=0
6425fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006426fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006427echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6428echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6429cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006430#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006431_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006432
6433
Martin v. Löwis11437992002-04-12 09:54:03 +00006434echo "$as_me:$LINENO: checking for char" >&5
6435echo $ECHO_N "checking for char... $ECHO_C" >&6
6436if test "${ac_cv_type_char+set}" = set; then
6437 echo $ECHO_N "(cached) $ECHO_C" >&6
6438else
6439 cat >conftest.$ac_ext <<_ACEOF
6440#line $LINENO "configure"
6441#include "confdefs.h"
6442$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006443#ifdef F77_DUMMY_MAIN
6444# ifdef __cplusplus
6445 extern "C"
6446# endif
6447 int F77_DUMMY_MAIN() { return 1; }
6448#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006449int
6450main ()
6451{
6452if ((char *) 0)
6453 return 0;
6454if (sizeof (char))
6455 return 0;
6456 ;
6457 return 0;
6458}
6459_ACEOF
6460rm -f conftest.$ac_objext
6461if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6462 (eval $ac_compile) 2>&5
6463 ac_status=$?
6464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6465 (exit $ac_status); } &&
6466 { ac_try='test -s conftest.$ac_objext'
6467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6468 (eval $ac_try) 2>&5
6469 ac_status=$?
6470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6471 (exit $ac_status); }; }; then
6472 ac_cv_type_char=yes
6473else
6474 echo "$as_me: failed program was:" >&5
6475cat conftest.$ac_ext >&5
6476ac_cv_type_char=no
6477fi
6478rm -f conftest.$ac_objext conftest.$ac_ext
6479fi
6480echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
6481echo "${ECHO_T}$ac_cv_type_char" >&6
6482
6483echo "$as_me:$LINENO: checking size of char" >&5
6484echo $ECHO_N "checking size of char... $ECHO_C" >&6
6485if test "${ac_cv_sizeof_char+set}" = set; then
6486 echo $ECHO_N "(cached) $ECHO_C" >&6
6487else
6488 if test "$ac_cv_type_char" = yes; then
6489 # The cast to unsigned long works around a bug in the HP C Compiler
6490 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6491 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6492 # This bug is HP SR number 8606223364.
6493 if test "$cross_compiling" = yes; then
6494 # Depending upon the size, compute the lo and hi bounds.
6495cat >conftest.$ac_ext <<_ACEOF
6496#line $LINENO "configure"
6497#include "confdefs.h"
6498$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006499#ifdef F77_DUMMY_MAIN
6500# ifdef __cplusplus
6501 extern "C"
6502# endif
6503 int F77_DUMMY_MAIN() { return 1; }
6504#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006505int
6506main ()
6507{
6508static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
6509test_array [0] = 0
6510
6511 ;
6512 return 0;
6513}
6514_ACEOF
6515rm -f conftest.$ac_objext
6516if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6517 (eval $ac_compile) 2>&5
6518 ac_status=$?
6519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6520 (exit $ac_status); } &&
6521 { ac_try='test -s conftest.$ac_objext'
6522 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6523 (eval $ac_try) 2>&5
6524 ac_status=$?
6525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6526 (exit $ac_status); }; }; then
6527 ac_lo=0 ac_mid=0
6528 while :; do
6529 cat >conftest.$ac_ext <<_ACEOF
6530#line $LINENO "configure"
6531#include "confdefs.h"
6532$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006533#ifdef F77_DUMMY_MAIN
6534# ifdef __cplusplus
6535 extern "C"
6536# endif
6537 int F77_DUMMY_MAIN() { return 1; }
6538#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006539int
6540main ()
6541{
6542static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6543test_array [0] = 0
6544
6545 ;
6546 return 0;
6547}
6548_ACEOF
6549rm -f conftest.$ac_objext
6550if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6551 (eval $ac_compile) 2>&5
6552 ac_status=$?
6553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6554 (exit $ac_status); } &&
6555 { ac_try='test -s conftest.$ac_objext'
6556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6557 (eval $ac_try) 2>&5
6558 ac_status=$?
6559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6560 (exit $ac_status); }; }; then
6561 ac_hi=$ac_mid; break
6562else
6563 echo "$as_me: failed program was:" >&5
6564cat conftest.$ac_ext >&5
6565ac_lo=`expr $ac_mid + 1`
6566 if test $ac_lo -le $ac_mid; then
6567 ac_lo= ac_hi=
6568 break
6569 fi
6570 ac_mid=`expr 2 '*' $ac_mid + 1`
6571fi
6572rm -f conftest.$ac_objext conftest.$ac_ext
6573 done
6574else
6575 echo "$as_me: failed program was:" >&5
6576cat conftest.$ac_ext >&5
6577cat >conftest.$ac_ext <<_ACEOF
6578#line $LINENO "configure"
6579#include "confdefs.h"
6580$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006581#ifdef F77_DUMMY_MAIN
6582# ifdef __cplusplus
6583 extern "C"
6584# endif
6585 int F77_DUMMY_MAIN() { return 1; }
6586#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006587int
6588main ()
6589{
6590static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
6591test_array [0] = 0
6592
6593 ;
6594 return 0;
6595}
6596_ACEOF
6597rm -f conftest.$ac_objext
6598if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6599 (eval $ac_compile) 2>&5
6600 ac_status=$?
6601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6602 (exit $ac_status); } &&
6603 { ac_try='test -s conftest.$ac_objext'
6604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6605 (eval $ac_try) 2>&5
6606 ac_status=$?
6607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6608 (exit $ac_status); }; }; then
6609 ac_hi=-1 ac_mid=-1
6610 while :; do
6611 cat >conftest.$ac_ext <<_ACEOF
6612#line $LINENO "configure"
6613#include "confdefs.h"
6614$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006615#ifdef F77_DUMMY_MAIN
6616# ifdef __cplusplus
6617 extern "C"
6618# endif
6619 int F77_DUMMY_MAIN() { return 1; }
6620#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006621int
6622main ()
6623{
6624static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
6625test_array [0] = 0
6626
6627 ;
6628 return 0;
6629}
6630_ACEOF
6631rm -f conftest.$ac_objext
6632if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6633 (eval $ac_compile) 2>&5
6634 ac_status=$?
6635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6636 (exit $ac_status); } &&
6637 { ac_try='test -s conftest.$ac_objext'
6638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6639 (eval $ac_try) 2>&5
6640 ac_status=$?
6641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6642 (exit $ac_status); }; }; then
6643 ac_lo=$ac_mid; break
6644else
6645 echo "$as_me: failed program was:" >&5
6646cat conftest.$ac_ext >&5
6647ac_hi=`expr '(' $ac_mid ')' - 1`
6648 if test $ac_mid -le $ac_hi; then
6649 ac_lo= ac_hi=
6650 break
6651 fi
6652 ac_mid=`expr 2 '*' $ac_mid`
6653fi
6654rm -f conftest.$ac_objext conftest.$ac_ext
6655 done
6656else
6657 echo "$as_me: failed program was:" >&5
6658cat conftest.$ac_ext >&5
6659ac_lo= ac_hi=
6660fi
6661rm -f conftest.$ac_objext conftest.$ac_ext
6662fi
6663rm -f conftest.$ac_objext conftest.$ac_ext
6664# Binary search between lo and hi bounds.
6665while test "x$ac_lo" != "x$ac_hi"; do
6666 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6667 cat >conftest.$ac_ext <<_ACEOF
6668#line $LINENO "configure"
6669#include "confdefs.h"
6670$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006671#ifdef F77_DUMMY_MAIN
6672# ifdef __cplusplus
6673 extern "C"
6674# endif
6675 int F77_DUMMY_MAIN() { return 1; }
6676#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006677int
6678main ()
6679{
6680static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6681test_array [0] = 0
6682
6683 ;
6684 return 0;
6685}
6686_ACEOF
6687rm -f conftest.$ac_objext
6688if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6689 (eval $ac_compile) 2>&5
6690 ac_status=$?
6691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6692 (exit $ac_status); } &&
6693 { ac_try='test -s conftest.$ac_objext'
6694 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6695 (eval $ac_try) 2>&5
6696 ac_status=$?
6697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6698 (exit $ac_status); }; }; then
6699 ac_hi=$ac_mid
6700else
6701 echo "$as_me: failed program was:" >&5
6702cat conftest.$ac_ext >&5
6703ac_lo=`expr '(' $ac_mid ')' + 1`
6704fi
6705rm -f conftest.$ac_objext conftest.$ac_ext
6706done
6707case $ac_lo in
6708?*) ac_cv_sizeof_char=$ac_lo;;
6709'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6710echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6711 { (exit 1); exit 1; }; } ;;
6712esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006713else
6714 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006715 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6716echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6717 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006718else
Martin v. Löwis11437992002-04-12 09:54:03 +00006719 cat >conftest.$ac_ext <<_ACEOF
6720#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006721#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006722$ac_includes_default
6723long longval () { return (long) (sizeof (char)); }
6724unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006725#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006726#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00006727#ifdef F77_DUMMY_MAIN
6728# ifdef __cplusplus
6729 extern "C"
6730# endif
6731 int F77_DUMMY_MAIN() { return 1; }
6732#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006733int
6734main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006735{
Martin v. Löwis11437992002-04-12 09:54:03 +00006736
6737 FILE *f = fopen ("conftest.val", "w");
6738 if (! f)
6739 exit (1);
6740 if (((long) (sizeof (char))) < 0)
6741 {
6742 long i = longval ();
6743 if (i != ((long) (sizeof (char))))
6744 exit (1);
6745 fprintf (f, "%ld\n", i);
6746 }
6747 else
6748 {
6749 unsigned long i = ulongval ();
6750 if (i != ((long) (sizeof (char))))
6751 exit (1);
6752 fprintf (f, "%lu\n", i);
6753 }
6754 exit (ferror (f) || fclose (f) != 0);
6755
6756 ;
6757 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006758}
Martin v. Löwis11437992002-04-12 09:54:03 +00006759_ACEOF
6760rm -f conftest$ac_exeext
6761if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6762 (eval $ac_link) 2>&5
6763 ac_status=$?
6764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6765 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6766 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6767 (eval $ac_try) 2>&5
6768 ac_status=$?
6769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6770 (exit $ac_status); }; }; then
6771 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006772else
Martin v. Löwis11437992002-04-12 09:54:03 +00006773 echo "$as_me: program exited with status $ac_status" >&5
6774echo "$as_me: failed program was:" >&5
6775cat conftest.$ac_ext >&5
6776( exit $ac_status )
6777{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6778echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6779 { (exit 1); exit 1; }; }
6780fi
Barry Warsawfe33b792003-01-07 22:42:49 +00006781rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006782fi
6783fi
6784rm -f conftest.val
6785else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006786 ac_cv_sizeof_char=0
6787fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006788fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006789echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6790echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6791cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006792#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006793_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006794
6795
Martin v. Löwis11437992002-04-12 09:54:03 +00006796echo "$as_me:$LINENO: checking for short" >&5
6797echo $ECHO_N "checking for short... $ECHO_C" >&6
6798if test "${ac_cv_type_short+set}" = set; then
6799 echo $ECHO_N "(cached) $ECHO_C" >&6
6800else
6801 cat >conftest.$ac_ext <<_ACEOF
6802#line $LINENO "configure"
6803#include "confdefs.h"
6804$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006805#ifdef F77_DUMMY_MAIN
6806# ifdef __cplusplus
6807 extern "C"
6808# endif
6809 int F77_DUMMY_MAIN() { return 1; }
6810#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006811int
6812main ()
6813{
6814if ((short *) 0)
6815 return 0;
6816if (sizeof (short))
6817 return 0;
6818 ;
6819 return 0;
6820}
6821_ACEOF
6822rm -f conftest.$ac_objext
6823if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6824 (eval $ac_compile) 2>&5
6825 ac_status=$?
6826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6827 (exit $ac_status); } &&
6828 { ac_try='test -s conftest.$ac_objext'
6829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6830 (eval $ac_try) 2>&5
6831 ac_status=$?
6832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6833 (exit $ac_status); }; }; then
6834 ac_cv_type_short=yes
6835else
6836 echo "$as_me: failed program was:" >&5
6837cat conftest.$ac_ext >&5
6838ac_cv_type_short=no
6839fi
6840rm -f conftest.$ac_objext conftest.$ac_ext
6841fi
6842echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6843echo "${ECHO_T}$ac_cv_type_short" >&6
6844
6845echo "$as_me:$LINENO: checking size of short" >&5
6846echo $ECHO_N "checking size of short... $ECHO_C" >&6
6847if test "${ac_cv_sizeof_short+set}" = set; then
6848 echo $ECHO_N "(cached) $ECHO_C" >&6
6849else
6850 if test "$ac_cv_type_short" = yes; then
6851 # The cast to unsigned long works around a bug in the HP C Compiler
6852 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6853 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6854 # This bug is HP SR number 8606223364.
6855 if test "$cross_compiling" = yes; then
6856 # Depending upon the size, compute the lo and hi bounds.
6857cat >conftest.$ac_ext <<_ACEOF
6858#line $LINENO "configure"
6859#include "confdefs.h"
6860$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006861#ifdef F77_DUMMY_MAIN
6862# ifdef __cplusplus
6863 extern "C"
6864# endif
6865 int F77_DUMMY_MAIN() { return 1; }
6866#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006867int
6868main ()
6869{
6870static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6871test_array [0] = 0
6872
6873 ;
6874 return 0;
6875}
6876_ACEOF
6877rm -f conftest.$ac_objext
6878if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6879 (eval $ac_compile) 2>&5
6880 ac_status=$?
6881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6882 (exit $ac_status); } &&
6883 { ac_try='test -s conftest.$ac_objext'
6884 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6885 (eval $ac_try) 2>&5
6886 ac_status=$?
6887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6888 (exit $ac_status); }; }; then
6889 ac_lo=0 ac_mid=0
6890 while :; do
6891 cat >conftest.$ac_ext <<_ACEOF
6892#line $LINENO "configure"
6893#include "confdefs.h"
6894$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006895#ifdef F77_DUMMY_MAIN
6896# ifdef __cplusplus
6897 extern "C"
6898# endif
6899 int F77_DUMMY_MAIN() { return 1; }
6900#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006901int
6902main ()
6903{
6904static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6905test_array [0] = 0
6906
6907 ;
6908 return 0;
6909}
6910_ACEOF
6911rm -f conftest.$ac_objext
6912if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6913 (eval $ac_compile) 2>&5
6914 ac_status=$?
6915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6916 (exit $ac_status); } &&
6917 { ac_try='test -s conftest.$ac_objext'
6918 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6919 (eval $ac_try) 2>&5
6920 ac_status=$?
6921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6922 (exit $ac_status); }; }; then
6923 ac_hi=$ac_mid; break
6924else
6925 echo "$as_me: failed program was:" >&5
6926cat conftest.$ac_ext >&5
6927ac_lo=`expr $ac_mid + 1`
6928 if test $ac_lo -le $ac_mid; then
6929 ac_lo= ac_hi=
6930 break
6931 fi
6932 ac_mid=`expr 2 '*' $ac_mid + 1`
6933fi
6934rm -f conftest.$ac_objext conftest.$ac_ext
6935 done
6936else
6937 echo "$as_me: failed program was:" >&5
6938cat conftest.$ac_ext >&5
6939cat >conftest.$ac_ext <<_ACEOF
6940#line $LINENO "configure"
6941#include "confdefs.h"
6942$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006943#ifdef F77_DUMMY_MAIN
6944# ifdef __cplusplus
6945 extern "C"
6946# endif
6947 int F77_DUMMY_MAIN() { return 1; }
6948#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006949int
6950main ()
6951{
6952static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6953test_array [0] = 0
6954
6955 ;
6956 return 0;
6957}
6958_ACEOF
6959rm -f conftest.$ac_objext
6960if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6961 (eval $ac_compile) 2>&5
6962 ac_status=$?
6963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6964 (exit $ac_status); } &&
6965 { ac_try='test -s conftest.$ac_objext'
6966 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6967 (eval $ac_try) 2>&5
6968 ac_status=$?
6969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6970 (exit $ac_status); }; }; then
6971 ac_hi=-1 ac_mid=-1
6972 while :; do
6973 cat >conftest.$ac_ext <<_ACEOF
6974#line $LINENO "configure"
6975#include "confdefs.h"
6976$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006977#ifdef F77_DUMMY_MAIN
6978# ifdef __cplusplus
6979 extern "C"
6980# endif
6981 int F77_DUMMY_MAIN() { return 1; }
6982#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006983int
6984main ()
6985{
6986static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6987test_array [0] = 0
6988
6989 ;
6990 return 0;
6991}
6992_ACEOF
6993rm -f conftest.$ac_objext
6994if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6995 (eval $ac_compile) 2>&5
6996 ac_status=$?
6997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6998 (exit $ac_status); } &&
6999 { ac_try='test -s conftest.$ac_objext'
7000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7001 (eval $ac_try) 2>&5
7002 ac_status=$?
7003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7004 (exit $ac_status); }; }; then
7005 ac_lo=$ac_mid; break
7006else
7007 echo "$as_me: failed program was:" >&5
7008cat conftest.$ac_ext >&5
7009ac_hi=`expr '(' $ac_mid ')' - 1`
7010 if test $ac_mid -le $ac_hi; then
7011 ac_lo= ac_hi=
7012 break
7013 fi
7014 ac_mid=`expr 2 '*' $ac_mid`
7015fi
7016rm -f conftest.$ac_objext conftest.$ac_ext
7017 done
7018else
7019 echo "$as_me: failed program was:" >&5
7020cat conftest.$ac_ext >&5
7021ac_lo= ac_hi=
7022fi
7023rm -f conftest.$ac_objext conftest.$ac_ext
7024fi
7025rm -f conftest.$ac_objext conftest.$ac_ext
7026# Binary search between lo and hi bounds.
7027while test "x$ac_lo" != "x$ac_hi"; do
7028 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7029 cat >conftest.$ac_ext <<_ACEOF
7030#line $LINENO "configure"
7031#include "confdefs.h"
7032$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007033#ifdef F77_DUMMY_MAIN
7034# ifdef __cplusplus
7035 extern "C"
7036# endif
7037 int F77_DUMMY_MAIN() { return 1; }
7038#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007039int
7040main ()
7041{
7042static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7043test_array [0] = 0
7044
7045 ;
7046 return 0;
7047}
7048_ACEOF
7049rm -f conftest.$ac_objext
7050if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7051 (eval $ac_compile) 2>&5
7052 ac_status=$?
7053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7054 (exit $ac_status); } &&
7055 { ac_try='test -s conftest.$ac_objext'
7056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7057 (eval $ac_try) 2>&5
7058 ac_status=$?
7059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7060 (exit $ac_status); }; }; then
7061 ac_hi=$ac_mid
7062else
7063 echo "$as_me: failed program was:" >&5
7064cat conftest.$ac_ext >&5
7065ac_lo=`expr '(' $ac_mid ')' + 1`
7066fi
7067rm -f conftest.$ac_objext conftest.$ac_ext
7068done
7069case $ac_lo in
7070?*) ac_cv_sizeof_short=$ac_lo;;
7071'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
7072echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
7073 { (exit 1); exit 1; }; } ;;
7074esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007075else
7076 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007077 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7078echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7079 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007080else
Martin v. Löwis11437992002-04-12 09:54:03 +00007081 cat >conftest.$ac_ext <<_ACEOF
7082#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007083#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007084$ac_includes_default
7085long longval () { return (long) (sizeof (short)); }
7086unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007087#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007088#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00007089#ifdef F77_DUMMY_MAIN
7090# ifdef __cplusplus
7091 extern "C"
7092# endif
7093 int F77_DUMMY_MAIN() { return 1; }
7094#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007095int
7096main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007097{
Martin v. Löwis11437992002-04-12 09:54:03 +00007098
7099 FILE *f = fopen ("conftest.val", "w");
7100 if (! f)
7101 exit (1);
7102 if (((long) (sizeof (short))) < 0)
7103 {
7104 long i = longval ();
7105 if (i != ((long) (sizeof (short))))
7106 exit (1);
7107 fprintf (f, "%ld\n", i);
7108 }
7109 else
7110 {
7111 unsigned long i = ulongval ();
7112 if (i != ((long) (sizeof (short))))
7113 exit (1);
7114 fprintf (f, "%lu\n", i);
7115 }
7116 exit (ferror (f) || fclose (f) != 0);
7117
7118 ;
7119 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007120}
Martin v. Löwis11437992002-04-12 09:54:03 +00007121_ACEOF
7122rm -f conftest$ac_exeext
7123if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7124 (eval $ac_link) 2>&5
7125 ac_status=$?
7126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7127 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7129 (eval $ac_try) 2>&5
7130 ac_status=$?
7131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7132 (exit $ac_status); }; }; then
7133 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007134else
Martin v. Löwis11437992002-04-12 09:54:03 +00007135 echo "$as_me: program exited with status $ac_status" >&5
7136echo "$as_me: failed program was:" >&5
7137cat conftest.$ac_ext >&5
7138( exit $ac_status )
7139{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
7140echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
7141 { (exit 1); exit 1; }; }
7142fi
Barry Warsawfe33b792003-01-07 22:42:49 +00007143rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007144fi
7145fi
7146rm -f conftest.val
7147else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007148 ac_cv_sizeof_short=0
7149fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007150fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007151echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7152echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7153cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007154#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007155_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007156
7157
Martin v. Löwis11437992002-04-12 09:54:03 +00007158echo "$as_me:$LINENO: checking for float" >&5
7159echo $ECHO_N "checking for float... $ECHO_C" >&6
7160if test "${ac_cv_type_float+set}" = set; then
7161 echo $ECHO_N "(cached) $ECHO_C" >&6
7162else
7163 cat >conftest.$ac_ext <<_ACEOF
7164#line $LINENO "configure"
7165#include "confdefs.h"
7166$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007167#ifdef F77_DUMMY_MAIN
7168# ifdef __cplusplus
7169 extern "C"
7170# endif
7171 int F77_DUMMY_MAIN() { return 1; }
7172#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007173int
7174main ()
7175{
7176if ((float *) 0)
7177 return 0;
7178if (sizeof (float))
7179 return 0;
7180 ;
7181 return 0;
7182}
7183_ACEOF
7184rm -f conftest.$ac_objext
7185if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7186 (eval $ac_compile) 2>&5
7187 ac_status=$?
7188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7189 (exit $ac_status); } &&
7190 { ac_try='test -s conftest.$ac_objext'
7191 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7192 (eval $ac_try) 2>&5
7193 ac_status=$?
7194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7195 (exit $ac_status); }; }; then
7196 ac_cv_type_float=yes
7197else
7198 echo "$as_me: failed program was:" >&5
7199cat conftest.$ac_ext >&5
7200ac_cv_type_float=no
7201fi
7202rm -f conftest.$ac_objext conftest.$ac_ext
7203fi
7204echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7205echo "${ECHO_T}$ac_cv_type_float" >&6
7206
7207echo "$as_me:$LINENO: checking size of float" >&5
7208echo $ECHO_N "checking size of float... $ECHO_C" >&6
7209if test "${ac_cv_sizeof_float+set}" = set; then
7210 echo $ECHO_N "(cached) $ECHO_C" >&6
7211else
7212 if test "$ac_cv_type_float" = yes; then
7213 # The cast to unsigned long works around a bug in the HP C Compiler
7214 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7215 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7216 # This bug is HP SR number 8606223364.
7217 if test "$cross_compiling" = yes; then
7218 # Depending upon the size, compute the lo and hi bounds.
7219cat >conftest.$ac_ext <<_ACEOF
7220#line $LINENO "configure"
7221#include "confdefs.h"
7222$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007223#ifdef F77_DUMMY_MAIN
7224# ifdef __cplusplus
7225 extern "C"
7226# endif
7227 int F77_DUMMY_MAIN() { return 1; }
7228#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007229int
7230main ()
7231{
7232static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7233test_array [0] = 0
7234
7235 ;
7236 return 0;
7237}
7238_ACEOF
7239rm -f conftest.$ac_objext
7240if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7241 (eval $ac_compile) 2>&5
7242 ac_status=$?
7243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7244 (exit $ac_status); } &&
7245 { ac_try='test -s conftest.$ac_objext'
7246 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7247 (eval $ac_try) 2>&5
7248 ac_status=$?
7249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7250 (exit $ac_status); }; }; then
7251 ac_lo=0 ac_mid=0
7252 while :; do
7253 cat >conftest.$ac_ext <<_ACEOF
7254#line $LINENO "configure"
7255#include "confdefs.h"
7256$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007257#ifdef F77_DUMMY_MAIN
7258# ifdef __cplusplus
7259 extern "C"
7260# endif
7261 int F77_DUMMY_MAIN() { return 1; }
7262#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007263int
7264main ()
7265{
7266static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7267test_array [0] = 0
7268
7269 ;
7270 return 0;
7271}
7272_ACEOF
7273rm -f conftest.$ac_objext
7274if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7275 (eval $ac_compile) 2>&5
7276 ac_status=$?
7277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7278 (exit $ac_status); } &&
7279 { ac_try='test -s conftest.$ac_objext'
7280 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7281 (eval $ac_try) 2>&5
7282 ac_status=$?
7283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7284 (exit $ac_status); }; }; then
7285 ac_hi=$ac_mid; break
7286else
7287 echo "$as_me: failed program was:" >&5
7288cat conftest.$ac_ext >&5
7289ac_lo=`expr $ac_mid + 1`
7290 if test $ac_lo -le $ac_mid; then
7291 ac_lo= ac_hi=
7292 break
7293 fi
7294 ac_mid=`expr 2 '*' $ac_mid + 1`
7295fi
7296rm -f conftest.$ac_objext conftest.$ac_ext
7297 done
7298else
7299 echo "$as_me: failed program was:" >&5
7300cat conftest.$ac_ext >&5
7301cat >conftest.$ac_ext <<_ACEOF
7302#line $LINENO "configure"
7303#include "confdefs.h"
7304$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007305#ifdef F77_DUMMY_MAIN
7306# ifdef __cplusplus
7307 extern "C"
7308# endif
7309 int F77_DUMMY_MAIN() { return 1; }
7310#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007311int
7312main ()
7313{
7314static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7315test_array [0] = 0
7316
7317 ;
7318 return 0;
7319}
7320_ACEOF
7321rm -f conftest.$ac_objext
7322if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7323 (eval $ac_compile) 2>&5
7324 ac_status=$?
7325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7326 (exit $ac_status); } &&
7327 { ac_try='test -s conftest.$ac_objext'
7328 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7329 (eval $ac_try) 2>&5
7330 ac_status=$?
7331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7332 (exit $ac_status); }; }; then
7333 ac_hi=-1 ac_mid=-1
7334 while :; do
7335 cat >conftest.$ac_ext <<_ACEOF
7336#line $LINENO "configure"
7337#include "confdefs.h"
7338$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007339#ifdef F77_DUMMY_MAIN
7340# ifdef __cplusplus
7341 extern "C"
7342# endif
7343 int F77_DUMMY_MAIN() { return 1; }
7344#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007345int
7346main ()
7347{
7348static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7349test_array [0] = 0
7350
7351 ;
7352 return 0;
7353}
7354_ACEOF
7355rm -f conftest.$ac_objext
7356if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7357 (eval $ac_compile) 2>&5
7358 ac_status=$?
7359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7360 (exit $ac_status); } &&
7361 { ac_try='test -s conftest.$ac_objext'
7362 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7363 (eval $ac_try) 2>&5
7364 ac_status=$?
7365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7366 (exit $ac_status); }; }; then
7367 ac_lo=$ac_mid; break
7368else
7369 echo "$as_me: failed program was:" >&5
7370cat conftest.$ac_ext >&5
7371ac_hi=`expr '(' $ac_mid ')' - 1`
7372 if test $ac_mid -le $ac_hi; then
7373 ac_lo= ac_hi=
7374 break
7375 fi
7376 ac_mid=`expr 2 '*' $ac_mid`
7377fi
7378rm -f conftest.$ac_objext conftest.$ac_ext
7379 done
7380else
7381 echo "$as_me: failed program was:" >&5
7382cat conftest.$ac_ext >&5
7383ac_lo= ac_hi=
7384fi
7385rm -f conftest.$ac_objext conftest.$ac_ext
7386fi
7387rm -f conftest.$ac_objext conftest.$ac_ext
7388# Binary search between lo and hi bounds.
7389while test "x$ac_lo" != "x$ac_hi"; do
7390 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7391 cat >conftest.$ac_ext <<_ACEOF
7392#line $LINENO "configure"
7393#include "confdefs.h"
7394$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007395#ifdef F77_DUMMY_MAIN
7396# ifdef __cplusplus
7397 extern "C"
7398# endif
7399 int F77_DUMMY_MAIN() { return 1; }
7400#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007401int
7402main ()
7403{
7404static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7405test_array [0] = 0
7406
7407 ;
7408 return 0;
7409}
7410_ACEOF
7411rm -f conftest.$ac_objext
7412if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7413 (eval $ac_compile) 2>&5
7414 ac_status=$?
7415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7416 (exit $ac_status); } &&
7417 { ac_try='test -s conftest.$ac_objext'
7418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7419 (eval $ac_try) 2>&5
7420 ac_status=$?
7421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7422 (exit $ac_status); }; }; then
7423 ac_hi=$ac_mid
7424else
7425 echo "$as_me: failed program was:" >&5
7426cat conftest.$ac_ext >&5
7427ac_lo=`expr '(' $ac_mid ')' + 1`
7428fi
7429rm -f conftest.$ac_objext conftest.$ac_ext
7430done
7431case $ac_lo in
7432?*) ac_cv_sizeof_float=$ac_lo;;
7433'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7434echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7435 { (exit 1); exit 1; }; } ;;
7436esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007437else
7438 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007439 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7440echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7441 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007442else
Martin v. Löwis11437992002-04-12 09:54:03 +00007443 cat >conftest.$ac_ext <<_ACEOF
7444#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007445#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007446$ac_includes_default
7447long longval () { return (long) (sizeof (float)); }
7448unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007449#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007450#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00007451#ifdef F77_DUMMY_MAIN
7452# ifdef __cplusplus
7453 extern "C"
7454# endif
7455 int F77_DUMMY_MAIN() { return 1; }
7456#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007457int
7458main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007459{
Martin v. Löwis11437992002-04-12 09:54:03 +00007460
7461 FILE *f = fopen ("conftest.val", "w");
7462 if (! f)
7463 exit (1);
7464 if (((long) (sizeof (float))) < 0)
7465 {
7466 long i = longval ();
7467 if (i != ((long) (sizeof (float))))
7468 exit (1);
7469 fprintf (f, "%ld\n", i);
7470 }
7471 else
7472 {
7473 unsigned long i = ulongval ();
7474 if (i != ((long) (sizeof (float))))
7475 exit (1);
7476 fprintf (f, "%lu\n", i);
7477 }
7478 exit (ferror (f) || fclose (f) != 0);
7479
7480 ;
7481 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007482}
Martin v. Löwis11437992002-04-12 09:54:03 +00007483_ACEOF
7484rm -f conftest$ac_exeext
7485if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7486 (eval $ac_link) 2>&5
7487 ac_status=$?
7488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7489 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7490 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7491 (eval $ac_try) 2>&5
7492 ac_status=$?
7493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7494 (exit $ac_status); }; }; then
7495 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007496else
Martin v. Löwis11437992002-04-12 09:54:03 +00007497 echo "$as_me: program exited with status $ac_status" >&5
7498echo "$as_me: failed program was:" >&5
7499cat conftest.$ac_ext >&5
7500( exit $ac_status )
7501{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7502echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7503 { (exit 1); exit 1; }; }
7504fi
Barry Warsawfe33b792003-01-07 22:42:49 +00007505rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007506fi
7507fi
7508rm -f conftest.val
7509else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007510 ac_cv_sizeof_float=0
7511fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007512fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007513echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7514echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7515cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007516#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007517_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007518
7519
Martin v. Löwis11437992002-04-12 09:54:03 +00007520echo "$as_me:$LINENO: checking for double" >&5
7521echo $ECHO_N "checking for double... $ECHO_C" >&6
7522if test "${ac_cv_type_double+set}" = set; then
7523 echo $ECHO_N "(cached) $ECHO_C" >&6
7524else
7525 cat >conftest.$ac_ext <<_ACEOF
7526#line $LINENO "configure"
7527#include "confdefs.h"
7528$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007529#ifdef F77_DUMMY_MAIN
7530# ifdef __cplusplus
7531 extern "C"
7532# endif
7533 int F77_DUMMY_MAIN() { return 1; }
7534#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007535int
7536main ()
7537{
7538if ((double *) 0)
7539 return 0;
7540if (sizeof (double))
7541 return 0;
7542 ;
7543 return 0;
7544}
7545_ACEOF
7546rm -f conftest.$ac_objext
7547if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7548 (eval $ac_compile) 2>&5
7549 ac_status=$?
7550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7551 (exit $ac_status); } &&
7552 { ac_try='test -s conftest.$ac_objext'
7553 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7554 (eval $ac_try) 2>&5
7555 ac_status=$?
7556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7557 (exit $ac_status); }; }; then
7558 ac_cv_type_double=yes
7559else
7560 echo "$as_me: failed program was:" >&5
7561cat conftest.$ac_ext >&5
7562ac_cv_type_double=no
7563fi
7564rm -f conftest.$ac_objext conftest.$ac_ext
7565fi
7566echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7567echo "${ECHO_T}$ac_cv_type_double" >&6
7568
7569echo "$as_me:$LINENO: checking size of double" >&5
7570echo $ECHO_N "checking size of double... $ECHO_C" >&6
7571if test "${ac_cv_sizeof_double+set}" = set; then
7572 echo $ECHO_N "(cached) $ECHO_C" >&6
7573else
7574 if test "$ac_cv_type_double" = yes; then
7575 # The cast to unsigned long works around a bug in the HP C Compiler
7576 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7577 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7578 # This bug is HP SR number 8606223364.
7579 if test "$cross_compiling" = yes; then
7580 # Depending upon the size, compute the lo and hi bounds.
7581cat >conftest.$ac_ext <<_ACEOF
7582#line $LINENO "configure"
7583#include "confdefs.h"
7584$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007585#ifdef F77_DUMMY_MAIN
7586# ifdef __cplusplus
7587 extern "C"
7588# endif
7589 int F77_DUMMY_MAIN() { return 1; }
7590#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007591int
7592main ()
7593{
7594static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7595test_array [0] = 0
7596
7597 ;
7598 return 0;
7599}
7600_ACEOF
7601rm -f conftest.$ac_objext
7602if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7603 (eval $ac_compile) 2>&5
7604 ac_status=$?
7605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7606 (exit $ac_status); } &&
7607 { ac_try='test -s conftest.$ac_objext'
7608 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7609 (eval $ac_try) 2>&5
7610 ac_status=$?
7611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7612 (exit $ac_status); }; }; then
7613 ac_lo=0 ac_mid=0
7614 while :; do
7615 cat >conftest.$ac_ext <<_ACEOF
7616#line $LINENO "configure"
7617#include "confdefs.h"
7618$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007619#ifdef F77_DUMMY_MAIN
7620# ifdef __cplusplus
7621 extern "C"
7622# endif
7623 int F77_DUMMY_MAIN() { return 1; }
7624#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007625int
7626main ()
7627{
7628static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7629test_array [0] = 0
7630
7631 ;
7632 return 0;
7633}
7634_ACEOF
7635rm -f conftest.$ac_objext
7636if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7637 (eval $ac_compile) 2>&5
7638 ac_status=$?
7639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7640 (exit $ac_status); } &&
7641 { ac_try='test -s conftest.$ac_objext'
7642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7643 (eval $ac_try) 2>&5
7644 ac_status=$?
7645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7646 (exit $ac_status); }; }; then
7647 ac_hi=$ac_mid; break
7648else
7649 echo "$as_me: failed program was:" >&5
7650cat conftest.$ac_ext >&5
7651ac_lo=`expr $ac_mid + 1`
7652 if test $ac_lo -le $ac_mid; then
7653 ac_lo= ac_hi=
7654 break
7655 fi
7656 ac_mid=`expr 2 '*' $ac_mid + 1`
7657fi
7658rm -f conftest.$ac_objext conftest.$ac_ext
7659 done
7660else
7661 echo "$as_me: failed program was:" >&5
7662cat conftest.$ac_ext >&5
7663cat >conftest.$ac_ext <<_ACEOF
7664#line $LINENO "configure"
7665#include "confdefs.h"
7666$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007667#ifdef F77_DUMMY_MAIN
7668# ifdef __cplusplus
7669 extern "C"
7670# endif
7671 int F77_DUMMY_MAIN() { return 1; }
7672#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007673int
7674main ()
7675{
7676static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7677test_array [0] = 0
7678
7679 ;
7680 return 0;
7681}
7682_ACEOF
7683rm -f conftest.$ac_objext
7684if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7685 (eval $ac_compile) 2>&5
7686 ac_status=$?
7687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7688 (exit $ac_status); } &&
7689 { ac_try='test -s conftest.$ac_objext'
7690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7691 (eval $ac_try) 2>&5
7692 ac_status=$?
7693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7694 (exit $ac_status); }; }; then
7695 ac_hi=-1 ac_mid=-1
7696 while :; do
7697 cat >conftest.$ac_ext <<_ACEOF
7698#line $LINENO "configure"
7699#include "confdefs.h"
7700$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007701#ifdef F77_DUMMY_MAIN
7702# ifdef __cplusplus
7703 extern "C"
7704# endif
7705 int F77_DUMMY_MAIN() { return 1; }
7706#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007707int
7708main ()
7709{
7710static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7711test_array [0] = 0
7712
7713 ;
7714 return 0;
7715}
7716_ACEOF
7717rm -f conftest.$ac_objext
7718if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7719 (eval $ac_compile) 2>&5
7720 ac_status=$?
7721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7722 (exit $ac_status); } &&
7723 { ac_try='test -s conftest.$ac_objext'
7724 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7725 (eval $ac_try) 2>&5
7726 ac_status=$?
7727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7728 (exit $ac_status); }; }; then
7729 ac_lo=$ac_mid; break
7730else
7731 echo "$as_me: failed program was:" >&5
7732cat conftest.$ac_ext >&5
7733ac_hi=`expr '(' $ac_mid ')' - 1`
7734 if test $ac_mid -le $ac_hi; then
7735 ac_lo= ac_hi=
7736 break
7737 fi
7738 ac_mid=`expr 2 '*' $ac_mid`
7739fi
7740rm -f conftest.$ac_objext conftest.$ac_ext
7741 done
7742else
7743 echo "$as_me: failed program was:" >&5
7744cat conftest.$ac_ext >&5
7745ac_lo= ac_hi=
7746fi
7747rm -f conftest.$ac_objext conftest.$ac_ext
7748fi
7749rm -f conftest.$ac_objext conftest.$ac_ext
7750# Binary search between lo and hi bounds.
7751while test "x$ac_lo" != "x$ac_hi"; do
7752 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7753 cat >conftest.$ac_ext <<_ACEOF
7754#line $LINENO "configure"
7755#include "confdefs.h"
7756$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007757#ifdef F77_DUMMY_MAIN
7758# ifdef __cplusplus
7759 extern "C"
7760# endif
7761 int F77_DUMMY_MAIN() { return 1; }
7762#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007763int
7764main ()
7765{
7766static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7767test_array [0] = 0
7768
7769 ;
7770 return 0;
7771}
7772_ACEOF
7773rm -f conftest.$ac_objext
7774if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7775 (eval $ac_compile) 2>&5
7776 ac_status=$?
7777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7778 (exit $ac_status); } &&
7779 { ac_try='test -s conftest.$ac_objext'
7780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7781 (eval $ac_try) 2>&5
7782 ac_status=$?
7783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7784 (exit $ac_status); }; }; then
7785 ac_hi=$ac_mid
7786else
7787 echo "$as_me: failed program was:" >&5
7788cat conftest.$ac_ext >&5
7789ac_lo=`expr '(' $ac_mid ')' + 1`
7790fi
7791rm -f conftest.$ac_objext conftest.$ac_ext
7792done
7793case $ac_lo in
7794?*) ac_cv_sizeof_double=$ac_lo;;
7795'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7796echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7797 { (exit 1); exit 1; }; } ;;
7798esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007799else
7800 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007801 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7802echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7803 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007804else
Martin v. Löwis11437992002-04-12 09:54:03 +00007805 cat >conftest.$ac_ext <<_ACEOF
7806#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007807#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007808$ac_includes_default
7809long longval () { return (long) (sizeof (double)); }
7810unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007811#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007812#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00007813#ifdef F77_DUMMY_MAIN
7814# ifdef __cplusplus
7815 extern "C"
7816# endif
7817 int F77_DUMMY_MAIN() { return 1; }
7818#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007819int
7820main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007821{
Martin v. Löwis11437992002-04-12 09:54:03 +00007822
7823 FILE *f = fopen ("conftest.val", "w");
7824 if (! f)
7825 exit (1);
7826 if (((long) (sizeof (double))) < 0)
7827 {
7828 long i = longval ();
7829 if (i != ((long) (sizeof (double))))
7830 exit (1);
7831 fprintf (f, "%ld\n", i);
7832 }
7833 else
7834 {
7835 unsigned long i = ulongval ();
7836 if (i != ((long) (sizeof (double))))
7837 exit (1);
7838 fprintf (f, "%lu\n", i);
7839 }
7840 exit (ferror (f) || fclose (f) != 0);
7841
7842 ;
7843 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007844}
Martin v. Löwis11437992002-04-12 09:54:03 +00007845_ACEOF
7846rm -f conftest$ac_exeext
7847if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7848 (eval $ac_link) 2>&5
7849 ac_status=$?
7850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7851 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7853 (eval $ac_try) 2>&5
7854 ac_status=$?
7855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7856 (exit $ac_status); }; }; then
7857 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007858else
Martin v. Löwis11437992002-04-12 09:54:03 +00007859 echo "$as_me: program exited with status $ac_status" >&5
7860echo "$as_me: failed program was:" >&5
7861cat conftest.$ac_ext >&5
7862( exit $ac_status )
7863{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7864echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7865 { (exit 1); exit 1; }; }
7866fi
Barry Warsawfe33b792003-01-07 22:42:49 +00007867rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007868fi
7869fi
7870rm -f conftest.val
7871else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007872 ac_cv_sizeof_double=0
7873fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007874fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007875echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7876echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7877cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007878#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007879_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007880
7881
Martin v. Löwis11437992002-04-12 09:54:03 +00007882echo "$as_me:$LINENO: checking for fpos_t" >&5
7883echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7884if test "${ac_cv_type_fpos_t+set}" = set; then
7885 echo $ECHO_N "(cached) $ECHO_C" >&6
7886else
7887 cat >conftest.$ac_ext <<_ACEOF
7888#line $LINENO "configure"
7889#include "confdefs.h"
7890$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007891#ifdef F77_DUMMY_MAIN
7892# ifdef __cplusplus
7893 extern "C"
7894# endif
7895 int F77_DUMMY_MAIN() { return 1; }
7896#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007897int
7898main ()
7899{
7900if ((fpos_t *) 0)
7901 return 0;
7902if (sizeof (fpos_t))
7903 return 0;
7904 ;
7905 return 0;
7906}
7907_ACEOF
7908rm -f conftest.$ac_objext
7909if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7910 (eval $ac_compile) 2>&5
7911 ac_status=$?
7912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7913 (exit $ac_status); } &&
7914 { ac_try='test -s conftest.$ac_objext'
7915 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7916 (eval $ac_try) 2>&5
7917 ac_status=$?
7918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7919 (exit $ac_status); }; }; then
7920 ac_cv_type_fpos_t=yes
7921else
7922 echo "$as_me: failed program was:" >&5
7923cat conftest.$ac_ext >&5
7924ac_cv_type_fpos_t=no
7925fi
7926rm -f conftest.$ac_objext conftest.$ac_ext
7927fi
7928echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7929echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7930
7931echo "$as_me:$LINENO: checking size of fpos_t" >&5
7932echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7933if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7934 echo $ECHO_N "(cached) $ECHO_C" >&6
7935else
7936 if test "$ac_cv_type_fpos_t" = yes; then
7937 # The cast to unsigned long works around a bug in the HP C Compiler
7938 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7939 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7940 # This bug is HP SR number 8606223364.
7941 if test "$cross_compiling" = yes; then
7942 # Depending upon the size, compute the lo and hi bounds.
7943cat >conftest.$ac_ext <<_ACEOF
7944#line $LINENO "configure"
7945#include "confdefs.h"
7946$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007947#ifdef F77_DUMMY_MAIN
7948# ifdef __cplusplus
7949 extern "C"
7950# endif
7951 int F77_DUMMY_MAIN() { return 1; }
7952#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007953int
7954main ()
7955{
7956static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7957test_array [0] = 0
7958
7959 ;
7960 return 0;
7961}
7962_ACEOF
7963rm -f conftest.$ac_objext
7964if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7965 (eval $ac_compile) 2>&5
7966 ac_status=$?
7967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7968 (exit $ac_status); } &&
7969 { ac_try='test -s conftest.$ac_objext'
7970 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7971 (eval $ac_try) 2>&5
7972 ac_status=$?
7973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7974 (exit $ac_status); }; }; then
7975 ac_lo=0 ac_mid=0
7976 while :; do
7977 cat >conftest.$ac_ext <<_ACEOF
7978#line $LINENO "configure"
7979#include "confdefs.h"
7980$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007981#ifdef F77_DUMMY_MAIN
7982# ifdef __cplusplus
7983 extern "C"
7984# endif
7985 int F77_DUMMY_MAIN() { return 1; }
7986#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007987int
7988main ()
7989{
7990static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7991test_array [0] = 0
7992
7993 ;
7994 return 0;
7995}
7996_ACEOF
7997rm -f conftest.$ac_objext
7998if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7999 (eval $ac_compile) 2>&5
8000 ac_status=$?
8001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8002 (exit $ac_status); } &&
8003 { ac_try='test -s conftest.$ac_objext'
8004 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8005 (eval $ac_try) 2>&5
8006 ac_status=$?
8007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8008 (exit $ac_status); }; }; then
8009 ac_hi=$ac_mid; break
8010else
8011 echo "$as_me: failed program was:" >&5
8012cat conftest.$ac_ext >&5
8013ac_lo=`expr $ac_mid + 1`
8014 if test $ac_lo -le $ac_mid; then
8015 ac_lo= ac_hi=
8016 break
8017 fi
8018 ac_mid=`expr 2 '*' $ac_mid + 1`
8019fi
8020rm -f conftest.$ac_objext conftest.$ac_ext
8021 done
8022else
8023 echo "$as_me: failed program was:" >&5
8024cat conftest.$ac_ext >&5
8025cat >conftest.$ac_ext <<_ACEOF
8026#line $LINENO "configure"
8027#include "confdefs.h"
8028$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008029#ifdef F77_DUMMY_MAIN
8030# ifdef __cplusplus
8031 extern "C"
8032# endif
8033 int F77_DUMMY_MAIN() { return 1; }
8034#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008035int
8036main ()
8037{
8038static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
8039test_array [0] = 0
8040
8041 ;
8042 return 0;
8043}
8044_ACEOF
8045rm -f conftest.$ac_objext
8046if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8047 (eval $ac_compile) 2>&5
8048 ac_status=$?
8049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8050 (exit $ac_status); } &&
8051 { ac_try='test -s conftest.$ac_objext'
8052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8053 (eval $ac_try) 2>&5
8054 ac_status=$?
8055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8056 (exit $ac_status); }; }; then
8057 ac_hi=-1 ac_mid=-1
8058 while :; do
8059 cat >conftest.$ac_ext <<_ACEOF
8060#line $LINENO "configure"
8061#include "confdefs.h"
8062$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008063#ifdef F77_DUMMY_MAIN
8064# ifdef __cplusplus
8065 extern "C"
8066# endif
8067 int F77_DUMMY_MAIN() { return 1; }
8068#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008069int
8070main ()
8071{
8072static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8073test_array [0] = 0
8074
8075 ;
8076 return 0;
8077}
8078_ACEOF
8079rm -f conftest.$ac_objext
8080if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8081 (eval $ac_compile) 2>&5
8082 ac_status=$?
8083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8084 (exit $ac_status); } &&
8085 { ac_try='test -s conftest.$ac_objext'
8086 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8087 (eval $ac_try) 2>&5
8088 ac_status=$?
8089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8090 (exit $ac_status); }; }; then
8091 ac_lo=$ac_mid; break
8092else
8093 echo "$as_me: failed program was:" >&5
8094cat conftest.$ac_ext >&5
8095ac_hi=`expr '(' $ac_mid ')' - 1`
8096 if test $ac_mid -le $ac_hi; then
8097 ac_lo= ac_hi=
8098 break
8099 fi
8100 ac_mid=`expr 2 '*' $ac_mid`
8101fi
8102rm -f conftest.$ac_objext conftest.$ac_ext
8103 done
8104else
8105 echo "$as_me: failed program was:" >&5
8106cat conftest.$ac_ext >&5
8107ac_lo= ac_hi=
8108fi
8109rm -f conftest.$ac_objext conftest.$ac_ext
8110fi
8111rm -f conftest.$ac_objext conftest.$ac_ext
8112# Binary search between lo and hi bounds.
8113while test "x$ac_lo" != "x$ac_hi"; do
8114 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8115 cat >conftest.$ac_ext <<_ACEOF
8116#line $LINENO "configure"
8117#include "confdefs.h"
8118$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008119#ifdef F77_DUMMY_MAIN
8120# ifdef __cplusplus
8121 extern "C"
8122# endif
8123 int F77_DUMMY_MAIN() { return 1; }
8124#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008125int
8126main ()
8127{
8128static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8129test_array [0] = 0
8130
8131 ;
8132 return 0;
8133}
8134_ACEOF
8135rm -f conftest.$ac_objext
8136if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8137 (eval $ac_compile) 2>&5
8138 ac_status=$?
8139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8140 (exit $ac_status); } &&
8141 { ac_try='test -s conftest.$ac_objext'
8142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8143 (eval $ac_try) 2>&5
8144 ac_status=$?
8145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8146 (exit $ac_status); }; }; then
8147 ac_hi=$ac_mid
8148else
8149 echo "$as_me: failed program was:" >&5
8150cat conftest.$ac_ext >&5
8151ac_lo=`expr '(' $ac_mid ')' + 1`
8152fi
8153rm -f conftest.$ac_objext conftest.$ac_ext
8154done
8155case $ac_lo in
8156?*) ac_cv_sizeof_fpos_t=$ac_lo;;
8157'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8158echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
8159 { (exit 1); exit 1; }; } ;;
8160esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008161else
8162 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008163 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8164echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8165 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008166else
Martin v. Löwis11437992002-04-12 09:54:03 +00008167 cat >conftest.$ac_ext <<_ACEOF
8168#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008169#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008170$ac_includes_default
8171long longval () { return (long) (sizeof (fpos_t)); }
8172unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008173#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008174#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00008175#ifdef F77_DUMMY_MAIN
8176# ifdef __cplusplus
8177 extern "C"
8178# endif
8179 int F77_DUMMY_MAIN() { return 1; }
8180#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008181int
8182main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008183{
Martin v. Löwis11437992002-04-12 09:54:03 +00008184
8185 FILE *f = fopen ("conftest.val", "w");
8186 if (! f)
8187 exit (1);
8188 if (((long) (sizeof (fpos_t))) < 0)
8189 {
8190 long i = longval ();
8191 if (i != ((long) (sizeof (fpos_t))))
8192 exit (1);
8193 fprintf (f, "%ld\n", i);
8194 }
8195 else
8196 {
8197 unsigned long i = ulongval ();
8198 if (i != ((long) (sizeof (fpos_t))))
8199 exit (1);
8200 fprintf (f, "%lu\n", i);
8201 }
8202 exit (ferror (f) || fclose (f) != 0);
8203
8204 ;
8205 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008206}
Martin v. Löwis11437992002-04-12 09:54:03 +00008207_ACEOF
8208rm -f conftest$ac_exeext
8209if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8210 (eval $ac_link) 2>&5
8211 ac_status=$?
8212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8213 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8214 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8215 (eval $ac_try) 2>&5
8216 ac_status=$?
8217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8218 (exit $ac_status); }; }; then
8219 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008220else
Martin v. Löwis11437992002-04-12 09:54:03 +00008221 echo "$as_me: program exited with status $ac_status" >&5
8222echo "$as_me: failed program was:" >&5
8223cat conftest.$ac_ext >&5
8224( exit $ac_status )
8225{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8226echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
8227 { (exit 1); exit 1; }; }
8228fi
Barry Warsawfe33b792003-01-07 22:42:49 +00008229rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008230fi
8231fi
8232rm -f conftest.val
8233else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008234 ac_cv_sizeof_fpos_t=0
8235fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008236fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008237echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8238echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8239cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008240#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008241_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008242
Michael W. Hudson54241132001-12-07 15:38:26 +00008243
8244
Martin v. Löwis11437992002-04-12 09:54:03 +00008245echo "$as_me:$LINENO: checking for long long support" >&5
8246echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008247have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008248cat >conftest.$ac_ext <<_ACEOF
8249#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008250#include "confdefs.h"
8251
Barry Warsawfe33b792003-01-07 22:42:49 +00008252#ifdef F77_DUMMY_MAIN
8253# ifdef __cplusplus
8254 extern "C"
8255# endif
8256 int F77_DUMMY_MAIN() { return 1; }
8257#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008258int
8259main ()
8260{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008261long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008262 ;
8263 return 0;
8264}
8265_ACEOF
8266rm -f conftest.$ac_objext
8267if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8268 (eval $ac_compile) 2>&5
8269 ac_status=$?
8270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8271 (exit $ac_status); } &&
8272 { ac_try='test -s conftest.$ac_objext'
8273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8274 (eval $ac_try) 2>&5
8275 ac_status=$?
8276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8277 (exit $ac_status); }; }; then
8278
8279
8280cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008281#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008282_ACEOF
8283
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008284 have_long_long=yes
8285
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008286else
Martin v. Löwis11437992002-04-12 09:54:03 +00008287 echo "$as_me: failed program was:" >&5
8288cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008289fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008290rm -f conftest.$ac_objext conftest.$ac_ext
8291echo "$as_me:$LINENO: result: $have_long_long" >&5
8292echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008293if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008294echo "$as_me:$LINENO: checking for long long" >&5
8295echo $ECHO_N "checking for long long... $ECHO_C" >&6
8296if test "${ac_cv_type_long_long+set}" = set; then
8297 echo $ECHO_N "(cached) $ECHO_C" >&6
8298else
8299 cat >conftest.$ac_ext <<_ACEOF
8300#line $LINENO "configure"
8301#include "confdefs.h"
8302$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008303#ifdef F77_DUMMY_MAIN
8304# ifdef __cplusplus
8305 extern "C"
8306# endif
8307 int F77_DUMMY_MAIN() { return 1; }
8308#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008309int
8310main ()
8311{
8312if ((long long *) 0)
8313 return 0;
8314if (sizeof (long long))
8315 return 0;
8316 ;
8317 return 0;
8318}
8319_ACEOF
8320rm -f conftest.$ac_objext
8321if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8322 (eval $ac_compile) 2>&5
8323 ac_status=$?
8324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8325 (exit $ac_status); } &&
8326 { ac_try='test -s conftest.$ac_objext'
8327 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8328 (eval $ac_try) 2>&5
8329 ac_status=$?
8330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8331 (exit $ac_status); }; }; then
8332 ac_cv_type_long_long=yes
8333else
8334 echo "$as_me: failed program was:" >&5
8335cat conftest.$ac_ext >&5
8336ac_cv_type_long_long=no
8337fi
8338rm -f conftest.$ac_objext conftest.$ac_ext
8339fi
8340echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8341echo "${ECHO_T}$ac_cv_type_long_long" >&6
8342
8343echo "$as_me:$LINENO: checking size of long long" >&5
8344echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8345if test "${ac_cv_sizeof_long_long+set}" = set; then
8346 echo $ECHO_N "(cached) $ECHO_C" >&6
8347else
8348 if test "$ac_cv_type_long_long" = yes; then
8349 # The cast to unsigned long works around a bug in the HP C Compiler
8350 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8351 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8352 # This bug is HP SR number 8606223364.
8353 if test "$cross_compiling" = yes; then
8354 # Depending upon the size, compute the lo and hi bounds.
8355cat >conftest.$ac_ext <<_ACEOF
8356#line $LINENO "configure"
8357#include "confdefs.h"
8358$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008359#ifdef F77_DUMMY_MAIN
8360# ifdef __cplusplus
8361 extern "C"
8362# endif
8363 int F77_DUMMY_MAIN() { return 1; }
8364#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008365int
8366main ()
8367{
8368static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8369test_array [0] = 0
8370
8371 ;
8372 return 0;
8373}
8374_ACEOF
8375rm -f conftest.$ac_objext
8376if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8377 (eval $ac_compile) 2>&5
8378 ac_status=$?
8379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8380 (exit $ac_status); } &&
8381 { ac_try='test -s conftest.$ac_objext'
8382 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8383 (eval $ac_try) 2>&5
8384 ac_status=$?
8385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8386 (exit $ac_status); }; }; then
8387 ac_lo=0 ac_mid=0
8388 while :; do
8389 cat >conftest.$ac_ext <<_ACEOF
8390#line $LINENO "configure"
8391#include "confdefs.h"
8392$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008393#ifdef F77_DUMMY_MAIN
8394# ifdef __cplusplus
8395 extern "C"
8396# endif
8397 int F77_DUMMY_MAIN() { return 1; }
8398#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008399int
8400main ()
8401{
8402static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8403test_array [0] = 0
8404
8405 ;
8406 return 0;
8407}
8408_ACEOF
8409rm -f conftest.$ac_objext
8410if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8411 (eval $ac_compile) 2>&5
8412 ac_status=$?
8413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8414 (exit $ac_status); } &&
8415 { ac_try='test -s conftest.$ac_objext'
8416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8417 (eval $ac_try) 2>&5
8418 ac_status=$?
8419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8420 (exit $ac_status); }; }; then
8421 ac_hi=$ac_mid; break
8422else
8423 echo "$as_me: failed program was:" >&5
8424cat conftest.$ac_ext >&5
8425ac_lo=`expr $ac_mid + 1`
8426 if test $ac_lo -le $ac_mid; then
8427 ac_lo= ac_hi=
8428 break
8429 fi
8430 ac_mid=`expr 2 '*' $ac_mid + 1`
8431fi
8432rm -f conftest.$ac_objext conftest.$ac_ext
8433 done
8434else
8435 echo "$as_me: failed program was:" >&5
8436cat conftest.$ac_ext >&5
8437cat >conftest.$ac_ext <<_ACEOF
8438#line $LINENO "configure"
8439#include "confdefs.h"
8440$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008441#ifdef F77_DUMMY_MAIN
8442# ifdef __cplusplus
8443 extern "C"
8444# endif
8445 int F77_DUMMY_MAIN() { return 1; }
8446#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008447int
8448main ()
8449{
8450static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8451test_array [0] = 0
8452
8453 ;
8454 return 0;
8455}
8456_ACEOF
8457rm -f conftest.$ac_objext
8458if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8459 (eval $ac_compile) 2>&5
8460 ac_status=$?
8461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8462 (exit $ac_status); } &&
8463 { ac_try='test -s conftest.$ac_objext'
8464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8465 (eval $ac_try) 2>&5
8466 ac_status=$?
8467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8468 (exit $ac_status); }; }; then
8469 ac_hi=-1 ac_mid=-1
8470 while :; do
8471 cat >conftest.$ac_ext <<_ACEOF
8472#line $LINENO "configure"
8473#include "confdefs.h"
8474$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008475#ifdef F77_DUMMY_MAIN
8476# ifdef __cplusplus
8477 extern "C"
8478# endif
8479 int F77_DUMMY_MAIN() { return 1; }
8480#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008481int
8482main ()
8483{
8484static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8485test_array [0] = 0
8486
8487 ;
8488 return 0;
8489}
8490_ACEOF
8491rm -f conftest.$ac_objext
8492if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8493 (eval $ac_compile) 2>&5
8494 ac_status=$?
8495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8496 (exit $ac_status); } &&
8497 { ac_try='test -s conftest.$ac_objext'
8498 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8499 (eval $ac_try) 2>&5
8500 ac_status=$?
8501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8502 (exit $ac_status); }; }; then
8503 ac_lo=$ac_mid; break
8504else
8505 echo "$as_me: failed program was:" >&5
8506cat conftest.$ac_ext >&5
8507ac_hi=`expr '(' $ac_mid ')' - 1`
8508 if test $ac_mid -le $ac_hi; then
8509 ac_lo= ac_hi=
8510 break
8511 fi
8512 ac_mid=`expr 2 '*' $ac_mid`
8513fi
8514rm -f conftest.$ac_objext conftest.$ac_ext
8515 done
8516else
8517 echo "$as_me: failed program was:" >&5
8518cat conftest.$ac_ext >&5
8519ac_lo= ac_hi=
8520fi
8521rm -f conftest.$ac_objext conftest.$ac_ext
8522fi
8523rm -f conftest.$ac_objext conftest.$ac_ext
8524# Binary search between lo and hi bounds.
8525while test "x$ac_lo" != "x$ac_hi"; do
8526 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8527 cat >conftest.$ac_ext <<_ACEOF
8528#line $LINENO "configure"
8529#include "confdefs.h"
8530$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008531#ifdef F77_DUMMY_MAIN
8532# ifdef __cplusplus
8533 extern "C"
8534# endif
8535 int F77_DUMMY_MAIN() { return 1; }
8536#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008537int
8538main ()
8539{
8540static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8541test_array [0] = 0
8542
8543 ;
8544 return 0;
8545}
8546_ACEOF
8547rm -f conftest.$ac_objext
8548if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8549 (eval $ac_compile) 2>&5
8550 ac_status=$?
8551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8552 (exit $ac_status); } &&
8553 { ac_try='test -s conftest.$ac_objext'
8554 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8555 (eval $ac_try) 2>&5
8556 ac_status=$?
8557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8558 (exit $ac_status); }; }; then
8559 ac_hi=$ac_mid
8560else
8561 echo "$as_me: failed program was:" >&5
8562cat conftest.$ac_ext >&5
8563ac_lo=`expr '(' $ac_mid ')' + 1`
8564fi
8565rm -f conftest.$ac_objext conftest.$ac_ext
8566done
8567case $ac_lo in
8568?*) ac_cv_sizeof_long_long=$ac_lo;;
8569'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8570echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8571 { (exit 1); exit 1; }; } ;;
8572esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008573else
8574 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008575 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8576echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8577 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008578else
Martin v. Löwis11437992002-04-12 09:54:03 +00008579 cat >conftest.$ac_ext <<_ACEOF
8580#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008581#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008582$ac_includes_default
8583long longval () { return (long) (sizeof (long long)); }
8584unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008585#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008586#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00008587#ifdef F77_DUMMY_MAIN
8588# ifdef __cplusplus
8589 extern "C"
8590# endif
8591 int F77_DUMMY_MAIN() { return 1; }
8592#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008593int
8594main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008595{
Martin v. Löwis11437992002-04-12 09:54:03 +00008596
8597 FILE *f = fopen ("conftest.val", "w");
8598 if (! f)
8599 exit (1);
8600 if (((long) (sizeof (long long))) < 0)
8601 {
8602 long i = longval ();
8603 if (i != ((long) (sizeof (long long))))
8604 exit (1);
8605 fprintf (f, "%ld\n", i);
8606 }
8607 else
8608 {
8609 unsigned long i = ulongval ();
8610 if (i != ((long) (sizeof (long long))))
8611 exit (1);
8612 fprintf (f, "%lu\n", i);
8613 }
8614 exit (ferror (f) || fclose (f) != 0);
8615
8616 ;
8617 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008618}
Martin v. Löwis11437992002-04-12 09:54:03 +00008619_ACEOF
8620rm -f conftest$ac_exeext
8621if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8622 (eval $ac_link) 2>&5
8623 ac_status=$?
8624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8625 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8627 (eval $ac_try) 2>&5
8628 ac_status=$?
8629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8630 (exit $ac_status); }; }; then
8631 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008632else
Martin v. Löwis11437992002-04-12 09:54:03 +00008633 echo "$as_me: program exited with status $ac_status" >&5
8634echo "$as_me: failed program was:" >&5
8635cat conftest.$ac_ext >&5
8636( exit $ac_status )
8637{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8638echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8639 { (exit 1); exit 1; }; }
8640fi
Barry Warsawfe33b792003-01-07 22:42:49 +00008641rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008642fi
8643fi
8644rm -f conftest.val
8645else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008646 ac_cv_sizeof_long_long=0
8647fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008648fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008649echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8650echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8651cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008652#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008653_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008654
Michael W. Hudson54241132001-12-07 15:38:26 +00008655
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008656fi
8657
Martin v. Löwis11437992002-04-12 09:54:03 +00008658echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8659echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008660have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008661cat >conftest.$ac_ext <<_ACEOF
8662#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008663#include "confdefs.h"
8664
Barry Warsawfe33b792003-01-07 22:42:49 +00008665#ifdef F77_DUMMY_MAIN
8666# ifdef __cplusplus
8667 extern "C"
8668# endif
8669 int F77_DUMMY_MAIN() { return 1; }
8670#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008671int
8672main ()
8673{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008674uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008675 ;
8676 return 0;
8677}
8678_ACEOF
8679rm -f conftest.$ac_objext
8680if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8681 (eval $ac_compile) 2>&5
8682 ac_status=$?
8683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8684 (exit $ac_status); } &&
8685 { ac_try='test -s conftest.$ac_objext'
8686 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8687 (eval $ac_try) 2>&5
8688 ac_status=$?
8689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8690 (exit $ac_status); }; }; then
8691
8692
8693cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008694#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008695_ACEOF
8696
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008697 have_uintptr_t=yes
8698
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008699else
Martin v. Löwis11437992002-04-12 09:54:03 +00008700 echo "$as_me: failed program was:" >&5
8701cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008702fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008703rm -f conftest.$ac_objext conftest.$ac_ext
8704echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8705echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008706if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008707echo "$as_me:$LINENO: checking for uintptr_t" >&5
8708echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8709if test "${ac_cv_type_uintptr_t+set}" = set; then
8710 echo $ECHO_N "(cached) $ECHO_C" >&6
8711else
8712 cat >conftest.$ac_ext <<_ACEOF
8713#line $LINENO "configure"
8714#include "confdefs.h"
8715$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008716#ifdef F77_DUMMY_MAIN
8717# ifdef __cplusplus
8718 extern "C"
8719# endif
8720 int F77_DUMMY_MAIN() { return 1; }
8721#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008722int
8723main ()
8724{
8725if ((uintptr_t *) 0)
8726 return 0;
8727if (sizeof (uintptr_t))
8728 return 0;
8729 ;
8730 return 0;
8731}
8732_ACEOF
8733rm -f conftest.$ac_objext
8734if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8735 (eval $ac_compile) 2>&5
8736 ac_status=$?
8737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8738 (exit $ac_status); } &&
8739 { ac_try='test -s conftest.$ac_objext'
8740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8741 (eval $ac_try) 2>&5
8742 ac_status=$?
8743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8744 (exit $ac_status); }; }; then
8745 ac_cv_type_uintptr_t=yes
8746else
8747 echo "$as_me: failed program was:" >&5
8748cat conftest.$ac_ext >&5
8749ac_cv_type_uintptr_t=no
8750fi
8751rm -f conftest.$ac_objext conftest.$ac_ext
8752fi
8753echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8754echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8755
8756echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8757echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8758if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8759 echo $ECHO_N "(cached) $ECHO_C" >&6
8760else
8761 if test "$ac_cv_type_uintptr_t" = yes; then
8762 # The cast to unsigned long works around a bug in the HP C Compiler
8763 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8764 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8765 # This bug is HP SR number 8606223364.
8766 if test "$cross_compiling" = yes; then
8767 # Depending upon the size, compute the lo and hi bounds.
8768cat >conftest.$ac_ext <<_ACEOF
8769#line $LINENO "configure"
8770#include "confdefs.h"
8771$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008772#ifdef F77_DUMMY_MAIN
8773# ifdef __cplusplus
8774 extern "C"
8775# endif
8776 int F77_DUMMY_MAIN() { return 1; }
8777#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008778int
8779main ()
8780{
8781static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8782test_array [0] = 0
8783
8784 ;
8785 return 0;
8786}
8787_ACEOF
8788rm -f conftest.$ac_objext
8789if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8790 (eval $ac_compile) 2>&5
8791 ac_status=$?
8792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8793 (exit $ac_status); } &&
8794 { ac_try='test -s conftest.$ac_objext'
8795 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8796 (eval $ac_try) 2>&5
8797 ac_status=$?
8798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799 (exit $ac_status); }; }; then
8800 ac_lo=0 ac_mid=0
8801 while :; do
8802 cat >conftest.$ac_ext <<_ACEOF
8803#line $LINENO "configure"
8804#include "confdefs.h"
8805$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008806#ifdef F77_DUMMY_MAIN
8807# ifdef __cplusplus
8808 extern "C"
8809# endif
8810 int F77_DUMMY_MAIN() { return 1; }
8811#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008812int
8813main ()
8814{
8815static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8816test_array [0] = 0
8817
8818 ;
8819 return 0;
8820}
8821_ACEOF
8822rm -f conftest.$ac_objext
8823if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8824 (eval $ac_compile) 2>&5
8825 ac_status=$?
8826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8827 (exit $ac_status); } &&
8828 { ac_try='test -s conftest.$ac_objext'
8829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8830 (eval $ac_try) 2>&5
8831 ac_status=$?
8832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8833 (exit $ac_status); }; }; then
8834 ac_hi=$ac_mid; break
8835else
8836 echo "$as_me: failed program was:" >&5
8837cat conftest.$ac_ext >&5
8838ac_lo=`expr $ac_mid + 1`
8839 if test $ac_lo -le $ac_mid; then
8840 ac_lo= ac_hi=
8841 break
8842 fi
8843 ac_mid=`expr 2 '*' $ac_mid + 1`
8844fi
8845rm -f conftest.$ac_objext conftest.$ac_ext
8846 done
8847else
8848 echo "$as_me: failed program was:" >&5
8849cat conftest.$ac_ext >&5
8850cat >conftest.$ac_ext <<_ACEOF
8851#line $LINENO "configure"
8852#include "confdefs.h"
8853$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008854#ifdef F77_DUMMY_MAIN
8855# ifdef __cplusplus
8856 extern "C"
8857# endif
8858 int F77_DUMMY_MAIN() { return 1; }
8859#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008860int
8861main ()
8862{
8863static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8864test_array [0] = 0
8865
8866 ;
8867 return 0;
8868}
8869_ACEOF
8870rm -f conftest.$ac_objext
8871if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8872 (eval $ac_compile) 2>&5
8873 ac_status=$?
8874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8875 (exit $ac_status); } &&
8876 { ac_try='test -s conftest.$ac_objext'
8877 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8878 (eval $ac_try) 2>&5
8879 ac_status=$?
8880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8881 (exit $ac_status); }; }; then
8882 ac_hi=-1 ac_mid=-1
8883 while :; do
8884 cat >conftest.$ac_ext <<_ACEOF
8885#line $LINENO "configure"
8886#include "confdefs.h"
8887$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008888#ifdef F77_DUMMY_MAIN
8889# ifdef __cplusplus
8890 extern "C"
8891# endif
8892 int F77_DUMMY_MAIN() { return 1; }
8893#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008894int
8895main ()
8896{
8897static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8898test_array [0] = 0
8899
8900 ;
8901 return 0;
8902}
8903_ACEOF
8904rm -f conftest.$ac_objext
8905if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8906 (eval $ac_compile) 2>&5
8907 ac_status=$?
8908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8909 (exit $ac_status); } &&
8910 { ac_try='test -s conftest.$ac_objext'
8911 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8912 (eval $ac_try) 2>&5
8913 ac_status=$?
8914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8915 (exit $ac_status); }; }; then
8916 ac_lo=$ac_mid; break
8917else
8918 echo "$as_me: failed program was:" >&5
8919cat conftest.$ac_ext >&5
8920ac_hi=`expr '(' $ac_mid ')' - 1`
8921 if test $ac_mid -le $ac_hi; then
8922 ac_lo= ac_hi=
8923 break
8924 fi
8925 ac_mid=`expr 2 '*' $ac_mid`
8926fi
8927rm -f conftest.$ac_objext conftest.$ac_ext
8928 done
8929else
8930 echo "$as_me: failed program was:" >&5
8931cat conftest.$ac_ext >&5
8932ac_lo= ac_hi=
8933fi
8934rm -f conftest.$ac_objext conftest.$ac_ext
8935fi
8936rm -f conftest.$ac_objext conftest.$ac_ext
8937# Binary search between lo and hi bounds.
8938while test "x$ac_lo" != "x$ac_hi"; do
8939 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8940 cat >conftest.$ac_ext <<_ACEOF
8941#line $LINENO "configure"
8942#include "confdefs.h"
8943$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008944#ifdef F77_DUMMY_MAIN
8945# ifdef __cplusplus
8946 extern "C"
8947# endif
8948 int F77_DUMMY_MAIN() { return 1; }
8949#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008950int
8951main ()
8952{
8953static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8954test_array [0] = 0
8955
8956 ;
8957 return 0;
8958}
8959_ACEOF
8960rm -f conftest.$ac_objext
8961if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8962 (eval $ac_compile) 2>&5
8963 ac_status=$?
8964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8965 (exit $ac_status); } &&
8966 { ac_try='test -s conftest.$ac_objext'
8967 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8968 (eval $ac_try) 2>&5
8969 ac_status=$?
8970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8971 (exit $ac_status); }; }; then
8972 ac_hi=$ac_mid
8973else
8974 echo "$as_me: failed program was:" >&5
8975cat conftest.$ac_ext >&5
8976ac_lo=`expr '(' $ac_mid ')' + 1`
8977fi
8978rm -f conftest.$ac_objext conftest.$ac_ext
8979done
8980case $ac_lo in
8981?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8982'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8983echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8984 { (exit 1); exit 1; }; } ;;
8985esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008986else
8987 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008988 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8989echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8990 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008991else
Martin v. Löwis11437992002-04-12 09:54:03 +00008992 cat >conftest.$ac_ext <<_ACEOF
8993#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008994#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008995$ac_includes_default
8996long longval () { return (long) (sizeof (uintptr_t)); }
8997unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008998#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008999#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00009000#ifdef F77_DUMMY_MAIN
9001# ifdef __cplusplus
9002 extern "C"
9003# endif
9004 int F77_DUMMY_MAIN() { return 1; }
9005#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009006int
9007main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009008{
Martin v. Löwis11437992002-04-12 09:54:03 +00009009
9010 FILE *f = fopen ("conftest.val", "w");
9011 if (! f)
9012 exit (1);
9013 if (((long) (sizeof (uintptr_t))) < 0)
9014 {
9015 long i = longval ();
9016 if (i != ((long) (sizeof (uintptr_t))))
9017 exit (1);
9018 fprintf (f, "%ld\n", i);
9019 }
9020 else
9021 {
9022 unsigned long i = ulongval ();
9023 if (i != ((long) (sizeof (uintptr_t))))
9024 exit (1);
9025 fprintf (f, "%lu\n", i);
9026 }
9027 exit (ferror (f) || fclose (f) != 0);
9028
9029 ;
9030 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009031}
Martin v. Löwis11437992002-04-12 09:54:03 +00009032_ACEOF
9033rm -f conftest$ac_exeext
9034if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9035 (eval $ac_link) 2>&5
9036 ac_status=$?
9037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9038 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9039 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9040 (eval $ac_try) 2>&5
9041 ac_status=$?
9042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9043 (exit $ac_status); }; }; then
9044 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009045else
Martin v. Löwis11437992002-04-12 09:54:03 +00009046 echo "$as_me: program exited with status $ac_status" >&5
9047echo "$as_me: failed program was:" >&5
9048cat conftest.$ac_ext >&5
9049( exit $ac_status )
9050{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
9051echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
9052 { (exit 1); exit 1; }; }
9053fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009054rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009055fi
9056fi
9057rm -f conftest.val
9058else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009059 ac_cv_sizeof_uintptr_t=0
9060fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009061fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009062echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
9063echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
9064cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009065#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009066_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009067
Michael W. Hudson54241132001-12-07 15:38:26 +00009068
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009069fi
9070
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009071# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009072echo "$as_me:$LINENO: checking size of off_t" >&5
9073echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
9074if test "${ac_cv_sizeof_off_t+set}" = set; then
9075 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009076else
9077 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009078 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009079else
Martin v. Löwis11437992002-04-12 09:54:03 +00009080 cat >conftest.$ac_ext <<_ACEOF
9081#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009082#include "confdefs.h"
9083#include <stdio.h>
9084#include <sys/types.h>
9085main()
9086{
9087 FILE *f=fopen("conftestval", "w");
9088 if (!f) exit(1);
9089 fprintf(f, "%d\n", sizeof(off_t));
9090 exit(0);
9091}
Martin v. Löwis11437992002-04-12 09:54:03 +00009092_ACEOF
9093rm -f conftest$ac_exeext
9094if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9095 (eval $ac_link) 2>&5
9096 ac_status=$?
9097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9098 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9099 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9100 (eval $ac_try) 2>&5
9101 ac_status=$?
9102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9103 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009104 ac_cv_sizeof_off_t=`cat conftestval`
9105else
Martin v. Löwis11437992002-04-12 09:54:03 +00009106 echo "$as_me: program exited with status $ac_status" >&5
9107echo "$as_me: failed program was:" >&5
9108cat conftest.$ac_ext >&5
9109( exit $ac_status )
9110ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009111fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009112rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009113fi
9114
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009115fi
9116
Martin v. Löwis11437992002-04-12 09:54:03 +00009117echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
9118echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
9119
9120cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009121#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009122_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009123
Michael W. Hudson54241132001-12-07 15:38:26 +00009124
Martin v. Löwis11437992002-04-12 09:54:03 +00009125echo "$as_me:$LINENO: checking whether to enable large file support" >&5
9126echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009127if test "$have_long_long" = yes -a \
9128 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
9129 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009130
Martin v. Löwis11437992002-04-12 09:54:03 +00009131cat >>confdefs.h <<\_ACEOF
9132#define HAVE_LARGEFILE_SUPPORT 1
9133_ACEOF
9134
9135 echo "$as_me:$LINENO: result: yes" >&5
9136echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009137else
Martin v. Löwis11437992002-04-12 09:54:03 +00009138 echo "$as_me:$LINENO: result: no" >&5
9139echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009140fi
9141
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009142# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009143echo "$as_me:$LINENO: checking size of time_t" >&5
9144echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
9145if test "${ac_cv_sizeof_time_t+set}" = set; then
9146 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009147else
9148 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009149 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009150else
Martin v. Löwis11437992002-04-12 09:54:03 +00009151 cat >conftest.$ac_ext <<_ACEOF
9152#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009153#include "confdefs.h"
9154#include <stdio.h>
9155#include <time.h>
9156main()
9157{
9158 FILE *f=fopen("conftestval", "w");
9159 if (!f) exit(1);
9160 fprintf(f, "%d\n", sizeof(time_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 Rossumb9a22a12000-06-30 02:48:53 +00009175 ac_cv_sizeof_time_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_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009182fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009183rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009184fi
9185
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009186fi
9187
Martin v. Löwis11437992002-04-12 09:54:03 +00009188echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9189echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9190
9191cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009192#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009193_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009194
Michael W. Hudson54241132001-12-07 15:38:26 +00009195
9196
Trent Mick635f6fb2000-08-23 21:33:05 +00009197# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009198ac_save_cc="$CC"
9199if test "$ac_cv_kpthread" = "yes"
9200then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009201elif test "$ac_cv_kthread" = "yes"
9202then CC="$CC -Kthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009203fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009204echo "$as_me:$LINENO: checking for pthread_t" >&5
9205echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009206have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009207cat >conftest.$ac_ext <<_ACEOF
9208#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009209#include "confdefs.h"
9210#include <pthread.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00009211#ifdef F77_DUMMY_MAIN
9212# ifdef __cplusplus
9213 extern "C"
9214# endif
9215 int F77_DUMMY_MAIN() { return 1; }
9216#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009217int
9218main ()
9219{
Guido van Rossum12580492000-09-24 16:47:19 +00009220pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009221 ;
9222 return 0;
9223}
9224_ACEOF
9225rm -f conftest.$ac_objext
9226if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9227 (eval $ac_compile) 2>&5
9228 ac_status=$?
9229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9230 (exit $ac_status); } &&
9231 { ac_try='test -s conftest.$ac_objext'
9232 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9233 (eval $ac_try) 2>&5
9234 ac_status=$?
9235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9236 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009237 have_pthread_t=yes
9238else
Martin v. Löwis11437992002-04-12 09:54:03 +00009239 echo "$as_me: failed program was:" >&5
9240cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00009241fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009242rm -f conftest.$ac_objext conftest.$ac_ext
9243echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9244echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009245if test "$have_pthread_t" = yes ; then
9246 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009247 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9248echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9249 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9250 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009251else
9252 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009253 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009254else
Martin v. Löwis11437992002-04-12 09:54:03 +00009255 cat >conftest.$ac_ext <<_ACEOF
9256#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009257#include "confdefs.h"
9258#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009259#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +00009260 main()
9261 {
9262 FILE *f=fopen("conftestval", "w");
9263 if (!f) exit(1);
9264 fprintf(f, "%d\n", sizeof(pthread_t));
9265 exit(0);
9266 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009267_ACEOF
9268rm -f conftest$ac_exeext
9269if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9270 (eval $ac_link) 2>&5
9271 ac_status=$?
9272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9273 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9275 (eval $ac_try) 2>&5
9276 ac_status=$?
9277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9278 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009279 ac_cv_sizeof_pthread_t=`cat conftestval`
9280else
Martin v. Löwis11437992002-04-12 09:54:03 +00009281 echo "$as_me: program exited with status $ac_status" >&5
9282echo "$as_me: failed program was:" >&5
9283cat conftest.$ac_ext >&5
9284( exit $ac_status )
9285ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009286fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009287rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009288fi
9289
Trent Mick635f6fb2000-08-23 21:33:05 +00009290fi
9291
Martin v. Löwis11437992002-04-12 09:54:03 +00009292 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9293echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9294
9295cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009296#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009297_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009298
9299fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009300CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009301
Martin v. Löwis11437992002-04-12 09:54:03 +00009302echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9303echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009304# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9305if test "${enable_toolbox_glue+set}" = set; then
9306 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009307
Martin v. Löwis11437992002-04-12 09:54:03 +00009308fi;
Jack Jansene578a632001-08-15 01:27:14 +00009309
9310if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009311then
Jack Jansene578a632001-08-15 01:27:14 +00009312 case $ac_sys_system/$ac_sys_release in
9313 Darwin/*)
9314 enable_toolbox_glue="yes";;
9315 *)
9316 enable_toolbox_glue="no";;
9317 esac
9318fi
9319case "$enable_toolbox_glue" in
9320yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009321 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009322 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009323 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009324
9325cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009326#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009327_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009328
9329 ;;
9330*)
9331 extra_frameworks=""
9332 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009333 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009334 ;;
9335esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009336echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9337echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009338
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009339
9340case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009341 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009342 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009343 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00009344 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9345 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009346 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009347 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009348 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00009349 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9350 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009351esac
9352
Martin v. Löwis11437992002-04-12 09:54:03 +00009353echo "$as_me:$LINENO: checking for --enable-framework" >&5
9354echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009355if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009356then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009357 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009358 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009359 # in the build location.
Jack Jansenea0c3822002-08-01 21:57:49 +00009360 LDFLAGS="$LDFLAGS -Wl,-F."
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009361
Martin v. Löwis11437992002-04-12 09:54:03 +00009362cat >>confdefs.h <<\_ACEOF
9363#define WITH_NEXT_FRAMEWORK 1
9364_ACEOF
9365
9366 echo "$as_me:$LINENO: result: yes" >&5
9367echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009368else
Martin v. Löwis11437992002-04-12 09:54:03 +00009369 echo "$as_me:$LINENO: result: no" >&5
9370echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009371fi
9372
Martin v. Löwis11437992002-04-12 09:54:03 +00009373echo "$as_me:$LINENO: checking for dyld" >&5
9374echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009375case $ac_sys_system/$ac_sys_release in
9376 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009377
Martin v. Löwis11437992002-04-12 09:54:03 +00009378cat >>confdefs.h <<\_ACEOF
9379#define WITH_DYLD 1
9380_ACEOF
9381
9382 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9383echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009384 ;;
9385 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009386 echo "$as_me:$LINENO: result: no" >&5
9387echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009388 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009389esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009390
Guido van Rossum0a516c91994-09-12 10:58:40 +00009391# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009392
Michael W. Hudson54241132001-12-07 15:38:26 +00009393
9394
9395
9396
Guido van Rossum0a516c91994-09-12 10:58:40 +00009397# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009398# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009399echo "$as_me:$LINENO: checking SO" >&5
9400echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009401if test -z "$SO"
9402then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009403 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009404 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009405 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009406 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009407 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009408fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009409echo "$as_me:$LINENO: result: $SO" >&5
9410echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009411# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00009412# -- "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 +00009413# (Shared libraries in this instance are shared modules to be loaded into
9414# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009415echo "$as_me:$LINENO: checking LDSHARED" >&5
9416echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009417if test -z "$LDSHARED"
9418then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009419 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009420 AIX*)
9421 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009422 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009423 ;;
9424 BeOS*)
9425 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009426 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009427 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009428 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009429 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009430 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009431 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00009432 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009433 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009434 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +00009435 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009436 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009437 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
9438 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009439 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009440 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9441 if test "$enable_framework" ; then
9442 # Link against the framework. All externals should be defined.
9443 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9444 else
9445 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009446 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009447 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009448 Darwin/*)
9449 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9450 if test "$enable_framework" ; then
9451 # Link against the framework. All externals should be defined.
9452 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9453 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009454 # No framework, use the Python app as bundle-loader
9455 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009456 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009457 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009458 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00009459 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009460 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009461 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009462 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009463 then
9464 LDSHARED="cc -shared ${LDFLAGS}"
9465 else
9466 LDSHARED="ld -Bshareable ${LDFLAGS}"
9467 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009468 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009469 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009470 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009471 then LDSHARED='$(CC) -shared'
9472 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009473 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009474 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +00009475 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009476 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009477 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009478 *) LDSHARED="ld";;
9479 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009480fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009481echo "$as_me:$LINENO: result: $LDSHARED" >&5
9482echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009483BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009484# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009485# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009486echo "$as_me:$LINENO: checking CCSHARED" >&5
9487echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009488if test -z "$CCSHARED"
9489then
Guido van Rossum07397971997-04-29 21:49:50 +00009490 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009491 SunOS*) if test "$GCC" = yes;
9492 then CCSHARED="-fPIC";
9493 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009494 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009495 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009496 else CCSHARED="+z";
9497 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009498 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009499 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009500 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009501 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009502 if test "$GCC" = "yes"
9503 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009504 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009505 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009506 SCO_SV*)
9507 if test "$GCC" = "yes"
9508 then CCSHARED="-fPIC"
9509 else CCSHARED="-Kpic -belf"
9510 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009511 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009512 IRIX*/6*) case $CC in
9513 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009514 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009515 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009516 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009517 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009518fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009519echo "$as_me:$LINENO: result: $CCSHARED" >&5
9520echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009521# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009522# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009523echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9524echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009525if test -z "$LINKFORSHARED"
9526then
Guido van Rossum07397971997-04-29 21:49:50 +00009527 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009528 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009529 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009530 LINKFORSHARED="-Wl,-E -Wl,+s";;
9531# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009532 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009533 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009534 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009535 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009536 # -u __dummy makes the linker aware of the objc runtime
9537 # in System.framework; otherwise, __objcInit (referenced in
9538 # crt1.o) gets erroneously defined as common, which breaks dynamic
9539 # loading of any modules which reference it in System.framework.
9540 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9541 # not used by the core itself but which needs to be in the core so
9542 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00009543 # -prebind is no longer used, because it actually seems to give a
9544 # slowdown in stead of a speedup, maybe due to the large number of
9545 # dynamic loads Python does.
9546 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009547 if test "$enable_framework"
9548 then
9549 LINKFORSHARED="$LINKFORSHARED -framework Python"
9550 fi
9551 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009552 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009553 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009554 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009555 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009556 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9557 then
9558 LINKFORSHARED="-Wl,--export-dynamic"
9559 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009560 SunOS/5*) case $CC in
9561 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009562 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009563 then
9564 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009565 fi;;
9566 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009567 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009568fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009569echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9570echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009571
Michael W. Hudson54241132001-12-07 15:38:26 +00009572
Martin v. Löwis11437992002-04-12 09:54:03 +00009573echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9574echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009575if test ! "$LIBRARY" = "$LDLIBRARY"
9576then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009577 case $ac_sys_system in
9578 CYGWIN*)
9579 # Cygwin needs CCSHARED when building extension DLLs
9580 # but not when building the interpreter DLL.
9581 CFLAGSFORSHARED='';;
9582 *)
9583 CFLAGSFORSHARED='$(CCSHARED)'
9584 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009585fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009586echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9587echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009588
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009589# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9590# library (with --enable-shared).
9591# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009592# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9593# if it is not required, since it creates a dependency of the shared library
9594# to LIBS. This, in turn, means that applications linking the shared libpython
9595# don't need to link LIBS explicitly. The default should be only changed
9596# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009597
9598echo "$as_me:$LINENO: checking SHLIBS" >&5
9599echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9600case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009601 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009602 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009603esac
9604echo "$as_me:$LINENO: result: $SHLIBS" >&5
9605echo "${ECHO_T}$SHLIBS" >&6
9606
9607
Guido van Rossum627b2d71993-12-24 10:39:16 +00009608# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009609
9610echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9611echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9612if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9613 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009614else
Martin v. Löwis11437992002-04-12 09:54:03 +00009615 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009616LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009617cat >conftest.$ac_ext <<_ACEOF
9618#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009619#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009620
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009621/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009622#ifdef __cplusplus
9623extern "C"
9624#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009625/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009626 builtin and then its argument prototype would still apply. */
9627char dlopen ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009628#ifdef F77_DUMMY_MAIN
9629# ifdef __cplusplus
9630 extern "C"
9631# endif
9632 int F77_DUMMY_MAIN() { return 1; }
9633#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009634int
9635main ()
9636{
9637dlopen ();
9638 ;
9639 return 0;
9640}
9641_ACEOF
9642rm -f conftest.$ac_objext conftest$ac_exeext
9643if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9644 (eval $ac_link) 2>&5
9645 ac_status=$?
9646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9647 (exit $ac_status); } &&
9648 { ac_try='test -s conftest$ac_exeext'
9649 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9650 (eval $ac_try) 2>&5
9651 ac_status=$?
9652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9653 (exit $ac_status); }; }; then
9654 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009655else
Martin v. Löwis11437992002-04-12 09:54:03 +00009656 echo "$as_me: failed program was:" >&5
9657cat conftest.$ac_ext >&5
9658ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009659fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009660rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9661LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009662fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009663echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9664echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9665if test $ac_cv_lib_dl_dlopen = yes; then
9666 cat >>confdefs.h <<_ACEOF
9667#define HAVE_LIBDL 1
9668_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009669
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009670 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009671
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009672fi
9673 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009674
9675echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9676echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9677if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9678 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009679else
Martin v. Löwis11437992002-04-12 09:54:03 +00009680 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009681LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009682cat >conftest.$ac_ext <<_ACEOF
9683#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009684#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009685
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009686/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009687#ifdef __cplusplus
9688extern "C"
9689#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009690/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009691 builtin and then its argument prototype would still apply. */
9692char shl_load ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009693#ifdef F77_DUMMY_MAIN
9694# ifdef __cplusplus
9695 extern "C"
9696# endif
9697 int F77_DUMMY_MAIN() { return 1; }
9698#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009699int
9700main ()
9701{
9702shl_load ();
9703 ;
9704 return 0;
9705}
9706_ACEOF
9707rm -f conftest.$ac_objext conftest$ac_exeext
9708if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9709 (eval $ac_link) 2>&5
9710 ac_status=$?
9711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9712 (exit $ac_status); } &&
9713 { ac_try='test -s conftest$ac_exeext'
9714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9715 (eval $ac_try) 2>&5
9716 ac_status=$?
9717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9718 (exit $ac_status); }; }; then
9719 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009720else
Martin v. Löwis11437992002-04-12 09:54:03 +00009721 echo "$as_me: failed program was:" >&5
9722cat conftest.$ac_ext >&5
9723ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009724fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009725rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9726LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009727fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009728echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9729echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9730if test $ac_cv_lib_dld_shl_load = yes; then
9731 cat >>confdefs.h <<_ACEOF
9732#define HAVE_LIBDLD 1
9733_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009734
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009735 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009736
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009737fi
9738 # Dynamic linking for HP-UX
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009739echo "$as_me:$LINENO: checking for library containing sem_init" >&5
9740echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9741if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009742 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009743else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009744 ac_func_search_save_LIBS=$LIBS
9745ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009746cat >conftest.$ac_ext <<_ACEOF
9747#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009748#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009749
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009750/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009751#ifdef __cplusplus
9752extern "C"
9753#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009754/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009755 builtin and then its argument prototype would still apply. */
9756char sem_init ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009757#ifdef F77_DUMMY_MAIN
9758# ifdef __cplusplus
9759 extern "C"
9760# endif
9761 int F77_DUMMY_MAIN() { return 1; }
9762#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009763int
9764main ()
9765{
9766sem_init ();
9767 ;
9768 return 0;
9769}
9770_ACEOF
9771rm -f conftest.$ac_objext conftest$ac_exeext
9772if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9773 (eval $ac_link) 2>&5
9774 ac_status=$?
9775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9776 (exit $ac_status); } &&
9777 { ac_try='test -s conftest$ac_exeext'
9778 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9779 (eval $ac_try) 2>&5
9780 ac_status=$?
9781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9782 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009783 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009784else
Martin v. Löwis11437992002-04-12 09:54:03 +00009785 echo "$as_me: failed program was:" >&5
9786cat conftest.$ac_ext >&5
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009787fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009788rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009789if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009790 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009791 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9792 cat >conftest.$ac_ext <<_ACEOF
9793#line $LINENO "configure"
9794#include "confdefs.h"
9795
9796/* Override any gcc2 internal prototype to avoid an error. */
9797#ifdef __cplusplus
9798extern "C"
9799#endif
9800/* We use char because int might match the return type of a gcc2
9801 builtin and then its argument prototype would still apply. */
9802char sem_init ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009803#ifdef F77_DUMMY_MAIN
9804# ifdef __cplusplus
9805 extern "C"
9806# endif
9807 int F77_DUMMY_MAIN() { return 1; }
9808#endif
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009809int
9810main ()
9811{
9812sem_init ();
9813 ;
9814 return 0;
9815}
Martin v. Löwis11437992002-04-12 09:54:03 +00009816_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009817rm -f conftest.$ac_objext conftest$ac_exeext
9818if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9819 (eval $ac_link) 2>&5
9820 ac_status=$?
9821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9822 (exit $ac_status); } &&
9823 { ac_try='test -s conftest$ac_exeext'
9824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9825 (eval $ac_try) 2>&5
9826 ac_status=$?
9827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9828 (exit $ac_status); }; }; then
9829 ac_cv_search_sem_init="-l$ac_lib"
9830break
9831else
9832 echo "$as_me: failed program was:" >&5
9833cat conftest.$ac_ext >&5
9834fi
9835rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9836 done
9837fi
9838LIBS=$ac_func_search_save_LIBS
9839fi
9840echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9841echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9842if test "$ac_cv_search_sem_init" != no; then
9843 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009844
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009845fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009846 # 'Real Time' functions on Solaris
9847 # posix4 on Solaris 2.6
9848 # pthread (first!) on Linux
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009849
9850# checks for system dependent C++ extensions support
9851case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009852 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9853echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9854 cat >conftest.$ac_ext <<_ACEOF
9855#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009856#include "confdefs.h"
9857#include "/usr/lpp/xlC/include/load.h"
Barry Warsawfe33b792003-01-07 22:42:49 +00009858#ifdef F77_DUMMY_MAIN
9859# ifdef __cplusplus
9860 extern "C"
9861# endif
9862 int F77_DUMMY_MAIN() { return 1; }
9863#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009864int
9865main ()
9866{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009867loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009868 ;
9869 return 0;
9870}
9871_ACEOF
9872rm -f conftest.$ac_objext conftest$ac_exeext
9873if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9874 (eval $ac_link) 2>&5
9875 ac_status=$?
9876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9877 (exit $ac_status); } &&
9878 { ac_try='test -s conftest$ac_exeext'
9879 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9880 (eval $ac_try) 2>&5
9881 ac_status=$?
9882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9883 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009884
Martin v. Löwis11437992002-04-12 09:54:03 +00009885cat >>confdefs.h <<\_ACEOF
9886#define AIX_GENUINE_CPLUSPLUS 1
9887_ACEOF
9888
9889 echo "$as_me:$LINENO: result: yes" >&5
9890echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009891else
Martin v. Löwis11437992002-04-12 09:54:03 +00009892 echo "$as_me: failed program was:" >&5
9893cat conftest.$ac_ext >&5
9894echo "$as_me:$LINENO: result: no" >&5
9895echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009896fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009897rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009898 *) ;;
9899esac
9900
Guido van Rossum70c7f481998-03-26 18:44:10 +00009901# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Martin v. Löwise1172582002-11-13 08:51:19 +00009902# However on SGI IRIX 4, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009903# BeOS' sockets are stashed in libnet.
9904case "$ac_sys_system" in
9905IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009906*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009907echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9908echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9909if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9910 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009911else
Martin v. Löwis11437992002-04-12 09:54:03 +00009912 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009913LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009914cat >conftest.$ac_ext <<_ACEOF
9915#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009916#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009917
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009918/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009919#ifdef __cplusplus
9920extern "C"
9921#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009922/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009923 builtin and then its argument prototype would still apply. */
9924char t_open ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009925#ifdef F77_DUMMY_MAIN
9926# ifdef __cplusplus
9927 extern "C"
9928# endif
9929 int F77_DUMMY_MAIN() { return 1; }
9930#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009931int
9932main ()
9933{
9934t_open ();
9935 ;
9936 return 0;
9937}
9938_ACEOF
9939rm -f conftest.$ac_objext conftest$ac_exeext
9940if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9941 (eval $ac_link) 2>&5
9942 ac_status=$?
9943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9944 (exit $ac_status); } &&
9945 { ac_try='test -s conftest$ac_exeext'
9946 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9947 (eval $ac_try) 2>&5
9948 ac_status=$?
9949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9950 (exit $ac_status); }; }; then
9951 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009952else
Martin v. Löwis11437992002-04-12 09:54:03 +00009953 echo "$as_me: failed program was:" >&5
9954cat conftest.$ac_ext >&5
9955ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009956fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009957rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9958LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009959fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009960echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9961echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9962if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009963 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009964fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009965 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009966echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9967echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9968if test "${ac_cv_lib_socket_socket+set}" = set; then
9969 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009970else
Martin v. Löwis11437992002-04-12 09:54:03 +00009971 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009972LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009973cat >conftest.$ac_ext <<_ACEOF
9974#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009975#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009976
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009977/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009978#ifdef __cplusplus
9979extern "C"
9980#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009981/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009982 builtin and then its argument prototype would still apply. */
9983char socket ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009984#ifdef F77_DUMMY_MAIN
9985# ifdef __cplusplus
9986 extern "C"
9987# endif
9988 int F77_DUMMY_MAIN() { return 1; }
9989#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009990int
9991main ()
9992{
9993socket ();
9994 ;
9995 return 0;
9996}
9997_ACEOF
9998rm -f conftest.$ac_objext conftest$ac_exeext
9999if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10000 (eval $ac_link) 2>&5
10001 ac_status=$?
10002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10003 (exit $ac_status); } &&
10004 { ac_try='test -s conftest$ac_exeext'
10005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10006 (eval $ac_try) 2>&5
10007 ac_status=$?
10008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10009 (exit $ac_status); }; }; then
10010 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010011else
Martin v. Löwis11437992002-04-12 09:54:03 +000010012 echo "$as_me: failed program was:" >&5
10013cat conftest.$ac_ext >&5
10014ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010015fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010016rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10017LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010018fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010019echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
10020echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
10021if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000010022 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010023fi
10024 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000010025;;
10026esac
10027case "$ac_sys_system" in
10028BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010029echo "$as_me:$LINENO: checking for socket in -lnet" >&5
10030echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
10031if test "${ac_cv_lib_net_socket+set}" = set; then
10032 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010033else
Martin v. Löwis11437992002-04-12 09:54:03 +000010034 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010035LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010036cat >conftest.$ac_ext <<_ACEOF
10037#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010038#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010039
Guido van Rossumad678af1998-10-02 14:42:15 +000010040/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010041#ifdef __cplusplus
10042extern "C"
10043#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010044/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010045 builtin and then its argument prototype would still apply. */
10046char socket ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010047#ifdef F77_DUMMY_MAIN
10048# ifdef __cplusplus
10049 extern "C"
10050# endif
10051 int F77_DUMMY_MAIN() { return 1; }
10052#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010053int
10054main ()
10055{
10056socket ();
10057 ;
10058 return 0;
10059}
10060_ACEOF
10061rm -f conftest.$ac_objext conftest$ac_exeext
10062if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10063 (eval $ac_link) 2>&5
10064 ac_status=$?
10065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10066 (exit $ac_status); } &&
10067 { ac_try='test -s conftest$ac_exeext'
10068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10069 (eval $ac_try) 2>&5
10070 ac_status=$?
10071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10072 (exit $ac_status); }; }; then
10073 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010074else
Martin v. Löwis11437992002-04-12 09:54:03 +000010075 echo "$as_me: failed program was:" >&5
10076cat conftest.$ac_ext >&5
10077ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010078fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010079rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10080LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010082echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
10083echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
10084if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010085 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010086fi
10087 # BeOS
10088;;
10089esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000010090
Martin v. Löwis11437992002-04-12 09:54:03 +000010091echo "$as_me:$LINENO: checking for --with-libs" >&5
10092echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
10093
Guido van Rossuma68acba1996-07-31 17:36:39 +000010094# Check whether --with-libs or --without-libs was given.
10095if test "${with_libs+set}" = set; then
10096 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000010097
10098echo "$as_me:$LINENO: result: $withval" >&5
10099echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000010100LIBS="$withval $LIBS"
10101
10102else
Martin v. Löwis11437992002-04-12 09:54:03 +000010103 echo "$as_me:$LINENO: result: no" >&5
10104echo "${ECHO_T}no" >&6
10105fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000010106
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010107# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010108
10109
Martin v. Löwis11437992002-04-12 09:54:03 +000010110echo "$as_me:$LINENO: checking for --with-signal-module" >&5
10111echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
10112
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010113# Check whether --with-signal-module or --without-signal-module was given.
10114if test "${with_signal_module+set}" = set; then
10115 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010116
Martin v. Löwis11437992002-04-12 09:54:03 +000010117fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010118
10119if test -z "$with_signal_module"
10120then with_signal_module="yes"
10121fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010122echo "$as_me:$LINENO: result: $with_signal_module" >&5
10123echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010124
10125if test "${with_signal_module}" = "yes"; then
10126 USE_SIGNAL_MODULE=""
10127 SIGNAL_OBJS=""
10128else
10129 USE_SIGNAL_MODULE="#"
10130 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10131fi
10132
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010133# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010134
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010135USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010136
Martin v. Löwis11437992002-04-12 09:54:03 +000010137echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
10138echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
10139
Guido van Rossumec2f0731997-01-22 20:54:01 +000010140
10141# Check whether --with-dec-threads or --without-dec-threads was given.
10142if test "${with_dec_threads+set}" = set; then
10143 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000010144
10145echo "$as_me:$LINENO: result: $withval" >&5
10146echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000010147LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000010148if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000010149 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000010150fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010151else
Martin v. Löwis11437992002-04-12 09:54:03 +000010152 echo "$as_me:$LINENO: result: no" >&5
10153echo "${ECHO_T}no" >&6
10154fi;
10155
10156# Templates for things AC_DEFINEd more than once.
10157# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010158
10159
Martin v. Löwis11437992002-04-12 09:54:03 +000010160
10161
10162
10163
10164
10165echo "$as_me:$LINENO: checking for --with-threads" >&5
10166echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
10167
Guido van Rossumec2f0731997-01-22 20:54:01 +000010168# Check whether --with-threads or --without-threads was given.
10169if test "${with_threads+set}" = set; then
10170 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000010171
Martin v. Löwis11437992002-04-12 09:54:03 +000010172fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000010173
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010174# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010175
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010176# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010177if test "${with_thread+set}" = set; then
10178 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010179 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000010180fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010181
10182if test -z "$with_threads"
10183then with_threads="yes"
10184fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010185echo "$as_me:$LINENO: result: $with_threads" >&5
10186echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010187
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010188
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010189if test "$with_threads" = "no"
10190then
10191 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010192elif test "$ac_cv_pthread_is_default" = yes
10193then
Martin v. Löwis11437992002-04-12 09:54:03 +000010194 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010195#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010196_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010197
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010198 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010199 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010200#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010201_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010202
10203 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010204 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010205elif test "$ac_cv_kpthread" = "yes"
10206then
10207 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010208 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010209#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010210_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010211
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010212 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010213 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010214elif test "$ac_cv_kthread" = "yes"
10215then
10216 CC="$CC -Kthread"
10217 cat >>confdefs.h <<\_ACEOF
10218#define WITH_THREAD 1
10219_ACEOF
10220
10221 posix_threads=yes
10222 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010223else
10224 if test ! -z "$with_threads" -a -d "$with_threads"
10225 then LDFLAGS="$LDFLAGS -L$with_threads"
10226 fi
10227 if test ! -z "$withval" -a -d "$withval"
10228 then LDFLAGS="$LDFLAGS -L$withval"
10229 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010230
10231 # According to the POSIX spec, a pthreads implementation must
10232 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010233 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10234echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10235 cat >conftest.$ac_ext <<_ACEOF
10236#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010237#include "confdefs.h"
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010238
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010239#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010240#ifdef _POSIX_THREADS
10241yes
10242#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010243
10244_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010245if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000010246 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010247 unistd_defines_pthreads=yes
10248else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010249 unistd_defines_pthreads=no
10250fi
10251rm -f conftest*
10252
Martin v. Löwis11437992002-04-12 09:54:03 +000010253 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10254echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010255
Martin v. Löwis11437992002-04-12 09:54:03 +000010256 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010257#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010258_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010259
Martin v. Löwis11437992002-04-12 09:54:03 +000010260 if test "${ac_cv_header_cthreads_h+set}" = set; then
10261 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10262echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10263if test "${ac_cv_header_cthreads_h+set}" = set; then
10264 echo $ECHO_N "(cached) $ECHO_C" >&6
10265fi
10266echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10267echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010268else
Martin v. Löwis11437992002-04-12 09:54:03 +000010269 # Is the header compilable?
10270echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10271echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10272cat >conftest.$ac_ext <<_ACEOF
10273#line $LINENO "configure"
10274#include "confdefs.h"
10275$ac_includes_default
10276#include <cthreads.h>
10277_ACEOF
10278rm -f conftest.$ac_objext
10279if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10280 (eval $ac_compile) 2>&5
10281 ac_status=$?
10282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10283 (exit $ac_status); } &&
10284 { ac_try='test -s conftest.$ac_objext'
10285 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10286 (eval $ac_try) 2>&5
10287 ac_status=$?
10288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10289 (exit $ac_status); }; }; then
10290 ac_header_compiler=yes
10291else
10292 echo "$as_me: failed program was:" >&5
10293cat conftest.$ac_ext >&5
10294ac_header_compiler=no
10295fi
10296rm -f conftest.$ac_objext conftest.$ac_ext
10297echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10298echo "${ECHO_T}$ac_header_compiler" >&6
10299
10300# Is the header present?
10301echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10302echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10303cat >conftest.$ac_ext <<_ACEOF
10304#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010305#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010306#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010307_ACEOF
10308if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10309 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10310 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010311 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010312 rm -f conftest.er1
10313 cat conftest.err >&5
10314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10315 (exit $ac_status); } >/dev/null; then
10316 if test -s conftest.err; then
10317 ac_cpp_err=$ac_c_preproc_warn_flag
10318 else
10319 ac_cpp_err=
10320 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010321else
Martin v. Löwis11437992002-04-12 09:54:03 +000010322 ac_cpp_err=yes
10323fi
10324if test -z "$ac_cpp_err"; then
10325 ac_header_preproc=yes
10326else
10327 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +000010328 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010329 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010330fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010331rm -f conftest.err conftest.$ac_ext
10332echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10333echo "${ECHO_T}$ac_header_preproc" >&6
10334
10335# So? What about this header?
10336case $ac_header_compiler:$ac_header_preproc in
10337 yes:no )
10338 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10339echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10340 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10341echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10342 no:yes )
10343 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10344echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10345 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10346echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10347 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10348echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10349esac
10350echo "$as_me:$LINENO: checking for cthreads.h" >&5
10351echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10352if test "${ac_cv_header_cthreads_h+set}" = set; then
10353 echo $ECHO_N "(cached) $ECHO_C" >&6
10354else
10355 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010356fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010357echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10358echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10359
10360fi
10361if test $ac_cv_header_cthreads_h = yes; then
10362 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010363#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010364_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010365
Martin v. Löwis11437992002-04-12 09:54:03 +000010366 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010367#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010368_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010369
Martin v. Löwis11437992002-04-12 09:54:03 +000010370
10371cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010372#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010373_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010374
10375 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010376 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010377else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010378
Martin v. Löwis11437992002-04-12 09:54:03 +000010379 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10380 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10381echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10382if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10383 echo $ECHO_N "(cached) $ECHO_C" >&6
10384fi
10385echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10386echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010387else
Martin v. Löwis11437992002-04-12 09:54:03 +000010388 # Is the header compilable?
10389echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10390echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10391cat >conftest.$ac_ext <<_ACEOF
10392#line $LINENO "configure"
10393#include "confdefs.h"
10394$ac_includes_default
10395#include <mach/cthreads.h>
10396_ACEOF
10397rm -f conftest.$ac_objext
10398if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10399 (eval $ac_compile) 2>&5
10400 ac_status=$?
10401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10402 (exit $ac_status); } &&
10403 { ac_try='test -s conftest.$ac_objext'
10404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10405 (eval $ac_try) 2>&5
10406 ac_status=$?
10407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10408 (exit $ac_status); }; }; then
10409 ac_header_compiler=yes
10410else
10411 echo "$as_me: failed program was:" >&5
10412cat conftest.$ac_ext >&5
10413ac_header_compiler=no
10414fi
10415rm -f conftest.$ac_objext conftest.$ac_ext
10416echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10417echo "${ECHO_T}$ac_header_compiler" >&6
10418
10419# Is the header present?
10420echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10421echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10422cat >conftest.$ac_ext <<_ACEOF
10423#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010424#include "confdefs.h"
10425#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010426_ACEOF
10427if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10428 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10429 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010430 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010431 rm -f conftest.er1
10432 cat conftest.err >&5
10433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10434 (exit $ac_status); } >/dev/null; then
10435 if test -s conftest.err; then
10436 ac_cpp_err=$ac_c_preproc_warn_flag
10437 else
10438 ac_cpp_err=
10439 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010440else
Martin v. Löwis11437992002-04-12 09:54:03 +000010441 ac_cpp_err=yes
10442fi
10443if test -z "$ac_cpp_err"; then
10444 ac_header_preproc=yes
10445else
10446 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010447 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010448 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010449fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010450rm -f conftest.err conftest.$ac_ext
10451echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10452echo "${ECHO_T}$ac_header_preproc" >&6
10453
10454# So? What about this header?
10455case $ac_header_compiler:$ac_header_preproc in
10456 yes:no )
10457 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10458echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10459 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10460echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10461 no:yes )
10462 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10463echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10464 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10465echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10466 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10467echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10468esac
10469echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10470echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10471if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10472 echo $ECHO_N "(cached) $ECHO_C" >&6
10473else
10474 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010475fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010476echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10477echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10478
10479fi
10480if test $ac_cv_header_mach_cthreads_h = yes; then
10481 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010482#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010483_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010484
Martin v. Löwis11437992002-04-12 09:54:03 +000010485 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010486#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010487_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010488
Martin v. Löwis11437992002-04-12 09:54:03 +000010489
10490cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010491#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010492_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010493
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010494 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010495else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010496
Martin v. Löwis11437992002-04-12 09:54:03 +000010497 echo "$as_me:$LINENO: checking for --with-pth" >&5
10498echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10499
10500# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010501if test "${with_pth+set}" = set; then
10502 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010503 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010504echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010505 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010506#define WITH_THREAD 1
10507_ACEOF
10508
10509
10510cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010511#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010512_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010513
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010514 LIBS="-lpth $LIBS"
10515 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010516else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010517 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010518echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010519
10520 # Just looking for pthread_create in libpthread is not enough:
10521 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10522 # So we really have to include pthread.h, and then link.
10523 _libs=$LIBS
10524 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010525 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10526echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10527 cat >conftest.$ac_ext <<_ACEOF
10528#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010529#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010530#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010531
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010532void * start_routine (void *arg) { exit (0); }
Barry Warsawfe33b792003-01-07 22:42:49 +000010533#ifdef F77_DUMMY_MAIN
10534# ifdef __cplusplus
10535 extern "C"
10536# endif
10537 int F77_DUMMY_MAIN() { return 1; }
10538#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010539int
10540main ()
10541{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010542
10543pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010544 ;
10545 return 0;
10546}
10547_ACEOF
10548rm -f conftest.$ac_objext conftest$ac_exeext
10549if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10550 (eval $ac_link) 2>&5
10551 ac_status=$?
10552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10553 (exit $ac_status); } &&
10554 { ac_try='test -s conftest$ac_exeext'
10555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10556 (eval $ac_try) 2>&5
10557 ac_status=$?
10558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10559 (exit $ac_status); }; }; then
10560
10561 echo "$as_me:$LINENO: result: yes" >&5
10562echo "${ECHO_T}yes" >&6
10563 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010564#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010565_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010566
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010567 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010568 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010569else
Martin v. Löwis11437992002-04-12 09:54:03 +000010570 echo "$as_me: failed program was:" >&5
10571cat conftest.$ac_ext >&5
10572
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010573 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010574 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10575echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10576if test "${ac_cv_func_pthread_detach+set}" = set; then
10577 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010578else
Martin v. Löwis11437992002-04-12 09:54:03 +000010579 cat >conftest.$ac_ext <<_ACEOF
10580#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010581#include "confdefs.h"
10582/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010583 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010584#include <assert.h>
10585/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010586#ifdef __cplusplus
10587extern "C"
10588#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010589/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010590 builtin and then its argument prototype would still apply. */
10591char pthread_detach ();
10592char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010593
Barry Warsawfe33b792003-01-07 22:42:49 +000010594#ifdef F77_DUMMY_MAIN
10595# ifdef __cplusplus
10596 extern "C"
10597# endif
10598 int F77_DUMMY_MAIN() { return 1; }
10599#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010600int
10601main ()
10602{
Guido van Rossumad678af1998-10-02 14:42:15 +000010603/* The GNU C library defines this for functions which it implements
10604 to always fail with ENOSYS. Some functions are actually named
10605 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010606#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010607choke me
10608#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010609f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +000010610#endif
10611
Martin v. Löwis11437992002-04-12 09:54:03 +000010612 ;
10613 return 0;
10614}
10615_ACEOF
10616rm -f conftest.$ac_objext conftest$ac_exeext
10617if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10618 (eval $ac_link) 2>&5
10619 ac_status=$?
10620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10621 (exit $ac_status); } &&
10622 { ac_try='test -s conftest$ac_exeext'
10623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10624 (eval $ac_try) 2>&5
10625 ac_status=$?
10626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10627 (exit $ac_status); }; }; then
10628 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010629else
Martin v. Löwis11437992002-04-12 09:54:03 +000010630 echo "$as_me: failed program was:" >&5
10631cat conftest.$ac_ext >&5
10632ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010633fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010634rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010635fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010636echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10637echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10638if test $ac_cv_func_pthread_detach = yes; then
10639 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010640#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010641_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010642
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010643 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010644 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010645else
Guido van Rossumad678af1998-10-02 14:42:15 +000010646
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010647 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10648 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10649echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10650if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10651 echo $ECHO_N "(cached) $ECHO_C" >&6
10652fi
10653echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10654echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10655else
10656 # Is the header compilable?
10657echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10658echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10659cat >conftest.$ac_ext <<_ACEOF
10660#line $LINENO "configure"
10661#include "confdefs.h"
10662$ac_includes_default
10663#include <atheos/threads.h>
10664_ACEOF
10665rm -f conftest.$ac_objext
10666if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10667 (eval $ac_compile) 2>&5
10668 ac_status=$?
10669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10670 (exit $ac_status); } &&
10671 { ac_try='test -s conftest.$ac_objext'
10672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10673 (eval $ac_try) 2>&5
10674 ac_status=$?
10675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10676 (exit $ac_status); }; }; then
10677 ac_header_compiler=yes
10678else
10679 echo "$as_me: failed program was:" >&5
10680cat conftest.$ac_ext >&5
10681ac_header_compiler=no
10682fi
10683rm -f conftest.$ac_objext conftest.$ac_ext
10684echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10685echo "${ECHO_T}$ac_header_compiler" >&6
10686
10687# Is the header present?
10688echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10689echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10690cat >conftest.$ac_ext <<_ACEOF
10691#line $LINENO "configure"
10692#include "confdefs.h"
10693#include <atheos/threads.h>
10694_ACEOF
10695if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10696 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10697 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010698 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010699 rm -f conftest.er1
10700 cat conftest.err >&5
10701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10702 (exit $ac_status); } >/dev/null; then
10703 if test -s conftest.err; then
10704 ac_cpp_err=$ac_c_preproc_warn_flag
10705 else
10706 ac_cpp_err=
10707 fi
10708else
10709 ac_cpp_err=yes
10710fi
10711if test -z "$ac_cpp_err"; then
10712 ac_header_preproc=yes
10713else
10714 echo "$as_me: failed program was:" >&5
10715 cat conftest.$ac_ext >&5
10716 ac_header_preproc=no
10717fi
10718rm -f conftest.err conftest.$ac_ext
10719echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10720echo "${ECHO_T}$ac_header_preproc" >&6
10721
10722# So? What about this header?
10723case $ac_header_compiler:$ac_header_preproc in
10724 yes:no )
10725 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10726echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10727 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10728echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10729 no:yes )
10730 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10731echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10732 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10733echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10734 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10735echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10736esac
10737echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10738echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10739if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10740 echo $ECHO_N "(cached) $ECHO_C" >&6
10741else
10742 ac_cv_header_atheos_threads_h=$ac_header_preproc
10743fi
10744echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10745echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10746
10747fi
10748if test $ac_cv_header_atheos_threads_h = yes; then
10749 cat >>confdefs.h <<\_ACEOF
10750#define WITH_THREAD 1
10751_ACEOF
10752
10753
10754cat >>confdefs.h <<\_ACEOF
10755#define ATHEOS_THREADS 1
10756_ACEOF
10757
10758 THREADOBJ="Python/thread.o"
10759else
10760
Martin v. Löwis11437992002-04-12 09:54:03 +000010761 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10762 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10763echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10764if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10765 echo $ECHO_N "(cached) $ECHO_C" >&6
10766fi
10767echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10768echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010769else
Martin v. Löwis11437992002-04-12 09:54:03 +000010770 # Is the header compilable?
10771echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10772echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10773cat >conftest.$ac_ext <<_ACEOF
10774#line $LINENO "configure"
10775#include "confdefs.h"
10776$ac_includes_default
10777#include <kernel/OS.h>
10778_ACEOF
10779rm -f conftest.$ac_objext
10780if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10781 (eval $ac_compile) 2>&5
10782 ac_status=$?
10783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10784 (exit $ac_status); } &&
10785 { ac_try='test -s conftest.$ac_objext'
10786 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10787 (eval $ac_try) 2>&5
10788 ac_status=$?
10789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10790 (exit $ac_status); }; }; then
10791 ac_header_compiler=yes
10792else
10793 echo "$as_me: failed program was:" >&5
10794cat conftest.$ac_ext >&5
10795ac_header_compiler=no
10796fi
10797rm -f conftest.$ac_objext conftest.$ac_ext
10798echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10799echo "${ECHO_T}$ac_header_compiler" >&6
10800
10801# Is the header present?
10802echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10803echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10804cat >conftest.$ac_ext <<_ACEOF
10805#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010806#include "confdefs.h"
10807#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010808_ACEOF
10809if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10810 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10811 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010812 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010813 rm -f conftest.er1
10814 cat conftest.err >&5
10815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10816 (exit $ac_status); } >/dev/null; then
10817 if test -s conftest.err; then
10818 ac_cpp_err=$ac_c_preproc_warn_flag
10819 else
10820 ac_cpp_err=
10821 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010822else
Martin v. Löwis11437992002-04-12 09:54:03 +000010823 ac_cpp_err=yes
10824fi
10825if test -z "$ac_cpp_err"; then
10826 ac_header_preproc=yes
10827else
10828 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010829 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010830 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010831fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010832rm -f conftest.err conftest.$ac_ext
10833echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10834echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010835
Martin v. Löwis11437992002-04-12 09:54:03 +000010836# So? What about this header?
10837case $ac_header_compiler:$ac_header_preproc in
10838 yes:no )
10839 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10840echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10841 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10842echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10843 no:yes )
10844 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10845echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10846 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10847echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10848 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10849echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10850esac
10851echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10852echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10853if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10854 echo $ECHO_N "(cached) $ECHO_C" >&6
10855else
10856 ac_cv_header_kernel_OS_h=$ac_header_preproc
10857fi
10858echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10859echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10860
10861fi
10862if test $ac_cv_header_kernel_OS_h = yes; then
10863 cat >>confdefs.h <<\_ACEOF
10864#define WITH_THREAD 1
10865_ACEOF
10866
10867
10868cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010869#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010870_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010871
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010872 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010873else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010874
Martin v. Löwis11437992002-04-12 09:54:03 +000010875 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10876echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10877if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10878 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010879else
Martin v. Löwis11437992002-04-12 09:54:03 +000010880 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010881LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010882cat >conftest.$ac_ext <<_ACEOF
10883#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010884#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010885
Greg Steinadf63d62000-07-05 10:38:09 +000010886/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010887#ifdef __cplusplus
10888extern "C"
10889#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010890/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010891 builtin and then its argument prototype would still apply. */
10892char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010893#ifdef F77_DUMMY_MAIN
10894# ifdef __cplusplus
10895 extern "C"
10896# endif
10897 int F77_DUMMY_MAIN() { return 1; }
10898#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010899int
10900main ()
10901{
10902pthread_create ();
10903 ;
10904 return 0;
10905}
10906_ACEOF
10907rm -f conftest.$ac_objext conftest$ac_exeext
10908if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10909 (eval $ac_link) 2>&5
10910 ac_status=$?
10911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10912 (exit $ac_status); } &&
10913 { ac_try='test -s conftest$ac_exeext'
10914 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10915 (eval $ac_try) 2>&5
10916 ac_status=$?
10917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10918 (exit $ac_status); }; }; then
10919 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010920else
Martin v. Löwis11437992002-04-12 09:54:03 +000010921 echo "$as_me: failed program was:" >&5
10922cat conftest.$ac_ext >&5
10923ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010924fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010925rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10926LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010927fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010928echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10929echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10930if test $ac_cv_lib_pthreads_pthread_create = yes; then
10931 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010932#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010933_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010934
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010935 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010936 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010937 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010938else
Greg Steinadf63d62000-07-05 10:38:09 +000010939
Martin v. Löwis11437992002-04-12 09:54:03 +000010940 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10941echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10942if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10943 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010944else
Martin v. Löwis11437992002-04-12 09:54:03 +000010945 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010946LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010947cat >conftest.$ac_ext <<_ACEOF
10948#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010949#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010950
Guido van Rossum49545951997-12-02 19:28:29 +000010951/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010952#ifdef __cplusplus
10953extern "C"
10954#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010955/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010956 builtin and then its argument prototype would still apply. */
10957char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010958#ifdef F77_DUMMY_MAIN
10959# ifdef __cplusplus
10960 extern "C"
10961# endif
10962 int F77_DUMMY_MAIN() { return 1; }
10963#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010964int
10965main ()
10966{
10967pthread_create ();
10968 ;
10969 return 0;
10970}
10971_ACEOF
10972rm -f conftest.$ac_objext conftest$ac_exeext
10973if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10974 (eval $ac_link) 2>&5
10975 ac_status=$?
10976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10977 (exit $ac_status); } &&
10978 { ac_try='test -s conftest$ac_exeext'
10979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10980 (eval $ac_try) 2>&5
10981 ac_status=$?
10982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10983 (exit $ac_status); }; }; then
10984 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010985else
Martin v. Löwis11437992002-04-12 09:54:03 +000010986 echo "$as_me: failed program was:" >&5
10987cat conftest.$ac_ext >&5
10988ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010989fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010990rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10991LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010992fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010993echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10994echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10995if test $ac_cv_lib_c_r_pthread_create = yes; then
10996 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010997#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010998_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010999
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011000 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011001 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011002 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011003else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011004
Martin v. Löwis11437992002-04-12 09:54:03 +000011005 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
11006echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
11007if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
11008 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011009else
Martin v. Löwis11437992002-04-12 09:54:03 +000011010 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011011LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011012cat >conftest.$ac_ext <<_ACEOF
11013#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011014#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011015
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011016/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011017#ifdef __cplusplus
11018extern "C"
11019#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011020/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011021 builtin and then its argument prototype would still apply. */
11022char __d6_pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011023#ifdef F77_DUMMY_MAIN
11024# ifdef __cplusplus
11025 extern "C"
11026# endif
11027 int F77_DUMMY_MAIN() { return 1; }
11028#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011029int
11030main ()
11031{
11032__d6_pthread_create ();
11033 ;
11034 return 0;
11035}
11036_ACEOF
11037rm -f conftest.$ac_objext conftest$ac_exeext
11038if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11039 (eval $ac_link) 2>&5
11040 ac_status=$?
11041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11042 (exit $ac_status); } &&
11043 { ac_try='test -s conftest$ac_exeext'
11044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11045 (eval $ac_try) 2>&5
11046 ac_status=$?
11047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11048 (exit $ac_status); }; }; then
11049 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011050else
Martin v. Löwis11437992002-04-12 09:54:03 +000011051 echo "$as_me: failed program was:" >&5
11052cat conftest.$ac_ext >&5
11053ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011054fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011055rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11056LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011057fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011058echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
11059echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
11060if test $ac_cv_lib_thread___d6_pthread_create = yes; then
11061 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011062#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011063_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011064
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011065 echo Systems with __d6_pthread_create are not supported anymore.
11066 echo See README
11067 exit 1
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011068 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011069 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011070 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000011071else
Guido van Rossum49545951997-12-02 19:28:29 +000011072
Martin v. Löwis11437992002-04-12 09:54:03 +000011073 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
11074echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
11075if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
11076 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011077else
Martin v. Löwis11437992002-04-12 09:54:03 +000011078 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011079LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011080cat >conftest.$ac_ext <<_ACEOF
11081#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011082#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011083
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011084/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011085#ifdef __cplusplus
11086extern "C"
11087#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011088/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011089 builtin and then its argument prototype would still apply. */
11090char __pthread_create_system ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011091#ifdef F77_DUMMY_MAIN
11092# ifdef __cplusplus
11093 extern "C"
11094# endif
11095 int F77_DUMMY_MAIN() { return 1; }
11096#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011097int
11098main ()
11099{
11100__pthread_create_system ();
11101 ;
11102 return 0;
11103}
11104_ACEOF
11105rm -f conftest.$ac_objext conftest$ac_exeext
11106if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11107 (eval $ac_link) 2>&5
11108 ac_status=$?
11109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11110 (exit $ac_status); } &&
11111 { ac_try='test -s conftest$ac_exeext'
11112 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11113 (eval $ac_try) 2>&5
11114 ac_status=$?
11115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11116 (exit $ac_status); }; }; then
11117 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011118else
Martin v. Löwis11437992002-04-12 09:54:03 +000011119 echo "$as_me: failed program was:" >&5
11120cat conftest.$ac_ext >&5
11121ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011122fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011123rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11124LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011125fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011126echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11127echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
11128if test $ac_cv_lib_pthread___pthread_create_system = yes; then
11129 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011130#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011131_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011132
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011133 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011134 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011135 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011136else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011137
Martin v. Löwis11437992002-04-12 09:54:03 +000011138 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
11139echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
11140if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
11141 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000011142else
Martin v. Löwis11437992002-04-12 09:54:03 +000011143 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011144LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011145cat >conftest.$ac_ext <<_ACEOF
11146#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011147#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011148
Guido van Rossumb93a8621998-05-07 13:27:32 +000011149/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011150#ifdef __cplusplus
11151extern "C"
11152#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000011153/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011154 builtin and then its argument prototype would still apply. */
11155char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011156#ifdef F77_DUMMY_MAIN
11157# ifdef __cplusplus
11158 extern "C"
11159# endif
11160 int F77_DUMMY_MAIN() { return 1; }
11161#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011162int
11163main ()
11164{
11165pthread_create ();
11166 ;
11167 return 0;
11168}
11169_ACEOF
11170rm -f conftest.$ac_objext conftest$ac_exeext
11171if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11172 (eval $ac_link) 2>&5
11173 ac_status=$?
11174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11175 (exit $ac_status); } &&
11176 { ac_try='test -s conftest$ac_exeext'
11177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11178 (eval $ac_try) 2>&5
11179 ac_status=$?
11180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11181 (exit $ac_status); }; }; then
11182 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000011183else
Martin v. Löwis11437992002-04-12 09:54:03 +000011184 echo "$as_me: failed program was:" >&5
11185cat conftest.$ac_ext >&5
11186ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011187fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011188rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11189LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011190fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011191echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
11192echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
11193if test $ac_cv_lib_cma_pthread_create = yes; then
11194 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011195#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011196_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011197
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011198 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011199 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011200 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011201else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011202
Martin v. Löwis130fb172001-07-19 11:00:41 +000011203 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000011204fi
11205
Guido van Rossum627b2d71993-12-24 10:39:16 +000011206
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011207fi
11208
Guido van Rossum0be3e491997-05-22 20:33:33 +000011209fi
11210
Guido van Rossum49545951997-12-02 19:28:29 +000011211fi
11212
Guido van Rossumb93a8621998-05-07 13:27:32 +000011213fi
11214
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011215fi
11216
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011217
Michael W. Hudson54241132001-12-07 15:38:26 +000011218fi
11219
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011220
11221fi
11222
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011223fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011224rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11225fi;
11226fi
11227
11228
11229fi
11230
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011231
Michael W. Hudson54241132001-12-07 15:38:26 +000011232
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011233 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011234 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011235
11236cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011237#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011238_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011239
11240 fi
11241
Martin v. Löwisdfc33fd2003-01-21 10:14:41 +000011242 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11243 case $ac_sys_system/$ac_sys_release in
11244 SunOS/5.8)
11245cat >>confdefs.h <<\_ACEOF
11246#define HAVE_BROKEN_POSIX_SEMAPHORES 1
11247_ACEOF
11248;;
11249 esac
11250
Martin v. Löwis11437992002-04-12 09:54:03 +000011251 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11252echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11253 if test "${ac_cv_pthread_system_supported+set}" = set; then
11254 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011255else
11256 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011257 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011258else
Martin v. Löwis11437992002-04-12 09:54:03 +000011259 cat >conftest.$ac_ext <<_ACEOF
11260#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011261#include "confdefs.h"
11262#include <pthread.h>
11263 void *foo(void *parm) {
11264 return NULL;
11265 }
11266 main() {
11267 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011268 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011269 if (pthread_attr_init(&attr)) exit(-1);
11270 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011271 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011272 exit(0);
11273 }
Martin v. Löwis11437992002-04-12 09:54:03 +000011274_ACEOF
11275rm -f conftest$ac_exeext
11276if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11277 (eval $ac_link) 2>&5
11278 ac_status=$?
11279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11280 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11282 (eval $ac_try) 2>&5
11283 ac_status=$?
11284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11285 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011286 ac_cv_pthread_system_supported=yes
11287else
Martin v. Löwis11437992002-04-12 09:54:03 +000011288 echo "$as_me: program exited with status $ac_status" >&5
11289echo "$as_me: failed program was:" >&5
11290cat conftest.$ac_ext >&5
11291( exit $ac_status )
11292ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011293fi
Barry Warsawfe33b792003-01-07 22:42:49 +000011294rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011295fi
11296
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011297fi
11298
Martin v. Löwis11437992002-04-12 09:54:03 +000011299 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11300echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011301 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011302
11303cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011304#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011305_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011306
11307 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011308
11309for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011310do
Martin v. Löwis11437992002-04-12 09:54:03 +000011311as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11312echo "$as_me:$LINENO: checking for $ac_func" >&5
11313echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11314if eval "test \"\${$as_ac_var+set}\" = set"; then
11315 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011316else
Martin v. Löwis11437992002-04-12 09:54:03 +000011317 cat >conftest.$ac_ext <<_ACEOF
11318#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011319#include "confdefs.h"
11320/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011321 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011322#include <assert.h>
11323/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011324#ifdef __cplusplus
11325extern "C"
11326#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011327/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011328 builtin and then its argument prototype would still apply. */
11329char $ac_func ();
11330char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011331
Barry Warsawfe33b792003-01-07 22:42:49 +000011332#ifdef F77_DUMMY_MAIN
11333# ifdef __cplusplus
11334 extern "C"
11335# endif
11336 int F77_DUMMY_MAIN() { return 1; }
11337#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011338int
11339main ()
11340{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011341/* The GNU C library defines this for functions which it implements
11342 to always fail with ENOSYS. Some functions are actually named
11343 something starting with __ and the normal name is an alias. */
11344#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11345choke me
11346#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011347f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011348#endif
11349
Martin v. Löwis11437992002-04-12 09:54:03 +000011350 ;
11351 return 0;
11352}
11353_ACEOF
11354rm -f conftest.$ac_objext conftest$ac_exeext
11355if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11356 (eval $ac_link) 2>&5
11357 ac_status=$?
11358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11359 (exit $ac_status); } &&
11360 { ac_try='test -s conftest$ac_exeext'
11361 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11362 (eval $ac_try) 2>&5
11363 ac_status=$?
11364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11365 (exit $ac_status); }; }; then
11366 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011367else
Martin v. Löwis11437992002-04-12 09:54:03 +000011368 echo "$as_me: failed program was:" >&5
11369cat conftest.$ac_ext >&5
11370eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011371fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011372rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011373fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011374echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11375echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11376if test `eval echo '${'$as_ac_var'}'` = yes; then
11377 cat >>confdefs.h <<_ACEOF
11378#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11379_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011380
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011381fi
11382done
11383
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011384 fi
11385
Martin v. Löwis11437992002-04-12 09:54:03 +000011386 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11387echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11388if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11389 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011390else
Martin v. Löwis11437992002-04-12 09:54:03 +000011391 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011392LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011393cat >conftest.$ac_ext <<_ACEOF
11394#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011395#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011396
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011397/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011398#ifdef __cplusplus
11399extern "C"
11400#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011401/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011402 builtin and then its argument prototype would still apply. */
11403char usconfig ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011404#ifdef F77_DUMMY_MAIN
11405# ifdef __cplusplus
11406 extern "C"
11407# endif
11408 int F77_DUMMY_MAIN() { return 1; }
11409#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011410int
11411main ()
11412{
11413usconfig ();
11414 ;
11415 return 0;
11416}
11417_ACEOF
11418rm -f conftest.$ac_objext conftest$ac_exeext
11419if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11420 (eval $ac_link) 2>&5
11421 ac_status=$?
11422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11423 (exit $ac_status); } &&
11424 { ac_try='test -s conftest$ac_exeext'
11425 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11426 (eval $ac_try) 2>&5
11427 ac_status=$?
11428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11429 (exit $ac_status); }; }; then
11430 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011431else
Martin v. Löwis11437992002-04-12 09:54:03 +000011432 echo "$as_me: failed program was:" >&5
11433cat conftest.$ac_ext >&5
11434ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011435fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011436rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11437LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011438fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011439echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11440echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11441if test $ac_cv_lib_mpc_usconfig = yes; then
11442 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011443#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011444_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011445
Martin v. Löwis130fb172001-07-19 11:00:41 +000011446 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011447 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011448 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011449fi
11450
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011451
Neal Norwitza978ab02002-11-02 16:58:05 +000011452 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011453 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11454echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11455if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11456 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011457else
Martin v. Löwis11437992002-04-12 09:54:03 +000011458 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011459LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011460cat >conftest.$ac_ext <<_ACEOF
11461#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011462#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011463
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011464/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011465#ifdef __cplusplus
11466extern "C"
11467#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011468/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011469 builtin and then its argument prototype would still apply. */
11470char thr_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011471#ifdef F77_DUMMY_MAIN
11472# ifdef __cplusplus
11473 extern "C"
11474# endif
11475 int F77_DUMMY_MAIN() { return 1; }
11476#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011477int
11478main ()
11479{
11480thr_create ();
11481 ;
11482 return 0;
11483}
11484_ACEOF
11485rm -f conftest.$ac_objext conftest$ac_exeext
11486if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11487 (eval $ac_link) 2>&5
11488 ac_status=$?
11489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11490 (exit $ac_status); } &&
11491 { ac_try='test -s conftest$ac_exeext'
11492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11493 (eval $ac_try) 2>&5
11494 ac_status=$?
11495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11496 (exit $ac_status); }; }; then
11497 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011498else
Martin v. Löwis11437992002-04-12 09:54:03 +000011499 echo "$as_me: failed program was:" >&5
11500cat conftest.$ac_ext >&5
11501ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011502fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011503rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11504LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011505fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011506echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11507echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11508if test $ac_cv_lib_thread_thr_create = yes; then
11509 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011510#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011511_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011512
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011513 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011514 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011515 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011516fi
11517
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011518 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011519
Martin v. Löwis130fb172001-07-19 11:00:41 +000011520 if test "$USE_THREAD_MODULE" != "#"
11521 then
11522 # If the above checks didn't disable threads, (at least) OSF1
11523 # needs this '-threads' argument during linking.
11524 case $ac_sys_system in
11525 OSF1) LDLAST=-threads;;
11526 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011527 fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011528
11529 if test "$posix_threads" = yes -a \
11530 "$ac_sys_system" = "SunOS" -a \
11531 "$ac_sys_release" = "5.6"; then
11532
11533cat >>confdefs.h <<\_ACEOF
11534#define HAVE_PTHREAD_DESTRUCTOR 1
11535_ACEOF
11536
11537 fi
11538
Guido van Rossum627b2d71993-12-24 10:39:16 +000011539fi
11540
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011541# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011542
11543
11544echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11545echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011546# Check whether --enable-ipv6 or --disable-ipv6 was given.
11547if test "${enable_ipv6+set}" = set; then
11548 enableval="$enable_ipv6"
11549 case "$enableval" in
11550 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011551 echo "$as_me:$LINENO: result: no" >&5
11552echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011553 ipv6=no
11554 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011555 *) echo "$as_me:$LINENO: result: yes" >&5
11556echo "${ECHO_T}yes" >&6
11557 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011558#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011559_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011560
11561 ipv6=yes
11562 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011563 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011564else
Martin v. Löwis11437992002-04-12 09:54:03 +000011565
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011566 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011567 echo "$as_me:$LINENO: result: no" >&5
11568echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011569 ipv6=no
11570
11571else
Martin v. Löwis11437992002-04-12 09:54:03 +000011572 cat >conftest.$ac_ext <<_ACEOF
11573#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011574#include "confdefs.h"
11575 /* AF_INET6 available check */
11576#include <sys/types.h>
11577#include <sys/socket.h>
11578main()
11579{
11580 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11581 exit(1);
11582 else
11583 exit(0);
11584}
11585
Martin v. Löwis11437992002-04-12 09:54:03 +000011586_ACEOF
11587rm -f conftest$ac_exeext
11588if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11589 (eval $ac_link) 2>&5
11590 ac_status=$?
11591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11592 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11594 (eval $ac_try) 2>&5
11595 ac_status=$?
11596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11597 (exit $ac_status); }; }; then
11598 echo "$as_me:$LINENO: result: yes" >&5
11599echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011600 ipv6=yes
11601else
Martin v. Löwis11437992002-04-12 09:54:03 +000011602 echo "$as_me: program exited with status $ac_status" >&5
11603echo "$as_me: failed program was:" >&5
11604cat conftest.$ac_ext >&5
11605( exit $ac_status )
11606echo "$as_me:$LINENO: result: no" >&5
11607echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011608 ipv6=no
11609fi
Barry Warsawfe33b792003-01-07 22:42:49 +000011610rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011611fi
11612
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011613if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011614 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11615echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11616 cat >conftest.$ac_ext <<_ACEOF
11617#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011618#include "confdefs.h"
11619#include <sys/types.h>
11620#include <netinet/in.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000011621#ifdef F77_DUMMY_MAIN
11622# ifdef __cplusplus
11623 extern "C"
11624# endif
11625 int F77_DUMMY_MAIN() { return 1; }
11626#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011627int
11628main ()
11629{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011630struct sockaddr_in6 x;
11631x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011632 ;
11633 return 0;
11634}
11635_ACEOF
11636rm -f conftest.$ac_objext
11637if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11638 (eval $ac_compile) 2>&5
11639 ac_status=$?
11640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11641 (exit $ac_status); } &&
11642 { ac_try='test -s conftest.$ac_objext'
11643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11644 (eval $ac_try) 2>&5
11645 ac_status=$?
11646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11647 (exit $ac_status); }; }; then
11648 echo "$as_me:$LINENO: result: yes" >&5
11649echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011650 ipv6=yes
11651else
Martin v. Löwis11437992002-04-12 09:54:03 +000011652 echo "$as_me: failed program was:" >&5
11653cat conftest.$ac_ext >&5
11654echo "$as_me:$LINENO: result: no" >&5
11655echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011656 ipv6=no
11657fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011658rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011659fi
11660
11661if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011662 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011663#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011664_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011665
11666fi
11667
Martin v. Löwis11437992002-04-12 09:54:03 +000011668fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011669
11670ipv6type=unknown
11671ipv6lib=none
11672ipv6trylibc=no
11673
11674if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011675 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11676echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011677 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11678 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011679 case $i in
11680 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011681 cat >conftest.$ac_ext <<_ACEOF
11682#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011683#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011684
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011685#include <netinet/in.h>
11686#ifdef IPV6_INRIA_VERSION
11687yes
11688#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011689_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011690if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011691 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011692 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011693fi
11694rm -f conftest*
11695
11696 ;;
11697 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011698 cat >conftest.$ac_ext <<_ACEOF
11699#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011700#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011701
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011702#include <netinet/in.h>
11703#ifdef __KAME__
11704yes
11705#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011706_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011707if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011708 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011709 ipv6type=$i;
11710 ipv6lib=inet6
11711 ipv6libdir=/usr/local/v6/lib
11712 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011713fi
11714rm -f conftest*
11715
11716 ;;
11717 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011718 cat >conftest.$ac_ext <<_ACEOF
11719#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011720#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011721
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011722#include <features.h>
11723#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11724yes
11725#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011726_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011727if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011728 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011729 ipv6type=$i;
11730 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011731fi
11732rm -f conftest*
11733
11734 ;;
11735 linux-inet6)
11736 if test -d /usr/inet6; then
11737 ipv6type=$i
11738 ipv6lib=inet6
11739 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011740 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011741 fi
11742 ;;
11743 solaris)
11744 if test -f /etc/netconfig; then
11745 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11746 ipv6type=$i
11747 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011748 fi
11749 fi
11750 ;;
11751 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011752 cat >conftest.$ac_ext <<_ACEOF
11753#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011754#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011755
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011756#include <sys/param.h>
11757#ifdef _TOSHIBA_INET6
11758yes
11759#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011760_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011761if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011762 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011763 ipv6type=$i;
11764 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011765 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011766fi
11767rm -f conftest*
11768
11769 ;;
11770 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011771 cat >conftest.$ac_ext <<_ACEOF
11772#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011773#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011774
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011775#include </usr/local/v6/include/sys/v6config.h>
11776#ifdef __V6D__
11777yes
11778#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011779_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011780if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011781 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011782 ipv6type=$i;
11783 ipv6lib=v6;
11784 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011785 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011786fi
11787rm -f conftest*
11788
11789 ;;
11790 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011791 cat >conftest.$ac_ext <<_ACEOF
11792#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011793#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011794
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011795#include <sys/param.h>
11796#ifdef _ZETA_MINAMI_INET6
11797yes
11798#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011799_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011800if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011801 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011802 ipv6type=$i;
11803 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011804 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011805fi
11806rm -f conftest*
11807
11808 ;;
11809 esac
11810 if test "$ipv6type" != "unknown"; then
11811 break
11812 fi
11813 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011814 echo "$as_me:$LINENO: result: $ipv6type" >&5
11815echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011816fi
11817
11818if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11819 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11820 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11821 echo "using lib$ipv6lib"
11822 else
11823 if test $ipv6trylibc = "yes"; then
11824 echo "using libc"
11825 else
11826 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11827 echo "You need to fetch lib$ipv6lib.a from appropriate"
11828 echo 'ipv6 kit and compile beforehand.'
11829 exit 1
11830 fi
11831 fi
11832fi
11833
Jack Jansen7b8c7542002-04-14 20:12:41 +000011834# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000011835echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
11836echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000011837
11838# Check whether --with-universal-newlines or --without-universal-newlines was given.
11839if test "${with_universal_newlines+set}" = set; then
11840 withval="$with_universal_newlines"
11841
11842fi;
11843
11844if test -z "$with_universal_newlines"
11845then with_universal_newlines="yes"
11846fi
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011847if test "$with_universal_newlines" = "no"
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011848then
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011849 echo --without-universal-newlines is unsupported, see README
11850 exit 1
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011851else
Martin v. Löwise8aea582002-04-16 05:51:02 +000011852
11853cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011854#define WITH_UNIVERSAL_NEWLINES 1
11855_ACEOF
11856
11857fi
11858echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11859echo "${ECHO_T}$with_universal_newlines" >&6
11860
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011861# Check for --with-doc-strings
11862echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11863echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11864
11865# Check whether --with-doc-strings or --without-doc-strings was given.
11866if test "${with_doc_strings+set}" = set; then
11867 withval="$with_doc_strings"
11868
11869fi;
11870
11871if test -z "$with_doc_strings"
11872then with_doc_strings="yes"
11873fi
11874if test "$with_doc_strings" != "no"
11875then
11876
11877cat >>confdefs.h <<\_ACEOF
11878#define WITH_DOC_STRINGS 1
11879_ACEOF
11880
11881fi
11882echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11883echo "${ECHO_T}$with_doc_strings" >&6
11884
Neil Schemenauera35c6882001-02-27 04:45:05 +000011885# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011886echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11887echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11888
Neil Schemenauera35c6882001-02-27 04:45:05 +000011889# Check whether --with-pymalloc or --without-pymalloc was given.
11890if test "${with_pymalloc+set}" = set; then
11891 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011892
Martin v. Löwis11437992002-04-12 09:54:03 +000011893fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011894
Neil Schemenauer16c22972002-03-22 15:34:49 +000011895if test -z "$with_pymalloc"
11896then with_pymalloc="yes"
11897fi
11898if test "$with_pymalloc" != "no"
11899then
Martin v. Löwis11437992002-04-12 09:54:03 +000011900
11901cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011902#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011903_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011904
11905fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011906echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11907echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011908
Barry Warsawef82cd72000-06-30 16:21:01 +000011909# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011910echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11911echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11912
Barry Warsawef82cd72000-06-30 16:21:01 +000011913# Check whether --with-wctype-functions or --without-wctype-functions was given.
11914if test "${with_wctype_functions+set}" = set; then
11915 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011916
Barry Warsawef82cd72000-06-30 16:21:01 +000011917if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011918then
11919
11920cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011921#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011922_ACEOF
11923
11924 echo "$as_me:$LINENO: result: yes" >&5
11925echo "${ECHO_T}yes" >&6
11926else echo "$as_me:$LINENO: result: no" >&5
11927echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011928fi
11929else
Martin v. Löwis11437992002-04-12 09:54:03 +000011930 echo "$as_me:$LINENO: result: no" >&5
11931echo "${ECHO_T}no" >&6
11932fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011933
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011934# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011935
Guido van Rossum98935bf2001-09-05 19:13:16 +000011936DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011937
Martin v. Löwis11437992002-04-12 09:54:03 +000011938echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11939echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11940
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011941# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011942if test "${with_sgi_dl+set}" = set; then
11943 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011944
11945echo "$as_me:$LINENO: result: $withval" >&5
11946echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000011947echo --with-sgi-dl is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011948exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011949
11950cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011951#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011952_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011953
Guido van Rossume97ee181999-12-20 21:27:22 +000011954DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011955dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011956if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011957then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011958else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11959echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11960 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011961fi
11962DLINCLDIR=${dldir}
11963LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011964else
Martin v. Löwis11437992002-04-12 09:54:03 +000011965 echo "$as_me:$LINENO: result: no" >&5
11966echo "${ECHO_T}no" >&6
11967fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011968
Martin v. Löwis11437992002-04-12 09:54:03 +000011969echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11970echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011971
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011972# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011973if test "${with_dl_dld+set}" = set; then
11974 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011975
11976echo "$as_me:$LINENO: result: $withval" >&5
11977echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000011978echo --with-dl-dld is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011979exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011980
11981cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011982#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011983_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011984
Guido van Rossume97ee181999-12-20 21:27:22 +000011985DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011986dldir=`echo "$withval" | sed 's/,.*//'`
11987dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011988if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011989then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011990else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&5
11991echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&2;}
11992 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011993fi
11994DLINCLDIR=${dldir}
11995LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011996else
Martin v. Löwis11437992002-04-12 09:54:03 +000011997 echo "$as_me:$LINENO: result: no" >&5
11998echo "${ECHO_T}no" >&6
11999fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000012000
Guido van Rossume97ee181999-12-20 21:27:22 +000012001# the dlopen() function means we might want to use dynload_shlib.o. some
12002# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012003
Thomas Wouters3a584202000-08-05 23:28:51 +000012004for ac_func in dlopen
12005do
Martin v. Löwis11437992002-04-12 09:54:03 +000012006as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12007echo "$as_me:$LINENO: checking for $ac_func" >&5
12008echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12009if eval "test \"\${$as_ac_var+set}\" = set"; then
12010 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012011else
Martin v. Löwis11437992002-04-12 09:54:03 +000012012 cat >conftest.$ac_ext <<_ACEOF
12013#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000012014#include "confdefs.h"
12015/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012016 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000012017#include <assert.h>
12018/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012019#ifdef __cplusplus
12020extern "C"
12021#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012022/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012023 builtin and then its argument prototype would still apply. */
12024char $ac_func ();
12025char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000012026
Barry Warsawfe33b792003-01-07 22:42:49 +000012027#ifdef F77_DUMMY_MAIN
12028# ifdef __cplusplus
12029 extern "C"
12030# endif
12031 int F77_DUMMY_MAIN() { return 1; }
12032#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012033int
12034main ()
12035{
Guido van Rossume97ee181999-12-20 21:27:22 +000012036/* The GNU C library defines this for functions which it implements
12037 to always fail with ENOSYS. Some functions are actually named
12038 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012039#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000012040choke me
12041#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012042f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000012043#endif
12044
Martin v. Löwis11437992002-04-12 09:54:03 +000012045 ;
12046 return 0;
12047}
12048_ACEOF
12049rm -f conftest.$ac_objext conftest$ac_exeext
12050if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12051 (eval $ac_link) 2>&5
12052 ac_status=$?
12053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12054 (exit $ac_status); } &&
12055 { ac_try='test -s conftest$ac_exeext'
12056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12057 (eval $ac_try) 2>&5
12058 ac_status=$?
12059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12060 (exit $ac_status); }; }; then
12061 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012062else
Martin v. Löwis11437992002-04-12 09:54:03 +000012063 echo "$as_me: failed program was:" >&5
12064cat conftest.$ac_ext >&5
12065eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012066fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012067rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012068fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012069echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12070echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12071if test `eval echo '${'$as_ac_var'}'` = yes; then
12072 cat >>confdefs.h <<_ACEOF
12073#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12074_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012075
Guido van Rossume97ee181999-12-20 21:27:22 +000012076fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012077done
Guido van Rossume97ee181999-12-20 21:27:22 +000012078
Michael W. Hudson54241132001-12-07 15:38:26 +000012079
Guido van Rossume97ee181999-12-20 21:27:22 +000012080# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12081# loading of modules.
12082
Martin v. Löwis11437992002-04-12 09:54:03 +000012083echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
12084echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012085if test -z "$DYNLOADFILE"
12086then
12087 case $ac_sys_system/$ac_sys_release in
12088 AIX*) DYNLOADFILE="dynload_aix.o";;
12089 BeOS*) DYNLOADFILE="dynload_beos.o";;
12090 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000012091 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012092 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000012093 *)
12094 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
12095 # out any dynamic loading
12096 if test "$ac_cv_func_dlopen" = yes
12097 then DYNLOADFILE="dynload_shlib.o"
12098 else DYNLOADFILE="dynload_stub.o"
12099 fi
12100 ;;
12101 esac
12102fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012103echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
12104echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012105if test "$DYNLOADFILE" != "dynload_stub.o"
12106then
Martin v. Löwis11437992002-04-12 09:54:03 +000012107
12108cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012109#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012110_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012111
12112fi
12113
Neil Schemenauer4e425612001-06-19 15:44:15 +000012114# MACHDEP_OBJS can be set to platform-specific object files needed by Python
12115
Michael W. Hudson54241132001-12-07 15:38:26 +000012116
Martin v. Löwis11437992002-04-12 09:54:03 +000012117echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
12118echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012119if test -z "$MACHDEP_OBJS"
12120then
Jack Jansene578a632001-08-15 01:27:14 +000012121 MACHDEP_OBJS=$extra_machdep_objs
12122else
12123 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000012124fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012125echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
12126echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012127
Guido van Rossum627b2d71993-12-24 10:39:16 +000012128# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
Martin v. Löwis9c36c292002-12-21 18:34:06 +000012202
Martin v. Löwisd5843682002-11-21 20:41:28 +000012203for ac_func in alarm chown clock confstr ctermid execv \
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012204 fchdir fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012205 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
12206 getpriority getpwent getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000012207 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000012208 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000012209 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000012210 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000012211 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012212 sigaction siginterrupt sigrelse strftime strptime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000012213 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012214 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000012215do
Martin v. Löwis11437992002-04-12 09:54:03 +000012216as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12217echo "$as_me:$LINENO: checking for $ac_func" >&5
12218echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12219if eval "test \"\${$as_ac_var+set}\" = set"; then
12220 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012221else
Martin v. Löwis11437992002-04-12 09:54:03 +000012222 cat >conftest.$ac_ext <<_ACEOF
12223#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012224#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012225/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012226 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012227#include <assert.h>
12228/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012229#ifdef __cplusplus
12230extern "C"
12231#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012232/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012233 builtin and then its argument prototype would still apply. */
12234char $ac_func ();
12235char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012236
Barry Warsawfe33b792003-01-07 22:42:49 +000012237#ifdef F77_DUMMY_MAIN
12238# ifdef __cplusplus
12239 extern "C"
12240# endif
12241 int F77_DUMMY_MAIN() { return 1; }
12242#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012243int
12244main ()
12245{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012246/* The GNU C library defines this for functions which it implements
12247 to always fail with ENOSYS. Some functions are actually named
12248 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012249#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012250choke me
12251#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012252f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012253#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012254
Martin v. Löwis11437992002-04-12 09:54:03 +000012255 ;
12256 return 0;
12257}
12258_ACEOF
12259rm -f conftest.$ac_objext conftest$ac_exeext
12260if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12261 (eval $ac_link) 2>&5
12262 ac_status=$?
12263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12264 (exit $ac_status); } &&
12265 { ac_try='test -s conftest$ac_exeext'
12266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12267 (eval $ac_try) 2>&5
12268 ac_status=$?
12269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12270 (exit $ac_status); }; }; then
12271 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012272else
Martin v. Löwis11437992002-04-12 09:54:03 +000012273 echo "$as_me: failed program was:" >&5
12274cat conftest.$ac_ext >&5
12275eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012276fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012277rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012278fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012279echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12280echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12281if test `eval echo '${'$as_ac_var'}'` = yes; then
12282 cat >>confdefs.h <<_ACEOF
12283#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12284_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012285
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012286fi
12287done
12288
Michael W. Hudson54241132001-12-07 15:38:26 +000012289
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012290# For some functions, having a definition is not sufficient, since
12291# we want to take their address.
12292echo "$as_me:$LINENO: checking for chroot" >&5
12293echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12294cat >conftest.$ac_ext <<_ACEOF
12295#line $LINENO "configure"
12296#include "confdefs.h"
12297#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012298#ifdef F77_DUMMY_MAIN
12299# ifdef __cplusplus
12300 extern "C"
12301# endif
12302 int F77_DUMMY_MAIN() { return 1; }
12303#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012304int
12305main ()
12306{
12307void *x=chroot
12308 ;
12309 return 0;
12310}
12311_ACEOF
12312rm -f conftest.$ac_objext
12313if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12314 (eval $ac_compile) 2>&5
12315 ac_status=$?
12316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12317 (exit $ac_status); } &&
12318 { ac_try='test -s conftest.$ac_objext'
12319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12320 (eval $ac_try) 2>&5
12321 ac_status=$?
12322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12323 (exit $ac_status); }; }; then
12324
12325cat >>confdefs.h <<\_ACEOF
12326#define HAVE_CHROOT 1
12327_ACEOF
12328
12329 echo "$as_me:$LINENO: result: yes" >&5
12330echo "${ECHO_T}yes" >&6
12331else
12332 echo "$as_me: failed program was:" >&5
12333cat conftest.$ac_ext >&5
12334echo "$as_me:$LINENO: result: no" >&5
12335echo "${ECHO_T}no" >&6
12336
12337fi
12338rm -f conftest.$ac_objext conftest.$ac_ext
12339echo "$as_me:$LINENO: checking for link" >&5
12340echo $ECHO_N "checking for link... $ECHO_C" >&6
12341cat >conftest.$ac_ext <<_ACEOF
12342#line $LINENO "configure"
12343#include "confdefs.h"
12344#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012345#ifdef F77_DUMMY_MAIN
12346# ifdef __cplusplus
12347 extern "C"
12348# endif
12349 int F77_DUMMY_MAIN() { return 1; }
12350#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012351int
12352main ()
12353{
12354void *x=link
12355 ;
12356 return 0;
12357}
12358_ACEOF
12359rm -f conftest.$ac_objext
12360if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12361 (eval $ac_compile) 2>&5
12362 ac_status=$?
12363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12364 (exit $ac_status); } &&
12365 { ac_try='test -s conftest.$ac_objext'
12366 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12367 (eval $ac_try) 2>&5
12368 ac_status=$?
12369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12370 (exit $ac_status); }; }; then
12371
12372cat >>confdefs.h <<\_ACEOF
12373#define HAVE_LINK 1
12374_ACEOF
12375
12376 echo "$as_me:$LINENO: result: yes" >&5
12377echo "${ECHO_T}yes" >&6
12378else
12379 echo "$as_me: failed program was:" >&5
12380cat conftest.$ac_ext >&5
12381echo "$as_me:$LINENO: result: no" >&5
12382echo "${ECHO_T}no" >&6
12383
12384fi
12385rm -f conftest.$ac_objext conftest.$ac_ext
12386echo "$as_me:$LINENO: checking for symlink" >&5
12387echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12388cat >conftest.$ac_ext <<_ACEOF
12389#line $LINENO "configure"
12390#include "confdefs.h"
12391#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012392#ifdef F77_DUMMY_MAIN
12393# ifdef __cplusplus
12394 extern "C"
12395# endif
12396 int F77_DUMMY_MAIN() { return 1; }
12397#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012398int
12399main ()
12400{
12401void *x=symlink
12402 ;
12403 return 0;
12404}
12405_ACEOF
12406rm -f conftest.$ac_objext
12407if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12408 (eval $ac_compile) 2>&5
12409 ac_status=$?
12410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12411 (exit $ac_status); } &&
12412 { ac_try='test -s conftest.$ac_objext'
12413 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12414 (eval $ac_try) 2>&5
12415 ac_status=$?
12416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12417 (exit $ac_status); }; }; then
12418
12419cat >>confdefs.h <<\_ACEOF
12420#define HAVE_SYMLINK 1
12421_ACEOF
12422
12423 echo "$as_me:$LINENO: result: yes" >&5
12424echo "${ECHO_T}yes" >&6
12425else
12426 echo "$as_me: failed program was:" >&5
12427cat conftest.$ac_ext >&5
12428echo "$as_me:$LINENO: result: no" >&5
12429echo "${ECHO_T}no" >&6
12430
12431fi
12432rm -f conftest.$ac_objext conftest.$ac_ext
12433
Martin v. Löwisd5843682002-11-21 20:41:28 +000012434# On some systems (eg. FreeBSD 5), we would find a definition of the
12435# functions ctermid_r, setgroups in the library, but no prototype
12436# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12437# address to avoid compiler warnings and potential miscompilations
12438# because of the missing prototypes.
12439
12440echo "$as_me:$LINENO: checking for ctermid_r" >&5
12441echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
12442cat >conftest.$ac_ext <<_ACEOF
12443#line $LINENO "configure"
12444#include "confdefs.h"
12445
12446#include "confdefs.h"
12447#include <stdio.h>
12448
Barry Warsawfe33b792003-01-07 22:42:49 +000012449#ifdef F77_DUMMY_MAIN
12450# ifdef __cplusplus
12451 extern "C"
12452# endif
12453 int F77_DUMMY_MAIN() { return 1; }
12454#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012455int
12456main ()
12457{
12458void* p = ctermid_r
12459 ;
12460 return 0;
12461}
12462_ACEOF
12463rm -f conftest.$ac_objext
12464if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12465 (eval $ac_compile) 2>&5
12466 ac_status=$?
12467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12468 (exit $ac_status); } &&
12469 { ac_try='test -s conftest.$ac_objext'
12470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12471 (eval $ac_try) 2>&5
12472 ac_status=$?
12473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12474 (exit $ac_status); }; }; then
12475
12476cat >>confdefs.h <<\_ACEOF
12477#define HAVE_CTERMID_R 1
12478_ACEOF
12479
12480 echo "$as_me:$LINENO: result: yes" >&5
12481echo "${ECHO_T}yes" >&6
12482else
12483 echo "$as_me: failed program was:" >&5
12484cat conftest.$ac_ext >&5
12485echo "$as_me:$LINENO: result: no" >&5
12486echo "${ECHO_T}no" >&6
12487
12488fi
12489rm -f conftest.$ac_objext conftest.$ac_ext
12490
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012491echo "$as_me:$LINENO: checking for flock" >&5
12492echo $ECHO_N "checking for flock... $ECHO_C" >&6
12493cat >conftest.$ac_ext <<_ACEOF
12494#line $LINENO "configure"
12495#include "confdefs.h"
12496
12497#include "confdefs.h"
12498#include <sys/file.h>
12499
12500#ifdef F77_DUMMY_MAIN
12501# ifdef __cplusplus
12502 extern "C"
12503# endif
12504 int F77_DUMMY_MAIN() { return 1; }
12505#endif
12506int
12507main ()
12508{
12509void* p = flock
12510 ;
12511 return 0;
12512}
12513_ACEOF
12514rm -f conftest.$ac_objext
12515if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12516 (eval $ac_compile) 2>&5
12517 ac_status=$?
12518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12519 (exit $ac_status); } &&
12520 { ac_try='test -s conftest.$ac_objext'
12521 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12522 (eval $ac_try) 2>&5
12523 ac_status=$?
12524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12525 (exit $ac_status); }; }; then
12526
12527cat >>confdefs.h <<\_ACEOF
12528#define HAVE_FLOCK 1
12529_ACEOF
12530
12531 echo "$as_me:$LINENO: result: yes" >&5
12532echo "${ECHO_T}yes" >&6
12533else
12534 echo "$as_me: failed program was:" >&5
12535cat conftest.$ac_ext >&5
12536echo "$as_me:$LINENO: result: no" >&5
12537echo "${ECHO_T}no" >&6
12538
12539fi
12540rm -f conftest.$ac_objext conftest.$ac_ext
12541
12542echo "$as_me:$LINENO: checking for getpagesize" >&5
12543echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
12544cat >conftest.$ac_ext <<_ACEOF
12545#line $LINENO "configure"
12546#include "confdefs.h"
12547
12548#include "confdefs.h"
12549#include <unistd.h>
12550
12551#ifdef F77_DUMMY_MAIN
12552# ifdef __cplusplus
12553 extern "C"
12554# endif
12555 int F77_DUMMY_MAIN() { return 1; }
12556#endif
12557int
12558main ()
12559{
12560void* p = getpagesize
12561 ;
12562 return 0;
12563}
12564_ACEOF
12565rm -f conftest.$ac_objext
12566if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12567 (eval $ac_compile) 2>&5
12568 ac_status=$?
12569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12570 (exit $ac_status); } &&
12571 { ac_try='test -s conftest.$ac_objext'
12572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12573 (eval $ac_try) 2>&5
12574 ac_status=$?
12575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12576 (exit $ac_status); }; }; then
12577
12578cat >>confdefs.h <<\_ACEOF
12579#define HAVE_GETPAGESIZE 1
12580_ACEOF
12581
12582 echo "$as_me:$LINENO: result: yes" >&5
12583echo "${ECHO_T}yes" >&6
12584else
12585 echo "$as_me: failed program was:" >&5
12586cat conftest.$ac_ext >&5
12587echo "$as_me:$LINENO: result: no" >&5
12588echo "${ECHO_T}no" >&6
12589
12590fi
12591rm -f conftest.$ac_objext conftest.$ac_ext
12592
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012593echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
12594echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
12595if test "${ac_cv_lib_c_inet_aton+set}" = set; then
12596 echo $ECHO_N "(cached) $ECHO_C" >&6
12597else
12598 ac_check_lib_save_LIBS=$LIBS
12599LIBS="-lc $LIBS"
12600cat >conftest.$ac_ext <<_ACEOF
12601#line $LINENO "configure"
12602#include "confdefs.h"
12603
12604/* Override any gcc2 internal prototype to avoid an error. */
12605#ifdef __cplusplus
12606extern "C"
12607#endif
12608/* We use char because int might match the return type of a gcc2
12609 builtin and then its argument prototype would still apply. */
12610char inet_aton ();
12611#ifdef F77_DUMMY_MAIN
12612# ifdef __cplusplus
12613 extern "C"
12614# endif
12615 int F77_DUMMY_MAIN() { return 1; }
12616#endif
12617int
12618main ()
12619{
12620inet_aton ();
12621 ;
12622 return 0;
12623}
12624_ACEOF
12625rm -f conftest.$ac_objext conftest$ac_exeext
12626if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12627 (eval $ac_link) 2>&5
12628 ac_status=$?
12629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12630 (exit $ac_status); } &&
12631 { ac_try='test -s conftest$ac_exeext'
12632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12633 (eval $ac_try) 2>&5
12634 ac_status=$?
12635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12636 (exit $ac_status); }; }; then
12637 ac_cv_lib_c_inet_aton=yes
12638else
12639 echo "$as_me: failed program was:" >&5
12640cat conftest.$ac_ext >&5
12641ac_cv_lib_c_inet_aton=no
12642fi
12643rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12644LIBS=$ac_check_lib_save_LIBS
12645fi
12646echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
12647echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
12648if test $ac_cv_lib_c_inet_aton = yes; then
12649 /bin/true
12650else
12651
12652echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
12653echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
12654if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
12655 echo $ECHO_N "(cached) $ECHO_C" >&6
12656else
12657 ac_check_lib_save_LIBS=$LIBS
12658LIBS="-lresolv $LIBS"
12659cat >conftest.$ac_ext <<_ACEOF
12660#line $LINENO "configure"
12661#include "confdefs.h"
12662
12663/* Override any gcc2 internal prototype to avoid an error. */
12664#ifdef __cplusplus
12665extern "C"
12666#endif
12667/* We use char because int might match the return type of a gcc2
12668 builtin and then its argument prototype would still apply. */
12669char inet_aton ();
12670#ifdef F77_DUMMY_MAIN
12671# ifdef __cplusplus
12672 extern "C"
12673# endif
12674 int F77_DUMMY_MAIN() { return 1; }
12675#endif
12676int
12677main ()
12678{
12679inet_aton ();
12680 ;
12681 return 0;
12682}
12683_ACEOF
12684rm -f conftest.$ac_objext conftest$ac_exeext
12685if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12686 (eval $ac_link) 2>&5
12687 ac_status=$?
12688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12689 (exit $ac_status); } &&
12690 { ac_try='test -s conftest$ac_exeext'
12691 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12692 (eval $ac_try) 2>&5
12693 ac_status=$?
12694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12695 (exit $ac_status); }; }; then
12696 ac_cv_lib_resolv_inet_aton=yes
12697else
12698 echo "$as_me: failed program was:" >&5
12699cat conftest.$ac_ext >&5
12700ac_cv_lib_resolv_inet_aton=no
12701fi
12702rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12703LIBS=$ac_check_lib_save_LIBS
12704fi
12705echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
12706echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
12707if test $ac_cv_lib_resolv_inet_aton = yes; then
12708 cat >>confdefs.h <<_ACEOF
12709#define HAVE_LIBRESOLV 1
12710_ACEOF
12711
12712 LIBS="-lresolv $LIBS"
12713
12714fi
12715
12716
12717fi
12718
12719
Martin v. Löwise9416172003-05-03 10:12:45 +000012720echo "$as_me:$LINENO: checking for hstrerror" >&5
12721echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
12722cat >conftest.$ac_ext <<_ACEOF
12723#line $LINENO "configure"
12724#include "confdefs.h"
12725
12726#include "confdefs.h"
12727#include <netdb.h>
12728
12729#ifdef F77_DUMMY_MAIN
12730# ifdef __cplusplus
12731 extern "C"
12732# endif
12733 int F77_DUMMY_MAIN() { return 1; }
12734#endif
12735int
12736main ()
12737{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012738void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012739 ;
12740 return 0;
12741}
12742_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012743rm -f conftest.$ac_objext conftest$ac_exeext
12744if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12745 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000012746 ac_status=$?
12747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12748 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012749 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000012750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12751 (eval $ac_try) 2>&5
12752 ac_status=$?
12753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12754 (exit $ac_status); }; }; then
12755
12756cat >>confdefs.h <<\_ACEOF
12757#define HAVE_HSTRERROR 1
12758_ACEOF
12759
12760 echo "$as_me:$LINENO: result: yes" >&5
12761echo "${ECHO_T}yes" >&6
12762else
12763 echo "$as_me: failed program was:" >&5
12764cat conftest.$ac_ext >&5
12765echo "$as_me:$LINENO: result: no" >&5
12766echo "${ECHO_T}no" >&6
12767
12768fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012769rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012770
12771echo "$as_me:$LINENO: checking for inet_aton" >&5
12772echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
12773cat >conftest.$ac_ext <<_ACEOF
12774#line $LINENO "configure"
12775#include "confdefs.h"
12776
12777#include "confdefs.h"
12778#include <sys/socket.h>
12779#include <netinet/in.h>
12780#include <arpa/inet.h>
12781
12782#ifdef F77_DUMMY_MAIN
12783# ifdef __cplusplus
12784 extern "C"
12785# endif
12786 int F77_DUMMY_MAIN() { return 1; }
12787#endif
12788int
12789main ()
12790{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012791void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012792 ;
12793 return 0;
12794}
12795_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012796rm -f conftest.$ac_objext conftest$ac_exeext
12797if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12798 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000012799 ac_status=$?
12800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12801 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012802 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000012803 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12804 (eval $ac_try) 2>&5
12805 ac_status=$?
12806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12807 (exit $ac_status); }; }; then
12808
12809cat >>confdefs.h <<\_ACEOF
12810#define HAVE_INET_ATON 1
12811_ACEOF
12812
12813 echo "$as_me:$LINENO: result: yes" >&5
12814echo "${ECHO_T}yes" >&6
12815else
12816 echo "$as_me: failed program was:" >&5
12817cat conftest.$ac_ext >&5
12818echo "$as_me:$LINENO: result: no" >&5
12819echo "${ECHO_T}no" >&6
12820
12821fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012822rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012823
12824echo "$as_me:$LINENO: checking for inet_pton" >&5
12825echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
12826cat >conftest.$ac_ext <<_ACEOF
12827#line $LINENO "configure"
12828#include "confdefs.h"
12829
12830#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012831#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012832#include <sys/socket.h>
12833#include <netinet/in.h>
12834#include <arpa/inet.h>
12835
12836#ifdef F77_DUMMY_MAIN
12837# ifdef __cplusplus
12838 extern "C"
12839# endif
12840 int F77_DUMMY_MAIN() { return 1; }
12841#endif
12842int
12843main ()
12844{
12845void* p = inet_pton
12846 ;
12847 return 0;
12848}
12849_ACEOF
12850rm -f conftest.$ac_objext
12851if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12852 (eval $ac_compile) 2>&5
12853 ac_status=$?
12854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12855 (exit $ac_status); } &&
12856 { ac_try='test -s conftest.$ac_objext'
12857 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12858 (eval $ac_try) 2>&5
12859 ac_status=$?
12860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12861 (exit $ac_status); }; }; then
12862
12863cat >>confdefs.h <<\_ACEOF
12864#define HAVE_INET_PTON 1
12865_ACEOF
12866
12867 echo "$as_me:$LINENO: result: yes" >&5
12868echo "${ECHO_T}yes" >&6
12869else
12870 echo "$as_me: failed program was:" >&5
12871cat conftest.$ac_ext >&5
12872echo "$as_me:$LINENO: result: no" >&5
12873echo "${ECHO_T}no" >&6
12874
12875fi
12876rm -f conftest.$ac_objext conftest.$ac_ext
12877
Martin v. Löwisd5843682002-11-21 20:41:28 +000012878echo "$as_me:$LINENO: checking for setgroups" >&5
12879echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
12880cat >conftest.$ac_ext <<_ACEOF
12881#line $LINENO "configure"
12882#include "confdefs.h"
12883
12884#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012885#include <unistd.h>
Martin v. Löwisd5843682002-11-21 20:41:28 +000012886
Barry Warsawfe33b792003-01-07 22:42:49 +000012887#ifdef F77_DUMMY_MAIN
12888# ifdef __cplusplus
12889 extern "C"
12890# endif
12891 int F77_DUMMY_MAIN() { return 1; }
12892#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012893int
12894main ()
12895{
12896void* p = setgroups
12897 ;
12898 return 0;
12899}
12900_ACEOF
12901rm -f conftest.$ac_objext
12902if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12903 (eval $ac_compile) 2>&5
12904 ac_status=$?
12905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12906 (exit $ac_status); } &&
12907 { ac_try='test -s conftest.$ac_objext'
12908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12909 (eval $ac_try) 2>&5
12910 ac_status=$?
12911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12912 (exit $ac_status); }; }; then
12913
12914cat >>confdefs.h <<\_ACEOF
12915#define HAVE_SETGROUPS 1
12916_ACEOF
12917
12918 echo "$as_me:$LINENO: result: yes" >&5
12919echo "${ECHO_T}yes" >&6
12920else
12921 echo "$as_me: failed program was:" >&5
12922cat conftest.$ac_ext >&5
12923echo "$as_me:$LINENO: result: no" >&5
12924echo "${ECHO_T}no" >&6
12925
12926fi
12927rm -f conftest.$ac_objext conftest.$ac_ext
12928
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012929# check for openpty and forkpty
12930
Martin v. Löwis11437992002-04-12 09:54:03 +000012931
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012932for ac_func in openpty
12933do
Martin v. Löwis11437992002-04-12 09:54:03 +000012934as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12935echo "$as_me:$LINENO: checking for $ac_func" >&5
12936echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12937if eval "test \"\${$as_ac_var+set}\" = set"; then
12938 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012939else
Martin v. Löwis11437992002-04-12 09:54:03 +000012940 cat >conftest.$ac_ext <<_ACEOF
12941#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012942#include "confdefs.h"
12943/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012944 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012945#include <assert.h>
12946/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012947#ifdef __cplusplus
12948extern "C"
12949#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012950/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012951 builtin and then its argument prototype would still apply. */
12952char $ac_func ();
12953char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012954
Barry Warsawfe33b792003-01-07 22:42:49 +000012955#ifdef F77_DUMMY_MAIN
12956# ifdef __cplusplus
12957 extern "C"
12958# endif
12959 int F77_DUMMY_MAIN() { return 1; }
12960#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012961int
12962main ()
12963{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012964/* The GNU C library defines this for functions which it implements
12965 to always fail with ENOSYS. Some functions are actually named
12966 something starting with __ and the normal name is an alias. */
12967#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12968choke me
12969#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012970f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012971#endif
12972
Martin v. Löwis11437992002-04-12 09:54:03 +000012973 ;
12974 return 0;
12975}
12976_ACEOF
12977rm -f conftest.$ac_objext conftest$ac_exeext
12978if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12979 (eval $ac_link) 2>&5
12980 ac_status=$?
12981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12982 (exit $ac_status); } &&
12983 { ac_try='test -s conftest$ac_exeext'
12984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12985 (eval $ac_try) 2>&5
12986 ac_status=$?
12987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12988 (exit $ac_status); }; }; then
12989 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012990else
Martin v. Löwis11437992002-04-12 09:54:03 +000012991 echo "$as_me: failed program was:" >&5
12992cat conftest.$ac_ext >&5
12993eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012994fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012995rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012996fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012997echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12998echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12999if test `eval echo '${'$as_ac_var'}'` = yes; then
13000 cat >>confdefs.h <<_ACEOF
13001#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13002_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013003
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013004else
Martin v. Löwis11437992002-04-12 09:54:03 +000013005 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
13006echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
13007if test "${ac_cv_lib_util_openpty+set}" = set; then
13008 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013009else
Martin v. Löwis11437992002-04-12 09:54:03 +000013010 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013011LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013012cat >conftest.$ac_ext <<_ACEOF
13013#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013014#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013015
Fred Drake8cef4cf2000-06-28 16:40:38 +000013016/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013017#ifdef __cplusplus
13018extern "C"
13019#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013020/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013021 builtin and then its argument prototype would still apply. */
13022char openpty ();
Barry Warsawfe33b792003-01-07 22:42:49 +000013023#ifdef F77_DUMMY_MAIN
13024# ifdef __cplusplus
13025 extern "C"
13026# endif
13027 int F77_DUMMY_MAIN() { return 1; }
13028#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013029int
13030main ()
13031{
13032openpty ();
13033 ;
13034 return 0;
13035}
13036_ACEOF
13037rm -f conftest.$ac_objext conftest$ac_exeext
13038if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13039 (eval $ac_link) 2>&5
13040 ac_status=$?
13041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13042 (exit $ac_status); } &&
13043 { ac_try='test -s conftest$ac_exeext'
13044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13045 (eval $ac_try) 2>&5
13046 ac_status=$?
13047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13048 (exit $ac_status); }; }; then
13049 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013050else
Martin v. Löwis11437992002-04-12 09:54:03 +000013051 echo "$as_me: failed program was:" >&5
13052cat conftest.$ac_ext >&5
13053ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013054fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013055rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13056LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013057fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013058echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
13059echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
13060if test $ac_cv_lib_util_openpty = yes; then
13061 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013062#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013063_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013064 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013065fi
13066
13067fi
13068done
13069
Martin v. Löwis11437992002-04-12 09:54:03 +000013070
Fred Drake8cef4cf2000-06-28 16:40:38 +000013071for ac_func in forkpty
13072do
Martin v. Löwis11437992002-04-12 09:54:03 +000013073as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13074echo "$as_me:$LINENO: checking for $ac_func" >&5
13075echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13076if eval "test \"\${$as_ac_var+set}\" = set"; then
13077 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013078else
Martin v. Löwis11437992002-04-12 09:54:03 +000013079 cat >conftest.$ac_ext <<_ACEOF
13080#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013081#include "confdefs.h"
13082/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013083 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000013084#include <assert.h>
13085/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013086#ifdef __cplusplus
13087extern "C"
13088#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013089/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013090 builtin and then its argument prototype would still apply. */
13091char $ac_func ();
13092char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000013093
Barry Warsawfe33b792003-01-07 22:42:49 +000013094#ifdef F77_DUMMY_MAIN
13095# ifdef __cplusplus
13096 extern "C"
13097# endif
13098 int F77_DUMMY_MAIN() { return 1; }
13099#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013100int
13101main ()
13102{
Fred Drake8cef4cf2000-06-28 16:40:38 +000013103/* The GNU C library defines this for functions which it implements
13104 to always fail with ENOSYS. Some functions are actually named
13105 something starting with __ and the normal name is an alias. */
13106#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13107choke me
13108#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013109f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000013110#endif
13111
Martin v. Löwis11437992002-04-12 09:54:03 +000013112 ;
13113 return 0;
13114}
13115_ACEOF
13116rm -f conftest.$ac_objext conftest$ac_exeext
13117if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13118 (eval $ac_link) 2>&5
13119 ac_status=$?
13120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13121 (exit $ac_status); } &&
13122 { ac_try='test -s conftest$ac_exeext'
13123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13124 (eval $ac_try) 2>&5
13125 ac_status=$?
13126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13127 (exit $ac_status); }; }; then
13128 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013129else
Martin v. Löwis11437992002-04-12 09:54:03 +000013130 echo "$as_me: failed program was:" >&5
13131cat conftest.$ac_ext >&5
13132eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013133fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013134rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013135fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013136echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13137echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13138if test `eval echo '${'$as_ac_var'}'` = yes; then
13139 cat >>confdefs.h <<_ACEOF
13140#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13141_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013142
Fred Drake8cef4cf2000-06-28 16:40:38 +000013143else
Martin v. Löwis11437992002-04-12 09:54:03 +000013144 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
13145echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
13146if test "${ac_cv_lib_util_forkpty+set}" = set; then
13147 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013148else
Martin v. Löwis11437992002-04-12 09:54:03 +000013149 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013150LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013151cat >conftest.$ac_ext <<_ACEOF
13152#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013153#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013154
Fred Drake8cef4cf2000-06-28 16:40:38 +000013155/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013156#ifdef __cplusplus
13157extern "C"
13158#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013159/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013160 builtin and then its argument prototype would still apply. */
13161char forkpty ();
Barry Warsawfe33b792003-01-07 22:42:49 +000013162#ifdef F77_DUMMY_MAIN
13163# ifdef __cplusplus
13164 extern "C"
13165# endif
13166 int F77_DUMMY_MAIN() { return 1; }
13167#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013168int
13169main ()
13170{
13171forkpty ();
13172 ;
13173 return 0;
13174}
13175_ACEOF
13176rm -f conftest.$ac_objext conftest$ac_exeext
13177if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13178 (eval $ac_link) 2>&5
13179 ac_status=$?
13180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13181 (exit $ac_status); } &&
13182 { ac_try='test -s conftest$ac_exeext'
13183 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13184 (eval $ac_try) 2>&5
13185 ac_status=$?
13186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13187 (exit $ac_status); }; }; then
13188 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013189else
Martin v. Löwis11437992002-04-12 09:54:03 +000013190 echo "$as_me: failed program was:" >&5
13191cat conftest.$ac_ext >&5
13192ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013193fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013194rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13195LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013196fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013197echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
13198echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
13199if test $ac_cv_lib_util_forkpty = yes; then
13200 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013201#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013202_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013203 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013204fi
13205
13206fi
13207done
13208
Jack Jansendd19cf82001-12-06 22:36:17 +000013209
Michael W. Hudson54241132001-12-07 15:38:26 +000013210# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013211
13212
13213
13214
13215
13216
Fred Drake8cef4cf2000-06-28 16:40:38 +000013217for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
13218do
Martin v. Löwis11437992002-04-12 09:54:03 +000013219as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13220echo "$as_me:$LINENO: checking for $ac_func" >&5
13221echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13222if eval "test \"\${$as_ac_var+set}\" = set"; then
13223 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013224else
Martin v. Löwis11437992002-04-12 09:54:03 +000013225 cat >conftest.$ac_ext <<_ACEOF
13226#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013227#include "confdefs.h"
13228/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013229 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013230#include <assert.h>
13231/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013232#ifdef __cplusplus
13233extern "C"
13234#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013235/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013236 builtin and then its argument prototype would still apply. */
13237char $ac_func ();
13238char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013239
Barry Warsawfe33b792003-01-07 22:42:49 +000013240#ifdef F77_DUMMY_MAIN
13241# ifdef __cplusplus
13242 extern "C"
13243# endif
13244 int F77_DUMMY_MAIN() { return 1; }
13245#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013246int
13247main ()
13248{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013249/* The GNU C library defines this for functions which it implements
13250 to always fail with ENOSYS. Some functions are actually named
13251 something starting with __ and the normal name is an alias. */
13252#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13253choke me
13254#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013255f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013256#endif
13257
Martin v. Löwis11437992002-04-12 09:54:03 +000013258 ;
13259 return 0;
13260}
13261_ACEOF
13262rm -f conftest.$ac_objext conftest$ac_exeext
13263if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13264 (eval $ac_link) 2>&5
13265 ac_status=$?
13266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13267 (exit $ac_status); } &&
13268 { ac_try='test -s conftest$ac_exeext'
13269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13270 (eval $ac_try) 2>&5
13271 ac_status=$?
13272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13273 (exit $ac_status); }; }; then
13274 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013275else
Martin v. Löwis11437992002-04-12 09:54:03 +000013276 echo "$as_me: failed program was:" >&5
13277cat conftest.$ac_ext >&5
13278eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013279fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013280rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013281fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013282echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13283echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13284if test `eval echo '${'$as_ac_var'}'` = yes; then
13285 cat >>confdefs.h <<_ACEOF
13286#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13287_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000013288
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013289fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000013290done
13291
Michael W. Hudson54241132001-12-07 15:38:26 +000013292
Martin v. Löwis11437992002-04-12 09:54:03 +000013293
13294
13295
13296
13297
Martin v. Löwis1142de32002-03-29 16:28:31 +000013298for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000013299do
Martin v. Löwis11437992002-04-12 09:54:03 +000013300as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13301echo "$as_me:$LINENO: checking for $ac_func" >&5
13302echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13303if eval "test \"\${$as_ac_var+set}\" = set"; then
13304 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013305else
Martin v. Löwis11437992002-04-12 09:54:03 +000013306 cat >conftest.$ac_ext <<_ACEOF
13307#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013308#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013309/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013310 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013311#include <assert.h>
13312/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013313#ifdef __cplusplus
13314extern "C"
13315#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013316/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013317 builtin and then its argument prototype would still apply. */
13318char $ac_func ();
13319char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013320
Barry Warsawfe33b792003-01-07 22:42:49 +000013321#ifdef F77_DUMMY_MAIN
13322# ifdef __cplusplus
13323 extern "C"
13324# endif
13325 int F77_DUMMY_MAIN() { return 1; }
13326#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013327int
13328main ()
13329{
Guido van Rossum627b2d71993-12-24 10:39:16 +000013330/* The GNU C library defines this for functions which it implements
13331 to always fail with ENOSYS. Some functions are actually named
13332 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013333#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013334choke me
13335#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013336f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013337#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013338
Martin v. Löwis11437992002-04-12 09:54:03 +000013339 ;
13340 return 0;
13341}
13342_ACEOF
13343rm -f conftest.$ac_objext conftest$ac_exeext
13344if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13345 (eval $ac_link) 2>&5
13346 ac_status=$?
13347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13348 (exit $ac_status); } &&
13349 { ac_try='test -s conftest$ac_exeext'
13350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13351 (eval $ac_try) 2>&5
13352 ac_status=$?
13353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13354 (exit $ac_status); }; }; then
13355 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013356else
Martin v. Löwis11437992002-04-12 09:54:03 +000013357 echo "$as_me: failed program was:" >&5
13358cat conftest.$ac_ext >&5
13359eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013360fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013361rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000013362fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013363echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13364echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13365if test `eval echo '${'$as_ac_var'}'` = yes; then
13366 cat >>confdefs.h <<_ACEOF
13367#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13368_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000013369
Martin v. Löwis1142de32002-03-29 16:28:31 +000013370else
Martin v. Löwis11437992002-04-12 09:54:03 +000013371 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013372fi
13373done
13374
13375
Martin v. Löwis11437992002-04-12 09:54:03 +000013376
Martin v. Löwis1142de32002-03-29 16:28:31 +000013377for ac_func in getpgrp
13378do
Martin v. Löwis11437992002-04-12 09:54:03 +000013379as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13380echo "$as_me:$LINENO: checking for $ac_func" >&5
13381echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13382if eval "test \"\${$as_ac_var+set}\" = set"; then
13383 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000013384else
Martin v. Löwis11437992002-04-12 09:54:03 +000013385 cat >conftest.$ac_ext <<_ACEOF
13386#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013387#include "confdefs.h"
13388/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013389 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000013390#include <assert.h>
13391/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013392#ifdef __cplusplus
13393extern "C"
13394#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013395/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013396 builtin and then its argument prototype would still apply. */
13397char $ac_func ();
13398char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000013399
Barry Warsawfe33b792003-01-07 22:42:49 +000013400#ifdef F77_DUMMY_MAIN
13401# ifdef __cplusplus
13402 extern "C"
13403# endif
13404 int F77_DUMMY_MAIN() { return 1; }
13405#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013406int
13407main ()
13408{
Martin v. Löwis1142de32002-03-29 16:28:31 +000013409/* The GNU C library defines this for functions which it implements
13410 to always fail with ENOSYS. Some functions are actually named
13411 something starting with __ and the normal name is an alias. */
13412#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13413choke me
13414#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013415f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000013416#endif
13417
Martin v. Löwis11437992002-04-12 09:54:03 +000013418 ;
13419 return 0;
13420}
13421_ACEOF
13422rm -f conftest.$ac_objext conftest$ac_exeext
13423if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13424 (eval $ac_link) 2>&5
13425 ac_status=$?
13426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13427 (exit $ac_status); } &&
13428 { ac_try='test -s conftest$ac_exeext'
13429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13430 (eval $ac_try) 2>&5
13431 ac_status=$?
13432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13433 (exit $ac_status); }; }; then
13434 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013435else
Martin v. Löwis11437992002-04-12 09:54:03 +000013436 echo "$as_me: failed program was:" >&5
13437cat conftest.$ac_ext >&5
13438eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013439fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013440rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013441fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013442echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13443echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13444if test `eval echo '${'$as_ac_var'}'` = yes; then
13445 cat >>confdefs.h <<_ACEOF
13446#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13447_ACEOF
13448 cat >conftest.$ac_ext <<_ACEOF
13449#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013450#include "confdefs.h"
13451#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000013452#ifdef F77_DUMMY_MAIN
13453# ifdef __cplusplus
13454 extern "C"
13455# endif
13456 int F77_DUMMY_MAIN() { return 1; }
13457#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013458int
13459main ()
13460{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013461getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013462 ;
13463 return 0;
13464}
13465_ACEOF
13466rm -f conftest.$ac_objext
13467if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13468 (eval $ac_compile) 2>&5
13469 ac_status=$?
13470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13471 (exit $ac_status); } &&
13472 { ac_try='test -s conftest.$ac_objext'
13473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13474 (eval $ac_try) 2>&5
13475 ac_status=$?
13476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13477 (exit $ac_status); }; }; then
13478
13479cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013480#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013481_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013482
Martin v. Löwis11437992002-04-12 09:54:03 +000013483
Guido van Rossumf78abae1997-01-21 22:02:36 +000013484else
Martin v. Löwis11437992002-04-12 09:54:03 +000013485 echo "$as_me: failed program was:" >&5
13486cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013487fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013488rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013489
Guido van Rossum627b2d71993-12-24 10:39:16 +000013490fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013491done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013492
Jack Jansen150753c2003-03-29 22:07:47 +000013493
13494for ac_func in setpgrp
13495do
13496as_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
Martin v. Löwis11437992002-04-12 09:54:03 +000013500 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 Rossum8eee56f1994-10-20 22:18:37 +000013504#include "confdefs.h"
Jack Jansen150753c2003-03-29 22:07:47 +000013505/* System header to define __stub macros and hopefully few prototypes,
13506 which can conflict with char $ac_func (); below. */
13507#include <assert.h>
13508/* Override any gcc2 internal prototype to avoid an error. */
13509#ifdef __cplusplus
13510extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000013511#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013512/* We use char because int might match the return type of a gcc2
13513 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{
Jack Jansen150753c2003-03-29 22:07:47 +000013526/* The GNU C library defines this for functions which it implements
13527 to always fail with ENOSYS. Some functions are actually named
13528 something starting with __ and the normal name is an alias. */
13529#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13530choke me
13531#else
13532f = $ac_func;
13533#endif
13534
Martin v. Löwis11437992002-04-12 09:54:03 +000013535 ;
13536 return 0;
13537}
13538_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013539rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000013540if { (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
Jack Jansen150753c2003-03-29 22:07:47 +000013544 (exit $ac_status); } &&
13545 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013546 { (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
Jack Jansen150753c2003-03-29 22:07:47 +000013551 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013552else
Jack Jansen150753c2003-03-29 22:07:47 +000013553 echo "$as_me: failed program was:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013554cat conftest.$ac_ext >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013555eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013556fi
Jack Jansen150753c2003-03-29 22:07:47 +000013557rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013558fi
Jack Jansen150753c2003-03-29 22:07:47 +000013559echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13560echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13561if test `eval echo '${'$as_ac_var'}'` = yes; then
13562 cat >>confdefs.h <<_ACEOF
13563#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13564_ACEOF
13565 cat >conftest.$ac_ext <<_ACEOF
13566#line $LINENO "configure"
13567#include "confdefs.h"
13568#include <unistd.h>
13569#ifdef F77_DUMMY_MAIN
13570# ifdef __cplusplus
13571 extern "C"
13572# endif
13573 int F77_DUMMY_MAIN() { return 1; }
13574#endif
13575int
13576main ()
13577{
13578setpgrp(0,0);
13579 ;
13580 return 0;
13581}
13582_ACEOF
13583rm -f conftest.$ac_objext
13584if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13585 (eval $ac_compile) 2>&5
13586 ac_status=$?
13587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13588 (exit $ac_status); } &&
13589 { ac_try='test -s conftest.$ac_objext'
13590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13591 (eval $ac_try) 2>&5
13592 ac_status=$?
13593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13594 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013595
13596cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013597#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013598_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013599
Jack Jansen150753c2003-03-29 22:07:47 +000013600
13601else
13602 echo "$as_me: failed program was:" >&5
13603cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013604fi
Jack Jansen150753c2003-03-29 22:07:47 +000013605rm -f conftest.$ac_objext conftest.$ac_ext
13606
13607fi
13608done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013609
Martin v. Löwis11437992002-04-12 09:54:03 +000013610
Thomas Wouters3a584202000-08-05 23:28:51 +000013611for ac_func in gettimeofday
13612do
Martin v. Löwis11437992002-04-12 09:54:03 +000013613as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13614echo "$as_me:$LINENO: checking for $ac_func" >&5
13615echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13616if eval "test \"\${$as_ac_var+set}\" = set"; then
13617 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013618else
Martin v. Löwis11437992002-04-12 09:54:03 +000013619 cat >conftest.$ac_ext <<_ACEOF
13620#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013621#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013622/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013623 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013624#include <assert.h>
13625/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013626#ifdef __cplusplus
13627extern "C"
13628#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013629/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013630 builtin and then its argument prototype would still apply. */
13631char $ac_func ();
13632char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013633
Barry Warsawfe33b792003-01-07 22:42:49 +000013634#ifdef F77_DUMMY_MAIN
13635# ifdef __cplusplus
13636 extern "C"
13637# endif
13638 int F77_DUMMY_MAIN() { return 1; }
13639#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013640int
13641main ()
13642{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013643/* The GNU C library defines this for functions which it implements
13644 to always fail with ENOSYS. Some functions are actually named
13645 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013646#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013647choke me
13648#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013649f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013650#endif
13651
Martin v. Löwis11437992002-04-12 09:54:03 +000013652 ;
13653 return 0;
13654}
13655_ACEOF
13656rm -f conftest.$ac_objext conftest$ac_exeext
13657if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13658 (eval $ac_link) 2>&5
13659 ac_status=$?
13660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13661 (exit $ac_status); } &&
13662 { ac_try='test -s conftest$ac_exeext'
13663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13664 (eval $ac_try) 2>&5
13665 ac_status=$?
13666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13667 (exit $ac_status); }; }; then
13668 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013669else
Martin v. Löwis11437992002-04-12 09:54:03 +000013670 echo "$as_me: failed program was:" >&5
13671cat conftest.$ac_ext >&5
13672eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013673fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013674rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013675fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013676echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13677echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13678if test `eval echo '${'$as_ac_var'}'` = yes; then
13679 cat >>confdefs.h <<_ACEOF
13680#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13681_ACEOF
13682 cat >conftest.$ac_ext <<_ACEOF
13683#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013684#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013685#include <sys/time.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000013686#ifdef F77_DUMMY_MAIN
13687# ifdef __cplusplus
13688 extern "C"
13689# endif
13690 int F77_DUMMY_MAIN() { return 1; }
13691#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013692int
13693main ()
13694{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013695gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013696 ;
13697 return 0;
13698}
13699_ACEOF
13700rm -f conftest.$ac_objext
13701if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13702 (eval $ac_compile) 2>&5
13703 ac_status=$?
13704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13705 (exit $ac_status); } &&
13706 { ac_try='test -s conftest.$ac_objext'
13707 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13708 (eval $ac_try) 2>&5
13709 ac_status=$?
13710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13711 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013712 :
13713else
Martin v. Löwis11437992002-04-12 09:54:03 +000013714 echo "$as_me: failed program was:" >&5
13715cat conftest.$ac_ext >&5
13716
13717cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013718#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013719_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013720
Martin v. Löwis11437992002-04-12 09:54:03 +000013721
Guido van Rossum627b2d71993-12-24 10:39:16 +000013722fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013723rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013724
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013725fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013726done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013727
Michael W. Hudson54241132001-12-07 15:38:26 +000013728
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013729echo "$as_me:$LINENO: checking for major" >&5
13730echo $ECHO_N "checking for major... $ECHO_C" >&6
13731cat >conftest.$ac_ext <<_ACEOF
13732#line $LINENO "configure"
13733#include "confdefs.h"
13734
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013735#if defined(MAJOR_IN_MKDEV)
13736#include <sys/mkdev.h>
13737#elif defined(MAJOR_IN_SYSMACROS)
13738#include <sys/sysmacros.h>
13739#else
13740#include <sys/types.h>
13741#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013742
Barry Warsawfe33b792003-01-07 22:42:49 +000013743#ifdef F77_DUMMY_MAIN
13744# ifdef __cplusplus
13745 extern "C"
13746# endif
13747 int F77_DUMMY_MAIN() { return 1; }
13748#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013749int
13750main ()
13751{
13752
13753 makedev(major(0),minor(0));
13754
13755 ;
13756 return 0;
13757}
13758_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000013759rm -f conftest.$ac_objext conftest$ac_exeext
13760if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13761 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013762 ac_status=$?
13763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13764 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000013765 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013766 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13767 (eval $ac_try) 2>&5
13768 ac_status=$?
13769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13770 (exit $ac_status); }; }; then
13771
13772
13773cat >>confdefs.h <<\_ACEOF
13774#define HAVE_DEVICE_MACROS 1
13775_ACEOF
13776
13777 echo "$as_me:$LINENO: result: yes" >&5
13778echo "${ECHO_T}yes" >&6
13779
13780else
13781 echo "$as_me: failed program was:" >&5
13782cat conftest.$ac_ext >&5
13783
13784 echo "$as_me:$LINENO: result: no" >&5
13785echo "${ECHO_T}no" >&6
13786
13787fi
Martin v. Löwise3271202002-11-07 07:42:30 +000013788rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013789
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013790# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013791# for [no]getaddrinfo in netdb.h.
13792echo "$as_me:$LINENO: checking for getaddrinfo" >&5
13793echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
13794cat >conftest.$ac_ext <<_ACEOF
13795#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013796#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013797
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013798#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013799#include <sys/socket.h>
13800#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013801#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013802
Barry Warsawfe33b792003-01-07 22:42:49 +000013803#ifdef F77_DUMMY_MAIN
13804# ifdef __cplusplus
13805 extern "C"
13806# endif
13807 int F77_DUMMY_MAIN() { return 1; }
13808#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013809int
13810main ()
13811{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013812
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013813getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013814
Martin v. Löwis11437992002-04-12 09:54:03 +000013815 ;
13816 return 0;
13817}
13818_ACEOF
13819rm -f conftest.$ac_objext conftest$ac_exeext
13820if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13821 (eval $ac_link) 2>&5
13822 ac_status=$?
13823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13824 (exit $ac_status); } &&
13825 { ac_try='test -s conftest$ac_exeext'
13826 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13827 (eval $ac_try) 2>&5
13828 ac_status=$?
13829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13830 (exit $ac_status); }; }; then
13831
13832echo "$as_me:$LINENO: result: yes" >&5
13833echo "${ECHO_T}yes" >&6
13834echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
13835echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013836if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013837 echo "$as_me:$LINENO: result: buggy" >&5
13838echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013839buggygetaddrinfo=yes
13840else
Martin v. Löwis11437992002-04-12 09:54:03 +000013841 cat >conftest.$ac_ext <<_ACEOF
13842#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013843#include "confdefs.h"
13844
13845#include <sys/types.h>
13846#include <netdb.h>
13847#include <string.h>
13848#include <sys/socket.h>
13849#include <netinet/in.h>
13850
13851main()
13852{
13853 int passive, gaierr, inet4 = 0, inet6 = 0;
13854 struct addrinfo hints, *ai, *aitop;
13855 char straddr[INET6_ADDRSTRLEN], strport[16];
13856
13857 for (passive = 0; passive <= 1; passive++) {
13858 memset(&hints, 0, sizeof(hints));
13859 hints.ai_family = AF_UNSPEC;
13860 hints.ai_flags = passive ? AI_PASSIVE : 0;
13861 hints.ai_socktype = SOCK_STREAM;
13862 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13863 (void)gai_strerror(gaierr);
13864 goto bad;
13865 }
13866 for (ai = aitop; ai; ai = ai->ai_next) {
13867 if (ai->ai_addr == NULL ||
13868 ai->ai_addrlen == 0 ||
13869 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13870 straddr, sizeof(straddr), strport, sizeof(strport),
13871 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13872 goto bad;
13873 }
13874 switch (ai->ai_family) {
13875 case AF_INET:
13876 if (strcmp(strport, "54321") != 0) {
13877 goto bad;
13878 }
13879 if (passive) {
13880 if (strcmp(straddr, "0.0.0.0") != 0) {
13881 goto bad;
13882 }
13883 } else {
13884 if (strcmp(straddr, "127.0.0.1") != 0) {
13885 goto bad;
13886 }
13887 }
13888 inet4++;
13889 break;
13890 case AF_INET6:
13891 if (strcmp(strport, "54321") != 0) {
13892 goto bad;
13893 }
13894 if (passive) {
13895 if (strcmp(straddr, "::") != 0) {
13896 goto bad;
13897 }
13898 } else {
13899 if (strcmp(straddr, "::1") != 0) {
13900 goto bad;
13901 }
13902 }
13903 inet6++;
13904 break;
13905 case AF_UNSPEC:
13906 goto bad;
13907 break;
13908 default:
13909 /* another family support? */
13910 break;
13911 }
13912 }
13913 }
13914
13915 if (!(inet4 == 0 || inet4 == 2))
13916 goto bad;
13917 if (!(inet6 == 0 || inet6 == 2))
13918 goto bad;
13919
13920 if (aitop)
13921 freeaddrinfo(aitop);
13922 exit(0);
13923
13924 bad:
13925 if (aitop)
13926 freeaddrinfo(aitop);
13927 exit(1);
13928}
13929
Martin v. Löwis11437992002-04-12 09:54:03 +000013930_ACEOF
13931rm -f conftest$ac_exeext
13932if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13933 (eval $ac_link) 2>&5
13934 ac_status=$?
13935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13936 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13937 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13938 (eval $ac_try) 2>&5
13939 ac_status=$?
13940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13941 (exit $ac_status); }; }; then
13942 echo "$as_me:$LINENO: result: good" >&5
13943echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013944buggygetaddrinfo=no
13945else
Martin v. Löwis11437992002-04-12 09:54:03 +000013946 echo "$as_me: program exited with status $ac_status" >&5
13947echo "$as_me: failed program was:" >&5
13948cat conftest.$ac_ext >&5
13949( exit $ac_status )
13950echo "$as_me:$LINENO: result: buggy" >&5
13951echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013952buggygetaddrinfo=yes
13953fi
Barry Warsawfe33b792003-01-07 22:42:49 +000013954rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013955fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013956else
Martin v. Löwis11437992002-04-12 09:54:03 +000013957 echo "$as_me: failed program was:" >&5
13958cat conftest.$ac_ext >&5
13959
13960echo "$as_me:$LINENO: result: no" >&5
13961echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013962buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013963
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013964fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013965rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013966
13967if test "$buggygetaddrinfo" = "yes"; then
13968 if test "$ipv6" = "yes"; then
13969 echo 'Fatal: You must get working getaddrinfo() function.'
13970 echo ' or you can specify "--disable-ipv6"'.
13971 exit 1
13972 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013973else
Martin v. Löwis11437992002-04-12 09:54:03 +000013974
13975cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013976#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013977_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013978
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013979fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013980
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013981for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013982do
Martin v. Löwis11437992002-04-12 09:54:03 +000013983as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13984echo "$as_me:$LINENO: checking for $ac_func" >&5
13985echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13986if eval "test \"\${$as_ac_var+set}\" = set"; then
13987 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013988else
Martin v. Löwis11437992002-04-12 09:54:03 +000013989 cat >conftest.$ac_ext <<_ACEOF
13990#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013991#include "confdefs.h"
13992/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013993 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013994#include <assert.h>
13995/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013996#ifdef __cplusplus
13997extern "C"
13998#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013999/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014000 builtin and then its argument prototype would still apply. */
14001char $ac_func ();
14002char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014003
Barry Warsawfe33b792003-01-07 22:42:49 +000014004#ifdef F77_DUMMY_MAIN
14005# ifdef __cplusplus
14006 extern "C"
14007# endif
14008 int F77_DUMMY_MAIN() { return 1; }
14009#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014010int
14011main ()
14012{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014013/* The GNU C library defines this for functions which it implements
14014 to always fail with ENOSYS. Some functions are actually named
14015 something starting with __ and the normal name is an alias. */
14016#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14017choke me
14018#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014019f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014020#endif
14021
Martin v. Löwis11437992002-04-12 09:54:03 +000014022 ;
14023 return 0;
14024}
14025_ACEOF
14026rm -f conftest.$ac_objext conftest$ac_exeext
14027if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14028 (eval $ac_link) 2>&5
14029 ac_status=$?
14030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14031 (exit $ac_status); } &&
14032 { ac_try='test -s conftest$ac_exeext'
14033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14034 (eval $ac_try) 2>&5
14035 ac_status=$?
14036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14037 (exit $ac_status); }; }; then
14038 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014039else
Martin v. Löwis11437992002-04-12 09:54:03 +000014040 echo "$as_me: failed program was:" >&5
14041cat conftest.$ac_ext >&5
14042eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014043fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014044rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014045fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014046echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14047echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14048if test `eval echo '${'$as_ac_var'}'` = yes; then
14049 cat >>confdefs.h <<_ACEOF
14050#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14051_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014052
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014053fi
14054done
14055
Michael W. Hudson54241132001-12-07 15:38:26 +000014056
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014057# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000014058echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
14059echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14060if test "${ac_cv_header_time+set}" = set; then
14061 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014062else
Martin v. Löwis11437992002-04-12 09:54:03 +000014063 cat >conftest.$ac_ext <<_ACEOF
14064#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014065#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014066#include <sys/types.h>
14067#include <sys/time.h>
14068#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014069
Barry Warsawfe33b792003-01-07 22:42:49 +000014070#ifdef F77_DUMMY_MAIN
14071# ifdef __cplusplus
14072 extern "C"
14073# endif
14074 int F77_DUMMY_MAIN() { return 1; }
14075#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014076int
14077main ()
14078{
14079if ((struct tm *) 0)
14080return 0;
14081 ;
14082 return 0;
14083}
14084_ACEOF
14085rm -f conftest.$ac_objext
14086if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14087 (eval $ac_compile) 2>&5
14088 ac_status=$?
14089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14090 (exit $ac_status); } &&
14091 { ac_try='test -s conftest.$ac_objext'
14092 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14093 (eval $ac_try) 2>&5
14094 ac_status=$?
14095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14096 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014097 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014098else
Martin v. Löwis11437992002-04-12 09:54:03 +000014099 echo "$as_me: failed program was:" >&5
14100cat conftest.$ac_ext >&5
14101ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014102fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014103rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014104fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014105echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
14106echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014107if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014108
14109cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014110#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014111_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014112
14113fi
14114
Martin v. Löwis11437992002-04-12 09:54:03 +000014115echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
14116echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
14117if test "${ac_cv_struct_tm+set}" = set; then
14118 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014119else
Martin v. Löwis11437992002-04-12 09:54:03 +000014120 cat >conftest.$ac_ext <<_ACEOF
14121#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014122#include "confdefs.h"
14123#include <sys/types.h>
14124#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014125
Barry Warsawfe33b792003-01-07 22:42:49 +000014126#ifdef F77_DUMMY_MAIN
14127# ifdef __cplusplus
14128 extern "C"
14129# endif
14130 int F77_DUMMY_MAIN() { return 1; }
14131#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014132int
14133main ()
14134{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014135struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000014136 ;
14137 return 0;
14138}
14139_ACEOF
14140rm -f conftest.$ac_objext
14141if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14142 (eval $ac_compile) 2>&5
14143 ac_status=$?
14144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14145 (exit $ac_status); } &&
14146 { ac_try='test -s conftest.$ac_objext'
14147 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14148 (eval $ac_try) 2>&5
14149 ac_status=$?
14150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14151 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014152 ac_cv_struct_tm=time.h
14153else
Martin v. Löwis11437992002-04-12 09:54:03 +000014154 echo "$as_me: failed program was:" >&5
14155cat conftest.$ac_ext >&5
14156ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014157fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014158rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014159fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014160echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
14161echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014162if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014163
14164cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014165#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014166_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014167
14168fi
14169
Martin v. Löwis11437992002-04-12 09:54:03 +000014170echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
14171echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
14172if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
14173 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014174else
Martin v. Löwis11437992002-04-12 09:54:03 +000014175 cat >conftest.$ac_ext <<_ACEOF
14176#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014177#include "confdefs.h"
14178#include <sys/types.h>
14179#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000014180
14181
Barry Warsawfe33b792003-01-07 22:42:49 +000014182#ifdef F77_DUMMY_MAIN
14183# ifdef __cplusplus
14184 extern "C"
14185# endif
14186 int F77_DUMMY_MAIN() { return 1; }
14187#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014188int
14189main ()
14190{
14191static struct tm ac_aggr;
14192if (ac_aggr.tm_zone)
14193return 0;
14194 ;
14195 return 0;
14196}
14197_ACEOF
14198rm -f conftest.$ac_objext
14199if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14200 (eval $ac_compile) 2>&5
14201 ac_status=$?
14202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14203 (exit $ac_status); } &&
14204 { ac_try='test -s conftest.$ac_objext'
14205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14206 (eval $ac_try) 2>&5
14207 ac_status=$?
14208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14209 (exit $ac_status); }; }; then
14210 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014211else
Martin v. Löwis11437992002-04-12 09:54:03 +000014212 echo "$as_me: failed program was:" >&5
14213cat conftest.$ac_ext >&5
14214ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014215fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014216rm -f conftest.$ac_objext conftest.$ac_ext
14217fi
14218echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
14219echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
14220if test $ac_cv_member_struct_tm_tm_zone = yes; then
14221
14222cat >>confdefs.h <<_ACEOF
14223#define HAVE_STRUCT_TM_TM_ZONE 1
14224_ACEOF
14225
14226
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014227fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014228
Martin v. Löwis11437992002-04-12 09:54:03 +000014229if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14230
14231cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014232#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014233_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014234
14235else
Martin v. Löwis11437992002-04-12 09:54:03 +000014236 echo "$as_me:$LINENO: checking for tzname" >&5
14237echo $ECHO_N "checking for tzname... $ECHO_C" >&6
14238if test "${ac_cv_var_tzname+set}" = set; then
14239 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014240else
Martin v. Löwis11437992002-04-12 09:54:03 +000014241 cat >conftest.$ac_ext <<_ACEOF
14242#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014243#include "confdefs.h"
14244#include <time.h>
14245#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014246extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014247#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014248
Barry Warsawfe33b792003-01-07 22:42:49 +000014249#ifdef F77_DUMMY_MAIN
14250# ifdef __cplusplus
14251 extern "C"
14252# endif
14253 int F77_DUMMY_MAIN() { return 1; }
14254#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014255int
14256main ()
14257{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014258atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000014259 ;
14260 return 0;
14261}
14262_ACEOF
14263rm -f conftest.$ac_objext conftest$ac_exeext
14264if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14265 (eval $ac_link) 2>&5
14266 ac_status=$?
14267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14268 (exit $ac_status); } &&
14269 { ac_try='test -s conftest$ac_exeext'
14270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14271 (eval $ac_try) 2>&5
14272 ac_status=$?
14273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14274 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014275 ac_cv_var_tzname=yes
14276else
Martin v. Löwis11437992002-04-12 09:54:03 +000014277 echo "$as_me: failed program was:" >&5
14278cat conftest.$ac_ext >&5
14279ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014280fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014281rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000014282fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014283echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
14284echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014285 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014286
14287cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014288#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014289_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014290
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014291 fi
14292fi
14293
Martin v. Löwis11437992002-04-12 09:54:03 +000014294echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
14295echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
14296if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
14297 echo $ECHO_N "(cached) $ECHO_C" >&6
14298else
14299 cat >conftest.$ac_ext <<_ACEOF
14300#line $LINENO "configure"
14301#include "confdefs.h"
14302$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014303#ifdef F77_DUMMY_MAIN
14304# ifdef __cplusplus
14305 extern "C"
14306# endif
14307 int F77_DUMMY_MAIN() { return 1; }
14308#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014309int
14310main ()
14311{
14312static struct stat ac_aggr;
14313if (ac_aggr.st_rdev)
14314return 0;
14315 ;
14316 return 0;
14317}
14318_ACEOF
14319rm -f conftest.$ac_objext
14320if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14321 (eval $ac_compile) 2>&5
14322 ac_status=$?
14323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14324 (exit $ac_status); } &&
14325 { ac_try='test -s conftest.$ac_objext'
14326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14327 (eval $ac_try) 2>&5
14328 ac_status=$?
14329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14330 (exit $ac_status); }; }; then
14331 ac_cv_member_struct_stat_st_rdev=yes
14332else
14333 echo "$as_me: failed program was:" >&5
14334cat conftest.$ac_ext >&5
14335ac_cv_member_struct_stat_st_rdev=no
14336fi
14337rm -f conftest.$ac_objext conftest.$ac_ext
14338fi
14339echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
14340echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
14341if test $ac_cv_member_struct_stat_st_rdev = yes; then
14342
14343cat >>confdefs.h <<_ACEOF
14344#define HAVE_STRUCT_STAT_ST_RDEV 1
14345_ACEOF
14346
14347
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014348fi
14349
Martin v. Löwis11437992002-04-12 09:54:03 +000014350echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
14351echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
14352if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
14353 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014354else
Martin v. Löwis11437992002-04-12 09:54:03 +000014355 cat >conftest.$ac_ext <<_ACEOF
14356#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014357#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014358$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014359#ifdef F77_DUMMY_MAIN
14360# ifdef __cplusplus
14361 extern "C"
14362# endif
14363 int F77_DUMMY_MAIN() { return 1; }
14364#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014365int
14366main ()
14367{
14368static struct stat ac_aggr;
14369if (ac_aggr.st_blksize)
14370return 0;
14371 ;
14372 return 0;
14373}
14374_ACEOF
14375rm -f conftest.$ac_objext
14376if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14377 (eval $ac_compile) 2>&5
14378 ac_status=$?
14379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14380 (exit $ac_status); } &&
14381 { ac_try='test -s conftest.$ac_objext'
14382 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14383 (eval $ac_try) 2>&5
14384 ac_status=$?
14385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14386 (exit $ac_status); }; }; then
14387 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014388else
Martin v. Löwis11437992002-04-12 09:54:03 +000014389 echo "$as_me: failed program was:" >&5
14390cat conftest.$ac_ext >&5
14391ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014392fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014393rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014394fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014395echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
14396echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
14397if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014398
Martin v. Löwis11437992002-04-12 09:54:03 +000014399cat >>confdefs.h <<_ACEOF
14400#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
14401_ACEOF
14402
14403
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014404fi
14405
Martin v. Löwis11437992002-04-12 09:54:03 +000014406echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
14407echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
14408if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
14409 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014410else
Martin v. Löwis11437992002-04-12 09:54:03 +000014411 cat >conftest.$ac_ext <<_ACEOF
14412#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014413#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014414$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014415#ifdef F77_DUMMY_MAIN
14416# ifdef __cplusplus
14417 extern "C"
14418# endif
14419 int F77_DUMMY_MAIN() { return 1; }
14420#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014421int
14422main ()
14423{
14424static struct stat ac_aggr;
14425if (ac_aggr.st_blocks)
14426return 0;
14427 ;
14428 return 0;
14429}
14430_ACEOF
14431rm -f conftest.$ac_objext
14432if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14433 (eval $ac_compile) 2>&5
14434 ac_status=$?
14435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14436 (exit $ac_status); } &&
14437 { ac_try='test -s conftest.$ac_objext'
14438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14439 (eval $ac_try) 2>&5
14440 ac_status=$?
14441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14442 (exit $ac_status); }; }; then
14443 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014444else
Martin v. Löwis11437992002-04-12 09:54:03 +000014445 echo "$as_me: failed program was:" >&5
14446cat conftest.$ac_ext >&5
14447ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014448fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014449rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014450fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014451echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
14452echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
14453if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014454
Martin v. Löwis11437992002-04-12 09:54:03 +000014455cat >>confdefs.h <<_ACEOF
14456#define HAVE_STRUCT_STAT_ST_BLOCKS 1
14457_ACEOF
14458
14459
14460cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014461#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014462_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014463
14464else
Martin v. Löwis11437992002-04-12 09:54:03 +000014465 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014466fi
14467
Michael W. Hudson54241132001-12-07 15:38:26 +000014468
Martin v. Löwis11437992002-04-12 09:54:03 +000014469
14470echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
14471echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
14472if test "${ac_cv_header_time_altzone+set}" = set; then
14473 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014474else
Martin v. Löwis11437992002-04-12 09:54:03 +000014475 cat >conftest.$ac_ext <<_ACEOF
14476#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014477#include "confdefs.h"
14478#include <time.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014479#ifdef F77_DUMMY_MAIN
14480# ifdef __cplusplus
14481 extern "C"
14482# endif
14483 int F77_DUMMY_MAIN() { return 1; }
14484#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014485int
14486main ()
14487{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014488return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000014489 ;
14490 return 0;
14491}
14492_ACEOF
14493rm -f conftest.$ac_objext
14494if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14495 (eval $ac_compile) 2>&5
14496 ac_status=$?
14497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14498 (exit $ac_status); } &&
14499 { ac_try='test -s conftest.$ac_objext'
14500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14501 (eval $ac_try) 2>&5
14502 ac_status=$?
14503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14504 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014505 ac_cv_header_time_altzone=yes
14506else
Martin v. Löwis11437992002-04-12 09:54:03 +000014507 echo "$as_me: failed program was:" >&5
14508cat conftest.$ac_ext >&5
14509ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000014510fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014511rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014512fi
14513
Martin v. Löwis11437992002-04-12 09:54:03 +000014514echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
14515echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014516if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014517
14518cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014519#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014520_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014521
14522fi
14523
Guido van Rossumda88dad1995-01-26 00:46:29 +000014524was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014525echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
14526echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
14527cat >conftest.$ac_ext <<_ACEOF
14528#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014529#include "confdefs.h"
14530
14531#include <sys/types.h>
14532#include <sys/select.h>
14533#include <sys/time.h>
14534
Barry Warsawfe33b792003-01-07 22:42:49 +000014535#ifdef F77_DUMMY_MAIN
14536# ifdef __cplusplus
14537 extern "C"
14538# endif
14539 int F77_DUMMY_MAIN() { return 1; }
14540#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014541int
14542main ()
14543{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014544;
Martin v. Löwis11437992002-04-12 09:54:03 +000014545 ;
14546 return 0;
14547}
14548_ACEOF
14549rm -f conftest.$ac_objext
14550if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14551 (eval $ac_compile) 2>&5
14552 ac_status=$?
14553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14554 (exit $ac_status); } &&
14555 { ac_try='test -s conftest.$ac_objext'
14556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14557 (eval $ac_try) 2>&5
14558 ac_status=$?
14559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14560 (exit $ac_status); }; }; then
14561
14562
14563cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014564#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014565_ACEOF
14566
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014567 was_it_defined=yes
14568
Guido van Rossumf78abae1997-01-21 22:02:36 +000014569else
Martin v. Löwis11437992002-04-12 09:54:03 +000014570 echo "$as_me: failed program was:" >&5
14571cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014572fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014573rm -f conftest.$ac_objext conftest.$ac_ext
14574echo "$as_me:$LINENO: result: $was_it_defined" >&5
14575echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000014576
Martin v. Löwis11437992002-04-12 09:54:03 +000014577echo "$as_me:$LINENO: checking for addrinfo" >&5
14578echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
14579if test "${ac_cv_struct_addrinfo+set}" = set; then
14580 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014581else
Martin v. Löwis11437992002-04-12 09:54:03 +000014582 cat >conftest.$ac_ext <<_ACEOF
14583#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014584#include "confdefs.h"
14585
14586# include <netdb.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014587#ifdef F77_DUMMY_MAIN
14588# ifdef __cplusplus
14589 extern "C"
14590# endif
14591 int F77_DUMMY_MAIN() { return 1; }
14592#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014593int
14594main ()
14595{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014596struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000014597 ;
14598 return 0;
14599}
14600_ACEOF
14601rm -f conftest.$ac_objext
14602if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14603 (eval $ac_compile) 2>&5
14604 ac_status=$?
14605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14606 (exit $ac_status); } &&
14607 { ac_try='test -s conftest.$ac_objext'
14608 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14609 (eval $ac_try) 2>&5
14610 ac_status=$?
14611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14612 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014613 ac_cv_struct_addrinfo=yes
14614else
Martin v. Löwis11437992002-04-12 09:54:03 +000014615 echo "$as_me: failed program was:" >&5
14616cat conftest.$ac_ext >&5
14617ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014618fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014619rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014620fi
14621
Martin v. Löwis11437992002-04-12 09:54:03 +000014622echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
14623echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014624if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014625
14626cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014627#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014628_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014629
14630fi
14631
Martin v. Löwis11437992002-04-12 09:54:03 +000014632echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
14633echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
14634if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
14635 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014636else
Martin v. Löwis11437992002-04-12 09:54:03 +000014637 cat >conftest.$ac_ext <<_ACEOF
14638#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014639#include "confdefs.h"
14640
14641# include <sys/types.h>
14642# include <sys/socket.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014643#ifdef F77_DUMMY_MAIN
14644# ifdef __cplusplus
14645 extern "C"
14646# endif
14647 int F77_DUMMY_MAIN() { return 1; }
14648#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014649int
14650main ()
14651{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014652struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000014653 ;
14654 return 0;
14655}
14656_ACEOF
14657rm -f conftest.$ac_objext
14658if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14659 (eval $ac_compile) 2>&5
14660 ac_status=$?
14661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14662 (exit $ac_status); } &&
14663 { ac_try='test -s conftest.$ac_objext'
14664 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14665 (eval $ac_try) 2>&5
14666 ac_status=$?
14667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14668 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014669 ac_cv_struct_sockaddr_storage=yes
14670else
Martin v. Löwis11437992002-04-12 09:54:03 +000014671 echo "$as_me: failed program was:" >&5
14672cat conftest.$ac_ext >&5
14673ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014674fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014675rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014676fi
14677
Martin v. Löwis11437992002-04-12 09:54:03 +000014678echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
14679echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014680if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014681
14682cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014683#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014684_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014685
14686fi
14687
Guido van Rossum627b2d71993-12-24 10:39:16 +000014688# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000014689
Michael W. Hudson54241132001-12-07 15:38:26 +000014690
Martin v. Löwis11437992002-04-12 09:54:03 +000014691echo "$as_me:$LINENO: checking whether char is unsigned" >&5
14692echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
14693if test "${ac_cv_c_char_unsigned+set}" = set; then
14694 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000014695else
Martin v. Löwis11437992002-04-12 09:54:03 +000014696 cat >conftest.$ac_ext <<_ACEOF
14697#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000014698#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014699$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014700#ifdef F77_DUMMY_MAIN
14701# ifdef __cplusplus
14702 extern "C"
14703# endif
14704 int F77_DUMMY_MAIN() { return 1; }
14705#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014706int
14707main ()
14708{
14709static int test_array [1 - 2 * !(((char) -1) < 0)];
14710test_array [0] = 0
14711
14712 ;
14713 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000014714}
Martin v. Löwis11437992002-04-12 09:54:03 +000014715_ACEOF
14716rm -f conftest.$ac_objext
14717if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14718 (eval $ac_compile) 2>&5
14719 ac_status=$?
14720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14721 (exit $ac_status); } &&
14722 { ac_try='test -s conftest.$ac_objext'
14723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14724 (eval $ac_try) 2>&5
14725 ac_status=$?
14726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14727 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000014728 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014729else
14730 echo "$as_me: failed program was:" >&5
14731cat conftest.$ac_ext >&5
14732ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014733fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014734rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014735fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014736echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
14737echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014738if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014739 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014740#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014741_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014742
14743fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000014744
Barry Warsawfe33b792003-01-07 22:42:49 +000014745echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
14746echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
14747if test "${ac_cv_prog_cc_stdc+set}" = set; then
14748 echo $ECHO_N "(cached) $ECHO_C" >&6
14749else
14750 ac_cv_prog_cc_stdc=no
14751ac_save_CC=$CC
14752cat >conftest.$ac_ext <<_ACEOF
14753#line $LINENO "configure"
14754#include "confdefs.h"
14755#include <stdarg.h>
14756#include <stdio.h>
14757#include <sys/types.h>
14758#include <sys/stat.h>
14759/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
14760struct buf { int x; };
14761FILE * (*rcsopen) (struct buf *, struct stat *, int);
14762static char *e (p, i)
14763 char **p;
14764 int i;
14765{
14766 return p[i];
14767}
14768static char *f (char * (*g) (char **, int), char **p, ...)
14769{
14770 char *s;
14771 va_list v;
14772 va_start (v,p);
14773 s = g (p, va_arg (v,int));
14774 va_end (v);
14775 return s;
14776}
14777int test (int i, double x);
14778struct s1 {int (*f) (int a);};
14779struct s2 {int (*f) (double a);};
14780int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
14781int argc;
14782char **argv;
14783#ifdef F77_DUMMY_MAIN
14784# ifdef __cplusplus
14785 extern "C"
14786# endif
14787 int F77_DUMMY_MAIN() { return 1; }
14788#endif
14789int
14790main ()
14791{
14792return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
14793 ;
14794 return 0;
14795}
14796_ACEOF
14797# Don't try gcc -ansi; that turns off useful extensions and
14798# breaks some systems' header files.
14799# AIX -qlanglvl=ansi
14800# Ultrix and OSF/1 -std1
14801# HP-UX 10.20 and later -Ae
14802# HP-UX older versions -Aa -D_HPUX_SOURCE
14803# SVR4 -Xc -D__EXTENSIONS__
14804for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
14805do
14806 CC="$ac_save_CC $ac_arg"
14807 rm -f conftest.$ac_objext
14808if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14809 (eval $ac_compile) 2>&5
14810 ac_status=$?
14811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14812 (exit $ac_status); } &&
14813 { ac_try='test -s conftest.$ac_objext'
14814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14815 (eval $ac_try) 2>&5
14816 ac_status=$?
14817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14818 (exit $ac_status); }; }; then
14819 ac_cv_prog_cc_stdc=$ac_arg
14820break
14821else
14822 echo "$as_me: failed program was:" >&5
14823cat conftest.$ac_ext >&5
14824fi
14825rm -f conftest.$ac_objext
14826done
14827rm -f conftest.$ac_ext conftest.$ac_objext
14828CC=$ac_save_CC
14829
14830fi
14831
14832case "x$ac_cv_prog_cc_stdc" in
14833 x|xno)
14834 echo "$as_me:$LINENO: result: none needed" >&5
14835echo "${ECHO_T}none needed" >&6 ;;
14836 *)
14837 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
14838echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
14839 CC="$CC $ac_cv_prog_cc_stdc" ;;
14840esac
14841
Martin v. Löwis11437992002-04-12 09:54:03 +000014842echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
14843echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14844if test "${ac_cv_c_const+set}" = set; then
14845 echo $ECHO_N "(cached) $ECHO_C" >&6
14846else
14847 cat >conftest.$ac_ext <<_ACEOF
14848#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014849#include "confdefs.h"
14850
Barry Warsawfe33b792003-01-07 22:42:49 +000014851#ifdef F77_DUMMY_MAIN
14852# ifdef __cplusplus
14853 extern "C"
14854# endif
14855 int F77_DUMMY_MAIN() { return 1; }
14856#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014857int
14858main ()
14859{
14860/* FIXME: Include the comments suggested by Paul. */
14861#ifndef __cplusplus
14862 /* Ultrix mips cc rejects this. */
14863 typedef int charset[2];
14864 const charset x;
14865 /* SunOS 4.1.1 cc rejects this. */
14866 char const *const *ccp;
14867 char **p;
14868 /* NEC SVR4.0.2 mips cc rejects this. */
14869 struct point {int x, y;};
14870 static struct point const zero = {0,0};
14871 /* AIX XL C 1.02.0.0 rejects this.
14872 It does not let you subtract one const X* pointer from another in
14873 an arm of an if-expression whose if-part is not a constant
14874 expression */
14875 const char *g = "string";
14876 ccp = &g + (g ? g-g : 0);
14877 /* HPUX 7.0 cc rejects these. */
14878 ++ccp;
14879 p = (char**) ccp;
14880 ccp = (char const *const *) p;
14881 { /* SCO 3.2v4 cc rejects this. */
14882 char *t;
14883 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014884
Martin v. Löwis11437992002-04-12 09:54:03 +000014885 *t++ = 0;
14886 }
14887 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
14888 int x[] = {25, 17};
14889 const int *foo = &x[0];
14890 ++foo;
14891 }
14892 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14893 typedef const int *iptr;
14894 iptr p = 0;
14895 ++p;
14896 }
14897 { /* AIX XL C 1.02.0.0 rejects this saying
14898 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14899 struct s { int j; const int *ap[3]; };
14900 struct s *b; b->j = 5;
14901 }
14902 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14903 const int foo = 10;
14904 }
14905#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000014906
Martin v. Löwis11437992002-04-12 09:54:03 +000014907 ;
14908 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000014909}
Martin v. Löwis11437992002-04-12 09:54:03 +000014910_ACEOF
14911rm -f conftest.$ac_objext
14912if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14913 (eval $ac_compile) 2>&5
14914 ac_status=$?
14915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14916 (exit $ac_status); } &&
14917 { ac_try='test -s conftest.$ac_objext'
14918 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14919 (eval $ac_try) 2>&5
14920 ac_status=$?
14921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14922 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014923 ac_cv_c_const=yes
14924else
Martin v. Löwis11437992002-04-12 09:54:03 +000014925 echo "$as_me: failed program was:" >&5
14926cat conftest.$ac_ext >&5
14927ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014928fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014929rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014930fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014931echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
14932echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014933if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014934
14935cat >>confdefs.h <<\_ACEOF
14936#define const
14937_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014938
14939fi
14940
Michael W. Hudson54241132001-12-07 15:38:26 +000014941
Guido van Rossumda88dad1995-01-26 00:46:29 +000014942works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014943echo "$as_me:$LINENO: checking for working volatile" >&5
14944echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
14945cat >conftest.$ac_ext <<_ACEOF
14946#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014947#include "confdefs.h"
14948
Barry Warsawfe33b792003-01-07 22:42:49 +000014949#ifdef F77_DUMMY_MAIN
14950# ifdef __cplusplus
14951 extern "C"
14952# endif
14953 int F77_DUMMY_MAIN() { return 1; }
14954#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014955int
14956main ()
14957{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014958volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014959 ;
14960 return 0;
14961}
14962_ACEOF
14963rm -f conftest.$ac_objext
14964if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14965 (eval $ac_compile) 2>&5
14966 ac_status=$?
14967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14968 (exit $ac_status); } &&
14969 { ac_try='test -s conftest.$ac_objext'
14970 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14971 (eval $ac_try) 2>&5
14972 ac_status=$?
14973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14974 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014975 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014976else
Martin v. Löwis11437992002-04-12 09:54:03 +000014977 echo "$as_me: failed program was:" >&5
14978cat conftest.$ac_ext >&5
14979
14980cat >>confdefs.h <<\_ACEOF
14981#define volatile
14982_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014983
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014984
Guido van Rossum627b2d71993-12-24 10:39:16 +000014985fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014986rm -f conftest.$ac_objext conftest.$ac_ext
14987echo "$as_me:$LINENO: result: $works" >&5
14988echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014989
Guido van Rossumda88dad1995-01-26 00:46:29 +000014990works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014991echo "$as_me:$LINENO: checking for working signed char" >&5
14992echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
14993cat >conftest.$ac_ext <<_ACEOF
14994#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014995#include "confdefs.h"
14996
Barry Warsawfe33b792003-01-07 22:42:49 +000014997#ifdef F77_DUMMY_MAIN
14998# ifdef __cplusplus
14999 extern "C"
15000# endif
15001 int F77_DUMMY_MAIN() { return 1; }
15002#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015003int
15004main ()
15005{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015006signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000015007 ;
15008 return 0;
15009}
15010_ACEOF
15011rm -f conftest.$ac_objext
15012if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15013 (eval $ac_compile) 2>&5
15014 ac_status=$?
15015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15016 (exit $ac_status); } &&
15017 { ac_try='test -s conftest.$ac_objext'
15018 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15019 (eval $ac_try) 2>&5
15020 ac_status=$?
15021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15022 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015023 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015024else
Martin v. Löwis11437992002-04-12 09:54:03 +000015025 echo "$as_me: failed program was:" >&5
15026cat conftest.$ac_ext >&5
15027
15028cat >>confdefs.h <<\_ACEOF
15029#define signed
15030_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000015031
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015032
Guido van Rossum7f43da71994-08-01 12:15:30 +000015033fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015034rm -f conftest.$ac_objext conftest.$ac_ext
15035echo "$as_me:$LINENO: result: $works" >&5
15036echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015037
Guido van Rossumda88dad1995-01-26 00:46:29 +000015038have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015039echo "$as_me:$LINENO: checking for prototypes" >&5
15040echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
15041cat >conftest.$ac_ext <<_ACEOF
15042#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015043#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015044int foo(int x) { return 0; }
Barry Warsawfe33b792003-01-07 22:42:49 +000015045#ifdef F77_DUMMY_MAIN
15046# ifdef __cplusplus
15047 extern "C"
15048# endif
15049 int F77_DUMMY_MAIN() { return 1; }
15050#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015051int
15052main ()
15053{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015054return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000015055 ;
15056 return 0;
15057}
15058_ACEOF
15059rm -f conftest.$ac_objext
15060if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15061 (eval $ac_compile) 2>&5
15062 ac_status=$?
15063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15064 (exit $ac_status); } &&
15065 { ac_try='test -s conftest.$ac_objext'
15066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15067 (eval $ac_try) 2>&5
15068 ac_status=$?
15069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15070 (exit $ac_status); }; }; then
15071
15072
15073cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015074#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015075_ACEOF
15076
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015077 have_prototypes=yes
15078
Guido van Rossumf78abae1997-01-21 22:02:36 +000015079else
Martin v. Löwis11437992002-04-12 09:54:03 +000015080 echo "$as_me: failed program was:" >&5
15081cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000015082fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015083rm -f conftest.$ac_objext conftest.$ac_ext
15084echo "$as_me:$LINENO: result: $have_prototypes" >&5
15085echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015086
Guido van Rossumda88dad1995-01-26 00:46:29 +000015087works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015088echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
15089echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
15090cat >conftest.$ac_ext <<_ACEOF
15091#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015092#include "confdefs.h"
15093
15094#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000015095int foo(int x, ...) {
15096 va_list va;
15097 va_start(va, x);
15098 va_arg(va, int);
15099 va_arg(va, char *);
15100 va_arg(va, double);
15101 return 0;
15102}
Guido van Rossum7f43da71994-08-01 12:15:30 +000015103
Barry Warsawfe33b792003-01-07 22:42:49 +000015104#ifdef F77_DUMMY_MAIN
15105# ifdef __cplusplus
15106 extern "C"
15107# endif
15108 int F77_DUMMY_MAIN() { return 1; }
15109#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015110int
15111main ()
15112{
Guido van Rossum90eea071996-08-30 20:58:57 +000015113return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000015114 ;
15115 return 0;
15116}
15117_ACEOF
15118rm -f conftest.$ac_objext
15119if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15120 (eval $ac_compile) 2>&5
15121 ac_status=$?
15122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15123 (exit $ac_status); } &&
15124 { ac_try='test -s conftest.$ac_objext'
15125 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15126 (eval $ac_try) 2>&5
15127 ac_status=$?
15128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15129 (exit $ac_status); }; }; then
15130
15131
15132cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015133#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015134_ACEOF
15135
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015136 works=yes
15137
Guido van Rossumf78abae1997-01-21 22:02:36 +000015138else
Martin v. Löwis11437992002-04-12 09:54:03 +000015139 echo "$as_me: failed program was:" >&5
15140cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000015141fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015142rm -f conftest.$ac_objext conftest.$ac_ext
15143echo "$as_me:$LINENO: result: $works" >&5
15144echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015145
Guido van Rossumda88dad1995-01-26 00:46:29 +000015146if test "$have_prototypes" = yes; then
15147bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015148echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
15149echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
15150cat >conftest.$ac_ext <<_ACEOF
15151#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015152#include "confdefs.h"
15153#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000015154#ifdef F77_DUMMY_MAIN
15155# ifdef __cplusplus
15156 extern "C"
15157# endif
15158 int F77_DUMMY_MAIN() { return 1; }
15159#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015160int
15161main ()
15162{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015163char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000015164 ;
15165 return 0;
15166}
15167_ACEOF
15168rm -f conftest.$ac_objext
15169if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15170 (eval $ac_compile) 2>&5
15171 ac_status=$?
15172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15173 (exit $ac_status); } &&
15174 { ac_try='test -s conftest.$ac_objext'
15175 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15176 (eval $ac_try) 2>&5
15177 ac_status=$?
15178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15179 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000015180 :
15181else
Martin v. Löwis11437992002-04-12 09:54:03 +000015182 echo "$as_me: failed program was:" >&5
15183cat conftest.$ac_ext >&5
15184
15185cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015186#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015187_ACEOF
15188
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015189 bad_prototypes=yes
15190
Guido van Rossum627b2d71993-12-24 10:39:16 +000015191fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015192rm -f conftest.$ac_objext conftest.$ac_ext
15193echo "$as_me:$LINENO: result: $bad_prototypes" >&5
15194echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015195fi
15196
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015197# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000015198echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
15199echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
15200cat >conftest.$ac_ext <<_ACEOF
15201#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015202#include "confdefs.h"
15203#include <sys/types.h>
15204#include <sys/socket.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000015205#ifdef F77_DUMMY_MAIN
15206# ifdef __cplusplus
15207 extern "C"
15208# endif
15209 int F77_DUMMY_MAIN() { return 1; }
15210#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015211int
15212main ()
15213{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015214struct sockaddr x;
15215x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015216 ;
15217 return 0;
15218}
15219_ACEOF
15220rm -f conftest.$ac_objext
15221if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15222 (eval $ac_compile) 2>&5
15223 ac_status=$?
15224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15225 (exit $ac_status); } &&
15226 { ac_try='test -s conftest.$ac_objext'
15227 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15228 (eval $ac_try) 2>&5
15229 ac_status=$?
15230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15231 (exit $ac_status); }; }; then
15232 echo "$as_me:$LINENO: result: yes" >&5
15233echo "${ECHO_T}yes" >&6
15234
15235cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015236#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015237_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015238
15239else
Martin v. Löwis11437992002-04-12 09:54:03 +000015240 echo "$as_me: failed program was:" >&5
15241cat conftest.$ac_ext >&5
15242echo "$as_me:$LINENO: result: no" >&5
15243echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015244fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015245rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015246
Guido van Rossumda88dad1995-01-26 00:46:29 +000015247va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015248echo "$as_me:$LINENO: checking whether va_list is an array" >&5
15249echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
15250cat >conftest.$ac_ext <<_ACEOF
15251#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015252#include "confdefs.h"
15253
15254#ifdef HAVE_STDARG_PROTOTYPES
15255#include <stdarg.h>
15256#else
15257#include <varargs.h>
15258#endif
15259
Barry Warsawfe33b792003-01-07 22:42:49 +000015260#ifdef F77_DUMMY_MAIN
15261# ifdef __cplusplus
15262 extern "C"
15263# endif
15264 int F77_DUMMY_MAIN() { return 1; }
15265#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015266int
15267main ()
15268{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015269va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000015270 ;
15271 return 0;
15272}
15273_ACEOF
15274rm -f conftest.$ac_objext
15275if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15276 (eval $ac_compile) 2>&5
15277 ac_status=$?
15278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15279 (exit $ac_status); } &&
15280 { ac_try='test -s conftest.$ac_objext'
15281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15282 (eval $ac_try) 2>&5
15283 ac_status=$?
15284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15285 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015286 :
15287else
Martin v. Löwis11437992002-04-12 09:54:03 +000015288 echo "$as_me: failed program was:" >&5
15289cat conftest.$ac_ext >&5
15290
15291
15292cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015293#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015294_ACEOF
15295
Guido van Rossumda88dad1995-01-26 00:46:29 +000015296 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015297
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015298fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015299rm -f conftest.$ac_objext conftest.$ac_ext
15300echo "$as_me:$LINENO: result: $va_list_is_array" >&5
15301echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015302
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015303# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000015304
15305
15306
15307echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
15308echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
15309if test "${ac_cv_func_gethostbyname_r+set}" = set; then
15310 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015311else
Martin v. Löwis11437992002-04-12 09:54:03 +000015312 cat >conftest.$ac_ext <<_ACEOF
15313#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015314#include "confdefs.h"
15315/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015316 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015317#include <assert.h>
15318/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015319#ifdef __cplusplus
15320extern "C"
15321#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015322/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015323 builtin and then its argument prototype would still apply. */
15324char gethostbyname_r ();
15325char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015326
Barry Warsawfe33b792003-01-07 22:42:49 +000015327#ifdef F77_DUMMY_MAIN
15328# ifdef __cplusplus
15329 extern "C"
15330# endif
15331 int F77_DUMMY_MAIN() { return 1; }
15332#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015333int
15334main ()
15335{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015336/* The GNU C library defines this for functions which it implements
15337 to always fail with ENOSYS. Some functions are actually named
15338 something starting with __ and the normal name is an alias. */
15339#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
15340choke me
15341#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015342f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015343#endif
15344
Martin v. Löwis11437992002-04-12 09:54:03 +000015345 ;
15346 return 0;
15347}
15348_ACEOF
15349rm -f conftest.$ac_objext conftest$ac_exeext
15350if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15351 (eval $ac_link) 2>&5
15352 ac_status=$?
15353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15354 (exit $ac_status); } &&
15355 { ac_try='test -s conftest$ac_exeext'
15356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15357 (eval $ac_try) 2>&5
15358 ac_status=$?
15359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15360 (exit $ac_status); }; }; then
15361 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015362else
Martin v. Löwis11437992002-04-12 09:54:03 +000015363 echo "$as_me: failed program was:" >&5
15364cat conftest.$ac_ext >&5
15365ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015366fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015367rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015368fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015369echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
15370echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
15371if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015372
Martin v. Löwis11437992002-04-12 09:54:03 +000015373 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015374#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015375_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015376
Martin v. Löwis11437992002-04-12 09:54:03 +000015377 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
15378echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015379 OLD_CFLAGS=$CFLAGS
15380 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015381 cat >conftest.$ac_ext <<_ACEOF
15382#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015383#include "confdefs.h"
15384
15385# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015386
Barry Warsawfe33b792003-01-07 22:42:49 +000015387#ifdef F77_DUMMY_MAIN
15388# ifdef __cplusplus
15389 extern "C"
15390# endif
15391 int F77_DUMMY_MAIN() { return 1; }
15392#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015393int
15394main ()
15395{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015396
15397 char *name;
15398 struct hostent *he, *res;
15399 char buffer[2048];
15400 int buflen = 2048;
15401 int h_errnop;
15402
15403 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015404
15405 ;
15406 return 0;
15407}
15408_ACEOF
15409rm -f conftest.$ac_objext
15410if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15411 (eval $ac_compile) 2>&5
15412 ac_status=$?
15413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15414 (exit $ac_status); } &&
15415 { ac_try='test -s conftest.$ac_objext'
15416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15417 (eval $ac_try) 2>&5
15418 ac_status=$?
15419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15420 (exit $ac_status); }; }; then
15421
15422 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015423#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015424_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015425
Martin v. Löwis11437992002-04-12 09:54:03 +000015426
15427cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015428#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015429_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015430
Martin v. Löwis11437992002-04-12 09:54:03 +000015431 echo "$as_me:$LINENO: result: yes" >&5
15432echo "${ECHO_T}yes" >&6
15433
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015434else
Martin v. Löwis11437992002-04-12 09:54:03 +000015435 echo "$as_me: failed program was:" >&5
15436cat conftest.$ac_ext >&5
15437
15438 echo "$as_me:$LINENO: result: no" >&5
15439echo "${ECHO_T}no" >&6
15440 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
15441echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
15442 cat >conftest.$ac_ext <<_ACEOF
15443#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015444#include "confdefs.h"
15445
15446# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015447
Barry Warsawfe33b792003-01-07 22:42:49 +000015448#ifdef F77_DUMMY_MAIN
15449# ifdef __cplusplus
15450 extern "C"
15451# endif
15452 int F77_DUMMY_MAIN() { return 1; }
15453#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015454int
15455main ()
15456{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015457
15458 char *name;
15459 struct hostent *he;
15460 char buffer[2048];
15461 int buflen = 2048;
15462 int h_errnop;
15463
15464 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015465
15466 ;
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
15482
15483 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015484#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015485_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015486
Martin v. Löwis11437992002-04-12 09:54:03 +000015487
15488cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015489#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015490_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015491
Martin v. Löwis11437992002-04-12 09:54:03 +000015492 echo "$as_me:$LINENO: result: yes" >&5
15493echo "${ECHO_T}yes" >&6
15494
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015495else
Martin v. Löwis11437992002-04-12 09:54:03 +000015496 echo "$as_me: failed program was:" >&5
15497cat conftest.$ac_ext >&5
15498
15499 echo "$as_me:$LINENO: result: no" >&5
15500echo "${ECHO_T}no" >&6
15501 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
15502echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
15503 cat >conftest.$ac_ext <<_ACEOF
15504#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015505#include "confdefs.h"
15506
15507# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015508
Barry Warsawfe33b792003-01-07 22:42:49 +000015509#ifdef F77_DUMMY_MAIN
15510# ifdef __cplusplus
15511 extern "C"
15512# endif
15513 int F77_DUMMY_MAIN() { return 1; }
15514#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015515int
15516main ()
15517{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015518
15519 char *name;
15520 struct hostent *he;
15521 struct hostent_data data;
15522
15523 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000015524
15525 ;
15526 return 0;
15527}
15528_ACEOF
15529rm -f conftest.$ac_objext
15530if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15531 (eval $ac_compile) 2>&5
15532 ac_status=$?
15533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15534 (exit $ac_status); } &&
15535 { ac_try='test -s conftest.$ac_objext'
15536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15537 (eval $ac_try) 2>&5
15538 ac_status=$?
15539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15540 (exit $ac_status); }; }; then
15541
15542 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015543#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015544_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015545
Martin v. Löwis11437992002-04-12 09:54:03 +000015546
15547cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015548#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015549_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015550
Martin v. Löwis11437992002-04-12 09:54:03 +000015551 echo "$as_me:$LINENO: result: yes" >&5
15552echo "${ECHO_T}yes" >&6
15553
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015554else
Martin v. Löwis11437992002-04-12 09:54:03 +000015555 echo "$as_me: failed program was:" >&5
15556cat conftest.$ac_ext >&5
15557
15558 echo "$as_me:$LINENO: result: no" >&5
15559echo "${ECHO_T}no" >&6
15560
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015561fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015562rm -f conftest.$ac_objext conftest.$ac_ext
15563
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015564fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015565rm -f conftest.$ac_objext conftest.$ac_ext
15566
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015567fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015568rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015569 CFLAGS=$OLD_CFLAGS
15570
15571else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015572
Martin v. Löwis11437992002-04-12 09:54:03 +000015573
15574for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000015575do
Martin v. Löwis11437992002-04-12 09:54:03 +000015576as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15577echo "$as_me:$LINENO: checking for $ac_func" >&5
15578echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15579if eval "test \"\${$as_ac_var+set}\" = set"; then
15580 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015581else
Martin v. Löwis11437992002-04-12 09:54:03 +000015582 cat >conftest.$ac_ext <<_ACEOF
15583#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015584#include "confdefs.h"
15585/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015586 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015587#include <assert.h>
15588/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015589#ifdef __cplusplus
15590extern "C"
15591#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015592/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015593 builtin and then its argument prototype would still apply. */
15594char $ac_func ();
15595char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015596
Barry Warsawfe33b792003-01-07 22:42:49 +000015597#ifdef F77_DUMMY_MAIN
15598# ifdef __cplusplus
15599 extern "C"
15600# endif
15601 int F77_DUMMY_MAIN() { return 1; }
15602#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015603int
15604main ()
15605{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015606/* The GNU C library defines this for functions which it implements
15607 to always fail with ENOSYS. Some functions are actually named
15608 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015609#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015610choke me
15611#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015612f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015613#endif
15614
Martin v. Löwis11437992002-04-12 09:54:03 +000015615 ;
15616 return 0;
15617}
15618_ACEOF
15619rm -f conftest.$ac_objext conftest$ac_exeext
15620if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15621 (eval $ac_link) 2>&5
15622 ac_status=$?
15623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15624 (exit $ac_status); } &&
15625 { ac_try='test -s conftest$ac_exeext'
15626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15627 (eval $ac_try) 2>&5
15628 ac_status=$?
15629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15630 (exit $ac_status); }; }; then
15631 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015632else
Martin v. Löwis11437992002-04-12 09:54:03 +000015633 echo "$as_me: failed program was:" >&5
15634cat conftest.$ac_ext >&5
15635eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015636fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015637rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015638fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015639echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15640echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15641if test `eval echo '${'$as_ac_var'}'` = yes; then
15642 cat >>confdefs.h <<_ACEOF
15643#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15644_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015645
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015646fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015647done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015648
Michael W. Hudson54241132001-12-07 15:38:26 +000015649
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015650fi
15651
Michael W. Hudson54241132001-12-07 15:38:26 +000015652
15653
15654
15655
15656
15657
Guido van Rossum627b2d71993-12-24 10:39:16 +000015658# checks for system services
15659# (none yet)
15660
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015661# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000015662echo "$as_me:$LINENO: checking for __fpu_control" >&5
15663echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
15664if test "${ac_cv_func___fpu_control+set}" = set; then
15665 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015666else
Martin v. Löwis11437992002-04-12 09:54:03 +000015667 cat >conftest.$ac_ext <<_ACEOF
15668#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015669#include "confdefs.h"
15670/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015671 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015672#include <assert.h>
15673/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015674#ifdef __cplusplus
15675extern "C"
15676#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015677/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015678 builtin and then its argument prototype would still apply. */
15679char __fpu_control ();
15680char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015681
Barry Warsawfe33b792003-01-07 22:42:49 +000015682#ifdef F77_DUMMY_MAIN
15683# ifdef __cplusplus
15684 extern "C"
15685# endif
15686 int F77_DUMMY_MAIN() { return 1; }
15687#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015688int
15689main ()
15690{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015691/* The GNU C library defines this for functions which it implements
15692 to always fail with ENOSYS. Some functions are actually named
15693 something starting with __ and the normal name is an alias. */
15694#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
15695choke me
15696#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015697f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015698#endif
15699
Martin v. Löwis11437992002-04-12 09:54:03 +000015700 ;
15701 return 0;
15702}
15703_ACEOF
15704rm -f conftest.$ac_objext conftest$ac_exeext
15705if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15706 (eval $ac_link) 2>&5
15707 ac_status=$?
15708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15709 (exit $ac_status); } &&
15710 { ac_try='test -s conftest$ac_exeext'
15711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15712 (eval $ac_try) 2>&5
15713 ac_status=$?
15714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15715 (exit $ac_status); }; }; then
15716 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015717else
Martin v. Löwis11437992002-04-12 09:54:03 +000015718 echo "$as_me: failed program was:" >&5
15719cat conftest.$ac_ext >&5
15720ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015721fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015722rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015723fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015724echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
15725echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
15726if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015727 :
15728else
Martin v. Löwis11437992002-04-12 09:54:03 +000015729
15730echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
15731echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
15732if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
15733 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015734else
Martin v. Löwis11437992002-04-12 09:54:03 +000015735 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015736LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015737cat >conftest.$ac_ext <<_ACEOF
15738#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015739#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015740
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015741/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015742#ifdef __cplusplus
15743extern "C"
15744#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015745/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015746 builtin and then its argument prototype would still apply. */
15747char __fpu_control ();
Barry Warsawfe33b792003-01-07 22:42:49 +000015748#ifdef F77_DUMMY_MAIN
15749# ifdef __cplusplus
15750 extern "C"
15751# endif
15752 int F77_DUMMY_MAIN() { return 1; }
15753#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015754int
15755main ()
15756{
15757__fpu_control ();
15758 ;
15759 return 0;
15760}
15761_ACEOF
15762rm -f conftest.$ac_objext conftest$ac_exeext
15763if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15764 (eval $ac_link) 2>&5
15765 ac_status=$?
15766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15767 (exit $ac_status); } &&
15768 { ac_try='test -s conftest$ac_exeext'
15769 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15770 (eval $ac_try) 2>&5
15771 ac_status=$?
15772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15773 (exit $ac_status); }; }; then
15774 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015775else
Martin v. Löwis11437992002-04-12 09:54:03 +000015776 echo "$as_me: failed program was:" >&5
15777cat conftest.$ac_ext >&5
15778ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015779fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015780rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15781LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015782fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015783echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
15784echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
15785if test $ac_cv_lib_ieee___fpu_control = yes; then
15786 cat >>confdefs.h <<_ACEOF
15787#define HAVE_LIBIEEE 1
15788_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015789
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015790 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015791
Guido van Rossum627b2d71993-12-24 10:39:16 +000015792fi
15793
Michael W. Hudson54241132001-12-07 15:38:26 +000015794
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015795fi
15796
Michael W. Hudson54241132001-12-07 15:38:26 +000015797
Guido van Rossum7f253911997-05-09 02:42:48 +000015798# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000015799echo "$as_me:$LINENO: checking for --with-fpectl" >&5
15800echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
15801
Guido van Rossum7f253911997-05-09 02:42:48 +000015802# Check whether --with-fpectl or --without-fpectl was given.
15803if test "${with_fpectl+set}" = set; then
15804 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000015805
Guido van Rossum7f253911997-05-09 02:42:48 +000015806if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015807then
15808
15809cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000015810#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015811_ACEOF
15812
15813 echo "$as_me:$LINENO: result: yes" >&5
15814echo "${ECHO_T}yes" >&6
15815else echo "$as_me:$LINENO: result: no" >&5
15816echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015817fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015818else
Martin v. Löwis11437992002-04-12 09:54:03 +000015819 echo "$as_me:$LINENO: result: no" >&5
15820echo "${ECHO_T}no" >&6
15821fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000015822
Guido van Rossum7f43da71994-08-01 12:15:30 +000015823# check for --with-libm=...
15824
Guido van Rossum563e7081996-09-10 18:20:48 +000015825case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000015826Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015827BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000015828*) LIBM=-lm
15829esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015830echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
15831echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
15832
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015833# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015834if test "${with_libm+set}" = set; then
15835 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000015836
Guido van Rossum7f253911997-05-09 02:42:48 +000015837if test "$withval" = no
15838then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000015839 echo "$as_me:$LINENO: result: force LIBM empty" >&5
15840echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015841elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015842then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015843 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
15844echo "${ECHO_T}set LIBM=\"$withval\"" >&6
15845else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
15846echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
15847 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015848fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015849else
Martin v. Löwis11437992002-04-12 09:54:03 +000015850 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
15851echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
15852fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015853
15854# check for --with-libc=...
15855
Martin v. Löwis11437992002-04-12 09:54:03 +000015856echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
15857echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
15858
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015859# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015860if test "${with_libc+set}" = set; then
15861 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000015862
Guido van Rossum7f253911997-05-09 02:42:48 +000015863if test "$withval" = no
15864then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000015865 echo "$as_me:$LINENO: result: force LIBC empty" >&5
15866echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015867elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015868then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015869 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
15870echo "${ECHO_T}set LIBC=\"$withval\"" >&6
15871else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
15872echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
15873 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015874fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015875else
Martin v. Löwis11437992002-04-12 09:54:03 +000015876 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
15877echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
15878fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015879
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015880# check for hypot() in math library
15881LIBS_SAVE=$LIBS
15882LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000015883
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015884for ac_func in hypot
15885do
Martin v. Löwis11437992002-04-12 09:54:03 +000015886as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15887echo "$as_me:$LINENO: checking for $ac_func" >&5
15888echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15889if eval "test \"\${$as_ac_var+set}\" = set"; then
15890 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015891else
Martin v. Löwis11437992002-04-12 09:54:03 +000015892 cat >conftest.$ac_ext <<_ACEOF
15893#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015894#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015895/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015896 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015897#include <assert.h>
15898/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015899#ifdef __cplusplus
15900extern "C"
15901#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015902/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015903 builtin and then its argument prototype would still apply. */
15904char $ac_func ();
15905char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015906
Barry Warsawfe33b792003-01-07 22:42:49 +000015907#ifdef F77_DUMMY_MAIN
15908# ifdef __cplusplus
15909 extern "C"
15910# endif
15911 int F77_DUMMY_MAIN() { return 1; }
15912#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015913int
15914main ()
15915{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015916/* The GNU C library defines this for functions which it implements
15917 to always fail with ENOSYS. Some functions are actually named
15918 something starting with __ and the normal name is an alias. */
15919#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15920choke me
15921#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015922f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015923#endif
15924
Martin v. Löwis11437992002-04-12 09:54:03 +000015925 ;
15926 return 0;
15927}
15928_ACEOF
15929rm -f conftest.$ac_objext conftest$ac_exeext
15930if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15931 (eval $ac_link) 2>&5
15932 ac_status=$?
15933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15934 (exit $ac_status); } &&
15935 { ac_try='test -s conftest$ac_exeext'
15936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15937 (eval $ac_try) 2>&5
15938 ac_status=$?
15939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15940 (exit $ac_status); }; }; then
15941 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015942else
Martin v. Löwis11437992002-04-12 09:54:03 +000015943 echo "$as_me: failed program was:" >&5
15944cat conftest.$ac_ext >&5
15945eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015946fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015947rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015948fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015949echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15950echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15951if test `eval echo '${'$as_ac_var'}'` = yes; then
15952 cat >>confdefs.h <<_ACEOF
15953#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15954_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000015955
Michael W. Hudson54241132001-12-07 15:38:26 +000015956else
Martin v. Löwis11437992002-04-12 09:54:03 +000015957 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015958fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015959done
15960
Michael W. Hudson54241132001-12-07 15:38:26 +000015961
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015962LIBS=$LIBS_SAVE
15963
Guido van Rossumef2255b2000-03-10 22:30:29 +000015964# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015965if test "${ac_cv_header_wchar_h+set}" = set; then
15966 echo "$as_me:$LINENO: checking for wchar.h" >&5
15967echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15968if test "${ac_cv_header_wchar_h+set}" = set; then
15969 echo $ECHO_N "(cached) $ECHO_C" >&6
15970fi
15971echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15972echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015973else
Martin v. Löwis11437992002-04-12 09:54:03 +000015974 # Is the header compilable?
15975echo "$as_me:$LINENO: checking wchar.h usability" >&5
15976echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
15977cat >conftest.$ac_ext <<_ACEOF
15978#line $LINENO "configure"
15979#include "confdefs.h"
15980$ac_includes_default
15981#include <wchar.h>
15982_ACEOF
15983rm -f conftest.$ac_objext
15984if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15985 (eval $ac_compile) 2>&5
15986 ac_status=$?
15987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15988 (exit $ac_status); } &&
15989 { ac_try='test -s conftest.$ac_objext'
15990 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15991 (eval $ac_try) 2>&5
15992 ac_status=$?
15993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15994 (exit $ac_status); }; }; then
15995 ac_header_compiler=yes
15996else
15997 echo "$as_me: failed program was:" >&5
15998cat conftest.$ac_ext >&5
15999ac_header_compiler=no
16000fi
16001rm -f conftest.$ac_objext conftest.$ac_ext
16002echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16003echo "${ECHO_T}$ac_header_compiler" >&6
16004
16005# Is the header present?
16006echo "$as_me:$LINENO: checking wchar.h presence" >&5
16007echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
16008cat >conftest.$ac_ext <<_ACEOF
16009#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016010#include "confdefs.h"
16011#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016012_ACEOF
16013if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16014 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16015 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000016016 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016017 rm -f conftest.er1
16018 cat conftest.err >&5
16019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16020 (exit $ac_status); } >/dev/null; then
16021 if test -s conftest.err; then
16022 ac_cpp_err=$ac_c_preproc_warn_flag
16023 else
16024 ac_cpp_err=
16025 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016026else
Martin v. Löwis11437992002-04-12 09:54:03 +000016027 ac_cpp_err=yes
16028fi
16029if test -z "$ac_cpp_err"; then
16030 ac_header_preproc=yes
16031else
16032 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000016033 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016034 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016035fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016036rm -f conftest.err conftest.$ac_ext
16037echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16038echo "${ECHO_T}$ac_header_preproc" >&6
16039
16040# So? What about this header?
16041case $ac_header_compiler:$ac_header_preproc in
16042 yes:no )
16043 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
16044echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16045 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
16046echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
16047 no:yes )
16048 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
16049echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
16050 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
16051echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
16052 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
16053echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
16054esac
16055echo "$as_me:$LINENO: checking for wchar.h" >&5
16056echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16057if test "${ac_cv_header_wchar_h+set}" = set; then
16058 echo $ECHO_N "(cached) $ECHO_C" >&6
16059else
16060 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000016061fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016062echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16063echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
16064
16065fi
16066if test $ac_cv_header_wchar_h = yes; then
16067
16068
16069cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016070#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016071_ACEOF
16072
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016073 wchar_h="yes"
16074
Guido van Rossumef2255b2000-03-10 22:30:29 +000016075else
Martin v. Löwis11437992002-04-12 09:54:03 +000016076 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016077
16078fi
16079
Michael W. Hudson54241132001-12-07 15:38:26 +000016080
Martin v. Löwis11437992002-04-12 09:54:03 +000016081
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016082# determine wchar_t size
16083if test "$wchar_h" = yes
16084then
Martin v. Löwis11437992002-04-12 09:54:03 +000016085 echo "$as_me:$LINENO: checking for wchar_t" >&5
16086echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
16087if test "${ac_cv_type_wchar_t+set}" = set; then
16088 echo $ECHO_N "(cached) $ECHO_C" >&6
16089else
16090 cat >conftest.$ac_ext <<_ACEOF
16091#line $LINENO "configure"
16092#include "confdefs.h"
16093#include <wchar.h>
16094
Barry Warsawfe33b792003-01-07 22:42:49 +000016095#ifdef F77_DUMMY_MAIN
16096# ifdef __cplusplus
16097 extern "C"
16098# endif
16099 int F77_DUMMY_MAIN() { return 1; }
16100#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016101int
16102main ()
16103{
16104if ((wchar_t *) 0)
16105 return 0;
16106if (sizeof (wchar_t))
16107 return 0;
16108 ;
16109 return 0;
16110}
16111_ACEOF
16112rm -f conftest.$ac_objext
16113if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16114 (eval $ac_compile) 2>&5
16115 ac_status=$?
16116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16117 (exit $ac_status); } &&
16118 { ac_try='test -s conftest.$ac_objext'
16119 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16120 (eval $ac_try) 2>&5
16121 ac_status=$?
16122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16123 (exit $ac_status); }; }; then
16124 ac_cv_type_wchar_t=yes
16125else
16126 echo "$as_me: failed program was:" >&5
16127cat conftest.$ac_ext >&5
16128ac_cv_type_wchar_t=no
16129fi
16130rm -f conftest.$ac_objext conftest.$ac_ext
16131fi
16132echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
16133echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
16134
16135echo "$as_me:$LINENO: checking size of wchar_t" >&5
16136echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
16137if test "${ac_cv_sizeof_wchar_t+set}" = set; then
16138 echo $ECHO_N "(cached) $ECHO_C" >&6
16139else
16140 if test "$ac_cv_type_wchar_t" = yes; then
16141 # The cast to unsigned long works around a bug in the HP C Compiler
16142 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16143 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16144 # This bug is HP SR number 8606223364.
16145 if test "$cross_compiling" = yes; then
16146 # Depending upon the size, compute the lo and hi bounds.
16147cat >conftest.$ac_ext <<_ACEOF
16148#line $LINENO "configure"
16149#include "confdefs.h"
16150#include <wchar.h>
16151
Barry Warsawfe33b792003-01-07 22:42:49 +000016152#ifdef F77_DUMMY_MAIN
16153# ifdef __cplusplus
16154 extern "C"
16155# endif
16156 int F77_DUMMY_MAIN() { return 1; }
16157#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016158int
16159main ()
16160{
16161static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
16162test_array [0] = 0
16163
16164 ;
16165 return 0;
16166}
16167_ACEOF
16168rm -f conftest.$ac_objext
16169if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16170 (eval $ac_compile) 2>&5
16171 ac_status=$?
16172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16173 (exit $ac_status); } &&
16174 { ac_try='test -s conftest.$ac_objext'
16175 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16176 (eval $ac_try) 2>&5
16177 ac_status=$?
16178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16179 (exit $ac_status); }; }; then
16180 ac_lo=0 ac_mid=0
16181 while :; do
16182 cat >conftest.$ac_ext <<_ACEOF
16183#line $LINENO "configure"
16184#include "confdefs.h"
16185#include <wchar.h>
16186
Barry Warsawfe33b792003-01-07 22:42:49 +000016187#ifdef F77_DUMMY_MAIN
16188# ifdef __cplusplus
16189 extern "C"
16190# endif
16191 int F77_DUMMY_MAIN() { return 1; }
16192#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016193int
16194main ()
16195{
16196static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16197test_array [0] = 0
16198
16199 ;
16200 return 0;
16201}
16202_ACEOF
16203rm -f conftest.$ac_objext
16204if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16205 (eval $ac_compile) 2>&5
16206 ac_status=$?
16207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16208 (exit $ac_status); } &&
16209 { ac_try='test -s conftest.$ac_objext'
16210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16211 (eval $ac_try) 2>&5
16212 ac_status=$?
16213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16214 (exit $ac_status); }; }; then
16215 ac_hi=$ac_mid; break
16216else
16217 echo "$as_me: failed program was:" >&5
16218cat conftest.$ac_ext >&5
16219ac_lo=`expr $ac_mid + 1`
16220 if test $ac_lo -le $ac_mid; then
16221 ac_lo= ac_hi=
16222 break
16223 fi
16224 ac_mid=`expr 2 '*' $ac_mid + 1`
16225fi
16226rm -f conftest.$ac_objext conftest.$ac_ext
16227 done
16228else
16229 echo "$as_me: failed program was:" >&5
16230cat conftest.$ac_ext >&5
16231cat >conftest.$ac_ext <<_ACEOF
16232#line $LINENO "configure"
16233#include "confdefs.h"
16234#include <wchar.h>
16235
Barry Warsawfe33b792003-01-07 22:42:49 +000016236#ifdef F77_DUMMY_MAIN
16237# ifdef __cplusplus
16238 extern "C"
16239# endif
16240 int F77_DUMMY_MAIN() { return 1; }
16241#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016242int
16243main ()
16244{
16245static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
16246test_array [0] = 0
16247
16248 ;
16249 return 0;
16250}
16251_ACEOF
16252rm -f conftest.$ac_objext
16253if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16254 (eval $ac_compile) 2>&5
16255 ac_status=$?
16256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16257 (exit $ac_status); } &&
16258 { ac_try='test -s conftest.$ac_objext'
16259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16260 (eval $ac_try) 2>&5
16261 ac_status=$?
16262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16263 (exit $ac_status); }; }; then
16264 ac_hi=-1 ac_mid=-1
16265 while :; do
16266 cat >conftest.$ac_ext <<_ACEOF
16267#line $LINENO "configure"
16268#include "confdefs.h"
16269#include <wchar.h>
16270
Barry Warsawfe33b792003-01-07 22:42:49 +000016271#ifdef F77_DUMMY_MAIN
16272# ifdef __cplusplus
16273 extern "C"
16274# endif
16275 int F77_DUMMY_MAIN() { return 1; }
16276#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016277int
16278main ()
16279{
16280static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
16281test_array [0] = 0
16282
16283 ;
16284 return 0;
16285}
16286_ACEOF
16287rm -f conftest.$ac_objext
16288if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16289 (eval $ac_compile) 2>&5
16290 ac_status=$?
16291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16292 (exit $ac_status); } &&
16293 { ac_try='test -s conftest.$ac_objext'
16294 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16295 (eval $ac_try) 2>&5
16296 ac_status=$?
16297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16298 (exit $ac_status); }; }; then
16299 ac_lo=$ac_mid; break
16300else
16301 echo "$as_me: failed program was:" >&5
16302cat conftest.$ac_ext >&5
16303ac_hi=`expr '(' $ac_mid ')' - 1`
16304 if test $ac_mid -le $ac_hi; then
16305 ac_lo= ac_hi=
16306 break
16307 fi
16308 ac_mid=`expr 2 '*' $ac_mid`
16309fi
16310rm -f conftest.$ac_objext conftest.$ac_ext
16311 done
16312else
16313 echo "$as_me: failed program was:" >&5
16314cat conftest.$ac_ext >&5
16315ac_lo= ac_hi=
16316fi
16317rm -f conftest.$ac_objext conftest.$ac_ext
16318fi
16319rm -f conftest.$ac_objext conftest.$ac_ext
16320# Binary search between lo and hi bounds.
16321while test "x$ac_lo" != "x$ac_hi"; do
16322 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
16323 cat >conftest.$ac_ext <<_ACEOF
16324#line $LINENO "configure"
16325#include "confdefs.h"
16326#include <wchar.h>
16327
Barry Warsawfe33b792003-01-07 22:42:49 +000016328#ifdef F77_DUMMY_MAIN
16329# ifdef __cplusplus
16330 extern "C"
16331# endif
16332 int F77_DUMMY_MAIN() { return 1; }
16333#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016334int
16335main ()
16336{
16337static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16338test_array [0] = 0
16339
16340 ;
16341 return 0;
16342}
16343_ACEOF
16344rm -f conftest.$ac_objext
16345if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16346 (eval $ac_compile) 2>&5
16347 ac_status=$?
16348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16349 (exit $ac_status); } &&
16350 { ac_try='test -s conftest.$ac_objext'
16351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16352 (eval $ac_try) 2>&5
16353 ac_status=$?
16354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16355 (exit $ac_status); }; }; then
16356 ac_hi=$ac_mid
16357else
16358 echo "$as_me: failed program was:" >&5
16359cat conftest.$ac_ext >&5
16360ac_lo=`expr '(' $ac_mid ')' + 1`
16361fi
16362rm -f conftest.$ac_objext conftest.$ac_ext
16363done
16364case $ac_lo in
16365?*) ac_cv_sizeof_wchar_t=$ac_lo;;
16366'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
16367echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
16368 { (exit 1); exit 1; }; } ;;
16369esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016370else
16371 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016372 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
16373echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16374 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000016375else
Martin v. Löwis11437992002-04-12 09:54:03 +000016376 cat >conftest.$ac_ext <<_ACEOF
16377#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016378#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016379#include <wchar.h>
16380
16381long longval () { return (long) (sizeof (wchar_t)); }
16382unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000016383#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016384#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000016385#ifdef F77_DUMMY_MAIN
16386# ifdef __cplusplus
16387 extern "C"
16388# endif
16389 int F77_DUMMY_MAIN() { return 1; }
16390#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016391int
16392main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016393{
Martin v. Löwis11437992002-04-12 09:54:03 +000016394
16395 FILE *f = fopen ("conftest.val", "w");
16396 if (! f)
16397 exit (1);
16398 if (((long) (sizeof (wchar_t))) < 0)
16399 {
16400 long i = longval ();
16401 if (i != ((long) (sizeof (wchar_t))))
16402 exit (1);
16403 fprintf (f, "%ld\n", i);
16404 }
16405 else
16406 {
16407 unsigned long i = ulongval ();
16408 if (i != ((long) (sizeof (wchar_t))))
16409 exit (1);
16410 fprintf (f, "%lu\n", i);
16411 }
16412 exit (ferror (f) || fclose (f) != 0);
16413
16414 ;
16415 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000016416}
Martin v. Löwis11437992002-04-12 09:54:03 +000016417_ACEOF
16418rm -f conftest$ac_exeext
16419if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16420 (eval $ac_link) 2>&5
16421 ac_status=$?
16422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16423 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16425 (eval $ac_try) 2>&5
16426 ac_status=$?
16427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16428 (exit $ac_status); }; }; then
16429 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000016430else
Martin v. Löwis11437992002-04-12 09:54:03 +000016431 echo "$as_me: program exited with status $ac_status" >&5
16432echo "$as_me: failed program was:" >&5
16433cat conftest.$ac_ext >&5
16434( exit $ac_status )
16435{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
16436echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
16437 { (exit 1); exit 1; }; }
16438fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016439rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016440fi
16441fi
16442rm -f conftest.val
16443else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016444 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000016445fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016446fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016447echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
16448echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
16449cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016450#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016451_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016452
Michael W. Hudson54241132001-12-07 15:38:26 +000016453
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016454fi
16455
Martin v. Löwis11437992002-04-12 09:54:03 +000016456echo "$as_me:$LINENO: checking what type to use for unicode" >&5
16457echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016458# Check whether --enable-unicode or --disable-unicode was given.
16459if test "${enable_unicode+set}" = set; then
16460 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000016461
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016462else
16463 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000016464fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016465
16466if test $enable_unicode = yes
16467then
Martin v. Löwisfd917792001-06-27 20:22:04 +000016468 # Without any arguments, Py_UNICODE defaults to two-byte mode
16469 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016470fi
16471
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016472
16473
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016474case "$enable_unicode" in
16475ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000016476 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016477#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000016478_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016479
16480 ;;
16481ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000016482 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016483#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000016484_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016485
16486 ;;
16487esac
16488
Michael W. Hudson54241132001-12-07 15:38:26 +000016489
Martin v. Löwis11437992002-04-12 09:54:03 +000016490
16491
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016492
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016493if test "$enable_unicode" = "no"
16494then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016495 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000016496 echo "$as_me:$LINENO: result: not used" >&5
16497echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016498else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016499 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000016500
16501cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016502#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016503_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016504
16505 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
16506 then
16507 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016508
Martin v. Löwis11437992002-04-12 09:54:03 +000016509cat >>confdefs.h <<\_ACEOF
16510#define HAVE_USABLE_WCHAR_T 1
16511_ACEOF
16512
16513 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016514#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016515_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016516
16517 elif test "$ac_cv_sizeof_short" = "$unicode_size"
16518 then
16519 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000016520 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016521#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000016522_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016523
16524 elif test "$ac_cv_sizeof_long" = "$unicode_size"
16525 then
16526 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000016527 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016528#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000016529_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016530
16531 else
16532 PY_UNICODE_TYPE="no type found"
16533 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016534 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
16535echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016536fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016537
16538# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000016539echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
16540echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
16541if test "${ac_cv_c_bigendian+set}" = set; then
16542 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000016543else
Martin v. Löwis11437992002-04-12 09:54:03 +000016544 # See if sys/param.h defines the BYTE_ORDER macro.
16545cat >conftest.$ac_ext <<_ACEOF
16546#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016547#include "confdefs.h"
16548#include <sys/types.h>
16549#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000016550
Barry Warsawfe33b792003-01-07 22:42:49 +000016551#ifdef F77_DUMMY_MAIN
16552# ifdef __cplusplus
16553 extern "C"
16554# endif
16555 int F77_DUMMY_MAIN() { return 1; }
16556#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016557int
16558main ()
16559{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016560#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
16561 bogus endian macros
16562#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016563
16564 ;
16565 return 0;
16566}
16567_ACEOF
16568rm -f conftest.$ac_objext
16569if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16570 (eval $ac_compile) 2>&5
16571 ac_status=$?
16572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16573 (exit $ac_status); } &&
16574 { ac_try='test -s conftest.$ac_objext'
16575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16576 (eval $ac_try) 2>&5
16577 ac_status=$?
16578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16579 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016580 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000016581cat >conftest.$ac_ext <<_ACEOF
16582#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016583#include "confdefs.h"
16584#include <sys/types.h>
16585#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000016586
Barry Warsawfe33b792003-01-07 22:42:49 +000016587#ifdef F77_DUMMY_MAIN
16588# ifdef __cplusplus
16589 extern "C"
16590# endif
16591 int F77_DUMMY_MAIN() { return 1; }
16592#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016593int
16594main ()
16595{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016596#if BYTE_ORDER != BIG_ENDIAN
16597 not big endian
16598#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016599
16600 ;
16601 return 0;
16602}
16603_ACEOF
16604rm -f conftest.$ac_objext
16605if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16606 (eval $ac_compile) 2>&5
16607 ac_status=$?
16608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16609 (exit $ac_status); } &&
16610 { ac_try='test -s conftest.$ac_objext'
16611 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16612 (eval $ac_try) 2>&5
16613 ac_status=$?
16614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16615 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016616 ac_cv_c_bigendian=yes
16617else
Martin v. Löwis11437992002-04-12 09:54:03 +000016618 echo "$as_me: failed program was:" >&5
16619cat conftest.$ac_ext >&5
16620ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016621fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016622rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016623else
Martin v. Löwis11437992002-04-12 09:54:03 +000016624 echo "$as_me: failed program was:" >&5
16625cat conftest.$ac_ext >&5
16626# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000016627if test "$cross_compiling" = yes; then
Barry Warsawfe33b792003-01-07 22:42:49 +000016628 # try to guess the endianess by grep'ing values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000016629 ac_cv_c_bigendian=unknown
16630 cat >conftest.$ac_ext <<_ACEOF
16631#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016632#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016633short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16634short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16635void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
16636short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16637short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16638void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Barry Warsawfe33b792003-01-07 22:42:49 +000016639#ifdef F77_DUMMY_MAIN
16640# ifdef __cplusplus
16641 extern "C"
16642# endif
16643 int F77_DUMMY_MAIN() { return 1; }
16644#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016645int
16646main ()
16647{
16648 _ascii (); _ebcdic ();
16649 ;
16650 return 0;
16651}
16652_ACEOF
16653rm -f conftest.$ac_objext
16654if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16655 (eval $ac_compile) 2>&5
16656 ac_status=$?
16657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16658 (exit $ac_status); } &&
16659 { ac_try='test -s conftest.$ac_objext'
16660 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16661 (eval $ac_try) 2>&5
16662 ac_status=$?
16663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16664 (exit $ac_status); }; }; then
Barry Warsawfe33b792003-01-07 22:42:49 +000016665 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016666 ac_cv_c_bigendian=yes
16667fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016668if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016669 if test "$ac_cv_c_bigendian" = unknown; then
16670 ac_cv_c_bigendian=no
16671 else
16672 # finding both strings is unlikely to happen, but who knows?
16673 ac_cv_c_bigendian=unknown
16674 fi
16675fi
16676else
16677 echo "$as_me: failed program was:" >&5
16678cat conftest.$ac_ext >&5
16679fi
16680rm -f conftest.$ac_objext conftest.$ac_ext
16681else
16682 cat >conftest.$ac_ext <<_ACEOF
16683#line $LINENO "configure"
16684#include "confdefs.h"
16685int
16686main ()
16687{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016688 /* Are we little or big endian? From Harbison&Steele. */
16689 union
16690 {
16691 long l;
16692 char c[sizeof (long)];
16693 } u;
16694 u.l = 1;
16695 exit (u.c[sizeof (long) - 1] == 1);
16696}
Martin v. Löwis11437992002-04-12 09:54:03 +000016697_ACEOF
16698rm -f conftest$ac_exeext
16699if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16700 (eval $ac_link) 2>&5
16701 ac_status=$?
16702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16703 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16704 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16705 (eval $ac_try) 2>&5
16706 ac_status=$?
16707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16708 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016709 ac_cv_c_bigendian=no
16710else
Martin v. Löwis11437992002-04-12 09:54:03 +000016711 echo "$as_me: program exited with status $ac_status" >&5
16712echo "$as_me: failed program was:" >&5
16713cat conftest.$ac_ext >&5
16714( exit $ac_status )
16715ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000016716fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016717rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016718fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016719fi
16720rm -f conftest.$ac_objext conftest.$ac_ext
16721fi
16722echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
16723echo "${ECHO_T}$ac_cv_c_bigendian" >&6
16724case $ac_cv_c_bigendian in
16725 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000016726
Martin v. Löwis11437992002-04-12 09:54:03 +000016727cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016728#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016729_ACEOF
16730 ;;
16731 no)
16732 ;;
16733 *)
Barry Warsawfe33b792003-01-07 22:42:49 +000016734 { { echo "$as_me:$LINENO: error: unknown endianess
Martin v. Löwis11437992002-04-12 09:54:03 +000016735presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Barry Warsawfe33b792003-01-07 22:42:49 +000016736echo "$as_me: error: unknown endianess
Martin v. Löwis11437992002-04-12 09:54:03 +000016737presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
16738 { (exit 1); exit 1; }; } ;;
16739esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000016740
Michael W. Hudson54241132001-12-07 15:38:26 +000016741
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016742# Check whether right shifting a negative integer extends the sign bit
16743# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000016744echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
16745echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
16746if test "${ac_cv_rshift_extends_sign+set}" = set; then
16747 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016748else
Martin v. Löwis11437992002-04-12 09:54:03 +000016749
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016750if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000016751 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016752else
Martin v. Löwis11437992002-04-12 09:54:03 +000016753 cat >conftest.$ac_ext <<_ACEOF
16754#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016755#include "confdefs.h"
16756
16757int main()
16758{
Vladimir Marangozova6180282000-07-12 05:05:06 +000016759 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016760}
16761
Martin v. Löwis11437992002-04-12 09:54:03 +000016762_ACEOF
16763rm -f conftest$ac_exeext
16764if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16765 (eval $ac_link) 2>&5
16766 ac_status=$?
16767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16768 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16769 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16770 (eval $ac_try) 2>&5
16771 ac_status=$?
16772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16773 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000016774 ac_cv_rshift_extends_sign=yes
16775else
Martin v. Löwis11437992002-04-12 09:54:03 +000016776 echo "$as_me: program exited with status $ac_status" >&5
16777echo "$as_me: failed program was:" >&5
16778cat conftest.$ac_ext >&5
16779( exit $ac_status )
16780ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000016781fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016782rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016783fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000016784fi
16785
Martin v. Löwis11437992002-04-12 09:54:03 +000016786echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
16787echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016788if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016789then
Martin v. Löwis11437992002-04-12 09:54:03 +000016790
16791cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016792#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016793_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016794
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016795fi
16796
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016797# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016798echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
16799echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
16800if test "${ac_cv_have_getc_unlocked+set}" = set; then
16801 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016802else
Martin v. Löwis11437992002-04-12 09:54:03 +000016803
16804cat >conftest.$ac_ext <<_ACEOF
16805#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016806#include "confdefs.h"
16807#include <stdio.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000016808#ifdef F77_DUMMY_MAIN
16809# ifdef __cplusplus
16810 extern "C"
16811# endif
16812 int F77_DUMMY_MAIN() { return 1; }
16813#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016814int
16815main ()
16816{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016817
16818 FILE *f = fopen("/dev/null", "r");
16819 flockfile(f);
16820 getc_unlocked(f);
16821 funlockfile(f);
16822
Martin v. Löwis11437992002-04-12 09:54:03 +000016823 ;
16824 return 0;
16825}
16826_ACEOF
16827rm -f conftest.$ac_objext conftest$ac_exeext
16828if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16829 (eval $ac_link) 2>&5
16830 ac_status=$?
16831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16832 (exit $ac_status); } &&
16833 { ac_try='test -s conftest$ac_exeext'
16834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16835 (eval $ac_try) 2>&5
16836 ac_status=$?
16837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16838 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016839 ac_cv_have_getc_unlocked=yes
16840else
Martin v. Löwis11437992002-04-12 09:54:03 +000016841 echo "$as_me: failed program was:" >&5
16842cat conftest.$ac_ext >&5
16843ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016844fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016845rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016846fi
16847
Martin v. Löwis11437992002-04-12 09:54:03 +000016848echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
16849echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016850if test "$ac_cv_have_getc_unlocked" = yes
16851then
Martin v. Löwis11437992002-04-12 09:54:03 +000016852
16853cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016854#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016855_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016856
16857fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016858
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000016859# check for readline 2.2
16860cat >conftest.$ac_ext <<_ACEOF
16861#line $LINENO "configure"
16862#include "confdefs.h"
16863#include <readline/readline.h>
16864_ACEOF
16865if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16866 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16867 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000016868 egrep -v '^ *\+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000016869 rm -f conftest.er1
16870 cat conftest.err >&5
16871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16872 (exit $ac_status); } >/dev/null; then
16873 if test -s conftest.err; then
16874 ac_cpp_err=$ac_c_preproc_warn_flag
16875 else
16876 ac_cpp_err=
16877 fi
16878else
16879 ac_cpp_err=yes
16880fi
16881if test -z "$ac_cpp_err"; then
16882 have_readline=yes
16883else
16884 echo "$as_me: failed program was:" >&5
16885 cat conftest.$ac_ext >&5
16886 have_readline=no
16887fi
16888rm -f conftest.err conftest.$ac_ext
16889if test $have_readline = yes
16890then
16891 cat >conftest.$ac_ext <<_ACEOF
16892#line $LINENO "configure"
16893#include "confdefs.h"
16894#include <readline/readline.h>
16895
16896_ACEOF
16897if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000016898 egrep "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000016899
16900cat >>confdefs.h <<\_ACEOF
16901#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
16902_ACEOF
16903
16904fi
16905rm -f conftest*
16906
16907fi
16908
Martin v. Löwis0daad592001-09-30 21:09:59 +000016909# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000016910echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
16911echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
16912if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
16913 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000016914else
Martin v. Löwis11437992002-04-12 09:54:03 +000016915 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000016916LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016917cat >conftest.$ac_ext <<_ACEOF
16918#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000016919#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016920
Guido van Rossum353ae582001-07-10 16:45:32 +000016921/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016922#ifdef __cplusplus
16923extern "C"
16924#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000016925/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016926 builtin and then its argument prototype would still apply. */
16927char rl_pre_input_hook ();
Barry Warsawfe33b792003-01-07 22:42:49 +000016928#ifdef F77_DUMMY_MAIN
16929# ifdef __cplusplus
16930 extern "C"
16931# endif
16932 int F77_DUMMY_MAIN() { return 1; }
16933#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016934int
16935main ()
16936{
16937rl_pre_input_hook ();
16938 ;
16939 return 0;
16940}
16941_ACEOF
16942rm -f conftest.$ac_objext conftest$ac_exeext
16943if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16944 (eval $ac_link) 2>&5
16945 ac_status=$?
16946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16947 (exit $ac_status); } &&
16948 { ac_try='test -s conftest$ac_exeext'
16949 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16950 (eval $ac_try) 2>&5
16951 ac_status=$?
16952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16953 (exit $ac_status); }; }; then
16954 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000016955else
Martin v. Löwis11437992002-04-12 09:54:03 +000016956 echo "$as_me: failed program was:" >&5
16957cat conftest.$ac_ext >&5
16958ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000016959fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016960rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16961LIBS=$ac_check_lib_save_LIBS
16962fi
16963echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
16964echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
16965if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016966
Martin v. Löwis11437992002-04-12 09:54:03 +000016967cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016968#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016969_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016970
Martin v. Löwis0daad592001-09-30 21:09:59 +000016971fi
16972
Michael W. Hudson54241132001-12-07 15:38:26 +000016973
Martin v. Löwis0daad592001-09-30 21:09:59 +000016974# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000016975echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
16976echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
16977if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
16978 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000016979else
Martin v. Löwis11437992002-04-12 09:54:03 +000016980 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000016981LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016982cat >conftest.$ac_ext <<_ACEOF
16983#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000016984#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016985
Martin v. Löwis0daad592001-09-30 21:09:59 +000016986/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016987#ifdef __cplusplus
16988extern "C"
16989#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000016990/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016991 builtin and then its argument prototype would still apply. */
16992char rl_completion_matches ();
Barry Warsawfe33b792003-01-07 22:42:49 +000016993#ifdef F77_DUMMY_MAIN
16994# ifdef __cplusplus
16995 extern "C"
16996# endif
16997 int F77_DUMMY_MAIN() { return 1; }
16998#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016999int
17000main ()
17001{
17002rl_completion_matches ();
17003 ;
17004 return 0;
17005}
17006_ACEOF
17007rm -f conftest.$ac_objext conftest$ac_exeext
17008if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17009 (eval $ac_link) 2>&5
17010 ac_status=$?
17011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17012 (exit $ac_status); } &&
17013 { ac_try='test -s conftest$ac_exeext'
17014 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17015 (eval $ac_try) 2>&5
17016 ac_status=$?
17017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17018 (exit $ac_status); }; }; then
17019 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000017020else
Martin v. Löwis11437992002-04-12 09:54:03 +000017021 echo "$as_me: failed program was:" >&5
17022cat conftest.$ac_ext >&5
17023ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000017024fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017025rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17026LIBS=$ac_check_lib_save_LIBS
17027fi
17028echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
17029echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
17030if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017031
Martin v. Löwis11437992002-04-12 09:54:03 +000017032cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017033#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017034_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017035
Guido van Rossum353ae582001-07-10 16:45:32 +000017036fi
17037
Jack Jansendd19cf82001-12-06 22:36:17 +000017038
Martin v. Löwis11437992002-04-12 09:54:03 +000017039echo "$as_me:$LINENO: checking for broken nice()" >&5
17040echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
17041if test "${ac_cv_broken_nice+set}" = set; then
17042 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017043else
Martin v. Löwis11437992002-04-12 09:54:03 +000017044
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017045if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017046 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017047else
Martin v. Löwis11437992002-04-12 09:54:03 +000017048 cat >conftest.$ac_ext <<_ACEOF
17049#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017050#include "confdefs.h"
17051
17052int main()
17053{
17054 int val1 = nice(1);
17055 if (val1 != -1 && val1 == nice(2))
17056 exit(0);
17057 exit(1);
17058}
17059
Martin v. Löwis11437992002-04-12 09:54:03 +000017060_ACEOF
17061rm -f conftest$ac_exeext
17062if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17063 (eval $ac_link) 2>&5
17064 ac_status=$?
17065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17066 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17067 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17068 (eval $ac_try) 2>&5
17069 ac_status=$?
17070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17071 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017072 ac_cv_broken_nice=yes
17073else
Martin v. Löwis11437992002-04-12 09:54:03 +000017074 echo "$as_me: program exited with status $ac_status" >&5
17075echo "$as_me: failed program was:" >&5
17076cat conftest.$ac_ext >&5
17077( exit $ac_status )
17078ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017079fi
Barry Warsawfe33b792003-01-07 22:42:49 +000017080rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017081fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017082fi
17083
Martin v. Löwis11437992002-04-12 09:54:03 +000017084echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
17085echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017086if test "$ac_cv_broken_nice" = yes
17087then
Martin v. Löwis11437992002-04-12 09:54:03 +000017088
17089cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017090#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017091_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017092
17093fi
17094
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017095# tzset(3) exists and works like we expect it to
17096echo "$as_me:$LINENO: checking for working tzset()" >&5
17097echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
17098if test "${ac_cv_working_tzset+set}" = set; then
17099 echo $ECHO_N "(cached) $ECHO_C" >&6
17100else
17101
17102if test "$cross_compiling" = yes; then
17103 ac_cv_working_tzset=no
17104else
17105 cat >conftest.$ac_ext <<_ACEOF
17106#line $LINENO "configure"
17107#include "confdefs.h"
17108
17109#include <stdlib.h>
17110#include <time.h>
17111int main()
17112{
17113 int gmt_hour;
17114 int eastern_hour;
17115 time_t now;
17116 now = time((time_t*)NULL);
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017117 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017118 tzset();
17119 gmt_hour = localtime(&now)->tm_hour;
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017120 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017121 tzset();
17122 eastern_hour = localtime(&now)->tm_hour;
17123 if (eastern_hour == gmt_hour)
17124 exit(1);
17125 exit(0);
17126}
17127
17128_ACEOF
17129rm -f conftest$ac_exeext
17130if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17131 (eval $ac_link) 2>&5
17132 ac_status=$?
17133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17134 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17136 (eval $ac_try) 2>&5
17137 ac_status=$?
17138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17139 (exit $ac_status); }; }; then
17140 ac_cv_working_tzset=yes
17141else
17142 echo "$as_me: program exited with status $ac_status" >&5
17143echo "$as_me: failed program was:" >&5
17144cat conftest.$ac_ext >&5
17145( exit $ac_status )
17146ac_cv_working_tzset=no
17147fi
17148rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17149fi
17150fi
17151
17152echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
17153echo "${ECHO_T}$ac_cv_working_tzset" >&6
17154if test "$ac_cv_working_tzset" = yes
17155then
17156
17157cat >>confdefs.h <<\_ACEOF
17158#define HAVE_WORKING_TZSET 1
17159_ACEOF
17160
17161fi
17162
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017163# Look for subsecond timestamps in struct stat
17164echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
17165echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
17166if test "${ac_cv_stat_tv_nsec+set}" = set; then
17167 echo $ECHO_N "(cached) $ECHO_C" >&6
17168else
17169 cat >conftest.$ac_ext <<_ACEOF
17170#line $LINENO "configure"
17171#include "confdefs.h"
17172#include <sys/stat.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000017173#ifdef F77_DUMMY_MAIN
17174# ifdef __cplusplus
17175 extern "C"
17176# endif
17177 int F77_DUMMY_MAIN() { return 1; }
17178#endif
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017179int
17180main ()
17181{
17182
17183struct stat st;
17184st.st_mtim.tv_nsec = 1;
17185
17186 ;
17187 return 0;
17188}
17189_ACEOF
17190rm -f conftest.$ac_objext
17191if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17192 (eval $ac_compile) 2>&5
17193 ac_status=$?
17194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17195 (exit $ac_status); } &&
17196 { ac_try='test -s conftest.$ac_objext'
17197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17198 (eval $ac_try) 2>&5
17199 ac_status=$?
17200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17201 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000017202 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017203else
17204 echo "$as_me: failed program was:" >&5
17205cat conftest.$ac_ext >&5
17206ac_cv_stat_tv_nsec=no
17207fi
17208rm -f conftest.$ac_objext conftest.$ac_ext
17209fi
17210
17211echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
17212echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
17213if test "$ac_cv_stat_tv_nsec" = yes
17214then
17215
17216cat >>confdefs.h <<\_ACEOF
17217#define HAVE_STAT_TV_NSEC 1
17218_ACEOF
17219
17220fi
17221
Jack Jansen666b1e72001-10-31 12:11:48 +000017222# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000017223echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
17224echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
17225if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
17226 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017227else
Martin v. Löwis11437992002-04-12 09:54:03 +000017228 cat >conftest.$ac_ext <<_ACEOF
17229#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000017230#include "confdefs.h"
17231#include <curses.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000017232#ifdef F77_DUMMY_MAIN
17233# ifdef __cplusplus
17234 extern "C"
17235# endif
17236 int F77_DUMMY_MAIN() { return 1; }
17237#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017238int
17239main ()
17240{
Jack Jansen666b1e72001-10-31 12:11:48 +000017241
17242 int rtn;
17243 rtn = mvwdelch(0,0,0);
17244
Martin v. Löwis11437992002-04-12 09:54:03 +000017245 ;
17246 return 0;
17247}
17248_ACEOF
17249rm -f conftest.$ac_objext
17250if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17251 (eval $ac_compile) 2>&5
17252 ac_status=$?
17253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17254 (exit $ac_status); } &&
17255 { ac_try='test -s conftest.$ac_objext'
17256 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17257 (eval $ac_try) 2>&5
17258 ac_status=$?
17259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17260 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017261 ac_cv_mvwdelch_is_expression=yes
17262else
Martin v. Löwis11437992002-04-12 09:54:03 +000017263 echo "$as_me: failed program was:" >&5
17264cat conftest.$ac_ext >&5
17265ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017266fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017267rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017268fi
17269
Martin v. Löwis11437992002-04-12 09:54:03 +000017270echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
17271echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017272
17273if test "$ac_cv_mvwdelch_is_expression" = yes
17274then
Martin v. Löwis11437992002-04-12 09:54:03 +000017275
17276cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017277#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017278_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017279
17280fi
17281
Martin v. Löwis11437992002-04-12 09:54:03 +000017282echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
17283echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
17284if test "${ac_cv_window_has_flags+set}" = set; then
17285 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017286else
Martin v. Löwis11437992002-04-12 09:54:03 +000017287 cat >conftest.$ac_ext <<_ACEOF
17288#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000017289#include "confdefs.h"
17290#include <curses.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000017291#ifdef F77_DUMMY_MAIN
17292# ifdef __cplusplus
17293 extern "C"
17294# endif
17295 int F77_DUMMY_MAIN() { return 1; }
17296#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017297int
17298main ()
17299{
Jack Jansen666b1e72001-10-31 12:11:48 +000017300
17301 WINDOW *w;
17302 w->_flags = 0;
17303
Martin v. Löwis11437992002-04-12 09:54:03 +000017304 ;
17305 return 0;
17306}
17307_ACEOF
17308rm -f conftest.$ac_objext
17309if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17310 (eval $ac_compile) 2>&5
17311 ac_status=$?
17312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17313 (exit $ac_status); } &&
17314 { ac_try='test -s conftest.$ac_objext'
17315 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17316 (eval $ac_try) 2>&5
17317 ac_status=$?
17318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17319 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017320 ac_cv_window_has_flags=yes
17321else
Martin v. Löwis11437992002-04-12 09:54:03 +000017322 echo "$as_me: failed program was:" >&5
17323cat conftest.$ac_ext >&5
17324ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017325fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017326rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017327fi
17328
Martin v. Löwis11437992002-04-12 09:54:03 +000017329echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
17330echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017331
Jack Jansen666b1e72001-10-31 12:11:48 +000017332
17333if test "$ac_cv_window_has_flags" = yes
17334then
Martin v. Löwis11437992002-04-12 09:54:03 +000017335
17336cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017337#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017338_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017339
17340fi
17341
Martin v. Löwis24a880b2002-12-31 12:55:15 +000017342echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
17343echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
17344
17345if test -e /dev/ptmx
17346then
17347 echo "$as_me:$LINENO: result: yes" >&5
17348echo "${ECHO_T}yes" >&6
17349
17350cat >>confdefs.h <<\_ACEOF
17351#define HAVE_DEV_PTMX 1
17352_ACEOF
17353
17354else
17355 echo "$as_me:$LINENO: result: no" >&5
17356echo "${ECHO_T}no" >&6
17357fi
17358
Neal Norwitz865400f2003-03-21 01:42:58 +000017359echo "$as_me:$LINENO: checking for /dev/ptc" >&5
17360echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
17361
17362if test -e /dev/ptc
17363then
17364 echo "$as_me:$LINENO: result: yes" >&5
17365echo "${ECHO_T}yes" >&6
17366
17367cat >>confdefs.h <<\_ACEOF
17368#define HAVE_DEV_PTC 1
17369_ACEOF
17370
17371else
17372 echo "$as_me:$LINENO: result: no" >&5
17373echo "${ECHO_T}no" >&6
17374fi
17375
Martin v. Löwis11437992002-04-12 09:54:03 +000017376echo "$as_me:$LINENO: checking for socklen_t" >&5
17377echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
17378if test "${ac_cv_type_socklen_t+set}" = set; then
17379 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000017380else
Martin v. Löwis11437992002-04-12 09:54:03 +000017381 cat >conftest.$ac_ext <<_ACEOF
17382#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000017383#include "confdefs.h"
Martin v. Löwis01c04012002-11-11 14:58:44 +000017384
17385#ifdef HAVE_SYS_TYPES_H
17386#include <sys/types.h>
17387#endif
17388#ifdef HAVE_SYS_SOCKET_H
17389#include <sys/socket.h>
17390#endif
17391
17392
Barry Warsawfe33b792003-01-07 22:42:49 +000017393#ifdef F77_DUMMY_MAIN
17394# ifdef __cplusplus
17395 extern "C"
17396# endif
17397 int F77_DUMMY_MAIN() { return 1; }
17398#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017399int
17400main ()
17401{
17402if ((socklen_t *) 0)
17403 return 0;
17404if (sizeof (socklen_t))
17405 return 0;
17406 ;
17407 return 0;
17408}
17409_ACEOF
17410rm -f conftest.$ac_objext
17411if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17412 (eval $ac_compile) 2>&5
17413 ac_status=$?
17414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17415 (exit $ac_status); } &&
17416 { ac_try='test -s conftest.$ac_objext'
17417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17418 (eval $ac_try) 2>&5
17419 ac_status=$?
17420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17421 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000017422 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000017423else
Martin v. Löwis11437992002-04-12 09:54:03 +000017424 echo "$as_me: failed program was:" >&5
17425cat conftest.$ac_ext >&5
17426ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000017427fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017428rm -f conftest.$ac_objext conftest.$ac_ext
17429fi
17430echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
17431echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
17432if test $ac_cv_type_socklen_t = yes; then
17433 :
17434else
Guido van Rossum95713eb2000-05-18 20:53:31 +000017435
Martin v. Löwis01c04012002-11-11 14:58:44 +000017436cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017437#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000017438_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017439
17440fi
17441
Michael W. Hudson54241132001-12-07 15:38:26 +000017442
Michael W. Hudson54241132001-12-07 15:38:26 +000017443
17444
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000017445for h in `(cd $srcdir;echo Python/thread_*.h)`
17446do
17447 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
17448done
17449
Michael W. Hudson54241132001-12-07 15:38:26 +000017450
Jack Jansen0b06be72002-06-21 14:48:38 +000017451SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000017452echo "$as_me:$LINENO: checking for build directories" >&5
17453echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017454for dir in $SRCDIRS; do
17455 if test ! -d $dir; then
17456 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000017457 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017458done
Martin v. Löwis11437992002-04-12 09:54:03 +000017459echo "$as_me:$LINENO: result: done" >&5
17460echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000017461
Guido van Rossum627b2d71993-12-24 10:39:16 +000017462# generate output files
Barry Warsawfe33b792003-01-07 22:42:49 +000017463ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017464
Martin v. Löwis11437992002-04-12 09:54:03 +000017465cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017466# This file is a shell script that caches the results of configure
17467# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017468# scripts and configure runs, see configure's option --config-cache.
17469# It is not useful on other systems. If it contains results you don't
17470# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017471#
Martin v. Löwis11437992002-04-12 09:54:03 +000017472# config.status only pays attention to the cache file if you give it
17473# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017474#
Barry Warsawfe33b792003-01-07 22:42:49 +000017475# `ac_cv_env_foo' variables (set or unset) will be overriden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017476# loading this file, other *unset* `ac_cv_foo' will be assigned the
17477# following values.
17478
17479_ACEOF
17480
Guido van Rossumf78abae1997-01-21 22:02:36 +000017481# The following way of writing the cache mishandles newlines in values,
17482# but we know of no workaround that is simple, portable, and efficient.
17483# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017484# Ultrix sh set writes to stderr and can't be redirected directly,
17485# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000017486{
17487 (set) 2>&1 |
17488 case `(ac_space=' '; set | grep ac_space) 2>&1` in
17489 *ac_space=\ *)
17490 # `set' does not quote correctly, so add quotes (double-quote
17491 # substitution turns \\\\ into \\, and sed turns \\ into \).
17492 sed -n \
17493 "s/'/'\\\\''/g;
17494 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17495 ;;
17496 *)
17497 # `set' quotes correctly as required by POSIX, so do not add quotes.
17498 sed -n \
17499 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17500 ;;
17501 esac;
17502} |
17503 sed '
17504 t clear
17505 : clear
17506 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17507 t end
17508 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17509 : end' >>confcache
17510if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017511 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017512 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17513 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017514 else
17515 echo "not updating unwritable cache $cache_file"
17516 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017517fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017518rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017519
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017520test "x$prefix" = xNONE && prefix=$ac_default_prefix
17521# Let make expand exec_prefix.
17522test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017523
Martin v. Löwis11437992002-04-12 09:54:03 +000017524# VPATH may cause trouble with some makes, so we remove $(srcdir),
17525# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17526# trailing colons and then remove the whole line if VPATH becomes empty
17527# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000017528if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017529 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17530s/:*\$(srcdir):*/:/;
17531s/:*\${srcdir}:*/:/;
17532s/:*@srcdir@:*/:/;
17533s/^\([^=]*=[ ]*\):*/\1/;
17534s/:*$//;
17535s/^[^=]*=[ ]*$//;
17536}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017537fi
17538
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017539DEFS=-DHAVE_CONFIG_H
17540
Martin v. Löwis11437992002-04-12 09:54:03 +000017541
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017542: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000017543ac_clean_files_save=$ac_clean_files
17544ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17545{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
17546echo "$as_me: creating $CONFIG_STATUS" >&6;}
17547cat >$CONFIG_STATUS <<_ACEOF
17548#! $SHELL
17549# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017550# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017551# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017552# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017553
Martin v. Löwis11437992002-04-12 09:54:03 +000017554debug=false
17555SHELL=\${CONFIG_SHELL-$SHELL}
17556_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000017557
Martin v. Löwis11437992002-04-12 09:54:03 +000017558cat >>$CONFIG_STATUS <<\_ACEOF
Barry Warsawfe33b792003-01-07 22:42:49 +000017559
Martin v. Löwis11437992002-04-12 09:54:03 +000017560## --------------------- ##
17561## M4sh Initialization. ##
17562## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017563
Martin v. Löwis11437992002-04-12 09:54:03 +000017564# Be Bourne compatible
17565if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17566 emulate sh
17567 NULLCMD=:
17568elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17569 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000017570fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017571
Barry Warsawfe33b792003-01-07 22:42:49 +000017572# NLS nuisances.
Martin v. Löwis11437992002-04-12 09:54:03 +000017573# Support unset when possible.
17574if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17575 as_unset=unset
17576else
17577 as_unset=false
17578fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017579
Barry Warsawfe33b792003-01-07 22:42:49 +000017580(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
17581 { $as_unset LANG || test "${LANG+set}" != set; } ||
17582 { LANG=C; export LANG; }
17583(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
17584 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
17585 { LC_ALL=C; export LC_ALL; }
17586(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
17587 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
17588 { LC_TIME=C; export LC_TIME; }
17589(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
17590 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
17591 { LC_CTYPE=C; export LC_CTYPE; }
17592(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
17593 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
17594 { LANGUAGE=C; export LANGUAGE; }
17595(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
17596 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
17597 { LC_COLLATE=C; export LC_COLLATE; }
17598(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
17599 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
17600 { LC_NUMERIC=C; export LC_NUMERIC; }
17601(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
17602 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
17603 { LC_MESSAGES=C; export LC_MESSAGES; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017604
17605
17606# Name of the executable.
Barry Warsawfe33b792003-01-07 22:42:49 +000017607as_me=`(basename "$0") 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017608$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17609 X"$0" : 'X\(//\)$' \| \
17610 X"$0" : 'X\(/\)$' \| \
17611 . : '\(.\)' 2>/dev/null ||
17612echo X/"$0" |
17613 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
17614 /^X\/\(\/\/\)$/{ s//\1/; q; }
17615 /^X\/\(\/\).*/{ s//\1/; q; }
17616 s/.*/./; q'`
17617
17618# PATH needs CR, and LINENO needs CR and PATH.
17619# Avoid depending upon Character Ranges.
17620as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17621as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17622as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17623as_cr_digits='0123456789'
17624as_cr_alnum=$as_cr_Letters$as_cr_digits
17625
17626# The user is always right.
17627if test "${PATH_SEPARATOR+set}" != set; then
17628 echo "#! /bin/sh" >conftest.sh
17629 echo "exit 0" >>conftest.sh
17630 chmod +x conftest.sh
Barry Warsawfe33b792003-01-07 22:42:49 +000017631 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017632 PATH_SEPARATOR=';'
17633 else
17634 PATH_SEPARATOR=:
17635 fi
17636 rm -f conftest.sh
17637fi
17638
17639
17640 as_lineno_1=$LINENO
17641 as_lineno_2=$LINENO
17642 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17643 test "x$as_lineno_1" != "x$as_lineno_2" &&
17644 test "x$as_lineno_3" = "x$as_lineno_2" || {
17645 # Find who we are. Look in the path if we contain no path at all
17646 # relative or not.
17647 case $0 in
17648 *[\\/]* ) as_myself=$0 ;;
17649 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17650for as_dir in $PATH
17651do
17652 IFS=$as_save_IFS
17653 test -z "$as_dir" && as_dir=.
17654 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17655done
17656
17657 ;;
17658 esac
17659 # We did not find ourselves, most probably we were run as `sh COMMAND'
17660 # in which case we are not to be found in the path.
17661 if test "x$as_myself" = x; then
17662 as_myself=$0
17663 fi
17664 if test ! -f "$as_myself"; then
17665 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
17666echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
17667 { (exit 1); exit 1; }; }
17668 fi
17669 case $CONFIG_SHELL in
17670 '')
17671 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17672for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
17673do
17674 IFS=$as_save_IFS
17675 test -z "$as_dir" && as_dir=.
17676 for as_base in sh bash ksh sh5; do
17677 case $as_dir in
17678 /*)
17679 if ("$as_dir/$as_base" -c '
17680 as_lineno_1=$LINENO
17681 as_lineno_2=$LINENO
17682 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17683 test "x$as_lineno_1" != "x$as_lineno_2" &&
17684 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
17685 CONFIG_SHELL=$as_dir/$as_base
17686 export CONFIG_SHELL
17687 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
17688 fi;;
17689 esac
17690 done
17691done
17692;;
Jack Jansendd19cf82001-12-06 22:36:17 +000017693 esac
17694
Martin v. Löwis11437992002-04-12 09:54:03 +000017695 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
17696 # uniformly replaced by the line number. The first 'sed' inserts a
17697 # line-number line before each line; the second 'sed' does the real
17698 # work. The second script uses 'N' to pair each line-number line
17699 # with the numbered line, and appends trailing '-' during
17700 # substitution so that $LINENO is not a special case at line end.
17701 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
17702 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
17703 sed '=' <$as_myself |
17704 sed '
17705 N
17706 s,$,-,
17707 : loop
17708 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
17709 t loop
17710 s,-$,,
17711 s,^['$as_cr_digits']*\n,,
17712 ' >$as_me.lineno &&
17713 chmod +x $as_me.lineno ||
17714 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
17715echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
17716 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017717
Martin v. Löwis11437992002-04-12 09:54:03 +000017718 # Don't try to exec as it changes $[0], causing all sort of problems
17719 # (the dirname of $[0] is not the place where we might find the
17720 # original and so on. Autoconf is especially sensible to this).
17721 . ./$as_me.lineno
17722 # Exit status is that of the last command.
17723 exit
17724}
17725
17726
17727case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
17728 *c*,-n*) ECHO_N= ECHO_C='
17729' ECHO_T=' ' ;;
17730 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
17731 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
17732esac
17733
17734if expr a : '\(a\)' >/dev/null 2>&1; then
17735 as_expr=expr
17736else
17737 as_expr=false
17738fi
17739
17740rm -f conf$$ conf$$.exe conf$$.file
17741echo >conf$$.file
17742if ln -s conf$$.file conf$$ 2>/dev/null; then
17743 # We could just check for DJGPP; but this test a) works b) is more generic
17744 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17745 if test -f conf$$.exe; then
17746 # Don't use ln at all; we don't have any links
17747 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017748 else
Martin v. Löwis11437992002-04-12 09:54:03 +000017749 as_ln_s='ln -s'
17750 fi
17751elif ln conf$$.file conf$$ 2>/dev/null; then
17752 as_ln_s=ln
17753else
17754 as_ln_s='cp -p'
17755fi
17756rm -f conf$$ conf$$.exe conf$$.file
17757
17758as_executable_p="test -f"
17759
17760# Sed expression to map a string onto a valid CPP name.
17761as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
17762
17763# Sed expression to map a string onto a valid variable name.
17764as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
17765
17766
17767# IFS
17768# We need space, tab and new line, in precisely that order.
17769as_nl='
17770'
17771IFS=" $as_nl"
17772
17773# CDPATH.
Barry Warsawfe33b792003-01-07 22:42:49 +000017774$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017775
17776exec 6>&1
17777
17778# Open the log real soon, to keep \$[0] and so on meaningful, and to
17779# report actual input values of CONFIG_FILES etc. instead of their
17780# values after options handling. Logging --version etc. is OK.
17781exec 5>>config.log
17782{
17783 echo
17784 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17785## Running $as_me. ##
17786_ASBOX
17787} >&5
17788cat >&5 <<_CSEOF
17789
Martin v. Löwis88afe662002-10-26 13:47:44 +000017790This file was extended by python $as_me 2.3, which was
Barry Warsawfe33b792003-01-07 22:42:49 +000017791generated by GNU Autoconf 2.53. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017792
17793 CONFIG_FILES = $CONFIG_FILES
17794 CONFIG_HEADERS = $CONFIG_HEADERS
17795 CONFIG_LINKS = $CONFIG_LINKS
17796 CONFIG_COMMANDS = $CONFIG_COMMANDS
17797 $ $0 $@
17798
17799_CSEOF
17800echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
17801echo >&5
17802_ACEOF
17803
17804# Files that config.status was made for.
17805if test -n "$ac_config_files"; then
17806 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17807fi
17808
17809if test -n "$ac_config_headers"; then
17810 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17811fi
17812
17813if test -n "$ac_config_links"; then
17814 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17815fi
17816
17817if test -n "$ac_config_commands"; then
17818 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17819fi
17820
17821cat >>$CONFIG_STATUS <<\_ACEOF
17822
17823ac_cs_usage="\
17824\`$as_me' instantiates files from templates according to the
17825current configuration.
17826
17827Usage: $0 [OPTIONS] [FILE]...
17828
17829 -h, --help print this help, then exit
17830 -V, --version print version number, then exit
17831 -d, --debug don't remove temporary files
17832 --recheck update $as_me by reconfiguring in the same conditions
17833 --file=FILE[:TEMPLATE]
17834 instantiate the configuration file FILE
17835 --header=FILE[:TEMPLATE]
17836 instantiate the configuration header FILE
17837
17838Configuration files:
17839$config_files
17840
17841Configuration headers:
17842$config_headers
17843
17844Report bugs to <bug-autoconf@gnu.org>."
17845_ACEOF
17846
17847cat >>$CONFIG_STATUS <<_ACEOF
17848ac_cs_version="\\
Martin v. Löwis88afe662002-10-26 13:47:44 +000017849python config.status 2.3
Barry Warsawfe33b792003-01-07 22:42:49 +000017850configured by $0, generated by GNU Autoconf 2.53,
Martin v. Löwis11437992002-04-12 09:54:03 +000017851 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17852
17853Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17854Free Software Foundation, Inc.
17855This config.status script is free software; the Free Software Foundation
17856gives unlimited permission to copy, distribute and modify it."
17857srcdir=$srcdir
17858INSTALL="$INSTALL"
17859_ACEOF
17860
17861cat >>$CONFIG_STATUS <<\_ACEOF
17862# If no file are specified by the user, then we need to provide default
17863# value. By we need to know if files were specified by the user.
17864ac_need_defaults=:
17865while test $# != 0
17866do
17867 case $1 in
17868 --*=*)
17869 ac_option=`expr "x$1" : 'x\([^=]*\)='`
17870 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Barry Warsawfe33b792003-01-07 22:42:49 +000017871 shift
17872 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17873 shift
Martin v. Löwis11437992002-04-12 09:54:03 +000017874 ;;
Barry Warsawfe33b792003-01-07 22:42:49 +000017875 -*);;
Martin v. Löwis11437992002-04-12 09:54:03 +000017876 *) # This is not an option, so the user has probably given explicit
17877 # arguments.
17878 ac_need_defaults=false;;
17879 esac
17880
Barry Warsawfe33b792003-01-07 22:42:49 +000017881 case $1 in
Martin v. Löwis11437992002-04-12 09:54:03 +000017882 # Handling of the options.
17883_ACEOF
17884cat >>$CONFIG_STATUS <<_ACEOF
17885 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17886 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17887 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17888_ACEOF
17889cat >>$CONFIG_STATUS <<\_ACEOF
17890 --version | --vers* | -V )
17891 echo "$ac_cs_version"; exit 0 ;;
17892 --he | --h)
17893 # Conflict between --help and --header
17894 { { echo "$as_me:$LINENO: error: ambiguous option: $1
17895Try \`$0 --help' for more information." >&5
17896echo "$as_me: error: ambiguous option: $1
17897Try \`$0 --help' for more information." >&2;}
17898 { (exit 1); exit 1; }; };;
17899 --help | --hel | -h )
17900 echo "$ac_cs_usage"; exit 0 ;;
17901 --debug | --d* | -d )
17902 debug=: ;;
17903 --file | --fil | --fi | --f )
Barry Warsawfe33b792003-01-07 22:42:49 +000017904 shift
17905 CONFIG_FILES="$CONFIG_FILES $1"
Martin v. Löwis11437992002-04-12 09:54:03 +000017906 ac_need_defaults=false;;
17907 --header | --heade | --head | --hea )
Barry Warsawfe33b792003-01-07 22:42:49 +000017908 shift
17909 CONFIG_HEADERS="$CONFIG_HEADERS $1"
Martin v. Löwis11437992002-04-12 09:54:03 +000017910 ac_need_defaults=false;;
17911
17912 # This is an error.
17913 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
17914Try \`$0 --help' for more information." >&5
17915echo "$as_me: error: unrecognized option: $1
17916Try \`$0 --help' for more information." >&2;}
17917 { (exit 1); exit 1; }; } ;;
17918
17919 *) ac_config_targets="$ac_config_targets $1" ;;
17920
17921 esac
17922 shift
17923done
17924
17925_ACEOF
17926
17927
17928
17929
17930
17931cat >>$CONFIG_STATUS <<\_ACEOF
17932for ac_config_target in $ac_config_targets
17933do
17934 case "$ac_config_target" in
17935 # Handling of arguments.
17936 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17937 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
17938 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17939 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
17940echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17941 { (exit 1); exit 1; }; };;
17942 esac
17943done
17944
17945# If the user did not use the arguments to specify the items to instantiate,
17946# then the envvar interface is used. Set only those that are not.
17947# We use the long form for the default assignment because of an extremely
17948# bizarre bug on SunOS 4.1.3.
17949if $ac_need_defaults; then
17950 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17951 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17952fi
17953
17954# Create a temporary directory, and hook for its removal unless debugging.
17955$debug ||
17956{
17957 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17958 trap '{ (exit 1); exit 1; }' 1 2 13 15
17959}
17960
17961# Create a (secure) tmp directory for tmp files.
17962: ${TMPDIR=/tmp}
17963{
17964 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17965 test -n "$tmp" && test -d "$tmp"
17966} ||
17967{
17968 tmp=$TMPDIR/cs$$-$RANDOM
17969 (umask 077 && mkdir $tmp)
17970} ||
17971{
17972 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17973 { (exit 1); exit 1; }
17974}
17975
17976_ACEOF
17977
17978cat >>$CONFIG_STATUS <<_ACEOF
17979
17980#
17981# CONFIG_FILES section.
17982#
17983
17984# No need to generate the scripts if there are no CONFIG_FILES.
17985# This happens for instance when ./config.status config.h
17986if test -n "\$CONFIG_FILES"; then
17987 # Protect against being on the right side of a sed subst in config.status.
17988 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17989 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17990s,@SHELL@,$SHELL,;t t
17991s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17992s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17993s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17994s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17995s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17996s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17997s,@exec_prefix@,$exec_prefix,;t t
17998s,@prefix@,$prefix,;t t
17999s,@program_transform_name@,$program_transform_name,;t t
18000s,@bindir@,$bindir,;t t
18001s,@sbindir@,$sbindir,;t t
18002s,@libexecdir@,$libexecdir,;t t
18003s,@datadir@,$datadir,;t t
18004s,@sysconfdir@,$sysconfdir,;t t
18005s,@sharedstatedir@,$sharedstatedir,;t t
18006s,@localstatedir@,$localstatedir,;t t
18007s,@libdir@,$libdir,;t t
18008s,@includedir@,$includedir,;t t
18009s,@oldincludedir@,$oldincludedir,;t t
18010s,@infodir@,$infodir,;t t
18011s,@mandir@,$mandir,;t t
18012s,@build_alias@,$build_alias,;t t
18013s,@host_alias@,$host_alias,;t t
18014s,@target_alias@,$target_alias,;t t
18015s,@DEFS@,$DEFS,;t t
18016s,@ECHO_C@,$ECHO_C,;t t
18017s,@ECHO_N@,$ECHO_N,;t t
18018s,@ECHO_T@,$ECHO_T,;t t
18019s,@LIBS@,$LIBS,;t t
18020s,@VERSION@,$VERSION,;t t
18021s,@SOVERSION@,$SOVERSION,;t t
18022s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
18023s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
18024s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
18025s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
18026s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
18027s,@MACHDEP@,$MACHDEP,;t t
18028s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000018029s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000018030s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018031s,@CXX@,$CXX,;t t
18032s,@MAINOBJ@,$MAINOBJ,;t t
18033s,@EXEEXT@,$EXEEXT,;t t
18034s,@CC@,$CC,;t t
18035s,@CFLAGS@,$CFLAGS,;t t
18036s,@LDFLAGS@,$LDFLAGS,;t t
18037s,@CPPFLAGS@,$CPPFLAGS,;t t
18038s,@ac_ct_CC@,$ac_ct_CC,;t t
18039s,@OBJEXT@,$OBJEXT,;t t
18040s,@CPP@,$CPP,;t t
18041s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
18042s,@LIBRARY@,$LIBRARY,;t t
18043s,@LDLIBRARY@,$LDLIBRARY,;t t
18044s,@DLLLIBRARY@,$DLLLIBRARY,;t t
18045s,@BLDLIBRARY@,$BLDLIBRARY,;t t
18046s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
18047s,@INSTSONAME@,$INSTSONAME,;t t
18048s,@RUNSHARED@,$RUNSHARED,;t t
18049s,@LINKCC@,$LINKCC,;t t
18050s,@RANLIB@,$RANLIB,;t t
18051s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18052s,@AR@,$AR,;t t
18053s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18054s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18055s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18056s,@LN@,$LN,;t t
18057s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000018058s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018059s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
18060s,@SO@,$SO,;t t
18061s,@LDSHARED@,$LDSHARED,;t t
18062s,@BLDSHARED@,$BLDSHARED,;t t
18063s,@CCSHARED@,$CCSHARED,;t t
18064s,@LINKFORSHARED@,$LINKFORSHARED,;t t
18065s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018066s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018067s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
18068s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
18069s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
18070s,@LDLAST@,$LDLAST,;t t
18071s,@THREADOBJ@,$THREADOBJ,;t t
18072s,@DLINCLDIR@,$DLINCLDIR,;t t
18073s,@DYNLOADFILE@,$DYNLOADFILE,;t t
18074s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
18075s,@LIBOBJS@,$LIBOBJS,;t t
18076s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
18077s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
18078s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
18079s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
18080s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
18081s,@LIBM@,$LIBM,;t t
18082s,@LIBC@,$LIBC,;t t
18083s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
18084s,@THREADHEADERS@,$THREADHEADERS,;t t
18085s,@SRCDIRS@,$SRCDIRS,;t t
18086CEOF
18087
18088_ACEOF
18089
18090 cat >>$CONFIG_STATUS <<\_ACEOF
18091 # Split the substitutions into bite-sized pieces for seds with
18092 # small command number limits, like on Digital OSF/1 and HP-UX.
18093 ac_max_sed_lines=48
18094 ac_sed_frag=1 # Number of current file.
18095 ac_beg=1 # First line for current file.
18096 ac_end=$ac_max_sed_lines # Line after last line for current file.
18097 ac_more_lines=:
18098 ac_sed_cmds=
18099 while $ac_more_lines; do
18100 if test $ac_beg -gt 1; then
18101 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18102 else
18103 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18104 fi
18105 if test ! -s $tmp/subs.frag; then
18106 ac_more_lines=false
18107 else
18108 # The purpose of the label and of the branching condition is to
18109 # speed up the sed processing (if there are no `@' at all, there
18110 # is no need to browse any of the substitutions).
18111 # These are the two extra sed commands mentioned above.
18112 (echo ':t
18113 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18114 if test -z "$ac_sed_cmds"; then
18115 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18116 else
18117 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18118 fi
18119 ac_sed_frag=`expr $ac_sed_frag + 1`
18120 ac_beg=$ac_end
18121 ac_end=`expr $ac_end + $ac_max_sed_lines`
18122 fi
18123 done
18124 if test -z "$ac_sed_cmds"; then
18125 ac_sed_cmds=cat
18126 fi
18127fi # test -n "$CONFIG_FILES"
18128
18129_ACEOF
18130cat >>$CONFIG_STATUS <<\_ACEOF
18131for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18132 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18133 case $ac_file in
18134 - | *:- | *:-:* ) # input from stdin
18135 cat >$tmp/stdin
18136 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18137 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18138 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18139 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18140 * ) ac_file_in=$ac_file.in ;;
18141 esac
18142
18143 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18144 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18145$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18146 X"$ac_file" : 'X\(//\)[^/]' \| \
18147 X"$ac_file" : 'X\(//\)$' \| \
18148 X"$ac_file" : 'X\(/\)' \| \
18149 . : '\(.\)' 2>/dev/null ||
18150echo X"$ac_file" |
18151 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18152 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18153 /^X\(\/\/\)$/{ s//\1/; q; }
18154 /^X\(\/\).*/{ s//\1/; q; }
18155 s/.*/./; q'`
Barry Warsawfe33b792003-01-07 22:42:49 +000018156 { case "$ac_dir" in
18157 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18158 *) as_incr_dir=.;;
18159esac
18160as_dummy="$ac_dir"
18161for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18162 case $as_mkdir_dir in
18163 # Skip DOS drivespec
18164 ?:) as_incr_dir=$as_mkdir_dir ;;
18165 *)
18166 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18167 test -d "$as_incr_dir" ||
18168 mkdir "$as_incr_dir" ||
18169 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18170echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18171 { (exit 1); exit 1; }; }
18172 ;;
18173 esac
18174done; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018175
18176 ac_builddir=.
18177
18178if test "$ac_dir" != .; then
18179 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18180 # A "../" for each directory in $ac_dir_suffix.
18181 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18182else
18183 ac_dir_suffix= ac_top_builddir=
18184fi
18185
18186case $srcdir in
18187 .) # No --srcdir option. We are building in place.
18188 ac_srcdir=.
18189 if test -z "$ac_top_builddir"; then
18190 ac_top_srcdir=.
18191 else
18192 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18193 fi ;;
18194 [\\/]* | ?:[\\/]* ) # Absolute path.
18195 ac_srcdir=$srcdir$ac_dir_suffix;
18196 ac_top_srcdir=$srcdir ;;
18197 *) # Relative path.
18198 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18199 ac_top_srcdir=$ac_top_builddir$srcdir ;;
18200esac
18201# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18202# absolute.
18203ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwise9416172003-05-03 10:12:45 +000018204ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000018205ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18206ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18207
18208
18209 case $INSTALL in
18210 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18211 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
18212 esac
18213
18214 if test x"$ac_file" != x-; then
18215 { echo "$as_me:$LINENO: creating $ac_file" >&5
18216echo "$as_me: creating $ac_file" >&6;}
18217 rm -f "$ac_file"
18218 fi
18219 # Let's still pretend it is `configure' which instantiates (i.e., don't
18220 # use $as_me), people would be surprised to read:
18221 # /* config.h. Generated by config.status. */
18222 if test x"$ac_file" = x-; then
18223 configure_input=
18224 else
18225 configure_input="$ac_file. "
18226 fi
18227 configure_input=$configure_input"Generated from `echo $ac_file_in |
18228 sed 's,.*/,,'` by configure."
18229
18230 # First look for the input files in the build tree, otherwise in the
18231 # src tree.
18232 ac_file_inputs=`IFS=:
18233 for f in $ac_file_in; do
18234 case $f in
18235 -) echo $tmp/stdin ;;
18236 [\\/$]*)
18237 # Absolute (can't be DOS-style, as IFS=:)
18238 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18239echo "$as_me: error: cannot find input file: $f" >&2;}
18240 { (exit 1); exit 1; }; }
18241 echo $f;;
18242 *) # Relative
18243 if test -f "$f"; then
18244 # Build tree
18245 echo $f
18246 elif test -f "$srcdir/$f"; then
18247 # Source tree
18248 echo $srcdir/$f
18249 else
18250 # /dev/null tree
18251 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18252echo "$as_me: error: cannot find input file: $f" >&2;}
18253 { (exit 1); exit 1; }; }
18254 fi;;
18255 esac
18256 done` || { (exit 1); exit 1; }
18257_ACEOF
18258cat >>$CONFIG_STATUS <<_ACEOF
18259 sed "$ac_vpsub
18260$extrasub
18261_ACEOF
18262cat >>$CONFIG_STATUS <<\_ACEOF
18263:t
18264/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18265s,@configure_input@,$configure_input,;t t
18266s,@srcdir@,$ac_srcdir,;t t
18267s,@abs_srcdir@,$ac_abs_srcdir,;t t
18268s,@top_srcdir@,$ac_top_srcdir,;t t
18269s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18270s,@builddir@,$ac_builddir,;t t
18271s,@abs_builddir@,$ac_abs_builddir,;t t
18272s,@top_builddir@,$ac_top_builddir,;t t
18273s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
18274s,@INSTALL@,$ac_INSTALL,;t t
18275" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18276 rm -f $tmp/stdin
18277 if test x"$ac_file" != x-; then
18278 mv $tmp/out $ac_file
18279 else
18280 cat $tmp/out
18281 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018282 fi
18283
Martin v. Löwis11437992002-04-12 09:54:03 +000018284done
18285_ACEOF
18286cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018287
Martin v. Löwis11437992002-04-12 09:54:03 +000018288#
18289# CONFIG_HEADER section.
18290#
Guido van Rossum627b2d71993-12-24 10:39:16 +000018291
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018292# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18293# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000018294#
18295# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000018296ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18297ac_dB='[ ].*$,\1#\2'
18298ac_dC=' '
18299ac_dD=',;t'
18300# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18301ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18302ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018303ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000018304ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018305
Martin v. Löwis11437992002-04-12 09:54:03 +000018306for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000018307 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000018308 case $ac_file in
18309 - | *:- | *:-:* ) # input from stdin
18310 cat >$tmp/stdin
18311 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18312 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18313 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18314 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18315 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018316 esac
18317
Martin v. Löwis11437992002-04-12 09:54:03 +000018318 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
18319echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000018320
Martin v. Löwis11437992002-04-12 09:54:03 +000018321 # First look for the input files in the build tree, otherwise in the
18322 # src tree.
18323 ac_file_inputs=`IFS=:
18324 for f in $ac_file_in; do
18325 case $f in
18326 -) echo $tmp/stdin ;;
18327 [\\/$]*)
18328 # Absolute (can't be DOS-style, as IFS=:)
18329 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18330echo "$as_me: error: cannot find input file: $f" >&2;}
18331 { (exit 1); exit 1; }; }
18332 echo $f;;
18333 *) # Relative
18334 if test -f "$f"; then
18335 # Build tree
18336 echo $f
18337 elif test -f "$srcdir/$f"; then
18338 # Source tree
18339 echo $srcdir/$f
18340 else
18341 # /dev/null tree
18342 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18343echo "$as_me: error: cannot find input file: $f" >&2;}
18344 { (exit 1); exit 1; }; }
18345 fi;;
18346 esac
18347 done` || { (exit 1); exit 1; }
18348 # Remove the trailing spaces.
18349 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018350
Martin v. Löwis11437992002-04-12 09:54:03 +000018351_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018352
Martin v. Löwis11437992002-04-12 09:54:03 +000018353# Transform confdefs.h into two sed scripts, `conftest.defines' and
18354# `conftest.undefs', that substitutes the proper values into
18355# config.h.in to produce config.h. The first handles `#define'
18356# templates, and the second `#undef' templates.
18357# And first: Protect against being on the right side of a sed subst in
18358# config.status. Protect against being in an unquoted here document
18359# in config.status.
18360rm -f conftest.defines conftest.undefs
18361# Using a here document instead of a string reduces the quoting nightmare.
18362# Putting comments in sed scripts is not portable.
18363#
18364# `end' is used to avoid that the second main sed command (meant for
18365# 0-ary CPP macros) applies to n-ary macro definitions.
18366# See the Autoconf documentation for `clear'.
18367cat >confdef2sed.sed <<\_ACEOF
18368s/[\\&,]/\\&/g
18369s,[\\$`],\\&,g
18370t clear
18371: clear
18372s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
18373t end
18374s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
18375: end
18376_ACEOF
18377# If some macros were called several times there might be several times
18378# the same #defines, which is useless. Nevertheless, we may not want to
18379# sort them, since we want the *last* AC-DEFINE to be honored.
18380uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
18381sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
18382rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018383
18384# This sed command replaces #undef with comments. This is necessary, for
18385# example, in the case of _POSIX_SOURCE, which is predefined and required
18386# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000018387cat >>conftest.undefs <<\_ACEOF
18388s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
18389_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018390
Martin v. Löwis11437992002-04-12 09:54:03 +000018391# Break up conftest.defines because some shells have a limit on the size
18392# of here documents, and old seds have small limits too (100 cmds).
18393echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Barry Warsawfe33b792003-01-07 22:42:49 +000018394echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018395echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
18396echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018397rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000018398while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000018399do
Martin v. Löwis11437992002-04-12 09:54:03 +000018400 # Write a limited-size here document to $tmp/defines.sed.
18401 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
18402 # Speed up: don't consider the non `#define' lines.
18403 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
18404 # Work around the forget-to-reset-the-flag bug.
18405 echo 't clr' >>$CONFIG_STATUS
18406 echo ': clr' >>$CONFIG_STATUS
18407 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018408 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018409 sed -f $tmp/defines.sed $tmp/in >$tmp/out
18410 rm -f $tmp/in
18411 mv $tmp/out $tmp/in
18412' >>$CONFIG_STATUS
18413 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
18414 rm -f conftest.defines
18415 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000018416done
Martin v. Löwis11437992002-04-12 09:54:03 +000018417rm -f conftest.defines
Barry Warsawfe33b792003-01-07 22:42:49 +000018418echo ' fi # egrep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018419echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018420
Martin v. Löwis11437992002-04-12 09:54:03 +000018421# Break up conftest.undefs because some shells have a limit on the size
18422# of here documents, and old seds have small limits too (100 cmds).
18423echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
18424rm -f conftest.tail
18425while grep . conftest.undefs >/dev/null
18426do
18427 # Write a limited-size here document to $tmp/undefs.sed.
18428 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
18429 # Speed up: don't consider the non `#undef'
18430 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
18431 # Work around the forget-to-reset-the-flag bug.
18432 echo 't clr' >>$CONFIG_STATUS
18433 echo ': clr' >>$CONFIG_STATUS
18434 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
18435 echo 'CEOF
18436 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
18437 rm -f $tmp/in
18438 mv $tmp/out $tmp/in
18439' >>$CONFIG_STATUS
18440 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
18441 rm -f conftest.undefs
18442 mv conftest.tail conftest.undefs
18443done
18444rm -f conftest.undefs
18445
18446cat >>$CONFIG_STATUS <<\_ACEOF
18447 # Let's still pretend it is `configure' which instantiates (i.e., don't
18448 # use $as_me), people would be surprised to read:
18449 # /* config.h. Generated by config.status. */
18450 if test x"$ac_file" = x-; then
18451 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000018452 else
Martin v. Löwis11437992002-04-12 09:54:03 +000018453 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000018454 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018455 cat $tmp/in >>$tmp/config.h
18456 rm -f $tmp/in
18457 if test x"$ac_file" != x-; then
18458 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
18459 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
18460echo "$as_me: $ac_file is unchanged" >&6;}
18461 else
18462 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18463$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18464 X"$ac_file" : 'X\(//\)[^/]' \| \
18465 X"$ac_file" : 'X\(//\)$' \| \
18466 X"$ac_file" : 'X\(/\)' \| \
18467 . : '\(.\)' 2>/dev/null ||
18468echo X"$ac_file" |
18469 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18470 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18471 /^X\(\/\/\)$/{ s//\1/; q; }
18472 /^X\(\/\).*/{ s//\1/; q; }
18473 s/.*/./; q'`
Barry Warsawfe33b792003-01-07 22:42:49 +000018474 { case "$ac_dir" in
18475 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18476 *) as_incr_dir=.;;
18477esac
18478as_dummy="$ac_dir"
18479for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18480 case $as_mkdir_dir in
18481 # Skip DOS drivespec
18482 ?:) as_incr_dir=$as_mkdir_dir ;;
18483 *)
18484 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18485 test -d "$as_incr_dir" ||
18486 mkdir "$as_incr_dir" ||
18487 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18488echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18489 { (exit 1); exit 1; }; }
18490 ;;
18491 esac
18492done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018493
Martin v. Löwis11437992002-04-12 09:54:03 +000018494 rm -f $ac_file
18495 mv $tmp/config.h $ac_file
18496 fi
18497 else
18498 cat $tmp/config.h
18499 rm -f $tmp/config.h
18500 fi
18501done
18502_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000018503
Martin v. Löwis11437992002-04-12 09:54:03 +000018504cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018505
Martin v. Löwis11437992002-04-12 09:54:03 +000018506{ (exit 0); exit 0; }
18507_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018508chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018509ac_clean_files=$ac_clean_files_save
18510
18511
18512# configure is writing to config.log, and then calls config.status.
18513# config.status does its own redirection, appending to config.log.
18514# Unfortunately, on DOS this fails, as config.log is still kept open
18515# by configure, so config.status won't be able to write to it; its
18516# output is simply discarded. So we exec the FD to /dev/null,
18517# effectively closing config.log, so it can be properly (re)opened and
18518# appended to by config.status. When coming back to configure, we
18519# need to make the FD available again.
18520if test "$no_create" != yes; then
18521 ac_cs_success=:
18522 exec 5>/dev/null
18523 $SHELL $CONFIG_STATUS || ac_cs_success=false
18524 exec 5>>config.log
18525 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18526 # would make configure fail if this is the last instruction.
18527 $ac_cs_success || { (exit 1); exit 1; }
18528fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018529
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018530
18531echo "creating Setup"
18532if test ! -f Modules/Setup
18533then
18534 cp $srcdir/Modules/Setup.dist Modules/Setup
18535fi
18536
18537echo "creating Setup.local"
18538if test ! -f Modules/Setup.local
18539then
18540 echo "# Edit this file for local setup changes" >Modules/Setup.local
18541fi
18542
18543echo "creating Makefile"
18544$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
18545 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000018546 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018547mv config.c Modules