blob: d5cc892b3612175ee4a6442fae271caae92bb871 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwis5f433f02003-05-05 05:05:30 +00002# From configure.in Revision: 1.405 .
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öwis35195ad2002-11-11 13:26:51 +00001357esac
1358
1359if test $define_xopen_source = yes
1360then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001361
1362cat >>confdefs.h <<\_ACEOF
1363#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001364_ACEOF
1365
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001366
1367 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1368 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1369 # several APIs are not declared. Since this is also needed in some
1370 # cases for HP-UX, we define it globally.
1371
1372
1373cat >>confdefs.h <<\_ACEOF
1374#define _XOPEN_SOURCE_EXTENDED 1
1375_ACEOF
1376
1377
1378cat >>confdefs.h <<\_ACEOF
1379#define _POSIX_C_SOURCE 200112L
1380_ACEOF
1381
1382
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001383fi
1384
Guido van Rossum91922671997-10-09 20:24:13 +00001385#
1386# SGI compilers allow the specification of the both the ABI and the
1387# ISA on the command line. Depending on the values of these switches,
1388# different and often incompatable code will be generated.
1389#
1390# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1391# thus supply support for various ABI/ISA combinations. The MACHDEP
1392# variable is also adjusted.
1393#
1394
1395if test ! -z "$SGI_ABI"
1396then
1397 CC="cc $SGI_ABI"
1398 LDFLAGS="$SGI_ABI $LDFLAGS"
1399 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1400fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001401echo "$as_me:$LINENO: result: $MACHDEP" >&5
1402echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001403
Jack Jansen83f898c2002-12-30 22:23:40 +00001404# And add extra plat-mac for darwin
1405
Jack Jansen7b59b422003-03-17 15:44:10 +00001406
Jack Jansen83f898c2002-12-30 22:23:40 +00001407echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1408echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1409if test -z "$EXTRAPLATDIR"
1410then
1411 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001412 darwin)
1413 EXTRAPLATDIR="\$(PLATMACDIRS)"
1414 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1415 ;;
1416 *)
1417 EXTRAPLATDIR=""
1418 EXTRAMACHDEPPATH=""
1419 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001420 esac
1421fi
1422echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1423echo "${ECHO_T}$EXTRAPLATDIR" >&6
1424
Guido van Rossum627b2d71993-12-24 10:39:16 +00001425# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001426
1427# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1428# for debug/optimization stuff. BASECFLAGS is for flags that are required
1429# just to get things to compile and link. Users are free to override OPT
1430# when running configure or make. The build should not break if they do.
1431# BASECFLAGS should generally not be messed with, however.
1432
1433# XXX shouldn't some/most/all of this code be merged with the stuff later
1434# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001435echo "$as_me:$LINENO: checking for --without-gcc" >&5
1436echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1437
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001438# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001439if test "${with_gcc+set}" = set; then
1440 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001441
Guido van Rossum7f43da71994-08-01 12:15:30 +00001442 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001443 no) CC=cc
1444 without_gcc=yes;;
1445 yes) CC=gcc
1446 without_gcc=no;;
1447 *) CC=$withval
1448 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001449 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001450else
Martin v. Löwis11437992002-04-12 09:54:03 +00001451
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001452 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001453 AIX*) CC=cc_r
1454 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001455 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001456 case $BE_HOST_CPU in
1457 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001458 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001459 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001460 BASECFLAGS="$BASECFLAGS -export pragma"
1461 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001462 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001463 ;;
1464 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001465 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001466 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001467 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001468 ;;
1469 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001470 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1471echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1472 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001473 ;;
1474 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001475 AR="\$(srcdir)/Modules/ar_beos"
1476 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001477 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001478 Monterey*)
1479 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001480 without_gcc=;;
1481 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001482 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001483fi;
1484echo "$as_me:$LINENO: result: $without_gcc" >&5
1485echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001486
1487
Guido van Rossum95012191999-12-16 17:50:52 +00001488
Fred Drakea1a84e72001-03-06 05:52:16 +00001489MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001490echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1491echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1492
Guido van Rossum95012191999-12-16 17:50:52 +00001493# Check whether --with-cxx or --without-cxx was given.
1494if test "${with_cxx+set}" = set; then
1495 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001496
Martin v. Löwis22352952000-12-13 17:37:02 +00001497 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001498 case $withval in
1499 no) CXX=
1500 with_cxx=no;;
1501 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001502 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001503 with_cxx=$withval;;
1504 esac
1505else
Martin v. Löwis11437992002-04-12 09:54:03 +00001506
Guido van Rossum95012191999-12-16 17:50:52 +00001507 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001508 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001509
Martin v. Löwis11437992002-04-12 09:54:03 +00001510fi;
1511echo "$as_me:$LINENO: result: $with_cxx" >&5
1512echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001513
1514if test "$with_cxx" = "yes"
1515then
Martin v. Löwis11437992002-04-12 09:54:03 +00001516 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1517echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1518 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001519fi
1520
1521
1522
1523
Martin v. Löwis11437992002-04-12 09:54:03 +00001524if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001525then
1526 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1527do
Martin v. Löwis11437992002-04-12 09:54:03 +00001528 # 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 +00001529set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001530echo "$as_me:$LINENO: checking for $ac_word" >&5
1531echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1532if test "${ac_cv_prog_CXX+set}" = set; then
1533 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001534else
1535 if test -n "$CXX"; then
1536 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1537else
Martin v. Löwis11437992002-04-12 09:54:03 +00001538as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1539for as_dir in $PATH
1540do
1541 IFS=$as_save_IFS
1542 test -z "$as_dir" && as_dir=.
1543 for ac_exec_ext in '' $ac_executable_extensions; do
1544 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1545 ac_cv_prog_CXX="$ac_prog"
1546 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1547 break 2
1548 fi
1549done
1550done
1551
Martin v. Löwis22352952000-12-13 17:37:02 +00001552fi
1553fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001554CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001555if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001556 echo "$as_me:$LINENO: result: $CXX" >&5
1557echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001558else
Martin v. Löwis11437992002-04-12 09:54:03 +00001559 echo "$as_me:$LINENO: result: no" >&5
1560echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001561fi
1562
Martin v. Löwis11437992002-04-12 09:54:03 +00001563 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001564done
1565test -n "$CXX" || CXX="notfound"
1566
1567 if test "$CXX" = "notfound"
1568 then
1569 CXX=
1570 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001571 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001572ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001573ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1574ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1575ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1576 cat >conftest.$ac_ext <<_ACEOF
1577#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001578#include "confdefs.h"
1579
Barry Warsawfe33b792003-01-07 22:42:49 +00001580#ifdef F77_DUMMY_MAIN
1581# ifdef __cplusplus
1582 extern "C"
1583# endif
1584 int F77_DUMMY_MAIN() { return 1; }
1585#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00001586int
1587main ()
1588{
Michael W. Hudson54241132001-12-07 15:38:26 +00001589
Martin v. Löwis11437992002-04-12 09:54:03 +00001590 ;
1591 return 0;
1592}
1593_ACEOF
1594ac_clean_files_save=$ac_clean_files
1595ac_clean_files="$ac_clean_files a.out a.exe"
1596# Try to create an executable without -o first, disregard a.out.
1597# It will help us diagnose broken compilers, and finding out an intuition
1598# of exeext.
1599echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1600echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1601ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1602if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1603 (eval $ac_link_default) 2>&5
1604 ac_status=$?
1605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1606 (exit $ac_status); }; then
1607 # Find the output, starting from the most likely. This scheme is
1608# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1609# resort.
1610
1611# Be careful to initialize this variable, since it used to be cached.
1612# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1613ac_cv_exeext=
Barry Warsawfe33b792003-01-07 22:42:49 +00001614for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1615 ls a.out conftest 2>/dev/null;
1616 ls a.* conftest.* 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001617 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00001618 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001619 a.out ) # We found the default executable, but exeext='' is most
1620 # certainly right.
1621 break;;
1622 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1623 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1624 export ac_cv_exeext
1625 break;;
1626 * ) break;;
1627 esac
1628done
1629else
1630 echo "$as_me: failed program was:" >&5
1631cat conftest.$ac_ext >&5
Barry Warsawfe33b792003-01-07 22:42:49 +00001632{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1633echo "$as_me: error: C++ compiler cannot create executables" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001634 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001635fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001636
1637ac_exeext=$ac_cv_exeext
1638echo "$as_me:$LINENO: result: $ac_file" >&5
1639echo "${ECHO_T}$ac_file" >&6
1640
1641# Check the compiler produces executables we can run. If not, either
1642# the compiler is broken, or we cross compile.
1643echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1644echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1645# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1646# If not cross compiling, check that we can run a simple program.
1647if test "$cross_compiling" != yes; then
1648 if { ac_try='./$ac_file'
1649 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1650 (eval $ac_try) 2>&5
1651 ac_status=$?
1652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1653 (exit $ac_status); }; }; then
1654 cross_compiling=no
1655 else
1656 if test "$cross_compiling" = maybe; then
1657 cross_compiling=yes
1658 else
1659 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1660If you meant to cross compile, use \`--host'." >&5
1661echo "$as_me: error: cannot run C++ compiled programs.
1662If you meant to cross compile, use \`--host'." >&2;}
1663 { (exit 1); exit 1; }; }
1664 fi
1665 fi
1666fi
1667echo "$as_me:$LINENO: result: yes" >&5
1668echo "${ECHO_T}yes" >&6
1669
1670rm -f a.out a.exe conftest$ac_cv_exeext
1671ac_clean_files=$ac_clean_files_save
1672# Check the compiler produces executables we can run. If not, either
1673# the compiler is broken, or we cross compile.
1674echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1675echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1676echo "$as_me:$LINENO: result: $cross_compiling" >&5
1677echo "${ECHO_T}$cross_compiling" >&6
1678
1679echo "$as_me:$LINENO: checking for suffix of executables" >&5
1680echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1681if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1682 (eval $ac_link) 2>&5
1683 ac_status=$?
1684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1685 (exit $ac_status); }; then
1686 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1687# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1688# work properly (i.e., refer to `conftest.exe'), while it won't with
1689# `rm'.
Barry Warsawfe33b792003-01-07 22:42:49 +00001690for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001691 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00001692 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001693 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1694 export ac_cv_exeext
1695 break;;
1696 * ) break;;
1697 esac
1698done
1699else
1700 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1701echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1702 { (exit 1); exit 1; }; }
1703fi
1704
1705rm -f conftest$ac_cv_exeext
1706echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1707echo "${ECHO_T}$ac_cv_exeext" >&6
1708
1709rm -f conftest.$ac_ext
1710EXEEXT=$ac_cv_exeext
1711ac_exeext=$EXEEXT
1712
1713 ac_ext=c
1714ac_cpp='$CPP $CPPFLAGS'
1715ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1716ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1717ac_compiler_gnu=$ac_cv_c_compiler_gnu
1718
1719
Martin v. Löwis22352952000-12-13 17:37:02 +00001720
1721 fi
1722fi
1723
Guido van Rossum8b131c51995-03-09 14:10:13 +00001724# If the user switches compilers, we can't believe the cache
1725if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1726then
Martin v. Löwis11437992002-04-12 09:54:03 +00001727 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1728(it is also a good idea to do 'make clean' before compiling)" >&5
1729echo "$as_me: error: cached CC is different -- throw away $cache_file
1730(it is also a good idea to do 'make clean' before compiling)" >&2;}
1731 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001732fi
1733
Martin v. Löwis11437992002-04-12 09:54:03 +00001734ac_ext=c
1735ac_cpp='$CPP $CPPFLAGS'
1736ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1737ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1738ac_compiler_gnu=$ac_cv_c_compiler_gnu
1739if test -n "$ac_tool_prefix"; then
1740 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1741set dummy ${ac_tool_prefix}gcc; ac_word=$2
1742echo "$as_me:$LINENO: checking for $ac_word" >&5
1743echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1744if test "${ac_cv_prog_CC+set}" = set; then
1745 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001746else
1747 if test -n "$CC"; then
1748 ac_cv_prog_CC="$CC" # Let the user override the test.
1749else
Martin v. Löwis11437992002-04-12 09:54:03 +00001750as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1751for as_dir in $PATH
1752do
1753 IFS=$as_save_IFS
1754 test -z "$as_dir" && as_dir=.
1755 for ac_exec_ext in '' $ac_executable_extensions; do
1756 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1757 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1758 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1759 break 2
1760 fi
1761done
1762done
1763
Jack Jansendd19cf82001-12-06 22:36:17 +00001764fi
1765fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001766CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001767if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001768 echo "$as_me:$LINENO: result: $CC" >&5
1769echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001770else
Martin v. Löwis11437992002-04-12 09:54:03 +00001771 echo "$as_me:$LINENO: result: no" >&5
1772echo "${ECHO_T}no" >&6
1773fi
1774
1775fi
1776if test -z "$ac_cv_prog_CC"; then
1777 ac_ct_CC=$CC
1778 # Extract the first word of "gcc", so it can be a program name with args.
1779set dummy gcc; ac_word=$2
1780echo "$as_me:$LINENO: checking for $ac_word" >&5
1781echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1782if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1783 echo $ECHO_N "(cached) $ECHO_C" >&6
1784else
1785 if test -n "$ac_ct_CC"; then
1786 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1787else
1788as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1789for as_dir in $PATH
1790do
1791 IFS=$as_save_IFS
1792 test -z "$as_dir" && as_dir=.
1793 for ac_exec_ext in '' $ac_executable_extensions; do
1794 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1795 ac_cv_prog_ac_ct_CC="gcc"
1796 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1797 break 2
1798 fi
1799done
1800done
1801
1802fi
1803fi
1804ac_ct_CC=$ac_cv_prog_ac_ct_CC
1805if test -n "$ac_ct_CC"; then
1806 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1807echo "${ECHO_T}$ac_ct_CC" >&6
1808else
1809 echo "$as_me:$LINENO: result: no" >&5
1810echo "${ECHO_T}no" >&6
1811fi
1812
1813 CC=$ac_ct_CC
1814else
1815 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001816fi
1817
Jack Jansendd19cf82001-12-06 22:36:17 +00001818if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001819 if test -n "$ac_tool_prefix"; then
1820 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1821set dummy ${ac_tool_prefix}cc; ac_word=$2
1822echo "$as_me:$LINENO: checking for $ac_word" >&5
1823echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1824if test "${ac_cv_prog_CC+set}" = set; then
1825 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001826else
1827 if test -n "$CC"; then
1828 ac_cv_prog_CC="$CC" # Let the user override the test.
1829else
Martin v. Löwis11437992002-04-12 09:54:03 +00001830as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1831for as_dir in $PATH
1832do
1833 IFS=$as_save_IFS
1834 test -z "$as_dir" && as_dir=.
1835 for ac_exec_ext in '' $ac_executable_extensions; do
1836 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1837 ac_cv_prog_CC="${ac_tool_prefix}cc"
1838 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1839 break 2
1840 fi
1841done
1842done
1843
1844fi
1845fi
1846CC=$ac_cv_prog_CC
1847if test -n "$CC"; then
1848 echo "$as_me:$LINENO: result: $CC" >&5
1849echo "${ECHO_T}$CC" >&6
1850else
1851 echo "$as_me:$LINENO: result: no" >&5
1852echo "${ECHO_T}no" >&6
1853fi
1854
1855fi
1856if test -z "$ac_cv_prog_CC"; then
1857 ac_ct_CC=$CC
1858 # Extract the first word of "cc", so it can be a program name with args.
1859set dummy cc; ac_word=$2
1860echo "$as_me:$LINENO: checking for $ac_word" >&5
1861echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1862if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1863 echo $ECHO_N "(cached) $ECHO_C" >&6
1864else
1865 if test -n "$ac_ct_CC"; then
1866 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1867else
1868as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1869for as_dir in $PATH
1870do
1871 IFS=$as_save_IFS
1872 test -z "$as_dir" && as_dir=.
1873 for ac_exec_ext in '' $ac_executable_extensions; do
1874 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1875 ac_cv_prog_ac_ct_CC="cc"
1876 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1877 break 2
1878 fi
1879done
1880done
1881
1882fi
1883fi
1884ac_ct_CC=$ac_cv_prog_ac_ct_CC
1885if test -n "$ac_ct_CC"; then
1886 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1887echo "${ECHO_T}$ac_ct_CC" >&6
1888else
1889 echo "$as_me:$LINENO: result: no" >&5
1890echo "${ECHO_T}no" >&6
1891fi
1892
1893 CC=$ac_ct_CC
1894else
1895 CC="$ac_cv_prog_CC"
1896fi
1897
1898fi
1899if test -z "$CC"; then
1900 # Extract the first word of "cc", so it can be a program name with args.
1901set dummy cc; ac_word=$2
1902echo "$as_me:$LINENO: checking for $ac_word" >&5
1903echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1904if test "${ac_cv_prog_CC+set}" = set; then
1905 echo $ECHO_N "(cached) $ECHO_C" >&6
1906else
1907 if test -n "$CC"; then
1908 ac_cv_prog_CC="$CC" # Let the user override the test.
1909else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001910 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001911as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1912for as_dir in $PATH
1913do
1914 IFS=$as_save_IFS
1915 test -z "$as_dir" && as_dir=.
1916 for ac_exec_ext in '' $ac_executable_extensions; do
1917 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1918 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1919 ac_prog_rejected=yes
1920 continue
1921 fi
1922 ac_cv_prog_CC="cc"
1923 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1924 break 2
1925 fi
1926done
1927done
1928
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001929if test $ac_prog_rejected = yes; then
1930 # We found a bogon in the path, so make sure we never use it.
1931 set dummy $ac_cv_prog_CC
1932 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001933 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001934 # We chose a different compiler from the bogus one.
1935 # However, it has the same basename, so the bogon will be chosen
1936 # first if we set CC to just the basename; use the full file name.
1937 shift
Barry Warsawfe33b792003-01-07 22:42:49 +00001938 set dummy "$as_dir/$ac_word" ${1+"$@"}
1939 shift
1940 ac_cv_prog_CC="$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001941 fi
1942fi
1943fi
1944fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001945CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001946if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001947 echo "$as_me:$LINENO: result: $CC" >&5
1948echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001949else
Martin v. Löwis11437992002-04-12 09:54:03 +00001950 echo "$as_me:$LINENO: result: no" >&5
1951echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001952fi
1953
Martin v. Löwis11437992002-04-12 09:54:03 +00001954fi
1955if test -z "$CC"; then
1956 if test -n "$ac_tool_prefix"; then
1957 for ac_prog in cl
1958 do
1959 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1960set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1961echo "$as_me:$LINENO: checking for $ac_word" >&5
1962echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1963if test "${ac_cv_prog_CC+set}" = set; then
1964 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001965else
1966 if test -n "$CC"; then
1967 ac_cv_prog_CC="$CC" # Let the user override the test.
1968else
Martin v. Löwis11437992002-04-12 09:54:03 +00001969as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1970for as_dir in $PATH
1971do
1972 IFS=$as_save_IFS
1973 test -z "$as_dir" && as_dir=.
1974 for ac_exec_ext in '' $ac_executable_extensions; do
1975 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1976 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1977 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1978 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001979 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001980done
1981done
1982
1983fi
1984fi
1985CC=$ac_cv_prog_CC
1986if test -n "$CC"; then
1987 echo "$as_me:$LINENO: result: $CC" >&5
1988echo "${ECHO_T}$CC" >&6
1989else
1990 echo "$as_me:$LINENO: result: no" >&5
1991echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001992fi
1993
Martin v. Löwis11437992002-04-12 09:54:03 +00001994 test -n "$CC" && break
1995 done
1996fi
1997if test -z "$CC"; then
1998 ac_ct_CC=$CC
1999 for ac_prog in cl
2000do
2001 # Extract the first word of "$ac_prog", so it can be a program name with args.
2002set dummy $ac_prog; ac_word=$2
2003echo "$as_me:$LINENO: checking for $ac_word" >&5
2004echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2005if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2006 echo $ECHO_N "(cached) $ECHO_C" >&6
2007else
2008 if test -n "$ac_ct_CC"; then
2009 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2010else
2011as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2012for as_dir in $PATH
2013do
2014 IFS=$as_save_IFS
2015 test -z "$as_dir" && as_dir=.
2016 for ac_exec_ext in '' $ac_executable_extensions; do
2017 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2018 ac_cv_prog_ac_ct_CC="$ac_prog"
2019 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2020 break 2
2021 fi
2022done
2023done
Jack Jansendd19cf82001-12-06 22:36:17 +00002024
Martin v. Löwis11437992002-04-12 09:54:03 +00002025fi
2026fi
2027ac_ct_CC=$ac_cv_prog_ac_ct_CC
2028if test -n "$ac_ct_CC"; then
2029 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2030echo "${ECHO_T}$ac_ct_CC" >&6
2031else
2032 echo "$as_me:$LINENO: result: no" >&5
2033echo "${ECHO_T}no" >&6
2034fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002035
Martin v. Löwis11437992002-04-12 09:54:03 +00002036 test -n "$ac_ct_CC" && break
2037done
Michael W. Hudson54241132001-12-07 15:38:26 +00002038
Martin v. Löwis11437992002-04-12 09:54:03 +00002039 CC=$ac_ct_CC
2040fi
2041
2042fi
2043
2044
2045test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
2046echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
2047 { (exit 1); exit 1; }; }
2048
2049# Provide some information about the compiler.
2050echo "$as_me:$LINENO:" \
2051 "checking for C compiler version" >&5
2052ac_compiler=`set X $ac_compile; echo $2`
2053{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2054 (eval $ac_compiler --version </dev/null >&5) 2>&5
2055 ac_status=$?
2056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2057 (exit $ac_status); }
2058{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2059 (eval $ac_compiler -v </dev/null >&5) 2>&5
2060 ac_status=$?
2061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2062 (exit $ac_status); }
2063{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2064 (eval $ac_compiler -V </dev/null >&5) 2>&5
2065 ac_status=$?
2066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2067 (exit $ac_status); }
2068
2069cat >conftest.$ac_ext <<_ACEOF
2070#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00002071#include "confdefs.h"
2072
Barry Warsawfe33b792003-01-07 22:42:49 +00002073#ifdef F77_DUMMY_MAIN
2074# ifdef __cplusplus
2075 extern "C"
2076# endif
2077 int F77_DUMMY_MAIN() { return 1; }
2078#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002079int
2080main ()
2081{
2082
2083 ;
2084 return 0;
2085}
2086_ACEOF
2087ac_clean_files_save=$ac_clean_files
2088ac_clean_files="$ac_clean_files a.out a.exe"
2089# Try to create an executable without -o first, disregard a.out.
2090# It will help us diagnose broken compilers, and finding out an intuition
2091# of exeext.
2092echo "$as_me:$LINENO: checking for C compiler default output" >&5
2093echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2094ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2095if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2096 (eval $ac_link_default) 2>&5
2097 ac_status=$?
2098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2099 (exit $ac_status); }; then
2100 # Find the output, starting from the most likely. This scheme is
2101# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2102# resort.
2103
2104# Be careful to initialize this variable, since it used to be cached.
2105# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2106ac_cv_exeext=
Barry Warsawfe33b792003-01-07 22:42:49 +00002107for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
2108 ls a.out conftest 2>/dev/null;
2109 ls a.* conftest.* 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002110 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00002111 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002112 a.out ) # We found the default executable, but exeext='' is most
2113 # certainly right.
2114 break;;
2115 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2116 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2117 export ac_cv_exeext
2118 break;;
2119 * ) break;;
2120 esac
2121done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002122else
Martin v. Löwis11437992002-04-12 09:54:03 +00002123 echo "$as_me: failed program was:" >&5
2124cat conftest.$ac_ext >&5
Barry Warsawfe33b792003-01-07 22:42:49 +00002125{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2126echo "$as_me: error: C compiler cannot create executables" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002127 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002128fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002129
Martin v. Löwis11437992002-04-12 09:54:03 +00002130ac_exeext=$ac_cv_exeext
2131echo "$as_me:$LINENO: result: $ac_file" >&5
2132echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002133
Martin v. Löwis11437992002-04-12 09:54:03 +00002134# Check the compiler produces executables we can run. If not, either
2135# the compiler is broken, or we cross compile.
2136echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2137echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2138# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2139# If not cross compiling, check that we can run a simple program.
2140if test "$cross_compiling" != yes; then
2141 if { ac_try='./$ac_file'
2142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2143 (eval $ac_try) 2>&5
2144 ac_status=$?
2145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2146 (exit $ac_status); }; }; then
2147 cross_compiling=no
2148 else
2149 if test "$cross_compiling" = maybe; then
2150 cross_compiling=yes
2151 else
2152 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2153If you meant to cross compile, use \`--host'." >&5
2154echo "$as_me: error: cannot run C compiled programs.
2155If you meant to cross compile, use \`--host'." >&2;}
2156 { (exit 1); exit 1; }; }
2157 fi
2158 fi
2159fi
2160echo "$as_me:$LINENO: result: yes" >&5
2161echo "${ECHO_T}yes" >&6
2162
2163rm -f a.out a.exe conftest$ac_cv_exeext
2164ac_clean_files=$ac_clean_files_save
2165# Check the compiler produces executables we can run. If not, either
2166# the compiler is broken, or we cross compile.
2167echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2168echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2169echo "$as_me:$LINENO: result: $cross_compiling" >&5
2170echo "${ECHO_T}$cross_compiling" >&6
2171
2172echo "$as_me:$LINENO: checking for suffix of executables" >&5
2173echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2174if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2175 (eval $ac_link) 2>&5
2176 ac_status=$?
2177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2178 (exit $ac_status); }; then
2179 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2180# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2181# work properly (i.e., refer to `conftest.exe'), while it won't with
2182# `rm'.
Barry Warsawfe33b792003-01-07 22:42:49 +00002183for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002184 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00002185 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002186 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2187 export ac_cv_exeext
2188 break;;
2189 * ) break;;
2190 esac
2191done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002192else
Martin v. Löwis11437992002-04-12 09:54:03 +00002193 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2194echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2195 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002196fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002197
Martin v. Löwis11437992002-04-12 09:54:03 +00002198rm -f conftest$ac_cv_exeext
2199echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2200echo "${ECHO_T}$ac_cv_exeext" >&6
2201
2202rm -f conftest.$ac_ext
2203EXEEXT=$ac_cv_exeext
2204ac_exeext=$EXEEXT
2205echo "$as_me:$LINENO: checking for suffix of object files" >&5
2206echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2207if test "${ac_cv_objext+set}" = set; then
2208 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002209else
Martin v. Löwis11437992002-04-12 09:54:03 +00002210 cat >conftest.$ac_ext <<_ACEOF
2211#line $LINENO "configure"
2212#include "confdefs.h"
2213
Barry Warsawfe33b792003-01-07 22:42:49 +00002214#ifdef F77_DUMMY_MAIN
2215# ifdef __cplusplus
2216 extern "C"
2217# endif
2218 int F77_DUMMY_MAIN() { return 1; }
2219#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002220int
2221main ()
2222{
2223
2224 ;
2225 return 0;
2226}
2227_ACEOF
2228rm -f conftest.o conftest.obj
2229if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2230 (eval $ac_compile) 2>&5
2231 ac_status=$?
2232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2233 (exit $ac_status); }; then
2234 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2235 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00002236 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002237 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2238 break;;
2239 esac
2240done
2241else
2242 echo "$as_me: failed program was:" >&5
2243cat conftest.$ac_ext >&5
2244{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2245echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2246 { (exit 1); exit 1; }; }
2247fi
2248
2249rm -f conftest.$ac_cv_objext conftest.$ac_ext
2250fi
2251echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2252echo "${ECHO_T}$ac_cv_objext" >&6
2253OBJEXT=$ac_cv_objext
2254ac_objext=$OBJEXT
2255echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2256echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2257if test "${ac_cv_c_compiler_gnu+set}" = set; then
2258 echo $ECHO_N "(cached) $ECHO_C" >&6
2259else
2260 cat >conftest.$ac_ext <<_ACEOF
2261#line $LINENO "configure"
2262#include "confdefs.h"
2263
Barry Warsawfe33b792003-01-07 22:42:49 +00002264#ifdef F77_DUMMY_MAIN
2265# ifdef __cplusplus
2266 extern "C"
2267# endif
2268 int F77_DUMMY_MAIN() { return 1; }
2269#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002270int
2271main ()
2272{
2273#ifndef __GNUC__
2274 choke me
2275#endif
2276
2277 ;
2278 return 0;
2279}
2280_ACEOF
2281rm -f conftest.$ac_objext
2282if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2283 (eval $ac_compile) 2>&5
2284 ac_status=$?
2285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2286 (exit $ac_status); } &&
2287 { ac_try='test -s conftest.$ac_objext'
2288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2289 (eval $ac_try) 2>&5
2290 ac_status=$?
2291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2292 (exit $ac_status); }; }; then
2293 ac_compiler_gnu=yes
2294else
2295 echo "$as_me: failed program was:" >&5
2296cat conftest.$ac_ext >&5
2297ac_compiler_gnu=no
2298fi
2299rm -f conftest.$ac_objext conftest.$ac_ext
2300ac_cv_c_compiler_gnu=$ac_compiler_gnu
2301
2302fi
2303echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2304echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2305GCC=`test $ac_compiler_gnu = yes && echo yes`
2306ac_test_CFLAGS=${CFLAGS+set}
2307ac_save_CFLAGS=$CFLAGS
2308CFLAGS="-g"
2309echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2310echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2311if test "${ac_cv_prog_cc_g+set}" = set; then
2312 echo $ECHO_N "(cached) $ECHO_C" >&6
2313else
2314 cat >conftest.$ac_ext <<_ACEOF
2315#line $LINENO "configure"
2316#include "confdefs.h"
2317
Barry Warsawfe33b792003-01-07 22:42:49 +00002318#ifdef F77_DUMMY_MAIN
2319# ifdef __cplusplus
2320 extern "C"
2321# endif
2322 int F77_DUMMY_MAIN() { return 1; }
2323#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002324int
2325main ()
2326{
2327
2328 ;
2329 return 0;
2330}
2331_ACEOF
2332rm -f conftest.$ac_objext
2333if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2334 (eval $ac_compile) 2>&5
2335 ac_status=$?
2336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2337 (exit $ac_status); } &&
2338 { ac_try='test -s conftest.$ac_objext'
2339 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2340 (eval $ac_try) 2>&5
2341 ac_status=$?
2342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2343 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002344 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002345else
Martin v. Löwis11437992002-04-12 09:54:03 +00002346 echo "$as_me: failed program was:" >&5
2347cat conftest.$ac_ext >&5
2348ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002349fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002350rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002351fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002352echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2353echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002354if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002355 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002356elif test $ac_cv_prog_cc_g = yes; then
2357 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002358 CFLAGS="-g -O2"
2359 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002360 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002361 fi
2362else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002363 if test "$GCC" = yes; then
2364 CFLAGS="-O2"
2365 else
2366 CFLAGS=
2367 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002368fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002369# Some people use a C++ compiler to compile C. Since we use `exit',
2370# in C++ we need to declare it. In case someone uses the same compiler
2371# for both compiling C and C++ we need to have the C++ compiler decide
2372# the declaration of exit, since it's the most demanding environment.
2373cat >conftest.$ac_ext <<_ACEOF
2374#ifndef __cplusplus
2375 choke me
2376#endif
2377_ACEOF
2378rm -f conftest.$ac_objext
2379if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2380 (eval $ac_compile) 2>&5
2381 ac_status=$?
2382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2383 (exit $ac_status); } &&
2384 { ac_try='test -s conftest.$ac_objext'
2385 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2386 (eval $ac_try) 2>&5
2387 ac_status=$?
2388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2389 (exit $ac_status); }; }; then
2390 for ac_declaration in \
2391 ''\
2392 '#include <stdlib.h>' \
2393 'extern "C" void std::exit (int) throw (); using std::exit;' \
2394 'extern "C" void std::exit (int); using std::exit;' \
2395 'extern "C" void exit (int) throw ();' \
2396 'extern "C" void exit (int);' \
2397 'void exit (int);'
2398do
2399 cat >conftest.$ac_ext <<_ACEOF
2400#line $LINENO "configure"
2401#include "confdefs.h"
2402#include <stdlib.h>
2403$ac_declaration
Barry Warsawfe33b792003-01-07 22:42:49 +00002404#ifdef F77_DUMMY_MAIN
2405# ifdef __cplusplus
2406 extern "C"
2407# endif
2408 int F77_DUMMY_MAIN() { return 1; }
2409#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002410int
2411main ()
2412{
2413exit (42);
2414 ;
2415 return 0;
2416}
2417_ACEOF
2418rm -f conftest.$ac_objext
2419if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2420 (eval $ac_compile) 2>&5
2421 ac_status=$?
2422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2423 (exit $ac_status); } &&
2424 { ac_try='test -s conftest.$ac_objext'
2425 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2426 (eval $ac_try) 2>&5
2427 ac_status=$?
2428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2429 (exit $ac_status); }; }; then
2430 :
2431else
2432 echo "$as_me: failed program was:" >&5
2433cat conftest.$ac_ext >&5
2434continue
2435fi
2436rm -f conftest.$ac_objext conftest.$ac_ext
2437 cat >conftest.$ac_ext <<_ACEOF
2438#line $LINENO "configure"
2439#include "confdefs.h"
2440$ac_declaration
Barry Warsawfe33b792003-01-07 22:42:49 +00002441#ifdef F77_DUMMY_MAIN
2442# ifdef __cplusplus
2443 extern "C"
2444# endif
2445 int F77_DUMMY_MAIN() { return 1; }
2446#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002447int
2448main ()
2449{
2450exit (42);
2451 ;
2452 return 0;
2453}
2454_ACEOF
2455rm -f conftest.$ac_objext
2456if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2457 (eval $ac_compile) 2>&5
2458 ac_status=$?
2459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2460 (exit $ac_status); } &&
2461 { ac_try='test -s conftest.$ac_objext'
2462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2463 (eval $ac_try) 2>&5
2464 ac_status=$?
2465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2466 (exit $ac_status); }; }; then
2467 break
2468else
2469 echo "$as_me: failed program was:" >&5
2470cat conftest.$ac_ext >&5
2471fi
2472rm -f conftest.$ac_objext conftest.$ac_ext
2473done
2474rm -f conftest*
2475if test -n "$ac_declaration"; then
2476 echo '#ifdef __cplusplus' >>confdefs.h
2477 echo $ac_declaration >>confdefs.h
2478 echo '#endif' >>confdefs.h
2479fi
2480
2481else
2482 echo "$as_me: failed program was:" >&5
2483cat conftest.$ac_ext >&5
2484fi
2485rm -f conftest.$ac_objext conftest.$ac_ext
2486ac_ext=c
2487ac_cpp='$CPP $CPPFLAGS'
2488ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2489ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2490ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002491
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002492
2493# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002494
2495ac_ext=c
2496ac_cpp='$CPP $CPPFLAGS'
2497ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2498ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2499ac_compiler_gnu=$ac_cv_c_compiler_gnu
2500echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2501echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002502# On Suns, sometimes $CPP names a directory.
2503if test -n "$CPP" && test -d "$CPP"; then
2504 CPP=
2505fi
2506if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002507 if test "${ac_cv_prog_CPP+set}" = set; then
2508 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002509else
Martin v. Löwis11437992002-04-12 09:54:03 +00002510 # Double quotes because CPP needs to be expanded
2511 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2512 do
2513 ac_preproc_ok=false
2514for ac_c_preproc_warn_flag in '' yes
2515do
2516 # Use a header file that comes with gcc, so configuring glibc
2517 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002518 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002519 # not just through cpp. "Syntax error" is here to catch this case.
2520 cat >conftest.$ac_ext <<_ACEOF
2521#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002522#include "confdefs.h"
2523#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002524 Syntax error
2525_ACEOF
2526if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2527 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2528 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002529 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 rm -f conftest.er1
2531 cat conftest.err >&5
2532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2533 (exit $ac_status); } >/dev/null; then
2534 if test -s conftest.err; then
2535 ac_cpp_err=$ac_c_preproc_warn_flag
2536 else
2537 ac_cpp_err=
2538 fi
2539else
2540 ac_cpp_err=yes
2541fi
2542if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002543 :
2544else
Martin v. Löwis11437992002-04-12 09:54:03 +00002545 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002546 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002547 # Broken: fails on valid input.
2548continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002549fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002550rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002551
Martin v. Löwis11437992002-04-12 09:54:03 +00002552 # OK, works on sane cases. Now check whether non-existent headers
2553 # can be detected and how.
2554 cat >conftest.$ac_ext <<_ACEOF
2555#line $LINENO "configure"
2556#include "confdefs.h"
2557#include <ac_nonexistent.h>
2558_ACEOF
2559if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2560 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2561 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002562 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002563 rm -f conftest.er1
2564 cat conftest.err >&5
2565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2566 (exit $ac_status); } >/dev/null; then
2567 if test -s conftest.err; then
2568 ac_cpp_err=$ac_c_preproc_warn_flag
2569 else
2570 ac_cpp_err=
2571 fi
2572else
2573 ac_cpp_err=yes
2574fi
2575if test -z "$ac_cpp_err"; then
2576 # Broken: success on invalid input.
2577continue
2578else
2579 echo "$as_me: failed program was:" >&5
2580 cat conftest.$ac_ext >&5
2581 # Passes both tests.
2582ac_preproc_ok=:
2583break
2584fi
2585rm -f conftest.err conftest.$ac_ext
2586
2587done
2588# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2589rm -f conftest.err conftest.$ac_ext
2590if $ac_preproc_ok; then
2591 break
2592fi
2593
2594 done
2595 ac_cv_prog_CPP=$CPP
2596
2597fi
2598 CPP=$ac_cv_prog_CPP
2599else
2600 ac_cv_prog_CPP=$CPP
2601fi
2602echo "$as_me:$LINENO: result: $CPP" >&5
2603echo "${ECHO_T}$CPP" >&6
2604ac_preproc_ok=false
2605for ac_c_preproc_warn_flag in '' yes
2606do
2607 # Use a header file that comes with gcc, so configuring glibc
2608 # with a fresh cross-compiler works.
2609 # On the NeXT, cc -E runs the code through the compiler's parser,
2610 # not just through cpp. "Syntax error" is here to catch this case.
2611 cat >conftest.$ac_ext <<_ACEOF
2612#line $LINENO "configure"
2613#include "confdefs.h"
2614#include <assert.h>
2615 Syntax error
2616_ACEOF
2617if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2618 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2619 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002620 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 rm -f conftest.er1
2622 cat conftest.err >&5
2623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2624 (exit $ac_status); } >/dev/null; then
2625 if test -s conftest.err; then
2626 ac_cpp_err=$ac_c_preproc_warn_flag
2627 else
2628 ac_cpp_err=
2629 fi
2630else
2631 ac_cpp_err=yes
2632fi
2633if test -z "$ac_cpp_err"; then
2634 :
2635else
2636 echo "$as_me: failed program was:" >&5
2637 cat conftest.$ac_ext >&5
2638 # Broken: fails on valid input.
2639continue
2640fi
2641rm -f conftest.err conftest.$ac_ext
2642
2643 # OK, works on sane cases. Now check whether non-existent headers
2644 # can be detected and how.
2645 cat >conftest.$ac_ext <<_ACEOF
2646#line $LINENO "configure"
2647#include "confdefs.h"
2648#include <ac_nonexistent.h>
2649_ACEOF
2650if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2651 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2652 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002653 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002654 rm -f conftest.er1
2655 cat conftest.err >&5
2656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2657 (exit $ac_status); } >/dev/null; then
2658 if test -s conftest.err; then
2659 ac_cpp_err=$ac_c_preproc_warn_flag
2660 else
2661 ac_cpp_err=
2662 fi
2663else
2664 ac_cpp_err=yes
2665fi
2666if test -z "$ac_cpp_err"; then
2667 # Broken: success on invalid input.
2668continue
2669else
2670 echo "$as_me: failed program was:" >&5
2671 cat conftest.$ac_ext >&5
2672 # Passes both tests.
2673ac_preproc_ok=:
2674break
2675fi
2676rm -f conftest.err conftest.$ac_ext
2677
2678done
2679# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2680rm -f conftest.err conftest.$ac_ext
2681if $ac_preproc_ok; then
2682 :
2683else
2684 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2685echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2686 { (exit 1); exit 1; }; }
2687fi
2688
2689ac_ext=c
2690ac_cpp='$CPP $CPPFLAGS'
2691ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2692ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2693ac_compiler_gnu=$ac_cv_c_compiler_gnu
2694
2695
2696
2697echo "$as_me:$LINENO: checking for AIX" >&5
2698echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2699cat >conftest.$ac_ext <<_ACEOF
2700#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002701#include "confdefs.h"
2702#ifdef _AIX
2703 yes
2704#endif
2705
Martin v. Löwis11437992002-04-12 09:54:03 +00002706_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002707if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00002708 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002709 echo "$as_me:$LINENO: result: yes" >&5
2710echo "${ECHO_T}yes" >&6
2711cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002712#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002713_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002714
2715else
Martin v. Löwis11437992002-04-12 09:54:03 +00002716 echo "$as_me:$LINENO: result: no" >&5
2717echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002718fi
2719rm -f conftest*
2720
Michael W. Hudson54241132001-12-07 15:38:26 +00002721
Martin v. Löwis11437992002-04-12 09:54:03 +00002722echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2723echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2724if test "${ac_cv_header_stdc+set}" = set; then
2725 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002726else
Martin v. Löwis11437992002-04-12 09:54:03 +00002727 cat >conftest.$ac_ext <<_ACEOF
2728#line $LINENO "configure"
2729#include "confdefs.h"
2730#include <stdlib.h>
2731#include <stdarg.h>
2732#include <string.h>
2733#include <float.h>
2734
2735_ACEOF
2736if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2737 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2738 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002739 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002740 rm -f conftest.er1
2741 cat conftest.err >&5
2742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2743 (exit $ac_status); } >/dev/null; then
2744 if test -s conftest.err; then
2745 ac_cpp_err=$ac_c_preproc_warn_flag
2746 else
2747 ac_cpp_err=
2748 fi
2749else
2750 ac_cpp_err=yes
2751fi
2752if test -z "$ac_cpp_err"; then
2753 ac_cv_header_stdc=yes
2754else
2755 echo "$as_me: failed program was:" >&5
2756 cat conftest.$ac_ext >&5
2757 ac_cv_header_stdc=no
2758fi
2759rm -f conftest.err conftest.$ac_ext
2760
2761if test $ac_cv_header_stdc = yes; then
2762 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2763 cat >conftest.$ac_ext <<_ACEOF
2764#line $LINENO "configure"
2765#include "confdefs.h"
2766#include <string.h>
2767
2768_ACEOF
2769if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00002770 egrep "memchr" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002771 :
2772else
2773 ac_cv_header_stdc=no
2774fi
2775rm -f conftest*
2776
2777fi
2778
2779if test $ac_cv_header_stdc = yes; then
2780 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2781 cat >conftest.$ac_ext <<_ACEOF
2782#line $LINENO "configure"
2783#include "confdefs.h"
2784#include <stdlib.h>
2785
2786_ACEOF
2787if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00002788 egrep "free" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002789 :
2790else
2791 ac_cv_header_stdc=no
2792fi
2793rm -f conftest*
2794
2795fi
2796
2797if test $ac_cv_header_stdc = yes; then
2798 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2799 if test "$cross_compiling" = yes; then
2800 :
2801else
2802 cat >conftest.$ac_ext <<_ACEOF
2803#line $LINENO "configure"
2804#include "confdefs.h"
2805#include <ctype.h>
2806#if ((' ' & 0x0FF) == 0x020)
2807# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2808# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2809#else
2810# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2811 || ('j' <= (c) && (c) <= 'r') \
2812 || ('s' <= (c) && (c) <= 'z'))
2813# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2814#endif
2815
2816#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2817int
2818main ()
2819{
2820 int i;
2821 for (i = 0; i < 256; i++)
2822 if (XOR (islower (i), ISLOWER (i))
2823 || toupper (i) != TOUPPER (i))
2824 exit(2);
2825 exit (0);
2826}
2827_ACEOF
2828rm -f conftest$ac_exeext
2829if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2830 (eval $ac_link) 2>&5
2831 ac_status=$?
2832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2833 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2835 (eval $ac_try) 2>&5
2836 ac_status=$?
2837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2838 (exit $ac_status); }; }; then
2839 :
2840else
2841 echo "$as_me: program exited with status $ac_status" >&5
2842echo "$as_me: failed program was:" >&5
2843cat conftest.$ac_ext >&5
2844( exit $ac_status )
2845ac_cv_header_stdc=no
2846fi
Barry Warsawfe33b792003-01-07 22:42:49 +00002847rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002848fi
2849fi
2850fi
2851echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2852echo "${ECHO_T}$ac_cv_header_stdc" >&6
2853if test $ac_cv_header_stdc = yes; then
2854
2855cat >>confdefs.h <<\_ACEOF
2856#define STDC_HEADERS 1
2857_ACEOF
2858
2859fi
2860
2861# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2872 inttypes.h stdint.h unistd.h
2873do
2874as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2875echo "$as_me:$LINENO: checking for $ac_header" >&5
2876echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2877if eval "test \"\${$as_ac_Header+set}\" = set"; then
2878 echo $ECHO_N "(cached) $ECHO_C" >&6
2879else
2880 cat >conftest.$ac_ext <<_ACEOF
2881#line $LINENO "configure"
2882#include "confdefs.h"
2883$ac_includes_default
2884
2885#include <$ac_header>
2886_ACEOF
2887rm -f conftest.$ac_objext
2888if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2889 (eval $ac_compile) 2>&5
2890 ac_status=$?
2891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2892 (exit $ac_status); } &&
2893 { ac_try='test -s conftest.$ac_objext'
2894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2895 (eval $ac_try) 2>&5
2896 ac_status=$?
2897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2898 (exit $ac_status); }; }; then
2899 eval "$as_ac_Header=yes"
2900else
2901 echo "$as_me: failed program was:" >&5
2902cat conftest.$ac_ext >&5
2903eval "$as_ac_Header=no"
2904fi
2905rm -f conftest.$ac_objext conftest.$ac_ext
2906fi
2907echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2908echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2909if test `eval echo '${'$as_ac_Header'}'` = yes; then
2910 cat >>confdefs.h <<_ACEOF
2911#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2912_ACEOF
2913
2914fi
2915
2916done
2917
2918
2919if test "${ac_cv_header_minix_config_h+set}" = set; then
2920 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2921echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2922if test "${ac_cv_header_minix_config_h+set}" = set; then
2923 echo $ECHO_N "(cached) $ECHO_C" >&6
2924fi
2925echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2926echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2927else
2928 # Is the header compilable?
2929echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2930echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2931cat >conftest.$ac_ext <<_ACEOF
2932#line $LINENO "configure"
2933#include "confdefs.h"
2934$ac_includes_default
2935#include <minix/config.h>
2936_ACEOF
2937rm -f conftest.$ac_objext
2938if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2939 (eval $ac_compile) 2>&5
2940 ac_status=$?
2941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2942 (exit $ac_status); } &&
2943 { ac_try='test -s conftest.$ac_objext'
2944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2945 (eval $ac_try) 2>&5
2946 ac_status=$?
2947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2948 (exit $ac_status); }; }; then
2949 ac_header_compiler=yes
2950else
2951 echo "$as_me: failed program was:" >&5
2952cat conftest.$ac_ext >&5
2953ac_header_compiler=no
2954fi
2955rm -f conftest.$ac_objext conftest.$ac_ext
2956echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2957echo "${ECHO_T}$ac_header_compiler" >&6
2958
2959# Is the header present?
2960echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2961echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2962cat >conftest.$ac_ext <<_ACEOF
2963#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002964#include "confdefs.h"
2965#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002966_ACEOF
2967if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2968 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2969 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002970 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002971 rm -f conftest.er1
2972 cat conftest.err >&5
2973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2974 (exit $ac_status); } >/dev/null; then
2975 if test -s conftest.err; then
2976 ac_cpp_err=$ac_c_preproc_warn_flag
2977 else
2978 ac_cpp_err=
2979 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002980else
Martin v. Löwis11437992002-04-12 09:54:03 +00002981 ac_cpp_err=yes
2982fi
2983if test -z "$ac_cpp_err"; then
2984 ac_header_preproc=yes
2985else
2986 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002987 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002988 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002989fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002990rm -f conftest.err conftest.$ac_ext
2991echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
2992echo "${ECHO_T}$ac_header_preproc" >&6
2993
2994# So? What about this header?
2995case $ac_header_compiler:$ac_header_preproc in
2996 yes:no )
2997 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
2998echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
2999 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
3000echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
3001 no:yes )
3002 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
3003echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
3004 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
3005echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
3006 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
3007echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
3008esac
3009echo "$as_me:$LINENO: checking for minix/config.h" >&5
3010echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3011if test "${ac_cv_header_minix_config_h+set}" = set; then
3012 echo $ECHO_N "(cached) $ECHO_C" >&6
3013else
3014 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003015fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003016echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3017echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3018
3019fi
3020if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003021 MINIX=yes
3022else
Martin v. Löwis11437992002-04-12 09:54:03 +00003023 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003024fi
3025
Martin v. Löwis11437992002-04-12 09:54:03 +00003026
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003027if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003028
3029cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003030#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003031_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003032
Martin v. Löwis11437992002-04-12 09:54:03 +00003033
3034cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003035#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00003036_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003037
Martin v. Löwis11437992002-04-12 09:54:03 +00003038
3039cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003040#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003041_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003042
3043fi
3044
3045
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003046# Check for unsupported systems
3047case $ac_sys_system/$ac_sys_release in
3048SunOS/4*|DYNIX/*|dgux*/*|IRIX/4*|Linux*/1*)
3049 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3050 echo See README for details.
3051 exit 1;;
3052esac
3053
3054if test "$MINIX" = yes; then
3055 echo This system \(MINIX\) is no longer supported.
3056 echo Read README for details.
3057 exit 1
3058fi
3059
Michael W. Hudson54241132001-12-07 15:38:26 +00003060
Martin v. Löwis11437992002-04-12 09:54:03 +00003061echo "$as_me:$LINENO: checking for --with-suffix" >&5
3062echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003063
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003064# Check whether --with-suffix or --without-suffix was given.
3065if test "${with_suffix+set}" = set; then
3066 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003067
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003068 case $withval in
3069 no) EXEEXT=;;
3070 yes) EXEEXT=.exe;;
3071 *) EXEEXT=$withval;;
3072 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003073fi;
3074echo "$as_me:$LINENO: result: $EXEEXT" >&5
3075echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003076
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003077# Test whether we're running on a non-case-sensitive system, in which
3078# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003079
Martin v. Löwis11437992002-04-12 09:54:03 +00003080echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3081echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003082if test ! -d CaseSensitiveTestDir; then
3083mkdir CaseSensitiveTestDir
3084fi
3085
3086if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003087then
Martin v. Löwis11437992002-04-12 09:54:03 +00003088 echo "$as_me:$LINENO: result: yes" >&5
3089echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003090 BUILDEXEEXT=.exe
3091else
Martin v. Löwis11437992002-04-12 09:54:03 +00003092 echo "$as_me:$LINENO: result: no" >&5
3093echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003094 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003095fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003096rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003097
Guido van Rossumdd997f71998-10-07 19:58:26 +00003098case $MACHDEP in
3099bsdos*)
3100 case $CC in
3101 gcc) CC="$CC -D_HAVE_BSDI";;
3102 esac;;
3103esac
3104
Guido van Rossum24b1e751997-08-21 02:29:16 +00003105case $ac_sys_system in
3106hp*|HP*)
3107 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003108 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003109 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003110Monterey*)
3111 case $CC in
3112 cc) CC="$CC -Wl,-Bexport";;
3113 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003114SunOS*)
3115 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003116
3117cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003118#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003119_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003120
3121 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003122esac
3123
Michael W. Hudson54241132001-12-07 15:38:26 +00003124
3125
Martin v. Löwis11437992002-04-12 09:54:03 +00003126echo "$as_me:$LINENO: checking LIBRARY" >&5
3127echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003128if test -z "$LIBRARY"
3129then
3130 LIBRARY='libpython$(VERSION).a'
3131fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003132echo "$as_me:$LINENO: result: $LIBRARY" >&5
3133echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003134
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003135# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003136# name of the library into which to insert object files). BLDLIBRARY is also
3137# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3138# is blank as the main program is not linked directly against LDLIBRARY.
3139# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3140# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3141# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3142# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003143#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003144# RUNSHARED is used to run shared python without installed libraries
3145#
3146# INSTSONAME is the name of the shared library that will be use to install
3147# on the system - some systems like version suffix, others don't
3148
3149
Michael W. Hudson54241132001-12-07 15:38:26 +00003150
3151
3152
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003153
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003154LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003155BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003156INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003157DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003158LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003159RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003160
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003161# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003162# If CXX is set, and if it is needed to link a main function that was
3163# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3164# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003165# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003166# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003167
Martin v. Löwis11437992002-04-12 09:54:03 +00003168echo "$as_me:$LINENO: checking LINKCC" >&5
3169echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003170if test -z "$LINKCC"
3171then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003172 if test -z "$CXX"; then
3173 LINKCC="\$(PURIFY) \$(CC)"
3174 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003175 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003176 $CXX -c conftest.$ac_ext 2>&5
3177 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3178 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3179 then
3180 LINKCC="\$(PURIFY) \$(CC)"
3181 else
3182 LINKCC="\$(PURIFY) \$(CXX)"
3183 fi
3184 rm -fr conftest*
3185 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003186 case $ac_sys_system in
3187 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003188 exp_extra="\"\""
3189 if test $ac_sys_release -ge 5 -o \
3190 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3191 exp_extra="."
3192 fi
3193 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003194 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003195 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003196 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003197 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003198 esac
3199fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003200echo "$as_me:$LINENO: result: $LINKCC" >&5
3201echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003202
Martin v. Löwis11437992002-04-12 09:54:03 +00003203echo "$as_me:$LINENO: checking for --enable-shared" >&5
3204echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003205# Check whether --enable-shared or --disable-shared was given.
3206if test "${enable_shared+set}" = set; then
3207 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003208
Martin v. Löwis11437992002-04-12 09:54:03 +00003209fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003210
3211if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003212then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003213 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003214 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003215 enable_shared="yes";;
3216 *)
3217 enable_shared="no";;
3218 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003219fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003220echo "$as_me:$LINENO: result: $enable_shared" >&5
3221echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003222
3223
Martin v. Löwis11437992002-04-12 09:54:03 +00003224echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3225echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003226
Guido van Rossumb8552162001-09-05 14:58:11 +00003227# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3228# library that we build, but we do not want to link against it (we
3229# will find it with a -framework option). For this reason there is an
3230# extra variable BLDLIBRARY against which Python and the extension
3231# modules are linked, BLDLIBRARY. This is normally the same as
3232# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003233if test "$enable_framework"
3234then
3235 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3236 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3237 BLDLIBRARY=''
3238else
3239 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003240fi
Jack Jansene578a632001-08-15 01:27:14 +00003241
Martin v. Löwis1142de32002-03-29 16:28:31 +00003242# Other platforms follow
3243if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003244
3245cat >>confdefs.h <<\_ACEOF
3246#define Py_ENABLE_SHARED 1
3247_ACEOF
3248
Martin v. Löwis1142de32002-03-29 16:28:31 +00003249 case $ac_sys_system in
3250 BeOS*)
3251 LDLIBRARY='libpython$(VERSION).so'
3252 ;;
3253 CYGWIN*)
3254 LDLIBRARY='libpython$(VERSION).dll.a'
3255 DLLLIBRARY='libpython$(VERSION).dll'
3256 ;;
3257 SunOS*)
3258 LDLIBRARY='libpython$(VERSION).so'
3259 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3260 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3261 ;;
Martin v. Löwis1bc894b2002-07-30 20:19:58 +00003262 Linux*|GNU*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003263 LDLIBRARY='libpython$(VERSION).so'
3264 BLDLIBRARY='-L. -lpython$(VERSION)'
3265 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3266 INSTSONAME="$LDLIBRARY".$SOVERSION
3267 ;;
3268 hp*|HP*)
3269 LDLIBRARY='libpython$(VERSION).sl'
3270 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3271 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3272 ;;
3273 OSF*)
3274 LDLIBRARY='libpython$(VERSION).so'
3275 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3276 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3277 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003278 atheos*)
3279 LDLIBRARY='libpython$(VERSION).so'
3280 BLDLIBRARY='-L. -lpython$(VERSION)'
3281 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3282 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003283 esac
3284 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3285 case $MACHDEP in
3286 dguxR4)
3287 LDLIBRARY='libpython$(VERSION).so'
Skip Montanarodecc6a42003-01-01 20:07:49 +00003288 BASECFLAGS="$BASECFLAGS -pic"
Martin v. Löwis1142de32002-03-29 16:28:31 +00003289 ;;
3290 esac
3291fi
3292
Martin v. Löwis11437992002-04-12 09:54:03 +00003293echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3294echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003295
Martin v. Löwis11437992002-04-12 09:54:03 +00003296if test -n "$ac_tool_prefix"; then
3297 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3298set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3299echo "$as_me:$LINENO: checking for $ac_word" >&5
3300echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3301if test "${ac_cv_prog_RANLIB+set}" = set; then
3302 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003303else
3304 if test -n "$RANLIB"; then
3305 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3306else
Martin v. Löwis11437992002-04-12 09:54:03 +00003307as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3308for as_dir in $PATH
3309do
3310 IFS=$as_save_IFS
3311 test -z "$as_dir" && as_dir=.
3312 for ac_exec_ext in '' $ac_executable_extensions; do
3313 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3314 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3315 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3316 break 2
3317 fi
3318done
3319done
3320
Guido van Rossum627b2d71993-12-24 10:39:16 +00003321fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003322fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003323RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003324if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003325 echo "$as_me:$LINENO: result: $RANLIB" >&5
3326echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003327else
Martin v. Löwis11437992002-04-12 09:54:03 +00003328 echo "$as_me:$LINENO: result: no" >&5
3329echo "${ECHO_T}no" >&6
3330fi
3331
3332fi
3333if test -z "$ac_cv_prog_RANLIB"; then
3334 ac_ct_RANLIB=$RANLIB
3335 # Extract the first word of "ranlib", so it can be a program name with args.
3336set dummy ranlib; ac_word=$2
3337echo "$as_me:$LINENO: checking for $ac_word" >&5
3338echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3339if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3340 echo $ECHO_N "(cached) $ECHO_C" >&6
3341else
3342 if test -n "$ac_ct_RANLIB"; then
3343 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3344else
3345as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3346for as_dir in $PATH
3347do
3348 IFS=$as_save_IFS
3349 test -z "$as_dir" && as_dir=.
3350 for ac_exec_ext in '' $ac_executable_extensions; do
3351 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3352 ac_cv_prog_ac_ct_RANLIB="ranlib"
3353 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3354 break 2
3355 fi
3356done
3357done
3358
3359 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3360fi
3361fi
3362ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3363if test -n "$ac_ct_RANLIB"; then
3364 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3365echo "${ECHO_T}$ac_ct_RANLIB" >&6
3366else
3367 echo "$as_me:$LINENO: result: no" >&5
3368echo "${ECHO_T}no" >&6
3369fi
3370
3371 RANLIB=$ac_ct_RANLIB
3372else
3373 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003374fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003375
3376
Guido van Rossum7f43da71994-08-01 12:15:30 +00003377for ac_prog in ar aal
3378do
Martin v. Löwis11437992002-04-12 09:54:03 +00003379 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003380set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003381echo "$as_me:$LINENO: checking for $ac_word" >&5
3382echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3383if test "${ac_cv_prog_AR+set}" = set; then
3384 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003385else
3386 if test -n "$AR"; then
3387 ac_cv_prog_AR="$AR" # Let the user override the test.
3388else
Martin v. Löwis11437992002-04-12 09:54:03 +00003389as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3390for as_dir in $PATH
3391do
3392 IFS=$as_save_IFS
3393 test -z "$as_dir" && as_dir=.
3394 for ac_exec_ext in '' $ac_executable_extensions; do
3395 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3396 ac_cv_prog_AR="$ac_prog"
3397 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3398 break 2
3399 fi
3400done
3401done
3402
Guido van Rossum7f43da71994-08-01 12:15:30 +00003403fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003404fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003405AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003406if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003407 echo "$as_me:$LINENO: result: $AR" >&5
3408echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003409else
Martin v. Löwis11437992002-04-12 09:54:03 +00003410 echo "$as_me:$LINENO: result: no" >&5
3411echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003412fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003413
Martin v. Löwis11437992002-04-12 09:54:03 +00003414 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003415done
3416test -n "$AR" || AR="ar"
3417
Michael W. Hudson54241132001-12-07 15:38:26 +00003418
Neil Schemenauera42c8272001-03-31 00:01:55 +00003419case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003420bsdos*|hp*|HP*)
3421 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003422 if test -z "$INSTALL"
3423 then
3424 INSTALL="${srcdir}/install-sh -c"
3425 fi
3426esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003427ac_aux_dir=
3428for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3429 if test -f $ac_dir/install-sh; then
3430 ac_aux_dir=$ac_dir
3431 ac_install_sh="$ac_aux_dir/install-sh -c"
3432 break
3433 elif test -f $ac_dir/install.sh; then
3434 ac_aux_dir=$ac_dir
3435 ac_install_sh="$ac_aux_dir/install.sh -c"
3436 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003437 elif test -f $ac_dir/shtool; then
3438 ac_aux_dir=$ac_dir
3439 ac_install_sh="$ac_aux_dir/shtool install -c"
3440 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003441 fi
3442done
3443if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003444 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3445echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3446 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003447fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003448ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3449ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3450ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003451
3452# Find a good install program. We prefer a C program (faster),
3453# so one script is as good as another. But avoid the broken or
3454# incompatible versions:
3455# SysV /etc/install, /usr/sbin/install
3456# SunOS /usr/etc/install
3457# IRIX /sbin/install
3458# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003459# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003460# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3461# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3462# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3463# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003464echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3465echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003466if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003467if test "${ac_cv_path_install+set}" = set; then
3468 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003469else
Martin v. Löwis11437992002-04-12 09:54:03 +00003470 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3471for as_dir in $PATH
3472do
3473 IFS=$as_save_IFS
3474 test -z "$as_dir" && as_dir=.
3475 # Account for people who put trailing slashes in PATH elements.
3476case $as_dir/ in
3477 ./ | .// | /cC/* | \
3478 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3479 /usr/ucb/* ) ;;
3480 *)
3481 # OSF1 and SCO ODT 3.0 have their own names for install.
3482 # Don't use installbsd from OSF since it installs stuff as root
3483 # by default.
3484 for ac_prog in ginstall scoinst install; do
3485 for ac_exec_ext in '' $ac_executable_extensions; do
3486 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3487 if test $ac_prog = install &&
3488 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3489 # AIX install. It has an incompatible calling convention.
3490 :
3491 elif test $ac_prog = install &&
3492 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3493 # program-specific install script used by HP pwplus--don't use.
3494 :
3495 else
3496 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3497 break 3
3498 fi
3499 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003500 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003501 done
3502 ;;
3503esac
3504done
3505
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003506
3507fi
3508 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003509 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003510 else
3511 # As a last resort, use the slow shell script. We don't cache a
3512 # path for INSTALL within a source directory, because that will
3513 # break other packages using the cache if that directory is
3514 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003515 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003516 fi
3517fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003518echo "$as_me:$LINENO: result: $INSTALL" >&5
3519echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003520
3521# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3522# It thinks the first close brace ends the variable substitution.
3523test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3524
Martin v. Löwis11437992002-04-12 09:54:03 +00003525test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003526
3527test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3528
Michael W. Hudson54241132001-12-07 15:38:26 +00003529
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003530# Not every filesystem supports hard links
3531
3532if test -z "$LN" ; then
3533 case $ac_sys_system in
3534 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003535 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003536 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003537 *) LN=ln;;
3538 esac
3539fi
3540
Fred Drake109d9862001-07-11 06:27:56 +00003541# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003542echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3543echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3544
Fred Drake109d9862001-07-11 06:27:56 +00003545# Check whether --with-pydebug or --without-pydebug was given.
3546if test "${with_pydebug+set}" = set; then
3547 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003548
Fred Drake109d9862001-07-11 06:27:56 +00003549if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003550then
3551
3552cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003553#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003554_ACEOF
3555
3556 echo "$as_me:$LINENO: result: yes" >&5
3557echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003558 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003559else echo "$as_me:$LINENO: result: no" >&5
3560echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003561fi
3562else
Martin v. Löwis11437992002-04-12 09:54:03 +00003563 echo "$as_me:$LINENO: result: no" >&5
3564echo "${ECHO_T}no" >&6
3565fi;
Fred Drake109d9862001-07-11 06:27:56 +00003566
Skip Montanarodecc6a42003-01-01 20:07:49 +00003567# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3568# merged with this chunk of code?
3569
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003570# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003571# ------------------------
3572# (The following bit of code is complicated enough - please keep things
3573# indented properly. Just pretend you're editing Python code. ;-)
3574
3575# There are two parallel sets of case statements below, one that checks to
3576# see if OPT was set and one that does BASECFLAGS setting based upon
3577# compiler and platform. BASECFLAGS tweaks need to be made even if the
3578# user set OPT.
3579
3580# tweak OPT based on compiler and platform, only if the user didn't set
3581# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003582
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003583if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003584then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003585 case $GCC in
3586 yes)
3587 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003588 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003589 if test "$Py_DEBUG" = 'true' ; then
3590 # Optimization messes up debuggers, so turn it off for
3591 # debug builds.
3592 OPT="-g -Wall -Wstrict-prototypes"
3593 else
3594 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003595 fi
3596 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003597 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003598 OPT="-O3 -Wall -Wstrict-prototypes"
3599 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003600 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003601 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003602 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3603 ;;
3604 esac
Fred Drake109d9862001-07-11 06:27:56 +00003605 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003606
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003607 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003608 OPT="-O"
3609 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003610 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003611
3612 # The current (beta) Monterey compiler dies with optimizations
3613 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003614 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003615 Monterey*)
3616 OPT=""
3617 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003618 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003619
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003620fi
3621
Skip Montanarodecc6a42003-01-01 20:07:49 +00003622
3623# tweak BASECFLAGS based on compiler and platform
3624case $GCC in
3625yes)
3626 case $ac_sys_system in
3627 SCO_SV*)
3628 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3629 ;;
3630 # is there any other compiler on Darwin besides gcc?
3631 Darwin*)
3632 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp"
3633 ;;
3634 esac
3635 ;;
3636
3637*)
3638 case $ac_sys_system in
3639 OpenUNIX*|UnixWare*)
3640 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3641 ;;
3642 SCO_SV*)
3643 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3644 ;;
3645 esac
3646 ;;
3647esac
3648
Fred Drakee1ceaa02001-12-04 20:55:47 +00003649if test "$Py_DEBUG" = 'true'; then
3650 :
3651else
3652 OPT="-DNDEBUG $OPT"
3653fi
3654
Guido van Rossum563e7081996-09-10 18:20:48 +00003655if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003656then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003657 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003658fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003659
Martin v. Löwis11437992002-04-12 09:54:03 +00003660echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3661echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3662if test "${ac_cv_opt_olimit_ok+set}" = set; then
3663 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003664else
3665 ac_save_cc="$CC"
3666CC="$CC -OPT:Olimit=0"
3667if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003668 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003669else
Martin v. Löwis11437992002-04-12 09:54:03 +00003670 cat >conftest.$ac_ext <<_ACEOF
3671#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003672#include "confdefs.h"
3673int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003674_ACEOF
3675rm -f conftest$ac_exeext
3676if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3677 (eval $ac_link) 2>&5
3678 ac_status=$?
3679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3680 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3682 (eval $ac_try) 2>&5
3683 ac_status=$?
3684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3685 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003686 ac_cv_opt_olimit_ok=yes
3687else
Martin v. Löwis11437992002-04-12 09:54:03 +00003688 echo "$as_me: program exited with status $ac_status" >&5
3689echo "$as_me: failed program was:" >&5
3690cat conftest.$ac_ext >&5
3691( exit $ac_status )
3692ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003693fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003694rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003695fi
Guido van Rossum91922671997-10-09 20:24:13 +00003696CC="$ac_save_cc"
3697fi
3698
Martin v. Löwis11437992002-04-12 09:54:03 +00003699echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3700echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003701if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003702 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003703 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3704 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3705 # environment?
3706 Darwin*)
3707 ;;
3708 *)
3709 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3710 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003711 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003712else
Martin v. Löwis11437992002-04-12 09:54:03 +00003713 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3714echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3715 if test "${ac_cv_olimit_ok+set}" = set; then
3716 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003717else
3718 ac_save_cc="$CC"
3719 CC="$CC -Olimit 1500"
3720 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003721 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003722else
Martin v. Löwis11437992002-04-12 09:54:03 +00003723 cat >conftest.$ac_ext <<_ACEOF
3724#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003725#include "confdefs.h"
3726int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003727_ACEOF
3728rm -f conftest$ac_exeext
3729if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3730 (eval $ac_link) 2>&5
3731 ac_status=$?
3732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3733 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3735 (eval $ac_try) 2>&5
3736 ac_status=$?
3737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3738 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003739 ac_cv_olimit_ok=yes
3740else
Martin v. Löwis11437992002-04-12 09:54:03 +00003741 echo "$as_me: program exited with status $ac_status" >&5
3742echo "$as_me: failed program was:" >&5
3743cat conftest.$ac_ext >&5
3744( exit $ac_status )
3745ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003746fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003747rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003748fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003749 CC="$ac_save_cc"
3750fi
3751
Martin v. Löwis11437992002-04-12 09:54:03 +00003752 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3753echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003754 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003755 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003756 fi
3757fi
3758
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003759# On some compilers, pthreads are available without further options
3760# (e.g. MacOS X). On some of these systems, the compiler will not
3761# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3762# So we have to see first whether pthreads are available without
3763# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003764echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3765echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3766if test "${ac_cv_pthread_is_default+set}" = set; then
3767 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003768else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003769 if test "$cross_compiling" = yes; then
3770 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003771else
Martin v. Löwis11437992002-04-12 09:54:03 +00003772 cat >conftest.$ac_ext <<_ACEOF
3773#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003774#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003775
Martin v. Löwis130fb172001-07-19 11:00:41 +00003776#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003777
3778void* routine(void* p){return NULL;}
3779
3780int main(){
3781 pthread_t p;
3782 if(pthread_create(&p,NULL,routine,NULL)!=0)
3783 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003784 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003785 return 0;
3786}
3787
Martin v. Löwis11437992002-04-12 09:54:03 +00003788_ACEOF
3789rm -f conftest$ac_exeext
3790if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3791 (eval $ac_link) 2>&5
3792 ac_status=$?
3793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3794 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3795 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3796 (eval $ac_try) 2>&5
3797 ac_status=$?
3798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3799 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003800 ac_cv_pthread_is_default=yes
3801else
Martin v. Löwis11437992002-04-12 09:54:03 +00003802 echo "$as_me: program exited with status $ac_status" >&5
3803echo "$as_me: failed program was:" >&5
3804cat conftest.$ac_ext >&5
3805( exit $ac_status )
3806ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003807fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003808rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003809fi
3810
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003811fi
3812
Martin v. Löwis11437992002-04-12 09:54:03 +00003813echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3814echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003815
Michael W. Hudson54241132001-12-07 15:38:26 +00003816
Martin v. Löwis11437992002-04-12 09:54:03 +00003817if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003818then
3819 ac_cv_kpthread=no
3820else
3821# -Kpthread, if available, provides the right #defines
3822# and linker options to make pthread_create available
3823# Some compilers won't report that they do not support -Kpthread,
3824# so we need to run a program to see whether it really made the
3825# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003826echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3827echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3828if test "${ac_cv_kpthread+set}" = set; then
3829 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003830else
3831 ac_save_cc="$CC"
3832CC="$CC -Kpthread"
3833if test "$cross_compiling" = yes; then
3834 ac_cv_kpthread=no
3835else
Martin v. Löwis11437992002-04-12 09:54:03 +00003836 cat >conftest.$ac_ext <<_ACEOF
3837#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003838#include "confdefs.h"
3839
3840#include <pthread.h>
3841
3842void* routine(void* p){return NULL;}
3843
3844int main(){
3845 pthread_t p;
3846 if(pthread_create(&p,NULL,routine,NULL)!=0)
3847 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003848 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003849 return 0;
3850}
3851
Martin v. Löwis11437992002-04-12 09:54:03 +00003852_ACEOF
3853rm -f conftest$ac_exeext
3854if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3855 (eval $ac_link) 2>&5
3856 ac_status=$?
3857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3858 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3860 (eval $ac_try) 2>&5
3861 ac_status=$?
3862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3863 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003864 ac_cv_kpthread=yes
3865else
Martin v. Löwis11437992002-04-12 09:54:03 +00003866 echo "$as_me: program exited with status $ac_status" >&5
3867echo "$as_me: failed program was:" >&5
3868cat conftest.$ac_ext >&5
3869( exit $ac_status )
3870ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003871fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003872rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003873fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003874CC="$ac_save_cc"
3875fi
3876
Martin v. Löwis11437992002-04-12 09:54:03 +00003877echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3878echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003879fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003880
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003881if test $ac_cv_kpthread = no
3882then
3883# -Kthread, if available, provides the right #defines
3884# and linker options to make pthread_create available
3885# Some compilers won't report that they do not support -Kthread,
3886# so we need to run a program to see whether it really made the
3887# function available.
3888echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
3889echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
3890if test "${ac_cv_kthread+set}" = set; then
3891 echo $ECHO_N "(cached) $ECHO_C" >&6
3892else
3893 ac_save_cc="$CC"
3894CC="$CC -Kthread"
3895if test "$cross_compiling" = yes; then
3896 ac_cv_kthread=no
3897else
3898 cat >conftest.$ac_ext <<_ACEOF
3899#line $LINENO "configure"
3900#include "confdefs.h"
3901
3902#include <pthread.h>
3903
3904void* routine(void* p){return NULL;}
3905
3906int main(){
3907 pthread_t p;
3908 if(pthread_create(&p,NULL,routine,NULL)!=0)
3909 return 1;
3910 (void)pthread_detach(p);
3911 return 0;
3912}
3913
3914_ACEOF
3915rm -f conftest$ac_exeext
3916if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3917 (eval $ac_link) 2>&5
3918 ac_status=$?
3919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3920 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3921 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3922 (eval $ac_try) 2>&5
3923 ac_status=$?
3924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3925 (exit $ac_status); }; }; then
3926 ac_cv_kthread=yes
3927else
3928 echo "$as_me: program exited with status $ac_status" >&5
3929echo "$as_me: failed program was:" >&5
3930cat conftest.$ac_ext >&5
3931( exit $ac_status )
3932ac_cv_kthread=no
3933fi
3934rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3935fi
3936CC="$ac_save_cc"
3937fi
3938
3939echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
3940echo "${ECHO_T}$ac_cv_kthread" >&6
3941fi
3942
Michael W. Hudson54241132001-12-07 15:38:26 +00003943
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003944# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003945echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3946echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3947if test "${ac_cv_header_stdc+set}" = set; then
3948 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003949else
Martin v. Löwis11437992002-04-12 09:54:03 +00003950 cat >conftest.$ac_ext <<_ACEOF
3951#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003952#include "confdefs.h"
3953#include <stdlib.h>
3954#include <stdarg.h>
3955#include <string.h>
3956#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003957
3958_ACEOF
3959if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3960 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3961 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00003962 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003963 rm -f conftest.er1
3964 cat conftest.err >&5
3965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3966 (exit $ac_status); } >/dev/null; then
3967 if test -s conftest.err; then
3968 ac_cpp_err=$ac_c_preproc_warn_flag
3969 else
3970 ac_cpp_err=
3971 fi
3972else
3973 ac_cpp_err=yes
3974fi
3975if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003976 ac_cv_header_stdc=yes
3977else
Martin v. Löwis11437992002-04-12 09:54:03 +00003978 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003979 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003980 ac_cv_header_stdc=no
3981fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003982rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003983
3984if test $ac_cv_header_stdc = yes; then
3985 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003986 cat >conftest.$ac_ext <<_ACEOF
3987#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003988#include "confdefs.h"
3989#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003990
3991_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003992if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00003993 egrep "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003994 :
3995else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003996 ac_cv_header_stdc=no
3997fi
3998rm -f conftest*
3999
4000fi
4001
4002if test $ac_cv_header_stdc = yes; then
4003 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004004 cat >conftest.$ac_ext <<_ACEOF
4005#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004006#include "confdefs.h"
4007#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004008
4009_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004010if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00004011 egrep "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004012 :
4013else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004014 ac_cv_header_stdc=no
4015fi
4016rm -f conftest*
4017
4018fi
4019
4020if test $ac_cv_header_stdc = yes; then
4021 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004022 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004023 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004024else
Martin v. Löwis11437992002-04-12 09:54:03 +00004025 cat >conftest.$ac_ext <<_ACEOF
4026#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004027#include "confdefs.h"
4028#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004029#if ((' ' & 0x0FF) == 0x020)
4030# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4031# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4032#else
4033# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4034 || ('j' <= (c) && (c) <= 'r') \
4035 || ('s' <= (c) && (c) <= 'z'))
4036# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4037#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004038
Martin v. Löwis11437992002-04-12 09:54:03 +00004039#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4040int
4041main ()
4042{
4043 int i;
4044 for (i = 0; i < 256; i++)
4045 if (XOR (islower (i), ISLOWER (i))
4046 || toupper (i) != TOUPPER (i))
4047 exit(2);
4048 exit (0);
4049}
4050_ACEOF
4051rm -f conftest$ac_exeext
4052if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4053 (eval $ac_link) 2>&5
4054 ac_status=$?
4055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4056 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4057 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4058 (eval $ac_try) 2>&5
4059 ac_status=$?
4060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4061 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004062 :
4063else
Martin v. Löwis11437992002-04-12 09:54:03 +00004064 echo "$as_me: program exited with status $ac_status" >&5
4065echo "$as_me: failed program was:" >&5
4066cat conftest.$ac_ext >&5
4067( exit $ac_status )
4068ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004069fi
Barry Warsawfe33b792003-01-07 22:42:49 +00004070rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004071fi
4072fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004073fi
4074echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4075echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004076if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004077
4078cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004079#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004080_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004081
4082fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004083
Martin v. Löwis11437992002-04-12 09:54:03 +00004084
4085
4086
4087
4088
4089
4090
4091
4092
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
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004121
Barry Warsawfe33b792003-01-07 22:42:49 +00004122
Martin v. Löwis11437992002-04-12 09:54:03 +00004123for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004124libintl.h locale.h ncurses.h poll.h pthread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004125signal.h stdarg.h stddef.h stdlib.h stropts.h termios.h thread.h \
4126unistd.h utime.h \
Skip Montanaro57454e52002-06-14 20:30:31 +00004127sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004128sys/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 +00004129sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Barry Warsawfe33b792003-01-07 22:42:49 +00004130sys/resource.h netpacket/packet.h sysexits.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004131do
Martin v. Löwis11437992002-04-12 09:54:03 +00004132as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4133if eval "test \"\${$as_ac_Header+set}\" = set"; then
4134 echo "$as_me:$LINENO: checking for $ac_header" >&5
4135echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4136if eval "test \"\${$as_ac_Header+set}\" = set"; then
4137 echo $ECHO_N "(cached) $ECHO_C" >&6
4138fi
4139echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4140echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004141else
Martin v. Löwis11437992002-04-12 09:54:03 +00004142 # Is the header compilable?
4143echo "$as_me:$LINENO: checking $ac_header usability" >&5
4144echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4145cat >conftest.$ac_ext <<_ACEOF
4146#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004147#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004148$ac_includes_default
4149#include <$ac_header>
4150_ACEOF
4151rm -f conftest.$ac_objext
4152if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4153 (eval $ac_compile) 2>&5
4154 ac_status=$?
4155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4156 (exit $ac_status); } &&
4157 { ac_try='test -s conftest.$ac_objext'
4158 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4159 (eval $ac_try) 2>&5
4160 ac_status=$?
4161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4162 (exit $ac_status); }; }; then
4163 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004164else
Martin v. Löwis11437992002-04-12 09:54:03 +00004165 echo "$as_me: failed program was:" >&5
4166cat conftest.$ac_ext >&5
4167ac_header_compiler=no
4168fi
4169rm -f conftest.$ac_objext conftest.$ac_ext
4170echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4171echo "${ECHO_T}$ac_header_compiler" >&6
4172
4173# Is the header present?
4174echo "$as_me:$LINENO: checking $ac_header presence" >&5
4175echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4176cat >conftest.$ac_ext <<_ACEOF
4177#line $LINENO "configure"
4178#include "confdefs.h"
4179#include <$ac_header>
4180_ACEOF
4181if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4182 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4183 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004184 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004185 rm -f conftest.er1
4186 cat conftest.err >&5
4187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4188 (exit $ac_status); } >/dev/null; then
4189 if test -s conftest.err; then
4190 ac_cpp_err=$ac_c_preproc_warn_flag
4191 else
4192 ac_cpp_err=
4193 fi
4194else
4195 ac_cpp_err=yes
4196fi
4197if test -z "$ac_cpp_err"; then
4198 ac_header_preproc=yes
4199else
4200 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004201 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004202 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004203fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004204rm -f conftest.err conftest.$ac_ext
4205echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4206echo "${ECHO_T}$ac_header_preproc" >&6
4207
4208# So? What about this header?
4209case $ac_header_compiler:$ac_header_preproc in
4210 yes:no )
4211 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4212echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4213 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4214echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4215 no:yes )
4216 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4217echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4218 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4219echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4220 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4221echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4222esac
4223echo "$as_me:$LINENO: checking for $ac_header" >&5
4224echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4225if eval "test \"\${$as_ac_Header+set}\" = set"; then
4226 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004227else
Martin v. Löwis11437992002-04-12 09:54:03 +00004228 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004229fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004230echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4231echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4232
4233fi
4234if test `eval echo '${'$as_ac_Header'}'` = yes; then
4235 cat >>confdefs.h <<_ACEOF
4236#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4237_ACEOF
4238
4239fi
4240
Guido van Rossum627b2d71993-12-24 10:39:16 +00004241done
4242
Martin v. Löwis11437992002-04-12 09:54:03 +00004243
4244
4245
4246
4247
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004248ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004249for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4250 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4251echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4252echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4253if eval "test \"\${$as_ac_Header+set}\" = set"; then
4254 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004255else
Martin v. Löwis11437992002-04-12 09:54:03 +00004256 cat >conftest.$ac_ext <<_ACEOF
4257#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004258#include "confdefs.h"
4259#include <sys/types.h>
4260#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004261
Barry Warsawfe33b792003-01-07 22:42:49 +00004262#ifdef F77_DUMMY_MAIN
4263# ifdef __cplusplus
4264 extern "C"
4265# endif
4266 int F77_DUMMY_MAIN() { return 1; }
4267#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004268int
4269main ()
4270{
4271if ((DIR *) 0)
4272return 0;
4273 ;
4274 return 0;
4275}
4276_ACEOF
4277rm -f conftest.$ac_objext
4278if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4279 (eval $ac_compile) 2>&5
4280 ac_status=$?
4281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4282 (exit $ac_status); } &&
4283 { ac_try='test -s conftest.$ac_objext'
4284 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4285 (eval $ac_try) 2>&5
4286 ac_status=$?
4287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4288 (exit $ac_status); }; }; then
4289 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004290else
Martin v. Löwis11437992002-04-12 09:54:03 +00004291 echo "$as_me: failed program was:" >&5
4292cat conftest.$ac_ext >&5
4293eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004294fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004295rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004296fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004297echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4298echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4299if test `eval echo '${'$as_ac_Header'}'` = yes; then
4300 cat >>confdefs.h <<_ACEOF
4301#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4302_ACEOF
4303
4304ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004305fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004306
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004307done
4308# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4309if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004310 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4311echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4312if test "${ac_cv_search_opendir+set}" = set; then
4313 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004314else
Martin v. Löwis11437992002-04-12 09:54:03 +00004315 ac_func_search_save_LIBS=$LIBS
4316ac_cv_search_opendir=no
4317cat >conftest.$ac_ext <<_ACEOF
4318#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004319#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004320
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004321/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004322#ifdef __cplusplus
4323extern "C"
4324#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004325/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004326 builtin and then its argument prototype would still apply. */
4327char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004328#ifdef F77_DUMMY_MAIN
4329# ifdef __cplusplus
4330 extern "C"
4331# endif
4332 int F77_DUMMY_MAIN() { return 1; }
4333#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004334int
4335main ()
4336{
4337opendir ();
4338 ;
4339 return 0;
4340}
4341_ACEOF
4342rm -f conftest.$ac_objext conftest$ac_exeext
4343if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4344 (eval $ac_link) 2>&5
4345 ac_status=$?
4346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4347 (exit $ac_status); } &&
4348 { ac_try='test -s conftest$ac_exeext'
4349 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4350 (eval $ac_try) 2>&5
4351 ac_status=$?
4352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4353 (exit $ac_status); }; }; then
4354 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004355else
Martin v. Löwis11437992002-04-12 09:54:03 +00004356 echo "$as_me: failed program was:" >&5
4357cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004358fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004359rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4360if test "$ac_cv_search_opendir" = no; then
4361 for ac_lib in dir; do
4362 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4363 cat >conftest.$ac_ext <<_ACEOF
4364#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004365#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004366
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004367/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004368#ifdef __cplusplus
4369extern "C"
4370#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004371/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004372 builtin and then its argument prototype would still apply. */
4373char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004374#ifdef F77_DUMMY_MAIN
4375# ifdef __cplusplus
4376 extern "C"
4377# endif
4378 int F77_DUMMY_MAIN() { return 1; }
4379#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004380int
4381main ()
4382{
4383opendir ();
4384 ;
4385 return 0;
4386}
4387_ACEOF
4388rm -f conftest.$ac_objext conftest$ac_exeext
4389if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4390 (eval $ac_link) 2>&5
4391 ac_status=$?
4392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4393 (exit $ac_status); } &&
4394 { ac_try='test -s conftest$ac_exeext'
4395 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4396 (eval $ac_try) 2>&5
4397 ac_status=$?
4398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4399 (exit $ac_status); }; }; then
4400 ac_cv_search_opendir="-l$ac_lib"
4401break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004402else
Martin v. Löwis11437992002-04-12 09:54:03 +00004403 echo "$as_me: failed program was:" >&5
4404cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004405fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004406rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4407 done
4408fi
4409LIBS=$ac_func_search_save_LIBS
4410fi
4411echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4412echo "${ECHO_T}$ac_cv_search_opendir" >&6
4413if test "$ac_cv_search_opendir" != no; then
4414 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004415
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004416fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004417
Michael W. Hudson54241132001-12-07 15:38:26 +00004418else
Martin v. Löwis11437992002-04-12 09:54:03 +00004419 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4420echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4421if test "${ac_cv_search_opendir+set}" = set; then
4422 echo $ECHO_N "(cached) $ECHO_C" >&6
4423else
4424 ac_func_search_save_LIBS=$LIBS
4425ac_cv_search_opendir=no
4426cat >conftest.$ac_ext <<_ACEOF
4427#line $LINENO "configure"
4428#include "confdefs.h"
4429
4430/* Override any gcc2 internal prototype to avoid an error. */
4431#ifdef __cplusplus
4432extern "C"
4433#endif
4434/* We use char because int might match the return type of a gcc2
4435 builtin and then its argument prototype would still apply. */
4436char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004437#ifdef F77_DUMMY_MAIN
4438# ifdef __cplusplus
4439 extern "C"
4440# endif
4441 int F77_DUMMY_MAIN() { return 1; }
4442#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004443int
4444main ()
4445{
4446opendir ();
4447 ;
4448 return 0;
4449}
4450_ACEOF
4451rm -f conftest.$ac_objext conftest$ac_exeext
4452if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4453 (eval $ac_link) 2>&5
4454 ac_status=$?
4455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4456 (exit $ac_status); } &&
4457 { ac_try='test -s conftest$ac_exeext'
4458 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4459 (eval $ac_try) 2>&5
4460 ac_status=$?
4461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4462 (exit $ac_status); }; }; then
4463 ac_cv_search_opendir="none required"
4464else
4465 echo "$as_me: failed program was:" >&5
4466cat conftest.$ac_ext >&5
4467fi
4468rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4469if test "$ac_cv_search_opendir" = no; then
4470 for ac_lib in x; do
4471 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4472 cat >conftest.$ac_ext <<_ACEOF
4473#line $LINENO "configure"
4474#include "confdefs.h"
4475
4476/* Override any gcc2 internal prototype to avoid an error. */
4477#ifdef __cplusplus
4478extern "C"
4479#endif
4480/* We use char because int might match the return type of a gcc2
4481 builtin and then its argument prototype would still apply. */
4482char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004483#ifdef F77_DUMMY_MAIN
4484# ifdef __cplusplus
4485 extern "C"
4486# endif
4487 int F77_DUMMY_MAIN() { return 1; }
4488#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004489int
4490main ()
4491{
4492opendir ();
4493 ;
4494 return 0;
4495}
4496_ACEOF
4497rm -f conftest.$ac_objext conftest$ac_exeext
4498if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4499 (eval $ac_link) 2>&5
4500 ac_status=$?
4501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4502 (exit $ac_status); } &&
4503 { ac_try='test -s conftest$ac_exeext'
4504 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4505 (eval $ac_try) 2>&5
4506 ac_status=$?
4507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4508 (exit $ac_status); }; }; then
4509 ac_cv_search_opendir="-l$ac_lib"
4510break
4511else
4512 echo "$as_me: failed program was:" >&5
4513cat conftest.$ac_ext >&5
4514fi
4515rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4516 done
4517fi
4518LIBS=$ac_func_search_save_LIBS
4519fi
4520echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4521echo "${ECHO_T}$ac_cv_search_opendir" >&6
4522if test "$ac_cv_search_opendir" != no; then
4523 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4524
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004525fi
4526
4527fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004528
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004529echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4530echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4531if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4532 echo $ECHO_N "(cached) $ECHO_C" >&6
4533else
4534 cat >conftest.$ac_ext <<_ACEOF
4535#line $LINENO "configure"
4536#include "confdefs.h"
4537#include <sys/types.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00004538#ifdef F77_DUMMY_MAIN
4539# ifdef __cplusplus
4540 extern "C"
4541# endif
4542 int F77_DUMMY_MAIN() { return 1; }
4543#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004544int
4545main ()
4546{
4547return makedev(0, 0);
4548 ;
4549 return 0;
4550}
4551_ACEOF
4552rm -f conftest.$ac_objext conftest$ac_exeext
4553if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4554 (eval $ac_link) 2>&5
4555 ac_status=$?
4556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4557 (exit $ac_status); } &&
4558 { ac_try='test -s conftest$ac_exeext'
4559 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4560 (eval $ac_try) 2>&5
4561 ac_status=$?
4562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4563 (exit $ac_status); }; }; then
4564 ac_cv_header_sys_types_h_makedev=yes
4565else
4566 echo "$as_me: failed program was:" >&5
4567cat conftest.$ac_ext >&5
4568ac_cv_header_sys_types_h_makedev=no
4569fi
4570rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4571
4572fi
4573echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4574echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4575
4576if test $ac_cv_header_sys_types_h_makedev = no; then
4577if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4578 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4579echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4580if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4581 echo $ECHO_N "(cached) $ECHO_C" >&6
4582fi
4583echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4584echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4585else
4586 # Is the header compilable?
4587echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4588echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4589cat >conftest.$ac_ext <<_ACEOF
4590#line $LINENO "configure"
4591#include "confdefs.h"
4592$ac_includes_default
4593#include <sys/mkdev.h>
4594_ACEOF
4595rm -f conftest.$ac_objext
4596if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4597 (eval $ac_compile) 2>&5
4598 ac_status=$?
4599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4600 (exit $ac_status); } &&
4601 { ac_try='test -s conftest.$ac_objext'
4602 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4603 (eval $ac_try) 2>&5
4604 ac_status=$?
4605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4606 (exit $ac_status); }; }; then
4607 ac_header_compiler=yes
4608else
4609 echo "$as_me: failed program was:" >&5
4610cat conftest.$ac_ext >&5
4611ac_header_compiler=no
4612fi
4613rm -f conftest.$ac_objext conftest.$ac_ext
4614echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4615echo "${ECHO_T}$ac_header_compiler" >&6
4616
4617# Is the header present?
4618echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4619echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4620cat >conftest.$ac_ext <<_ACEOF
4621#line $LINENO "configure"
4622#include "confdefs.h"
4623#include <sys/mkdev.h>
4624_ACEOF
4625if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4626 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4627 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004628 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004629 rm -f conftest.er1
4630 cat conftest.err >&5
4631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4632 (exit $ac_status); } >/dev/null; then
4633 if test -s conftest.err; then
4634 ac_cpp_err=$ac_c_preproc_warn_flag
4635 else
4636 ac_cpp_err=
4637 fi
4638else
4639 ac_cpp_err=yes
4640fi
4641if test -z "$ac_cpp_err"; then
4642 ac_header_preproc=yes
4643else
4644 echo "$as_me: failed program was:" >&5
4645 cat conftest.$ac_ext >&5
4646 ac_header_preproc=no
4647fi
4648rm -f conftest.err conftest.$ac_ext
4649echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4650echo "${ECHO_T}$ac_header_preproc" >&6
4651
4652# So? What about this header?
4653case $ac_header_compiler:$ac_header_preproc in
4654 yes:no )
4655 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4656echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4657 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4658echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4659 no:yes )
4660 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4661echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4662 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4663echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4664 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4665echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4666esac
4667echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4668echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4669if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4670 echo $ECHO_N "(cached) $ECHO_C" >&6
4671else
4672 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4673fi
4674echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4675echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4676
4677fi
4678if test $ac_cv_header_sys_mkdev_h = yes; then
4679
4680cat >>confdefs.h <<\_ACEOF
4681#define MAJOR_IN_MKDEV 1
4682_ACEOF
4683
4684fi
4685
4686
4687
4688 if test $ac_cv_header_sys_mkdev_h = no; then
4689 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4690 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4691echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4692if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4693 echo $ECHO_N "(cached) $ECHO_C" >&6
4694fi
4695echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4696echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4697else
4698 # Is the header compilable?
4699echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4700echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4701cat >conftest.$ac_ext <<_ACEOF
4702#line $LINENO "configure"
4703#include "confdefs.h"
4704$ac_includes_default
4705#include <sys/sysmacros.h>
4706_ACEOF
4707rm -f conftest.$ac_objext
4708if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4709 (eval $ac_compile) 2>&5
4710 ac_status=$?
4711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4712 (exit $ac_status); } &&
4713 { ac_try='test -s conftest.$ac_objext'
4714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4715 (eval $ac_try) 2>&5
4716 ac_status=$?
4717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4718 (exit $ac_status); }; }; then
4719 ac_header_compiler=yes
4720else
4721 echo "$as_me: failed program was:" >&5
4722cat conftest.$ac_ext >&5
4723ac_header_compiler=no
4724fi
4725rm -f conftest.$ac_objext conftest.$ac_ext
4726echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4727echo "${ECHO_T}$ac_header_compiler" >&6
4728
4729# Is the header present?
4730echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
4731echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
4732cat >conftest.$ac_ext <<_ACEOF
4733#line $LINENO "configure"
4734#include "confdefs.h"
4735#include <sys/sysmacros.h>
4736_ACEOF
4737if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4738 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4739 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004740 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004741 rm -f conftest.er1
4742 cat conftest.err >&5
4743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4744 (exit $ac_status); } >/dev/null; then
4745 if test -s conftest.err; then
4746 ac_cpp_err=$ac_c_preproc_warn_flag
4747 else
4748 ac_cpp_err=
4749 fi
4750else
4751 ac_cpp_err=yes
4752fi
4753if test -z "$ac_cpp_err"; then
4754 ac_header_preproc=yes
4755else
4756 echo "$as_me: failed program was:" >&5
4757 cat conftest.$ac_ext >&5
4758 ac_header_preproc=no
4759fi
4760rm -f conftest.err conftest.$ac_ext
4761echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4762echo "${ECHO_T}$ac_header_preproc" >&6
4763
4764# So? What about this header?
4765case $ac_header_compiler:$ac_header_preproc in
4766 yes:no )
4767 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
4768echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4769 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4770echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4771 no:yes )
4772 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
4773echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
4774 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
4775echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
4776 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4777echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4778esac
4779echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4780echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4781if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4782 echo $ECHO_N "(cached) $ECHO_C" >&6
4783else
4784 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
4785fi
4786echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4787echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4788
4789fi
4790if test $ac_cv_header_sys_sysmacros_h = yes; then
4791
4792cat >>confdefs.h <<\_ACEOF
4793#define MAJOR_IN_SYSMACROS 1
4794_ACEOF
4795
4796fi
4797
4798
4799 fi
4800fi
4801
Michael W. Hudson54241132001-12-07 15:38:26 +00004802
Guido van Rossum627b2d71993-12-24 10:39:16 +00004803# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004804was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004805echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4806echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4807cat >conftest.$ac_ext <<_ACEOF
4808#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004809#include "confdefs.h"
4810#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004811
4812_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004813if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00004814 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004815 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004816else
Martin v. Löwis11437992002-04-12 09:54:03 +00004817
4818
4819cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004820#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004821_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004822
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004823
Guido van Rossum627b2d71993-12-24 10:39:16 +00004824fi
4825rm -f conftest*
4826
Martin v. Löwis11437992002-04-12 09:54:03 +00004827echo "$as_me:$LINENO: result: $was_it_defined" >&5
4828echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004829
Neal Norwitz11690112002-07-30 01:08:28 +00004830# Check whether using makedev requires defining _OSF_SOURCE
4831echo "$as_me:$LINENO: checking for makedev" >&5
4832echo $ECHO_N "checking for makedev... $ECHO_C" >&6
4833cat >conftest.$ac_ext <<_ACEOF
4834#line $LINENO "configure"
4835#include "confdefs.h"
Neal Norwitz6eb37f02003-02-23 23:28:15 +00004836#include <sys/types.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00004837#ifdef F77_DUMMY_MAIN
4838# ifdef __cplusplus
4839 extern "C"
4840# endif
4841 int F77_DUMMY_MAIN() { return 1; }
4842#endif
Neal Norwitz11690112002-07-30 01:08:28 +00004843int
4844main ()
4845{
4846 makedev(0, 0)
4847 ;
4848 return 0;
4849}
4850_ACEOF
4851rm -f conftest.$ac_objext conftest$ac_exeext
4852if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4853 (eval $ac_link) 2>&5
4854 ac_status=$?
4855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4856 (exit $ac_status); } &&
4857 { ac_try='test -s conftest$ac_exeext'
4858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4859 (eval $ac_try) 2>&5
4860 ac_status=$?
4861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4862 (exit $ac_status); }; }; then
4863 ac_cv_has_makedev=yes
4864else
4865 echo "$as_me: failed program was:" >&5
4866cat conftest.$ac_ext >&5
4867ac_cv_has_makedev=no
4868fi
4869rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4870if test "$ac_cv_has_makedev" = "no"; then
4871 # we didn't link, try if _OSF_SOURCE will allow us to link
4872 cat >conftest.$ac_ext <<_ACEOF
4873#line $LINENO "configure"
4874#include "confdefs.h"
4875
Neal Norwitz6eb37f02003-02-23 23:28:15 +00004876#define _OSF_SOURCE 1
4877#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00004878
Barry Warsawfe33b792003-01-07 22:42:49 +00004879#ifdef F77_DUMMY_MAIN
4880# ifdef __cplusplus
4881 extern "C"
4882# endif
4883 int F77_DUMMY_MAIN() { return 1; }
4884#endif
Neal Norwitz11690112002-07-30 01:08:28 +00004885int
4886main ()
4887{
4888 makedev(0, 0)
4889 ;
4890 return 0;
4891}
4892_ACEOF
4893rm -f conftest.$ac_objext conftest$ac_exeext
4894if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4895 (eval $ac_link) 2>&5
4896 ac_status=$?
4897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4898 (exit $ac_status); } &&
4899 { ac_try='test -s conftest$ac_exeext'
4900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4901 (eval $ac_try) 2>&5
4902 ac_status=$?
4903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4904 (exit $ac_status); }; }; then
4905 ac_cv_has_makedev=yes
4906else
4907 echo "$as_me: failed program was:" >&5
4908cat conftest.$ac_ext >&5
4909ac_cv_has_makedev=no
4910fi
4911rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4912 if test "$ac_cv_has_makedev" = "yes"; then
4913
4914cat >>confdefs.h <<\_ACEOF
4915#define _OSF_SOURCE 1
4916_ACEOF
4917
4918 fi
4919fi
4920echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
4921echo "${ECHO_T}$ac_cv_has_makedev" >&6
4922if test "$ac_cv_has_makedev" = "yes"; then
4923
4924cat >>confdefs.h <<\_ACEOF
4925#define HAVE_MAKEDEV 1
4926_ACEOF
4927
4928fi
4929
Martin v. Löwis399a6892002-10-04 10:22:02 +00004930# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
4931# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
4932# defined, but the compiler does not support pragma redefine_extname,
4933# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
4934# structures (such as rlimit64) without declaring them. As a
4935# work-around, disable LFS on such configurations
4936
4937use_lfs=yes
4938echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
4939echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
4940cat >conftest.$ac_ext <<_ACEOF
4941#line $LINENO "configure"
4942#include "confdefs.h"
4943
4944#define _LARGEFILE_SOURCE 1
4945#define _FILE_OFFSET_BITS 64
4946#include <sys/resource.h>
4947
Barry Warsawfe33b792003-01-07 22:42:49 +00004948#ifdef F77_DUMMY_MAIN
4949# ifdef __cplusplus
4950 extern "C"
4951# endif
4952 int F77_DUMMY_MAIN() { return 1; }
4953#endif
Martin v. Löwis399a6892002-10-04 10:22:02 +00004954int
4955main ()
4956{
4957struct rlimit foo;
4958 ;
4959 return 0;
4960}
4961_ACEOF
4962rm -f conftest.$ac_objext
4963if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4964 (eval $ac_compile) 2>&5
4965 ac_status=$?
4966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4967 (exit $ac_status); } &&
4968 { ac_try='test -s conftest.$ac_objext'
4969 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4970 (eval $ac_try) 2>&5
4971 ac_status=$?
4972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4973 (exit $ac_status); }; }; then
4974 sol_lfs_bug=no
4975else
4976 echo "$as_me: failed program was:" >&5
4977cat conftest.$ac_ext >&5
4978sol_lfs_bug=yes
4979fi
4980rm -f conftest.$ac_objext conftest.$ac_ext
4981echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
4982echo "${ECHO_T}$sol_lfs_bug" >&6
4983if test "$sol_lfs_bug" = "yes"; then
4984 use_lfs=no
4985fi
4986
4987if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00004988# Two defines needed to enable largefile support on various platforms
4989# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004990
Martin v. Löwis11437992002-04-12 09:54:03 +00004991cat >>confdefs.h <<\_ACEOF
4992#define _LARGEFILE_SOURCE 1
4993_ACEOF
4994
4995
4996cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004997#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004998_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004999
Martin v. Löwis399a6892002-10-04 10:22:02 +00005000fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005001
Guido van Rossum84e7b241996-08-19 21:59:00 +00005002# Add some code to confdefs.h so that the test for off_t works on SCO
5003cat >> confdefs.h <<\EOF
5004#if defined(SCO_DS)
5005#undef _OFF_T
5006#endif
5007EOF
5008
Guido van Rossumef2255b2000-03-10 22:30:29 +00005009# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005010echo "$as_me:$LINENO: checking for mode_t" >&5
5011echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5012if test "${ac_cv_type_mode_t+set}" = set; then
5013 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005014else
Martin v. Löwis11437992002-04-12 09:54:03 +00005015 cat >conftest.$ac_ext <<_ACEOF
5016#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005017#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005018$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005019#ifdef F77_DUMMY_MAIN
5020# ifdef __cplusplus
5021 extern "C"
5022# endif
5023 int F77_DUMMY_MAIN() { return 1; }
5024#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005025int
5026main ()
5027{
5028if ((mode_t *) 0)
5029 return 0;
5030if (sizeof (mode_t))
5031 return 0;
5032 ;
5033 return 0;
5034}
5035_ACEOF
5036rm -f conftest.$ac_objext
5037if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5038 (eval $ac_compile) 2>&5
5039 ac_status=$?
5040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5041 (exit $ac_status); } &&
5042 { ac_try='test -s conftest.$ac_objext'
5043 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5044 (eval $ac_try) 2>&5
5045 ac_status=$?
5046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5047 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005048 ac_cv_type_mode_t=yes
5049else
Martin v. Löwis11437992002-04-12 09:54:03 +00005050 echo "$as_me: failed program was:" >&5
5051cat conftest.$ac_ext >&5
5052ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005053fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005054rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005055fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005056echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5057echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5058if test $ac_cv_type_mode_t = yes; then
5059 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005060else
Martin v. Löwis11437992002-04-12 09:54:03 +00005061
5062cat >>confdefs.h <<_ACEOF
5063#define mode_t int
5064_ACEOF
5065
5066fi
5067
5068echo "$as_me:$LINENO: checking for off_t" >&5
5069echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5070if test "${ac_cv_type_off_t+set}" = set; then
5071 echo $ECHO_N "(cached) $ECHO_C" >&6
5072else
5073 cat >conftest.$ac_ext <<_ACEOF
5074#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005075#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005076$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005077#ifdef F77_DUMMY_MAIN
5078# ifdef __cplusplus
5079 extern "C"
5080# endif
5081 int F77_DUMMY_MAIN() { return 1; }
5082#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005083int
5084main ()
5085{
5086if ((off_t *) 0)
5087 return 0;
5088if (sizeof (off_t))
5089 return 0;
5090 ;
5091 return 0;
5092}
5093_ACEOF
5094rm -f conftest.$ac_objext
5095if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5096 (eval $ac_compile) 2>&5
5097 ac_status=$?
5098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5099 (exit $ac_status); } &&
5100 { ac_try='test -s conftest.$ac_objext'
5101 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5102 (eval $ac_try) 2>&5
5103 ac_status=$?
5104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5105 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005106 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005107else
Martin v. Löwis11437992002-04-12 09:54:03 +00005108 echo "$as_me: failed program was:" >&5
5109cat conftest.$ac_ext >&5
5110ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005111fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005112rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005113fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005114echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5115echo "${ECHO_T}$ac_cv_type_off_t" >&6
5116if test $ac_cv_type_off_t = yes; then
5117 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005118else
Martin v. Löwis11437992002-04-12 09:54:03 +00005119
5120cat >>confdefs.h <<_ACEOF
5121#define off_t long
5122_ACEOF
5123
5124fi
5125
5126echo "$as_me:$LINENO: checking for pid_t" >&5
5127echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5128if test "${ac_cv_type_pid_t+set}" = set; then
5129 echo $ECHO_N "(cached) $ECHO_C" >&6
5130else
5131 cat >conftest.$ac_ext <<_ACEOF
5132#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005133#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005134$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005135#ifdef F77_DUMMY_MAIN
5136# ifdef __cplusplus
5137 extern "C"
5138# endif
5139 int F77_DUMMY_MAIN() { return 1; }
5140#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005141int
5142main ()
5143{
5144if ((pid_t *) 0)
5145 return 0;
5146if (sizeof (pid_t))
5147 return 0;
5148 ;
5149 return 0;
5150}
5151_ACEOF
5152rm -f conftest.$ac_objext
5153if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5154 (eval $ac_compile) 2>&5
5155 ac_status=$?
5156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5157 (exit $ac_status); } &&
5158 { ac_try='test -s conftest.$ac_objext'
5159 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5160 (eval $ac_try) 2>&5
5161 ac_status=$?
5162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5163 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005164 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005165else
Martin v. Löwis11437992002-04-12 09:54:03 +00005166 echo "$as_me: failed program was:" >&5
5167cat conftest.$ac_ext >&5
5168ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005169fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005170rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005171fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005172echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5173echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5174if test $ac_cv_type_pid_t = yes; then
5175 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005176else
Martin v. Löwis11437992002-04-12 09:54:03 +00005177
5178cat >>confdefs.h <<_ACEOF
5179#define pid_t int
5180_ACEOF
5181
5182fi
5183
5184echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5185echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5186if test "${ac_cv_type_signal+set}" = set; then
5187 echo $ECHO_N "(cached) $ECHO_C" >&6
5188else
5189 cat >conftest.$ac_ext <<_ACEOF
5190#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005191#include "confdefs.h"
5192#include <sys/types.h>
5193#include <signal.h>
5194#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005195# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005196#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005197#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005198extern "C" void (*signal (int, void (*)(int)))(int);
5199#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005200void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005201#endif
5202
Barry Warsawfe33b792003-01-07 22:42:49 +00005203#ifdef F77_DUMMY_MAIN
5204# ifdef __cplusplus
5205 extern "C"
5206# endif
5207 int F77_DUMMY_MAIN() { return 1; }
5208#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005209int
5210main ()
5211{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005212int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005213 ;
5214 return 0;
5215}
5216_ACEOF
5217rm -f conftest.$ac_objext
5218if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5219 (eval $ac_compile) 2>&5
5220 ac_status=$?
5221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5222 (exit $ac_status); } &&
5223 { ac_try='test -s conftest.$ac_objext'
5224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5225 (eval $ac_try) 2>&5
5226 ac_status=$?
5227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5228 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005229 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005230else
Martin v. Löwis11437992002-04-12 09:54:03 +00005231 echo "$as_me: failed program was:" >&5
5232cat conftest.$ac_ext >&5
5233ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005234fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005235rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005236fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005237echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5238echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005239
Martin v. Löwis11437992002-04-12 09:54:03 +00005240cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005241#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005242_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005243
Michael W. Hudson54241132001-12-07 15:38:26 +00005244
Martin v. Löwis11437992002-04-12 09:54:03 +00005245echo "$as_me:$LINENO: checking for size_t" >&5
5246echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5247if test "${ac_cv_type_size_t+set}" = set; then
5248 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005249else
Martin v. Löwis11437992002-04-12 09:54:03 +00005250 cat >conftest.$ac_ext <<_ACEOF
5251#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005252#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005253$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005254#ifdef F77_DUMMY_MAIN
5255# ifdef __cplusplus
5256 extern "C"
5257# endif
5258 int F77_DUMMY_MAIN() { return 1; }
5259#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005260int
5261main ()
5262{
5263if ((size_t *) 0)
5264 return 0;
5265if (sizeof (size_t))
5266 return 0;
5267 ;
5268 return 0;
5269}
5270_ACEOF
5271rm -f conftest.$ac_objext
5272if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5273 (eval $ac_compile) 2>&5
5274 ac_status=$?
5275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5276 (exit $ac_status); } &&
5277 { ac_try='test -s conftest.$ac_objext'
5278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5279 (eval $ac_try) 2>&5
5280 ac_status=$?
5281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5282 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005283 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005284else
Martin v. Löwis11437992002-04-12 09:54:03 +00005285 echo "$as_me: failed program was:" >&5
5286cat conftest.$ac_ext >&5
5287ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005288fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005289rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005290fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005291echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5292echo "${ECHO_T}$ac_cv_type_size_t" >&6
5293if test $ac_cv_type_size_t = yes; then
5294 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005295else
Martin v. Löwis11437992002-04-12 09:54:03 +00005296
5297cat >>confdefs.h <<_ACEOF
5298#define size_t unsigned
5299_ACEOF
5300
5301fi
5302
5303echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5304echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5305if test "${ac_cv_type_uid_t+set}" = set; then
5306 echo $ECHO_N "(cached) $ECHO_C" >&6
5307else
5308 cat >conftest.$ac_ext <<_ACEOF
5309#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005310#include "confdefs.h"
5311#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005312
5313_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005314if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00005315 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005316 ac_cv_type_uid_t=yes
5317else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005318 ac_cv_type_uid_t=no
5319fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005320rm -f conftest*
5321
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005322fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005323echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5324echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005325if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005326
Martin v. Löwis11437992002-04-12 09:54:03 +00005327cat >>confdefs.h <<\_ACEOF
5328#define uid_t int
5329_ACEOF
5330
5331
5332cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005333#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005334_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005335
5336fi
5337
Jack Jansendd19cf82001-12-06 22:36:17 +00005338
Michael W. Hudson54241132001-12-07 15:38:26 +00005339# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00005340echo "$as_me:$LINENO: checking for int" >&5
5341echo $ECHO_N "checking for int... $ECHO_C" >&6
5342if test "${ac_cv_type_int+set}" = set; then
5343 echo $ECHO_N "(cached) $ECHO_C" >&6
5344else
5345 cat >conftest.$ac_ext <<_ACEOF
5346#line $LINENO "configure"
5347#include "confdefs.h"
5348$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005349#ifdef F77_DUMMY_MAIN
5350# ifdef __cplusplus
5351 extern "C"
5352# endif
5353 int F77_DUMMY_MAIN() { return 1; }
5354#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005355int
5356main ()
5357{
5358if ((int *) 0)
5359 return 0;
5360if (sizeof (int))
5361 return 0;
5362 ;
5363 return 0;
5364}
5365_ACEOF
5366rm -f conftest.$ac_objext
5367if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5368 (eval $ac_compile) 2>&5
5369 ac_status=$?
5370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5371 (exit $ac_status); } &&
5372 { ac_try='test -s conftest.$ac_objext'
5373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5374 (eval $ac_try) 2>&5
5375 ac_status=$?
5376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5377 (exit $ac_status); }; }; then
5378 ac_cv_type_int=yes
5379else
5380 echo "$as_me: failed program was:" >&5
5381cat conftest.$ac_ext >&5
5382ac_cv_type_int=no
5383fi
5384rm -f conftest.$ac_objext conftest.$ac_ext
5385fi
5386echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5387echo "${ECHO_T}$ac_cv_type_int" >&6
5388
5389echo "$as_me:$LINENO: checking size of int" >&5
5390echo $ECHO_N "checking size of int... $ECHO_C" >&6
5391if test "${ac_cv_sizeof_int+set}" = set; then
5392 echo $ECHO_N "(cached) $ECHO_C" >&6
5393else
5394 if test "$ac_cv_type_int" = yes; then
5395 # The cast to unsigned long works around a bug in the HP C Compiler
5396 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5397 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5398 # This bug is HP SR number 8606223364.
5399 if test "$cross_compiling" = yes; then
5400 # Depending upon the size, compute the lo and hi bounds.
5401cat >conftest.$ac_ext <<_ACEOF
5402#line $LINENO "configure"
5403#include "confdefs.h"
5404$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005405#ifdef F77_DUMMY_MAIN
5406# ifdef __cplusplus
5407 extern "C"
5408# endif
5409 int F77_DUMMY_MAIN() { return 1; }
5410#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005411int
5412main ()
5413{
5414static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5415test_array [0] = 0
5416
5417 ;
5418 return 0;
5419}
5420_ACEOF
5421rm -f conftest.$ac_objext
5422if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5423 (eval $ac_compile) 2>&5
5424 ac_status=$?
5425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5426 (exit $ac_status); } &&
5427 { ac_try='test -s conftest.$ac_objext'
5428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5429 (eval $ac_try) 2>&5
5430 ac_status=$?
5431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5432 (exit $ac_status); }; }; then
5433 ac_lo=0 ac_mid=0
5434 while :; do
5435 cat >conftest.$ac_ext <<_ACEOF
5436#line $LINENO "configure"
5437#include "confdefs.h"
5438$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005439#ifdef F77_DUMMY_MAIN
5440# ifdef __cplusplus
5441 extern "C"
5442# endif
5443 int F77_DUMMY_MAIN() { return 1; }
5444#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005445int
5446main ()
5447{
5448static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5449test_array [0] = 0
5450
5451 ;
5452 return 0;
5453}
5454_ACEOF
5455rm -f conftest.$ac_objext
5456if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5457 (eval $ac_compile) 2>&5
5458 ac_status=$?
5459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5460 (exit $ac_status); } &&
5461 { ac_try='test -s conftest.$ac_objext'
5462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5463 (eval $ac_try) 2>&5
5464 ac_status=$?
5465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5466 (exit $ac_status); }; }; then
5467 ac_hi=$ac_mid; break
5468else
5469 echo "$as_me: failed program was:" >&5
5470cat conftest.$ac_ext >&5
5471ac_lo=`expr $ac_mid + 1`
5472 if test $ac_lo -le $ac_mid; then
5473 ac_lo= ac_hi=
5474 break
5475 fi
5476 ac_mid=`expr 2 '*' $ac_mid + 1`
5477fi
5478rm -f conftest.$ac_objext conftest.$ac_ext
5479 done
5480else
5481 echo "$as_me: failed program was:" >&5
5482cat conftest.$ac_ext >&5
5483cat >conftest.$ac_ext <<_ACEOF
5484#line $LINENO "configure"
5485#include "confdefs.h"
5486$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005487#ifdef F77_DUMMY_MAIN
5488# ifdef __cplusplus
5489 extern "C"
5490# endif
5491 int F77_DUMMY_MAIN() { return 1; }
5492#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005493int
5494main ()
5495{
5496static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5497test_array [0] = 0
5498
5499 ;
5500 return 0;
5501}
5502_ACEOF
5503rm -f conftest.$ac_objext
5504if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5505 (eval $ac_compile) 2>&5
5506 ac_status=$?
5507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5508 (exit $ac_status); } &&
5509 { ac_try='test -s conftest.$ac_objext'
5510 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5511 (eval $ac_try) 2>&5
5512 ac_status=$?
5513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5514 (exit $ac_status); }; }; then
5515 ac_hi=-1 ac_mid=-1
5516 while :; do
5517 cat >conftest.$ac_ext <<_ACEOF
5518#line $LINENO "configure"
5519#include "confdefs.h"
5520$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005521#ifdef F77_DUMMY_MAIN
5522# ifdef __cplusplus
5523 extern "C"
5524# endif
5525 int F77_DUMMY_MAIN() { return 1; }
5526#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005527int
5528main ()
5529{
5530static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5531test_array [0] = 0
5532
5533 ;
5534 return 0;
5535}
5536_ACEOF
5537rm -f conftest.$ac_objext
5538if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5539 (eval $ac_compile) 2>&5
5540 ac_status=$?
5541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5542 (exit $ac_status); } &&
5543 { ac_try='test -s conftest.$ac_objext'
5544 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5545 (eval $ac_try) 2>&5
5546 ac_status=$?
5547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5548 (exit $ac_status); }; }; then
5549 ac_lo=$ac_mid; break
5550else
5551 echo "$as_me: failed program was:" >&5
5552cat conftest.$ac_ext >&5
5553ac_hi=`expr '(' $ac_mid ')' - 1`
5554 if test $ac_mid -le $ac_hi; then
5555 ac_lo= ac_hi=
5556 break
5557 fi
5558 ac_mid=`expr 2 '*' $ac_mid`
5559fi
5560rm -f conftest.$ac_objext conftest.$ac_ext
5561 done
5562else
5563 echo "$as_me: failed program was:" >&5
5564cat conftest.$ac_ext >&5
5565ac_lo= ac_hi=
5566fi
5567rm -f conftest.$ac_objext conftest.$ac_ext
5568fi
5569rm -f conftest.$ac_objext conftest.$ac_ext
5570# Binary search between lo and hi bounds.
5571while test "x$ac_lo" != "x$ac_hi"; do
5572 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5573 cat >conftest.$ac_ext <<_ACEOF
5574#line $LINENO "configure"
5575#include "confdefs.h"
5576$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005577#ifdef F77_DUMMY_MAIN
5578# ifdef __cplusplus
5579 extern "C"
5580# endif
5581 int F77_DUMMY_MAIN() { return 1; }
5582#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005583int
5584main ()
5585{
5586static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5587test_array [0] = 0
5588
5589 ;
5590 return 0;
5591}
5592_ACEOF
5593rm -f conftest.$ac_objext
5594if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5595 (eval $ac_compile) 2>&5
5596 ac_status=$?
5597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5598 (exit $ac_status); } &&
5599 { ac_try='test -s conftest.$ac_objext'
5600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5601 (eval $ac_try) 2>&5
5602 ac_status=$?
5603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5604 (exit $ac_status); }; }; then
5605 ac_hi=$ac_mid
5606else
5607 echo "$as_me: failed program was:" >&5
5608cat conftest.$ac_ext >&5
5609ac_lo=`expr '(' $ac_mid ')' + 1`
5610fi
5611rm -f conftest.$ac_objext conftest.$ac_ext
5612done
5613case $ac_lo in
5614?*) ac_cv_sizeof_int=$ac_lo;;
5615'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5616echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5617 { (exit 1); exit 1; }; } ;;
5618esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005619else
5620 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005621 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5622echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5623 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005624else
Martin v. Löwis11437992002-04-12 09:54:03 +00005625 cat >conftest.$ac_ext <<_ACEOF
5626#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005627#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005628$ac_includes_default
5629long longval () { return (long) (sizeof (int)); }
5630unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005631#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005632#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00005633#ifdef F77_DUMMY_MAIN
5634# ifdef __cplusplus
5635 extern "C"
5636# endif
5637 int F77_DUMMY_MAIN() { return 1; }
5638#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005639int
5640main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005641{
Martin v. Löwis11437992002-04-12 09:54:03 +00005642
5643 FILE *f = fopen ("conftest.val", "w");
5644 if (! f)
5645 exit (1);
5646 if (((long) (sizeof (int))) < 0)
5647 {
5648 long i = longval ();
5649 if (i != ((long) (sizeof (int))))
5650 exit (1);
5651 fprintf (f, "%ld\n", i);
5652 }
5653 else
5654 {
5655 unsigned long i = ulongval ();
5656 if (i != ((long) (sizeof (int))))
5657 exit (1);
5658 fprintf (f, "%lu\n", i);
5659 }
5660 exit (ferror (f) || fclose (f) != 0);
5661
5662 ;
5663 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005664}
Martin v. Löwis11437992002-04-12 09:54:03 +00005665_ACEOF
5666rm -f conftest$ac_exeext
5667if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5668 (eval $ac_link) 2>&5
5669 ac_status=$?
5670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5671 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5673 (eval $ac_try) 2>&5
5674 ac_status=$?
5675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5676 (exit $ac_status); }; }; then
5677 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005678else
Martin v. Löwis11437992002-04-12 09:54:03 +00005679 echo "$as_me: program exited with status $ac_status" >&5
5680echo "$as_me: failed program was:" >&5
5681cat conftest.$ac_ext >&5
5682( exit $ac_status )
5683{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5684echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5685 { (exit 1); exit 1; }; }
5686fi
Barry Warsawfe33b792003-01-07 22:42:49 +00005687rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005688fi
5689fi
5690rm -f conftest.val
5691else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005692 ac_cv_sizeof_int=0
5693fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005694fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005695echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5696echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5697cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005698#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005699_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005700
5701
Martin v. Löwis11437992002-04-12 09:54:03 +00005702echo "$as_me:$LINENO: checking for long" >&5
5703echo $ECHO_N "checking for long... $ECHO_C" >&6
5704if test "${ac_cv_type_long+set}" = set; then
5705 echo $ECHO_N "(cached) $ECHO_C" >&6
5706else
5707 cat >conftest.$ac_ext <<_ACEOF
5708#line $LINENO "configure"
5709#include "confdefs.h"
5710$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005711#ifdef F77_DUMMY_MAIN
5712# ifdef __cplusplus
5713 extern "C"
5714# endif
5715 int F77_DUMMY_MAIN() { return 1; }
5716#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005717int
5718main ()
5719{
5720if ((long *) 0)
5721 return 0;
5722if (sizeof (long))
5723 return 0;
5724 ;
5725 return 0;
5726}
5727_ACEOF
5728rm -f conftest.$ac_objext
5729if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5730 (eval $ac_compile) 2>&5
5731 ac_status=$?
5732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5733 (exit $ac_status); } &&
5734 { ac_try='test -s conftest.$ac_objext'
5735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5736 (eval $ac_try) 2>&5
5737 ac_status=$?
5738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5739 (exit $ac_status); }; }; then
5740 ac_cv_type_long=yes
5741else
5742 echo "$as_me: failed program was:" >&5
5743cat conftest.$ac_ext >&5
5744ac_cv_type_long=no
5745fi
5746rm -f conftest.$ac_objext conftest.$ac_ext
5747fi
5748echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5749echo "${ECHO_T}$ac_cv_type_long" >&6
5750
5751echo "$as_me:$LINENO: checking size of long" >&5
5752echo $ECHO_N "checking size of long... $ECHO_C" >&6
5753if test "${ac_cv_sizeof_long+set}" = set; then
5754 echo $ECHO_N "(cached) $ECHO_C" >&6
5755else
5756 if test "$ac_cv_type_long" = yes; then
5757 # The cast to unsigned long works around a bug in the HP C Compiler
5758 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5759 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5760 # This bug is HP SR number 8606223364.
5761 if test "$cross_compiling" = yes; then
5762 # Depending upon the size, compute the lo and hi bounds.
5763cat >conftest.$ac_ext <<_ACEOF
5764#line $LINENO "configure"
5765#include "confdefs.h"
5766$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005767#ifdef F77_DUMMY_MAIN
5768# ifdef __cplusplus
5769 extern "C"
5770# endif
5771 int F77_DUMMY_MAIN() { return 1; }
5772#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005773int
5774main ()
5775{
5776static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5777test_array [0] = 0
5778
5779 ;
5780 return 0;
5781}
5782_ACEOF
5783rm -f conftest.$ac_objext
5784if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5785 (eval $ac_compile) 2>&5
5786 ac_status=$?
5787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5788 (exit $ac_status); } &&
5789 { ac_try='test -s conftest.$ac_objext'
5790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5791 (eval $ac_try) 2>&5
5792 ac_status=$?
5793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5794 (exit $ac_status); }; }; then
5795 ac_lo=0 ac_mid=0
5796 while :; do
5797 cat >conftest.$ac_ext <<_ACEOF
5798#line $LINENO "configure"
5799#include "confdefs.h"
5800$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005801#ifdef F77_DUMMY_MAIN
5802# ifdef __cplusplus
5803 extern "C"
5804# endif
5805 int F77_DUMMY_MAIN() { return 1; }
5806#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005807int
5808main ()
5809{
5810static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5811test_array [0] = 0
5812
5813 ;
5814 return 0;
5815}
5816_ACEOF
5817rm -f conftest.$ac_objext
5818if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5819 (eval $ac_compile) 2>&5
5820 ac_status=$?
5821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5822 (exit $ac_status); } &&
5823 { ac_try='test -s conftest.$ac_objext'
5824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5825 (eval $ac_try) 2>&5
5826 ac_status=$?
5827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5828 (exit $ac_status); }; }; then
5829 ac_hi=$ac_mid; break
5830else
5831 echo "$as_me: failed program was:" >&5
5832cat conftest.$ac_ext >&5
5833ac_lo=`expr $ac_mid + 1`
5834 if test $ac_lo -le $ac_mid; then
5835 ac_lo= ac_hi=
5836 break
5837 fi
5838 ac_mid=`expr 2 '*' $ac_mid + 1`
5839fi
5840rm -f conftest.$ac_objext conftest.$ac_ext
5841 done
5842else
5843 echo "$as_me: failed program was:" >&5
5844cat conftest.$ac_ext >&5
5845cat >conftest.$ac_ext <<_ACEOF
5846#line $LINENO "configure"
5847#include "confdefs.h"
5848$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005849#ifdef F77_DUMMY_MAIN
5850# ifdef __cplusplus
5851 extern "C"
5852# endif
5853 int F77_DUMMY_MAIN() { return 1; }
5854#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005855int
5856main ()
5857{
5858static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5859test_array [0] = 0
5860
5861 ;
5862 return 0;
5863}
5864_ACEOF
5865rm -f conftest.$ac_objext
5866if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5867 (eval $ac_compile) 2>&5
5868 ac_status=$?
5869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5870 (exit $ac_status); } &&
5871 { ac_try='test -s conftest.$ac_objext'
5872 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5873 (eval $ac_try) 2>&5
5874 ac_status=$?
5875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5876 (exit $ac_status); }; }; then
5877 ac_hi=-1 ac_mid=-1
5878 while :; do
5879 cat >conftest.$ac_ext <<_ACEOF
5880#line $LINENO "configure"
5881#include "confdefs.h"
5882$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005883#ifdef F77_DUMMY_MAIN
5884# ifdef __cplusplus
5885 extern "C"
5886# endif
5887 int F77_DUMMY_MAIN() { return 1; }
5888#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005889int
5890main ()
5891{
5892static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5893test_array [0] = 0
5894
5895 ;
5896 return 0;
5897}
5898_ACEOF
5899rm -f conftest.$ac_objext
5900if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5901 (eval $ac_compile) 2>&5
5902 ac_status=$?
5903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5904 (exit $ac_status); } &&
5905 { ac_try='test -s conftest.$ac_objext'
5906 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5907 (eval $ac_try) 2>&5
5908 ac_status=$?
5909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5910 (exit $ac_status); }; }; then
5911 ac_lo=$ac_mid; break
5912else
5913 echo "$as_me: failed program was:" >&5
5914cat conftest.$ac_ext >&5
5915ac_hi=`expr '(' $ac_mid ')' - 1`
5916 if test $ac_mid -le $ac_hi; then
5917 ac_lo= ac_hi=
5918 break
5919 fi
5920 ac_mid=`expr 2 '*' $ac_mid`
5921fi
5922rm -f conftest.$ac_objext conftest.$ac_ext
5923 done
5924else
5925 echo "$as_me: failed program was:" >&5
5926cat conftest.$ac_ext >&5
5927ac_lo= ac_hi=
5928fi
5929rm -f conftest.$ac_objext conftest.$ac_ext
5930fi
5931rm -f conftest.$ac_objext conftest.$ac_ext
5932# Binary search between lo and hi bounds.
5933while test "x$ac_lo" != "x$ac_hi"; do
5934 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5935 cat >conftest.$ac_ext <<_ACEOF
5936#line $LINENO "configure"
5937#include "confdefs.h"
5938$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005939#ifdef F77_DUMMY_MAIN
5940# ifdef __cplusplus
5941 extern "C"
5942# endif
5943 int F77_DUMMY_MAIN() { return 1; }
5944#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005945int
5946main ()
5947{
5948static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5949test_array [0] = 0
5950
5951 ;
5952 return 0;
5953}
5954_ACEOF
5955rm -f conftest.$ac_objext
5956if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5957 (eval $ac_compile) 2>&5
5958 ac_status=$?
5959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5960 (exit $ac_status); } &&
5961 { ac_try='test -s conftest.$ac_objext'
5962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5963 (eval $ac_try) 2>&5
5964 ac_status=$?
5965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5966 (exit $ac_status); }; }; then
5967 ac_hi=$ac_mid
5968else
5969 echo "$as_me: failed program was:" >&5
5970cat conftest.$ac_ext >&5
5971ac_lo=`expr '(' $ac_mid ')' + 1`
5972fi
5973rm -f conftest.$ac_objext conftest.$ac_ext
5974done
5975case $ac_lo in
5976?*) ac_cv_sizeof_long=$ac_lo;;
5977'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5978echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5979 { (exit 1); exit 1; }; } ;;
5980esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005981else
5982 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005983 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5984echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5985 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005986else
Martin v. Löwis11437992002-04-12 09:54:03 +00005987 cat >conftest.$ac_ext <<_ACEOF
5988#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005989#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005990$ac_includes_default
5991long longval () { return (long) (sizeof (long)); }
5992unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005993#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005994#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00005995#ifdef F77_DUMMY_MAIN
5996# ifdef __cplusplus
5997 extern "C"
5998# endif
5999 int F77_DUMMY_MAIN() { return 1; }
6000#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006001int
6002main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006003{
Martin v. Löwis11437992002-04-12 09:54:03 +00006004
6005 FILE *f = fopen ("conftest.val", "w");
6006 if (! f)
6007 exit (1);
6008 if (((long) (sizeof (long))) < 0)
6009 {
6010 long i = longval ();
6011 if (i != ((long) (sizeof (long))))
6012 exit (1);
6013 fprintf (f, "%ld\n", i);
6014 }
6015 else
6016 {
6017 unsigned long i = ulongval ();
6018 if (i != ((long) (sizeof (long))))
6019 exit (1);
6020 fprintf (f, "%lu\n", i);
6021 }
6022 exit (ferror (f) || fclose (f) != 0);
6023
6024 ;
6025 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006026}
Martin v. Löwis11437992002-04-12 09:54:03 +00006027_ACEOF
6028rm -f conftest$ac_exeext
6029if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6030 (eval $ac_link) 2>&5
6031 ac_status=$?
6032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6033 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6035 (eval $ac_try) 2>&5
6036 ac_status=$?
6037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6038 (exit $ac_status); }; }; then
6039 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006040else
Martin v. Löwis11437992002-04-12 09:54:03 +00006041 echo "$as_me: program exited with status $ac_status" >&5
6042echo "$as_me: failed program was:" >&5
6043cat conftest.$ac_ext >&5
6044( exit $ac_status )
6045{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
6046echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
6047 { (exit 1); exit 1; }; }
6048fi
Barry Warsawfe33b792003-01-07 22:42:49 +00006049rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006050fi
6051fi
6052rm -f conftest.val
6053else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006054 ac_cv_sizeof_long=0
6055fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006056fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006057echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6058echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6059cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006060#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006061_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006062
6063
Martin v. Löwis11437992002-04-12 09:54:03 +00006064echo "$as_me:$LINENO: checking for void *" >&5
6065echo $ECHO_N "checking for void *... $ECHO_C" >&6
6066if test "${ac_cv_type_void_p+set}" = set; then
6067 echo $ECHO_N "(cached) $ECHO_C" >&6
6068else
6069 cat >conftest.$ac_ext <<_ACEOF
6070#line $LINENO "configure"
6071#include "confdefs.h"
6072$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006073#ifdef F77_DUMMY_MAIN
6074# ifdef __cplusplus
6075 extern "C"
6076# endif
6077 int F77_DUMMY_MAIN() { return 1; }
6078#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006079int
6080main ()
6081{
6082if ((void * *) 0)
6083 return 0;
6084if (sizeof (void *))
6085 return 0;
6086 ;
6087 return 0;
6088}
6089_ACEOF
6090rm -f conftest.$ac_objext
6091if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6092 (eval $ac_compile) 2>&5
6093 ac_status=$?
6094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6095 (exit $ac_status); } &&
6096 { ac_try='test -s conftest.$ac_objext'
6097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6098 (eval $ac_try) 2>&5
6099 ac_status=$?
6100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6101 (exit $ac_status); }; }; then
6102 ac_cv_type_void_p=yes
6103else
6104 echo "$as_me: failed program was:" >&5
6105cat conftest.$ac_ext >&5
6106ac_cv_type_void_p=no
6107fi
6108rm -f conftest.$ac_objext conftest.$ac_ext
6109fi
6110echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
6111echo "${ECHO_T}$ac_cv_type_void_p" >&6
6112
6113echo "$as_me:$LINENO: checking size of void *" >&5
6114echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6115if test "${ac_cv_sizeof_void_p+set}" = set; then
6116 echo $ECHO_N "(cached) $ECHO_C" >&6
6117else
6118 if test "$ac_cv_type_void_p" = yes; then
6119 # The cast to unsigned long works around a bug in the HP C Compiler
6120 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6121 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6122 # This bug is HP SR number 8606223364.
6123 if test "$cross_compiling" = yes; then
6124 # Depending upon the size, compute the lo and hi bounds.
6125cat >conftest.$ac_ext <<_ACEOF
6126#line $LINENO "configure"
6127#include "confdefs.h"
6128$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006129#ifdef F77_DUMMY_MAIN
6130# ifdef __cplusplus
6131 extern "C"
6132# endif
6133 int F77_DUMMY_MAIN() { return 1; }
6134#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006135int
6136main ()
6137{
6138static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
6139test_array [0] = 0
6140
6141 ;
6142 return 0;
6143}
6144_ACEOF
6145rm -f conftest.$ac_objext
6146if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6147 (eval $ac_compile) 2>&5
6148 ac_status=$?
6149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6150 (exit $ac_status); } &&
6151 { ac_try='test -s conftest.$ac_objext'
6152 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6153 (eval $ac_try) 2>&5
6154 ac_status=$?
6155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6156 (exit $ac_status); }; }; then
6157 ac_lo=0 ac_mid=0
6158 while :; do
6159 cat >conftest.$ac_ext <<_ACEOF
6160#line $LINENO "configure"
6161#include "confdefs.h"
6162$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006163#ifdef F77_DUMMY_MAIN
6164# ifdef __cplusplus
6165 extern "C"
6166# endif
6167 int F77_DUMMY_MAIN() { return 1; }
6168#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006169int
6170main ()
6171{
6172static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6173test_array [0] = 0
6174
6175 ;
6176 return 0;
6177}
6178_ACEOF
6179rm -f conftest.$ac_objext
6180if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6181 (eval $ac_compile) 2>&5
6182 ac_status=$?
6183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6184 (exit $ac_status); } &&
6185 { ac_try='test -s conftest.$ac_objext'
6186 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6187 (eval $ac_try) 2>&5
6188 ac_status=$?
6189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6190 (exit $ac_status); }; }; then
6191 ac_hi=$ac_mid; break
6192else
6193 echo "$as_me: failed program was:" >&5
6194cat conftest.$ac_ext >&5
6195ac_lo=`expr $ac_mid + 1`
6196 if test $ac_lo -le $ac_mid; then
6197 ac_lo= ac_hi=
6198 break
6199 fi
6200 ac_mid=`expr 2 '*' $ac_mid + 1`
6201fi
6202rm -f conftest.$ac_objext conftest.$ac_ext
6203 done
6204else
6205 echo "$as_me: failed program was:" >&5
6206cat conftest.$ac_ext >&5
6207cat >conftest.$ac_ext <<_ACEOF
6208#line $LINENO "configure"
6209#include "confdefs.h"
6210$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006211#ifdef F77_DUMMY_MAIN
6212# ifdef __cplusplus
6213 extern "C"
6214# endif
6215 int F77_DUMMY_MAIN() { return 1; }
6216#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006217int
6218main ()
6219{
6220static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6221test_array [0] = 0
6222
6223 ;
6224 return 0;
6225}
6226_ACEOF
6227rm -f conftest.$ac_objext
6228if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6229 (eval $ac_compile) 2>&5
6230 ac_status=$?
6231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6232 (exit $ac_status); } &&
6233 { ac_try='test -s conftest.$ac_objext'
6234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6235 (eval $ac_try) 2>&5
6236 ac_status=$?
6237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6238 (exit $ac_status); }; }; then
6239 ac_hi=-1 ac_mid=-1
6240 while :; do
6241 cat >conftest.$ac_ext <<_ACEOF
6242#line $LINENO "configure"
6243#include "confdefs.h"
6244$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006245#ifdef F77_DUMMY_MAIN
6246# ifdef __cplusplus
6247 extern "C"
6248# endif
6249 int F77_DUMMY_MAIN() { return 1; }
6250#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006251int
6252main ()
6253{
6254static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6255test_array [0] = 0
6256
6257 ;
6258 return 0;
6259}
6260_ACEOF
6261rm -f conftest.$ac_objext
6262if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6263 (eval $ac_compile) 2>&5
6264 ac_status=$?
6265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6266 (exit $ac_status); } &&
6267 { ac_try='test -s conftest.$ac_objext'
6268 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6269 (eval $ac_try) 2>&5
6270 ac_status=$?
6271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6272 (exit $ac_status); }; }; then
6273 ac_lo=$ac_mid; break
6274else
6275 echo "$as_me: failed program was:" >&5
6276cat conftest.$ac_ext >&5
6277ac_hi=`expr '(' $ac_mid ')' - 1`
6278 if test $ac_mid -le $ac_hi; then
6279 ac_lo= ac_hi=
6280 break
6281 fi
6282 ac_mid=`expr 2 '*' $ac_mid`
6283fi
6284rm -f conftest.$ac_objext conftest.$ac_ext
6285 done
6286else
6287 echo "$as_me: failed program was:" >&5
6288cat conftest.$ac_ext >&5
6289ac_lo= ac_hi=
6290fi
6291rm -f conftest.$ac_objext conftest.$ac_ext
6292fi
6293rm -f conftest.$ac_objext conftest.$ac_ext
6294# Binary search between lo and hi bounds.
6295while test "x$ac_lo" != "x$ac_hi"; do
6296 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6297 cat >conftest.$ac_ext <<_ACEOF
6298#line $LINENO "configure"
6299#include "confdefs.h"
6300$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006301#ifdef F77_DUMMY_MAIN
6302# ifdef __cplusplus
6303 extern "C"
6304# endif
6305 int F77_DUMMY_MAIN() { return 1; }
6306#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006307int
6308main ()
6309{
6310static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6311test_array [0] = 0
6312
6313 ;
6314 return 0;
6315}
6316_ACEOF
6317rm -f conftest.$ac_objext
6318if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6319 (eval $ac_compile) 2>&5
6320 ac_status=$?
6321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6322 (exit $ac_status); } &&
6323 { ac_try='test -s conftest.$ac_objext'
6324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6325 (eval $ac_try) 2>&5
6326 ac_status=$?
6327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6328 (exit $ac_status); }; }; then
6329 ac_hi=$ac_mid
6330else
6331 echo "$as_me: failed program was:" >&5
6332cat conftest.$ac_ext >&5
6333ac_lo=`expr '(' $ac_mid ')' + 1`
6334fi
6335rm -f conftest.$ac_objext conftest.$ac_ext
6336done
6337case $ac_lo in
6338?*) ac_cv_sizeof_void_p=$ac_lo;;
6339'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6340echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6341 { (exit 1); exit 1; }; } ;;
6342esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006343else
6344 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006345 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6346echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6347 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006348else
Martin v. Löwis11437992002-04-12 09:54:03 +00006349 cat >conftest.$ac_ext <<_ACEOF
6350#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00006351#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006352$ac_includes_default
6353long longval () { return (long) (sizeof (void *)); }
6354unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006355#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006356#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00006357#ifdef F77_DUMMY_MAIN
6358# ifdef __cplusplus
6359 extern "C"
6360# endif
6361 int F77_DUMMY_MAIN() { return 1; }
6362#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006363int
6364main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006365{
Martin v. Löwis11437992002-04-12 09:54:03 +00006366
6367 FILE *f = fopen ("conftest.val", "w");
6368 if (! f)
6369 exit (1);
6370 if (((long) (sizeof (void *))) < 0)
6371 {
6372 long i = longval ();
6373 if (i != ((long) (sizeof (void *))))
6374 exit (1);
6375 fprintf (f, "%ld\n", i);
6376 }
6377 else
6378 {
6379 unsigned long i = ulongval ();
6380 if (i != ((long) (sizeof (void *))))
6381 exit (1);
6382 fprintf (f, "%lu\n", i);
6383 }
6384 exit (ferror (f) || fclose (f) != 0);
6385
6386 ;
6387 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006388}
Martin v. Löwis11437992002-04-12 09:54:03 +00006389_ACEOF
6390rm -f conftest$ac_exeext
6391if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6392 (eval $ac_link) 2>&5
6393 ac_status=$?
6394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6395 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6397 (eval $ac_try) 2>&5
6398 ac_status=$?
6399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6400 (exit $ac_status); }; }; then
6401 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006402else
Martin v. Löwis11437992002-04-12 09:54:03 +00006403 echo "$as_me: program exited with status $ac_status" >&5
6404echo "$as_me: failed program was:" >&5
6405cat conftest.$ac_ext >&5
6406( exit $ac_status )
6407{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6408echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6409 { (exit 1); exit 1; }; }
6410fi
Barry Warsawfe33b792003-01-07 22:42:49 +00006411rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006412fi
6413fi
6414rm -f conftest.val
6415else
Guido van Rossumad678af1998-10-02 14:42:15 +00006416 ac_cv_sizeof_void_p=0
6417fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006418fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006419echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6420echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6421cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006422#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006423_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006424
6425
Martin v. Löwis11437992002-04-12 09:54:03 +00006426echo "$as_me:$LINENO: checking for char" >&5
6427echo $ECHO_N "checking for char... $ECHO_C" >&6
6428if test "${ac_cv_type_char+set}" = set; then
6429 echo $ECHO_N "(cached) $ECHO_C" >&6
6430else
6431 cat >conftest.$ac_ext <<_ACEOF
6432#line $LINENO "configure"
6433#include "confdefs.h"
6434$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006435#ifdef F77_DUMMY_MAIN
6436# ifdef __cplusplus
6437 extern "C"
6438# endif
6439 int F77_DUMMY_MAIN() { return 1; }
6440#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006441int
6442main ()
6443{
6444if ((char *) 0)
6445 return 0;
6446if (sizeof (char))
6447 return 0;
6448 ;
6449 return 0;
6450}
6451_ACEOF
6452rm -f conftest.$ac_objext
6453if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6454 (eval $ac_compile) 2>&5
6455 ac_status=$?
6456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6457 (exit $ac_status); } &&
6458 { ac_try='test -s conftest.$ac_objext'
6459 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6460 (eval $ac_try) 2>&5
6461 ac_status=$?
6462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6463 (exit $ac_status); }; }; then
6464 ac_cv_type_char=yes
6465else
6466 echo "$as_me: failed program was:" >&5
6467cat conftest.$ac_ext >&5
6468ac_cv_type_char=no
6469fi
6470rm -f conftest.$ac_objext conftest.$ac_ext
6471fi
6472echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
6473echo "${ECHO_T}$ac_cv_type_char" >&6
6474
6475echo "$as_me:$LINENO: checking size of char" >&5
6476echo $ECHO_N "checking size of char... $ECHO_C" >&6
6477if test "${ac_cv_sizeof_char+set}" = set; then
6478 echo $ECHO_N "(cached) $ECHO_C" >&6
6479else
6480 if test "$ac_cv_type_char" = yes; then
6481 # The cast to unsigned long works around a bug in the HP C Compiler
6482 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6483 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6484 # This bug is HP SR number 8606223364.
6485 if test "$cross_compiling" = yes; then
6486 # Depending upon the size, compute the lo and hi bounds.
6487cat >conftest.$ac_ext <<_ACEOF
6488#line $LINENO "configure"
6489#include "confdefs.h"
6490$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006491#ifdef F77_DUMMY_MAIN
6492# ifdef __cplusplus
6493 extern "C"
6494# endif
6495 int F77_DUMMY_MAIN() { return 1; }
6496#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006497int
6498main ()
6499{
6500static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
6501test_array [0] = 0
6502
6503 ;
6504 return 0;
6505}
6506_ACEOF
6507rm -f conftest.$ac_objext
6508if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6509 (eval $ac_compile) 2>&5
6510 ac_status=$?
6511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6512 (exit $ac_status); } &&
6513 { ac_try='test -s conftest.$ac_objext'
6514 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6515 (eval $ac_try) 2>&5
6516 ac_status=$?
6517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6518 (exit $ac_status); }; }; then
6519 ac_lo=0 ac_mid=0
6520 while :; do
6521 cat >conftest.$ac_ext <<_ACEOF
6522#line $LINENO "configure"
6523#include "confdefs.h"
6524$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006525#ifdef F77_DUMMY_MAIN
6526# ifdef __cplusplus
6527 extern "C"
6528# endif
6529 int F77_DUMMY_MAIN() { return 1; }
6530#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006531int
6532main ()
6533{
6534static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6535test_array [0] = 0
6536
6537 ;
6538 return 0;
6539}
6540_ACEOF
6541rm -f conftest.$ac_objext
6542if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6543 (eval $ac_compile) 2>&5
6544 ac_status=$?
6545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6546 (exit $ac_status); } &&
6547 { ac_try='test -s conftest.$ac_objext'
6548 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6549 (eval $ac_try) 2>&5
6550 ac_status=$?
6551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6552 (exit $ac_status); }; }; then
6553 ac_hi=$ac_mid; break
6554else
6555 echo "$as_me: failed program was:" >&5
6556cat conftest.$ac_ext >&5
6557ac_lo=`expr $ac_mid + 1`
6558 if test $ac_lo -le $ac_mid; then
6559 ac_lo= ac_hi=
6560 break
6561 fi
6562 ac_mid=`expr 2 '*' $ac_mid + 1`
6563fi
6564rm -f conftest.$ac_objext conftest.$ac_ext
6565 done
6566else
6567 echo "$as_me: failed program was:" >&5
6568cat conftest.$ac_ext >&5
6569cat >conftest.$ac_ext <<_ACEOF
6570#line $LINENO "configure"
6571#include "confdefs.h"
6572$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006573#ifdef F77_DUMMY_MAIN
6574# ifdef __cplusplus
6575 extern "C"
6576# endif
6577 int F77_DUMMY_MAIN() { return 1; }
6578#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006579int
6580main ()
6581{
6582static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
6583test_array [0] = 0
6584
6585 ;
6586 return 0;
6587}
6588_ACEOF
6589rm -f conftest.$ac_objext
6590if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6591 (eval $ac_compile) 2>&5
6592 ac_status=$?
6593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6594 (exit $ac_status); } &&
6595 { ac_try='test -s conftest.$ac_objext'
6596 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6597 (eval $ac_try) 2>&5
6598 ac_status=$?
6599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6600 (exit $ac_status); }; }; then
6601 ac_hi=-1 ac_mid=-1
6602 while :; do
6603 cat >conftest.$ac_ext <<_ACEOF
6604#line $LINENO "configure"
6605#include "confdefs.h"
6606$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006607#ifdef F77_DUMMY_MAIN
6608# ifdef __cplusplus
6609 extern "C"
6610# endif
6611 int F77_DUMMY_MAIN() { return 1; }
6612#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006613int
6614main ()
6615{
6616static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
6617test_array [0] = 0
6618
6619 ;
6620 return 0;
6621}
6622_ACEOF
6623rm -f conftest.$ac_objext
6624if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6625 (eval $ac_compile) 2>&5
6626 ac_status=$?
6627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6628 (exit $ac_status); } &&
6629 { ac_try='test -s conftest.$ac_objext'
6630 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6631 (eval $ac_try) 2>&5
6632 ac_status=$?
6633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6634 (exit $ac_status); }; }; then
6635 ac_lo=$ac_mid; break
6636else
6637 echo "$as_me: failed program was:" >&5
6638cat conftest.$ac_ext >&5
6639ac_hi=`expr '(' $ac_mid ')' - 1`
6640 if test $ac_mid -le $ac_hi; then
6641 ac_lo= ac_hi=
6642 break
6643 fi
6644 ac_mid=`expr 2 '*' $ac_mid`
6645fi
6646rm -f conftest.$ac_objext conftest.$ac_ext
6647 done
6648else
6649 echo "$as_me: failed program was:" >&5
6650cat conftest.$ac_ext >&5
6651ac_lo= ac_hi=
6652fi
6653rm -f conftest.$ac_objext conftest.$ac_ext
6654fi
6655rm -f conftest.$ac_objext conftest.$ac_ext
6656# Binary search between lo and hi bounds.
6657while test "x$ac_lo" != "x$ac_hi"; do
6658 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6659 cat >conftest.$ac_ext <<_ACEOF
6660#line $LINENO "configure"
6661#include "confdefs.h"
6662$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006663#ifdef F77_DUMMY_MAIN
6664# ifdef __cplusplus
6665 extern "C"
6666# endif
6667 int F77_DUMMY_MAIN() { return 1; }
6668#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006669int
6670main ()
6671{
6672static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6673test_array [0] = 0
6674
6675 ;
6676 return 0;
6677}
6678_ACEOF
6679rm -f conftest.$ac_objext
6680if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6681 (eval $ac_compile) 2>&5
6682 ac_status=$?
6683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6684 (exit $ac_status); } &&
6685 { ac_try='test -s conftest.$ac_objext'
6686 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6687 (eval $ac_try) 2>&5
6688 ac_status=$?
6689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6690 (exit $ac_status); }; }; then
6691 ac_hi=$ac_mid
6692else
6693 echo "$as_me: failed program was:" >&5
6694cat conftest.$ac_ext >&5
6695ac_lo=`expr '(' $ac_mid ')' + 1`
6696fi
6697rm -f conftest.$ac_objext conftest.$ac_ext
6698done
6699case $ac_lo in
6700?*) ac_cv_sizeof_char=$ac_lo;;
6701'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6702echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6703 { (exit 1); exit 1; }; } ;;
6704esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006705else
6706 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006707 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6708echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6709 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006710else
Martin v. Löwis11437992002-04-12 09:54:03 +00006711 cat >conftest.$ac_ext <<_ACEOF
6712#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006713#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006714$ac_includes_default
6715long longval () { return (long) (sizeof (char)); }
6716unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006717#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006718#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00006719#ifdef F77_DUMMY_MAIN
6720# ifdef __cplusplus
6721 extern "C"
6722# endif
6723 int F77_DUMMY_MAIN() { return 1; }
6724#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006725int
6726main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006727{
Martin v. Löwis11437992002-04-12 09:54:03 +00006728
6729 FILE *f = fopen ("conftest.val", "w");
6730 if (! f)
6731 exit (1);
6732 if (((long) (sizeof (char))) < 0)
6733 {
6734 long i = longval ();
6735 if (i != ((long) (sizeof (char))))
6736 exit (1);
6737 fprintf (f, "%ld\n", i);
6738 }
6739 else
6740 {
6741 unsigned long i = ulongval ();
6742 if (i != ((long) (sizeof (char))))
6743 exit (1);
6744 fprintf (f, "%lu\n", i);
6745 }
6746 exit (ferror (f) || fclose (f) != 0);
6747
6748 ;
6749 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006750}
Martin v. Löwis11437992002-04-12 09:54:03 +00006751_ACEOF
6752rm -f conftest$ac_exeext
6753if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6754 (eval $ac_link) 2>&5
6755 ac_status=$?
6756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6757 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6759 (eval $ac_try) 2>&5
6760 ac_status=$?
6761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6762 (exit $ac_status); }; }; then
6763 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006764else
Martin v. Löwis11437992002-04-12 09:54:03 +00006765 echo "$as_me: program exited with status $ac_status" >&5
6766echo "$as_me: failed program was:" >&5
6767cat conftest.$ac_ext >&5
6768( exit $ac_status )
6769{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6770echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6771 { (exit 1); exit 1; }; }
6772fi
Barry Warsawfe33b792003-01-07 22:42:49 +00006773rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006774fi
6775fi
6776rm -f conftest.val
6777else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006778 ac_cv_sizeof_char=0
6779fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006780fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006781echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6782echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6783cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006784#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006785_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006786
6787
Martin v. Löwis11437992002-04-12 09:54:03 +00006788echo "$as_me:$LINENO: checking for short" >&5
6789echo $ECHO_N "checking for short... $ECHO_C" >&6
6790if test "${ac_cv_type_short+set}" = set; then
6791 echo $ECHO_N "(cached) $ECHO_C" >&6
6792else
6793 cat >conftest.$ac_ext <<_ACEOF
6794#line $LINENO "configure"
6795#include "confdefs.h"
6796$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006797#ifdef F77_DUMMY_MAIN
6798# ifdef __cplusplus
6799 extern "C"
6800# endif
6801 int F77_DUMMY_MAIN() { return 1; }
6802#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006803int
6804main ()
6805{
6806if ((short *) 0)
6807 return 0;
6808if (sizeof (short))
6809 return 0;
6810 ;
6811 return 0;
6812}
6813_ACEOF
6814rm -f conftest.$ac_objext
6815if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6816 (eval $ac_compile) 2>&5
6817 ac_status=$?
6818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6819 (exit $ac_status); } &&
6820 { ac_try='test -s conftest.$ac_objext'
6821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6822 (eval $ac_try) 2>&5
6823 ac_status=$?
6824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6825 (exit $ac_status); }; }; then
6826 ac_cv_type_short=yes
6827else
6828 echo "$as_me: failed program was:" >&5
6829cat conftest.$ac_ext >&5
6830ac_cv_type_short=no
6831fi
6832rm -f conftest.$ac_objext conftest.$ac_ext
6833fi
6834echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6835echo "${ECHO_T}$ac_cv_type_short" >&6
6836
6837echo "$as_me:$LINENO: checking size of short" >&5
6838echo $ECHO_N "checking size of short... $ECHO_C" >&6
6839if test "${ac_cv_sizeof_short+set}" = set; then
6840 echo $ECHO_N "(cached) $ECHO_C" >&6
6841else
6842 if test "$ac_cv_type_short" = yes; then
6843 # The cast to unsigned long works around a bug in the HP C Compiler
6844 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6845 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6846 # This bug is HP SR number 8606223364.
6847 if test "$cross_compiling" = yes; then
6848 # Depending upon the size, compute the lo and hi bounds.
6849cat >conftest.$ac_ext <<_ACEOF
6850#line $LINENO "configure"
6851#include "confdefs.h"
6852$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006853#ifdef F77_DUMMY_MAIN
6854# ifdef __cplusplus
6855 extern "C"
6856# endif
6857 int F77_DUMMY_MAIN() { return 1; }
6858#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006859int
6860main ()
6861{
6862static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6863test_array [0] = 0
6864
6865 ;
6866 return 0;
6867}
6868_ACEOF
6869rm -f conftest.$ac_objext
6870if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6871 (eval $ac_compile) 2>&5
6872 ac_status=$?
6873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6874 (exit $ac_status); } &&
6875 { ac_try='test -s conftest.$ac_objext'
6876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6877 (eval $ac_try) 2>&5
6878 ac_status=$?
6879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6880 (exit $ac_status); }; }; then
6881 ac_lo=0 ac_mid=0
6882 while :; do
6883 cat >conftest.$ac_ext <<_ACEOF
6884#line $LINENO "configure"
6885#include "confdefs.h"
6886$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006887#ifdef F77_DUMMY_MAIN
6888# ifdef __cplusplus
6889 extern "C"
6890# endif
6891 int F77_DUMMY_MAIN() { return 1; }
6892#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006893int
6894main ()
6895{
6896static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6897test_array [0] = 0
6898
6899 ;
6900 return 0;
6901}
6902_ACEOF
6903rm -f conftest.$ac_objext
6904if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6905 (eval $ac_compile) 2>&5
6906 ac_status=$?
6907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6908 (exit $ac_status); } &&
6909 { ac_try='test -s conftest.$ac_objext'
6910 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6911 (eval $ac_try) 2>&5
6912 ac_status=$?
6913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6914 (exit $ac_status); }; }; then
6915 ac_hi=$ac_mid; break
6916else
6917 echo "$as_me: failed program was:" >&5
6918cat conftest.$ac_ext >&5
6919ac_lo=`expr $ac_mid + 1`
6920 if test $ac_lo -le $ac_mid; then
6921 ac_lo= ac_hi=
6922 break
6923 fi
6924 ac_mid=`expr 2 '*' $ac_mid + 1`
6925fi
6926rm -f conftest.$ac_objext conftest.$ac_ext
6927 done
6928else
6929 echo "$as_me: failed program was:" >&5
6930cat conftest.$ac_ext >&5
6931cat >conftest.$ac_ext <<_ACEOF
6932#line $LINENO "configure"
6933#include "confdefs.h"
6934$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006935#ifdef F77_DUMMY_MAIN
6936# ifdef __cplusplus
6937 extern "C"
6938# endif
6939 int F77_DUMMY_MAIN() { return 1; }
6940#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006941int
6942main ()
6943{
6944static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6945test_array [0] = 0
6946
6947 ;
6948 return 0;
6949}
6950_ACEOF
6951rm -f conftest.$ac_objext
6952if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6953 (eval $ac_compile) 2>&5
6954 ac_status=$?
6955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6956 (exit $ac_status); } &&
6957 { ac_try='test -s conftest.$ac_objext'
6958 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6959 (eval $ac_try) 2>&5
6960 ac_status=$?
6961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6962 (exit $ac_status); }; }; then
6963 ac_hi=-1 ac_mid=-1
6964 while :; do
6965 cat >conftest.$ac_ext <<_ACEOF
6966#line $LINENO "configure"
6967#include "confdefs.h"
6968$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006969#ifdef F77_DUMMY_MAIN
6970# ifdef __cplusplus
6971 extern "C"
6972# endif
6973 int F77_DUMMY_MAIN() { return 1; }
6974#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006975int
6976main ()
6977{
6978static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6979test_array [0] = 0
6980
6981 ;
6982 return 0;
6983}
6984_ACEOF
6985rm -f conftest.$ac_objext
6986if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6987 (eval $ac_compile) 2>&5
6988 ac_status=$?
6989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6990 (exit $ac_status); } &&
6991 { ac_try='test -s conftest.$ac_objext'
6992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6993 (eval $ac_try) 2>&5
6994 ac_status=$?
6995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6996 (exit $ac_status); }; }; then
6997 ac_lo=$ac_mid; break
6998else
6999 echo "$as_me: failed program was:" >&5
7000cat conftest.$ac_ext >&5
7001ac_hi=`expr '(' $ac_mid ')' - 1`
7002 if test $ac_mid -le $ac_hi; then
7003 ac_lo= ac_hi=
7004 break
7005 fi
7006 ac_mid=`expr 2 '*' $ac_mid`
7007fi
7008rm -f conftest.$ac_objext conftest.$ac_ext
7009 done
7010else
7011 echo "$as_me: failed program was:" >&5
7012cat conftest.$ac_ext >&5
7013ac_lo= ac_hi=
7014fi
7015rm -f conftest.$ac_objext conftest.$ac_ext
7016fi
7017rm -f conftest.$ac_objext conftest.$ac_ext
7018# Binary search between lo and hi bounds.
7019while test "x$ac_lo" != "x$ac_hi"; do
7020 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7021 cat >conftest.$ac_ext <<_ACEOF
7022#line $LINENO "configure"
7023#include "confdefs.h"
7024$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007025#ifdef F77_DUMMY_MAIN
7026# ifdef __cplusplus
7027 extern "C"
7028# endif
7029 int F77_DUMMY_MAIN() { return 1; }
7030#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007031int
7032main ()
7033{
7034static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7035test_array [0] = 0
7036
7037 ;
7038 return 0;
7039}
7040_ACEOF
7041rm -f conftest.$ac_objext
7042if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7043 (eval $ac_compile) 2>&5
7044 ac_status=$?
7045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7046 (exit $ac_status); } &&
7047 { ac_try='test -s conftest.$ac_objext'
7048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7049 (eval $ac_try) 2>&5
7050 ac_status=$?
7051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7052 (exit $ac_status); }; }; then
7053 ac_hi=$ac_mid
7054else
7055 echo "$as_me: failed program was:" >&5
7056cat conftest.$ac_ext >&5
7057ac_lo=`expr '(' $ac_mid ')' + 1`
7058fi
7059rm -f conftest.$ac_objext conftest.$ac_ext
7060done
7061case $ac_lo in
7062?*) ac_cv_sizeof_short=$ac_lo;;
7063'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
7064echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
7065 { (exit 1); exit 1; }; } ;;
7066esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007067else
7068 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007069 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7070echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7071 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007072else
Martin v. Löwis11437992002-04-12 09:54:03 +00007073 cat >conftest.$ac_ext <<_ACEOF
7074#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007075#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007076$ac_includes_default
7077long longval () { return (long) (sizeof (short)); }
7078unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007079#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007080#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00007081#ifdef F77_DUMMY_MAIN
7082# ifdef __cplusplus
7083 extern "C"
7084# endif
7085 int F77_DUMMY_MAIN() { return 1; }
7086#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007087int
7088main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007089{
Martin v. Löwis11437992002-04-12 09:54:03 +00007090
7091 FILE *f = fopen ("conftest.val", "w");
7092 if (! f)
7093 exit (1);
7094 if (((long) (sizeof (short))) < 0)
7095 {
7096 long i = longval ();
7097 if (i != ((long) (sizeof (short))))
7098 exit (1);
7099 fprintf (f, "%ld\n", i);
7100 }
7101 else
7102 {
7103 unsigned long i = ulongval ();
7104 if (i != ((long) (sizeof (short))))
7105 exit (1);
7106 fprintf (f, "%lu\n", i);
7107 }
7108 exit (ferror (f) || fclose (f) != 0);
7109
7110 ;
7111 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007112}
Martin v. Löwis11437992002-04-12 09:54:03 +00007113_ACEOF
7114rm -f conftest$ac_exeext
7115if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7116 (eval $ac_link) 2>&5
7117 ac_status=$?
7118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7119 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7120 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7121 (eval $ac_try) 2>&5
7122 ac_status=$?
7123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7124 (exit $ac_status); }; }; then
7125 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007126else
Martin v. Löwis11437992002-04-12 09:54:03 +00007127 echo "$as_me: program exited with status $ac_status" >&5
7128echo "$as_me: failed program was:" >&5
7129cat conftest.$ac_ext >&5
7130( exit $ac_status )
7131{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
7132echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
7133 { (exit 1); exit 1; }; }
7134fi
Barry Warsawfe33b792003-01-07 22:42:49 +00007135rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007136fi
7137fi
7138rm -f conftest.val
7139else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007140 ac_cv_sizeof_short=0
7141fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007142fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007143echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7144echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7145cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007146#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007147_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007148
7149
Martin v. Löwis11437992002-04-12 09:54:03 +00007150echo "$as_me:$LINENO: checking for float" >&5
7151echo $ECHO_N "checking for float... $ECHO_C" >&6
7152if test "${ac_cv_type_float+set}" = set; then
7153 echo $ECHO_N "(cached) $ECHO_C" >&6
7154else
7155 cat >conftest.$ac_ext <<_ACEOF
7156#line $LINENO "configure"
7157#include "confdefs.h"
7158$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007159#ifdef F77_DUMMY_MAIN
7160# ifdef __cplusplus
7161 extern "C"
7162# endif
7163 int F77_DUMMY_MAIN() { return 1; }
7164#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007165int
7166main ()
7167{
7168if ((float *) 0)
7169 return 0;
7170if (sizeof (float))
7171 return 0;
7172 ;
7173 return 0;
7174}
7175_ACEOF
7176rm -f conftest.$ac_objext
7177if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7178 (eval $ac_compile) 2>&5
7179 ac_status=$?
7180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7181 (exit $ac_status); } &&
7182 { ac_try='test -s conftest.$ac_objext'
7183 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7184 (eval $ac_try) 2>&5
7185 ac_status=$?
7186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7187 (exit $ac_status); }; }; then
7188 ac_cv_type_float=yes
7189else
7190 echo "$as_me: failed program was:" >&5
7191cat conftest.$ac_ext >&5
7192ac_cv_type_float=no
7193fi
7194rm -f conftest.$ac_objext conftest.$ac_ext
7195fi
7196echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7197echo "${ECHO_T}$ac_cv_type_float" >&6
7198
7199echo "$as_me:$LINENO: checking size of float" >&5
7200echo $ECHO_N "checking size of float... $ECHO_C" >&6
7201if test "${ac_cv_sizeof_float+set}" = set; then
7202 echo $ECHO_N "(cached) $ECHO_C" >&6
7203else
7204 if test "$ac_cv_type_float" = yes; then
7205 # The cast to unsigned long works around a bug in the HP C Compiler
7206 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7207 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7208 # This bug is HP SR number 8606223364.
7209 if test "$cross_compiling" = yes; then
7210 # Depending upon the size, compute the lo and hi bounds.
7211cat >conftest.$ac_ext <<_ACEOF
7212#line $LINENO "configure"
7213#include "confdefs.h"
7214$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007215#ifdef F77_DUMMY_MAIN
7216# ifdef __cplusplus
7217 extern "C"
7218# endif
7219 int F77_DUMMY_MAIN() { return 1; }
7220#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007221int
7222main ()
7223{
7224static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7225test_array [0] = 0
7226
7227 ;
7228 return 0;
7229}
7230_ACEOF
7231rm -f conftest.$ac_objext
7232if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7233 (eval $ac_compile) 2>&5
7234 ac_status=$?
7235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7236 (exit $ac_status); } &&
7237 { ac_try='test -s conftest.$ac_objext'
7238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7239 (eval $ac_try) 2>&5
7240 ac_status=$?
7241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7242 (exit $ac_status); }; }; then
7243 ac_lo=0 ac_mid=0
7244 while :; do
7245 cat >conftest.$ac_ext <<_ACEOF
7246#line $LINENO "configure"
7247#include "confdefs.h"
7248$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007249#ifdef F77_DUMMY_MAIN
7250# ifdef __cplusplus
7251 extern "C"
7252# endif
7253 int F77_DUMMY_MAIN() { return 1; }
7254#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007255int
7256main ()
7257{
7258static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7259test_array [0] = 0
7260
7261 ;
7262 return 0;
7263}
7264_ACEOF
7265rm -f conftest.$ac_objext
7266if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7267 (eval $ac_compile) 2>&5
7268 ac_status=$?
7269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7270 (exit $ac_status); } &&
7271 { ac_try='test -s conftest.$ac_objext'
7272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7273 (eval $ac_try) 2>&5
7274 ac_status=$?
7275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7276 (exit $ac_status); }; }; then
7277 ac_hi=$ac_mid; break
7278else
7279 echo "$as_me: failed program was:" >&5
7280cat conftest.$ac_ext >&5
7281ac_lo=`expr $ac_mid + 1`
7282 if test $ac_lo -le $ac_mid; then
7283 ac_lo= ac_hi=
7284 break
7285 fi
7286 ac_mid=`expr 2 '*' $ac_mid + 1`
7287fi
7288rm -f conftest.$ac_objext conftest.$ac_ext
7289 done
7290else
7291 echo "$as_me: failed program was:" >&5
7292cat conftest.$ac_ext >&5
7293cat >conftest.$ac_ext <<_ACEOF
7294#line $LINENO "configure"
7295#include "confdefs.h"
7296$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007297#ifdef F77_DUMMY_MAIN
7298# ifdef __cplusplus
7299 extern "C"
7300# endif
7301 int F77_DUMMY_MAIN() { return 1; }
7302#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007303int
7304main ()
7305{
7306static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7307test_array [0] = 0
7308
7309 ;
7310 return 0;
7311}
7312_ACEOF
7313rm -f conftest.$ac_objext
7314if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7315 (eval $ac_compile) 2>&5
7316 ac_status=$?
7317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7318 (exit $ac_status); } &&
7319 { ac_try='test -s conftest.$ac_objext'
7320 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7321 (eval $ac_try) 2>&5
7322 ac_status=$?
7323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7324 (exit $ac_status); }; }; then
7325 ac_hi=-1 ac_mid=-1
7326 while :; do
7327 cat >conftest.$ac_ext <<_ACEOF
7328#line $LINENO "configure"
7329#include "confdefs.h"
7330$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007331#ifdef F77_DUMMY_MAIN
7332# ifdef __cplusplus
7333 extern "C"
7334# endif
7335 int F77_DUMMY_MAIN() { return 1; }
7336#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007337int
7338main ()
7339{
7340static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7341test_array [0] = 0
7342
7343 ;
7344 return 0;
7345}
7346_ACEOF
7347rm -f conftest.$ac_objext
7348if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7349 (eval $ac_compile) 2>&5
7350 ac_status=$?
7351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7352 (exit $ac_status); } &&
7353 { ac_try='test -s conftest.$ac_objext'
7354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7355 (eval $ac_try) 2>&5
7356 ac_status=$?
7357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7358 (exit $ac_status); }; }; then
7359 ac_lo=$ac_mid; break
7360else
7361 echo "$as_me: failed program was:" >&5
7362cat conftest.$ac_ext >&5
7363ac_hi=`expr '(' $ac_mid ')' - 1`
7364 if test $ac_mid -le $ac_hi; then
7365 ac_lo= ac_hi=
7366 break
7367 fi
7368 ac_mid=`expr 2 '*' $ac_mid`
7369fi
7370rm -f conftest.$ac_objext conftest.$ac_ext
7371 done
7372else
7373 echo "$as_me: failed program was:" >&5
7374cat conftest.$ac_ext >&5
7375ac_lo= ac_hi=
7376fi
7377rm -f conftest.$ac_objext conftest.$ac_ext
7378fi
7379rm -f conftest.$ac_objext conftest.$ac_ext
7380# Binary search between lo and hi bounds.
7381while test "x$ac_lo" != "x$ac_hi"; do
7382 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7383 cat >conftest.$ac_ext <<_ACEOF
7384#line $LINENO "configure"
7385#include "confdefs.h"
7386$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007387#ifdef F77_DUMMY_MAIN
7388# ifdef __cplusplus
7389 extern "C"
7390# endif
7391 int F77_DUMMY_MAIN() { return 1; }
7392#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007393int
7394main ()
7395{
7396static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7397test_array [0] = 0
7398
7399 ;
7400 return 0;
7401}
7402_ACEOF
7403rm -f conftest.$ac_objext
7404if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7405 (eval $ac_compile) 2>&5
7406 ac_status=$?
7407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7408 (exit $ac_status); } &&
7409 { ac_try='test -s conftest.$ac_objext'
7410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7411 (eval $ac_try) 2>&5
7412 ac_status=$?
7413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7414 (exit $ac_status); }; }; then
7415 ac_hi=$ac_mid
7416else
7417 echo "$as_me: failed program was:" >&5
7418cat conftest.$ac_ext >&5
7419ac_lo=`expr '(' $ac_mid ')' + 1`
7420fi
7421rm -f conftest.$ac_objext conftest.$ac_ext
7422done
7423case $ac_lo in
7424?*) ac_cv_sizeof_float=$ac_lo;;
7425'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7426echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7427 { (exit 1); exit 1; }; } ;;
7428esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007429else
7430 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007431 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7432echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7433 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007434else
Martin v. Löwis11437992002-04-12 09:54:03 +00007435 cat >conftest.$ac_ext <<_ACEOF
7436#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007437#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007438$ac_includes_default
7439long longval () { return (long) (sizeof (float)); }
7440unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007441#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007442#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00007443#ifdef F77_DUMMY_MAIN
7444# ifdef __cplusplus
7445 extern "C"
7446# endif
7447 int F77_DUMMY_MAIN() { return 1; }
7448#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007449int
7450main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007451{
Martin v. Löwis11437992002-04-12 09:54:03 +00007452
7453 FILE *f = fopen ("conftest.val", "w");
7454 if (! f)
7455 exit (1);
7456 if (((long) (sizeof (float))) < 0)
7457 {
7458 long i = longval ();
7459 if (i != ((long) (sizeof (float))))
7460 exit (1);
7461 fprintf (f, "%ld\n", i);
7462 }
7463 else
7464 {
7465 unsigned long i = ulongval ();
7466 if (i != ((long) (sizeof (float))))
7467 exit (1);
7468 fprintf (f, "%lu\n", i);
7469 }
7470 exit (ferror (f) || fclose (f) != 0);
7471
7472 ;
7473 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007474}
Martin v. Löwis11437992002-04-12 09:54:03 +00007475_ACEOF
7476rm -f conftest$ac_exeext
7477if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7478 (eval $ac_link) 2>&5
7479 ac_status=$?
7480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7481 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7482 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7483 (eval $ac_try) 2>&5
7484 ac_status=$?
7485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7486 (exit $ac_status); }; }; then
7487 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007488else
Martin v. Löwis11437992002-04-12 09:54:03 +00007489 echo "$as_me: program exited with status $ac_status" >&5
7490echo "$as_me: failed program was:" >&5
7491cat conftest.$ac_ext >&5
7492( exit $ac_status )
7493{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7494echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7495 { (exit 1); exit 1; }; }
7496fi
Barry Warsawfe33b792003-01-07 22:42:49 +00007497rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007498fi
7499fi
7500rm -f conftest.val
7501else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007502 ac_cv_sizeof_float=0
7503fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007504fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007505echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7506echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7507cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007508#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007509_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007510
7511
Martin v. Löwis11437992002-04-12 09:54:03 +00007512echo "$as_me:$LINENO: checking for double" >&5
7513echo $ECHO_N "checking for double... $ECHO_C" >&6
7514if test "${ac_cv_type_double+set}" = set; then
7515 echo $ECHO_N "(cached) $ECHO_C" >&6
7516else
7517 cat >conftest.$ac_ext <<_ACEOF
7518#line $LINENO "configure"
7519#include "confdefs.h"
7520$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007521#ifdef F77_DUMMY_MAIN
7522# ifdef __cplusplus
7523 extern "C"
7524# endif
7525 int F77_DUMMY_MAIN() { return 1; }
7526#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007527int
7528main ()
7529{
7530if ((double *) 0)
7531 return 0;
7532if (sizeof (double))
7533 return 0;
7534 ;
7535 return 0;
7536}
7537_ACEOF
7538rm -f conftest.$ac_objext
7539if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7540 (eval $ac_compile) 2>&5
7541 ac_status=$?
7542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7543 (exit $ac_status); } &&
7544 { ac_try='test -s conftest.$ac_objext'
7545 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7546 (eval $ac_try) 2>&5
7547 ac_status=$?
7548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7549 (exit $ac_status); }; }; then
7550 ac_cv_type_double=yes
7551else
7552 echo "$as_me: failed program was:" >&5
7553cat conftest.$ac_ext >&5
7554ac_cv_type_double=no
7555fi
7556rm -f conftest.$ac_objext conftest.$ac_ext
7557fi
7558echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7559echo "${ECHO_T}$ac_cv_type_double" >&6
7560
7561echo "$as_me:$LINENO: checking size of double" >&5
7562echo $ECHO_N "checking size of double... $ECHO_C" >&6
7563if test "${ac_cv_sizeof_double+set}" = set; then
7564 echo $ECHO_N "(cached) $ECHO_C" >&6
7565else
7566 if test "$ac_cv_type_double" = yes; then
7567 # The cast to unsigned long works around a bug in the HP C Compiler
7568 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7569 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7570 # This bug is HP SR number 8606223364.
7571 if test "$cross_compiling" = yes; then
7572 # Depending upon the size, compute the lo and hi bounds.
7573cat >conftest.$ac_ext <<_ACEOF
7574#line $LINENO "configure"
7575#include "confdefs.h"
7576$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007577#ifdef F77_DUMMY_MAIN
7578# ifdef __cplusplus
7579 extern "C"
7580# endif
7581 int F77_DUMMY_MAIN() { return 1; }
7582#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007583int
7584main ()
7585{
7586static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7587test_array [0] = 0
7588
7589 ;
7590 return 0;
7591}
7592_ACEOF
7593rm -f conftest.$ac_objext
7594if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7595 (eval $ac_compile) 2>&5
7596 ac_status=$?
7597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7598 (exit $ac_status); } &&
7599 { ac_try='test -s conftest.$ac_objext'
7600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7601 (eval $ac_try) 2>&5
7602 ac_status=$?
7603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7604 (exit $ac_status); }; }; then
7605 ac_lo=0 ac_mid=0
7606 while :; do
7607 cat >conftest.$ac_ext <<_ACEOF
7608#line $LINENO "configure"
7609#include "confdefs.h"
7610$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007611#ifdef F77_DUMMY_MAIN
7612# ifdef __cplusplus
7613 extern "C"
7614# endif
7615 int F77_DUMMY_MAIN() { return 1; }
7616#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007617int
7618main ()
7619{
7620static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7621test_array [0] = 0
7622
7623 ;
7624 return 0;
7625}
7626_ACEOF
7627rm -f conftest.$ac_objext
7628if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7629 (eval $ac_compile) 2>&5
7630 ac_status=$?
7631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7632 (exit $ac_status); } &&
7633 { ac_try='test -s conftest.$ac_objext'
7634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7635 (eval $ac_try) 2>&5
7636 ac_status=$?
7637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7638 (exit $ac_status); }; }; then
7639 ac_hi=$ac_mid; break
7640else
7641 echo "$as_me: failed program was:" >&5
7642cat conftest.$ac_ext >&5
7643ac_lo=`expr $ac_mid + 1`
7644 if test $ac_lo -le $ac_mid; then
7645 ac_lo= ac_hi=
7646 break
7647 fi
7648 ac_mid=`expr 2 '*' $ac_mid + 1`
7649fi
7650rm -f conftest.$ac_objext conftest.$ac_ext
7651 done
7652else
7653 echo "$as_me: failed program was:" >&5
7654cat conftest.$ac_ext >&5
7655cat >conftest.$ac_ext <<_ACEOF
7656#line $LINENO "configure"
7657#include "confdefs.h"
7658$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007659#ifdef F77_DUMMY_MAIN
7660# ifdef __cplusplus
7661 extern "C"
7662# endif
7663 int F77_DUMMY_MAIN() { return 1; }
7664#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007665int
7666main ()
7667{
7668static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7669test_array [0] = 0
7670
7671 ;
7672 return 0;
7673}
7674_ACEOF
7675rm -f conftest.$ac_objext
7676if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7677 (eval $ac_compile) 2>&5
7678 ac_status=$?
7679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7680 (exit $ac_status); } &&
7681 { ac_try='test -s conftest.$ac_objext'
7682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7683 (eval $ac_try) 2>&5
7684 ac_status=$?
7685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7686 (exit $ac_status); }; }; then
7687 ac_hi=-1 ac_mid=-1
7688 while :; do
7689 cat >conftest.$ac_ext <<_ACEOF
7690#line $LINENO "configure"
7691#include "confdefs.h"
7692$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007693#ifdef F77_DUMMY_MAIN
7694# ifdef __cplusplus
7695 extern "C"
7696# endif
7697 int F77_DUMMY_MAIN() { return 1; }
7698#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007699int
7700main ()
7701{
7702static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7703test_array [0] = 0
7704
7705 ;
7706 return 0;
7707}
7708_ACEOF
7709rm -f conftest.$ac_objext
7710if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7711 (eval $ac_compile) 2>&5
7712 ac_status=$?
7713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7714 (exit $ac_status); } &&
7715 { ac_try='test -s conftest.$ac_objext'
7716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7717 (eval $ac_try) 2>&5
7718 ac_status=$?
7719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7720 (exit $ac_status); }; }; then
7721 ac_lo=$ac_mid; break
7722else
7723 echo "$as_me: failed program was:" >&5
7724cat conftest.$ac_ext >&5
7725ac_hi=`expr '(' $ac_mid ')' - 1`
7726 if test $ac_mid -le $ac_hi; then
7727 ac_lo= ac_hi=
7728 break
7729 fi
7730 ac_mid=`expr 2 '*' $ac_mid`
7731fi
7732rm -f conftest.$ac_objext conftest.$ac_ext
7733 done
7734else
7735 echo "$as_me: failed program was:" >&5
7736cat conftest.$ac_ext >&5
7737ac_lo= ac_hi=
7738fi
7739rm -f conftest.$ac_objext conftest.$ac_ext
7740fi
7741rm -f conftest.$ac_objext conftest.$ac_ext
7742# Binary search between lo and hi bounds.
7743while test "x$ac_lo" != "x$ac_hi"; do
7744 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7745 cat >conftest.$ac_ext <<_ACEOF
7746#line $LINENO "configure"
7747#include "confdefs.h"
7748$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007749#ifdef F77_DUMMY_MAIN
7750# ifdef __cplusplus
7751 extern "C"
7752# endif
7753 int F77_DUMMY_MAIN() { return 1; }
7754#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007755int
7756main ()
7757{
7758static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7759test_array [0] = 0
7760
7761 ;
7762 return 0;
7763}
7764_ACEOF
7765rm -f conftest.$ac_objext
7766if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7767 (eval $ac_compile) 2>&5
7768 ac_status=$?
7769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7770 (exit $ac_status); } &&
7771 { ac_try='test -s conftest.$ac_objext'
7772 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7773 (eval $ac_try) 2>&5
7774 ac_status=$?
7775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7776 (exit $ac_status); }; }; then
7777 ac_hi=$ac_mid
7778else
7779 echo "$as_me: failed program was:" >&5
7780cat conftest.$ac_ext >&5
7781ac_lo=`expr '(' $ac_mid ')' + 1`
7782fi
7783rm -f conftest.$ac_objext conftest.$ac_ext
7784done
7785case $ac_lo in
7786?*) ac_cv_sizeof_double=$ac_lo;;
7787'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7788echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7789 { (exit 1); exit 1; }; } ;;
7790esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007791else
7792 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007793 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7794echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7795 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007796else
Martin v. Löwis11437992002-04-12 09:54:03 +00007797 cat >conftest.$ac_ext <<_ACEOF
7798#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007799#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007800$ac_includes_default
7801long longval () { return (long) (sizeof (double)); }
7802unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007803#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007804#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00007805#ifdef F77_DUMMY_MAIN
7806# ifdef __cplusplus
7807 extern "C"
7808# endif
7809 int F77_DUMMY_MAIN() { return 1; }
7810#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007811int
7812main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007813{
Martin v. Löwis11437992002-04-12 09:54:03 +00007814
7815 FILE *f = fopen ("conftest.val", "w");
7816 if (! f)
7817 exit (1);
7818 if (((long) (sizeof (double))) < 0)
7819 {
7820 long i = longval ();
7821 if (i != ((long) (sizeof (double))))
7822 exit (1);
7823 fprintf (f, "%ld\n", i);
7824 }
7825 else
7826 {
7827 unsigned long i = ulongval ();
7828 if (i != ((long) (sizeof (double))))
7829 exit (1);
7830 fprintf (f, "%lu\n", i);
7831 }
7832 exit (ferror (f) || fclose (f) != 0);
7833
7834 ;
7835 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007836}
Martin v. Löwis11437992002-04-12 09:54:03 +00007837_ACEOF
7838rm -f conftest$ac_exeext
7839if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7840 (eval $ac_link) 2>&5
7841 ac_status=$?
7842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7843 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7844 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7845 (eval $ac_try) 2>&5
7846 ac_status=$?
7847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7848 (exit $ac_status); }; }; then
7849 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007850else
Martin v. Löwis11437992002-04-12 09:54:03 +00007851 echo "$as_me: program exited with status $ac_status" >&5
7852echo "$as_me: failed program was:" >&5
7853cat conftest.$ac_ext >&5
7854( exit $ac_status )
7855{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7856echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7857 { (exit 1); exit 1; }; }
7858fi
Barry Warsawfe33b792003-01-07 22:42:49 +00007859rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007860fi
7861fi
7862rm -f conftest.val
7863else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007864 ac_cv_sizeof_double=0
7865fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007866fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007867echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7868echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7869cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007870#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007871_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007872
7873
Martin v. Löwis11437992002-04-12 09:54:03 +00007874echo "$as_me:$LINENO: checking for fpos_t" >&5
7875echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7876if test "${ac_cv_type_fpos_t+set}" = set; then
7877 echo $ECHO_N "(cached) $ECHO_C" >&6
7878else
7879 cat >conftest.$ac_ext <<_ACEOF
7880#line $LINENO "configure"
7881#include "confdefs.h"
7882$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007883#ifdef F77_DUMMY_MAIN
7884# ifdef __cplusplus
7885 extern "C"
7886# endif
7887 int F77_DUMMY_MAIN() { return 1; }
7888#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007889int
7890main ()
7891{
7892if ((fpos_t *) 0)
7893 return 0;
7894if (sizeof (fpos_t))
7895 return 0;
7896 ;
7897 return 0;
7898}
7899_ACEOF
7900rm -f conftest.$ac_objext
7901if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7902 (eval $ac_compile) 2>&5
7903 ac_status=$?
7904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7905 (exit $ac_status); } &&
7906 { ac_try='test -s conftest.$ac_objext'
7907 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7908 (eval $ac_try) 2>&5
7909 ac_status=$?
7910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7911 (exit $ac_status); }; }; then
7912 ac_cv_type_fpos_t=yes
7913else
7914 echo "$as_me: failed program was:" >&5
7915cat conftest.$ac_ext >&5
7916ac_cv_type_fpos_t=no
7917fi
7918rm -f conftest.$ac_objext conftest.$ac_ext
7919fi
7920echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7921echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7922
7923echo "$as_me:$LINENO: checking size of fpos_t" >&5
7924echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7925if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7926 echo $ECHO_N "(cached) $ECHO_C" >&6
7927else
7928 if test "$ac_cv_type_fpos_t" = yes; then
7929 # The cast to unsigned long works around a bug in the HP C Compiler
7930 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7931 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7932 # This bug is HP SR number 8606223364.
7933 if test "$cross_compiling" = yes; then
7934 # Depending upon the size, compute the lo and hi bounds.
7935cat >conftest.$ac_ext <<_ACEOF
7936#line $LINENO "configure"
7937#include "confdefs.h"
7938$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007939#ifdef F77_DUMMY_MAIN
7940# ifdef __cplusplus
7941 extern "C"
7942# endif
7943 int F77_DUMMY_MAIN() { return 1; }
7944#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007945int
7946main ()
7947{
7948static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7949test_array [0] = 0
7950
7951 ;
7952 return 0;
7953}
7954_ACEOF
7955rm -f conftest.$ac_objext
7956if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7957 (eval $ac_compile) 2>&5
7958 ac_status=$?
7959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7960 (exit $ac_status); } &&
7961 { ac_try='test -s conftest.$ac_objext'
7962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7963 (eval $ac_try) 2>&5
7964 ac_status=$?
7965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7966 (exit $ac_status); }; }; then
7967 ac_lo=0 ac_mid=0
7968 while :; do
7969 cat >conftest.$ac_ext <<_ACEOF
7970#line $LINENO "configure"
7971#include "confdefs.h"
7972$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007973#ifdef F77_DUMMY_MAIN
7974# ifdef __cplusplus
7975 extern "C"
7976# endif
7977 int F77_DUMMY_MAIN() { return 1; }
7978#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007979int
7980main ()
7981{
7982static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7983test_array [0] = 0
7984
7985 ;
7986 return 0;
7987}
7988_ACEOF
7989rm -f conftest.$ac_objext
7990if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7991 (eval $ac_compile) 2>&5
7992 ac_status=$?
7993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7994 (exit $ac_status); } &&
7995 { ac_try='test -s conftest.$ac_objext'
7996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7997 (eval $ac_try) 2>&5
7998 ac_status=$?
7999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8000 (exit $ac_status); }; }; then
8001 ac_hi=$ac_mid; break
8002else
8003 echo "$as_me: failed program was:" >&5
8004cat conftest.$ac_ext >&5
8005ac_lo=`expr $ac_mid + 1`
8006 if test $ac_lo -le $ac_mid; then
8007 ac_lo= ac_hi=
8008 break
8009 fi
8010 ac_mid=`expr 2 '*' $ac_mid + 1`
8011fi
8012rm -f conftest.$ac_objext conftest.$ac_ext
8013 done
8014else
8015 echo "$as_me: failed program was:" >&5
8016cat conftest.$ac_ext >&5
8017cat >conftest.$ac_ext <<_ACEOF
8018#line $LINENO "configure"
8019#include "confdefs.h"
8020$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008021#ifdef F77_DUMMY_MAIN
8022# ifdef __cplusplus
8023 extern "C"
8024# endif
8025 int F77_DUMMY_MAIN() { return 1; }
8026#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008027int
8028main ()
8029{
8030static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
8031test_array [0] = 0
8032
8033 ;
8034 return 0;
8035}
8036_ACEOF
8037rm -f conftest.$ac_objext
8038if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8039 (eval $ac_compile) 2>&5
8040 ac_status=$?
8041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8042 (exit $ac_status); } &&
8043 { ac_try='test -s conftest.$ac_objext'
8044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8045 (eval $ac_try) 2>&5
8046 ac_status=$?
8047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8048 (exit $ac_status); }; }; then
8049 ac_hi=-1 ac_mid=-1
8050 while :; do
8051 cat >conftest.$ac_ext <<_ACEOF
8052#line $LINENO "configure"
8053#include "confdefs.h"
8054$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008055#ifdef F77_DUMMY_MAIN
8056# ifdef __cplusplus
8057 extern "C"
8058# endif
8059 int F77_DUMMY_MAIN() { return 1; }
8060#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008061int
8062main ()
8063{
8064static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8065test_array [0] = 0
8066
8067 ;
8068 return 0;
8069}
8070_ACEOF
8071rm -f conftest.$ac_objext
8072if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8073 (eval $ac_compile) 2>&5
8074 ac_status=$?
8075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8076 (exit $ac_status); } &&
8077 { ac_try='test -s conftest.$ac_objext'
8078 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8079 (eval $ac_try) 2>&5
8080 ac_status=$?
8081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8082 (exit $ac_status); }; }; then
8083 ac_lo=$ac_mid; break
8084else
8085 echo "$as_me: failed program was:" >&5
8086cat conftest.$ac_ext >&5
8087ac_hi=`expr '(' $ac_mid ')' - 1`
8088 if test $ac_mid -le $ac_hi; then
8089 ac_lo= ac_hi=
8090 break
8091 fi
8092 ac_mid=`expr 2 '*' $ac_mid`
8093fi
8094rm -f conftest.$ac_objext conftest.$ac_ext
8095 done
8096else
8097 echo "$as_me: failed program was:" >&5
8098cat conftest.$ac_ext >&5
8099ac_lo= ac_hi=
8100fi
8101rm -f conftest.$ac_objext conftest.$ac_ext
8102fi
8103rm -f conftest.$ac_objext conftest.$ac_ext
8104# Binary search between lo and hi bounds.
8105while test "x$ac_lo" != "x$ac_hi"; do
8106 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8107 cat >conftest.$ac_ext <<_ACEOF
8108#line $LINENO "configure"
8109#include "confdefs.h"
8110$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008111#ifdef F77_DUMMY_MAIN
8112# ifdef __cplusplus
8113 extern "C"
8114# endif
8115 int F77_DUMMY_MAIN() { return 1; }
8116#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008117int
8118main ()
8119{
8120static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8121test_array [0] = 0
8122
8123 ;
8124 return 0;
8125}
8126_ACEOF
8127rm -f conftest.$ac_objext
8128if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8129 (eval $ac_compile) 2>&5
8130 ac_status=$?
8131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8132 (exit $ac_status); } &&
8133 { ac_try='test -s conftest.$ac_objext'
8134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8135 (eval $ac_try) 2>&5
8136 ac_status=$?
8137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8138 (exit $ac_status); }; }; then
8139 ac_hi=$ac_mid
8140else
8141 echo "$as_me: failed program was:" >&5
8142cat conftest.$ac_ext >&5
8143ac_lo=`expr '(' $ac_mid ')' + 1`
8144fi
8145rm -f conftest.$ac_objext conftest.$ac_ext
8146done
8147case $ac_lo in
8148?*) ac_cv_sizeof_fpos_t=$ac_lo;;
8149'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8150echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
8151 { (exit 1); exit 1; }; } ;;
8152esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008153else
8154 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008155 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8156echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8157 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008158else
Martin v. Löwis11437992002-04-12 09:54:03 +00008159 cat >conftest.$ac_ext <<_ACEOF
8160#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008161#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008162$ac_includes_default
8163long longval () { return (long) (sizeof (fpos_t)); }
8164unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008165#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008166#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00008167#ifdef F77_DUMMY_MAIN
8168# ifdef __cplusplus
8169 extern "C"
8170# endif
8171 int F77_DUMMY_MAIN() { return 1; }
8172#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008173int
8174main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008175{
Martin v. Löwis11437992002-04-12 09:54:03 +00008176
8177 FILE *f = fopen ("conftest.val", "w");
8178 if (! f)
8179 exit (1);
8180 if (((long) (sizeof (fpos_t))) < 0)
8181 {
8182 long i = longval ();
8183 if (i != ((long) (sizeof (fpos_t))))
8184 exit (1);
8185 fprintf (f, "%ld\n", i);
8186 }
8187 else
8188 {
8189 unsigned long i = ulongval ();
8190 if (i != ((long) (sizeof (fpos_t))))
8191 exit (1);
8192 fprintf (f, "%lu\n", i);
8193 }
8194 exit (ferror (f) || fclose (f) != 0);
8195
8196 ;
8197 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008198}
Martin v. Löwis11437992002-04-12 09:54:03 +00008199_ACEOF
8200rm -f conftest$ac_exeext
8201if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8202 (eval $ac_link) 2>&5
8203 ac_status=$?
8204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8205 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8207 (eval $ac_try) 2>&5
8208 ac_status=$?
8209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8210 (exit $ac_status); }; }; then
8211 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008212else
Martin v. Löwis11437992002-04-12 09:54:03 +00008213 echo "$as_me: program exited with status $ac_status" >&5
8214echo "$as_me: failed program was:" >&5
8215cat conftest.$ac_ext >&5
8216( exit $ac_status )
8217{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8218echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
8219 { (exit 1); exit 1; }; }
8220fi
Barry Warsawfe33b792003-01-07 22:42:49 +00008221rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008222fi
8223fi
8224rm -f conftest.val
8225else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008226 ac_cv_sizeof_fpos_t=0
8227fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008228fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008229echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8230echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8231cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008232#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008233_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008234
Michael W. Hudson54241132001-12-07 15:38:26 +00008235
8236
Martin v. Löwis11437992002-04-12 09:54:03 +00008237echo "$as_me:$LINENO: checking for long long support" >&5
8238echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008239have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008240cat >conftest.$ac_ext <<_ACEOF
8241#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008242#include "confdefs.h"
8243
Barry Warsawfe33b792003-01-07 22:42:49 +00008244#ifdef F77_DUMMY_MAIN
8245# ifdef __cplusplus
8246 extern "C"
8247# endif
8248 int F77_DUMMY_MAIN() { return 1; }
8249#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008250int
8251main ()
8252{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008253long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008254 ;
8255 return 0;
8256}
8257_ACEOF
8258rm -f conftest.$ac_objext
8259if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8260 (eval $ac_compile) 2>&5
8261 ac_status=$?
8262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8263 (exit $ac_status); } &&
8264 { ac_try='test -s conftest.$ac_objext'
8265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8266 (eval $ac_try) 2>&5
8267 ac_status=$?
8268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8269 (exit $ac_status); }; }; then
8270
8271
8272cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008273#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008274_ACEOF
8275
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008276 have_long_long=yes
8277
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008278else
Martin v. Löwis11437992002-04-12 09:54:03 +00008279 echo "$as_me: failed program was:" >&5
8280cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008281fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008282rm -f conftest.$ac_objext conftest.$ac_ext
8283echo "$as_me:$LINENO: result: $have_long_long" >&5
8284echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008285if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008286echo "$as_me:$LINENO: checking for long long" >&5
8287echo $ECHO_N "checking for long long... $ECHO_C" >&6
8288if test "${ac_cv_type_long_long+set}" = set; then
8289 echo $ECHO_N "(cached) $ECHO_C" >&6
8290else
8291 cat >conftest.$ac_ext <<_ACEOF
8292#line $LINENO "configure"
8293#include "confdefs.h"
8294$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008295#ifdef F77_DUMMY_MAIN
8296# ifdef __cplusplus
8297 extern "C"
8298# endif
8299 int F77_DUMMY_MAIN() { return 1; }
8300#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008301int
8302main ()
8303{
8304if ((long long *) 0)
8305 return 0;
8306if (sizeof (long long))
8307 return 0;
8308 ;
8309 return 0;
8310}
8311_ACEOF
8312rm -f conftest.$ac_objext
8313if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8314 (eval $ac_compile) 2>&5
8315 ac_status=$?
8316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8317 (exit $ac_status); } &&
8318 { ac_try='test -s conftest.$ac_objext'
8319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8320 (eval $ac_try) 2>&5
8321 ac_status=$?
8322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8323 (exit $ac_status); }; }; then
8324 ac_cv_type_long_long=yes
8325else
8326 echo "$as_me: failed program was:" >&5
8327cat conftest.$ac_ext >&5
8328ac_cv_type_long_long=no
8329fi
8330rm -f conftest.$ac_objext conftest.$ac_ext
8331fi
8332echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8333echo "${ECHO_T}$ac_cv_type_long_long" >&6
8334
8335echo "$as_me:$LINENO: checking size of long long" >&5
8336echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8337if test "${ac_cv_sizeof_long_long+set}" = set; then
8338 echo $ECHO_N "(cached) $ECHO_C" >&6
8339else
8340 if test "$ac_cv_type_long_long" = yes; then
8341 # The cast to unsigned long works around a bug in the HP C Compiler
8342 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8343 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8344 # This bug is HP SR number 8606223364.
8345 if test "$cross_compiling" = yes; then
8346 # Depending upon the size, compute the lo and hi bounds.
8347cat >conftest.$ac_ext <<_ACEOF
8348#line $LINENO "configure"
8349#include "confdefs.h"
8350$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008351#ifdef F77_DUMMY_MAIN
8352# ifdef __cplusplus
8353 extern "C"
8354# endif
8355 int F77_DUMMY_MAIN() { return 1; }
8356#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008357int
8358main ()
8359{
8360static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8361test_array [0] = 0
8362
8363 ;
8364 return 0;
8365}
8366_ACEOF
8367rm -f conftest.$ac_objext
8368if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8369 (eval $ac_compile) 2>&5
8370 ac_status=$?
8371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8372 (exit $ac_status); } &&
8373 { ac_try='test -s conftest.$ac_objext'
8374 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8375 (eval $ac_try) 2>&5
8376 ac_status=$?
8377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8378 (exit $ac_status); }; }; then
8379 ac_lo=0 ac_mid=0
8380 while :; do
8381 cat >conftest.$ac_ext <<_ACEOF
8382#line $LINENO "configure"
8383#include "confdefs.h"
8384$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008385#ifdef F77_DUMMY_MAIN
8386# ifdef __cplusplus
8387 extern "C"
8388# endif
8389 int F77_DUMMY_MAIN() { return 1; }
8390#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008391int
8392main ()
8393{
8394static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8395test_array [0] = 0
8396
8397 ;
8398 return 0;
8399}
8400_ACEOF
8401rm -f conftest.$ac_objext
8402if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8403 (eval $ac_compile) 2>&5
8404 ac_status=$?
8405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8406 (exit $ac_status); } &&
8407 { ac_try='test -s conftest.$ac_objext'
8408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8409 (eval $ac_try) 2>&5
8410 ac_status=$?
8411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8412 (exit $ac_status); }; }; then
8413 ac_hi=$ac_mid; break
8414else
8415 echo "$as_me: failed program was:" >&5
8416cat conftest.$ac_ext >&5
8417ac_lo=`expr $ac_mid + 1`
8418 if test $ac_lo -le $ac_mid; then
8419 ac_lo= ac_hi=
8420 break
8421 fi
8422 ac_mid=`expr 2 '*' $ac_mid + 1`
8423fi
8424rm -f conftest.$ac_objext conftest.$ac_ext
8425 done
8426else
8427 echo "$as_me: failed program was:" >&5
8428cat conftest.$ac_ext >&5
8429cat >conftest.$ac_ext <<_ACEOF
8430#line $LINENO "configure"
8431#include "confdefs.h"
8432$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008433#ifdef F77_DUMMY_MAIN
8434# ifdef __cplusplus
8435 extern "C"
8436# endif
8437 int F77_DUMMY_MAIN() { return 1; }
8438#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008439int
8440main ()
8441{
8442static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8443test_array [0] = 0
8444
8445 ;
8446 return 0;
8447}
8448_ACEOF
8449rm -f conftest.$ac_objext
8450if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8451 (eval $ac_compile) 2>&5
8452 ac_status=$?
8453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8454 (exit $ac_status); } &&
8455 { ac_try='test -s conftest.$ac_objext'
8456 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8457 (eval $ac_try) 2>&5
8458 ac_status=$?
8459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8460 (exit $ac_status); }; }; then
8461 ac_hi=-1 ac_mid=-1
8462 while :; do
8463 cat >conftest.$ac_ext <<_ACEOF
8464#line $LINENO "configure"
8465#include "confdefs.h"
8466$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008467#ifdef F77_DUMMY_MAIN
8468# ifdef __cplusplus
8469 extern "C"
8470# endif
8471 int F77_DUMMY_MAIN() { return 1; }
8472#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008473int
8474main ()
8475{
8476static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8477test_array [0] = 0
8478
8479 ;
8480 return 0;
8481}
8482_ACEOF
8483rm -f conftest.$ac_objext
8484if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8485 (eval $ac_compile) 2>&5
8486 ac_status=$?
8487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8488 (exit $ac_status); } &&
8489 { ac_try='test -s conftest.$ac_objext'
8490 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8491 (eval $ac_try) 2>&5
8492 ac_status=$?
8493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8494 (exit $ac_status); }; }; then
8495 ac_lo=$ac_mid; break
8496else
8497 echo "$as_me: failed program was:" >&5
8498cat conftest.$ac_ext >&5
8499ac_hi=`expr '(' $ac_mid ')' - 1`
8500 if test $ac_mid -le $ac_hi; then
8501 ac_lo= ac_hi=
8502 break
8503 fi
8504 ac_mid=`expr 2 '*' $ac_mid`
8505fi
8506rm -f conftest.$ac_objext conftest.$ac_ext
8507 done
8508else
8509 echo "$as_me: failed program was:" >&5
8510cat conftest.$ac_ext >&5
8511ac_lo= ac_hi=
8512fi
8513rm -f conftest.$ac_objext conftest.$ac_ext
8514fi
8515rm -f conftest.$ac_objext conftest.$ac_ext
8516# Binary search between lo and hi bounds.
8517while test "x$ac_lo" != "x$ac_hi"; do
8518 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8519 cat >conftest.$ac_ext <<_ACEOF
8520#line $LINENO "configure"
8521#include "confdefs.h"
8522$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008523#ifdef F77_DUMMY_MAIN
8524# ifdef __cplusplus
8525 extern "C"
8526# endif
8527 int F77_DUMMY_MAIN() { return 1; }
8528#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008529int
8530main ()
8531{
8532static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8533test_array [0] = 0
8534
8535 ;
8536 return 0;
8537}
8538_ACEOF
8539rm -f conftest.$ac_objext
8540if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8541 (eval $ac_compile) 2>&5
8542 ac_status=$?
8543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8544 (exit $ac_status); } &&
8545 { ac_try='test -s conftest.$ac_objext'
8546 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8547 (eval $ac_try) 2>&5
8548 ac_status=$?
8549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8550 (exit $ac_status); }; }; then
8551 ac_hi=$ac_mid
8552else
8553 echo "$as_me: failed program was:" >&5
8554cat conftest.$ac_ext >&5
8555ac_lo=`expr '(' $ac_mid ')' + 1`
8556fi
8557rm -f conftest.$ac_objext conftest.$ac_ext
8558done
8559case $ac_lo in
8560?*) ac_cv_sizeof_long_long=$ac_lo;;
8561'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8562echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8563 { (exit 1); exit 1; }; } ;;
8564esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008565else
8566 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008567 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8568echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8569 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008570else
Martin v. Löwis11437992002-04-12 09:54:03 +00008571 cat >conftest.$ac_ext <<_ACEOF
8572#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008573#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008574$ac_includes_default
8575long longval () { return (long) (sizeof (long long)); }
8576unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008577#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008578#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00008579#ifdef F77_DUMMY_MAIN
8580# ifdef __cplusplus
8581 extern "C"
8582# endif
8583 int F77_DUMMY_MAIN() { return 1; }
8584#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008585int
8586main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008587{
Martin v. Löwis11437992002-04-12 09:54:03 +00008588
8589 FILE *f = fopen ("conftest.val", "w");
8590 if (! f)
8591 exit (1);
8592 if (((long) (sizeof (long long))) < 0)
8593 {
8594 long i = longval ();
8595 if (i != ((long) (sizeof (long long))))
8596 exit (1);
8597 fprintf (f, "%ld\n", i);
8598 }
8599 else
8600 {
8601 unsigned long i = ulongval ();
8602 if (i != ((long) (sizeof (long long))))
8603 exit (1);
8604 fprintf (f, "%lu\n", i);
8605 }
8606 exit (ferror (f) || fclose (f) != 0);
8607
8608 ;
8609 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008610}
Martin v. Löwis11437992002-04-12 09:54:03 +00008611_ACEOF
8612rm -f conftest$ac_exeext
8613if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8614 (eval $ac_link) 2>&5
8615 ac_status=$?
8616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8617 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8618 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8619 (eval $ac_try) 2>&5
8620 ac_status=$?
8621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8622 (exit $ac_status); }; }; then
8623 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008624else
Martin v. Löwis11437992002-04-12 09:54:03 +00008625 echo "$as_me: program exited with status $ac_status" >&5
8626echo "$as_me: failed program was:" >&5
8627cat conftest.$ac_ext >&5
8628( exit $ac_status )
8629{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8630echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8631 { (exit 1); exit 1; }; }
8632fi
Barry Warsawfe33b792003-01-07 22:42:49 +00008633rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008634fi
8635fi
8636rm -f conftest.val
8637else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008638 ac_cv_sizeof_long_long=0
8639fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008640fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008641echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8642echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8643cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008644#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008645_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008646
Michael W. Hudson54241132001-12-07 15:38:26 +00008647
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008648fi
8649
Martin v. Löwis11437992002-04-12 09:54:03 +00008650echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8651echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008652have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008653cat >conftest.$ac_ext <<_ACEOF
8654#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008655#include "confdefs.h"
8656
Barry Warsawfe33b792003-01-07 22:42:49 +00008657#ifdef F77_DUMMY_MAIN
8658# ifdef __cplusplus
8659 extern "C"
8660# endif
8661 int F77_DUMMY_MAIN() { return 1; }
8662#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008663int
8664main ()
8665{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008666uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008667 ;
8668 return 0;
8669}
8670_ACEOF
8671rm -f conftest.$ac_objext
8672if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8673 (eval $ac_compile) 2>&5
8674 ac_status=$?
8675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8676 (exit $ac_status); } &&
8677 { ac_try='test -s conftest.$ac_objext'
8678 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8679 (eval $ac_try) 2>&5
8680 ac_status=$?
8681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8682 (exit $ac_status); }; }; then
8683
8684
8685cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008686#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008687_ACEOF
8688
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008689 have_uintptr_t=yes
8690
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008691else
Martin v. Löwis11437992002-04-12 09:54:03 +00008692 echo "$as_me: failed program was:" >&5
8693cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008694fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008695rm -f conftest.$ac_objext conftest.$ac_ext
8696echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8697echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008698if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008699echo "$as_me:$LINENO: checking for uintptr_t" >&5
8700echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8701if test "${ac_cv_type_uintptr_t+set}" = set; then
8702 echo $ECHO_N "(cached) $ECHO_C" >&6
8703else
8704 cat >conftest.$ac_ext <<_ACEOF
8705#line $LINENO "configure"
8706#include "confdefs.h"
8707$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008708#ifdef F77_DUMMY_MAIN
8709# ifdef __cplusplus
8710 extern "C"
8711# endif
8712 int F77_DUMMY_MAIN() { return 1; }
8713#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008714int
8715main ()
8716{
8717if ((uintptr_t *) 0)
8718 return 0;
8719if (sizeof (uintptr_t))
8720 return 0;
8721 ;
8722 return 0;
8723}
8724_ACEOF
8725rm -f conftest.$ac_objext
8726if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8727 (eval $ac_compile) 2>&5
8728 ac_status=$?
8729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8730 (exit $ac_status); } &&
8731 { ac_try='test -s conftest.$ac_objext'
8732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8733 (eval $ac_try) 2>&5
8734 ac_status=$?
8735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8736 (exit $ac_status); }; }; then
8737 ac_cv_type_uintptr_t=yes
8738else
8739 echo "$as_me: failed program was:" >&5
8740cat conftest.$ac_ext >&5
8741ac_cv_type_uintptr_t=no
8742fi
8743rm -f conftest.$ac_objext conftest.$ac_ext
8744fi
8745echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8746echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8747
8748echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8749echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8750if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8751 echo $ECHO_N "(cached) $ECHO_C" >&6
8752else
8753 if test "$ac_cv_type_uintptr_t" = yes; then
8754 # The cast to unsigned long works around a bug in the HP C Compiler
8755 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8756 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8757 # This bug is HP SR number 8606223364.
8758 if test "$cross_compiling" = yes; then
8759 # Depending upon the size, compute the lo and hi bounds.
8760cat >conftest.$ac_ext <<_ACEOF
8761#line $LINENO "configure"
8762#include "confdefs.h"
8763$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008764#ifdef F77_DUMMY_MAIN
8765# ifdef __cplusplus
8766 extern "C"
8767# endif
8768 int F77_DUMMY_MAIN() { return 1; }
8769#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008770int
8771main ()
8772{
8773static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8774test_array [0] = 0
8775
8776 ;
8777 return 0;
8778}
8779_ACEOF
8780rm -f conftest.$ac_objext
8781if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8782 (eval $ac_compile) 2>&5
8783 ac_status=$?
8784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8785 (exit $ac_status); } &&
8786 { ac_try='test -s conftest.$ac_objext'
8787 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8788 (eval $ac_try) 2>&5
8789 ac_status=$?
8790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8791 (exit $ac_status); }; }; then
8792 ac_lo=0 ac_mid=0
8793 while :; do
8794 cat >conftest.$ac_ext <<_ACEOF
8795#line $LINENO "configure"
8796#include "confdefs.h"
8797$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008798#ifdef F77_DUMMY_MAIN
8799# ifdef __cplusplus
8800 extern "C"
8801# endif
8802 int F77_DUMMY_MAIN() { return 1; }
8803#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008804int
8805main ()
8806{
8807static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8808test_array [0] = 0
8809
8810 ;
8811 return 0;
8812}
8813_ACEOF
8814rm -f conftest.$ac_objext
8815if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8816 (eval $ac_compile) 2>&5
8817 ac_status=$?
8818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8819 (exit $ac_status); } &&
8820 { ac_try='test -s conftest.$ac_objext'
8821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8822 (eval $ac_try) 2>&5
8823 ac_status=$?
8824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8825 (exit $ac_status); }; }; then
8826 ac_hi=$ac_mid; break
8827else
8828 echo "$as_me: failed program was:" >&5
8829cat conftest.$ac_ext >&5
8830ac_lo=`expr $ac_mid + 1`
8831 if test $ac_lo -le $ac_mid; then
8832 ac_lo= ac_hi=
8833 break
8834 fi
8835 ac_mid=`expr 2 '*' $ac_mid + 1`
8836fi
8837rm -f conftest.$ac_objext conftest.$ac_ext
8838 done
8839else
8840 echo "$as_me: failed program was:" >&5
8841cat conftest.$ac_ext >&5
8842cat >conftest.$ac_ext <<_ACEOF
8843#line $LINENO "configure"
8844#include "confdefs.h"
8845$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008846#ifdef F77_DUMMY_MAIN
8847# ifdef __cplusplus
8848 extern "C"
8849# endif
8850 int F77_DUMMY_MAIN() { return 1; }
8851#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008852int
8853main ()
8854{
8855static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8856test_array [0] = 0
8857
8858 ;
8859 return 0;
8860}
8861_ACEOF
8862rm -f conftest.$ac_objext
8863if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8864 (eval $ac_compile) 2>&5
8865 ac_status=$?
8866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8867 (exit $ac_status); } &&
8868 { ac_try='test -s conftest.$ac_objext'
8869 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8870 (eval $ac_try) 2>&5
8871 ac_status=$?
8872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8873 (exit $ac_status); }; }; then
8874 ac_hi=-1 ac_mid=-1
8875 while :; do
8876 cat >conftest.$ac_ext <<_ACEOF
8877#line $LINENO "configure"
8878#include "confdefs.h"
8879$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008880#ifdef F77_DUMMY_MAIN
8881# ifdef __cplusplus
8882 extern "C"
8883# endif
8884 int F77_DUMMY_MAIN() { return 1; }
8885#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008886int
8887main ()
8888{
8889static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8890test_array [0] = 0
8891
8892 ;
8893 return 0;
8894}
8895_ACEOF
8896rm -f conftest.$ac_objext
8897if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8898 (eval $ac_compile) 2>&5
8899 ac_status=$?
8900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8901 (exit $ac_status); } &&
8902 { ac_try='test -s conftest.$ac_objext'
8903 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8904 (eval $ac_try) 2>&5
8905 ac_status=$?
8906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8907 (exit $ac_status); }; }; then
8908 ac_lo=$ac_mid; break
8909else
8910 echo "$as_me: failed program was:" >&5
8911cat conftest.$ac_ext >&5
8912ac_hi=`expr '(' $ac_mid ')' - 1`
8913 if test $ac_mid -le $ac_hi; then
8914 ac_lo= ac_hi=
8915 break
8916 fi
8917 ac_mid=`expr 2 '*' $ac_mid`
8918fi
8919rm -f conftest.$ac_objext conftest.$ac_ext
8920 done
8921else
8922 echo "$as_me: failed program was:" >&5
8923cat conftest.$ac_ext >&5
8924ac_lo= ac_hi=
8925fi
8926rm -f conftest.$ac_objext conftest.$ac_ext
8927fi
8928rm -f conftest.$ac_objext conftest.$ac_ext
8929# Binary search between lo and hi bounds.
8930while test "x$ac_lo" != "x$ac_hi"; do
8931 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8932 cat >conftest.$ac_ext <<_ACEOF
8933#line $LINENO "configure"
8934#include "confdefs.h"
8935$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008936#ifdef F77_DUMMY_MAIN
8937# ifdef __cplusplus
8938 extern "C"
8939# endif
8940 int F77_DUMMY_MAIN() { return 1; }
8941#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008942int
8943main ()
8944{
8945static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8946test_array [0] = 0
8947
8948 ;
8949 return 0;
8950}
8951_ACEOF
8952rm -f conftest.$ac_objext
8953if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8954 (eval $ac_compile) 2>&5
8955 ac_status=$?
8956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8957 (exit $ac_status); } &&
8958 { ac_try='test -s conftest.$ac_objext'
8959 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8960 (eval $ac_try) 2>&5
8961 ac_status=$?
8962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8963 (exit $ac_status); }; }; then
8964 ac_hi=$ac_mid
8965else
8966 echo "$as_me: failed program was:" >&5
8967cat conftest.$ac_ext >&5
8968ac_lo=`expr '(' $ac_mid ')' + 1`
8969fi
8970rm -f conftest.$ac_objext conftest.$ac_ext
8971done
8972case $ac_lo in
8973?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8974'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8975echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8976 { (exit 1); exit 1; }; } ;;
8977esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008978else
8979 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008980 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8981echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8982 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008983else
Martin v. Löwis11437992002-04-12 09:54:03 +00008984 cat >conftest.$ac_ext <<_ACEOF
8985#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008986#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008987$ac_includes_default
8988long longval () { return (long) (sizeof (uintptr_t)); }
8989unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008990#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008991#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00008992#ifdef F77_DUMMY_MAIN
8993# ifdef __cplusplus
8994 extern "C"
8995# endif
8996 int F77_DUMMY_MAIN() { return 1; }
8997#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008998int
8999main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009000{
Martin v. Löwis11437992002-04-12 09:54:03 +00009001
9002 FILE *f = fopen ("conftest.val", "w");
9003 if (! f)
9004 exit (1);
9005 if (((long) (sizeof (uintptr_t))) < 0)
9006 {
9007 long i = longval ();
9008 if (i != ((long) (sizeof (uintptr_t))))
9009 exit (1);
9010 fprintf (f, "%ld\n", i);
9011 }
9012 else
9013 {
9014 unsigned long i = ulongval ();
9015 if (i != ((long) (sizeof (uintptr_t))))
9016 exit (1);
9017 fprintf (f, "%lu\n", i);
9018 }
9019 exit (ferror (f) || fclose (f) != 0);
9020
9021 ;
9022 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009023}
Martin v. Löwis11437992002-04-12 09:54:03 +00009024_ACEOF
9025rm -f conftest$ac_exeext
9026if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9027 (eval $ac_link) 2>&5
9028 ac_status=$?
9029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9030 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9032 (eval $ac_try) 2>&5
9033 ac_status=$?
9034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9035 (exit $ac_status); }; }; then
9036 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009037else
Martin v. Löwis11437992002-04-12 09:54:03 +00009038 echo "$as_me: program exited with status $ac_status" >&5
9039echo "$as_me: failed program was:" >&5
9040cat conftest.$ac_ext >&5
9041( exit $ac_status )
9042{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
9043echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
9044 { (exit 1); exit 1; }; }
9045fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009046rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009047fi
9048fi
9049rm -f conftest.val
9050else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009051 ac_cv_sizeof_uintptr_t=0
9052fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009053fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009054echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
9055echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
9056cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009057#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009058_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009059
Michael W. Hudson54241132001-12-07 15:38:26 +00009060
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009061fi
9062
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009063# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009064echo "$as_me:$LINENO: checking size of off_t" >&5
9065echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
9066if test "${ac_cv_sizeof_off_t+set}" = set; then
9067 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009068else
9069 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009070 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009071else
Martin v. Löwis11437992002-04-12 09:54:03 +00009072 cat >conftest.$ac_ext <<_ACEOF
9073#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009074#include "confdefs.h"
9075#include <stdio.h>
9076#include <sys/types.h>
9077main()
9078{
9079 FILE *f=fopen("conftestval", "w");
9080 if (!f) exit(1);
9081 fprintf(f, "%d\n", sizeof(off_t));
9082 exit(0);
9083}
Martin v. Löwis11437992002-04-12 09:54:03 +00009084_ACEOF
9085rm -f conftest$ac_exeext
9086if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9087 (eval $ac_link) 2>&5
9088 ac_status=$?
9089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9090 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9092 (eval $ac_try) 2>&5
9093 ac_status=$?
9094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9095 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009096 ac_cv_sizeof_off_t=`cat conftestval`
9097else
Martin v. Löwis11437992002-04-12 09:54:03 +00009098 echo "$as_me: program exited with status $ac_status" >&5
9099echo "$as_me: failed program was:" >&5
9100cat conftest.$ac_ext >&5
9101( exit $ac_status )
9102ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009103fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009104rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009105fi
9106
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009107fi
9108
Martin v. Löwis11437992002-04-12 09:54:03 +00009109echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
9110echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
9111
9112cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009113#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009114_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009115
Michael W. Hudson54241132001-12-07 15:38:26 +00009116
Martin v. Löwis11437992002-04-12 09:54:03 +00009117echo "$as_me:$LINENO: checking whether to enable large file support" >&5
9118echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009119if test "$have_long_long" = yes -a \
9120 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
9121 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009122
Martin v. Löwis11437992002-04-12 09:54:03 +00009123cat >>confdefs.h <<\_ACEOF
9124#define HAVE_LARGEFILE_SUPPORT 1
9125_ACEOF
9126
9127 echo "$as_me:$LINENO: result: yes" >&5
9128echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009129else
Martin v. Löwis11437992002-04-12 09:54:03 +00009130 echo "$as_me:$LINENO: result: no" >&5
9131echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009132fi
9133
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009134# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009135echo "$as_me:$LINENO: checking size of time_t" >&5
9136echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
9137if test "${ac_cv_sizeof_time_t+set}" = set; then
9138 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009139else
9140 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009141 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009142else
Martin v. Löwis11437992002-04-12 09:54:03 +00009143 cat >conftest.$ac_ext <<_ACEOF
9144#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009145#include "confdefs.h"
9146#include <stdio.h>
9147#include <time.h>
9148main()
9149{
9150 FILE *f=fopen("conftestval", "w");
9151 if (!f) exit(1);
9152 fprintf(f, "%d\n", sizeof(time_t));
9153 exit(0);
9154}
Martin v. Löwis11437992002-04-12 09:54:03 +00009155_ACEOF
9156rm -f conftest$ac_exeext
9157if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9158 (eval $ac_link) 2>&5
9159 ac_status=$?
9160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9161 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9163 (eval $ac_try) 2>&5
9164 ac_status=$?
9165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9166 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009167 ac_cv_sizeof_time_t=`cat conftestval`
9168else
Martin v. Löwis11437992002-04-12 09:54:03 +00009169 echo "$as_me: program exited with status $ac_status" >&5
9170echo "$as_me: failed program was:" >&5
9171cat conftest.$ac_ext >&5
9172( exit $ac_status )
9173ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009174fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009175rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009176fi
9177
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009178fi
9179
Martin v. Löwis11437992002-04-12 09:54:03 +00009180echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9181echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9182
9183cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009184#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009185_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009186
Michael W. Hudson54241132001-12-07 15:38:26 +00009187
9188
Trent Mick635f6fb2000-08-23 21:33:05 +00009189# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009190ac_save_cc="$CC"
9191if test "$ac_cv_kpthread" = "yes"
9192then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009193elif test "$ac_cv_kthread" = "yes"
9194then CC="$CC -Kthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009195fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009196echo "$as_me:$LINENO: checking for pthread_t" >&5
9197echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009198have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009199cat >conftest.$ac_ext <<_ACEOF
9200#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009201#include "confdefs.h"
9202#include <pthread.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00009203#ifdef F77_DUMMY_MAIN
9204# ifdef __cplusplus
9205 extern "C"
9206# endif
9207 int F77_DUMMY_MAIN() { return 1; }
9208#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009209int
9210main ()
9211{
Guido van Rossum12580492000-09-24 16:47:19 +00009212pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009213 ;
9214 return 0;
9215}
9216_ACEOF
9217rm -f conftest.$ac_objext
9218if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9219 (eval $ac_compile) 2>&5
9220 ac_status=$?
9221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9222 (exit $ac_status); } &&
9223 { ac_try='test -s conftest.$ac_objext'
9224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9225 (eval $ac_try) 2>&5
9226 ac_status=$?
9227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9228 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009229 have_pthread_t=yes
9230else
Martin v. Löwis11437992002-04-12 09:54:03 +00009231 echo "$as_me: failed program was:" >&5
9232cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00009233fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009234rm -f conftest.$ac_objext conftest.$ac_ext
9235echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9236echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009237if test "$have_pthread_t" = yes ; then
9238 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009239 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9240echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9241 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9242 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009243else
9244 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009245 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009246else
Martin v. Löwis11437992002-04-12 09:54:03 +00009247 cat >conftest.$ac_ext <<_ACEOF
9248#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009249#include "confdefs.h"
9250#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009251#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +00009252 main()
9253 {
9254 FILE *f=fopen("conftestval", "w");
9255 if (!f) exit(1);
9256 fprintf(f, "%d\n", sizeof(pthread_t));
9257 exit(0);
9258 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009259_ACEOF
9260rm -f conftest$ac_exeext
9261if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9262 (eval $ac_link) 2>&5
9263 ac_status=$?
9264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9265 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9267 (eval $ac_try) 2>&5
9268 ac_status=$?
9269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9270 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009271 ac_cv_sizeof_pthread_t=`cat conftestval`
9272else
Martin v. Löwis11437992002-04-12 09:54:03 +00009273 echo "$as_me: program exited with status $ac_status" >&5
9274echo "$as_me: failed program was:" >&5
9275cat conftest.$ac_ext >&5
9276( exit $ac_status )
9277ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009278fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009279rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009280fi
9281
Trent Mick635f6fb2000-08-23 21:33:05 +00009282fi
9283
Martin v. Löwis11437992002-04-12 09:54:03 +00009284 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9285echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9286
9287cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009288#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009289_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009290
9291fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009292CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009293
Martin v. Löwis11437992002-04-12 09:54:03 +00009294echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9295echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009296# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9297if test "${enable_toolbox_glue+set}" = set; then
9298 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009299
Martin v. Löwis11437992002-04-12 09:54:03 +00009300fi;
Jack Jansene578a632001-08-15 01:27:14 +00009301
9302if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009303then
Jack Jansene578a632001-08-15 01:27:14 +00009304 case $ac_sys_system/$ac_sys_release in
9305 Darwin/*)
9306 enable_toolbox_glue="yes";;
9307 *)
9308 enable_toolbox_glue="no";;
9309 esac
9310fi
9311case "$enable_toolbox_glue" in
9312yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009313 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009314 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009315 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009316
9317cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009318#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009319_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009320
9321 ;;
9322*)
9323 extra_frameworks=""
9324 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009325 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009326 ;;
9327esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009328echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9329echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009330
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009331
9332case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009333 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009334 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009335 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00009336 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9337 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009338 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009339 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009340 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00009341 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9342 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009343esac
9344
Martin v. Löwis11437992002-04-12 09:54:03 +00009345echo "$as_me:$LINENO: checking for --enable-framework" >&5
9346echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009347if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009348then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009349 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009350 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009351 # in the build location.
Jack Jansenea0c3822002-08-01 21:57:49 +00009352 LDFLAGS="$LDFLAGS -Wl,-F."
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009353
Martin v. Löwis11437992002-04-12 09:54:03 +00009354cat >>confdefs.h <<\_ACEOF
9355#define WITH_NEXT_FRAMEWORK 1
9356_ACEOF
9357
9358 echo "$as_me:$LINENO: result: yes" >&5
9359echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009360else
Martin v. Löwis11437992002-04-12 09:54:03 +00009361 echo "$as_me:$LINENO: result: no" >&5
9362echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009363fi
9364
Martin v. Löwis11437992002-04-12 09:54:03 +00009365echo "$as_me:$LINENO: checking for dyld" >&5
9366echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009367case $ac_sys_system/$ac_sys_release in
9368 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009369
Martin v. Löwis11437992002-04-12 09:54:03 +00009370cat >>confdefs.h <<\_ACEOF
9371#define WITH_DYLD 1
9372_ACEOF
9373
9374 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9375echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009376 ;;
9377 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009378 echo "$as_me:$LINENO: result: no" >&5
9379echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009380 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009381esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009382
Guido van Rossum0a516c91994-09-12 10:58:40 +00009383# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009384
Michael W. Hudson54241132001-12-07 15:38:26 +00009385
9386
9387
9388
Guido van Rossum0a516c91994-09-12 10:58:40 +00009389# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009390# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009391echo "$as_me:$LINENO: checking SO" >&5
9392echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009393if test -z "$SO"
9394then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009395 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009396 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009397 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009398 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009399 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009400fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009401echo "$as_me:$LINENO: result: $SO" >&5
9402echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009403# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00009404# -- "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 +00009405# (Shared libraries in this instance are shared modules to be loaded into
9406# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009407echo "$as_me:$LINENO: checking LDSHARED" >&5
9408echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009409if test -z "$LDSHARED"
9410then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009411 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009412 AIX*)
9413 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009414 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009415 ;;
9416 BeOS*)
9417 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009418 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009419 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009420 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009421 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009422 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009423 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00009424 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009425 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009426 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +00009427 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009428 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009429 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
9430 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009431 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009432 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9433 if test "$enable_framework" ; then
9434 # Link against the framework. All externals should be defined.
9435 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9436 else
9437 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009438 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009439 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009440 Darwin/*)
9441 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9442 if test "$enable_framework" ; then
9443 # Link against the framework. All externals should be defined.
9444 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9445 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009446 # No framework, use the Python app as bundle-loader
9447 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009448 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009449 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009450 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00009451 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009452 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009453 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009454 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009455 then
9456 LDSHARED="cc -shared ${LDFLAGS}"
9457 else
9458 LDSHARED="ld -Bshareable ${LDFLAGS}"
9459 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009460 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009461 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009462 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009463 then LDSHARED='$(CC) -shared'
9464 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009465 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009466 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +00009467 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009468 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009469 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009470 *) LDSHARED="ld";;
9471 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009472fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009473echo "$as_me:$LINENO: result: $LDSHARED" >&5
9474echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009475BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009476# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009477# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009478echo "$as_me:$LINENO: checking CCSHARED" >&5
9479echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009480if test -z "$CCSHARED"
9481then
Guido van Rossum07397971997-04-29 21:49:50 +00009482 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009483 SunOS*) if test "$GCC" = yes;
9484 then CCSHARED="-fPIC";
9485 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009486 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009487 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009488 else CCSHARED="+z";
9489 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009490 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009491 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009492 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009493 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009494 if test "$GCC" = "yes"
9495 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009496 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009497 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009498 SCO_SV*)
9499 if test "$GCC" = "yes"
9500 then CCSHARED="-fPIC"
9501 else CCSHARED="-Kpic -belf"
9502 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009503 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009504 IRIX*/6*) case $CC in
9505 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009506 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009507 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009508 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009509 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009510fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009511echo "$as_me:$LINENO: result: $CCSHARED" >&5
9512echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009513# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009514# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009515echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9516echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009517if test -z "$LINKFORSHARED"
9518then
Guido van Rossum07397971997-04-29 21:49:50 +00009519 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009520 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009521 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009522 LINKFORSHARED="-Wl,-E -Wl,+s";;
9523# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009524 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009525 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009526 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009527 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009528 # -u __dummy makes the linker aware of the objc runtime
9529 # in System.framework; otherwise, __objcInit (referenced in
9530 # crt1.o) gets erroneously defined as common, which breaks dynamic
9531 # loading of any modules which reference it in System.framework.
9532 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9533 # not used by the core itself but which needs to be in the core so
9534 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00009535 # -prebind is no longer used, because it actually seems to give a
9536 # slowdown in stead of a speedup, maybe due to the large number of
9537 # dynamic loads Python does.
9538 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009539 if test "$enable_framework"
9540 then
9541 LINKFORSHARED="$LINKFORSHARED -framework Python"
9542 fi
9543 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009544 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009545 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009546 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009547 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009548 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9549 then
9550 LINKFORSHARED="-Wl,--export-dynamic"
9551 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009552 SunOS/5*) case $CC in
9553 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009554 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009555 then
9556 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009557 fi;;
9558 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009559 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009560fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009561echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9562echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009563
Michael W. Hudson54241132001-12-07 15:38:26 +00009564
Martin v. Löwis11437992002-04-12 09:54:03 +00009565echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9566echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009567if test ! "$LIBRARY" = "$LDLIBRARY"
9568then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009569 case $ac_sys_system in
9570 CYGWIN*)
9571 # Cygwin needs CCSHARED when building extension DLLs
9572 # but not when building the interpreter DLL.
9573 CFLAGSFORSHARED='';;
9574 *)
9575 CFLAGSFORSHARED='$(CCSHARED)'
9576 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009577fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009578echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9579echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009580
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009581# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9582# library (with --enable-shared).
9583# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009584# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9585# if it is not required, since it creates a dependency of the shared library
9586# to LIBS. This, in turn, means that applications linking the shared libpython
9587# don't need to link LIBS explicitly. The default should be only changed
9588# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009589
9590echo "$as_me:$LINENO: checking SHLIBS" >&5
9591echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9592case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009593 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009594 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009595esac
9596echo "$as_me:$LINENO: result: $SHLIBS" >&5
9597echo "${ECHO_T}$SHLIBS" >&6
9598
9599
Guido van Rossum627b2d71993-12-24 10:39:16 +00009600# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009601
9602echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9603echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9604if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9605 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009606else
Martin v. Löwis11437992002-04-12 09:54:03 +00009607 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009608LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009609cat >conftest.$ac_ext <<_ACEOF
9610#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009611#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009612
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009613/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009614#ifdef __cplusplus
9615extern "C"
9616#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009617/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009618 builtin and then its argument prototype would still apply. */
9619char dlopen ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009620#ifdef F77_DUMMY_MAIN
9621# ifdef __cplusplus
9622 extern "C"
9623# endif
9624 int F77_DUMMY_MAIN() { return 1; }
9625#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009626int
9627main ()
9628{
9629dlopen ();
9630 ;
9631 return 0;
9632}
9633_ACEOF
9634rm -f conftest.$ac_objext conftest$ac_exeext
9635if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9636 (eval $ac_link) 2>&5
9637 ac_status=$?
9638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9639 (exit $ac_status); } &&
9640 { ac_try='test -s conftest$ac_exeext'
9641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9642 (eval $ac_try) 2>&5
9643 ac_status=$?
9644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9645 (exit $ac_status); }; }; then
9646 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009647else
Martin v. Löwis11437992002-04-12 09:54:03 +00009648 echo "$as_me: failed program was:" >&5
9649cat conftest.$ac_ext >&5
9650ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009651fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009652rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9653LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009654fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009655echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9656echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9657if test $ac_cv_lib_dl_dlopen = yes; then
9658 cat >>confdefs.h <<_ACEOF
9659#define HAVE_LIBDL 1
9660_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009661
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009662 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009663
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009664fi
9665 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009666
9667echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9668echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9669if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9670 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009671else
Martin v. Löwis11437992002-04-12 09:54:03 +00009672 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009673LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009674cat >conftest.$ac_ext <<_ACEOF
9675#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009676#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009677
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009678/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009679#ifdef __cplusplus
9680extern "C"
9681#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009682/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009683 builtin and then its argument prototype would still apply. */
9684char shl_load ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009685#ifdef F77_DUMMY_MAIN
9686# ifdef __cplusplus
9687 extern "C"
9688# endif
9689 int F77_DUMMY_MAIN() { return 1; }
9690#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009691int
9692main ()
9693{
9694shl_load ();
9695 ;
9696 return 0;
9697}
9698_ACEOF
9699rm -f conftest.$ac_objext conftest$ac_exeext
9700if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9701 (eval $ac_link) 2>&5
9702 ac_status=$?
9703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9704 (exit $ac_status); } &&
9705 { ac_try='test -s conftest$ac_exeext'
9706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9707 (eval $ac_try) 2>&5
9708 ac_status=$?
9709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9710 (exit $ac_status); }; }; then
9711 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009712else
Martin v. Löwis11437992002-04-12 09:54:03 +00009713 echo "$as_me: failed program was:" >&5
9714cat conftest.$ac_ext >&5
9715ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009716fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009717rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9718LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009719fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009720echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9721echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9722if test $ac_cv_lib_dld_shl_load = yes; then
9723 cat >>confdefs.h <<_ACEOF
9724#define HAVE_LIBDLD 1
9725_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009726
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009727 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009728
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009729fi
9730 # Dynamic linking for HP-UX
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009731echo "$as_me:$LINENO: checking for library containing sem_init" >&5
9732echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9733if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009734 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009735else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009736 ac_func_search_save_LIBS=$LIBS
9737ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009738cat >conftest.$ac_ext <<_ACEOF
9739#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009740#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009741
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009742/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009743#ifdef __cplusplus
9744extern "C"
9745#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009746/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009747 builtin and then its argument prototype would still apply. */
9748char sem_init ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009749#ifdef F77_DUMMY_MAIN
9750# ifdef __cplusplus
9751 extern "C"
9752# endif
9753 int F77_DUMMY_MAIN() { return 1; }
9754#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009755int
9756main ()
9757{
9758sem_init ();
9759 ;
9760 return 0;
9761}
9762_ACEOF
9763rm -f conftest.$ac_objext conftest$ac_exeext
9764if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9765 (eval $ac_link) 2>&5
9766 ac_status=$?
9767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9768 (exit $ac_status); } &&
9769 { ac_try='test -s conftest$ac_exeext'
9770 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9771 (eval $ac_try) 2>&5
9772 ac_status=$?
9773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9774 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009775 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009776else
Martin v. Löwis11437992002-04-12 09:54:03 +00009777 echo "$as_me: failed program was:" >&5
9778cat conftest.$ac_ext >&5
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009779fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009780rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009781if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009782 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009783 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9784 cat >conftest.$ac_ext <<_ACEOF
9785#line $LINENO "configure"
9786#include "confdefs.h"
9787
9788/* Override any gcc2 internal prototype to avoid an error. */
9789#ifdef __cplusplus
9790extern "C"
9791#endif
9792/* We use char because int might match the return type of a gcc2
9793 builtin and then its argument prototype would still apply. */
9794char sem_init ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009795#ifdef F77_DUMMY_MAIN
9796# ifdef __cplusplus
9797 extern "C"
9798# endif
9799 int F77_DUMMY_MAIN() { return 1; }
9800#endif
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009801int
9802main ()
9803{
9804sem_init ();
9805 ;
9806 return 0;
9807}
Martin v. Löwis11437992002-04-12 09:54:03 +00009808_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009809rm -f conftest.$ac_objext conftest$ac_exeext
9810if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9811 (eval $ac_link) 2>&5
9812 ac_status=$?
9813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9814 (exit $ac_status); } &&
9815 { ac_try='test -s conftest$ac_exeext'
9816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9817 (eval $ac_try) 2>&5
9818 ac_status=$?
9819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9820 (exit $ac_status); }; }; then
9821 ac_cv_search_sem_init="-l$ac_lib"
9822break
9823else
9824 echo "$as_me: failed program was:" >&5
9825cat conftest.$ac_ext >&5
9826fi
9827rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9828 done
9829fi
9830LIBS=$ac_func_search_save_LIBS
9831fi
9832echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9833echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9834if test "$ac_cv_search_sem_init" != no; then
9835 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009836
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009837fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009838 # 'Real Time' functions on Solaris
9839 # posix4 on Solaris 2.6
9840 # pthread (first!) on Linux
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009841
9842# checks for system dependent C++ extensions support
9843case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009844 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9845echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9846 cat >conftest.$ac_ext <<_ACEOF
9847#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009848#include "confdefs.h"
9849#include "/usr/lpp/xlC/include/load.h"
Barry Warsawfe33b792003-01-07 22:42:49 +00009850#ifdef F77_DUMMY_MAIN
9851# ifdef __cplusplus
9852 extern "C"
9853# endif
9854 int F77_DUMMY_MAIN() { return 1; }
9855#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009856int
9857main ()
9858{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009859loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009860 ;
9861 return 0;
9862}
9863_ACEOF
9864rm -f conftest.$ac_objext conftest$ac_exeext
9865if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9866 (eval $ac_link) 2>&5
9867 ac_status=$?
9868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9869 (exit $ac_status); } &&
9870 { ac_try='test -s conftest$ac_exeext'
9871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9872 (eval $ac_try) 2>&5
9873 ac_status=$?
9874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9875 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009876
Martin v. Löwis11437992002-04-12 09:54:03 +00009877cat >>confdefs.h <<\_ACEOF
9878#define AIX_GENUINE_CPLUSPLUS 1
9879_ACEOF
9880
9881 echo "$as_me:$LINENO: result: yes" >&5
9882echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009883else
Martin v. Löwis11437992002-04-12 09:54:03 +00009884 echo "$as_me: failed program was:" >&5
9885cat conftest.$ac_ext >&5
9886echo "$as_me:$LINENO: result: no" >&5
9887echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009888fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009889rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009890 *) ;;
9891esac
9892
Guido van Rossum70c7f481998-03-26 18:44:10 +00009893# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Martin v. Löwise1172582002-11-13 08:51:19 +00009894# However on SGI IRIX 4, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009895# BeOS' sockets are stashed in libnet.
9896case "$ac_sys_system" in
9897IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009898*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009899echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9900echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9901if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9902 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009903else
Martin v. Löwis11437992002-04-12 09:54:03 +00009904 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009905LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009906cat >conftest.$ac_ext <<_ACEOF
9907#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009908#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009909
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009910/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009911#ifdef __cplusplus
9912extern "C"
9913#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009914/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009915 builtin and then its argument prototype would still apply. */
9916char t_open ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009917#ifdef F77_DUMMY_MAIN
9918# ifdef __cplusplus
9919 extern "C"
9920# endif
9921 int F77_DUMMY_MAIN() { return 1; }
9922#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009923int
9924main ()
9925{
9926t_open ();
9927 ;
9928 return 0;
9929}
9930_ACEOF
9931rm -f conftest.$ac_objext conftest$ac_exeext
9932if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9933 (eval $ac_link) 2>&5
9934 ac_status=$?
9935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9936 (exit $ac_status); } &&
9937 { ac_try='test -s conftest$ac_exeext'
9938 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9939 (eval $ac_try) 2>&5
9940 ac_status=$?
9941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9942 (exit $ac_status); }; }; then
9943 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009944else
Martin v. Löwis11437992002-04-12 09:54:03 +00009945 echo "$as_me: failed program was:" >&5
9946cat conftest.$ac_ext >&5
9947ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009948fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009949rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9950LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009951fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009952echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9953echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9954if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009955 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009956fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009957 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009958echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9959echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9960if test "${ac_cv_lib_socket_socket+set}" = set; then
9961 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009962else
Martin v. Löwis11437992002-04-12 09:54:03 +00009963 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009964LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009965cat >conftest.$ac_ext <<_ACEOF
9966#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009967#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009968
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009969/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009970#ifdef __cplusplus
9971extern "C"
9972#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009973/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009974 builtin and then its argument prototype would still apply. */
9975char socket ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009976#ifdef F77_DUMMY_MAIN
9977# ifdef __cplusplus
9978 extern "C"
9979# endif
9980 int F77_DUMMY_MAIN() { return 1; }
9981#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009982int
9983main ()
9984{
9985socket ();
9986 ;
9987 return 0;
9988}
9989_ACEOF
9990rm -f conftest.$ac_objext conftest$ac_exeext
9991if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9992 (eval $ac_link) 2>&5
9993 ac_status=$?
9994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9995 (exit $ac_status); } &&
9996 { ac_try='test -s conftest$ac_exeext'
9997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9998 (eval $ac_try) 2>&5
9999 ac_status=$?
10000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10001 (exit $ac_status); }; }; then
10002 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010003else
Martin v. Löwis11437992002-04-12 09:54:03 +000010004 echo "$as_me: failed program was:" >&5
10005cat conftest.$ac_ext >&5
10006ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010007fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010008rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10009LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010010fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010011echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
10012echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
10013if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000010014 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010015fi
10016 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000010017;;
10018esac
10019case "$ac_sys_system" in
10020BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010021echo "$as_me:$LINENO: checking for socket in -lnet" >&5
10022echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
10023if test "${ac_cv_lib_net_socket+set}" = set; then
10024 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010025else
Martin v. Löwis11437992002-04-12 09:54:03 +000010026 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010027LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010028cat >conftest.$ac_ext <<_ACEOF
10029#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010030#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010031
Guido van Rossumad678af1998-10-02 14:42:15 +000010032/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010033#ifdef __cplusplus
10034extern "C"
10035#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010036/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010037 builtin and then its argument prototype would still apply. */
10038char socket ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010039#ifdef F77_DUMMY_MAIN
10040# ifdef __cplusplus
10041 extern "C"
10042# endif
10043 int F77_DUMMY_MAIN() { return 1; }
10044#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010045int
10046main ()
10047{
10048socket ();
10049 ;
10050 return 0;
10051}
10052_ACEOF
10053rm -f conftest.$ac_objext conftest$ac_exeext
10054if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10055 (eval $ac_link) 2>&5
10056 ac_status=$?
10057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10058 (exit $ac_status); } &&
10059 { ac_try='test -s conftest$ac_exeext'
10060 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10061 (eval $ac_try) 2>&5
10062 ac_status=$?
10063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10064 (exit $ac_status); }; }; then
10065 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010066else
Martin v. Löwis11437992002-04-12 09:54:03 +000010067 echo "$as_me: failed program was:" >&5
10068cat conftest.$ac_ext >&5
10069ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010070fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010071rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10072LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010073fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010074echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
10075echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
10076if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010077 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010078fi
10079 # BeOS
10080;;
10081esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000010082
Martin v. Löwis11437992002-04-12 09:54:03 +000010083echo "$as_me:$LINENO: checking for --with-libs" >&5
10084echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
10085
Guido van Rossuma68acba1996-07-31 17:36:39 +000010086# Check whether --with-libs or --without-libs was given.
10087if test "${with_libs+set}" = set; then
10088 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000010089
10090echo "$as_me:$LINENO: result: $withval" >&5
10091echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000010092LIBS="$withval $LIBS"
10093
10094else
Martin v. Löwis11437992002-04-12 09:54:03 +000010095 echo "$as_me:$LINENO: result: no" >&5
10096echo "${ECHO_T}no" >&6
10097fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000010098
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010099# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010100
10101
Martin v. Löwis11437992002-04-12 09:54:03 +000010102echo "$as_me:$LINENO: checking for --with-signal-module" >&5
10103echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
10104
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010105# Check whether --with-signal-module or --without-signal-module was given.
10106if test "${with_signal_module+set}" = set; then
10107 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010108
Martin v. Löwis11437992002-04-12 09:54:03 +000010109fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010110
10111if test -z "$with_signal_module"
10112then with_signal_module="yes"
10113fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010114echo "$as_me:$LINENO: result: $with_signal_module" >&5
10115echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010116
10117if test "${with_signal_module}" = "yes"; then
10118 USE_SIGNAL_MODULE=""
10119 SIGNAL_OBJS=""
10120else
10121 USE_SIGNAL_MODULE="#"
10122 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10123fi
10124
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010125# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010126
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010127USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010128
Martin v. Löwis11437992002-04-12 09:54:03 +000010129echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
10130echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
10131
Guido van Rossumec2f0731997-01-22 20:54:01 +000010132
10133# Check whether --with-dec-threads or --without-dec-threads was given.
10134if test "${with_dec_threads+set}" = set; then
10135 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000010136
10137echo "$as_me:$LINENO: result: $withval" >&5
10138echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000010139LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000010140if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000010141 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000010142fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010143else
Martin v. Löwis11437992002-04-12 09:54:03 +000010144 echo "$as_me:$LINENO: result: no" >&5
10145echo "${ECHO_T}no" >&6
10146fi;
10147
10148# Templates for things AC_DEFINEd more than once.
10149# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010150
10151
Martin v. Löwis11437992002-04-12 09:54:03 +000010152
10153
10154
10155
10156
10157echo "$as_me:$LINENO: checking for --with-threads" >&5
10158echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
10159
Guido van Rossumec2f0731997-01-22 20:54:01 +000010160# Check whether --with-threads or --without-threads was given.
10161if test "${with_threads+set}" = set; then
10162 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000010163
Martin v. Löwis11437992002-04-12 09:54:03 +000010164fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000010165
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010166# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010167
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010168# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010169if test "${with_thread+set}" = set; then
10170 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010171 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000010172fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010173
10174if test -z "$with_threads"
10175then with_threads="yes"
10176fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010177echo "$as_me:$LINENO: result: $with_threads" >&5
10178echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010179
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010180
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010181if test "$with_threads" = "no"
10182then
10183 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010184elif test "$ac_cv_pthread_is_default" = yes
10185then
Martin v. Löwis11437992002-04-12 09:54:03 +000010186 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010187#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010188_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010189
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010190 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010191 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010192#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010193_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010194
10195 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010196 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010197elif test "$ac_cv_kpthread" = "yes"
10198then
10199 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010200 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010201#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010202_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010203
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010204 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010205 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010206elif test "$ac_cv_kthread" = "yes"
10207then
10208 CC="$CC -Kthread"
10209 cat >>confdefs.h <<\_ACEOF
10210#define WITH_THREAD 1
10211_ACEOF
10212
10213 posix_threads=yes
10214 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010215else
10216 if test ! -z "$with_threads" -a -d "$with_threads"
10217 then LDFLAGS="$LDFLAGS -L$with_threads"
10218 fi
10219 if test ! -z "$withval" -a -d "$withval"
10220 then LDFLAGS="$LDFLAGS -L$withval"
10221 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010222
10223 # According to the POSIX spec, a pthreads implementation must
10224 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010225 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10226echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10227 cat >conftest.$ac_ext <<_ACEOF
10228#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010229#include "confdefs.h"
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010230
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010231#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010232#ifdef _POSIX_THREADS
10233yes
10234#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010235
10236_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010237if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000010238 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010239 unistd_defines_pthreads=yes
10240else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010241 unistd_defines_pthreads=no
10242fi
10243rm -f conftest*
10244
Martin v. Löwis11437992002-04-12 09:54:03 +000010245 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10246echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010247
Martin v. Löwis11437992002-04-12 09:54:03 +000010248 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010249#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010250_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010251
Martin v. Löwis11437992002-04-12 09:54:03 +000010252 if test "${ac_cv_header_cthreads_h+set}" = set; then
10253 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10254echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10255if test "${ac_cv_header_cthreads_h+set}" = set; then
10256 echo $ECHO_N "(cached) $ECHO_C" >&6
10257fi
10258echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10259echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010260else
Martin v. Löwis11437992002-04-12 09:54:03 +000010261 # Is the header compilable?
10262echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10263echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10264cat >conftest.$ac_ext <<_ACEOF
10265#line $LINENO "configure"
10266#include "confdefs.h"
10267$ac_includes_default
10268#include <cthreads.h>
10269_ACEOF
10270rm -f conftest.$ac_objext
10271if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10272 (eval $ac_compile) 2>&5
10273 ac_status=$?
10274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10275 (exit $ac_status); } &&
10276 { ac_try='test -s conftest.$ac_objext'
10277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10278 (eval $ac_try) 2>&5
10279 ac_status=$?
10280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10281 (exit $ac_status); }; }; then
10282 ac_header_compiler=yes
10283else
10284 echo "$as_me: failed program was:" >&5
10285cat conftest.$ac_ext >&5
10286ac_header_compiler=no
10287fi
10288rm -f conftest.$ac_objext conftest.$ac_ext
10289echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10290echo "${ECHO_T}$ac_header_compiler" >&6
10291
10292# Is the header present?
10293echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10294echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10295cat >conftest.$ac_ext <<_ACEOF
10296#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010297#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010298#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010299_ACEOF
10300if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10301 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10302 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010303 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010304 rm -f conftest.er1
10305 cat conftest.err >&5
10306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10307 (exit $ac_status); } >/dev/null; then
10308 if test -s conftest.err; then
10309 ac_cpp_err=$ac_c_preproc_warn_flag
10310 else
10311 ac_cpp_err=
10312 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010313else
Martin v. Löwis11437992002-04-12 09:54:03 +000010314 ac_cpp_err=yes
10315fi
10316if test -z "$ac_cpp_err"; then
10317 ac_header_preproc=yes
10318else
10319 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +000010320 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010321 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010322fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010323rm -f conftest.err conftest.$ac_ext
10324echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10325echo "${ECHO_T}$ac_header_preproc" >&6
10326
10327# So? What about this header?
10328case $ac_header_compiler:$ac_header_preproc in
10329 yes:no )
10330 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10331echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10332 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10333echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10334 no:yes )
10335 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10336echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10337 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10338echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10339 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10340echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10341esac
10342echo "$as_me:$LINENO: checking for cthreads.h" >&5
10343echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10344if test "${ac_cv_header_cthreads_h+set}" = set; then
10345 echo $ECHO_N "(cached) $ECHO_C" >&6
10346else
10347 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010348fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010349echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10350echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10351
10352fi
10353if test $ac_cv_header_cthreads_h = yes; then
10354 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010355#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010356_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010357
Martin v. Löwis11437992002-04-12 09:54:03 +000010358 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010359#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010360_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010361
Martin v. Löwis11437992002-04-12 09:54:03 +000010362
10363cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010364#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010365_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010366
10367 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010368 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010369else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010370
Martin v. Löwis11437992002-04-12 09:54:03 +000010371 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10372 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10373echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10374if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10375 echo $ECHO_N "(cached) $ECHO_C" >&6
10376fi
10377echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10378echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010379else
Martin v. Löwis11437992002-04-12 09:54:03 +000010380 # Is the header compilable?
10381echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10382echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10383cat >conftest.$ac_ext <<_ACEOF
10384#line $LINENO "configure"
10385#include "confdefs.h"
10386$ac_includes_default
10387#include <mach/cthreads.h>
10388_ACEOF
10389rm -f conftest.$ac_objext
10390if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10391 (eval $ac_compile) 2>&5
10392 ac_status=$?
10393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10394 (exit $ac_status); } &&
10395 { ac_try='test -s conftest.$ac_objext'
10396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10397 (eval $ac_try) 2>&5
10398 ac_status=$?
10399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10400 (exit $ac_status); }; }; then
10401 ac_header_compiler=yes
10402else
10403 echo "$as_me: failed program was:" >&5
10404cat conftest.$ac_ext >&5
10405ac_header_compiler=no
10406fi
10407rm -f conftest.$ac_objext conftest.$ac_ext
10408echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10409echo "${ECHO_T}$ac_header_compiler" >&6
10410
10411# Is the header present?
10412echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10413echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10414cat >conftest.$ac_ext <<_ACEOF
10415#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010416#include "confdefs.h"
10417#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010418_ACEOF
10419if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10420 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10421 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010422 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010423 rm -f conftest.er1
10424 cat conftest.err >&5
10425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10426 (exit $ac_status); } >/dev/null; then
10427 if test -s conftest.err; then
10428 ac_cpp_err=$ac_c_preproc_warn_flag
10429 else
10430 ac_cpp_err=
10431 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010432else
Martin v. Löwis11437992002-04-12 09:54:03 +000010433 ac_cpp_err=yes
10434fi
10435if test -z "$ac_cpp_err"; then
10436 ac_header_preproc=yes
10437else
10438 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010439 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010440 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010441fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010442rm -f conftest.err conftest.$ac_ext
10443echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10444echo "${ECHO_T}$ac_header_preproc" >&6
10445
10446# So? What about this header?
10447case $ac_header_compiler:$ac_header_preproc in
10448 yes:no )
10449 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10450echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10451 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10452echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10453 no:yes )
10454 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10455echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10456 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10457echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10458 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10459echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10460esac
10461echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10462echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10463if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10464 echo $ECHO_N "(cached) $ECHO_C" >&6
10465else
10466 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010467fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010468echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10469echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10470
10471fi
10472if test $ac_cv_header_mach_cthreads_h = yes; then
10473 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010474#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010475_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010476
Martin v. Löwis11437992002-04-12 09:54:03 +000010477 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010478#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010479_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010480
Martin v. Löwis11437992002-04-12 09:54:03 +000010481
10482cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010483#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010484_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010485
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010486 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010487else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010488
Martin v. Löwis11437992002-04-12 09:54:03 +000010489 echo "$as_me:$LINENO: checking for --with-pth" >&5
10490echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10491
10492# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010493if test "${with_pth+set}" = set; then
10494 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010495 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010496echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010497 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010498#define WITH_THREAD 1
10499_ACEOF
10500
10501
10502cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010503#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010504_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010505
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010506 LIBS="-lpth $LIBS"
10507 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010508else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010509 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010510echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010511
10512 # Just looking for pthread_create in libpthread is not enough:
10513 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10514 # So we really have to include pthread.h, and then link.
10515 _libs=$LIBS
10516 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010517 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10518echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10519 cat >conftest.$ac_ext <<_ACEOF
10520#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010521#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010522#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010523
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010524void * start_routine (void *arg) { exit (0); }
Barry Warsawfe33b792003-01-07 22:42:49 +000010525#ifdef F77_DUMMY_MAIN
10526# ifdef __cplusplus
10527 extern "C"
10528# endif
10529 int F77_DUMMY_MAIN() { return 1; }
10530#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010531int
10532main ()
10533{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010534
10535pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010536 ;
10537 return 0;
10538}
10539_ACEOF
10540rm -f conftest.$ac_objext conftest$ac_exeext
10541if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10542 (eval $ac_link) 2>&5
10543 ac_status=$?
10544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10545 (exit $ac_status); } &&
10546 { ac_try='test -s conftest$ac_exeext'
10547 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10548 (eval $ac_try) 2>&5
10549 ac_status=$?
10550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10551 (exit $ac_status); }; }; then
10552
10553 echo "$as_me:$LINENO: result: yes" >&5
10554echo "${ECHO_T}yes" >&6
10555 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010556#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010557_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010558
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010559 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010560 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010561else
Martin v. Löwis11437992002-04-12 09:54:03 +000010562 echo "$as_me: failed program was:" >&5
10563cat conftest.$ac_ext >&5
10564
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010565 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010566 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10567echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10568if test "${ac_cv_func_pthread_detach+set}" = set; then
10569 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010570else
Martin v. Löwis11437992002-04-12 09:54:03 +000010571 cat >conftest.$ac_ext <<_ACEOF
10572#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010573#include "confdefs.h"
10574/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010575 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010576#include <assert.h>
10577/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010578#ifdef __cplusplus
10579extern "C"
10580#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010581/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010582 builtin and then its argument prototype would still apply. */
10583char pthread_detach ();
10584char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010585
Barry Warsawfe33b792003-01-07 22:42:49 +000010586#ifdef F77_DUMMY_MAIN
10587# ifdef __cplusplus
10588 extern "C"
10589# endif
10590 int F77_DUMMY_MAIN() { return 1; }
10591#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010592int
10593main ()
10594{
Guido van Rossumad678af1998-10-02 14:42:15 +000010595/* The GNU C library defines this for functions which it implements
10596 to always fail with ENOSYS. Some functions are actually named
10597 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010598#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010599choke me
10600#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010601f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +000010602#endif
10603
Martin v. Löwis11437992002-04-12 09:54:03 +000010604 ;
10605 return 0;
10606}
10607_ACEOF
10608rm -f conftest.$ac_objext conftest$ac_exeext
10609if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10610 (eval $ac_link) 2>&5
10611 ac_status=$?
10612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10613 (exit $ac_status); } &&
10614 { ac_try='test -s conftest$ac_exeext'
10615 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10616 (eval $ac_try) 2>&5
10617 ac_status=$?
10618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10619 (exit $ac_status); }; }; then
10620 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010621else
Martin v. Löwis11437992002-04-12 09:54:03 +000010622 echo "$as_me: failed program was:" >&5
10623cat conftest.$ac_ext >&5
10624ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010625fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010626rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010627fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010628echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10629echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10630if test $ac_cv_func_pthread_detach = yes; then
10631 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010632#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010633_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010634
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010635 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010636 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010637else
Guido van Rossumad678af1998-10-02 14:42:15 +000010638
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010639 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10640 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10641echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10642if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10643 echo $ECHO_N "(cached) $ECHO_C" >&6
10644fi
10645echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10646echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10647else
10648 # Is the header compilable?
10649echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10650echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10651cat >conftest.$ac_ext <<_ACEOF
10652#line $LINENO "configure"
10653#include "confdefs.h"
10654$ac_includes_default
10655#include <atheos/threads.h>
10656_ACEOF
10657rm -f conftest.$ac_objext
10658if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10659 (eval $ac_compile) 2>&5
10660 ac_status=$?
10661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10662 (exit $ac_status); } &&
10663 { ac_try='test -s conftest.$ac_objext'
10664 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10665 (eval $ac_try) 2>&5
10666 ac_status=$?
10667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10668 (exit $ac_status); }; }; then
10669 ac_header_compiler=yes
10670else
10671 echo "$as_me: failed program was:" >&5
10672cat conftest.$ac_ext >&5
10673ac_header_compiler=no
10674fi
10675rm -f conftest.$ac_objext conftest.$ac_ext
10676echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10677echo "${ECHO_T}$ac_header_compiler" >&6
10678
10679# Is the header present?
10680echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10681echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10682cat >conftest.$ac_ext <<_ACEOF
10683#line $LINENO "configure"
10684#include "confdefs.h"
10685#include <atheos/threads.h>
10686_ACEOF
10687if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10688 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10689 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010690 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010691 rm -f conftest.er1
10692 cat conftest.err >&5
10693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10694 (exit $ac_status); } >/dev/null; then
10695 if test -s conftest.err; then
10696 ac_cpp_err=$ac_c_preproc_warn_flag
10697 else
10698 ac_cpp_err=
10699 fi
10700else
10701 ac_cpp_err=yes
10702fi
10703if test -z "$ac_cpp_err"; then
10704 ac_header_preproc=yes
10705else
10706 echo "$as_me: failed program was:" >&5
10707 cat conftest.$ac_ext >&5
10708 ac_header_preproc=no
10709fi
10710rm -f conftest.err conftest.$ac_ext
10711echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10712echo "${ECHO_T}$ac_header_preproc" >&6
10713
10714# So? What about this header?
10715case $ac_header_compiler:$ac_header_preproc in
10716 yes:no )
10717 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10718echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10719 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10720echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10721 no:yes )
10722 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10723echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10724 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10725echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10726 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10727echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10728esac
10729echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10730echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10731if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10732 echo $ECHO_N "(cached) $ECHO_C" >&6
10733else
10734 ac_cv_header_atheos_threads_h=$ac_header_preproc
10735fi
10736echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10737echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10738
10739fi
10740if test $ac_cv_header_atheos_threads_h = yes; then
10741 cat >>confdefs.h <<\_ACEOF
10742#define WITH_THREAD 1
10743_ACEOF
10744
10745
10746cat >>confdefs.h <<\_ACEOF
10747#define ATHEOS_THREADS 1
10748_ACEOF
10749
10750 THREADOBJ="Python/thread.o"
10751else
10752
Martin v. Löwis11437992002-04-12 09:54:03 +000010753 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10754 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10755echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10756if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10757 echo $ECHO_N "(cached) $ECHO_C" >&6
10758fi
10759echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10760echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010761else
Martin v. Löwis11437992002-04-12 09:54:03 +000010762 # Is the header compilable?
10763echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10764echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10765cat >conftest.$ac_ext <<_ACEOF
10766#line $LINENO "configure"
10767#include "confdefs.h"
10768$ac_includes_default
10769#include <kernel/OS.h>
10770_ACEOF
10771rm -f conftest.$ac_objext
10772if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10773 (eval $ac_compile) 2>&5
10774 ac_status=$?
10775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10776 (exit $ac_status); } &&
10777 { ac_try='test -s conftest.$ac_objext'
10778 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10779 (eval $ac_try) 2>&5
10780 ac_status=$?
10781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10782 (exit $ac_status); }; }; then
10783 ac_header_compiler=yes
10784else
10785 echo "$as_me: failed program was:" >&5
10786cat conftest.$ac_ext >&5
10787ac_header_compiler=no
10788fi
10789rm -f conftest.$ac_objext conftest.$ac_ext
10790echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10791echo "${ECHO_T}$ac_header_compiler" >&6
10792
10793# Is the header present?
10794echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10795echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10796cat >conftest.$ac_ext <<_ACEOF
10797#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010798#include "confdefs.h"
10799#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010800_ACEOF
10801if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10802 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10803 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010804 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010805 rm -f conftest.er1
10806 cat conftest.err >&5
10807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10808 (exit $ac_status); } >/dev/null; then
10809 if test -s conftest.err; then
10810 ac_cpp_err=$ac_c_preproc_warn_flag
10811 else
10812 ac_cpp_err=
10813 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010814else
Martin v. Löwis11437992002-04-12 09:54:03 +000010815 ac_cpp_err=yes
10816fi
10817if test -z "$ac_cpp_err"; then
10818 ac_header_preproc=yes
10819else
10820 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010821 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010822 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010823fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010824rm -f conftest.err conftest.$ac_ext
10825echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10826echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010827
Martin v. Löwis11437992002-04-12 09:54:03 +000010828# So? What about this header?
10829case $ac_header_compiler:$ac_header_preproc in
10830 yes:no )
10831 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10832echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10833 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10834echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10835 no:yes )
10836 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10837echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10838 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10839echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10840 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10841echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10842esac
10843echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10844echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10845if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10846 echo $ECHO_N "(cached) $ECHO_C" >&6
10847else
10848 ac_cv_header_kernel_OS_h=$ac_header_preproc
10849fi
10850echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10851echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10852
10853fi
10854if test $ac_cv_header_kernel_OS_h = yes; then
10855 cat >>confdefs.h <<\_ACEOF
10856#define WITH_THREAD 1
10857_ACEOF
10858
10859
10860cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010861#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010862_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010863
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010864 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010865else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010866
Martin v. Löwis11437992002-04-12 09:54:03 +000010867 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10868echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10869if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10870 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010871else
Martin v. Löwis11437992002-04-12 09:54:03 +000010872 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010873LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010874cat >conftest.$ac_ext <<_ACEOF
10875#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010876#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010877
Greg Steinadf63d62000-07-05 10:38:09 +000010878/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010879#ifdef __cplusplus
10880extern "C"
10881#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010882/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010883 builtin and then its argument prototype would still apply. */
10884char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010885#ifdef F77_DUMMY_MAIN
10886# ifdef __cplusplus
10887 extern "C"
10888# endif
10889 int F77_DUMMY_MAIN() { return 1; }
10890#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010891int
10892main ()
10893{
10894pthread_create ();
10895 ;
10896 return 0;
10897}
10898_ACEOF
10899rm -f conftest.$ac_objext conftest$ac_exeext
10900if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10901 (eval $ac_link) 2>&5
10902 ac_status=$?
10903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10904 (exit $ac_status); } &&
10905 { ac_try='test -s conftest$ac_exeext'
10906 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10907 (eval $ac_try) 2>&5
10908 ac_status=$?
10909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10910 (exit $ac_status); }; }; then
10911 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010912else
Martin v. Löwis11437992002-04-12 09:54:03 +000010913 echo "$as_me: failed program was:" >&5
10914cat conftest.$ac_ext >&5
10915ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010916fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010917rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10918LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010919fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010920echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10921echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10922if test $ac_cv_lib_pthreads_pthread_create = yes; then
10923 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010924#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010925_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010926
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010927 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010928 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010929 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010930else
Greg Steinadf63d62000-07-05 10:38:09 +000010931
Martin v. Löwis11437992002-04-12 09:54:03 +000010932 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10933echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10934if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10935 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010936else
Martin v. Löwis11437992002-04-12 09:54:03 +000010937 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010938LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010939cat >conftest.$ac_ext <<_ACEOF
10940#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010941#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010942
Guido van Rossum49545951997-12-02 19:28:29 +000010943/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010944#ifdef __cplusplus
10945extern "C"
10946#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010947/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010948 builtin and then its argument prototype would still apply. */
10949char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010950#ifdef F77_DUMMY_MAIN
10951# ifdef __cplusplus
10952 extern "C"
10953# endif
10954 int F77_DUMMY_MAIN() { return 1; }
10955#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010956int
10957main ()
10958{
10959pthread_create ();
10960 ;
10961 return 0;
10962}
10963_ACEOF
10964rm -f conftest.$ac_objext conftest$ac_exeext
10965if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10966 (eval $ac_link) 2>&5
10967 ac_status=$?
10968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10969 (exit $ac_status); } &&
10970 { ac_try='test -s conftest$ac_exeext'
10971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10972 (eval $ac_try) 2>&5
10973 ac_status=$?
10974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10975 (exit $ac_status); }; }; then
10976 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010977else
Martin v. Löwis11437992002-04-12 09:54:03 +000010978 echo "$as_me: failed program was:" >&5
10979cat conftest.$ac_ext >&5
10980ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010981fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010982rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10983LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010984fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010985echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10986echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10987if test $ac_cv_lib_c_r_pthread_create = yes; then
10988 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010989#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010990_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010991
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010992 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010993 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010994 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010995else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010996
Martin v. Löwis11437992002-04-12 09:54:03 +000010997 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10998echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10999if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
11000 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011001else
Martin v. Löwis11437992002-04-12 09:54:03 +000011002 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011003LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011004cat >conftest.$ac_ext <<_ACEOF
11005#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011006#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011007
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011008/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011009#ifdef __cplusplus
11010extern "C"
11011#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011012/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011013 builtin and then its argument prototype would still apply. */
11014char __d6_pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011015#ifdef F77_DUMMY_MAIN
11016# ifdef __cplusplus
11017 extern "C"
11018# endif
11019 int F77_DUMMY_MAIN() { return 1; }
11020#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011021int
11022main ()
11023{
11024__d6_pthread_create ();
11025 ;
11026 return 0;
11027}
11028_ACEOF
11029rm -f conftest.$ac_objext conftest$ac_exeext
11030if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11031 (eval $ac_link) 2>&5
11032 ac_status=$?
11033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11034 (exit $ac_status); } &&
11035 { ac_try='test -s conftest$ac_exeext'
11036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11037 (eval $ac_try) 2>&5
11038 ac_status=$?
11039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11040 (exit $ac_status); }; }; then
11041 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011042else
Martin v. Löwis11437992002-04-12 09:54:03 +000011043 echo "$as_me: failed program was:" >&5
11044cat conftest.$ac_ext >&5
11045ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011046fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011047rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11048LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011049fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011050echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
11051echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
11052if test $ac_cv_lib_thread___d6_pthread_create = yes; then
11053 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011054#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011055_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011056
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011057 echo Systems with __d6_pthread_create are not supported anymore.
11058 echo See README
11059 exit 1
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011060 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011061 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011062 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000011063else
Guido van Rossum49545951997-12-02 19:28:29 +000011064
Martin v. Löwis11437992002-04-12 09:54:03 +000011065 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
11066echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
11067if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
11068 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011069else
Martin v. Löwis11437992002-04-12 09:54:03 +000011070 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011071LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011072cat >conftest.$ac_ext <<_ACEOF
11073#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011074#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011075
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011076/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011077#ifdef __cplusplus
11078extern "C"
11079#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011080/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011081 builtin and then its argument prototype would still apply. */
11082char __pthread_create_system ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011083#ifdef F77_DUMMY_MAIN
11084# ifdef __cplusplus
11085 extern "C"
11086# endif
11087 int F77_DUMMY_MAIN() { return 1; }
11088#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011089int
11090main ()
11091{
11092__pthread_create_system ();
11093 ;
11094 return 0;
11095}
11096_ACEOF
11097rm -f conftest.$ac_objext conftest$ac_exeext
11098if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11099 (eval $ac_link) 2>&5
11100 ac_status=$?
11101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11102 (exit $ac_status); } &&
11103 { ac_try='test -s conftest$ac_exeext'
11104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11105 (eval $ac_try) 2>&5
11106 ac_status=$?
11107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11108 (exit $ac_status); }; }; then
11109 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011110else
Martin v. Löwis11437992002-04-12 09:54:03 +000011111 echo "$as_me: failed program was:" >&5
11112cat conftest.$ac_ext >&5
11113ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011114fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011115rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11116LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011117fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011118echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11119echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
11120if test $ac_cv_lib_pthread___pthread_create_system = yes; then
11121 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011122#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011123_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011124
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011125 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011126 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011127 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011128else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011129
Martin v. Löwis11437992002-04-12 09:54:03 +000011130 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
11131echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
11132if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
11133 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000011134else
Martin v. Löwis11437992002-04-12 09:54:03 +000011135 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011136LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011137cat >conftest.$ac_ext <<_ACEOF
11138#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011139#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011140
Guido van Rossumb93a8621998-05-07 13:27:32 +000011141/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011142#ifdef __cplusplus
11143extern "C"
11144#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000011145/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011146 builtin and then its argument prototype would still apply. */
11147char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011148#ifdef F77_DUMMY_MAIN
11149# ifdef __cplusplus
11150 extern "C"
11151# endif
11152 int F77_DUMMY_MAIN() { return 1; }
11153#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011154int
11155main ()
11156{
11157pthread_create ();
11158 ;
11159 return 0;
11160}
11161_ACEOF
11162rm -f conftest.$ac_objext conftest$ac_exeext
11163if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11164 (eval $ac_link) 2>&5
11165 ac_status=$?
11166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11167 (exit $ac_status); } &&
11168 { ac_try='test -s conftest$ac_exeext'
11169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11170 (eval $ac_try) 2>&5
11171 ac_status=$?
11172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11173 (exit $ac_status); }; }; then
11174 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000011175else
Martin v. Löwis11437992002-04-12 09:54:03 +000011176 echo "$as_me: failed program was:" >&5
11177cat conftest.$ac_ext >&5
11178ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011179fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011180rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11181LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011182fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011183echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
11184echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
11185if test $ac_cv_lib_cma_pthread_create = yes; then
11186 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011187#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011188_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011189
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011190 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011191 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011192 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011193else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011194
Martin v. Löwis130fb172001-07-19 11:00:41 +000011195 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000011196fi
11197
Guido van Rossum627b2d71993-12-24 10:39:16 +000011198
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011199fi
11200
Guido van Rossum0be3e491997-05-22 20:33:33 +000011201fi
11202
Guido van Rossum49545951997-12-02 19:28:29 +000011203fi
11204
Guido van Rossumb93a8621998-05-07 13:27:32 +000011205fi
11206
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011207fi
11208
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011209
Michael W. Hudson54241132001-12-07 15:38:26 +000011210fi
11211
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011212
11213fi
11214
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011215fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011216rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11217fi;
11218fi
11219
11220
11221fi
11222
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011223
Michael W. Hudson54241132001-12-07 15:38:26 +000011224
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011225 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011226 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011227
11228cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011229#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011230_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011231
11232 fi
11233
Martin v. Löwisdfc33fd2003-01-21 10:14:41 +000011234 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11235 case $ac_sys_system/$ac_sys_release in
11236 SunOS/5.8)
11237cat >>confdefs.h <<\_ACEOF
11238#define HAVE_BROKEN_POSIX_SEMAPHORES 1
11239_ACEOF
11240;;
11241 esac
11242
Martin v. Löwis11437992002-04-12 09:54:03 +000011243 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11244echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11245 if test "${ac_cv_pthread_system_supported+set}" = set; then
11246 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011247else
11248 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011249 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011250else
Martin v. Löwis11437992002-04-12 09:54:03 +000011251 cat >conftest.$ac_ext <<_ACEOF
11252#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011253#include "confdefs.h"
11254#include <pthread.h>
11255 void *foo(void *parm) {
11256 return NULL;
11257 }
11258 main() {
11259 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011260 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011261 if (pthread_attr_init(&attr)) exit(-1);
11262 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011263 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011264 exit(0);
11265 }
Martin v. Löwis11437992002-04-12 09:54:03 +000011266_ACEOF
11267rm -f conftest$ac_exeext
11268if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11269 (eval $ac_link) 2>&5
11270 ac_status=$?
11271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11272 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11274 (eval $ac_try) 2>&5
11275 ac_status=$?
11276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11277 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011278 ac_cv_pthread_system_supported=yes
11279else
Martin v. Löwis11437992002-04-12 09:54:03 +000011280 echo "$as_me: program exited with status $ac_status" >&5
11281echo "$as_me: failed program was:" >&5
11282cat conftest.$ac_ext >&5
11283( exit $ac_status )
11284ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011285fi
Barry Warsawfe33b792003-01-07 22:42:49 +000011286rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011287fi
11288
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011289fi
11290
Martin v. Löwis11437992002-04-12 09:54:03 +000011291 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11292echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011293 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011294
11295cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011296#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011297_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011298
11299 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011300
11301for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011302do
Martin v. Löwis11437992002-04-12 09:54:03 +000011303as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11304echo "$as_me:$LINENO: checking for $ac_func" >&5
11305echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11306if eval "test \"\${$as_ac_var+set}\" = set"; then
11307 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011308else
Martin v. Löwis11437992002-04-12 09:54:03 +000011309 cat >conftest.$ac_ext <<_ACEOF
11310#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011311#include "confdefs.h"
11312/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011313 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011314#include <assert.h>
11315/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011316#ifdef __cplusplus
11317extern "C"
11318#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011319/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011320 builtin and then its argument prototype would still apply. */
11321char $ac_func ();
11322char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011323
Barry Warsawfe33b792003-01-07 22:42:49 +000011324#ifdef F77_DUMMY_MAIN
11325# ifdef __cplusplus
11326 extern "C"
11327# endif
11328 int F77_DUMMY_MAIN() { return 1; }
11329#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011330int
11331main ()
11332{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011333/* The GNU C library defines this for functions which it implements
11334 to always fail with ENOSYS. Some functions are actually named
11335 something starting with __ and the normal name is an alias. */
11336#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11337choke me
11338#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011339f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011340#endif
11341
Martin v. Löwis11437992002-04-12 09:54:03 +000011342 ;
11343 return 0;
11344}
11345_ACEOF
11346rm -f conftest.$ac_objext conftest$ac_exeext
11347if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11348 (eval $ac_link) 2>&5
11349 ac_status=$?
11350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11351 (exit $ac_status); } &&
11352 { ac_try='test -s conftest$ac_exeext'
11353 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11354 (eval $ac_try) 2>&5
11355 ac_status=$?
11356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11357 (exit $ac_status); }; }; then
11358 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011359else
Martin v. Löwis11437992002-04-12 09:54:03 +000011360 echo "$as_me: failed program was:" >&5
11361cat conftest.$ac_ext >&5
11362eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011363fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011364rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011365fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011366echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11367echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11368if test `eval echo '${'$as_ac_var'}'` = yes; then
11369 cat >>confdefs.h <<_ACEOF
11370#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11371_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011372
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011373fi
11374done
11375
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011376 fi
11377
Martin v. Löwis11437992002-04-12 09:54:03 +000011378 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11379echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11380if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11381 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011382else
Martin v. Löwis11437992002-04-12 09:54:03 +000011383 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011384LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011385cat >conftest.$ac_ext <<_ACEOF
11386#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011387#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011388
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011389/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011390#ifdef __cplusplus
11391extern "C"
11392#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011393/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011394 builtin and then its argument prototype would still apply. */
11395char usconfig ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011396#ifdef F77_DUMMY_MAIN
11397# ifdef __cplusplus
11398 extern "C"
11399# endif
11400 int F77_DUMMY_MAIN() { return 1; }
11401#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011402int
11403main ()
11404{
11405usconfig ();
11406 ;
11407 return 0;
11408}
11409_ACEOF
11410rm -f conftest.$ac_objext conftest$ac_exeext
11411if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11412 (eval $ac_link) 2>&5
11413 ac_status=$?
11414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11415 (exit $ac_status); } &&
11416 { ac_try='test -s conftest$ac_exeext'
11417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11418 (eval $ac_try) 2>&5
11419 ac_status=$?
11420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11421 (exit $ac_status); }; }; then
11422 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011423else
Martin v. Löwis11437992002-04-12 09:54:03 +000011424 echo "$as_me: failed program was:" >&5
11425cat conftest.$ac_ext >&5
11426ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011427fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011428rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11429LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011430fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011431echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11432echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11433if test $ac_cv_lib_mpc_usconfig = yes; then
11434 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011435#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011436_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011437
Martin v. Löwis130fb172001-07-19 11:00:41 +000011438 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011439 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011440 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011441fi
11442
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011443
Neal Norwitza978ab02002-11-02 16:58:05 +000011444 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011445 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11446echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11447if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11448 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011449else
Martin v. Löwis11437992002-04-12 09:54:03 +000011450 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011451LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011452cat >conftest.$ac_ext <<_ACEOF
11453#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011454#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011455
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011456/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011457#ifdef __cplusplus
11458extern "C"
11459#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011460/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011461 builtin and then its argument prototype would still apply. */
11462char thr_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011463#ifdef F77_DUMMY_MAIN
11464# ifdef __cplusplus
11465 extern "C"
11466# endif
11467 int F77_DUMMY_MAIN() { return 1; }
11468#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011469int
11470main ()
11471{
11472thr_create ();
11473 ;
11474 return 0;
11475}
11476_ACEOF
11477rm -f conftest.$ac_objext conftest$ac_exeext
11478if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11479 (eval $ac_link) 2>&5
11480 ac_status=$?
11481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11482 (exit $ac_status); } &&
11483 { ac_try='test -s conftest$ac_exeext'
11484 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11485 (eval $ac_try) 2>&5
11486 ac_status=$?
11487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11488 (exit $ac_status); }; }; then
11489 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011490else
Martin v. Löwis11437992002-04-12 09:54:03 +000011491 echo "$as_me: failed program was:" >&5
11492cat conftest.$ac_ext >&5
11493ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011494fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011495rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11496LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011497fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011498echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11499echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11500if test $ac_cv_lib_thread_thr_create = yes; then
11501 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011502#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011503_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011504
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011505 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011506 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011507 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011508fi
11509
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011510 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011511
Martin v. Löwis130fb172001-07-19 11:00:41 +000011512 if test "$USE_THREAD_MODULE" != "#"
11513 then
11514 # If the above checks didn't disable threads, (at least) OSF1
11515 # needs this '-threads' argument during linking.
11516 case $ac_sys_system in
11517 OSF1) LDLAST=-threads;;
11518 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011519 fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011520
11521 if test "$posix_threads" = yes -a \
11522 "$ac_sys_system" = "SunOS" -a \
11523 "$ac_sys_release" = "5.6"; then
11524
11525cat >>confdefs.h <<\_ACEOF
11526#define HAVE_PTHREAD_DESTRUCTOR 1
11527_ACEOF
11528
11529 fi
11530
Guido van Rossum627b2d71993-12-24 10:39:16 +000011531fi
11532
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011533# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011534
11535
11536echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11537echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011538# Check whether --enable-ipv6 or --disable-ipv6 was given.
11539if test "${enable_ipv6+set}" = set; then
11540 enableval="$enable_ipv6"
11541 case "$enableval" in
11542 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011543 echo "$as_me:$LINENO: result: no" >&5
11544echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011545 ipv6=no
11546 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011547 *) echo "$as_me:$LINENO: result: yes" >&5
11548echo "${ECHO_T}yes" >&6
11549 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011550#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011551_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011552
11553 ipv6=yes
11554 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011555 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011556else
Martin v. Löwis11437992002-04-12 09:54:03 +000011557
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011558 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011559 echo "$as_me:$LINENO: result: no" >&5
11560echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011561 ipv6=no
11562
11563else
Martin v. Löwis11437992002-04-12 09:54:03 +000011564 cat >conftest.$ac_ext <<_ACEOF
11565#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011566#include "confdefs.h"
11567 /* AF_INET6 available check */
11568#include <sys/types.h>
11569#include <sys/socket.h>
11570main()
11571{
11572 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11573 exit(1);
11574 else
11575 exit(0);
11576}
11577
Martin v. Löwis11437992002-04-12 09:54:03 +000011578_ACEOF
11579rm -f conftest$ac_exeext
11580if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11581 (eval $ac_link) 2>&5
11582 ac_status=$?
11583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11584 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11585 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11586 (eval $ac_try) 2>&5
11587 ac_status=$?
11588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11589 (exit $ac_status); }; }; then
11590 echo "$as_me:$LINENO: result: yes" >&5
11591echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011592 ipv6=yes
11593else
Martin v. Löwis11437992002-04-12 09:54:03 +000011594 echo "$as_me: program exited with status $ac_status" >&5
11595echo "$as_me: failed program was:" >&5
11596cat conftest.$ac_ext >&5
11597( exit $ac_status )
11598echo "$as_me:$LINENO: result: no" >&5
11599echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011600 ipv6=no
11601fi
Barry Warsawfe33b792003-01-07 22:42:49 +000011602rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011603fi
11604
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011605if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011606 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11607echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11608 cat >conftest.$ac_ext <<_ACEOF
11609#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011610#include "confdefs.h"
11611#include <sys/types.h>
11612#include <netinet/in.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000011613#ifdef F77_DUMMY_MAIN
11614# ifdef __cplusplus
11615 extern "C"
11616# endif
11617 int F77_DUMMY_MAIN() { return 1; }
11618#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011619int
11620main ()
11621{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011622struct sockaddr_in6 x;
11623x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011624 ;
11625 return 0;
11626}
11627_ACEOF
11628rm -f conftest.$ac_objext
11629if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11630 (eval $ac_compile) 2>&5
11631 ac_status=$?
11632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11633 (exit $ac_status); } &&
11634 { ac_try='test -s conftest.$ac_objext'
11635 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11636 (eval $ac_try) 2>&5
11637 ac_status=$?
11638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11639 (exit $ac_status); }; }; then
11640 echo "$as_me:$LINENO: result: yes" >&5
11641echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011642 ipv6=yes
11643else
Martin v. Löwis11437992002-04-12 09:54:03 +000011644 echo "$as_me: failed program was:" >&5
11645cat conftest.$ac_ext >&5
11646echo "$as_me:$LINENO: result: no" >&5
11647echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011648 ipv6=no
11649fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011650rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011651fi
11652
11653if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011654 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011655#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011656_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011657
11658fi
11659
Martin v. Löwis11437992002-04-12 09:54:03 +000011660fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011661
11662ipv6type=unknown
11663ipv6lib=none
11664ipv6trylibc=no
11665
11666if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011667 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11668echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011669 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11670 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011671 case $i in
11672 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011673 cat >conftest.$ac_ext <<_ACEOF
11674#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011675#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011676
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011677#include <netinet/in.h>
11678#ifdef IPV6_INRIA_VERSION
11679yes
11680#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011681_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011682if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011683 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011684 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011685fi
11686rm -f conftest*
11687
11688 ;;
11689 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011690 cat >conftest.$ac_ext <<_ACEOF
11691#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011692#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011693
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011694#include <netinet/in.h>
11695#ifdef __KAME__
11696yes
11697#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011698_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011699if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011700 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011701 ipv6type=$i;
11702 ipv6lib=inet6
11703 ipv6libdir=/usr/local/v6/lib
11704 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011705fi
11706rm -f conftest*
11707
11708 ;;
11709 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011710 cat >conftest.$ac_ext <<_ACEOF
11711#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011712#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011713
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011714#include <features.h>
11715#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11716yes
11717#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011718_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011719if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011720 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011721 ipv6type=$i;
11722 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011723fi
11724rm -f conftest*
11725
11726 ;;
11727 linux-inet6)
11728 if test -d /usr/inet6; then
11729 ipv6type=$i
11730 ipv6lib=inet6
11731 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011732 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011733 fi
11734 ;;
11735 solaris)
11736 if test -f /etc/netconfig; then
11737 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11738 ipv6type=$i
11739 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011740 fi
11741 fi
11742 ;;
11743 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011744 cat >conftest.$ac_ext <<_ACEOF
11745#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011746#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011747
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011748#include <sys/param.h>
11749#ifdef _TOSHIBA_INET6
11750yes
11751#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011752_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011753if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011754 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011755 ipv6type=$i;
11756 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011757 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011758fi
11759rm -f conftest*
11760
11761 ;;
11762 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011763 cat >conftest.$ac_ext <<_ACEOF
11764#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011765#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011766
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011767#include </usr/local/v6/include/sys/v6config.h>
11768#ifdef __V6D__
11769yes
11770#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011771_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011772if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011773 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011774 ipv6type=$i;
11775 ipv6lib=v6;
11776 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011777 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011778fi
11779rm -f conftest*
11780
11781 ;;
11782 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011783 cat >conftest.$ac_ext <<_ACEOF
11784#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011785#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011786
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011787#include <sys/param.h>
11788#ifdef _ZETA_MINAMI_INET6
11789yes
11790#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011791_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011792if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011793 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011794 ipv6type=$i;
11795 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011796 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011797fi
11798rm -f conftest*
11799
11800 ;;
11801 esac
11802 if test "$ipv6type" != "unknown"; then
11803 break
11804 fi
11805 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011806 echo "$as_me:$LINENO: result: $ipv6type" >&5
11807echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011808fi
11809
11810if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11811 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11812 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11813 echo "using lib$ipv6lib"
11814 else
11815 if test $ipv6trylibc = "yes"; then
11816 echo "using libc"
11817 else
11818 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11819 echo "You need to fetch lib$ipv6lib.a from appropriate"
11820 echo 'ipv6 kit and compile beforehand.'
11821 exit 1
11822 fi
11823 fi
11824fi
11825
Jack Jansen7b8c7542002-04-14 20:12:41 +000011826# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000011827echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
11828echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000011829
11830# Check whether --with-universal-newlines or --without-universal-newlines was given.
11831if test "${with_universal_newlines+set}" = set; then
11832 withval="$with_universal_newlines"
11833
11834fi;
11835
11836if test -z "$with_universal_newlines"
11837then with_universal_newlines="yes"
11838fi
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011839if test "$with_universal_newlines" = "no"
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011840then
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011841 echo --without-universal-newlines is unsupported, see README
11842 exit 1
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011843else
Martin v. Löwise8aea582002-04-16 05:51:02 +000011844
11845cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011846#define WITH_UNIVERSAL_NEWLINES 1
11847_ACEOF
11848
11849fi
11850echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11851echo "${ECHO_T}$with_universal_newlines" >&6
11852
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011853# Check for --with-doc-strings
11854echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11855echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11856
11857# Check whether --with-doc-strings or --without-doc-strings was given.
11858if test "${with_doc_strings+set}" = set; then
11859 withval="$with_doc_strings"
11860
11861fi;
11862
11863if test -z "$with_doc_strings"
11864then with_doc_strings="yes"
11865fi
11866if test "$with_doc_strings" != "no"
11867then
11868
11869cat >>confdefs.h <<\_ACEOF
11870#define WITH_DOC_STRINGS 1
11871_ACEOF
11872
11873fi
11874echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11875echo "${ECHO_T}$with_doc_strings" >&6
11876
Neil Schemenauera35c6882001-02-27 04:45:05 +000011877# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011878echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11879echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11880
Neil Schemenauera35c6882001-02-27 04:45:05 +000011881# Check whether --with-pymalloc or --without-pymalloc was given.
11882if test "${with_pymalloc+set}" = set; then
11883 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011884
Martin v. Löwis11437992002-04-12 09:54:03 +000011885fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011886
Neil Schemenauer16c22972002-03-22 15:34:49 +000011887if test -z "$with_pymalloc"
11888then with_pymalloc="yes"
11889fi
11890if test "$with_pymalloc" != "no"
11891then
Martin v. Löwis11437992002-04-12 09:54:03 +000011892
11893cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011894#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011895_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011896
11897fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011898echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11899echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011900
Barry Warsawef82cd72000-06-30 16:21:01 +000011901# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011902echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11903echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11904
Barry Warsawef82cd72000-06-30 16:21:01 +000011905# Check whether --with-wctype-functions or --without-wctype-functions was given.
11906if test "${with_wctype_functions+set}" = set; then
11907 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011908
Barry Warsawef82cd72000-06-30 16:21:01 +000011909if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011910then
11911
11912cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011913#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011914_ACEOF
11915
11916 echo "$as_me:$LINENO: result: yes" >&5
11917echo "${ECHO_T}yes" >&6
11918else echo "$as_me:$LINENO: result: no" >&5
11919echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011920fi
11921else
Martin v. Löwis11437992002-04-12 09:54:03 +000011922 echo "$as_me:$LINENO: result: no" >&5
11923echo "${ECHO_T}no" >&6
11924fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011925
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011926# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011927
Guido van Rossum98935bf2001-09-05 19:13:16 +000011928DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011929
Martin v. Löwis11437992002-04-12 09:54:03 +000011930echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11931echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11932
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011933# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011934if test "${with_sgi_dl+set}" = set; then
11935 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011936
11937echo "$as_me:$LINENO: result: $withval" >&5
11938echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000011939echo --with-sgi-dl is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011940exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011941
11942cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011943#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011944_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011945
Guido van Rossume97ee181999-12-20 21:27:22 +000011946DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011947dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011948if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011949then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011950else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11951echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11952 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011953fi
11954DLINCLDIR=${dldir}
11955LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011956else
Martin v. Löwis11437992002-04-12 09:54:03 +000011957 echo "$as_me:$LINENO: result: no" >&5
11958echo "${ECHO_T}no" >&6
11959fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011960
Martin v. Löwis11437992002-04-12 09:54:03 +000011961echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11962echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011963
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011964# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011965if test "${with_dl_dld+set}" = set; then
11966 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011967
11968echo "$as_me:$LINENO: result: $withval" >&5
11969echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000011970echo --with-dl-dld is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011971exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011972
11973cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011974#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011975_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011976
Guido van Rossume97ee181999-12-20 21:27:22 +000011977DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011978dldir=`echo "$withval" | sed 's/,.*//'`
11979dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011980if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011981then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011982else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&5
11983echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&2;}
11984 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011985fi
11986DLINCLDIR=${dldir}
11987LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011988else
Martin v. Löwis11437992002-04-12 09:54:03 +000011989 echo "$as_me:$LINENO: result: no" >&5
11990echo "${ECHO_T}no" >&6
11991fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011992
Guido van Rossume97ee181999-12-20 21:27:22 +000011993# the dlopen() function means we might want to use dynload_shlib.o. some
11994# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011995
Thomas Wouters3a584202000-08-05 23:28:51 +000011996for ac_func in dlopen
11997do
Martin v. Löwis11437992002-04-12 09:54:03 +000011998as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11999echo "$as_me:$LINENO: checking for $ac_func" >&5
12000echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12001if eval "test \"\${$as_ac_var+set}\" = set"; then
12002 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012003else
Martin v. Löwis11437992002-04-12 09:54:03 +000012004 cat >conftest.$ac_ext <<_ACEOF
12005#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000012006#include "confdefs.h"
12007/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012008 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000012009#include <assert.h>
12010/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012011#ifdef __cplusplus
12012extern "C"
12013#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012014/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012015 builtin and then its argument prototype would still apply. */
12016char $ac_func ();
12017char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000012018
Barry Warsawfe33b792003-01-07 22:42:49 +000012019#ifdef F77_DUMMY_MAIN
12020# ifdef __cplusplus
12021 extern "C"
12022# endif
12023 int F77_DUMMY_MAIN() { return 1; }
12024#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012025int
12026main ()
12027{
Guido van Rossume97ee181999-12-20 21:27:22 +000012028/* The GNU C library defines this for functions which it implements
12029 to always fail with ENOSYS. Some functions are actually named
12030 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012031#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000012032choke me
12033#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012034f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000012035#endif
12036
Martin v. Löwis11437992002-04-12 09:54:03 +000012037 ;
12038 return 0;
12039}
12040_ACEOF
12041rm -f conftest.$ac_objext conftest$ac_exeext
12042if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12043 (eval $ac_link) 2>&5
12044 ac_status=$?
12045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12046 (exit $ac_status); } &&
12047 { ac_try='test -s conftest$ac_exeext'
12048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12049 (eval $ac_try) 2>&5
12050 ac_status=$?
12051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12052 (exit $ac_status); }; }; then
12053 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012054else
Martin v. Löwis11437992002-04-12 09:54:03 +000012055 echo "$as_me: failed program was:" >&5
12056cat conftest.$ac_ext >&5
12057eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012058fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012059rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012060fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012061echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12062echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12063if test `eval echo '${'$as_ac_var'}'` = yes; then
12064 cat >>confdefs.h <<_ACEOF
12065#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12066_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012067
Guido van Rossume97ee181999-12-20 21:27:22 +000012068fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012069done
Guido van Rossume97ee181999-12-20 21:27:22 +000012070
Michael W. Hudson54241132001-12-07 15:38:26 +000012071
Guido van Rossume97ee181999-12-20 21:27:22 +000012072# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12073# loading of modules.
12074
Martin v. Löwis11437992002-04-12 09:54:03 +000012075echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
12076echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012077if test -z "$DYNLOADFILE"
12078then
12079 case $ac_sys_system/$ac_sys_release in
12080 AIX*) DYNLOADFILE="dynload_aix.o";;
12081 BeOS*) DYNLOADFILE="dynload_beos.o";;
12082 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000012083 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012084 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000012085 *)
12086 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
12087 # out any dynamic loading
12088 if test "$ac_cv_func_dlopen" = yes
12089 then DYNLOADFILE="dynload_shlib.o"
12090 else DYNLOADFILE="dynload_stub.o"
12091 fi
12092 ;;
12093 esac
12094fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012095echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
12096echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012097if test "$DYNLOADFILE" != "dynload_stub.o"
12098then
Martin v. Löwis11437992002-04-12 09:54:03 +000012099
12100cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012101#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012102_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012103
12104fi
12105
Neil Schemenauer4e425612001-06-19 15:44:15 +000012106# MACHDEP_OBJS can be set to platform-specific object files needed by Python
12107
Michael W. Hudson54241132001-12-07 15:38:26 +000012108
Martin v. Löwis11437992002-04-12 09:54:03 +000012109echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
12110echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012111if test -z "$MACHDEP_OBJS"
12112then
Jack Jansene578a632001-08-15 01:27:14 +000012113 MACHDEP_OBJS=$extra_machdep_objs
12114else
12115 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000012116fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012117echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
12118echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012119
Guido van Rossum627b2d71993-12-24 10:39:16 +000012120# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012121
12122
12123
12124
12125
12126
12127
12128
12129
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
Martin v. Löwis9c36c292002-12-21 18:34:06 +000012194
Martin v. Löwisd5843682002-11-21 20:41:28 +000012195for ac_func in alarm chown clock confstr ctermid execv \
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012196 fchdir fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012197 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
12198 getpriority getpwent getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000012199 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000012200 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000012201 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000012202 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000012203 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012204 sigaction siginterrupt sigrelse strftime strptime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000012205 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012206 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000012207do
Martin v. Löwis11437992002-04-12 09:54:03 +000012208as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12209echo "$as_me:$LINENO: checking for $ac_func" >&5
12210echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12211if eval "test \"\${$as_ac_var+set}\" = set"; then
12212 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012213else
Martin v. Löwis11437992002-04-12 09:54:03 +000012214 cat >conftest.$ac_ext <<_ACEOF
12215#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012216#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012217/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012218 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012219#include <assert.h>
12220/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012221#ifdef __cplusplus
12222extern "C"
12223#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012224/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012225 builtin and then its argument prototype would still apply. */
12226char $ac_func ();
12227char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012228
Barry Warsawfe33b792003-01-07 22:42:49 +000012229#ifdef F77_DUMMY_MAIN
12230# ifdef __cplusplus
12231 extern "C"
12232# endif
12233 int F77_DUMMY_MAIN() { return 1; }
12234#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012235int
12236main ()
12237{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012238/* The GNU C library defines this for functions which it implements
12239 to always fail with ENOSYS. Some functions are actually named
12240 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012241#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012242choke me
12243#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012244f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012245#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012246
Martin v. Löwis11437992002-04-12 09:54:03 +000012247 ;
12248 return 0;
12249}
12250_ACEOF
12251rm -f conftest.$ac_objext conftest$ac_exeext
12252if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12253 (eval $ac_link) 2>&5
12254 ac_status=$?
12255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12256 (exit $ac_status); } &&
12257 { ac_try='test -s conftest$ac_exeext'
12258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12259 (eval $ac_try) 2>&5
12260 ac_status=$?
12261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12262 (exit $ac_status); }; }; then
12263 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012264else
Martin v. Löwis11437992002-04-12 09:54:03 +000012265 echo "$as_me: failed program was:" >&5
12266cat conftest.$ac_ext >&5
12267eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012268fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012269rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012270fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012271echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12272echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12273if test `eval echo '${'$as_ac_var'}'` = yes; then
12274 cat >>confdefs.h <<_ACEOF
12275#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12276_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012277
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012278fi
12279done
12280
Michael W. Hudson54241132001-12-07 15:38:26 +000012281
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012282# For some functions, having a definition is not sufficient, since
12283# we want to take their address.
12284echo "$as_me:$LINENO: checking for chroot" >&5
12285echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12286cat >conftest.$ac_ext <<_ACEOF
12287#line $LINENO "configure"
12288#include "confdefs.h"
12289#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012290#ifdef F77_DUMMY_MAIN
12291# ifdef __cplusplus
12292 extern "C"
12293# endif
12294 int F77_DUMMY_MAIN() { return 1; }
12295#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012296int
12297main ()
12298{
12299void *x=chroot
12300 ;
12301 return 0;
12302}
12303_ACEOF
12304rm -f conftest.$ac_objext
12305if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12306 (eval $ac_compile) 2>&5
12307 ac_status=$?
12308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12309 (exit $ac_status); } &&
12310 { ac_try='test -s conftest.$ac_objext'
12311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12312 (eval $ac_try) 2>&5
12313 ac_status=$?
12314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12315 (exit $ac_status); }; }; then
12316
12317cat >>confdefs.h <<\_ACEOF
12318#define HAVE_CHROOT 1
12319_ACEOF
12320
12321 echo "$as_me:$LINENO: result: yes" >&5
12322echo "${ECHO_T}yes" >&6
12323else
12324 echo "$as_me: failed program was:" >&5
12325cat conftest.$ac_ext >&5
12326echo "$as_me:$LINENO: result: no" >&5
12327echo "${ECHO_T}no" >&6
12328
12329fi
12330rm -f conftest.$ac_objext conftest.$ac_ext
12331echo "$as_me:$LINENO: checking for link" >&5
12332echo $ECHO_N "checking for link... $ECHO_C" >&6
12333cat >conftest.$ac_ext <<_ACEOF
12334#line $LINENO "configure"
12335#include "confdefs.h"
12336#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012337#ifdef F77_DUMMY_MAIN
12338# ifdef __cplusplus
12339 extern "C"
12340# endif
12341 int F77_DUMMY_MAIN() { return 1; }
12342#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012343int
12344main ()
12345{
12346void *x=link
12347 ;
12348 return 0;
12349}
12350_ACEOF
12351rm -f conftest.$ac_objext
12352if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12353 (eval $ac_compile) 2>&5
12354 ac_status=$?
12355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12356 (exit $ac_status); } &&
12357 { ac_try='test -s conftest.$ac_objext'
12358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12359 (eval $ac_try) 2>&5
12360 ac_status=$?
12361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12362 (exit $ac_status); }; }; then
12363
12364cat >>confdefs.h <<\_ACEOF
12365#define HAVE_LINK 1
12366_ACEOF
12367
12368 echo "$as_me:$LINENO: result: yes" >&5
12369echo "${ECHO_T}yes" >&6
12370else
12371 echo "$as_me: failed program was:" >&5
12372cat conftest.$ac_ext >&5
12373echo "$as_me:$LINENO: result: no" >&5
12374echo "${ECHO_T}no" >&6
12375
12376fi
12377rm -f conftest.$ac_objext conftest.$ac_ext
12378echo "$as_me:$LINENO: checking for symlink" >&5
12379echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12380cat >conftest.$ac_ext <<_ACEOF
12381#line $LINENO "configure"
12382#include "confdefs.h"
12383#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012384#ifdef F77_DUMMY_MAIN
12385# ifdef __cplusplus
12386 extern "C"
12387# endif
12388 int F77_DUMMY_MAIN() { return 1; }
12389#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012390int
12391main ()
12392{
12393void *x=symlink
12394 ;
12395 return 0;
12396}
12397_ACEOF
12398rm -f conftest.$ac_objext
12399if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12400 (eval $ac_compile) 2>&5
12401 ac_status=$?
12402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12403 (exit $ac_status); } &&
12404 { ac_try='test -s conftest.$ac_objext'
12405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12406 (eval $ac_try) 2>&5
12407 ac_status=$?
12408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12409 (exit $ac_status); }; }; then
12410
12411cat >>confdefs.h <<\_ACEOF
12412#define HAVE_SYMLINK 1
12413_ACEOF
12414
12415 echo "$as_me:$LINENO: result: yes" >&5
12416echo "${ECHO_T}yes" >&6
12417else
12418 echo "$as_me: failed program was:" >&5
12419cat conftest.$ac_ext >&5
12420echo "$as_me:$LINENO: result: no" >&5
12421echo "${ECHO_T}no" >&6
12422
12423fi
12424rm -f conftest.$ac_objext conftest.$ac_ext
12425
Martin v. Löwisd5843682002-11-21 20:41:28 +000012426# On some systems (eg. FreeBSD 5), we would find a definition of the
12427# functions ctermid_r, setgroups in the library, but no prototype
12428# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12429# address to avoid compiler warnings and potential miscompilations
12430# because of the missing prototypes.
12431
12432echo "$as_me:$LINENO: checking for ctermid_r" >&5
12433echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
12434cat >conftest.$ac_ext <<_ACEOF
12435#line $LINENO "configure"
12436#include "confdefs.h"
12437
12438#include "confdefs.h"
12439#include <stdio.h>
12440
Barry Warsawfe33b792003-01-07 22:42:49 +000012441#ifdef F77_DUMMY_MAIN
12442# ifdef __cplusplus
12443 extern "C"
12444# endif
12445 int F77_DUMMY_MAIN() { return 1; }
12446#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012447int
12448main ()
12449{
12450void* p = ctermid_r
12451 ;
12452 return 0;
12453}
12454_ACEOF
12455rm -f conftest.$ac_objext
12456if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12457 (eval $ac_compile) 2>&5
12458 ac_status=$?
12459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12460 (exit $ac_status); } &&
12461 { ac_try='test -s conftest.$ac_objext'
12462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12463 (eval $ac_try) 2>&5
12464 ac_status=$?
12465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12466 (exit $ac_status); }; }; then
12467
12468cat >>confdefs.h <<\_ACEOF
12469#define HAVE_CTERMID_R 1
12470_ACEOF
12471
12472 echo "$as_me:$LINENO: result: yes" >&5
12473echo "${ECHO_T}yes" >&6
12474else
12475 echo "$as_me: failed program was:" >&5
12476cat conftest.$ac_ext >&5
12477echo "$as_me:$LINENO: result: no" >&5
12478echo "${ECHO_T}no" >&6
12479
12480fi
12481rm -f conftest.$ac_objext conftest.$ac_ext
12482
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012483echo "$as_me:$LINENO: checking for flock" >&5
12484echo $ECHO_N "checking for flock... $ECHO_C" >&6
12485cat >conftest.$ac_ext <<_ACEOF
12486#line $LINENO "configure"
12487#include "confdefs.h"
12488
12489#include "confdefs.h"
12490#include <sys/file.h>
12491
12492#ifdef F77_DUMMY_MAIN
12493# ifdef __cplusplus
12494 extern "C"
12495# endif
12496 int F77_DUMMY_MAIN() { return 1; }
12497#endif
12498int
12499main ()
12500{
12501void* p = flock
12502 ;
12503 return 0;
12504}
12505_ACEOF
12506rm -f conftest.$ac_objext
12507if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12508 (eval $ac_compile) 2>&5
12509 ac_status=$?
12510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12511 (exit $ac_status); } &&
12512 { ac_try='test -s conftest.$ac_objext'
12513 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12514 (eval $ac_try) 2>&5
12515 ac_status=$?
12516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12517 (exit $ac_status); }; }; then
12518
12519cat >>confdefs.h <<\_ACEOF
12520#define HAVE_FLOCK 1
12521_ACEOF
12522
12523 echo "$as_me:$LINENO: result: yes" >&5
12524echo "${ECHO_T}yes" >&6
12525else
12526 echo "$as_me: failed program was:" >&5
12527cat conftest.$ac_ext >&5
12528echo "$as_me:$LINENO: result: no" >&5
12529echo "${ECHO_T}no" >&6
12530
12531fi
12532rm -f conftest.$ac_objext conftest.$ac_ext
12533
12534echo "$as_me:$LINENO: checking for getpagesize" >&5
12535echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
12536cat >conftest.$ac_ext <<_ACEOF
12537#line $LINENO "configure"
12538#include "confdefs.h"
12539
12540#include "confdefs.h"
12541#include <unistd.h>
12542
12543#ifdef F77_DUMMY_MAIN
12544# ifdef __cplusplus
12545 extern "C"
12546# endif
12547 int F77_DUMMY_MAIN() { return 1; }
12548#endif
12549int
12550main ()
12551{
12552void* p = getpagesize
12553 ;
12554 return 0;
12555}
12556_ACEOF
12557rm -f conftest.$ac_objext
12558if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12559 (eval $ac_compile) 2>&5
12560 ac_status=$?
12561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12562 (exit $ac_status); } &&
12563 { ac_try='test -s conftest.$ac_objext'
12564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12565 (eval $ac_try) 2>&5
12566 ac_status=$?
12567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12568 (exit $ac_status); }; }; then
12569
12570cat >>confdefs.h <<\_ACEOF
12571#define HAVE_GETPAGESIZE 1
12572_ACEOF
12573
12574 echo "$as_me:$LINENO: result: yes" >&5
12575echo "${ECHO_T}yes" >&6
12576else
12577 echo "$as_me: failed program was:" >&5
12578cat conftest.$ac_ext >&5
12579echo "$as_me:$LINENO: result: no" >&5
12580echo "${ECHO_T}no" >&6
12581
12582fi
12583rm -f conftest.$ac_objext conftest.$ac_ext
12584
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012585echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
12586echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
12587if test "${ac_cv_lib_c_inet_aton+set}" = set; then
12588 echo $ECHO_N "(cached) $ECHO_C" >&6
12589else
12590 ac_check_lib_save_LIBS=$LIBS
12591LIBS="-lc $LIBS"
12592cat >conftest.$ac_ext <<_ACEOF
12593#line $LINENO "configure"
12594#include "confdefs.h"
12595
12596/* Override any gcc2 internal prototype to avoid an error. */
12597#ifdef __cplusplus
12598extern "C"
12599#endif
12600/* We use char because int might match the return type of a gcc2
12601 builtin and then its argument prototype would still apply. */
12602char inet_aton ();
12603#ifdef F77_DUMMY_MAIN
12604# ifdef __cplusplus
12605 extern "C"
12606# endif
12607 int F77_DUMMY_MAIN() { return 1; }
12608#endif
12609int
12610main ()
12611{
12612inet_aton ();
12613 ;
12614 return 0;
12615}
12616_ACEOF
12617rm -f conftest.$ac_objext conftest$ac_exeext
12618if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12619 (eval $ac_link) 2>&5
12620 ac_status=$?
12621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12622 (exit $ac_status); } &&
12623 { ac_try='test -s conftest$ac_exeext'
12624 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12625 (eval $ac_try) 2>&5
12626 ac_status=$?
12627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12628 (exit $ac_status); }; }; then
12629 ac_cv_lib_c_inet_aton=yes
12630else
12631 echo "$as_me: failed program was:" >&5
12632cat conftest.$ac_ext >&5
12633ac_cv_lib_c_inet_aton=no
12634fi
12635rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12636LIBS=$ac_check_lib_save_LIBS
12637fi
12638echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
12639echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
12640if test $ac_cv_lib_c_inet_aton = yes; then
12641 /bin/true
12642else
12643
12644echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
12645echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
12646if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
12647 echo $ECHO_N "(cached) $ECHO_C" >&6
12648else
12649 ac_check_lib_save_LIBS=$LIBS
12650LIBS="-lresolv $LIBS"
12651cat >conftest.$ac_ext <<_ACEOF
12652#line $LINENO "configure"
12653#include "confdefs.h"
12654
12655/* Override any gcc2 internal prototype to avoid an error. */
12656#ifdef __cplusplus
12657extern "C"
12658#endif
12659/* We use char because int might match the return type of a gcc2
12660 builtin and then its argument prototype would still apply. */
12661char inet_aton ();
12662#ifdef F77_DUMMY_MAIN
12663# ifdef __cplusplus
12664 extern "C"
12665# endif
12666 int F77_DUMMY_MAIN() { return 1; }
12667#endif
12668int
12669main ()
12670{
12671inet_aton ();
12672 ;
12673 return 0;
12674}
12675_ACEOF
12676rm -f conftest.$ac_objext conftest$ac_exeext
12677if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12678 (eval $ac_link) 2>&5
12679 ac_status=$?
12680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12681 (exit $ac_status); } &&
12682 { ac_try='test -s conftest$ac_exeext'
12683 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12684 (eval $ac_try) 2>&5
12685 ac_status=$?
12686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12687 (exit $ac_status); }; }; then
12688 ac_cv_lib_resolv_inet_aton=yes
12689else
12690 echo "$as_me: failed program was:" >&5
12691cat conftest.$ac_ext >&5
12692ac_cv_lib_resolv_inet_aton=no
12693fi
12694rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12695LIBS=$ac_check_lib_save_LIBS
12696fi
12697echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
12698echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
12699if test $ac_cv_lib_resolv_inet_aton = yes; then
12700 cat >>confdefs.h <<_ACEOF
12701#define HAVE_LIBRESOLV 1
12702_ACEOF
12703
12704 LIBS="-lresolv $LIBS"
12705
12706fi
12707
12708
12709fi
12710
12711
Martin v. Löwise9416172003-05-03 10:12:45 +000012712echo "$as_me:$LINENO: checking for hstrerror" >&5
12713echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
12714cat >conftest.$ac_ext <<_ACEOF
12715#line $LINENO "configure"
12716#include "confdefs.h"
12717
12718#include "confdefs.h"
12719#include <netdb.h>
12720
12721#ifdef F77_DUMMY_MAIN
12722# ifdef __cplusplus
12723 extern "C"
12724# endif
12725 int F77_DUMMY_MAIN() { return 1; }
12726#endif
12727int
12728main ()
12729{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012730void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012731 ;
12732 return 0;
12733}
12734_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012735rm -f conftest.$ac_objext conftest$ac_exeext
12736if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12737 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000012738 ac_status=$?
12739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12740 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012741 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000012742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12743 (eval $ac_try) 2>&5
12744 ac_status=$?
12745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12746 (exit $ac_status); }; }; then
12747
12748cat >>confdefs.h <<\_ACEOF
12749#define HAVE_HSTRERROR 1
12750_ACEOF
12751
12752 echo "$as_me:$LINENO: result: yes" >&5
12753echo "${ECHO_T}yes" >&6
12754else
12755 echo "$as_me: failed program was:" >&5
12756cat conftest.$ac_ext >&5
12757echo "$as_me:$LINENO: result: no" >&5
12758echo "${ECHO_T}no" >&6
12759
12760fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012761rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012762
12763echo "$as_me:$LINENO: checking for inet_aton" >&5
12764echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
12765cat >conftest.$ac_ext <<_ACEOF
12766#line $LINENO "configure"
12767#include "confdefs.h"
12768
12769#include "confdefs.h"
12770#include <sys/socket.h>
12771#include <netinet/in.h>
12772#include <arpa/inet.h>
12773
12774#ifdef F77_DUMMY_MAIN
12775# ifdef __cplusplus
12776 extern "C"
12777# endif
12778 int F77_DUMMY_MAIN() { return 1; }
12779#endif
12780int
12781main ()
12782{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012783void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012784 ;
12785 return 0;
12786}
12787_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012788rm -f conftest.$ac_objext conftest$ac_exeext
12789if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12790 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000012791 ac_status=$?
12792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12793 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012794 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000012795 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12796 (eval $ac_try) 2>&5
12797 ac_status=$?
12798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12799 (exit $ac_status); }; }; then
12800
12801cat >>confdefs.h <<\_ACEOF
12802#define HAVE_INET_ATON 1
12803_ACEOF
12804
12805 echo "$as_me:$LINENO: result: yes" >&5
12806echo "${ECHO_T}yes" >&6
12807else
12808 echo "$as_me: failed program was:" >&5
12809cat conftest.$ac_ext >&5
12810echo "$as_me:$LINENO: result: no" >&5
12811echo "${ECHO_T}no" >&6
12812
12813fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012814rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012815
12816echo "$as_me:$LINENO: checking for inet_pton" >&5
12817echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
12818cat >conftest.$ac_ext <<_ACEOF
12819#line $LINENO "configure"
12820#include "confdefs.h"
12821
12822#include "confdefs.h"
12823#include <sys/socket.h>
12824#include <netinet/in.h>
12825#include <arpa/inet.h>
12826
12827#ifdef F77_DUMMY_MAIN
12828# ifdef __cplusplus
12829 extern "C"
12830# endif
12831 int F77_DUMMY_MAIN() { return 1; }
12832#endif
12833int
12834main ()
12835{
12836void* p = inet_pton
12837 ;
12838 return 0;
12839}
12840_ACEOF
12841rm -f conftest.$ac_objext
12842if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12843 (eval $ac_compile) 2>&5
12844 ac_status=$?
12845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12846 (exit $ac_status); } &&
12847 { ac_try='test -s conftest.$ac_objext'
12848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12849 (eval $ac_try) 2>&5
12850 ac_status=$?
12851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12852 (exit $ac_status); }; }; then
12853
12854cat >>confdefs.h <<\_ACEOF
12855#define HAVE_INET_PTON 1
12856_ACEOF
12857
12858 echo "$as_me:$LINENO: result: yes" >&5
12859echo "${ECHO_T}yes" >&6
12860else
12861 echo "$as_me: failed program was:" >&5
12862cat conftest.$ac_ext >&5
12863echo "$as_me:$LINENO: result: no" >&5
12864echo "${ECHO_T}no" >&6
12865
12866fi
12867rm -f conftest.$ac_objext conftest.$ac_ext
12868
Martin v. Löwisd5843682002-11-21 20:41:28 +000012869echo "$as_me:$LINENO: checking for setgroups" >&5
12870echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
12871cat >conftest.$ac_ext <<_ACEOF
12872#line $LINENO "configure"
12873#include "confdefs.h"
12874
12875#include "confdefs.h"
12876#include <unistd.h.h>
12877
Barry Warsawfe33b792003-01-07 22:42:49 +000012878#ifdef F77_DUMMY_MAIN
12879# ifdef __cplusplus
12880 extern "C"
12881# endif
12882 int F77_DUMMY_MAIN() { return 1; }
12883#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012884int
12885main ()
12886{
12887void* p = setgroups
12888 ;
12889 return 0;
12890}
12891_ACEOF
12892rm -f conftest.$ac_objext
12893if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12894 (eval $ac_compile) 2>&5
12895 ac_status=$?
12896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12897 (exit $ac_status); } &&
12898 { ac_try='test -s conftest.$ac_objext'
12899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12900 (eval $ac_try) 2>&5
12901 ac_status=$?
12902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12903 (exit $ac_status); }; }; then
12904
12905cat >>confdefs.h <<\_ACEOF
12906#define HAVE_SETGROUPS 1
12907_ACEOF
12908
12909 echo "$as_me:$LINENO: result: yes" >&5
12910echo "${ECHO_T}yes" >&6
12911else
12912 echo "$as_me: failed program was:" >&5
12913cat conftest.$ac_ext >&5
12914echo "$as_me:$LINENO: result: no" >&5
12915echo "${ECHO_T}no" >&6
12916
12917fi
12918rm -f conftest.$ac_objext conftest.$ac_ext
12919
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012920# check for openpty and forkpty
12921
Martin v. Löwis11437992002-04-12 09:54:03 +000012922
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012923for ac_func in openpty
12924do
Martin v. Löwis11437992002-04-12 09:54:03 +000012925as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12926echo "$as_me:$LINENO: checking for $ac_func" >&5
12927echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12928if eval "test \"\${$as_ac_var+set}\" = set"; then
12929 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012930else
Martin v. Löwis11437992002-04-12 09:54:03 +000012931 cat >conftest.$ac_ext <<_ACEOF
12932#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012933#include "confdefs.h"
12934/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012935 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012936#include <assert.h>
12937/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012938#ifdef __cplusplus
12939extern "C"
12940#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012941/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012942 builtin and then its argument prototype would still apply. */
12943char $ac_func ();
12944char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012945
Barry Warsawfe33b792003-01-07 22:42:49 +000012946#ifdef F77_DUMMY_MAIN
12947# ifdef __cplusplus
12948 extern "C"
12949# endif
12950 int F77_DUMMY_MAIN() { return 1; }
12951#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012952int
12953main ()
12954{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012955/* The GNU C library defines this for functions which it implements
12956 to always fail with ENOSYS. Some functions are actually named
12957 something starting with __ and the normal name is an alias. */
12958#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12959choke me
12960#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012961f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012962#endif
12963
Martin v. Löwis11437992002-04-12 09:54:03 +000012964 ;
12965 return 0;
12966}
12967_ACEOF
12968rm -f conftest.$ac_objext conftest$ac_exeext
12969if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12970 (eval $ac_link) 2>&5
12971 ac_status=$?
12972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12973 (exit $ac_status); } &&
12974 { ac_try='test -s conftest$ac_exeext'
12975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12976 (eval $ac_try) 2>&5
12977 ac_status=$?
12978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12979 (exit $ac_status); }; }; then
12980 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012981else
Martin v. Löwis11437992002-04-12 09:54:03 +000012982 echo "$as_me: failed program was:" >&5
12983cat conftest.$ac_ext >&5
12984eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012985fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012986rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012987fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012988echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12989echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12990if test `eval echo '${'$as_ac_var'}'` = yes; then
12991 cat >>confdefs.h <<_ACEOF
12992#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12993_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012994
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012995else
Martin v. Löwis11437992002-04-12 09:54:03 +000012996 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
12997echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
12998if test "${ac_cv_lib_util_openpty+set}" = set; then
12999 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013000else
Martin v. Löwis11437992002-04-12 09:54:03 +000013001 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013002LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013003cat >conftest.$ac_ext <<_ACEOF
13004#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013005#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013006
Fred Drake8cef4cf2000-06-28 16:40:38 +000013007/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013008#ifdef __cplusplus
13009extern "C"
13010#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013011/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013012 builtin and then its argument prototype would still apply. */
13013char openpty ();
Barry Warsawfe33b792003-01-07 22:42:49 +000013014#ifdef F77_DUMMY_MAIN
13015# ifdef __cplusplus
13016 extern "C"
13017# endif
13018 int F77_DUMMY_MAIN() { return 1; }
13019#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013020int
13021main ()
13022{
13023openpty ();
13024 ;
13025 return 0;
13026}
13027_ACEOF
13028rm -f conftest.$ac_objext conftest$ac_exeext
13029if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13030 (eval $ac_link) 2>&5
13031 ac_status=$?
13032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13033 (exit $ac_status); } &&
13034 { ac_try='test -s conftest$ac_exeext'
13035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13036 (eval $ac_try) 2>&5
13037 ac_status=$?
13038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13039 (exit $ac_status); }; }; then
13040 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013041else
Martin v. Löwis11437992002-04-12 09:54:03 +000013042 echo "$as_me: failed program was:" >&5
13043cat conftest.$ac_ext >&5
13044ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013045fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013046rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13047LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013048fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013049echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
13050echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
13051if test $ac_cv_lib_util_openpty = yes; then
13052 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013053#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013054_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013055 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013056fi
13057
13058fi
13059done
13060
Martin v. Löwis11437992002-04-12 09:54:03 +000013061
Fred Drake8cef4cf2000-06-28 16:40:38 +000013062for ac_func in forkpty
13063do
Martin v. Löwis11437992002-04-12 09:54:03 +000013064as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13065echo "$as_me:$LINENO: checking for $ac_func" >&5
13066echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13067if eval "test \"\${$as_ac_var+set}\" = set"; then
13068 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013069else
Martin v. Löwis11437992002-04-12 09:54:03 +000013070 cat >conftest.$ac_ext <<_ACEOF
13071#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013072#include "confdefs.h"
13073/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013074 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000013075#include <assert.h>
13076/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013077#ifdef __cplusplus
13078extern "C"
13079#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013080/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013081 builtin and then its argument prototype would still apply. */
13082char $ac_func ();
13083char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000013084
Barry Warsawfe33b792003-01-07 22:42:49 +000013085#ifdef F77_DUMMY_MAIN
13086# ifdef __cplusplus
13087 extern "C"
13088# endif
13089 int F77_DUMMY_MAIN() { return 1; }
13090#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013091int
13092main ()
13093{
Fred Drake8cef4cf2000-06-28 16:40:38 +000013094/* The GNU C library defines this for functions which it implements
13095 to always fail with ENOSYS. Some functions are actually named
13096 something starting with __ and the normal name is an alias. */
13097#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13098choke me
13099#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013100f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000013101#endif
13102
Martin v. Löwis11437992002-04-12 09:54:03 +000013103 ;
13104 return 0;
13105}
13106_ACEOF
13107rm -f conftest.$ac_objext conftest$ac_exeext
13108if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13109 (eval $ac_link) 2>&5
13110 ac_status=$?
13111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13112 (exit $ac_status); } &&
13113 { ac_try='test -s conftest$ac_exeext'
13114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13115 (eval $ac_try) 2>&5
13116 ac_status=$?
13117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13118 (exit $ac_status); }; }; then
13119 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013120else
Martin v. Löwis11437992002-04-12 09:54:03 +000013121 echo "$as_me: failed program was:" >&5
13122cat conftest.$ac_ext >&5
13123eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013124fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013125rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013126fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013127echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13128echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13129if test `eval echo '${'$as_ac_var'}'` = yes; then
13130 cat >>confdefs.h <<_ACEOF
13131#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13132_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013133
Fred Drake8cef4cf2000-06-28 16:40:38 +000013134else
Martin v. Löwis11437992002-04-12 09:54:03 +000013135 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
13136echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
13137if test "${ac_cv_lib_util_forkpty+set}" = set; then
13138 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013139else
Martin v. Löwis11437992002-04-12 09:54:03 +000013140 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013141LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013142cat >conftest.$ac_ext <<_ACEOF
13143#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013144#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013145
Fred Drake8cef4cf2000-06-28 16:40:38 +000013146/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013147#ifdef __cplusplus
13148extern "C"
13149#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013150/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013151 builtin and then its argument prototype would still apply. */
13152char forkpty ();
Barry Warsawfe33b792003-01-07 22:42:49 +000013153#ifdef F77_DUMMY_MAIN
13154# ifdef __cplusplus
13155 extern "C"
13156# endif
13157 int F77_DUMMY_MAIN() { return 1; }
13158#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013159int
13160main ()
13161{
13162forkpty ();
13163 ;
13164 return 0;
13165}
13166_ACEOF
13167rm -f conftest.$ac_objext conftest$ac_exeext
13168if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13169 (eval $ac_link) 2>&5
13170 ac_status=$?
13171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13172 (exit $ac_status); } &&
13173 { ac_try='test -s conftest$ac_exeext'
13174 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13175 (eval $ac_try) 2>&5
13176 ac_status=$?
13177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13178 (exit $ac_status); }; }; then
13179 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013180else
Martin v. Löwis11437992002-04-12 09:54:03 +000013181 echo "$as_me: failed program was:" >&5
13182cat conftest.$ac_ext >&5
13183ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013184fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013185rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13186LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013187fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013188echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
13189echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
13190if test $ac_cv_lib_util_forkpty = yes; then
13191 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013192#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013193_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013194 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013195fi
13196
13197fi
13198done
13199
Jack Jansendd19cf82001-12-06 22:36:17 +000013200
Michael W. Hudson54241132001-12-07 15:38:26 +000013201# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013202
13203
13204
13205
13206
13207
Fred Drake8cef4cf2000-06-28 16:40:38 +000013208for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
13209do
Martin v. Löwis11437992002-04-12 09:54:03 +000013210as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13211echo "$as_me:$LINENO: checking for $ac_func" >&5
13212echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13213if eval "test \"\${$as_ac_var+set}\" = set"; then
13214 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013215else
Martin v. Löwis11437992002-04-12 09:54:03 +000013216 cat >conftest.$ac_ext <<_ACEOF
13217#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013218#include "confdefs.h"
13219/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013220 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013221#include <assert.h>
13222/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013223#ifdef __cplusplus
13224extern "C"
13225#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013226/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013227 builtin and then its argument prototype would still apply. */
13228char $ac_func ();
13229char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013230
Barry Warsawfe33b792003-01-07 22:42:49 +000013231#ifdef F77_DUMMY_MAIN
13232# ifdef __cplusplus
13233 extern "C"
13234# endif
13235 int F77_DUMMY_MAIN() { return 1; }
13236#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013237int
13238main ()
13239{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013240/* The GNU C library defines this for functions which it implements
13241 to always fail with ENOSYS. Some functions are actually named
13242 something starting with __ and the normal name is an alias. */
13243#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13244choke me
13245#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013246f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013247#endif
13248
Martin v. Löwis11437992002-04-12 09:54:03 +000013249 ;
13250 return 0;
13251}
13252_ACEOF
13253rm -f conftest.$ac_objext conftest$ac_exeext
13254if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13255 (eval $ac_link) 2>&5
13256 ac_status=$?
13257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13258 (exit $ac_status); } &&
13259 { ac_try='test -s conftest$ac_exeext'
13260 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13261 (eval $ac_try) 2>&5
13262 ac_status=$?
13263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13264 (exit $ac_status); }; }; then
13265 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013266else
Martin v. Löwis11437992002-04-12 09:54:03 +000013267 echo "$as_me: failed program was:" >&5
13268cat conftest.$ac_ext >&5
13269eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013270fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013271rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013272fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013273echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13274echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13275if test `eval echo '${'$as_ac_var'}'` = yes; then
13276 cat >>confdefs.h <<_ACEOF
13277#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13278_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000013279
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013280fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000013281done
13282
Michael W. Hudson54241132001-12-07 15:38:26 +000013283
Martin v. Löwis11437992002-04-12 09:54:03 +000013284
13285
13286
13287
13288
Martin v. Löwis1142de32002-03-29 16:28:31 +000013289for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000013290do
Martin v. Löwis11437992002-04-12 09:54:03 +000013291as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13292echo "$as_me:$LINENO: checking for $ac_func" >&5
13293echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13294if eval "test \"\${$as_ac_var+set}\" = set"; then
13295 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013296else
Martin v. Löwis11437992002-04-12 09:54:03 +000013297 cat >conftest.$ac_ext <<_ACEOF
13298#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013299#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013300/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013301 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013302#include <assert.h>
13303/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013304#ifdef __cplusplus
13305extern "C"
13306#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013307/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013308 builtin and then its argument prototype would still apply. */
13309char $ac_func ();
13310char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013311
Barry Warsawfe33b792003-01-07 22:42:49 +000013312#ifdef F77_DUMMY_MAIN
13313# ifdef __cplusplus
13314 extern "C"
13315# endif
13316 int F77_DUMMY_MAIN() { return 1; }
13317#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013318int
13319main ()
13320{
Guido van Rossum627b2d71993-12-24 10:39:16 +000013321/* The GNU C library defines this for functions which it implements
13322 to always fail with ENOSYS. Some functions are actually named
13323 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013324#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013325choke me
13326#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013327f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013328#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013329
Martin v. Löwis11437992002-04-12 09:54:03 +000013330 ;
13331 return 0;
13332}
13333_ACEOF
13334rm -f conftest.$ac_objext conftest$ac_exeext
13335if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13336 (eval $ac_link) 2>&5
13337 ac_status=$?
13338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13339 (exit $ac_status); } &&
13340 { ac_try='test -s conftest$ac_exeext'
13341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13342 (eval $ac_try) 2>&5
13343 ac_status=$?
13344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13345 (exit $ac_status); }; }; then
13346 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013347else
Martin v. Löwis11437992002-04-12 09:54:03 +000013348 echo "$as_me: failed program was:" >&5
13349cat conftest.$ac_ext >&5
13350eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013351fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013352rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000013353fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013354echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13355echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13356if test `eval echo '${'$as_ac_var'}'` = yes; then
13357 cat >>confdefs.h <<_ACEOF
13358#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13359_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000013360
Martin v. Löwis1142de32002-03-29 16:28:31 +000013361else
Martin v. Löwis11437992002-04-12 09:54:03 +000013362 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013363fi
13364done
13365
13366
Martin v. Löwis11437992002-04-12 09:54:03 +000013367
Martin v. Löwis1142de32002-03-29 16:28:31 +000013368for ac_func in getpgrp
13369do
Martin v. Löwis11437992002-04-12 09:54:03 +000013370as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13371echo "$as_me:$LINENO: checking for $ac_func" >&5
13372echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13373if eval "test \"\${$as_ac_var+set}\" = set"; then
13374 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000013375else
Martin v. Löwis11437992002-04-12 09:54:03 +000013376 cat >conftest.$ac_ext <<_ACEOF
13377#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013378#include "confdefs.h"
13379/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013380 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000013381#include <assert.h>
13382/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013383#ifdef __cplusplus
13384extern "C"
13385#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013386/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013387 builtin and then its argument prototype would still apply. */
13388char $ac_func ();
13389char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000013390
Barry Warsawfe33b792003-01-07 22:42:49 +000013391#ifdef F77_DUMMY_MAIN
13392# ifdef __cplusplus
13393 extern "C"
13394# endif
13395 int F77_DUMMY_MAIN() { return 1; }
13396#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013397int
13398main ()
13399{
Martin v. Löwis1142de32002-03-29 16:28:31 +000013400/* The GNU C library defines this for functions which it implements
13401 to always fail with ENOSYS. Some functions are actually named
13402 something starting with __ and the normal name is an alias. */
13403#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13404choke me
13405#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013406f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000013407#endif
13408
Martin v. Löwis11437992002-04-12 09:54:03 +000013409 ;
13410 return 0;
13411}
13412_ACEOF
13413rm -f conftest.$ac_objext conftest$ac_exeext
13414if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13415 (eval $ac_link) 2>&5
13416 ac_status=$?
13417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13418 (exit $ac_status); } &&
13419 { ac_try='test -s conftest$ac_exeext'
13420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13421 (eval $ac_try) 2>&5
13422 ac_status=$?
13423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13424 (exit $ac_status); }; }; then
13425 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013426else
Martin v. Löwis11437992002-04-12 09:54:03 +000013427 echo "$as_me: failed program was:" >&5
13428cat conftest.$ac_ext >&5
13429eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013430fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013431rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013432fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013433echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13434echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13435if test `eval echo '${'$as_ac_var'}'` = yes; then
13436 cat >>confdefs.h <<_ACEOF
13437#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13438_ACEOF
13439 cat >conftest.$ac_ext <<_ACEOF
13440#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013441#include "confdefs.h"
13442#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000013443#ifdef F77_DUMMY_MAIN
13444# ifdef __cplusplus
13445 extern "C"
13446# endif
13447 int F77_DUMMY_MAIN() { return 1; }
13448#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013449int
13450main ()
13451{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013452getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013453 ;
13454 return 0;
13455}
13456_ACEOF
13457rm -f conftest.$ac_objext
13458if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13459 (eval $ac_compile) 2>&5
13460 ac_status=$?
13461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13462 (exit $ac_status); } &&
13463 { ac_try='test -s conftest.$ac_objext'
13464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13465 (eval $ac_try) 2>&5
13466 ac_status=$?
13467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13468 (exit $ac_status); }; }; then
13469
13470cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013471#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013472_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013473
Martin v. Löwis11437992002-04-12 09:54:03 +000013474
Guido van Rossumf78abae1997-01-21 22:02:36 +000013475else
Martin v. Löwis11437992002-04-12 09:54:03 +000013476 echo "$as_me: failed program was:" >&5
13477cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013478fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013479rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013480
Guido van Rossum627b2d71993-12-24 10:39:16 +000013481fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013482done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013483
Jack Jansen150753c2003-03-29 22:07:47 +000013484
13485for ac_func in setpgrp
13486do
13487as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13488echo "$as_me:$LINENO: checking for $ac_func" >&5
13489echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13490if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013491 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013492else
Martin v. Löwis11437992002-04-12 09:54:03 +000013493 cat >conftest.$ac_ext <<_ACEOF
13494#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013495#include "confdefs.h"
Jack Jansen150753c2003-03-29 22:07:47 +000013496/* System header to define __stub macros and hopefully few prototypes,
13497 which can conflict with char $ac_func (); below. */
13498#include <assert.h>
13499/* Override any gcc2 internal prototype to avoid an error. */
13500#ifdef __cplusplus
13501extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000013502#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013503/* We use char because int might match the return type of a gcc2
13504 builtin and then its argument prototype would still apply. */
13505char $ac_func ();
13506char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013507
Barry Warsawfe33b792003-01-07 22:42:49 +000013508#ifdef F77_DUMMY_MAIN
13509# ifdef __cplusplus
13510 extern "C"
13511# endif
13512 int F77_DUMMY_MAIN() { return 1; }
13513#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013514int
13515main ()
13516{
Jack Jansen150753c2003-03-29 22:07:47 +000013517/* The GNU C library defines this for functions which it implements
13518 to always fail with ENOSYS. Some functions are actually named
13519 something starting with __ and the normal name is an alias. */
13520#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13521choke me
13522#else
13523f = $ac_func;
13524#endif
13525
Martin v. Löwis11437992002-04-12 09:54:03 +000013526 ;
13527 return 0;
13528}
13529_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013530rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000013531if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13532 (eval $ac_link) 2>&5
13533 ac_status=$?
13534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013535 (exit $ac_status); } &&
13536 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013537 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13538 (eval $ac_try) 2>&5
13539 ac_status=$?
13540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13541 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000013542 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013543else
Jack Jansen150753c2003-03-29 22:07:47 +000013544 echo "$as_me: failed program was:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013545cat conftest.$ac_ext >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013546eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013547fi
Jack Jansen150753c2003-03-29 22:07:47 +000013548rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013549fi
Jack Jansen150753c2003-03-29 22:07:47 +000013550echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13551echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13552if test `eval echo '${'$as_ac_var'}'` = yes; then
13553 cat >>confdefs.h <<_ACEOF
13554#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13555_ACEOF
13556 cat >conftest.$ac_ext <<_ACEOF
13557#line $LINENO "configure"
13558#include "confdefs.h"
13559#include <unistd.h>
13560#ifdef F77_DUMMY_MAIN
13561# ifdef __cplusplus
13562 extern "C"
13563# endif
13564 int F77_DUMMY_MAIN() { return 1; }
13565#endif
13566int
13567main ()
13568{
13569setpgrp(0,0);
13570 ;
13571 return 0;
13572}
13573_ACEOF
13574rm -f conftest.$ac_objext
13575if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13576 (eval $ac_compile) 2>&5
13577 ac_status=$?
13578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13579 (exit $ac_status); } &&
13580 { ac_try='test -s conftest.$ac_objext'
13581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13582 (eval $ac_try) 2>&5
13583 ac_status=$?
13584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13585 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013586
13587cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013588#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013589_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013590
Jack Jansen150753c2003-03-29 22:07:47 +000013591
13592else
13593 echo "$as_me: failed program was:" >&5
13594cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013595fi
Jack Jansen150753c2003-03-29 22:07:47 +000013596rm -f conftest.$ac_objext conftest.$ac_ext
13597
13598fi
13599done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013600
Martin v. Löwis11437992002-04-12 09:54:03 +000013601
Thomas Wouters3a584202000-08-05 23:28:51 +000013602for ac_func in gettimeofday
13603do
Martin v. Löwis11437992002-04-12 09:54:03 +000013604as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13605echo "$as_me:$LINENO: checking for $ac_func" >&5
13606echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13607if eval "test \"\${$as_ac_var+set}\" = set"; then
13608 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013609else
Martin v. Löwis11437992002-04-12 09:54:03 +000013610 cat >conftest.$ac_ext <<_ACEOF
13611#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013612#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013613/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013614 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013615#include <assert.h>
13616/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013617#ifdef __cplusplus
13618extern "C"
13619#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013620/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013621 builtin and then its argument prototype would still apply. */
13622char $ac_func ();
13623char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013624
Barry Warsawfe33b792003-01-07 22:42:49 +000013625#ifdef F77_DUMMY_MAIN
13626# ifdef __cplusplus
13627 extern "C"
13628# endif
13629 int F77_DUMMY_MAIN() { return 1; }
13630#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013631int
13632main ()
13633{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013634/* The GNU C library defines this for functions which it implements
13635 to always fail with ENOSYS. Some functions are actually named
13636 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013637#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013638choke me
13639#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013640f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013641#endif
13642
Martin v. Löwis11437992002-04-12 09:54:03 +000013643 ;
13644 return 0;
13645}
13646_ACEOF
13647rm -f conftest.$ac_objext conftest$ac_exeext
13648if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13649 (eval $ac_link) 2>&5
13650 ac_status=$?
13651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13652 (exit $ac_status); } &&
13653 { ac_try='test -s conftest$ac_exeext'
13654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13655 (eval $ac_try) 2>&5
13656 ac_status=$?
13657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13658 (exit $ac_status); }; }; then
13659 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013660else
Martin v. Löwis11437992002-04-12 09:54:03 +000013661 echo "$as_me: failed program was:" >&5
13662cat conftest.$ac_ext >&5
13663eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013664fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013665rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013666fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013667echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13668echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13669if test `eval echo '${'$as_ac_var'}'` = yes; then
13670 cat >>confdefs.h <<_ACEOF
13671#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13672_ACEOF
13673 cat >conftest.$ac_ext <<_ACEOF
13674#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013675#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013676#include <sys/time.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000013677#ifdef F77_DUMMY_MAIN
13678# ifdef __cplusplus
13679 extern "C"
13680# endif
13681 int F77_DUMMY_MAIN() { return 1; }
13682#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013683int
13684main ()
13685{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013686gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013687 ;
13688 return 0;
13689}
13690_ACEOF
13691rm -f conftest.$ac_objext
13692if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13693 (eval $ac_compile) 2>&5
13694 ac_status=$?
13695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13696 (exit $ac_status); } &&
13697 { ac_try='test -s conftest.$ac_objext'
13698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13699 (eval $ac_try) 2>&5
13700 ac_status=$?
13701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13702 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013703 :
13704else
Martin v. Löwis11437992002-04-12 09:54:03 +000013705 echo "$as_me: failed program was:" >&5
13706cat conftest.$ac_ext >&5
13707
13708cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013709#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013710_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013711
Martin v. Löwis11437992002-04-12 09:54:03 +000013712
Guido van Rossum627b2d71993-12-24 10:39:16 +000013713fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013714rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013715
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013716fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013717done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013718
Michael W. Hudson54241132001-12-07 15:38:26 +000013719
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013720echo "$as_me:$LINENO: checking for major" >&5
13721echo $ECHO_N "checking for major... $ECHO_C" >&6
13722cat >conftest.$ac_ext <<_ACEOF
13723#line $LINENO "configure"
13724#include "confdefs.h"
13725
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013726#if defined(MAJOR_IN_MKDEV)
13727#include <sys/mkdev.h>
13728#elif defined(MAJOR_IN_SYSMACROS)
13729#include <sys/sysmacros.h>
13730#else
13731#include <sys/types.h>
13732#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013733
Barry Warsawfe33b792003-01-07 22:42:49 +000013734#ifdef F77_DUMMY_MAIN
13735# ifdef __cplusplus
13736 extern "C"
13737# endif
13738 int F77_DUMMY_MAIN() { return 1; }
13739#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013740int
13741main ()
13742{
13743
13744 makedev(major(0),minor(0));
13745
13746 ;
13747 return 0;
13748}
13749_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000013750rm -f conftest.$ac_objext conftest$ac_exeext
13751if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13752 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013753 ac_status=$?
13754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13755 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000013756 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13758 (eval $ac_try) 2>&5
13759 ac_status=$?
13760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13761 (exit $ac_status); }; }; then
13762
13763
13764cat >>confdefs.h <<\_ACEOF
13765#define HAVE_DEVICE_MACROS 1
13766_ACEOF
13767
13768 echo "$as_me:$LINENO: result: yes" >&5
13769echo "${ECHO_T}yes" >&6
13770
13771else
13772 echo "$as_me: failed program was:" >&5
13773cat conftest.$ac_ext >&5
13774
13775 echo "$as_me:$LINENO: result: no" >&5
13776echo "${ECHO_T}no" >&6
13777
13778fi
Martin v. Löwise3271202002-11-07 07:42:30 +000013779rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013780
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013781# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013782# for [no]getaddrinfo in netdb.h.
13783echo "$as_me:$LINENO: checking for getaddrinfo" >&5
13784echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
13785cat >conftest.$ac_ext <<_ACEOF
13786#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013787#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013788
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013789#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013790#include <sys/socket.h>
13791#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013792#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013793
Barry Warsawfe33b792003-01-07 22:42:49 +000013794#ifdef F77_DUMMY_MAIN
13795# ifdef __cplusplus
13796 extern "C"
13797# endif
13798 int F77_DUMMY_MAIN() { return 1; }
13799#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013800int
13801main ()
13802{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013803
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013804getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013805
Martin v. Löwis11437992002-04-12 09:54:03 +000013806 ;
13807 return 0;
13808}
13809_ACEOF
13810rm -f conftest.$ac_objext conftest$ac_exeext
13811if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13812 (eval $ac_link) 2>&5
13813 ac_status=$?
13814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13815 (exit $ac_status); } &&
13816 { ac_try='test -s conftest$ac_exeext'
13817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13818 (eval $ac_try) 2>&5
13819 ac_status=$?
13820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13821 (exit $ac_status); }; }; then
13822
13823echo "$as_me:$LINENO: result: yes" >&5
13824echo "${ECHO_T}yes" >&6
13825echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
13826echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013827if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013828 echo "$as_me:$LINENO: result: buggy" >&5
13829echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013830buggygetaddrinfo=yes
13831else
Martin v. Löwis11437992002-04-12 09:54:03 +000013832 cat >conftest.$ac_ext <<_ACEOF
13833#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013834#include "confdefs.h"
13835
13836#include <sys/types.h>
13837#include <netdb.h>
13838#include <string.h>
13839#include <sys/socket.h>
13840#include <netinet/in.h>
13841
13842main()
13843{
13844 int passive, gaierr, inet4 = 0, inet6 = 0;
13845 struct addrinfo hints, *ai, *aitop;
13846 char straddr[INET6_ADDRSTRLEN], strport[16];
13847
13848 for (passive = 0; passive <= 1; passive++) {
13849 memset(&hints, 0, sizeof(hints));
13850 hints.ai_family = AF_UNSPEC;
13851 hints.ai_flags = passive ? AI_PASSIVE : 0;
13852 hints.ai_socktype = SOCK_STREAM;
13853 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13854 (void)gai_strerror(gaierr);
13855 goto bad;
13856 }
13857 for (ai = aitop; ai; ai = ai->ai_next) {
13858 if (ai->ai_addr == NULL ||
13859 ai->ai_addrlen == 0 ||
13860 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13861 straddr, sizeof(straddr), strport, sizeof(strport),
13862 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13863 goto bad;
13864 }
13865 switch (ai->ai_family) {
13866 case AF_INET:
13867 if (strcmp(strport, "54321") != 0) {
13868 goto bad;
13869 }
13870 if (passive) {
13871 if (strcmp(straddr, "0.0.0.0") != 0) {
13872 goto bad;
13873 }
13874 } else {
13875 if (strcmp(straddr, "127.0.0.1") != 0) {
13876 goto bad;
13877 }
13878 }
13879 inet4++;
13880 break;
13881 case AF_INET6:
13882 if (strcmp(strport, "54321") != 0) {
13883 goto bad;
13884 }
13885 if (passive) {
13886 if (strcmp(straddr, "::") != 0) {
13887 goto bad;
13888 }
13889 } else {
13890 if (strcmp(straddr, "::1") != 0) {
13891 goto bad;
13892 }
13893 }
13894 inet6++;
13895 break;
13896 case AF_UNSPEC:
13897 goto bad;
13898 break;
13899 default:
13900 /* another family support? */
13901 break;
13902 }
13903 }
13904 }
13905
13906 if (!(inet4 == 0 || inet4 == 2))
13907 goto bad;
13908 if (!(inet6 == 0 || inet6 == 2))
13909 goto bad;
13910
13911 if (aitop)
13912 freeaddrinfo(aitop);
13913 exit(0);
13914
13915 bad:
13916 if (aitop)
13917 freeaddrinfo(aitop);
13918 exit(1);
13919}
13920
Martin v. Löwis11437992002-04-12 09:54:03 +000013921_ACEOF
13922rm -f conftest$ac_exeext
13923if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13924 (eval $ac_link) 2>&5
13925 ac_status=$?
13926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13927 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13928 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13929 (eval $ac_try) 2>&5
13930 ac_status=$?
13931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13932 (exit $ac_status); }; }; then
13933 echo "$as_me:$LINENO: result: good" >&5
13934echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013935buggygetaddrinfo=no
13936else
Martin v. Löwis11437992002-04-12 09:54:03 +000013937 echo "$as_me: program exited with status $ac_status" >&5
13938echo "$as_me: failed program was:" >&5
13939cat conftest.$ac_ext >&5
13940( exit $ac_status )
13941echo "$as_me:$LINENO: result: buggy" >&5
13942echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013943buggygetaddrinfo=yes
13944fi
Barry Warsawfe33b792003-01-07 22:42:49 +000013945rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013946fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013947else
Martin v. Löwis11437992002-04-12 09:54:03 +000013948 echo "$as_me: failed program was:" >&5
13949cat conftest.$ac_ext >&5
13950
13951echo "$as_me:$LINENO: result: no" >&5
13952echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013953buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013954
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013955fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013956rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013957
13958if test "$buggygetaddrinfo" = "yes"; then
13959 if test "$ipv6" = "yes"; then
13960 echo 'Fatal: You must get working getaddrinfo() function.'
13961 echo ' or you can specify "--disable-ipv6"'.
13962 exit 1
13963 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013964else
Martin v. Löwis11437992002-04-12 09:54:03 +000013965
13966cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013967#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013968_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013969
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013970fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013971
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013972for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013973do
Martin v. Löwis11437992002-04-12 09:54:03 +000013974as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13975echo "$as_me:$LINENO: checking for $ac_func" >&5
13976echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13977if eval "test \"\${$as_ac_var+set}\" = set"; then
13978 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013979else
Martin v. Löwis11437992002-04-12 09:54:03 +000013980 cat >conftest.$ac_ext <<_ACEOF
13981#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013982#include "confdefs.h"
13983/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013984 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013985#include <assert.h>
13986/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013987#ifdef __cplusplus
13988extern "C"
13989#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013990/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013991 builtin and then its argument prototype would still apply. */
13992char $ac_func ();
13993char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013994
Barry Warsawfe33b792003-01-07 22:42:49 +000013995#ifdef F77_DUMMY_MAIN
13996# ifdef __cplusplus
13997 extern "C"
13998# endif
13999 int F77_DUMMY_MAIN() { return 1; }
14000#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014001int
14002main ()
14003{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014004/* The GNU C library defines this for functions which it implements
14005 to always fail with ENOSYS. Some functions are actually named
14006 something starting with __ and the normal name is an alias. */
14007#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14008choke me
14009#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014010f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014011#endif
14012
Martin v. Löwis11437992002-04-12 09:54:03 +000014013 ;
14014 return 0;
14015}
14016_ACEOF
14017rm -f conftest.$ac_objext conftest$ac_exeext
14018if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14019 (eval $ac_link) 2>&5
14020 ac_status=$?
14021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14022 (exit $ac_status); } &&
14023 { ac_try='test -s conftest$ac_exeext'
14024 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14025 (eval $ac_try) 2>&5
14026 ac_status=$?
14027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14028 (exit $ac_status); }; }; then
14029 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014030else
Martin v. Löwis11437992002-04-12 09:54:03 +000014031 echo "$as_me: failed program was:" >&5
14032cat conftest.$ac_ext >&5
14033eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014034fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014035rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014036fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014037echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14038echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14039if test `eval echo '${'$as_ac_var'}'` = yes; then
14040 cat >>confdefs.h <<_ACEOF
14041#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14042_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014043
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014044fi
14045done
14046
Michael W. Hudson54241132001-12-07 15:38:26 +000014047
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014048# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000014049echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
14050echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14051if test "${ac_cv_header_time+set}" = set; then
14052 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014053else
Martin v. Löwis11437992002-04-12 09:54:03 +000014054 cat >conftest.$ac_ext <<_ACEOF
14055#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014056#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014057#include <sys/types.h>
14058#include <sys/time.h>
14059#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014060
Barry Warsawfe33b792003-01-07 22:42:49 +000014061#ifdef F77_DUMMY_MAIN
14062# ifdef __cplusplus
14063 extern "C"
14064# endif
14065 int F77_DUMMY_MAIN() { return 1; }
14066#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014067int
14068main ()
14069{
14070if ((struct tm *) 0)
14071return 0;
14072 ;
14073 return 0;
14074}
14075_ACEOF
14076rm -f conftest.$ac_objext
14077if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14078 (eval $ac_compile) 2>&5
14079 ac_status=$?
14080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14081 (exit $ac_status); } &&
14082 { ac_try='test -s conftest.$ac_objext'
14083 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14084 (eval $ac_try) 2>&5
14085 ac_status=$?
14086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14087 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014088 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014089else
Martin v. Löwis11437992002-04-12 09:54:03 +000014090 echo "$as_me: failed program was:" >&5
14091cat conftest.$ac_ext >&5
14092ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014093fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014094rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014095fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014096echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
14097echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014098if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014099
14100cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014101#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014102_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014103
14104fi
14105
Martin v. Löwis11437992002-04-12 09:54:03 +000014106echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
14107echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
14108if test "${ac_cv_struct_tm+set}" = set; then
14109 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014110else
Martin v. Löwis11437992002-04-12 09:54:03 +000014111 cat >conftest.$ac_ext <<_ACEOF
14112#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014113#include "confdefs.h"
14114#include <sys/types.h>
14115#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014116
Barry Warsawfe33b792003-01-07 22:42:49 +000014117#ifdef F77_DUMMY_MAIN
14118# ifdef __cplusplus
14119 extern "C"
14120# endif
14121 int F77_DUMMY_MAIN() { return 1; }
14122#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014123int
14124main ()
14125{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014126struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000014127 ;
14128 return 0;
14129}
14130_ACEOF
14131rm -f conftest.$ac_objext
14132if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14133 (eval $ac_compile) 2>&5
14134 ac_status=$?
14135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14136 (exit $ac_status); } &&
14137 { ac_try='test -s conftest.$ac_objext'
14138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14139 (eval $ac_try) 2>&5
14140 ac_status=$?
14141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14142 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014143 ac_cv_struct_tm=time.h
14144else
Martin v. Löwis11437992002-04-12 09:54:03 +000014145 echo "$as_me: failed program was:" >&5
14146cat conftest.$ac_ext >&5
14147ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014148fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014149rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014150fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014151echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
14152echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014153if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014154
14155cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014156#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014157_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014158
14159fi
14160
Martin v. Löwis11437992002-04-12 09:54:03 +000014161echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
14162echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
14163if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
14164 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014165else
Martin v. Löwis11437992002-04-12 09:54:03 +000014166 cat >conftest.$ac_ext <<_ACEOF
14167#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014168#include "confdefs.h"
14169#include <sys/types.h>
14170#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000014171
14172
Barry Warsawfe33b792003-01-07 22:42:49 +000014173#ifdef F77_DUMMY_MAIN
14174# ifdef __cplusplus
14175 extern "C"
14176# endif
14177 int F77_DUMMY_MAIN() { return 1; }
14178#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014179int
14180main ()
14181{
14182static struct tm ac_aggr;
14183if (ac_aggr.tm_zone)
14184return 0;
14185 ;
14186 return 0;
14187}
14188_ACEOF
14189rm -f conftest.$ac_objext
14190if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14191 (eval $ac_compile) 2>&5
14192 ac_status=$?
14193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14194 (exit $ac_status); } &&
14195 { ac_try='test -s conftest.$ac_objext'
14196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14197 (eval $ac_try) 2>&5
14198 ac_status=$?
14199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14200 (exit $ac_status); }; }; then
14201 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014202else
Martin v. Löwis11437992002-04-12 09:54:03 +000014203 echo "$as_me: failed program was:" >&5
14204cat conftest.$ac_ext >&5
14205ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014206fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014207rm -f conftest.$ac_objext conftest.$ac_ext
14208fi
14209echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
14210echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
14211if test $ac_cv_member_struct_tm_tm_zone = yes; then
14212
14213cat >>confdefs.h <<_ACEOF
14214#define HAVE_STRUCT_TM_TM_ZONE 1
14215_ACEOF
14216
14217
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014218fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014219
Martin v. Löwis11437992002-04-12 09:54:03 +000014220if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14221
14222cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014223#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014224_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014225
14226else
Martin v. Löwis11437992002-04-12 09:54:03 +000014227 echo "$as_me:$LINENO: checking for tzname" >&5
14228echo $ECHO_N "checking for tzname... $ECHO_C" >&6
14229if test "${ac_cv_var_tzname+set}" = set; then
14230 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014231else
Martin v. Löwis11437992002-04-12 09:54:03 +000014232 cat >conftest.$ac_ext <<_ACEOF
14233#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014234#include "confdefs.h"
14235#include <time.h>
14236#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014237extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014238#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014239
Barry Warsawfe33b792003-01-07 22:42:49 +000014240#ifdef F77_DUMMY_MAIN
14241# ifdef __cplusplus
14242 extern "C"
14243# endif
14244 int F77_DUMMY_MAIN() { return 1; }
14245#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014246int
14247main ()
14248{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014249atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000014250 ;
14251 return 0;
14252}
14253_ACEOF
14254rm -f conftest.$ac_objext conftest$ac_exeext
14255if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14256 (eval $ac_link) 2>&5
14257 ac_status=$?
14258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14259 (exit $ac_status); } &&
14260 { ac_try='test -s conftest$ac_exeext'
14261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14262 (eval $ac_try) 2>&5
14263 ac_status=$?
14264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14265 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014266 ac_cv_var_tzname=yes
14267else
Martin v. Löwis11437992002-04-12 09:54:03 +000014268 echo "$as_me: failed program was:" >&5
14269cat conftest.$ac_ext >&5
14270ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014271fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014272rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000014273fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014274echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
14275echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014276 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014277
14278cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014279#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014280_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014281
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014282 fi
14283fi
14284
Martin v. Löwis11437992002-04-12 09:54:03 +000014285echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
14286echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
14287if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
14288 echo $ECHO_N "(cached) $ECHO_C" >&6
14289else
14290 cat >conftest.$ac_ext <<_ACEOF
14291#line $LINENO "configure"
14292#include "confdefs.h"
14293$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014294#ifdef F77_DUMMY_MAIN
14295# ifdef __cplusplus
14296 extern "C"
14297# endif
14298 int F77_DUMMY_MAIN() { return 1; }
14299#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014300int
14301main ()
14302{
14303static struct stat ac_aggr;
14304if (ac_aggr.st_rdev)
14305return 0;
14306 ;
14307 return 0;
14308}
14309_ACEOF
14310rm -f conftest.$ac_objext
14311if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14312 (eval $ac_compile) 2>&5
14313 ac_status=$?
14314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14315 (exit $ac_status); } &&
14316 { ac_try='test -s conftest.$ac_objext'
14317 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14318 (eval $ac_try) 2>&5
14319 ac_status=$?
14320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14321 (exit $ac_status); }; }; then
14322 ac_cv_member_struct_stat_st_rdev=yes
14323else
14324 echo "$as_me: failed program was:" >&5
14325cat conftest.$ac_ext >&5
14326ac_cv_member_struct_stat_st_rdev=no
14327fi
14328rm -f conftest.$ac_objext conftest.$ac_ext
14329fi
14330echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
14331echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
14332if test $ac_cv_member_struct_stat_st_rdev = yes; then
14333
14334cat >>confdefs.h <<_ACEOF
14335#define HAVE_STRUCT_STAT_ST_RDEV 1
14336_ACEOF
14337
14338
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014339fi
14340
Martin v. Löwis11437992002-04-12 09:54:03 +000014341echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
14342echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
14343if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
14344 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014345else
Martin v. Löwis11437992002-04-12 09:54:03 +000014346 cat >conftest.$ac_ext <<_ACEOF
14347#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014348#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014349$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014350#ifdef F77_DUMMY_MAIN
14351# ifdef __cplusplus
14352 extern "C"
14353# endif
14354 int F77_DUMMY_MAIN() { return 1; }
14355#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014356int
14357main ()
14358{
14359static struct stat ac_aggr;
14360if (ac_aggr.st_blksize)
14361return 0;
14362 ;
14363 return 0;
14364}
14365_ACEOF
14366rm -f conftest.$ac_objext
14367if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14368 (eval $ac_compile) 2>&5
14369 ac_status=$?
14370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14371 (exit $ac_status); } &&
14372 { ac_try='test -s conftest.$ac_objext'
14373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14374 (eval $ac_try) 2>&5
14375 ac_status=$?
14376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14377 (exit $ac_status); }; }; then
14378 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014379else
Martin v. Löwis11437992002-04-12 09:54:03 +000014380 echo "$as_me: failed program was:" >&5
14381cat conftest.$ac_ext >&5
14382ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014383fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014384rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014385fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014386echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
14387echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
14388if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014389
Martin v. Löwis11437992002-04-12 09:54:03 +000014390cat >>confdefs.h <<_ACEOF
14391#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
14392_ACEOF
14393
14394
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014395fi
14396
Martin v. Löwis11437992002-04-12 09:54:03 +000014397echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
14398echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
14399if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
14400 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014401else
Martin v. Löwis11437992002-04-12 09:54:03 +000014402 cat >conftest.$ac_ext <<_ACEOF
14403#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014404#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014405$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014406#ifdef F77_DUMMY_MAIN
14407# ifdef __cplusplus
14408 extern "C"
14409# endif
14410 int F77_DUMMY_MAIN() { return 1; }
14411#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014412int
14413main ()
14414{
14415static struct stat ac_aggr;
14416if (ac_aggr.st_blocks)
14417return 0;
14418 ;
14419 return 0;
14420}
14421_ACEOF
14422rm -f conftest.$ac_objext
14423if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14424 (eval $ac_compile) 2>&5
14425 ac_status=$?
14426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14427 (exit $ac_status); } &&
14428 { ac_try='test -s conftest.$ac_objext'
14429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14430 (eval $ac_try) 2>&5
14431 ac_status=$?
14432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14433 (exit $ac_status); }; }; then
14434 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014435else
Martin v. Löwis11437992002-04-12 09:54:03 +000014436 echo "$as_me: failed program was:" >&5
14437cat conftest.$ac_ext >&5
14438ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014439fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014440rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014441fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014442echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
14443echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
14444if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014445
Martin v. Löwis11437992002-04-12 09:54:03 +000014446cat >>confdefs.h <<_ACEOF
14447#define HAVE_STRUCT_STAT_ST_BLOCKS 1
14448_ACEOF
14449
14450
14451cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014452#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014453_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014454
14455else
Martin v. Löwis11437992002-04-12 09:54:03 +000014456 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014457fi
14458
Michael W. Hudson54241132001-12-07 15:38:26 +000014459
Martin v. Löwis11437992002-04-12 09:54:03 +000014460
14461echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
14462echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
14463if test "${ac_cv_header_time_altzone+set}" = set; then
14464 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014465else
Martin v. Löwis11437992002-04-12 09:54:03 +000014466 cat >conftest.$ac_ext <<_ACEOF
14467#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014468#include "confdefs.h"
14469#include <time.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014470#ifdef F77_DUMMY_MAIN
14471# ifdef __cplusplus
14472 extern "C"
14473# endif
14474 int F77_DUMMY_MAIN() { return 1; }
14475#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014476int
14477main ()
14478{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014479return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000014480 ;
14481 return 0;
14482}
14483_ACEOF
14484rm -f conftest.$ac_objext
14485if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14486 (eval $ac_compile) 2>&5
14487 ac_status=$?
14488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14489 (exit $ac_status); } &&
14490 { ac_try='test -s conftest.$ac_objext'
14491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14492 (eval $ac_try) 2>&5
14493 ac_status=$?
14494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14495 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014496 ac_cv_header_time_altzone=yes
14497else
Martin v. Löwis11437992002-04-12 09:54:03 +000014498 echo "$as_me: failed program was:" >&5
14499cat conftest.$ac_ext >&5
14500ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000014501fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014502rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014503fi
14504
Martin v. Löwis11437992002-04-12 09:54:03 +000014505echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
14506echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014507if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014508
14509cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014510#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014511_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014512
14513fi
14514
Guido van Rossumda88dad1995-01-26 00:46:29 +000014515was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014516echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
14517echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
14518cat >conftest.$ac_ext <<_ACEOF
14519#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014520#include "confdefs.h"
14521
14522#include <sys/types.h>
14523#include <sys/select.h>
14524#include <sys/time.h>
14525
Barry Warsawfe33b792003-01-07 22:42:49 +000014526#ifdef F77_DUMMY_MAIN
14527# ifdef __cplusplus
14528 extern "C"
14529# endif
14530 int F77_DUMMY_MAIN() { return 1; }
14531#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014532int
14533main ()
14534{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014535;
Martin v. Löwis11437992002-04-12 09:54:03 +000014536 ;
14537 return 0;
14538}
14539_ACEOF
14540rm -f conftest.$ac_objext
14541if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14542 (eval $ac_compile) 2>&5
14543 ac_status=$?
14544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14545 (exit $ac_status); } &&
14546 { ac_try='test -s conftest.$ac_objext'
14547 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14548 (eval $ac_try) 2>&5
14549 ac_status=$?
14550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14551 (exit $ac_status); }; }; then
14552
14553
14554cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014555#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014556_ACEOF
14557
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014558 was_it_defined=yes
14559
Guido van Rossumf78abae1997-01-21 22:02:36 +000014560else
Martin v. Löwis11437992002-04-12 09:54:03 +000014561 echo "$as_me: failed program was:" >&5
14562cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014563fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014564rm -f conftest.$ac_objext conftest.$ac_ext
14565echo "$as_me:$LINENO: result: $was_it_defined" >&5
14566echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000014567
Martin v. Löwis11437992002-04-12 09:54:03 +000014568echo "$as_me:$LINENO: checking for addrinfo" >&5
14569echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
14570if test "${ac_cv_struct_addrinfo+set}" = set; then
14571 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014572else
Martin v. Löwis11437992002-04-12 09:54:03 +000014573 cat >conftest.$ac_ext <<_ACEOF
14574#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014575#include "confdefs.h"
14576
14577# include <netdb.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014578#ifdef F77_DUMMY_MAIN
14579# ifdef __cplusplus
14580 extern "C"
14581# endif
14582 int F77_DUMMY_MAIN() { return 1; }
14583#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014584int
14585main ()
14586{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014587struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000014588 ;
14589 return 0;
14590}
14591_ACEOF
14592rm -f conftest.$ac_objext
14593if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14594 (eval $ac_compile) 2>&5
14595 ac_status=$?
14596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14597 (exit $ac_status); } &&
14598 { ac_try='test -s conftest.$ac_objext'
14599 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14600 (eval $ac_try) 2>&5
14601 ac_status=$?
14602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14603 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014604 ac_cv_struct_addrinfo=yes
14605else
Martin v. Löwis11437992002-04-12 09:54:03 +000014606 echo "$as_me: failed program was:" >&5
14607cat conftest.$ac_ext >&5
14608ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014609fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014610rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014611fi
14612
Martin v. Löwis11437992002-04-12 09:54:03 +000014613echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
14614echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014615if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014616
14617cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014618#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014619_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014620
14621fi
14622
Martin v. Löwis11437992002-04-12 09:54:03 +000014623echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
14624echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
14625if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
14626 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014627else
Martin v. Löwis11437992002-04-12 09:54:03 +000014628 cat >conftest.$ac_ext <<_ACEOF
14629#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014630#include "confdefs.h"
14631
14632# include <sys/types.h>
14633# include <sys/socket.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014634#ifdef F77_DUMMY_MAIN
14635# ifdef __cplusplus
14636 extern "C"
14637# endif
14638 int F77_DUMMY_MAIN() { return 1; }
14639#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014640int
14641main ()
14642{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014643struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000014644 ;
14645 return 0;
14646}
14647_ACEOF
14648rm -f conftest.$ac_objext
14649if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14650 (eval $ac_compile) 2>&5
14651 ac_status=$?
14652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14653 (exit $ac_status); } &&
14654 { ac_try='test -s conftest.$ac_objext'
14655 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14656 (eval $ac_try) 2>&5
14657 ac_status=$?
14658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14659 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014660 ac_cv_struct_sockaddr_storage=yes
14661else
Martin v. Löwis11437992002-04-12 09:54:03 +000014662 echo "$as_me: failed program was:" >&5
14663cat conftest.$ac_ext >&5
14664ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014665fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014666rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014667fi
14668
Martin v. Löwis11437992002-04-12 09:54:03 +000014669echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
14670echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014671if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014672
14673cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014674#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014675_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014676
14677fi
14678
Guido van Rossum627b2d71993-12-24 10:39:16 +000014679# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000014680
Michael W. Hudson54241132001-12-07 15:38:26 +000014681
Martin v. Löwis11437992002-04-12 09:54:03 +000014682echo "$as_me:$LINENO: checking whether char is unsigned" >&5
14683echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
14684if test "${ac_cv_c_char_unsigned+set}" = set; then
14685 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000014686else
Martin v. Löwis11437992002-04-12 09:54:03 +000014687 cat >conftest.$ac_ext <<_ACEOF
14688#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000014689#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014690$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014691#ifdef F77_DUMMY_MAIN
14692# ifdef __cplusplus
14693 extern "C"
14694# endif
14695 int F77_DUMMY_MAIN() { return 1; }
14696#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014697int
14698main ()
14699{
14700static int test_array [1 - 2 * !(((char) -1) < 0)];
14701test_array [0] = 0
14702
14703 ;
14704 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000014705}
Martin v. Löwis11437992002-04-12 09:54:03 +000014706_ACEOF
14707rm -f conftest.$ac_objext
14708if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14709 (eval $ac_compile) 2>&5
14710 ac_status=$?
14711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14712 (exit $ac_status); } &&
14713 { ac_try='test -s conftest.$ac_objext'
14714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14715 (eval $ac_try) 2>&5
14716 ac_status=$?
14717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14718 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000014719 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014720else
14721 echo "$as_me: failed program was:" >&5
14722cat conftest.$ac_ext >&5
14723ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014724fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014725rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014726fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014727echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
14728echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014729if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014730 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014731#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014732_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014733
14734fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000014735
Barry Warsawfe33b792003-01-07 22:42:49 +000014736echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
14737echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
14738if test "${ac_cv_prog_cc_stdc+set}" = set; then
14739 echo $ECHO_N "(cached) $ECHO_C" >&6
14740else
14741 ac_cv_prog_cc_stdc=no
14742ac_save_CC=$CC
14743cat >conftest.$ac_ext <<_ACEOF
14744#line $LINENO "configure"
14745#include "confdefs.h"
14746#include <stdarg.h>
14747#include <stdio.h>
14748#include <sys/types.h>
14749#include <sys/stat.h>
14750/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
14751struct buf { int x; };
14752FILE * (*rcsopen) (struct buf *, struct stat *, int);
14753static char *e (p, i)
14754 char **p;
14755 int i;
14756{
14757 return p[i];
14758}
14759static char *f (char * (*g) (char **, int), char **p, ...)
14760{
14761 char *s;
14762 va_list v;
14763 va_start (v,p);
14764 s = g (p, va_arg (v,int));
14765 va_end (v);
14766 return s;
14767}
14768int test (int i, double x);
14769struct s1 {int (*f) (int a);};
14770struct s2 {int (*f) (double a);};
14771int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
14772int argc;
14773char **argv;
14774#ifdef F77_DUMMY_MAIN
14775# ifdef __cplusplus
14776 extern "C"
14777# endif
14778 int F77_DUMMY_MAIN() { return 1; }
14779#endif
14780int
14781main ()
14782{
14783return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
14784 ;
14785 return 0;
14786}
14787_ACEOF
14788# Don't try gcc -ansi; that turns off useful extensions and
14789# breaks some systems' header files.
14790# AIX -qlanglvl=ansi
14791# Ultrix and OSF/1 -std1
14792# HP-UX 10.20 and later -Ae
14793# HP-UX older versions -Aa -D_HPUX_SOURCE
14794# SVR4 -Xc -D__EXTENSIONS__
14795for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
14796do
14797 CC="$ac_save_CC $ac_arg"
14798 rm -f conftest.$ac_objext
14799if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14800 (eval $ac_compile) 2>&5
14801 ac_status=$?
14802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14803 (exit $ac_status); } &&
14804 { ac_try='test -s conftest.$ac_objext'
14805 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14806 (eval $ac_try) 2>&5
14807 ac_status=$?
14808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14809 (exit $ac_status); }; }; then
14810 ac_cv_prog_cc_stdc=$ac_arg
14811break
14812else
14813 echo "$as_me: failed program was:" >&5
14814cat conftest.$ac_ext >&5
14815fi
14816rm -f conftest.$ac_objext
14817done
14818rm -f conftest.$ac_ext conftest.$ac_objext
14819CC=$ac_save_CC
14820
14821fi
14822
14823case "x$ac_cv_prog_cc_stdc" in
14824 x|xno)
14825 echo "$as_me:$LINENO: result: none needed" >&5
14826echo "${ECHO_T}none needed" >&6 ;;
14827 *)
14828 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
14829echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
14830 CC="$CC $ac_cv_prog_cc_stdc" ;;
14831esac
14832
Martin v. Löwis11437992002-04-12 09:54:03 +000014833echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
14834echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14835if test "${ac_cv_c_const+set}" = set; then
14836 echo $ECHO_N "(cached) $ECHO_C" >&6
14837else
14838 cat >conftest.$ac_ext <<_ACEOF
14839#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014840#include "confdefs.h"
14841
Barry Warsawfe33b792003-01-07 22:42:49 +000014842#ifdef F77_DUMMY_MAIN
14843# ifdef __cplusplus
14844 extern "C"
14845# endif
14846 int F77_DUMMY_MAIN() { return 1; }
14847#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014848int
14849main ()
14850{
14851/* FIXME: Include the comments suggested by Paul. */
14852#ifndef __cplusplus
14853 /* Ultrix mips cc rejects this. */
14854 typedef int charset[2];
14855 const charset x;
14856 /* SunOS 4.1.1 cc rejects this. */
14857 char const *const *ccp;
14858 char **p;
14859 /* NEC SVR4.0.2 mips cc rejects this. */
14860 struct point {int x, y;};
14861 static struct point const zero = {0,0};
14862 /* AIX XL C 1.02.0.0 rejects this.
14863 It does not let you subtract one const X* pointer from another in
14864 an arm of an if-expression whose if-part is not a constant
14865 expression */
14866 const char *g = "string";
14867 ccp = &g + (g ? g-g : 0);
14868 /* HPUX 7.0 cc rejects these. */
14869 ++ccp;
14870 p = (char**) ccp;
14871 ccp = (char const *const *) p;
14872 { /* SCO 3.2v4 cc rejects this. */
14873 char *t;
14874 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014875
Martin v. Löwis11437992002-04-12 09:54:03 +000014876 *t++ = 0;
14877 }
14878 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
14879 int x[] = {25, 17};
14880 const int *foo = &x[0];
14881 ++foo;
14882 }
14883 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14884 typedef const int *iptr;
14885 iptr p = 0;
14886 ++p;
14887 }
14888 { /* AIX XL C 1.02.0.0 rejects this saying
14889 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14890 struct s { int j; const int *ap[3]; };
14891 struct s *b; b->j = 5;
14892 }
14893 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14894 const int foo = 10;
14895 }
14896#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000014897
Martin v. Löwis11437992002-04-12 09:54:03 +000014898 ;
14899 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000014900}
Martin v. Löwis11437992002-04-12 09:54:03 +000014901_ACEOF
14902rm -f conftest.$ac_objext
14903if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14904 (eval $ac_compile) 2>&5
14905 ac_status=$?
14906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14907 (exit $ac_status); } &&
14908 { ac_try='test -s conftest.$ac_objext'
14909 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14910 (eval $ac_try) 2>&5
14911 ac_status=$?
14912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14913 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014914 ac_cv_c_const=yes
14915else
Martin v. Löwis11437992002-04-12 09:54:03 +000014916 echo "$as_me: failed program was:" >&5
14917cat conftest.$ac_ext >&5
14918ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014919fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014920rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014921fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014922echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
14923echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014924if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014925
14926cat >>confdefs.h <<\_ACEOF
14927#define const
14928_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014929
14930fi
14931
Michael W. Hudson54241132001-12-07 15:38:26 +000014932
Guido van Rossumda88dad1995-01-26 00:46:29 +000014933works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014934echo "$as_me:$LINENO: checking for working volatile" >&5
14935echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
14936cat >conftest.$ac_ext <<_ACEOF
14937#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014938#include "confdefs.h"
14939
Barry Warsawfe33b792003-01-07 22:42:49 +000014940#ifdef F77_DUMMY_MAIN
14941# ifdef __cplusplus
14942 extern "C"
14943# endif
14944 int F77_DUMMY_MAIN() { return 1; }
14945#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014946int
14947main ()
14948{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014949volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014950 ;
14951 return 0;
14952}
14953_ACEOF
14954rm -f conftest.$ac_objext
14955if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14956 (eval $ac_compile) 2>&5
14957 ac_status=$?
14958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14959 (exit $ac_status); } &&
14960 { ac_try='test -s conftest.$ac_objext'
14961 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14962 (eval $ac_try) 2>&5
14963 ac_status=$?
14964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14965 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014966 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014967else
Martin v. Löwis11437992002-04-12 09:54:03 +000014968 echo "$as_me: failed program was:" >&5
14969cat conftest.$ac_ext >&5
14970
14971cat >>confdefs.h <<\_ACEOF
14972#define volatile
14973_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014974
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014975
Guido van Rossum627b2d71993-12-24 10:39:16 +000014976fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014977rm -f conftest.$ac_objext conftest.$ac_ext
14978echo "$as_me:$LINENO: result: $works" >&5
14979echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014980
Guido van Rossumda88dad1995-01-26 00:46:29 +000014981works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014982echo "$as_me:$LINENO: checking for working signed char" >&5
14983echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
14984cat >conftest.$ac_ext <<_ACEOF
14985#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014986#include "confdefs.h"
14987
Barry Warsawfe33b792003-01-07 22:42:49 +000014988#ifdef F77_DUMMY_MAIN
14989# ifdef __cplusplus
14990 extern "C"
14991# endif
14992 int F77_DUMMY_MAIN() { return 1; }
14993#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014994int
14995main ()
14996{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014997signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000014998 ;
14999 return 0;
15000}
15001_ACEOF
15002rm -f conftest.$ac_objext
15003if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15004 (eval $ac_compile) 2>&5
15005 ac_status=$?
15006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15007 (exit $ac_status); } &&
15008 { ac_try='test -s conftest.$ac_objext'
15009 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15010 (eval $ac_try) 2>&5
15011 ac_status=$?
15012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15013 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015014 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015015else
Martin v. Löwis11437992002-04-12 09:54:03 +000015016 echo "$as_me: failed program was:" >&5
15017cat conftest.$ac_ext >&5
15018
15019cat >>confdefs.h <<\_ACEOF
15020#define signed
15021_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000015022
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015023
Guido van Rossum7f43da71994-08-01 12:15:30 +000015024fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015025rm -f conftest.$ac_objext conftest.$ac_ext
15026echo "$as_me:$LINENO: result: $works" >&5
15027echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015028
Guido van Rossumda88dad1995-01-26 00:46:29 +000015029have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015030echo "$as_me:$LINENO: checking for prototypes" >&5
15031echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
15032cat >conftest.$ac_ext <<_ACEOF
15033#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015034#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015035int foo(int x) { return 0; }
Barry Warsawfe33b792003-01-07 22:42:49 +000015036#ifdef F77_DUMMY_MAIN
15037# ifdef __cplusplus
15038 extern "C"
15039# endif
15040 int F77_DUMMY_MAIN() { return 1; }
15041#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015042int
15043main ()
15044{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015045return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000015046 ;
15047 return 0;
15048}
15049_ACEOF
15050rm -f conftest.$ac_objext
15051if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15052 (eval $ac_compile) 2>&5
15053 ac_status=$?
15054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15055 (exit $ac_status); } &&
15056 { ac_try='test -s conftest.$ac_objext'
15057 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15058 (eval $ac_try) 2>&5
15059 ac_status=$?
15060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15061 (exit $ac_status); }; }; then
15062
15063
15064cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015065#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015066_ACEOF
15067
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015068 have_prototypes=yes
15069
Guido van Rossumf78abae1997-01-21 22:02:36 +000015070else
Martin v. Löwis11437992002-04-12 09:54:03 +000015071 echo "$as_me: failed program was:" >&5
15072cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000015073fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015074rm -f conftest.$ac_objext conftest.$ac_ext
15075echo "$as_me:$LINENO: result: $have_prototypes" >&5
15076echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015077
Guido van Rossumda88dad1995-01-26 00:46:29 +000015078works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015079echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
15080echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
15081cat >conftest.$ac_ext <<_ACEOF
15082#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015083#include "confdefs.h"
15084
15085#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000015086int foo(int x, ...) {
15087 va_list va;
15088 va_start(va, x);
15089 va_arg(va, int);
15090 va_arg(va, char *);
15091 va_arg(va, double);
15092 return 0;
15093}
Guido van Rossum7f43da71994-08-01 12:15:30 +000015094
Barry Warsawfe33b792003-01-07 22:42:49 +000015095#ifdef F77_DUMMY_MAIN
15096# ifdef __cplusplus
15097 extern "C"
15098# endif
15099 int F77_DUMMY_MAIN() { return 1; }
15100#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015101int
15102main ()
15103{
Guido van Rossum90eea071996-08-30 20:58:57 +000015104return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000015105 ;
15106 return 0;
15107}
15108_ACEOF
15109rm -f conftest.$ac_objext
15110if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15111 (eval $ac_compile) 2>&5
15112 ac_status=$?
15113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15114 (exit $ac_status); } &&
15115 { ac_try='test -s conftest.$ac_objext'
15116 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15117 (eval $ac_try) 2>&5
15118 ac_status=$?
15119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15120 (exit $ac_status); }; }; then
15121
15122
15123cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015124#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015125_ACEOF
15126
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015127 works=yes
15128
Guido van Rossumf78abae1997-01-21 22:02:36 +000015129else
Martin v. Löwis11437992002-04-12 09:54:03 +000015130 echo "$as_me: failed program was:" >&5
15131cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000015132fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015133rm -f conftest.$ac_objext conftest.$ac_ext
15134echo "$as_me:$LINENO: result: $works" >&5
15135echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015136
Guido van Rossumda88dad1995-01-26 00:46:29 +000015137if test "$have_prototypes" = yes; then
15138bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015139echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
15140echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
15141cat >conftest.$ac_ext <<_ACEOF
15142#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015143#include "confdefs.h"
15144#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000015145#ifdef F77_DUMMY_MAIN
15146# ifdef __cplusplus
15147 extern "C"
15148# endif
15149 int F77_DUMMY_MAIN() { return 1; }
15150#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015151int
15152main ()
15153{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015154char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000015155 ;
15156 return 0;
15157}
15158_ACEOF
15159rm -f conftest.$ac_objext
15160if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15161 (eval $ac_compile) 2>&5
15162 ac_status=$?
15163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15164 (exit $ac_status); } &&
15165 { ac_try='test -s conftest.$ac_objext'
15166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15167 (eval $ac_try) 2>&5
15168 ac_status=$?
15169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15170 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000015171 :
15172else
Martin v. Löwis11437992002-04-12 09:54:03 +000015173 echo "$as_me: failed program was:" >&5
15174cat conftest.$ac_ext >&5
15175
15176cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015177#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015178_ACEOF
15179
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015180 bad_prototypes=yes
15181
Guido van Rossum627b2d71993-12-24 10:39:16 +000015182fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015183rm -f conftest.$ac_objext conftest.$ac_ext
15184echo "$as_me:$LINENO: result: $bad_prototypes" >&5
15185echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015186fi
15187
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015188# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000015189echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
15190echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
15191cat >conftest.$ac_ext <<_ACEOF
15192#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015193#include "confdefs.h"
15194#include <sys/types.h>
15195#include <sys/socket.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000015196#ifdef F77_DUMMY_MAIN
15197# ifdef __cplusplus
15198 extern "C"
15199# endif
15200 int F77_DUMMY_MAIN() { return 1; }
15201#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015202int
15203main ()
15204{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015205struct sockaddr x;
15206x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015207 ;
15208 return 0;
15209}
15210_ACEOF
15211rm -f conftest.$ac_objext
15212if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15213 (eval $ac_compile) 2>&5
15214 ac_status=$?
15215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15216 (exit $ac_status); } &&
15217 { ac_try='test -s conftest.$ac_objext'
15218 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15219 (eval $ac_try) 2>&5
15220 ac_status=$?
15221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15222 (exit $ac_status); }; }; then
15223 echo "$as_me:$LINENO: result: yes" >&5
15224echo "${ECHO_T}yes" >&6
15225
15226cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015227#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015228_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015229
15230else
Martin v. Löwis11437992002-04-12 09:54:03 +000015231 echo "$as_me: failed program was:" >&5
15232cat conftest.$ac_ext >&5
15233echo "$as_me:$LINENO: result: no" >&5
15234echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015235fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015236rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015237
Guido van Rossumda88dad1995-01-26 00:46:29 +000015238va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015239echo "$as_me:$LINENO: checking whether va_list is an array" >&5
15240echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
15241cat >conftest.$ac_ext <<_ACEOF
15242#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015243#include "confdefs.h"
15244
15245#ifdef HAVE_STDARG_PROTOTYPES
15246#include <stdarg.h>
15247#else
15248#include <varargs.h>
15249#endif
15250
Barry Warsawfe33b792003-01-07 22:42:49 +000015251#ifdef F77_DUMMY_MAIN
15252# ifdef __cplusplus
15253 extern "C"
15254# endif
15255 int F77_DUMMY_MAIN() { return 1; }
15256#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015257int
15258main ()
15259{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015260va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000015261 ;
15262 return 0;
15263}
15264_ACEOF
15265rm -f conftest.$ac_objext
15266if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15267 (eval $ac_compile) 2>&5
15268 ac_status=$?
15269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15270 (exit $ac_status); } &&
15271 { ac_try='test -s conftest.$ac_objext'
15272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15273 (eval $ac_try) 2>&5
15274 ac_status=$?
15275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15276 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015277 :
15278else
Martin v. Löwis11437992002-04-12 09:54:03 +000015279 echo "$as_me: failed program was:" >&5
15280cat conftest.$ac_ext >&5
15281
15282
15283cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015284#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015285_ACEOF
15286
Guido van Rossumda88dad1995-01-26 00:46:29 +000015287 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015288
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015289fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015290rm -f conftest.$ac_objext conftest.$ac_ext
15291echo "$as_me:$LINENO: result: $va_list_is_array" >&5
15292echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015293
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015294# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000015295
15296
15297
15298echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
15299echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
15300if test "${ac_cv_func_gethostbyname_r+set}" = set; then
15301 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015302else
Martin v. Löwis11437992002-04-12 09:54:03 +000015303 cat >conftest.$ac_ext <<_ACEOF
15304#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015305#include "confdefs.h"
15306/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015307 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015308#include <assert.h>
15309/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015310#ifdef __cplusplus
15311extern "C"
15312#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015313/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015314 builtin and then its argument prototype would still apply. */
15315char gethostbyname_r ();
15316char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015317
Barry Warsawfe33b792003-01-07 22:42:49 +000015318#ifdef F77_DUMMY_MAIN
15319# ifdef __cplusplus
15320 extern "C"
15321# endif
15322 int F77_DUMMY_MAIN() { return 1; }
15323#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015324int
15325main ()
15326{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015327/* The GNU C library defines this for functions which it implements
15328 to always fail with ENOSYS. Some functions are actually named
15329 something starting with __ and the normal name is an alias. */
15330#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
15331choke me
15332#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015333f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015334#endif
15335
Martin v. Löwis11437992002-04-12 09:54:03 +000015336 ;
15337 return 0;
15338}
15339_ACEOF
15340rm -f conftest.$ac_objext conftest$ac_exeext
15341if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15342 (eval $ac_link) 2>&5
15343 ac_status=$?
15344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15345 (exit $ac_status); } &&
15346 { ac_try='test -s conftest$ac_exeext'
15347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15348 (eval $ac_try) 2>&5
15349 ac_status=$?
15350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15351 (exit $ac_status); }; }; then
15352 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015353else
Martin v. Löwis11437992002-04-12 09:54:03 +000015354 echo "$as_me: failed program was:" >&5
15355cat conftest.$ac_ext >&5
15356ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015357fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015358rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015359fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015360echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
15361echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
15362if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015363
Martin v. Löwis11437992002-04-12 09:54:03 +000015364 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015365#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015366_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015367
Martin v. Löwis11437992002-04-12 09:54:03 +000015368 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
15369echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015370 OLD_CFLAGS=$CFLAGS
15371 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015372 cat >conftest.$ac_ext <<_ACEOF
15373#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015374#include "confdefs.h"
15375
15376# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015377
Barry Warsawfe33b792003-01-07 22:42:49 +000015378#ifdef F77_DUMMY_MAIN
15379# ifdef __cplusplus
15380 extern "C"
15381# endif
15382 int F77_DUMMY_MAIN() { return 1; }
15383#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015384int
15385main ()
15386{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015387
15388 char *name;
15389 struct hostent *he, *res;
15390 char buffer[2048];
15391 int buflen = 2048;
15392 int h_errnop;
15393
15394 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015395
15396 ;
15397 return 0;
15398}
15399_ACEOF
15400rm -f conftest.$ac_objext
15401if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15402 (eval $ac_compile) 2>&5
15403 ac_status=$?
15404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15405 (exit $ac_status); } &&
15406 { ac_try='test -s conftest.$ac_objext'
15407 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15408 (eval $ac_try) 2>&5
15409 ac_status=$?
15410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15411 (exit $ac_status); }; }; then
15412
15413 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015414#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015415_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015416
Martin v. Löwis11437992002-04-12 09:54:03 +000015417
15418cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015419#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015420_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015421
Martin v. Löwis11437992002-04-12 09:54:03 +000015422 echo "$as_me:$LINENO: result: yes" >&5
15423echo "${ECHO_T}yes" >&6
15424
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015425else
Martin v. Löwis11437992002-04-12 09:54:03 +000015426 echo "$as_me: failed program was:" >&5
15427cat conftest.$ac_ext >&5
15428
15429 echo "$as_me:$LINENO: result: no" >&5
15430echo "${ECHO_T}no" >&6
15431 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
15432echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
15433 cat >conftest.$ac_ext <<_ACEOF
15434#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015435#include "confdefs.h"
15436
15437# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015438
Barry Warsawfe33b792003-01-07 22:42:49 +000015439#ifdef F77_DUMMY_MAIN
15440# ifdef __cplusplus
15441 extern "C"
15442# endif
15443 int F77_DUMMY_MAIN() { return 1; }
15444#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015445int
15446main ()
15447{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015448
15449 char *name;
15450 struct hostent *he;
15451 char buffer[2048];
15452 int buflen = 2048;
15453 int h_errnop;
15454
15455 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015456
15457 ;
15458 return 0;
15459}
15460_ACEOF
15461rm -f conftest.$ac_objext
15462if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15463 (eval $ac_compile) 2>&5
15464 ac_status=$?
15465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15466 (exit $ac_status); } &&
15467 { ac_try='test -s conftest.$ac_objext'
15468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15469 (eval $ac_try) 2>&5
15470 ac_status=$?
15471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15472 (exit $ac_status); }; }; then
15473
15474 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015475#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015476_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015477
Martin v. Löwis11437992002-04-12 09:54:03 +000015478
15479cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015480#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015481_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015482
Martin v. Löwis11437992002-04-12 09:54:03 +000015483 echo "$as_me:$LINENO: result: yes" >&5
15484echo "${ECHO_T}yes" >&6
15485
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015486else
Martin v. Löwis11437992002-04-12 09:54:03 +000015487 echo "$as_me: failed program was:" >&5
15488cat conftest.$ac_ext >&5
15489
15490 echo "$as_me:$LINENO: result: no" >&5
15491echo "${ECHO_T}no" >&6
15492 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
15493echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
15494 cat >conftest.$ac_ext <<_ACEOF
15495#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015496#include "confdefs.h"
15497
15498# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015499
Barry Warsawfe33b792003-01-07 22:42:49 +000015500#ifdef F77_DUMMY_MAIN
15501# ifdef __cplusplus
15502 extern "C"
15503# endif
15504 int F77_DUMMY_MAIN() { return 1; }
15505#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015506int
15507main ()
15508{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015509
15510 char *name;
15511 struct hostent *he;
15512 struct hostent_data data;
15513
15514 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000015515
15516 ;
15517 return 0;
15518}
15519_ACEOF
15520rm -f conftest.$ac_objext
15521if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15522 (eval $ac_compile) 2>&5
15523 ac_status=$?
15524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15525 (exit $ac_status); } &&
15526 { ac_try='test -s conftest.$ac_objext'
15527 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15528 (eval $ac_try) 2>&5
15529 ac_status=$?
15530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15531 (exit $ac_status); }; }; then
15532
15533 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015534#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015535_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015536
Martin v. Löwis11437992002-04-12 09:54:03 +000015537
15538cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015539#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015540_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015541
Martin v. Löwis11437992002-04-12 09:54:03 +000015542 echo "$as_me:$LINENO: result: yes" >&5
15543echo "${ECHO_T}yes" >&6
15544
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015545else
Martin v. Löwis11437992002-04-12 09:54:03 +000015546 echo "$as_me: failed program was:" >&5
15547cat conftest.$ac_ext >&5
15548
15549 echo "$as_me:$LINENO: result: no" >&5
15550echo "${ECHO_T}no" >&6
15551
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015552fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015553rm -f conftest.$ac_objext conftest.$ac_ext
15554
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015555fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015556rm -f conftest.$ac_objext conftest.$ac_ext
15557
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015558fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015559rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015560 CFLAGS=$OLD_CFLAGS
15561
15562else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015563
Martin v. Löwis11437992002-04-12 09:54:03 +000015564
15565for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000015566do
Martin v. Löwis11437992002-04-12 09:54:03 +000015567as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15568echo "$as_me:$LINENO: checking for $ac_func" >&5
15569echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15570if eval "test \"\${$as_ac_var+set}\" = set"; then
15571 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015572else
Martin v. Löwis11437992002-04-12 09:54:03 +000015573 cat >conftest.$ac_ext <<_ACEOF
15574#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015575#include "confdefs.h"
15576/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015577 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015578#include <assert.h>
15579/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015580#ifdef __cplusplus
15581extern "C"
15582#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015583/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015584 builtin and then its argument prototype would still apply. */
15585char $ac_func ();
15586char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015587
Barry Warsawfe33b792003-01-07 22:42:49 +000015588#ifdef F77_DUMMY_MAIN
15589# ifdef __cplusplus
15590 extern "C"
15591# endif
15592 int F77_DUMMY_MAIN() { return 1; }
15593#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015594int
15595main ()
15596{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015597/* The GNU C library defines this for functions which it implements
15598 to always fail with ENOSYS. Some functions are actually named
15599 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015600#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015601choke me
15602#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015603f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015604#endif
15605
Martin v. Löwis11437992002-04-12 09:54:03 +000015606 ;
15607 return 0;
15608}
15609_ACEOF
15610rm -f conftest.$ac_objext conftest$ac_exeext
15611if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15612 (eval $ac_link) 2>&5
15613 ac_status=$?
15614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15615 (exit $ac_status); } &&
15616 { ac_try='test -s conftest$ac_exeext'
15617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15618 (eval $ac_try) 2>&5
15619 ac_status=$?
15620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15621 (exit $ac_status); }; }; then
15622 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015623else
Martin v. Löwis11437992002-04-12 09:54:03 +000015624 echo "$as_me: failed program was:" >&5
15625cat conftest.$ac_ext >&5
15626eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015627fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015628rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015629fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015630echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15631echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15632if test `eval echo '${'$as_ac_var'}'` = yes; then
15633 cat >>confdefs.h <<_ACEOF
15634#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15635_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015636
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015637fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015638done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015639
Michael W. Hudson54241132001-12-07 15:38:26 +000015640
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015641fi
15642
Michael W. Hudson54241132001-12-07 15:38:26 +000015643
15644
15645
15646
15647
15648
Guido van Rossum627b2d71993-12-24 10:39:16 +000015649# checks for system services
15650# (none yet)
15651
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015652# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000015653echo "$as_me:$LINENO: checking for __fpu_control" >&5
15654echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
15655if test "${ac_cv_func___fpu_control+set}" = set; then
15656 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015657else
Martin v. Löwis11437992002-04-12 09:54:03 +000015658 cat >conftest.$ac_ext <<_ACEOF
15659#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015660#include "confdefs.h"
15661/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015662 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015663#include <assert.h>
15664/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015665#ifdef __cplusplus
15666extern "C"
15667#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015668/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015669 builtin and then its argument prototype would still apply. */
15670char __fpu_control ();
15671char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015672
Barry Warsawfe33b792003-01-07 22:42:49 +000015673#ifdef F77_DUMMY_MAIN
15674# ifdef __cplusplus
15675 extern "C"
15676# endif
15677 int F77_DUMMY_MAIN() { return 1; }
15678#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015679int
15680main ()
15681{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015682/* The GNU C library defines this for functions which it implements
15683 to always fail with ENOSYS. Some functions are actually named
15684 something starting with __ and the normal name is an alias. */
15685#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
15686choke me
15687#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015688f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015689#endif
15690
Martin v. Löwis11437992002-04-12 09:54:03 +000015691 ;
15692 return 0;
15693}
15694_ACEOF
15695rm -f conftest.$ac_objext conftest$ac_exeext
15696if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15697 (eval $ac_link) 2>&5
15698 ac_status=$?
15699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15700 (exit $ac_status); } &&
15701 { ac_try='test -s conftest$ac_exeext'
15702 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15703 (eval $ac_try) 2>&5
15704 ac_status=$?
15705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15706 (exit $ac_status); }; }; then
15707 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015708else
Martin v. Löwis11437992002-04-12 09:54:03 +000015709 echo "$as_me: failed program was:" >&5
15710cat conftest.$ac_ext >&5
15711ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015712fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015713rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015714fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015715echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
15716echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
15717if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015718 :
15719else
Martin v. Löwis11437992002-04-12 09:54:03 +000015720
15721echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
15722echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
15723if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
15724 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015725else
Martin v. Löwis11437992002-04-12 09:54:03 +000015726 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015727LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015728cat >conftest.$ac_ext <<_ACEOF
15729#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015730#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015731
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015732/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015733#ifdef __cplusplus
15734extern "C"
15735#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015736/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015737 builtin and then its argument prototype would still apply. */
15738char __fpu_control ();
Barry Warsawfe33b792003-01-07 22:42:49 +000015739#ifdef F77_DUMMY_MAIN
15740# ifdef __cplusplus
15741 extern "C"
15742# endif
15743 int F77_DUMMY_MAIN() { return 1; }
15744#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015745int
15746main ()
15747{
15748__fpu_control ();
15749 ;
15750 return 0;
15751}
15752_ACEOF
15753rm -f conftest.$ac_objext conftest$ac_exeext
15754if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15755 (eval $ac_link) 2>&5
15756 ac_status=$?
15757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15758 (exit $ac_status); } &&
15759 { ac_try='test -s conftest$ac_exeext'
15760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15761 (eval $ac_try) 2>&5
15762 ac_status=$?
15763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15764 (exit $ac_status); }; }; then
15765 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015766else
Martin v. Löwis11437992002-04-12 09:54:03 +000015767 echo "$as_me: failed program was:" >&5
15768cat conftest.$ac_ext >&5
15769ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015770fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015771rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15772LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015773fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015774echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
15775echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
15776if test $ac_cv_lib_ieee___fpu_control = yes; then
15777 cat >>confdefs.h <<_ACEOF
15778#define HAVE_LIBIEEE 1
15779_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015780
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015781 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015782
Guido van Rossum627b2d71993-12-24 10:39:16 +000015783fi
15784
Michael W. Hudson54241132001-12-07 15:38:26 +000015785
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015786fi
15787
Michael W. Hudson54241132001-12-07 15:38:26 +000015788
Guido van Rossum7f253911997-05-09 02:42:48 +000015789# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000015790echo "$as_me:$LINENO: checking for --with-fpectl" >&5
15791echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
15792
Guido van Rossum7f253911997-05-09 02:42:48 +000015793# Check whether --with-fpectl or --without-fpectl was given.
15794if test "${with_fpectl+set}" = set; then
15795 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000015796
Guido van Rossum7f253911997-05-09 02:42:48 +000015797if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015798then
15799
15800cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000015801#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015802_ACEOF
15803
15804 echo "$as_me:$LINENO: result: yes" >&5
15805echo "${ECHO_T}yes" >&6
15806else echo "$as_me:$LINENO: result: no" >&5
15807echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015808fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015809else
Martin v. Löwis11437992002-04-12 09:54:03 +000015810 echo "$as_me:$LINENO: result: no" >&5
15811echo "${ECHO_T}no" >&6
15812fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000015813
Guido van Rossum7f43da71994-08-01 12:15:30 +000015814# check for --with-libm=...
15815
Guido van Rossum563e7081996-09-10 18:20:48 +000015816case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000015817Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015818BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000015819*) LIBM=-lm
15820esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015821echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
15822echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
15823
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015824# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015825if test "${with_libm+set}" = set; then
15826 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000015827
Guido van Rossum7f253911997-05-09 02:42:48 +000015828if test "$withval" = no
15829then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000015830 echo "$as_me:$LINENO: result: force LIBM empty" >&5
15831echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015832elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015833then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015834 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
15835echo "${ECHO_T}set LIBM=\"$withval\"" >&6
15836else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
15837echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
15838 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015839fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015840else
Martin v. Löwis11437992002-04-12 09:54:03 +000015841 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
15842echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
15843fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015844
15845# check for --with-libc=...
15846
Martin v. Löwis11437992002-04-12 09:54:03 +000015847echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
15848echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
15849
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015850# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015851if test "${with_libc+set}" = set; then
15852 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000015853
Guido van Rossum7f253911997-05-09 02:42:48 +000015854if test "$withval" = no
15855then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000015856 echo "$as_me:$LINENO: result: force LIBC empty" >&5
15857echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015858elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015859then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015860 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
15861echo "${ECHO_T}set LIBC=\"$withval\"" >&6
15862else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
15863echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
15864 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015865fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015866else
Martin v. Löwis11437992002-04-12 09:54:03 +000015867 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
15868echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
15869fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015870
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015871# check for hypot() in math library
15872LIBS_SAVE=$LIBS
15873LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000015874
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015875for ac_func in hypot
15876do
Martin v. Löwis11437992002-04-12 09:54:03 +000015877as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15878echo "$as_me:$LINENO: checking for $ac_func" >&5
15879echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15880if eval "test \"\${$as_ac_var+set}\" = set"; then
15881 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015882else
Martin v. Löwis11437992002-04-12 09:54:03 +000015883 cat >conftest.$ac_ext <<_ACEOF
15884#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015885#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015886/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015887 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015888#include <assert.h>
15889/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015890#ifdef __cplusplus
15891extern "C"
15892#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015893/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015894 builtin and then its argument prototype would still apply. */
15895char $ac_func ();
15896char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015897
Barry Warsawfe33b792003-01-07 22:42:49 +000015898#ifdef F77_DUMMY_MAIN
15899# ifdef __cplusplus
15900 extern "C"
15901# endif
15902 int F77_DUMMY_MAIN() { return 1; }
15903#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015904int
15905main ()
15906{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015907/* The GNU C library defines this for functions which it implements
15908 to always fail with ENOSYS. Some functions are actually named
15909 something starting with __ and the normal name is an alias. */
15910#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15911choke me
15912#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015913f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015914#endif
15915
Martin v. Löwis11437992002-04-12 09:54:03 +000015916 ;
15917 return 0;
15918}
15919_ACEOF
15920rm -f conftest.$ac_objext conftest$ac_exeext
15921if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15922 (eval $ac_link) 2>&5
15923 ac_status=$?
15924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15925 (exit $ac_status); } &&
15926 { ac_try='test -s conftest$ac_exeext'
15927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15928 (eval $ac_try) 2>&5
15929 ac_status=$?
15930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15931 (exit $ac_status); }; }; then
15932 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015933else
Martin v. Löwis11437992002-04-12 09:54:03 +000015934 echo "$as_me: failed program was:" >&5
15935cat conftest.$ac_ext >&5
15936eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015937fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015938rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015939fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015940echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15941echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15942if test `eval echo '${'$as_ac_var'}'` = yes; then
15943 cat >>confdefs.h <<_ACEOF
15944#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15945_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000015946
Michael W. Hudson54241132001-12-07 15:38:26 +000015947else
Martin v. Löwis11437992002-04-12 09:54:03 +000015948 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015949fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015950done
15951
Michael W. Hudson54241132001-12-07 15:38:26 +000015952
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015953LIBS=$LIBS_SAVE
15954
Guido van Rossumef2255b2000-03-10 22:30:29 +000015955# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015956if test "${ac_cv_header_wchar_h+set}" = set; then
15957 echo "$as_me:$LINENO: checking for wchar.h" >&5
15958echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15959if test "${ac_cv_header_wchar_h+set}" = set; then
15960 echo $ECHO_N "(cached) $ECHO_C" >&6
15961fi
15962echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15963echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015964else
Martin v. Löwis11437992002-04-12 09:54:03 +000015965 # Is the header compilable?
15966echo "$as_me:$LINENO: checking wchar.h usability" >&5
15967echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
15968cat >conftest.$ac_ext <<_ACEOF
15969#line $LINENO "configure"
15970#include "confdefs.h"
15971$ac_includes_default
15972#include <wchar.h>
15973_ACEOF
15974rm -f conftest.$ac_objext
15975if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15976 (eval $ac_compile) 2>&5
15977 ac_status=$?
15978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15979 (exit $ac_status); } &&
15980 { ac_try='test -s conftest.$ac_objext'
15981 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15982 (eval $ac_try) 2>&5
15983 ac_status=$?
15984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15985 (exit $ac_status); }; }; then
15986 ac_header_compiler=yes
15987else
15988 echo "$as_me: failed program was:" >&5
15989cat conftest.$ac_ext >&5
15990ac_header_compiler=no
15991fi
15992rm -f conftest.$ac_objext conftest.$ac_ext
15993echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15994echo "${ECHO_T}$ac_header_compiler" >&6
15995
15996# Is the header present?
15997echo "$as_me:$LINENO: checking wchar.h presence" >&5
15998echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
15999cat >conftest.$ac_ext <<_ACEOF
16000#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016001#include "confdefs.h"
16002#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016003_ACEOF
16004if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16005 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16006 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000016007 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016008 rm -f conftest.er1
16009 cat conftest.err >&5
16010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16011 (exit $ac_status); } >/dev/null; then
16012 if test -s conftest.err; then
16013 ac_cpp_err=$ac_c_preproc_warn_flag
16014 else
16015 ac_cpp_err=
16016 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016017else
Martin v. Löwis11437992002-04-12 09:54:03 +000016018 ac_cpp_err=yes
16019fi
16020if test -z "$ac_cpp_err"; then
16021 ac_header_preproc=yes
16022else
16023 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000016024 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016025 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016026fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016027rm -f conftest.err conftest.$ac_ext
16028echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16029echo "${ECHO_T}$ac_header_preproc" >&6
16030
16031# So? What about this header?
16032case $ac_header_compiler:$ac_header_preproc in
16033 yes:no )
16034 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
16035echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16036 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
16037echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
16038 no:yes )
16039 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
16040echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
16041 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
16042echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
16043 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
16044echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
16045esac
16046echo "$as_me:$LINENO: checking for wchar.h" >&5
16047echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16048if test "${ac_cv_header_wchar_h+set}" = set; then
16049 echo $ECHO_N "(cached) $ECHO_C" >&6
16050else
16051 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000016052fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016053echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16054echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
16055
16056fi
16057if test $ac_cv_header_wchar_h = yes; then
16058
16059
16060cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016061#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016062_ACEOF
16063
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016064 wchar_h="yes"
16065
Guido van Rossumef2255b2000-03-10 22:30:29 +000016066else
Martin v. Löwis11437992002-04-12 09:54:03 +000016067 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016068
16069fi
16070
Michael W. Hudson54241132001-12-07 15:38:26 +000016071
Martin v. Löwis11437992002-04-12 09:54:03 +000016072
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016073# determine wchar_t size
16074if test "$wchar_h" = yes
16075then
Martin v. Löwis11437992002-04-12 09:54:03 +000016076 echo "$as_me:$LINENO: checking for wchar_t" >&5
16077echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
16078if test "${ac_cv_type_wchar_t+set}" = set; then
16079 echo $ECHO_N "(cached) $ECHO_C" >&6
16080else
16081 cat >conftest.$ac_ext <<_ACEOF
16082#line $LINENO "configure"
16083#include "confdefs.h"
16084#include <wchar.h>
16085
Barry Warsawfe33b792003-01-07 22:42:49 +000016086#ifdef F77_DUMMY_MAIN
16087# ifdef __cplusplus
16088 extern "C"
16089# endif
16090 int F77_DUMMY_MAIN() { return 1; }
16091#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016092int
16093main ()
16094{
16095if ((wchar_t *) 0)
16096 return 0;
16097if (sizeof (wchar_t))
16098 return 0;
16099 ;
16100 return 0;
16101}
16102_ACEOF
16103rm -f conftest.$ac_objext
16104if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16105 (eval $ac_compile) 2>&5
16106 ac_status=$?
16107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16108 (exit $ac_status); } &&
16109 { ac_try='test -s conftest.$ac_objext'
16110 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16111 (eval $ac_try) 2>&5
16112 ac_status=$?
16113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16114 (exit $ac_status); }; }; then
16115 ac_cv_type_wchar_t=yes
16116else
16117 echo "$as_me: failed program was:" >&5
16118cat conftest.$ac_ext >&5
16119ac_cv_type_wchar_t=no
16120fi
16121rm -f conftest.$ac_objext conftest.$ac_ext
16122fi
16123echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
16124echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
16125
16126echo "$as_me:$LINENO: checking size of wchar_t" >&5
16127echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
16128if test "${ac_cv_sizeof_wchar_t+set}" = set; then
16129 echo $ECHO_N "(cached) $ECHO_C" >&6
16130else
16131 if test "$ac_cv_type_wchar_t" = yes; then
16132 # The cast to unsigned long works around a bug in the HP C Compiler
16133 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16134 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16135 # This bug is HP SR number 8606223364.
16136 if test "$cross_compiling" = yes; then
16137 # Depending upon the size, compute the lo and hi bounds.
16138cat >conftest.$ac_ext <<_ACEOF
16139#line $LINENO "configure"
16140#include "confdefs.h"
16141#include <wchar.h>
16142
Barry Warsawfe33b792003-01-07 22:42:49 +000016143#ifdef F77_DUMMY_MAIN
16144# ifdef __cplusplus
16145 extern "C"
16146# endif
16147 int F77_DUMMY_MAIN() { return 1; }
16148#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016149int
16150main ()
16151{
16152static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
16153test_array [0] = 0
16154
16155 ;
16156 return 0;
16157}
16158_ACEOF
16159rm -f conftest.$ac_objext
16160if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16161 (eval $ac_compile) 2>&5
16162 ac_status=$?
16163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16164 (exit $ac_status); } &&
16165 { ac_try='test -s conftest.$ac_objext'
16166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16167 (eval $ac_try) 2>&5
16168 ac_status=$?
16169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16170 (exit $ac_status); }; }; then
16171 ac_lo=0 ac_mid=0
16172 while :; do
16173 cat >conftest.$ac_ext <<_ACEOF
16174#line $LINENO "configure"
16175#include "confdefs.h"
16176#include <wchar.h>
16177
Barry Warsawfe33b792003-01-07 22:42:49 +000016178#ifdef F77_DUMMY_MAIN
16179# ifdef __cplusplus
16180 extern "C"
16181# endif
16182 int F77_DUMMY_MAIN() { return 1; }
16183#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016184int
16185main ()
16186{
16187static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16188test_array [0] = 0
16189
16190 ;
16191 return 0;
16192}
16193_ACEOF
16194rm -f conftest.$ac_objext
16195if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16196 (eval $ac_compile) 2>&5
16197 ac_status=$?
16198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16199 (exit $ac_status); } &&
16200 { ac_try='test -s conftest.$ac_objext'
16201 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16202 (eval $ac_try) 2>&5
16203 ac_status=$?
16204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16205 (exit $ac_status); }; }; then
16206 ac_hi=$ac_mid; break
16207else
16208 echo "$as_me: failed program was:" >&5
16209cat conftest.$ac_ext >&5
16210ac_lo=`expr $ac_mid + 1`
16211 if test $ac_lo -le $ac_mid; then
16212 ac_lo= ac_hi=
16213 break
16214 fi
16215 ac_mid=`expr 2 '*' $ac_mid + 1`
16216fi
16217rm -f conftest.$ac_objext conftest.$ac_ext
16218 done
16219else
16220 echo "$as_me: failed program was:" >&5
16221cat conftest.$ac_ext >&5
16222cat >conftest.$ac_ext <<_ACEOF
16223#line $LINENO "configure"
16224#include "confdefs.h"
16225#include <wchar.h>
16226
Barry Warsawfe33b792003-01-07 22:42:49 +000016227#ifdef F77_DUMMY_MAIN
16228# ifdef __cplusplus
16229 extern "C"
16230# endif
16231 int F77_DUMMY_MAIN() { return 1; }
16232#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016233int
16234main ()
16235{
16236static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
16237test_array [0] = 0
16238
16239 ;
16240 return 0;
16241}
16242_ACEOF
16243rm -f conftest.$ac_objext
16244if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16245 (eval $ac_compile) 2>&5
16246 ac_status=$?
16247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16248 (exit $ac_status); } &&
16249 { ac_try='test -s conftest.$ac_objext'
16250 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16251 (eval $ac_try) 2>&5
16252 ac_status=$?
16253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16254 (exit $ac_status); }; }; then
16255 ac_hi=-1 ac_mid=-1
16256 while :; do
16257 cat >conftest.$ac_ext <<_ACEOF
16258#line $LINENO "configure"
16259#include "confdefs.h"
16260#include <wchar.h>
16261
Barry Warsawfe33b792003-01-07 22:42:49 +000016262#ifdef F77_DUMMY_MAIN
16263# ifdef __cplusplus
16264 extern "C"
16265# endif
16266 int F77_DUMMY_MAIN() { return 1; }
16267#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016268int
16269main ()
16270{
16271static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
16272test_array [0] = 0
16273
16274 ;
16275 return 0;
16276}
16277_ACEOF
16278rm -f conftest.$ac_objext
16279if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16280 (eval $ac_compile) 2>&5
16281 ac_status=$?
16282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16283 (exit $ac_status); } &&
16284 { ac_try='test -s conftest.$ac_objext'
16285 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16286 (eval $ac_try) 2>&5
16287 ac_status=$?
16288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16289 (exit $ac_status); }; }; then
16290 ac_lo=$ac_mid; break
16291else
16292 echo "$as_me: failed program was:" >&5
16293cat conftest.$ac_ext >&5
16294ac_hi=`expr '(' $ac_mid ')' - 1`
16295 if test $ac_mid -le $ac_hi; then
16296 ac_lo= ac_hi=
16297 break
16298 fi
16299 ac_mid=`expr 2 '*' $ac_mid`
16300fi
16301rm -f conftest.$ac_objext conftest.$ac_ext
16302 done
16303else
16304 echo "$as_me: failed program was:" >&5
16305cat conftest.$ac_ext >&5
16306ac_lo= ac_hi=
16307fi
16308rm -f conftest.$ac_objext conftest.$ac_ext
16309fi
16310rm -f conftest.$ac_objext conftest.$ac_ext
16311# Binary search between lo and hi bounds.
16312while test "x$ac_lo" != "x$ac_hi"; do
16313 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
16314 cat >conftest.$ac_ext <<_ACEOF
16315#line $LINENO "configure"
16316#include "confdefs.h"
16317#include <wchar.h>
16318
Barry Warsawfe33b792003-01-07 22:42:49 +000016319#ifdef F77_DUMMY_MAIN
16320# ifdef __cplusplus
16321 extern "C"
16322# endif
16323 int F77_DUMMY_MAIN() { return 1; }
16324#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016325int
16326main ()
16327{
16328static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16329test_array [0] = 0
16330
16331 ;
16332 return 0;
16333}
16334_ACEOF
16335rm -f conftest.$ac_objext
16336if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16337 (eval $ac_compile) 2>&5
16338 ac_status=$?
16339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16340 (exit $ac_status); } &&
16341 { ac_try='test -s conftest.$ac_objext'
16342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16343 (eval $ac_try) 2>&5
16344 ac_status=$?
16345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16346 (exit $ac_status); }; }; then
16347 ac_hi=$ac_mid
16348else
16349 echo "$as_me: failed program was:" >&5
16350cat conftest.$ac_ext >&5
16351ac_lo=`expr '(' $ac_mid ')' + 1`
16352fi
16353rm -f conftest.$ac_objext conftest.$ac_ext
16354done
16355case $ac_lo in
16356?*) ac_cv_sizeof_wchar_t=$ac_lo;;
16357'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
16358echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
16359 { (exit 1); exit 1; }; } ;;
16360esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016361else
16362 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016363 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
16364echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16365 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000016366else
Martin v. Löwis11437992002-04-12 09:54:03 +000016367 cat >conftest.$ac_ext <<_ACEOF
16368#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016369#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016370#include <wchar.h>
16371
16372long longval () { return (long) (sizeof (wchar_t)); }
16373unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000016374#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016375#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000016376#ifdef F77_DUMMY_MAIN
16377# ifdef __cplusplus
16378 extern "C"
16379# endif
16380 int F77_DUMMY_MAIN() { return 1; }
16381#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016382int
16383main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016384{
Martin v. Löwis11437992002-04-12 09:54:03 +000016385
16386 FILE *f = fopen ("conftest.val", "w");
16387 if (! f)
16388 exit (1);
16389 if (((long) (sizeof (wchar_t))) < 0)
16390 {
16391 long i = longval ();
16392 if (i != ((long) (sizeof (wchar_t))))
16393 exit (1);
16394 fprintf (f, "%ld\n", i);
16395 }
16396 else
16397 {
16398 unsigned long i = ulongval ();
16399 if (i != ((long) (sizeof (wchar_t))))
16400 exit (1);
16401 fprintf (f, "%lu\n", i);
16402 }
16403 exit (ferror (f) || fclose (f) != 0);
16404
16405 ;
16406 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000016407}
Martin v. Löwis11437992002-04-12 09:54:03 +000016408_ACEOF
16409rm -f conftest$ac_exeext
16410if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16411 (eval $ac_link) 2>&5
16412 ac_status=$?
16413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16414 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16415 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16416 (eval $ac_try) 2>&5
16417 ac_status=$?
16418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16419 (exit $ac_status); }; }; then
16420 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000016421else
Martin v. Löwis11437992002-04-12 09:54:03 +000016422 echo "$as_me: program exited with status $ac_status" >&5
16423echo "$as_me: failed program was:" >&5
16424cat conftest.$ac_ext >&5
16425( exit $ac_status )
16426{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
16427echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
16428 { (exit 1); exit 1; }; }
16429fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016430rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016431fi
16432fi
16433rm -f conftest.val
16434else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016435 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000016436fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016437fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016438echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
16439echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
16440cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016441#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016442_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016443
Michael W. Hudson54241132001-12-07 15:38:26 +000016444
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016445fi
16446
Martin v. Löwis11437992002-04-12 09:54:03 +000016447echo "$as_me:$LINENO: checking what type to use for unicode" >&5
16448echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016449# Check whether --enable-unicode or --disable-unicode was given.
16450if test "${enable_unicode+set}" = set; then
16451 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000016452
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016453else
16454 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000016455fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016456
16457if test $enable_unicode = yes
16458then
Martin v. Löwisfd917792001-06-27 20:22:04 +000016459 # Without any arguments, Py_UNICODE defaults to two-byte mode
16460 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016461fi
16462
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016463
16464
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016465case "$enable_unicode" in
16466ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000016467 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016468#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000016469_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016470
16471 ;;
16472ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000016473 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016474#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000016475_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016476
16477 ;;
16478esac
16479
Michael W. Hudson54241132001-12-07 15:38:26 +000016480
Martin v. Löwis11437992002-04-12 09:54:03 +000016481
16482
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016483
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016484if test "$enable_unicode" = "no"
16485then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016486 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000016487 echo "$as_me:$LINENO: result: not used" >&5
16488echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016489else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016490 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000016491
16492cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016493#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016494_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016495
16496 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
16497 then
16498 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016499
Martin v. Löwis11437992002-04-12 09:54:03 +000016500cat >>confdefs.h <<\_ACEOF
16501#define HAVE_USABLE_WCHAR_T 1
16502_ACEOF
16503
16504 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016505#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016506_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016507
16508 elif test "$ac_cv_sizeof_short" = "$unicode_size"
16509 then
16510 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000016511 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016512#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000016513_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016514
16515 elif test "$ac_cv_sizeof_long" = "$unicode_size"
16516 then
16517 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000016518 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016519#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000016520_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016521
16522 else
16523 PY_UNICODE_TYPE="no type found"
16524 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016525 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
16526echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016527fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016528
16529# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000016530echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
16531echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
16532if test "${ac_cv_c_bigendian+set}" = set; then
16533 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000016534else
Martin v. Löwis11437992002-04-12 09:54:03 +000016535 # See if sys/param.h defines the BYTE_ORDER macro.
16536cat >conftest.$ac_ext <<_ACEOF
16537#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016538#include "confdefs.h"
16539#include <sys/types.h>
16540#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000016541
Barry Warsawfe33b792003-01-07 22:42:49 +000016542#ifdef F77_DUMMY_MAIN
16543# ifdef __cplusplus
16544 extern "C"
16545# endif
16546 int F77_DUMMY_MAIN() { return 1; }
16547#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016548int
16549main ()
16550{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016551#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
16552 bogus endian macros
16553#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016554
16555 ;
16556 return 0;
16557}
16558_ACEOF
16559rm -f conftest.$ac_objext
16560if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16561 (eval $ac_compile) 2>&5
16562 ac_status=$?
16563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16564 (exit $ac_status); } &&
16565 { ac_try='test -s conftest.$ac_objext'
16566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16567 (eval $ac_try) 2>&5
16568 ac_status=$?
16569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16570 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016571 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000016572cat >conftest.$ac_ext <<_ACEOF
16573#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016574#include "confdefs.h"
16575#include <sys/types.h>
16576#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000016577
Barry Warsawfe33b792003-01-07 22:42:49 +000016578#ifdef F77_DUMMY_MAIN
16579# ifdef __cplusplus
16580 extern "C"
16581# endif
16582 int F77_DUMMY_MAIN() { return 1; }
16583#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016584int
16585main ()
16586{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016587#if BYTE_ORDER != BIG_ENDIAN
16588 not big endian
16589#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016590
16591 ;
16592 return 0;
16593}
16594_ACEOF
16595rm -f conftest.$ac_objext
16596if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16597 (eval $ac_compile) 2>&5
16598 ac_status=$?
16599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16600 (exit $ac_status); } &&
16601 { ac_try='test -s conftest.$ac_objext'
16602 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16603 (eval $ac_try) 2>&5
16604 ac_status=$?
16605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16606 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016607 ac_cv_c_bigendian=yes
16608else
Martin v. Löwis11437992002-04-12 09:54:03 +000016609 echo "$as_me: failed program was:" >&5
16610cat conftest.$ac_ext >&5
16611ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016612fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016613rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016614else
Martin v. Löwis11437992002-04-12 09:54:03 +000016615 echo "$as_me: failed program was:" >&5
16616cat conftest.$ac_ext >&5
16617# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000016618if test "$cross_compiling" = yes; then
Barry Warsawfe33b792003-01-07 22:42:49 +000016619 # try to guess the endianess by grep'ing values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000016620 ac_cv_c_bigendian=unknown
16621 cat >conftest.$ac_ext <<_ACEOF
16622#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016623#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016624short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16625short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16626void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
16627short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16628short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16629void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Barry Warsawfe33b792003-01-07 22:42:49 +000016630#ifdef F77_DUMMY_MAIN
16631# ifdef __cplusplus
16632 extern "C"
16633# endif
16634 int F77_DUMMY_MAIN() { return 1; }
16635#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016636int
16637main ()
16638{
16639 _ascii (); _ebcdic ();
16640 ;
16641 return 0;
16642}
16643_ACEOF
16644rm -f conftest.$ac_objext
16645if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16646 (eval $ac_compile) 2>&5
16647 ac_status=$?
16648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16649 (exit $ac_status); } &&
16650 { ac_try='test -s conftest.$ac_objext'
16651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16652 (eval $ac_try) 2>&5
16653 ac_status=$?
16654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16655 (exit $ac_status); }; }; then
Barry Warsawfe33b792003-01-07 22:42:49 +000016656 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016657 ac_cv_c_bigendian=yes
16658fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016659if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016660 if test "$ac_cv_c_bigendian" = unknown; then
16661 ac_cv_c_bigendian=no
16662 else
16663 # finding both strings is unlikely to happen, but who knows?
16664 ac_cv_c_bigendian=unknown
16665 fi
16666fi
16667else
16668 echo "$as_me: failed program was:" >&5
16669cat conftest.$ac_ext >&5
16670fi
16671rm -f conftest.$ac_objext conftest.$ac_ext
16672else
16673 cat >conftest.$ac_ext <<_ACEOF
16674#line $LINENO "configure"
16675#include "confdefs.h"
16676int
16677main ()
16678{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016679 /* Are we little or big endian? From Harbison&Steele. */
16680 union
16681 {
16682 long l;
16683 char c[sizeof (long)];
16684 } u;
16685 u.l = 1;
16686 exit (u.c[sizeof (long) - 1] == 1);
16687}
Martin v. Löwis11437992002-04-12 09:54:03 +000016688_ACEOF
16689rm -f conftest$ac_exeext
16690if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16691 (eval $ac_link) 2>&5
16692 ac_status=$?
16693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16694 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16695 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16696 (eval $ac_try) 2>&5
16697 ac_status=$?
16698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16699 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016700 ac_cv_c_bigendian=no
16701else
Martin v. Löwis11437992002-04-12 09:54:03 +000016702 echo "$as_me: program exited with status $ac_status" >&5
16703echo "$as_me: failed program was:" >&5
16704cat conftest.$ac_ext >&5
16705( exit $ac_status )
16706ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000016707fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016708rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016709fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016710fi
16711rm -f conftest.$ac_objext conftest.$ac_ext
16712fi
16713echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
16714echo "${ECHO_T}$ac_cv_c_bigendian" >&6
16715case $ac_cv_c_bigendian in
16716 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000016717
Martin v. Löwis11437992002-04-12 09:54:03 +000016718cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016719#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016720_ACEOF
16721 ;;
16722 no)
16723 ;;
16724 *)
Barry Warsawfe33b792003-01-07 22:42:49 +000016725 { { echo "$as_me:$LINENO: error: unknown endianess
Martin v. Löwis11437992002-04-12 09:54:03 +000016726presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Barry Warsawfe33b792003-01-07 22:42:49 +000016727echo "$as_me: error: unknown endianess
Martin v. Löwis11437992002-04-12 09:54:03 +000016728presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
16729 { (exit 1); exit 1; }; } ;;
16730esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000016731
Michael W. Hudson54241132001-12-07 15:38:26 +000016732
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016733# Check whether right shifting a negative integer extends the sign bit
16734# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000016735echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
16736echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
16737if test "${ac_cv_rshift_extends_sign+set}" = set; then
16738 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016739else
Martin v. Löwis11437992002-04-12 09:54:03 +000016740
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016741if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000016742 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016743else
Martin v. Löwis11437992002-04-12 09:54:03 +000016744 cat >conftest.$ac_ext <<_ACEOF
16745#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016746#include "confdefs.h"
16747
16748int main()
16749{
Vladimir Marangozova6180282000-07-12 05:05:06 +000016750 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016751}
16752
Martin v. Löwis11437992002-04-12 09:54:03 +000016753_ACEOF
16754rm -f conftest$ac_exeext
16755if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16756 (eval $ac_link) 2>&5
16757 ac_status=$?
16758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16759 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16761 (eval $ac_try) 2>&5
16762 ac_status=$?
16763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16764 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000016765 ac_cv_rshift_extends_sign=yes
16766else
Martin v. Löwis11437992002-04-12 09:54:03 +000016767 echo "$as_me: program exited with status $ac_status" >&5
16768echo "$as_me: failed program was:" >&5
16769cat conftest.$ac_ext >&5
16770( exit $ac_status )
16771ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000016772fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016773rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016774fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000016775fi
16776
Martin v. Löwis11437992002-04-12 09:54:03 +000016777echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
16778echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016779if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016780then
Martin v. Löwis11437992002-04-12 09:54:03 +000016781
16782cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016783#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016784_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016785
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016786fi
16787
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016788# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016789echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
16790echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
16791if test "${ac_cv_have_getc_unlocked+set}" = set; then
16792 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016793else
Martin v. Löwis11437992002-04-12 09:54:03 +000016794
16795cat >conftest.$ac_ext <<_ACEOF
16796#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016797#include "confdefs.h"
16798#include <stdio.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000016799#ifdef F77_DUMMY_MAIN
16800# ifdef __cplusplus
16801 extern "C"
16802# endif
16803 int F77_DUMMY_MAIN() { return 1; }
16804#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016805int
16806main ()
16807{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016808
16809 FILE *f = fopen("/dev/null", "r");
16810 flockfile(f);
16811 getc_unlocked(f);
16812 funlockfile(f);
16813
Martin v. Löwis11437992002-04-12 09:54:03 +000016814 ;
16815 return 0;
16816}
16817_ACEOF
16818rm -f conftest.$ac_objext conftest$ac_exeext
16819if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16820 (eval $ac_link) 2>&5
16821 ac_status=$?
16822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16823 (exit $ac_status); } &&
16824 { ac_try='test -s conftest$ac_exeext'
16825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16826 (eval $ac_try) 2>&5
16827 ac_status=$?
16828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16829 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016830 ac_cv_have_getc_unlocked=yes
16831else
Martin v. Löwis11437992002-04-12 09:54:03 +000016832 echo "$as_me: failed program was:" >&5
16833cat conftest.$ac_ext >&5
16834ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016835fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016836rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016837fi
16838
Martin v. Löwis11437992002-04-12 09:54:03 +000016839echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
16840echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016841if test "$ac_cv_have_getc_unlocked" = yes
16842then
Martin v. Löwis11437992002-04-12 09:54:03 +000016843
16844cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016845#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016846_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016847
16848fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016849
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000016850# check for readline 2.2
16851cat >conftest.$ac_ext <<_ACEOF
16852#line $LINENO "configure"
16853#include "confdefs.h"
16854#include <readline/readline.h>
16855_ACEOF
16856if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16857 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16858 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000016859 egrep -v '^ *\+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000016860 rm -f conftest.er1
16861 cat conftest.err >&5
16862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16863 (exit $ac_status); } >/dev/null; then
16864 if test -s conftest.err; then
16865 ac_cpp_err=$ac_c_preproc_warn_flag
16866 else
16867 ac_cpp_err=
16868 fi
16869else
16870 ac_cpp_err=yes
16871fi
16872if test -z "$ac_cpp_err"; then
16873 have_readline=yes
16874else
16875 echo "$as_me: failed program was:" >&5
16876 cat conftest.$ac_ext >&5
16877 have_readline=no
16878fi
16879rm -f conftest.err conftest.$ac_ext
16880if test $have_readline = yes
16881then
16882 cat >conftest.$ac_ext <<_ACEOF
16883#line $LINENO "configure"
16884#include "confdefs.h"
16885#include <readline/readline.h>
16886
16887_ACEOF
16888if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000016889 egrep "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000016890
16891cat >>confdefs.h <<\_ACEOF
16892#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
16893_ACEOF
16894
16895fi
16896rm -f conftest*
16897
16898fi
16899
Martin v. Löwis0daad592001-09-30 21:09:59 +000016900# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000016901echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
16902echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
16903if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
16904 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000016905else
Martin v. Löwis11437992002-04-12 09:54:03 +000016906 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000016907LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016908cat >conftest.$ac_ext <<_ACEOF
16909#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000016910#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016911
Guido van Rossum353ae582001-07-10 16:45:32 +000016912/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016913#ifdef __cplusplus
16914extern "C"
16915#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000016916/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016917 builtin and then its argument prototype would still apply. */
16918char rl_pre_input_hook ();
Barry Warsawfe33b792003-01-07 22:42:49 +000016919#ifdef F77_DUMMY_MAIN
16920# ifdef __cplusplus
16921 extern "C"
16922# endif
16923 int F77_DUMMY_MAIN() { return 1; }
16924#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016925int
16926main ()
16927{
16928rl_pre_input_hook ();
16929 ;
16930 return 0;
16931}
16932_ACEOF
16933rm -f conftest.$ac_objext conftest$ac_exeext
16934if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16935 (eval $ac_link) 2>&5
16936 ac_status=$?
16937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16938 (exit $ac_status); } &&
16939 { ac_try='test -s conftest$ac_exeext'
16940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16941 (eval $ac_try) 2>&5
16942 ac_status=$?
16943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16944 (exit $ac_status); }; }; then
16945 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000016946else
Martin v. Löwis11437992002-04-12 09:54:03 +000016947 echo "$as_me: failed program was:" >&5
16948cat conftest.$ac_ext >&5
16949ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000016950fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016951rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16952LIBS=$ac_check_lib_save_LIBS
16953fi
16954echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
16955echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
16956if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016957
Martin v. Löwis11437992002-04-12 09:54:03 +000016958cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016959#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016960_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016961
Martin v. Löwis0daad592001-09-30 21:09:59 +000016962fi
16963
Michael W. Hudson54241132001-12-07 15:38:26 +000016964
Martin v. Löwis0daad592001-09-30 21:09:59 +000016965# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000016966echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
16967echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
16968if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
16969 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000016970else
Martin v. Löwis11437992002-04-12 09:54:03 +000016971 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000016972LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016973cat >conftest.$ac_ext <<_ACEOF
16974#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000016975#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016976
Martin v. Löwis0daad592001-09-30 21:09:59 +000016977/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016978#ifdef __cplusplus
16979extern "C"
16980#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000016981/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016982 builtin and then its argument prototype would still apply. */
16983char rl_completion_matches ();
Barry Warsawfe33b792003-01-07 22:42:49 +000016984#ifdef F77_DUMMY_MAIN
16985# ifdef __cplusplus
16986 extern "C"
16987# endif
16988 int F77_DUMMY_MAIN() { return 1; }
16989#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016990int
16991main ()
16992{
16993rl_completion_matches ();
16994 ;
16995 return 0;
16996}
16997_ACEOF
16998rm -f conftest.$ac_objext conftest$ac_exeext
16999if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17000 (eval $ac_link) 2>&5
17001 ac_status=$?
17002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17003 (exit $ac_status); } &&
17004 { ac_try='test -s conftest$ac_exeext'
17005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17006 (eval $ac_try) 2>&5
17007 ac_status=$?
17008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17009 (exit $ac_status); }; }; then
17010 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000017011else
Martin v. Löwis11437992002-04-12 09:54:03 +000017012 echo "$as_me: failed program was:" >&5
17013cat conftest.$ac_ext >&5
17014ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000017015fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017016rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17017LIBS=$ac_check_lib_save_LIBS
17018fi
17019echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
17020echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
17021if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017022
Martin v. Löwis11437992002-04-12 09:54:03 +000017023cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017024#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017025_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017026
Guido van Rossum353ae582001-07-10 16:45:32 +000017027fi
17028
Jack Jansendd19cf82001-12-06 22:36:17 +000017029
Martin v. Löwis11437992002-04-12 09:54:03 +000017030echo "$as_me:$LINENO: checking for broken nice()" >&5
17031echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
17032if test "${ac_cv_broken_nice+set}" = set; then
17033 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017034else
Martin v. Löwis11437992002-04-12 09:54:03 +000017035
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017036if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017037 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017038else
Martin v. Löwis11437992002-04-12 09:54:03 +000017039 cat >conftest.$ac_ext <<_ACEOF
17040#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017041#include "confdefs.h"
17042
17043int main()
17044{
17045 int val1 = nice(1);
17046 if (val1 != -1 && val1 == nice(2))
17047 exit(0);
17048 exit(1);
17049}
17050
Martin v. Löwis11437992002-04-12 09:54:03 +000017051_ACEOF
17052rm -f conftest$ac_exeext
17053if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17054 (eval $ac_link) 2>&5
17055 ac_status=$?
17056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17057 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17058 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17059 (eval $ac_try) 2>&5
17060 ac_status=$?
17061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17062 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017063 ac_cv_broken_nice=yes
17064else
Martin v. Löwis11437992002-04-12 09:54:03 +000017065 echo "$as_me: program exited with status $ac_status" >&5
17066echo "$as_me: failed program was:" >&5
17067cat conftest.$ac_ext >&5
17068( exit $ac_status )
17069ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017070fi
Barry Warsawfe33b792003-01-07 22:42:49 +000017071rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017072fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017073fi
17074
Martin v. Löwis11437992002-04-12 09:54:03 +000017075echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
17076echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017077if test "$ac_cv_broken_nice" = yes
17078then
Martin v. Löwis11437992002-04-12 09:54:03 +000017079
17080cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017081#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017082_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017083
17084fi
17085
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017086# tzset(3) exists and works like we expect it to
17087echo "$as_me:$LINENO: checking for working tzset()" >&5
17088echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
17089if test "${ac_cv_working_tzset+set}" = set; then
17090 echo $ECHO_N "(cached) $ECHO_C" >&6
17091else
17092
17093if test "$cross_compiling" = yes; then
17094 ac_cv_working_tzset=no
17095else
17096 cat >conftest.$ac_ext <<_ACEOF
17097#line $LINENO "configure"
17098#include "confdefs.h"
17099
17100#include <stdlib.h>
17101#include <time.h>
17102int main()
17103{
17104 int gmt_hour;
17105 int eastern_hour;
17106 time_t now;
17107 now = time((time_t*)NULL);
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017108 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017109 tzset();
17110 gmt_hour = localtime(&now)->tm_hour;
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017111 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017112 tzset();
17113 eastern_hour = localtime(&now)->tm_hour;
17114 if (eastern_hour == gmt_hour)
17115 exit(1);
17116 exit(0);
17117}
17118
17119_ACEOF
17120rm -f conftest$ac_exeext
17121if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17122 (eval $ac_link) 2>&5
17123 ac_status=$?
17124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17125 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17127 (eval $ac_try) 2>&5
17128 ac_status=$?
17129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17130 (exit $ac_status); }; }; then
17131 ac_cv_working_tzset=yes
17132else
17133 echo "$as_me: program exited with status $ac_status" >&5
17134echo "$as_me: failed program was:" >&5
17135cat conftest.$ac_ext >&5
17136( exit $ac_status )
17137ac_cv_working_tzset=no
17138fi
17139rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17140fi
17141fi
17142
17143echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
17144echo "${ECHO_T}$ac_cv_working_tzset" >&6
17145if test "$ac_cv_working_tzset" = yes
17146then
17147
17148cat >>confdefs.h <<\_ACEOF
17149#define HAVE_WORKING_TZSET 1
17150_ACEOF
17151
17152fi
17153
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017154# Look for subsecond timestamps in struct stat
17155echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
17156echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
17157if test "${ac_cv_stat_tv_nsec+set}" = set; then
17158 echo $ECHO_N "(cached) $ECHO_C" >&6
17159else
17160 cat >conftest.$ac_ext <<_ACEOF
17161#line $LINENO "configure"
17162#include "confdefs.h"
17163#include <sys/stat.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000017164#ifdef F77_DUMMY_MAIN
17165# ifdef __cplusplus
17166 extern "C"
17167# endif
17168 int F77_DUMMY_MAIN() { return 1; }
17169#endif
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017170int
17171main ()
17172{
17173
17174struct stat st;
17175st.st_mtim.tv_nsec = 1;
17176
17177 ;
17178 return 0;
17179}
17180_ACEOF
17181rm -f conftest.$ac_objext
17182if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17183 (eval $ac_compile) 2>&5
17184 ac_status=$?
17185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17186 (exit $ac_status); } &&
17187 { ac_try='test -s conftest.$ac_objext'
17188 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17189 (eval $ac_try) 2>&5
17190 ac_status=$?
17191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17192 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000017193 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017194else
17195 echo "$as_me: failed program was:" >&5
17196cat conftest.$ac_ext >&5
17197ac_cv_stat_tv_nsec=no
17198fi
17199rm -f conftest.$ac_objext conftest.$ac_ext
17200fi
17201
17202echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
17203echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
17204if test "$ac_cv_stat_tv_nsec" = yes
17205then
17206
17207cat >>confdefs.h <<\_ACEOF
17208#define HAVE_STAT_TV_NSEC 1
17209_ACEOF
17210
17211fi
17212
Jack Jansen666b1e72001-10-31 12:11:48 +000017213# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000017214echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
17215echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
17216if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
17217 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017218else
Martin v. Löwis11437992002-04-12 09:54:03 +000017219 cat >conftest.$ac_ext <<_ACEOF
17220#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000017221#include "confdefs.h"
17222#include <curses.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000017223#ifdef F77_DUMMY_MAIN
17224# ifdef __cplusplus
17225 extern "C"
17226# endif
17227 int F77_DUMMY_MAIN() { return 1; }
17228#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017229int
17230main ()
17231{
Jack Jansen666b1e72001-10-31 12:11:48 +000017232
17233 int rtn;
17234 rtn = mvwdelch(0,0,0);
17235
Martin v. Löwis11437992002-04-12 09:54:03 +000017236 ;
17237 return 0;
17238}
17239_ACEOF
17240rm -f conftest.$ac_objext
17241if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17242 (eval $ac_compile) 2>&5
17243 ac_status=$?
17244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17245 (exit $ac_status); } &&
17246 { ac_try='test -s conftest.$ac_objext'
17247 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17248 (eval $ac_try) 2>&5
17249 ac_status=$?
17250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17251 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017252 ac_cv_mvwdelch_is_expression=yes
17253else
Martin v. Löwis11437992002-04-12 09:54:03 +000017254 echo "$as_me: failed program was:" >&5
17255cat conftest.$ac_ext >&5
17256ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017257fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017258rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017259fi
17260
Martin v. Löwis11437992002-04-12 09:54:03 +000017261echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
17262echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017263
17264if test "$ac_cv_mvwdelch_is_expression" = yes
17265then
Martin v. Löwis11437992002-04-12 09:54:03 +000017266
17267cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017268#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017269_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017270
17271fi
17272
Martin v. Löwis11437992002-04-12 09:54:03 +000017273echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
17274echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
17275if test "${ac_cv_window_has_flags+set}" = set; then
17276 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017277else
Martin v. Löwis11437992002-04-12 09:54:03 +000017278 cat >conftest.$ac_ext <<_ACEOF
17279#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000017280#include "confdefs.h"
17281#include <curses.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000017282#ifdef F77_DUMMY_MAIN
17283# ifdef __cplusplus
17284 extern "C"
17285# endif
17286 int F77_DUMMY_MAIN() { return 1; }
17287#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017288int
17289main ()
17290{
Jack Jansen666b1e72001-10-31 12:11:48 +000017291
17292 WINDOW *w;
17293 w->_flags = 0;
17294
Martin v. Löwis11437992002-04-12 09:54:03 +000017295 ;
17296 return 0;
17297}
17298_ACEOF
17299rm -f conftest.$ac_objext
17300if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17301 (eval $ac_compile) 2>&5
17302 ac_status=$?
17303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17304 (exit $ac_status); } &&
17305 { ac_try='test -s conftest.$ac_objext'
17306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17307 (eval $ac_try) 2>&5
17308 ac_status=$?
17309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17310 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017311 ac_cv_window_has_flags=yes
17312else
Martin v. Löwis11437992002-04-12 09:54:03 +000017313 echo "$as_me: failed program was:" >&5
17314cat conftest.$ac_ext >&5
17315ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017316fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017317rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017318fi
17319
Martin v. Löwis11437992002-04-12 09:54:03 +000017320echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
17321echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017322
Jack Jansen666b1e72001-10-31 12:11:48 +000017323
17324if test "$ac_cv_window_has_flags" = yes
17325then
Martin v. Löwis11437992002-04-12 09:54:03 +000017326
17327cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017328#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017329_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017330
17331fi
17332
Martin v. Löwis24a880b2002-12-31 12:55:15 +000017333echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
17334echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
17335
17336if test -e /dev/ptmx
17337then
17338 echo "$as_me:$LINENO: result: yes" >&5
17339echo "${ECHO_T}yes" >&6
17340
17341cat >>confdefs.h <<\_ACEOF
17342#define HAVE_DEV_PTMX 1
17343_ACEOF
17344
17345else
17346 echo "$as_me:$LINENO: result: no" >&5
17347echo "${ECHO_T}no" >&6
17348fi
17349
Neal Norwitz865400f2003-03-21 01:42:58 +000017350echo "$as_me:$LINENO: checking for /dev/ptc" >&5
17351echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
17352
17353if test -e /dev/ptc
17354then
17355 echo "$as_me:$LINENO: result: yes" >&5
17356echo "${ECHO_T}yes" >&6
17357
17358cat >>confdefs.h <<\_ACEOF
17359#define HAVE_DEV_PTC 1
17360_ACEOF
17361
17362else
17363 echo "$as_me:$LINENO: result: no" >&5
17364echo "${ECHO_T}no" >&6
17365fi
17366
Martin v. Löwis11437992002-04-12 09:54:03 +000017367echo "$as_me:$LINENO: checking for socklen_t" >&5
17368echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
17369if test "${ac_cv_type_socklen_t+set}" = set; then
17370 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000017371else
Martin v. Löwis11437992002-04-12 09:54:03 +000017372 cat >conftest.$ac_ext <<_ACEOF
17373#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000017374#include "confdefs.h"
Martin v. Löwis01c04012002-11-11 14:58:44 +000017375
17376#ifdef HAVE_SYS_TYPES_H
17377#include <sys/types.h>
17378#endif
17379#ifdef HAVE_SYS_SOCKET_H
17380#include <sys/socket.h>
17381#endif
17382
17383
Barry Warsawfe33b792003-01-07 22:42:49 +000017384#ifdef F77_DUMMY_MAIN
17385# ifdef __cplusplus
17386 extern "C"
17387# endif
17388 int F77_DUMMY_MAIN() { return 1; }
17389#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017390int
17391main ()
17392{
17393if ((socklen_t *) 0)
17394 return 0;
17395if (sizeof (socklen_t))
17396 return 0;
17397 ;
17398 return 0;
17399}
17400_ACEOF
17401rm -f conftest.$ac_objext
17402if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17403 (eval $ac_compile) 2>&5
17404 ac_status=$?
17405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17406 (exit $ac_status); } &&
17407 { ac_try='test -s conftest.$ac_objext'
17408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17409 (eval $ac_try) 2>&5
17410 ac_status=$?
17411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17412 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000017413 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000017414else
Martin v. Löwis11437992002-04-12 09:54:03 +000017415 echo "$as_me: failed program was:" >&5
17416cat conftest.$ac_ext >&5
17417ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000017418fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017419rm -f conftest.$ac_objext conftest.$ac_ext
17420fi
17421echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
17422echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
17423if test $ac_cv_type_socklen_t = yes; then
17424 :
17425else
Guido van Rossum95713eb2000-05-18 20:53:31 +000017426
Martin v. Löwis01c04012002-11-11 14:58:44 +000017427cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017428#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000017429_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017430
17431fi
17432
Michael W. Hudson54241132001-12-07 15:38:26 +000017433
Michael W. Hudson54241132001-12-07 15:38:26 +000017434
17435
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000017436for h in `(cd $srcdir;echo Python/thread_*.h)`
17437do
17438 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
17439done
17440
Michael W. Hudson54241132001-12-07 15:38:26 +000017441
Jack Jansen0b06be72002-06-21 14:48:38 +000017442SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000017443echo "$as_me:$LINENO: checking for build directories" >&5
17444echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017445for dir in $SRCDIRS; do
17446 if test ! -d $dir; then
17447 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000017448 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017449done
Martin v. Löwis11437992002-04-12 09:54:03 +000017450echo "$as_me:$LINENO: result: done" >&5
17451echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000017452
Guido van Rossum627b2d71993-12-24 10:39:16 +000017453# generate output files
Barry Warsawfe33b792003-01-07 22:42:49 +000017454ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017455
Martin v. Löwis11437992002-04-12 09:54:03 +000017456cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017457# This file is a shell script that caches the results of configure
17458# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017459# scripts and configure runs, see configure's option --config-cache.
17460# It is not useful on other systems. If it contains results you don't
17461# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017462#
Martin v. Löwis11437992002-04-12 09:54:03 +000017463# config.status only pays attention to the cache file if you give it
17464# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017465#
Barry Warsawfe33b792003-01-07 22:42:49 +000017466# `ac_cv_env_foo' variables (set or unset) will be overriden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017467# loading this file, other *unset* `ac_cv_foo' will be assigned the
17468# following values.
17469
17470_ACEOF
17471
Guido van Rossumf78abae1997-01-21 22:02:36 +000017472# The following way of writing the cache mishandles newlines in values,
17473# but we know of no workaround that is simple, portable, and efficient.
17474# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017475# Ultrix sh set writes to stderr and can't be redirected directly,
17476# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000017477{
17478 (set) 2>&1 |
17479 case `(ac_space=' '; set | grep ac_space) 2>&1` in
17480 *ac_space=\ *)
17481 # `set' does not quote correctly, so add quotes (double-quote
17482 # substitution turns \\\\ into \\, and sed turns \\ into \).
17483 sed -n \
17484 "s/'/'\\\\''/g;
17485 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17486 ;;
17487 *)
17488 # `set' quotes correctly as required by POSIX, so do not add quotes.
17489 sed -n \
17490 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17491 ;;
17492 esac;
17493} |
17494 sed '
17495 t clear
17496 : clear
17497 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17498 t end
17499 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17500 : end' >>confcache
17501if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017502 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017503 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17504 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017505 else
17506 echo "not updating unwritable cache $cache_file"
17507 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017508fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017509rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017510
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017511test "x$prefix" = xNONE && prefix=$ac_default_prefix
17512# Let make expand exec_prefix.
17513test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017514
Martin v. Löwis11437992002-04-12 09:54:03 +000017515# VPATH may cause trouble with some makes, so we remove $(srcdir),
17516# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17517# trailing colons and then remove the whole line if VPATH becomes empty
17518# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000017519if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017520 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17521s/:*\$(srcdir):*/:/;
17522s/:*\${srcdir}:*/:/;
17523s/:*@srcdir@:*/:/;
17524s/^\([^=]*=[ ]*\):*/\1/;
17525s/:*$//;
17526s/^[^=]*=[ ]*$//;
17527}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017528fi
17529
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017530DEFS=-DHAVE_CONFIG_H
17531
Martin v. Löwis11437992002-04-12 09:54:03 +000017532
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017533: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000017534ac_clean_files_save=$ac_clean_files
17535ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17536{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
17537echo "$as_me: creating $CONFIG_STATUS" >&6;}
17538cat >$CONFIG_STATUS <<_ACEOF
17539#! $SHELL
17540# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017541# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017542# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017543# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017544
Martin v. Löwis11437992002-04-12 09:54:03 +000017545debug=false
17546SHELL=\${CONFIG_SHELL-$SHELL}
17547_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000017548
Martin v. Löwis11437992002-04-12 09:54:03 +000017549cat >>$CONFIG_STATUS <<\_ACEOF
Barry Warsawfe33b792003-01-07 22:42:49 +000017550
Martin v. Löwis11437992002-04-12 09:54:03 +000017551## --------------------- ##
17552## M4sh Initialization. ##
17553## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017554
Martin v. Löwis11437992002-04-12 09:54:03 +000017555# Be Bourne compatible
17556if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17557 emulate sh
17558 NULLCMD=:
17559elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17560 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000017561fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017562
Barry Warsawfe33b792003-01-07 22:42:49 +000017563# NLS nuisances.
Martin v. Löwis11437992002-04-12 09:54:03 +000017564# Support unset when possible.
17565if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17566 as_unset=unset
17567else
17568 as_unset=false
17569fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017570
Barry Warsawfe33b792003-01-07 22:42:49 +000017571(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
17572 { $as_unset LANG || test "${LANG+set}" != set; } ||
17573 { LANG=C; export LANG; }
17574(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
17575 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
17576 { LC_ALL=C; export LC_ALL; }
17577(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
17578 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
17579 { LC_TIME=C; export LC_TIME; }
17580(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
17581 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
17582 { LC_CTYPE=C; export LC_CTYPE; }
17583(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
17584 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
17585 { LANGUAGE=C; export LANGUAGE; }
17586(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
17587 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
17588 { LC_COLLATE=C; export LC_COLLATE; }
17589(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
17590 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
17591 { LC_NUMERIC=C; export LC_NUMERIC; }
17592(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
17593 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
17594 { LC_MESSAGES=C; export LC_MESSAGES; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017595
17596
17597# Name of the executable.
Barry Warsawfe33b792003-01-07 22:42:49 +000017598as_me=`(basename "$0") 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017599$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17600 X"$0" : 'X\(//\)$' \| \
17601 X"$0" : 'X\(/\)$' \| \
17602 . : '\(.\)' 2>/dev/null ||
17603echo X/"$0" |
17604 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
17605 /^X\/\(\/\/\)$/{ s//\1/; q; }
17606 /^X\/\(\/\).*/{ s//\1/; q; }
17607 s/.*/./; q'`
17608
17609# PATH needs CR, and LINENO needs CR and PATH.
17610# Avoid depending upon Character Ranges.
17611as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17612as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17613as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17614as_cr_digits='0123456789'
17615as_cr_alnum=$as_cr_Letters$as_cr_digits
17616
17617# The user is always right.
17618if test "${PATH_SEPARATOR+set}" != set; then
17619 echo "#! /bin/sh" >conftest.sh
17620 echo "exit 0" >>conftest.sh
17621 chmod +x conftest.sh
Barry Warsawfe33b792003-01-07 22:42:49 +000017622 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017623 PATH_SEPARATOR=';'
17624 else
17625 PATH_SEPARATOR=:
17626 fi
17627 rm -f conftest.sh
17628fi
17629
17630
17631 as_lineno_1=$LINENO
17632 as_lineno_2=$LINENO
17633 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17634 test "x$as_lineno_1" != "x$as_lineno_2" &&
17635 test "x$as_lineno_3" = "x$as_lineno_2" || {
17636 # Find who we are. Look in the path if we contain no path at all
17637 # relative or not.
17638 case $0 in
17639 *[\\/]* ) as_myself=$0 ;;
17640 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17641for as_dir in $PATH
17642do
17643 IFS=$as_save_IFS
17644 test -z "$as_dir" && as_dir=.
17645 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17646done
17647
17648 ;;
17649 esac
17650 # We did not find ourselves, most probably we were run as `sh COMMAND'
17651 # in which case we are not to be found in the path.
17652 if test "x$as_myself" = x; then
17653 as_myself=$0
17654 fi
17655 if test ! -f "$as_myself"; then
17656 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
17657echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
17658 { (exit 1); exit 1; }; }
17659 fi
17660 case $CONFIG_SHELL in
17661 '')
17662 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17663for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
17664do
17665 IFS=$as_save_IFS
17666 test -z "$as_dir" && as_dir=.
17667 for as_base in sh bash ksh sh5; do
17668 case $as_dir in
17669 /*)
17670 if ("$as_dir/$as_base" -c '
17671 as_lineno_1=$LINENO
17672 as_lineno_2=$LINENO
17673 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17674 test "x$as_lineno_1" != "x$as_lineno_2" &&
17675 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
17676 CONFIG_SHELL=$as_dir/$as_base
17677 export CONFIG_SHELL
17678 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
17679 fi;;
17680 esac
17681 done
17682done
17683;;
Jack Jansendd19cf82001-12-06 22:36:17 +000017684 esac
17685
Martin v. Löwis11437992002-04-12 09:54:03 +000017686 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
17687 # uniformly replaced by the line number. The first 'sed' inserts a
17688 # line-number line before each line; the second 'sed' does the real
17689 # work. The second script uses 'N' to pair each line-number line
17690 # with the numbered line, and appends trailing '-' during
17691 # substitution so that $LINENO is not a special case at line end.
17692 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
17693 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
17694 sed '=' <$as_myself |
17695 sed '
17696 N
17697 s,$,-,
17698 : loop
17699 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
17700 t loop
17701 s,-$,,
17702 s,^['$as_cr_digits']*\n,,
17703 ' >$as_me.lineno &&
17704 chmod +x $as_me.lineno ||
17705 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
17706echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
17707 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017708
Martin v. Löwis11437992002-04-12 09:54:03 +000017709 # Don't try to exec as it changes $[0], causing all sort of problems
17710 # (the dirname of $[0] is not the place where we might find the
17711 # original and so on. Autoconf is especially sensible to this).
17712 . ./$as_me.lineno
17713 # Exit status is that of the last command.
17714 exit
17715}
17716
17717
17718case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
17719 *c*,-n*) ECHO_N= ECHO_C='
17720' ECHO_T=' ' ;;
17721 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
17722 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
17723esac
17724
17725if expr a : '\(a\)' >/dev/null 2>&1; then
17726 as_expr=expr
17727else
17728 as_expr=false
17729fi
17730
17731rm -f conf$$ conf$$.exe conf$$.file
17732echo >conf$$.file
17733if ln -s conf$$.file conf$$ 2>/dev/null; then
17734 # We could just check for DJGPP; but this test a) works b) is more generic
17735 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17736 if test -f conf$$.exe; then
17737 # Don't use ln at all; we don't have any links
17738 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017739 else
Martin v. Löwis11437992002-04-12 09:54:03 +000017740 as_ln_s='ln -s'
17741 fi
17742elif ln conf$$.file conf$$ 2>/dev/null; then
17743 as_ln_s=ln
17744else
17745 as_ln_s='cp -p'
17746fi
17747rm -f conf$$ conf$$.exe conf$$.file
17748
17749as_executable_p="test -f"
17750
17751# Sed expression to map a string onto a valid CPP name.
17752as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
17753
17754# Sed expression to map a string onto a valid variable name.
17755as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
17756
17757
17758# IFS
17759# We need space, tab and new line, in precisely that order.
17760as_nl='
17761'
17762IFS=" $as_nl"
17763
17764# CDPATH.
Barry Warsawfe33b792003-01-07 22:42:49 +000017765$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017766
17767exec 6>&1
17768
17769# Open the log real soon, to keep \$[0] and so on meaningful, and to
17770# report actual input values of CONFIG_FILES etc. instead of their
17771# values after options handling. Logging --version etc. is OK.
17772exec 5>>config.log
17773{
17774 echo
17775 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17776## Running $as_me. ##
17777_ASBOX
17778} >&5
17779cat >&5 <<_CSEOF
17780
Martin v. Löwis88afe662002-10-26 13:47:44 +000017781This file was extended by python $as_me 2.3, which was
Barry Warsawfe33b792003-01-07 22:42:49 +000017782generated by GNU Autoconf 2.53. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017783
17784 CONFIG_FILES = $CONFIG_FILES
17785 CONFIG_HEADERS = $CONFIG_HEADERS
17786 CONFIG_LINKS = $CONFIG_LINKS
17787 CONFIG_COMMANDS = $CONFIG_COMMANDS
17788 $ $0 $@
17789
17790_CSEOF
17791echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
17792echo >&5
17793_ACEOF
17794
17795# Files that config.status was made for.
17796if test -n "$ac_config_files"; then
17797 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17798fi
17799
17800if test -n "$ac_config_headers"; then
17801 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17802fi
17803
17804if test -n "$ac_config_links"; then
17805 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17806fi
17807
17808if test -n "$ac_config_commands"; then
17809 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17810fi
17811
17812cat >>$CONFIG_STATUS <<\_ACEOF
17813
17814ac_cs_usage="\
17815\`$as_me' instantiates files from templates according to the
17816current configuration.
17817
17818Usage: $0 [OPTIONS] [FILE]...
17819
17820 -h, --help print this help, then exit
17821 -V, --version print version number, then exit
17822 -d, --debug don't remove temporary files
17823 --recheck update $as_me by reconfiguring in the same conditions
17824 --file=FILE[:TEMPLATE]
17825 instantiate the configuration file FILE
17826 --header=FILE[:TEMPLATE]
17827 instantiate the configuration header FILE
17828
17829Configuration files:
17830$config_files
17831
17832Configuration headers:
17833$config_headers
17834
17835Report bugs to <bug-autoconf@gnu.org>."
17836_ACEOF
17837
17838cat >>$CONFIG_STATUS <<_ACEOF
17839ac_cs_version="\\
Martin v. Löwis88afe662002-10-26 13:47:44 +000017840python config.status 2.3
Barry Warsawfe33b792003-01-07 22:42:49 +000017841configured by $0, generated by GNU Autoconf 2.53,
Martin v. Löwis11437992002-04-12 09:54:03 +000017842 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17843
17844Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17845Free Software Foundation, Inc.
17846This config.status script is free software; the Free Software Foundation
17847gives unlimited permission to copy, distribute and modify it."
17848srcdir=$srcdir
17849INSTALL="$INSTALL"
17850_ACEOF
17851
17852cat >>$CONFIG_STATUS <<\_ACEOF
17853# If no file are specified by the user, then we need to provide default
17854# value. By we need to know if files were specified by the user.
17855ac_need_defaults=:
17856while test $# != 0
17857do
17858 case $1 in
17859 --*=*)
17860 ac_option=`expr "x$1" : 'x\([^=]*\)='`
17861 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Barry Warsawfe33b792003-01-07 22:42:49 +000017862 shift
17863 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17864 shift
Martin v. Löwis11437992002-04-12 09:54:03 +000017865 ;;
Barry Warsawfe33b792003-01-07 22:42:49 +000017866 -*);;
Martin v. Löwis11437992002-04-12 09:54:03 +000017867 *) # This is not an option, so the user has probably given explicit
17868 # arguments.
17869 ac_need_defaults=false;;
17870 esac
17871
Barry Warsawfe33b792003-01-07 22:42:49 +000017872 case $1 in
Martin v. Löwis11437992002-04-12 09:54:03 +000017873 # Handling of the options.
17874_ACEOF
17875cat >>$CONFIG_STATUS <<_ACEOF
17876 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17877 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17878 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17879_ACEOF
17880cat >>$CONFIG_STATUS <<\_ACEOF
17881 --version | --vers* | -V )
17882 echo "$ac_cs_version"; exit 0 ;;
17883 --he | --h)
17884 # Conflict between --help and --header
17885 { { echo "$as_me:$LINENO: error: ambiguous option: $1
17886Try \`$0 --help' for more information." >&5
17887echo "$as_me: error: ambiguous option: $1
17888Try \`$0 --help' for more information." >&2;}
17889 { (exit 1); exit 1; }; };;
17890 --help | --hel | -h )
17891 echo "$ac_cs_usage"; exit 0 ;;
17892 --debug | --d* | -d )
17893 debug=: ;;
17894 --file | --fil | --fi | --f )
Barry Warsawfe33b792003-01-07 22:42:49 +000017895 shift
17896 CONFIG_FILES="$CONFIG_FILES $1"
Martin v. Löwis11437992002-04-12 09:54:03 +000017897 ac_need_defaults=false;;
17898 --header | --heade | --head | --hea )
Barry Warsawfe33b792003-01-07 22:42:49 +000017899 shift
17900 CONFIG_HEADERS="$CONFIG_HEADERS $1"
Martin v. Löwis11437992002-04-12 09:54:03 +000017901 ac_need_defaults=false;;
17902
17903 # This is an error.
17904 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
17905Try \`$0 --help' for more information." >&5
17906echo "$as_me: error: unrecognized option: $1
17907Try \`$0 --help' for more information." >&2;}
17908 { (exit 1); exit 1; }; } ;;
17909
17910 *) ac_config_targets="$ac_config_targets $1" ;;
17911
17912 esac
17913 shift
17914done
17915
17916_ACEOF
17917
17918
17919
17920
17921
17922cat >>$CONFIG_STATUS <<\_ACEOF
17923for ac_config_target in $ac_config_targets
17924do
17925 case "$ac_config_target" in
17926 # Handling of arguments.
17927 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17928 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
17929 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17930 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
17931echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17932 { (exit 1); exit 1; }; };;
17933 esac
17934done
17935
17936# If the user did not use the arguments to specify the items to instantiate,
17937# then the envvar interface is used. Set only those that are not.
17938# We use the long form for the default assignment because of an extremely
17939# bizarre bug on SunOS 4.1.3.
17940if $ac_need_defaults; then
17941 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17942 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17943fi
17944
17945# Create a temporary directory, and hook for its removal unless debugging.
17946$debug ||
17947{
17948 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17949 trap '{ (exit 1); exit 1; }' 1 2 13 15
17950}
17951
17952# Create a (secure) tmp directory for tmp files.
17953: ${TMPDIR=/tmp}
17954{
17955 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17956 test -n "$tmp" && test -d "$tmp"
17957} ||
17958{
17959 tmp=$TMPDIR/cs$$-$RANDOM
17960 (umask 077 && mkdir $tmp)
17961} ||
17962{
17963 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17964 { (exit 1); exit 1; }
17965}
17966
17967_ACEOF
17968
17969cat >>$CONFIG_STATUS <<_ACEOF
17970
17971#
17972# CONFIG_FILES section.
17973#
17974
17975# No need to generate the scripts if there are no CONFIG_FILES.
17976# This happens for instance when ./config.status config.h
17977if test -n "\$CONFIG_FILES"; then
17978 # Protect against being on the right side of a sed subst in config.status.
17979 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17980 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17981s,@SHELL@,$SHELL,;t t
17982s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17983s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17984s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17985s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17986s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17987s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17988s,@exec_prefix@,$exec_prefix,;t t
17989s,@prefix@,$prefix,;t t
17990s,@program_transform_name@,$program_transform_name,;t t
17991s,@bindir@,$bindir,;t t
17992s,@sbindir@,$sbindir,;t t
17993s,@libexecdir@,$libexecdir,;t t
17994s,@datadir@,$datadir,;t t
17995s,@sysconfdir@,$sysconfdir,;t t
17996s,@sharedstatedir@,$sharedstatedir,;t t
17997s,@localstatedir@,$localstatedir,;t t
17998s,@libdir@,$libdir,;t t
17999s,@includedir@,$includedir,;t t
18000s,@oldincludedir@,$oldincludedir,;t t
18001s,@infodir@,$infodir,;t t
18002s,@mandir@,$mandir,;t t
18003s,@build_alias@,$build_alias,;t t
18004s,@host_alias@,$host_alias,;t t
18005s,@target_alias@,$target_alias,;t t
18006s,@DEFS@,$DEFS,;t t
18007s,@ECHO_C@,$ECHO_C,;t t
18008s,@ECHO_N@,$ECHO_N,;t t
18009s,@ECHO_T@,$ECHO_T,;t t
18010s,@LIBS@,$LIBS,;t t
18011s,@VERSION@,$VERSION,;t t
18012s,@SOVERSION@,$SOVERSION,;t t
18013s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
18014s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
18015s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
18016s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
18017s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
18018s,@MACHDEP@,$MACHDEP,;t t
18019s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000018020s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000018021s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018022s,@CXX@,$CXX,;t t
18023s,@MAINOBJ@,$MAINOBJ,;t t
18024s,@EXEEXT@,$EXEEXT,;t t
18025s,@CC@,$CC,;t t
18026s,@CFLAGS@,$CFLAGS,;t t
18027s,@LDFLAGS@,$LDFLAGS,;t t
18028s,@CPPFLAGS@,$CPPFLAGS,;t t
18029s,@ac_ct_CC@,$ac_ct_CC,;t t
18030s,@OBJEXT@,$OBJEXT,;t t
18031s,@CPP@,$CPP,;t t
18032s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
18033s,@LIBRARY@,$LIBRARY,;t t
18034s,@LDLIBRARY@,$LDLIBRARY,;t t
18035s,@DLLLIBRARY@,$DLLLIBRARY,;t t
18036s,@BLDLIBRARY@,$BLDLIBRARY,;t t
18037s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
18038s,@INSTSONAME@,$INSTSONAME,;t t
18039s,@RUNSHARED@,$RUNSHARED,;t t
18040s,@LINKCC@,$LINKCC,;t t
18041s,@RANLIB@,$RANLIB,;t t
18042s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18043s,@AR@,$AR,;t t
18044s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18045s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18046s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18047s,@LN@,$LN,;t t
18048s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000018049s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018050s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
18051s,@SO@,$SO,;t t
18052s,@LDSHARED@,$LDSHARED,;t t
18053s,@BLDSHARED@,$BLDSHARED,;t t
18054s,@CCSHARED@,$CCSHARED,;t t
18055s,@LINKFORSHARED@,$LINKFORSHARED,;t t
18056s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018057s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018058s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
18059s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
18060s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
18061s,@LDLAST@,$LDLAST,;t t
18062s,@THREADOBJ@,$THREADOBJ,;t t
18063s,@DLINCLDIR@,$DLINCLDIR,;t t
18064s,@DYNLOADFILE@,$DYNLOADFILE,;t t
18065s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
18066s,@LIBOBJS@,$LIBOBJS,;t t
18067s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
18068s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
18069s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
18070s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
18071s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
18072s,@LIBM@,$LIBM,;t t
18073s,@LIBC@,$LIBC,;t t
18074s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
18075s,@THREADHEADERS@,$THREADHEADERS,;t t
18076s,@SRCDIRS@,$SRCDIRS,;t t
18077CEOF
18078
18079_ACEOF
18080
18081 cat >>$CONFIG_STATUS <<\_ACEOF
18082 # Split the substitutions into bite-sized pieces for seds with
18083 # small command number limits, like on Digital OSF/1 and HP-UX.
18084 ac_max_sed_lines=48
18085 ac_sed_frag=1 # Number of current file.
18086 ac_beg=1 # First line for current file.
18087 ac_end=$ac_max_sed_lines # Line after last line for current file.
18088 ac_more_lines=:
18089 ac_sed_cmds=
18090 while $ac_more_lines; do
18091 if test $ac_beg -gt 1; then
18092 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18093 else
18094 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18095 fi
18096 if test ! -s $tmp/subs.frag; then
18097 ac_more_lines=false
18098 else
18099 # The purpose of the label and of the branching condition is to
18100 # speed up the sed processing (if there are no `@' at all, there
18101 # is no need to browse any of the substitutions).
18102 # These are the two extra sed commands mentioned above.
18103 (echo ':t
18104 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18105 if test -z "$ac_sed_cmds"; then
18106 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18107 else
18108 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18109 fi
18110 ac_sed_frag=`expr $ac_sed_frag + 1`
18111 ac_beg=$ac_end
18112 ac_end=`expr $ac_end + $ac_max_sed_lines`
18113 fi
18114 done
18115 if test -z "$ac_sed_cmds"; then
18116 ac_sed_cmds=cat
18117 fi
18118fi # test -n "$CONFIG_FILES"
18119
18120_ACEOF
18121cat >>$CONFIG_STATUS <<\_ACEOF
18122for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18123 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18124 case $ac_file in
18125 - | *:- | *:-:* ) # input from stdin
18126 cat >$tmp/stdin
18127 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18128 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18129 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18130 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18131 * ) ac_file_in=$ac_file.in ;;
18132 esac
18133
18134 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18135 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18136$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18137 X"$ac_file" : 'X\(//\)[^/]' \| \
18138 X"$ac_file" : 'X\(//\)$' \| \
18139 X"$ac_file" : 'X\(/\)' \| \
18140 . : '\(.\)' 2>/dev/null ||
18141echo X"$ac_file" |
18142 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18143 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18144 /^X\(\/\/\)$/{ s//\1/; q; }
18145 /^X\(\/\).*/{ s//\1/; q; }
18146 s/.*/./; q'`
Barry Warsawfe33b792003-01-07 22:42:49 +000018147 { case "$ac_dir" in
18148 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18149 *) as_incr_dir=.;;
18150esac
18151as_dummy="$ac_dir"
18152for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18153 case $as_mkdir_dir in
18154 # Skip DOS drivespec
18155 ?:) as_incr_dir=$as_mkdir_dir ;;
18156 *)
18157 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18158 test -d "$as_incr_dir" ||
18159 mkdir "$as_incr_dir" ||
18160 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18161echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18162 { (exit 1); exit 1; }; }
18163 ;;
18164 esac
18165done; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018166
18167 ac_builddir=.
18168
18169if test "$ac_dir" != .; then
18170 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18171 # A "../" for each directory in $ac_dir_suffix.
18172 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18173else
18174 ac_dir_suffix= ac_top_builddir=
18175fi
18176
18177case $srcdir in
18178 .) # No --srcdir option. We are building in place.
18179 ac_srcdir=.
18180 if test -z "$ac_top_builddir"; then
18181 ac_top_srcdir=.
18182 else
18183 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18184 fi ;;
18185 [\\/]* | ?:[\\/]* ) # Absolute path.
18186 ac_srcdir=$srcdir$ac_dir_suffix;
18187 ac_top_srcdir=$srcdir ;;
18188 *) # Relative path.
18189 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18190 ac_top_srcdir=$ac_top_builddir$srcdir ;;
18191esac
18192# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18193# absolute.
18194ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwise9416172003-05-03 10:12:45 +000018195ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000018196ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18197ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18198
18199
18200 case $INSTALL in
18201 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18202 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
18203 esac
18204
18205 if test x"$ac_file" != x-; then
18206 { echo "$as_me:$LINENO: creating $ac_file" >&5
18207echo "$as_me: creating $ac_file" >&6;}
18208 rm -f "$ac_file"
18209 fi
18210 # Let's still pretend it is `configure' which instantiates (i.e., don't
18211 # use $as_me), people would be surprised to read:
18212 # /* config.h. Generated by config.status. */
18213 if test x"$ac_file" = x-; then
18214 configure_input=
18215 else
18216 configure_input="$ac_file. "
18217 fi
18218 configure_input=$configure_input"Generated from `echo $ac_file_in |
18219 sed 's,.*/,,'` by configure."
18220
18221 # First look for the input files in the build tree, otherwise in the
18222 # src tree.
18223 ac_file_inputs=`IFS=:
18224 for f in $ac_file_in; do
18225 case $f in
18226 -) echo $tmp/stdin ;;
18227 [\\/$]*)
18228 # Absolute (can't be DOS-style, as IFS=:)
18229 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18230echo "$as_me: error: cannot find input file: $f" >&2;}
18231 { (exit 1); exit 1; }; }
18232 echo $f;;
18233 *) # Relative
18234 if test -f "$f"; then
18235 # Build tree
18236 echo $f
18237 elif test -f "$srcdir/$f"; then
18238 # Source tree
18239 echo $srcdir/$f
18240 else
18241 # /dev/null tree
18242 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18243echo "$as_me: error: cannot find input file: $f" >&2;}
18244 { (exit 1); exit 1; }; }
18245 fi;;
18246 esac
18247 done` || { (exit 1); exit 1; }
18248_ACEOF
18249cat >>$CONFIG_STATUS <<_ACEOF
18250 sed "$ac_vpsub
18251$extrasub
18252_ACEOF
18253cat >>$CONFIG_STATUS <<\_ACEOF
18254:t
18255/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18256s,@configure_input@,$configure_input,;t t
18257s,@srcdir@,$ac_srcdir,;t t
18258s,@abs_srcdir@,$ac_abs_srcdir,;t t
18259s,@top_srcdir@,$ac_top_srcdir,;t t
18260s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18261s,@builddir@,$ac_builddir,;t t
18262s,@abs_builddir@,$ac_abs_builddir,;t t
18263s,@top_builddir@,$ac_top_builddir,;t t
18264s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
18265s,@INSTALL@,$ac_INSTALL,;t t
18266" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18267 rm -f $tmp/stdin
18268 if test x"$ac_file" != x-; then
18269 mv $tmp/out $ac_file
18270 else
18271 cat $tmp/out
18272 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018273 fi
18274
Martin v. Löwis11437992002-04-12 09:54:03 +000018275done
18276_ACEOF
18277cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018278
Martin v. Löwis11437992002-04-12 09:54:03 +000018279#
18280# CONFIG_HEADER section.
18281#
Guido van Rossum627b2d71993-12-24 10:39:16 +000018282
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018283# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18284# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000018285#
18286# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000018287ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18288ac_dB='[ ].*$,\1#\2'
18289ac_dC=' '
18290ac_dD=',;t'
18291# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18292ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18293ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018294ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000018295ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018296
Martin v. Löwis11437992002-04-12 09:54:03 +000018297for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000018298 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000018299 case $ac_file in
18300 - | *:- | *:-:* ) # input from stdin
18301 cat >$tmp/stdin
18302 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18303 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18304 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18305 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18306 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018307 esac
18308
Martin v. Löwis11437992002-04-12 09:54:03 +000018309 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
18310echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000018311
Martin v. Löwis11437992002-04-12 09:54:03 +000018312 # First look for the input files in the build tree, otherwise in the
18313 # src tree.
18314 ac_file_inputs=`IFS=:
18315 for f in $ac_file_in; do
18316 case $f in
18317 -) echo $tmp/stdin ;;
18318 [\\/$]*)
18319 # Absolute (can't be DOS-style, as IFS=:)
18320 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18321echo "$as_me: error: cannot find input file: $f" >&2;}
18322 { (exit 1); exit 1; }; }
18323 echo $f;;
18324 *) # Relative
18325 if test -f "$f"; then
18326 # Build tree
18327 echo $f
18328 elif test -f "$srcdir/$f"; then
18329 # Source tree
18330 echo $srcdir/$f
18331 else
18332 # /dev/null tree
18333 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18334echo "$as_me: error: cannot find input file: $f" >&2;}
18335 { (exit 1); exit 1; }; }
18336 fi;;
18337 esac
18338 done` || { (exit 1); exit 1; }
18339 # Remove the trailing spaces.
18340 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018341
Martin v. Löwis11437992002-04-12 09:54:03 +000018342_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018343
Martin v. Löwis11437992002-04-12 09:54:03 +000018344# Transform confdefs.h into two sed scripts, `conftest.defines' and
18345# `conftest.undefs', that substitutes the proper values into
18346# config.h.in to produce config.h. The first handles `#define'
18347# templates, and the second `#undef' templates.
18348# And first: Protect against being on the right side of a sed subst in
18349# config.status. Protect against being in an unquoted here document
18350# in config.status.
18351rm -f conftest.defines conftest.undefs
18352# Using a here document instead of a string reduces the quoting nightmare.
18353# Putting comments in sed scripts is not portable.
18354#
18355# `end' is used to avoid that the second main sed command (meant for
18356# 0-ary CPP macros) applies to n-ary macro definitions.
18357# See the Autoconf documentation for `clear'.
18358cat >confdef2sed.sed <<\_ACEOF
18359s/[\\&,]/\\&/g
18360s,[\\$`],\\&,g
18361t clear
18362: clear
18363s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
18364t end
18365s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
18366: end
18367_ACEOF
18368# If some macros were called several times there might be several times
18369# the same #defines, which is useless. Nevertheless, we may not want to
18370# sort them, since we want the *last* AC-DEFINE to be honored.
18371uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
18372sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
18373rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018374
18375# This sed command replaces #undef with comments. This is necessary, for
18376# example, in the case of _POSIX_SOURCE, which is predefined and required
18377# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000018378cat >>conftest.undefs <<\_ACEOF
18379s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
18380_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018381
Martin v. Löwis11437992002-04-12 09:54:03 +000018382# Break up conftest.defines because some shells have a limit on the size
18383# of here documents, and old seds have small limits too (100 cmds).
18384echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Barry Warsawfe33b792003-01-07 22:42:49 +000018385echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018386echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
18387echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018388rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000018389while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000018390do
Martin v. Löwis11437992002-04-12 09:54:03 +000018391 # Write a limited-size here document to $tmp/defines.sed.
18392 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
18393 # Speed up: don't consider the non `#define' lines.
18394 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
18395 # Work around the forget-to-reset-the-flag bug.
18396 echo 't clr' >>$CONFIG_STATUS
18397 echo ': clr' >>$CONFIG_STATUS
18398 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018399 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018400 sed -f $tmp/defines.sed $tmp/in >$tmp/out
18401 rm -f $tmp/in
18402 mv $tmp/out $tmp/in
18403' >>$CONFIG_STATUS
18404 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
18405 rm -f conftest.defines
18406 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000018407done
Martin v. Löwis11437992002-04-12 09:54:03 +000018408rm -f conftest.defines
Barry Warsawfe33b792003-01-07 22:42:49 +000018409echo ' fi # egrep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018410echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018411
Martin v. Löwis11437992002-04-12 09:54:03 +000018412# Break up conftest.undefs because some shells have a limit on the size
18413# of here documents, and old seds have small limits too (100 cmds).
18414echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
18415rm -f conftest.tail
18416while grep . conftest.undefs >/dev/null
18417do
18418 # Write a limited-size here document to $tmp/undefs.sed.
18419 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
18420 # Speed up: don't consider the non `#undef'
18421 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
18422 # Work around the forget-to-reset-the-flag bug.
18423 echo 't clr' >>$CONFIG_STATUS
18424 echo ': clr' >>$CONFIG_STATUS
18425 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
18426 echo 'CEOF
18427 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
18428 rm -f $tmp/in
18429 mv $tmp/out $tmp/in
18430' >>$CONFIG_STATUS
18431 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
18432 rm -f conftest.undefs
18433 mv conftest.tail conftest.undefs
18434done
18435rm -f conftest.undefs
18436
18437cat >>$CONFIG_STATUS <<\_ACEOF
18438 # Let's still pretend it is `configure' which instantiates (i.e., don't
18439 # use $as_me), people would be surprised to read:
18440 # /* config.h. Generated by config.status. */
18441 if test x"$ac_file" = x-; then
18442 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000018443 else
Martin v. Löwis11437992002-04-12 09:54:03 +000018444 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000018445 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018446 cat $tmp/in >>$tmp/config.h
18447 rm -f $tmp/in
18448 if test x"$ac_file" != x-; then
18449 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
18450 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
18451echo "$as_me: $ac_file is unchanged" >&6;}
18452 else
18453 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18454$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18455 X"$ac_file" : 'X\(//\)[^/]' \| \
18456 X"$ac_file" : 'X\(//\)$' \| \
18457 X"$ac_file" : 'X\(/\)' \| \
18458 . : '\(.\)' 2>/dev/null ||
18459echo X"$ac_file" |
18460 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18461 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18462 /^X\(\/\/\)$/{ s//\1/; q; }
18463 /^X\(\/\).*/{ s//\1/; q; }
18464 s/.*/./; q'`
Barry Warsawfe33b792003-01-07 22:42:49 +000018465 { case "$ac_dir" in
18466 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18467 *) as_incr_dir=.;;
18468esac
18469as_dummy="$ac_dir"
18470for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18471 case $as_mkdir_dir in
18472 # Skip DOS drivespec
18473 ?:) as_incr_dir=$as_mkdir_dir ;;
18474 *)
18475 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18476 test -d "$as_incr_dir" ||
18477 mkdir "$as_incr_dir" ||
18478 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18479echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18480 { (exit 1); exit 1; }; }
18481 ;;
18482 esac
18483done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018484
Martin v. Löwis11437992002-04-12 09:54:03 +000018485 rm -f $ac_file
18486 mv $tmp/config.h $ac_file
18487 fi
18488 else
18489 cat $tmp/config.h
18490 rm -f $tmp/config.h
18491 fi
18492done
18493_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000018494
Martin v. Löwis11437992002-04-12 09:54:03 +000018495cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018496
Martin v. Löwis11437992002-04-12 09:54:03 +000018497{ (exit 0); exit 0; }
18498_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018499chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018500ac_clean_files=$ac_clean_files_save
18501
18502
18503# configure is writing to config.log, and then calls config.status.
18504# config.status does its own redirection, appending to config.log.
18505# Unfortunately, on DOS this fails, as config.log is still kept open
18506# by configure, so config.status won't be able to write to it; its
18507# output is simply discarded. So we exec the FD to /dev/null,
18508# effectively closing config.log, so it can be properly (re)opened and
18509# appended to by config.status. When coming back to configure, we
18510# need to make the FD available again.
18511if test "$no_create" != yes; then
18512 ac_cs_success=:
18513 exec 5>/dev/null
18514 $SHELL $CONFIG_STATUS || ac_cs_success=false
18515 exec 5>>config.log
18516 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18517 # would make configure fail if this is the last instruction.
18518 $ac_cs_success || { (exit 1); exit 1; }
18519fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018520
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018521
18522echo "creating Setup"
18523if test ! -f Modules/Setup
18524then
18525 cp $srcdir/Modules/Setup.dist Modules/Setup
18526fi
18527
18528echo "creating Setup.local"
18529if test ! -f Modules/Setup.local
18530then
18531 echo "# Edit this file for local setup changes" >Modules/Setup.local
18532fi
18533
18534echo "creating Makefile"
18535$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
18536 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000018537 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018538mv config.c Modules