blob: 18ae72067b1375a3f03e1ea2af45a38a1e8b6647 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002# From configure.in Revision: 1.434 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004# Generated by GNU Autoconf 2.53 for python 2.4.
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.
Marc-André Lemburgd7160f82003-09-22 11:14:40 +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
Marc-André Lemburgd7160f82003-09-22 11:14:40 +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
Marc-André Lemburgd7160f82003-09-22 11:14:40 +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.
Marc-André Lemburgd7160f82003-09-22 11:14:40 +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
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000086 echo "#! /bin/sh" >conftest.sh
87 echo "exit 0" >>conftest.sh
88 chmod +x conftest.sh
89 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
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000094 rm -f conftest.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000095fi
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.
Marc-André Lemburgd7160f82003-09-22 11:14:40 +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'
Fred Drake9bd44622003-07-30 17:39:48 +0000258PACKAGE_VERSION='2.4'
259PACKAGE_STRING='python 2.4'
Martin v. Löwis88afe662002-10-26 13:47:44 +0000260PACKAGE_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
Fred Drake9bd44622003-07-30 17:39:48 +0000764\`configure' configures python 2.4 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
Fred Drake9bd44622003-07-30 17:39:48 +0000821 short | recursive ) echo "Configuration of python 2.4:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +0000822 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öwisfc9b75f2003-08-09 09:06:52 +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
Fred Drake9bd44622003-07-30 17:39:48 +0000937python configure 2.4
Marc-André Lemburgd7160f82003-09-22 11:14:40 +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
Fred Drake9bd44622003-07-30 17:39:48 +0000952It was created by python $as_me 2.4, which was
Marc-André Lemburgd7160f82003-09-22 11:14:40 +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=
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00001008for ac_arg
Martin v. Löwis11437992002-04-12 09:54:03 +00001009do
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00001010 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
1019 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
1024 # Get rid of the leading space.
Martin v. Löwis11437992002-04-12 09:54:03 +00001025done
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
Marc-André Lemburgd7160f82003-09-22 11:14:40 +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
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00001231ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001232
1233
Martin v. Löwis11437992002-04-12 09:54:03 +00001234
1235
1236
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001237
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001238
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001239# We don't use PACKAGE_ variables, and they cause conflicts
1240# with other autoconf-based packages that include Python.h
1241grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1242rm confdefs.h
1243mv confdefs.h.new confdefs.h
1244
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001245
Fred Drake9bd44622003-07-30 17:39:48 +00001246VERSION=2.4
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001247
Martin v. Löwis1142de32002-03-29 16:28:31 +00001248
1249SOVERSION=1.0
1250
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001251# The later defininition of _XOPEN_SOURCE disables certain features
1252# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1253
1254cat >>confdefs.h <<\_ACEOF
1255#define _GNU_SOURCE 1
1256_ACEOF
1257
1258
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001259# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1260# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1261# them.
1262
1263cat >>confdefs.h <<\_ACEOF
1264#define _NETBSD_SOURCE 1
1265_ACEOF
1266
1267
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001268# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1269# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1270# them.
1271
1272cat >>confdefs.h <<\_ACEOF
1273#define __BSD_VISIBLE 1
1274_ACEOF
1275
1276
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001277define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001278
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001279# Arguments passed to configure.
1280
1281CONFIG_ARGS="$ac_configure_args"
1282
Jack Jansene578a632001-08-15 01:27:14 +00001283# Check whether --enable-framework or --disable-framework was given.
1284if test "${enable_framework+set}" = set; then
1285 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001286
Jack Jansene578a632001-08-15 01:27:14 +00001287 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001288 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001289 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001290 esac
1291 case $enableval in
1292 no)
1293 PYTHONFRAMEWORK=
1294 PYTHONFRAMEWORKDIR=no-framework
1295 PYTHONFRAMEWORKPREFIX=
1296 PYTHONFRAMEWORKINSTALLDIR=
1297 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001298 ;;
1299 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001300 PYTHONFRAMEWORK=Python
1301 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001302 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001303 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1304 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001305 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001306
Guido van Rossum563e7081996-09-10 18:20:48 +00001307else
Martin v. Löwis11437992002-04-12 09:54:03 +00001308
Jack Jansene578a632001-08-15 01:27:14 +00001309 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001310 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001311 PYTHONFRAMEWORKPREFIX=
1312 PYTHONFRAMEWORKINSTALLDIR=
1313 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001314
Martin v. Löwis11437992002-04-12 09:54:03 +00001315fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001316
1317
1318
1319
Jack Jansene578a632001-08-15 01:27:14 +00001320
1321##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001322## AC_HELP_STRING(--with-dyld,
1323## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001324##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001325# Set name for machine-dependent library files
1326
Martin v. Löwis11437992002-04-12 09:54:03 +00001327echo "$as_me:$LINENO: checking MACHDEP" >&5
1328echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001329if test -z "$MACHDEP"
1330then
Guido van Rossum563e7081996-09-10 18:20:48 +00001331 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001332 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1333 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001334 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001335 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001336 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001337 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001338 ac_md_system=`echo $ac_sys_system |
1339 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1340 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001341 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001342 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001343
Guido van Rossum07397971997-04-29 21:49:50 +00001344 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001345 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001346 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001347 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00001348 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001349 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001350 esac
1351fi
Guido van Rossum91922671997-10-09 20:24:13 +00001352
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001353# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1354# disable features if it is defined, without any means to access these
1355# features as extensions. For these systems, we skip the definition of
1356# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1357# some feature, make sure there is no alternative way to access this
1358# feature. Also, when using wildcards, make sure you have verified the
1359# need for not defining _XOPEN_SOURCE on all systems matching the
1360# wildcard, and that the wildcard does not include future systems
1361# (which may remove their limitations).
1362case $ac_sys_system/$ac_sys_release in
1363 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1364 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis858f8172003-05-24 12:35:47 +00001365 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm.
1366 OpenBSD/2.* | OpenBSD/3.[0123])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001367 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00001368 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
1369 # of union __?sigval. Reported by Stuart Bishop.
1370 SunOS/5.6)
1371 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001372 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
1373 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
1374 OpenUNIX/8.0.0| UnixWare/7.1.[0-3])
1375 define_xopen_source=no;;
1376 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001377 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001378 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001379 define_xopen_source=no;;
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001380esac
1381
1382if test $define_xopen_source = yes
1383then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001384
1385cat >>confdefs.h <<\_ACEOF
1386#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001387_ACEOF
1388
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001389
1390 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1391 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1392 # several APIs are not declared. Since this is also needed in some
1393 # cases for HP-UX, we define it globally.
1394
1395
1396cat >>confdefs.h <<\_ACEOF
1397#define _XOPEN_SOURCE_EXTENDED 1
1398_ACEOF
1399
1400
1401cat >>confdefs.h <<\_ACEOF
1402#define _POSIX_C_SOURCE 200112L
1403_ACEOF
1404
1405
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001406fi
1407
Guido van Rossum91922671997-10-09 20:24:13 +00001408#
1409# SGI compilers allow the specification of the both the ABI and the
1410# ISA on the command line. Depending on the values of these switches,
1411# different and often incompatable code will be generated.
1412#
1413# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1414# thus supply support for various ABI/ISA combinations. The MACHDEP
1415# variable is also adjusted.
1416#
1417
1418if test ! -z "$SGI_ABI"
1419then
1420 CC="cc $SGI_ABI"
1421 LDFLAGS="$SGI_ABI $LDFLAGS"
1422 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1423fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001424echo "$as_me:$LINENO: result: $MACHDEP" >&5
1425echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001426
Jack Jansen83f898c2002-12-30 22:23:40 +00001427# And add extra plat-mac for darwin
1428
Jack Jansen7b59b422003-03-17 15:44:10 +00001429
Jack Jansen83f898c2002-12-30 22:23:40 +00001430echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1431echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1432if test -z "$EXTRAPLATDIR"
1433then
1434 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001435 darwin)
1436 EXTRAPLATDIR="\$(PLATMACDIRS)"
1437 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1438 ;;
1439 *)
1440 EXTRAPLATDIR=""
1441 EXTRAMACHDEPPATH=""
1442 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001443 esac
1444fi
1445echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1446echo "${ECHO_T}$EXTRAPLATDIR" >&6
1447
Guido van Rossum627b2d71993-12-24 10:39:16 +00001448# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001449
1450# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1451# for debug/optimization stuff. BASECFLAGS is for flags that are required
1452# just to get things to compile and link. Users are free to override OPT
1453# when running configure or make. The build should not break if they do.
1454# BASECFLAGS should generally not be messed with, however.
1455
1456# XXX shouldn't some/most/all of this code be merged with the stuff later
1457# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001458echo "$as_me:$LINENO: checking for --without-gcc" >&5
1459echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1460
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001461# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001462if test "${with_gcc+set}" = set; then
1463 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001464
Guido van Rossum7f43da71994-08-01 12:15:30 +00001465 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001466 no) CC=cc
1467 without_gcc=yes;;
1468 yes) CC=gcc
1469 without_gcc=no;;
1470 *) CC=$withval
1471 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001472 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001473else
Martin v. Löwis11437992002-04-12 09:54:03 +00001474
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001475 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001476 AIX*) CC=cc_r
1477 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001478 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001479 case $BE_HOST_CPU in
1480 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001481 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001482 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001483 BASECFLAGS="$BASECFLAGS -export pragma"
1484 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001485 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001486 ;;
1487 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001488 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001489 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001490 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001491 ;;
1492 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001493 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1494echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1495 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001496 ;;
1497 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001498 AR="\$(srcdir)/Modules/ar_beos"
1499 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001500 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001501 Monterey*)
1502 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001503 without_gcc=;;
1504 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001505 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001506fi;
1507echo "$as_me:$LINENO: result: $without_gcc" >&5
1508echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001509
1510
Guido van Rossum95012191999-12-16 17:50:52 +00001511
Fred Drakea1a84e72001-03-06 05:52:16 +00001512MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001513echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1514echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1515
Guido van Rossum95012191999-12-16 17:50:52 +00001516# Check whether --with-cxx or --without-cxx was given.
1517if test "${with_cxx+set}" = set; then
1518 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001519
Martin v. Löwis22352952000-12-13 17:37:02 +00001520 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001521 case $withval in
1522 no) CXX=
1523 with_cxx=no;;
1524 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001525 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001526 with_cxx=$withval;;
1527 esac
1528else
Martin v. Löwis11437992002-04-12 09:54:03 +00001529
Guido van Rossum95012191999-12-16 17:50:52 +00001530 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001531 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001532
Martin v. Löwis11437992002-04-12 09:54:03 +00001533fi;
1534echo "$as_me:$LINENO: result: $with_cxx" >&5
1535echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001536
1537if test "$with_cxx" = "yes"
1538then
Martin v. Löwis11437992002-04-12 09:54:03 +00001539 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1540echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1541 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001542fi
1543
1544
1545
1546
Martin v. Löwis11437992002-04-12 09:54:03 +00001547if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001548then
1549 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1550do
Martin v. Löwis11437992002-04-12 09:54:03 +00001551 # 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 +00001552set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001553echo "$as_me:$LINENO: checking for $ac_word" >&5
1554echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1555if test "${ac_cv_prog_CXX+set}" = set; then
1556 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001557else
1558 if test -n "$CXX"; then
1559 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1560else
Martin v. Löwis11437992002-04-12 09:54:03 +00001561as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1562for as_dir in $PATH
1563do
1564 IFS=$as_save_IFS
1565 test -z "$as_dir" && as_dir=.
1566 for ac_exec_ext in '' $ac_executable_extensions; do
1567 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1568 ac_cv_prog_CXX="$ac_prog"
1569 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1570 break 2
1571 fi
1572done
1573done
1574
Martin v. Löwis22352952000-12-13 17:37:02 +00001575fi
1576fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001577CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001578if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001579 echo "$as_me:$LINENO: result: $CXX" >&5
1580echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001581else
Martin v. Löwis11437992002-04-12 09:54:03 +00001582 echo "$as_me:$LINENO: result: no" >&5
1583echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001584fi
1585
Martin v. Löwis11437992002-04-12 09:54:03 +00001586 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001587done
1588test -n "$CXX" || CXX="notfound"
1589
1590 if test "$CXX" = "notfound"
1591 then
1592 CXX=
1593 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001594 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001595ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001596ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1597ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1598ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1599 cat >conftest.$ac_ext <<_ACEOF
1600#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00001601#include "confdefs.h"
Martin v. Löwis22352952000-12-13 17:37:02 +00001602
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00001603#ifdef F77_DUMMY_MAIN
1604# ifdef __cplusplus
1605 extern "C"
1606# endif
1607 int F77_DUMMY_MAIN() { return 1; }
1608#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00001609int
1610main ()
1611{
Michael W. Hudson54241132001-12-07 15:38:26 +00001612
Martin v. Löwis11437992002-04-12 09:54:03 +00001613 ;
1614 return 0;
1615}
1616_ACEOF
1617ac_clean_files_save=$ac_clean_files
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00001618ac_clean_files="$ac_clean_files a.out a.exe"
Martin v. Löwis11437992002-04-12 09:54:03 +00001619# Try to create an executable without -o first, disregard a.out.
1620# It will help us diagnose broken compilers, and finding out an intuition
1621# of exeext.
1622echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1623echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1624ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1625if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1626 (eval $ac_link_default) 2>&5
1627 ac_status=$?
1628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1629 (exit $ac_status); }; then
1630 # Find the output, starting from the most likely. This scheme is
1631# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1632# resort.
1633
1634# Be careful to initialize this variable, since it used to be cached.
1635# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1636ac_cv_exeext=
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00001637for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1638 ls a.out conftest 2>/dev/null;
1639 ls a.* conftest.* 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001640 case $ac_file in
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00001641 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1642 a.out ) # We found the default executable, but exeext='' is most
1643 # certainly right.
1644 break;;
1645 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1646 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1647 export ac_cv_exeext
1648 break;;
1649 * ) break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001650 esac
1651done
1652else
1653 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00001654cat conftest.$ac_ext >&5
1655{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1656echo "$as_me: error: C++ compiler cannot create executables" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001657 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001658fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001659
1660ac_exeext=$ac_cv_exeext
1661echo "$as_me:$LINENO: result: $ac_file" >&5
1662echo "${ECHO_T}$ac_file" >&6
1663
1664# Check the compiler produces executables we can run. If not, either
1665# the compiler is broken, or we cross compile.
1666echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1667echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1668# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1669# If not cross compiling, check that we can run a simple program.
1670if test "$cross_compiling" != yes; then
1671 if { ac_try='./$ac_file'
1672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1673 (eval $ac_try) 2>&5
1674 ac_status=$?
1675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1676 (exit $ac_status); }; }; then
1677 cross_compiling=no
1678 else
1679 if test "$cross_compiling" = maybe; then
1680 cross_compiling=yes
1681 else
1682 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00001683If you meant to cross compile, use \`--host'." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001684echo "$as_me: error: cannot run C++ compiled programs.
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00001685If you meant to cross compile, use \`--host'." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001686 { (exit 1); exit 1; }; }
1687 fi
1688 fi
1689fi
1690echo "$as_me:$LINENO: result: yes" >&5
1691echo "${ECHO_T}yes" >&6
1692
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00001693rm -f a.out a.exe conftest$ac_cv_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +00001694ac_clean_files=$ac_clean_files_save
1695# Check the compiler produces executables we can run. If not, either
1696# the compiler is broken, or we cross compile.
1697echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1698echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1699echo "$as_me:$LINENO: result: $cross_compiling" >&5
1700echo "${ECHO_T}$cross_compiling" >&6
1701
1702echo "$as_me:$LINENO: checking for suffix of executables" >&5
1703echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1704if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1705 (eval $ac_link) 2>&5
1706 ac_status=$?
1707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1708 (exit $ac_status); }; then
1709 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1710# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1711# work properly (i.e., refer to `conftest.exe'), while it won't with
1712# `rm'.
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00001713for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001714 case $ac_file in
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00001715 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001716 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1717 export ac_cv_exeext
1718 break;;
1719 * ) break;;
1720 esac
1721done
1722else
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00001723 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1724echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001725 { (exit 1); exit 1; }; }
1726fi
1727
1728rm -f conftest$ac_cv_exeext
1729echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1730echo "${ECHO_T}$ac_cv_exeext" >&6
1731
1732rm -f conftest.$ac_ext
1733EXEEXT=$ac_cv_exeext
1734ac_exeext=$EXEEXT
1735
1736 ac_ext=c
1737ac_cpp='$CPP $CPPFLAGS'
1738ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1739ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1740ac_compiler_gnu=$ac_cv_c_compiler_gnu
1741
1742
Martin v. Löwis22352952000-12-13 17:37:02 +00001743
1744 fi
1745fi
1746
Guido van Rossum8b131c51995-03-09 14:10:13 +00001747# If the user switches compilers, we can't believe the cache
1748if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1749then
Martin v. Löwis11437992002-04-12 09:54:03 +00001750 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1751(it is also a good idea to do 'make clean' before compiling)" >&5
1752echo "$as_me: error: cached CC is different -- throw away $cache_file
1753(it is also a good idea to do 'make clean' before compiling)" >&2;}
1754 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001755fi
1756
Martin v. Löwis11437992002-04-12 09:54:03 +00001757ac_ext=c
1758ac_cpp='$CPP $CPPFLAGS'
1759ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1760ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1761ac_compiler_gnu=$ac_cv_c_compiler_gnu
1762if test -n "$ac_tool_prefix"; then
1763 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1764set dummy ${ac_tool_prefix}gcc; ac_word=$2
1765echo "$as_me:$LINENO: checking for $ac_word" >&5
1766echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1767if test "${ac_cv_prog_CC+set}" = set; then
1768 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001769else
1770 if test -n "$CC"; then
1771 ac_cv_prog_CC="$CC" # Let the user override the test.
1772else
Martin v. Löwis11437992002-04-12 09:54:03 +00001773as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1774for as_dir in $PATH
1775do
1776 IFS=$as_save_IFS
1777 test -z "$as_dir" && as_dir=.
1778 for ac_exec_ext in '' $ac_executable_extensions; do
1779 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1780 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1781 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1782 break 2
1783 fi
1784done
1785done
1786
Jack Jansendd19cf82001-12-06 22:36:17 +00001787fi
1788fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001789CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001790if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001791 echo "$as_me:$LINENO: result: $CC" >&5
1792echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001793else
Martin v. Löwis11437992002-04-12 09:54:03 +00001794 echo "$as_me:$LINENO: result: no" >&5
1795echo "${ECHO_T}no" >&6
1796fi
1797
1798fi
1799if test -z "$ac_cv_prog_CC"; then
1800 ac_ct_CC=$CC
1801 # Extract the first word of "gcc", so it can be a program name with args.
1802set dummy gcc; ac_word=$2
1803echo "$as_me:$LINENO: checking for $ac_word" >&5
1804echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1805if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1806 echo $ECHO_N "(cached) $ECHO_C" >&6
1807else
1808 if test -n "$ac_ct_CC"; then
1809 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1810else
1811as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1812for as_dir in $PATH
1813do
1814 IFS=$as_save_IFS
1815 test -z "$as_dir" && as_dir=.
1816 for ac_exec_ext in '' $ac_executable_extensions; do
1817 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1818 ac_cv_prog_ac_ct_CC="gcc"
1819 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1820 break 2
1821 fi
1822done
1823done
1824
1825fi
1826fi
1827ac_ct_CC=$ac_cv_prog_ac_ct_CC
1828if test -n "$ac_ct_CC"; then
1829 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1830echo "${ECHO_T}$ac_ct_CC" >&6
1831else
1832 echo "$as_me:$LINENO: result: no" >&5
1833echo "${ECHO_T}no" >&6
1834fi
1835
1836 CC=$ac_ct_CC
1837else
1838 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001839fi
1840
Jack Jansendd19cf82001-12-06 22:36:17 +00001841if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001842 if test -n "$ac_tool_prefix"; then
1843 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1844set dummy ${ac_tool_prefix}cc; ac_word=$2
1845echo "$as_me:$LINENO: checking for $ac_word" >&5
1846echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1847if test "${ac_cv_prog_CC+set}" = set; then
1848 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001849else
1850 if test -n "$CC"; then
1851 ac_cv_prog_CC="$CC" # Let the user override the test.
1852else
Martin v. Löwis11437992002-04-12 09:54:03 +00001853as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1854for as_dir in $PATH
1855do
1856 IFS=$as_save_IFS
1857 test -z "$as_dir" && as_dir=.
1858 for ac_exec_ext in '' $ac_executable_extensions; do
1859 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1860 ac_cv_prog_CC="${ac_tool_prefix}cc"
1861 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1862 break 2
1863 fi
1864done
1865done
1866
1867fi
1868fi
1869CC=$ac_cv_prog_CC
1870if test -n "$CC"; then
1871 echo "$as_me:$LINENO: result: $CC" >&5
1872echo "${ECHO_T}$CC" >&6
1873else
1874 echo "$as_me:$LINENO: result: no" >&5
1875echo "${ECHO_T}no" >&6
1876fi
1877
1878fi
1879if test -z "$ac_cv_prog_CC"; then
1880 ac_ct_CC=$CC
1881 # Extract the first word of "cc", so it can be a program name with args.
1882set dummy cc; ac_word=$2
1883echo "$as_me:$LINENO: checking for $ac_word" >&5
1884echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1885if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1886 echo $ECHO_N "(cached) $ECHO_C" >&6
1887else
1888 if test -n "$ac_ct_CC"; then
1889 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1890else
1891as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1892for as_dir in $PATH
1893do
1894 IFS=$as_save_IFS
1895 test -z "$as_dir" && as_dir=.
1896 for ac_exec_ext in '' $ac_executable_extensions; do
1897 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1898 ac_cv_prog_ac_ct_CC="cc"
1899 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1900 break 2
1901 fi
1902done
1903done
1904
1905fi
1906fi
1907ac_ct_CC=$ac_cv_prog_ac_ct_CC
1908if test -n "$ac_ct_CC"; then
1909 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1910echo "${ECHO_T}$ac_ct_CC" >&6
1911else
1912 echo "$as_me:$LINENO: result: no" >&5
1913echo "${ECHO_T}no" >&6
1914fi
1915
1916 CC=$ac_ct_CC
1917else
1918 CC="$ac_cv_prog_CC"
1919fi
1920
1921fi
1922if test -z "$CC"; then
1923 # Extract the first word of "cc", so it can be a program name with args.
1924set dummy cc; ac_word=$2
1925echo "$as_me:$LINENO: checking for $ac_word" >&5
1926echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1927if test "${ac_cv_prog_CC+set}" = set; then
1928 echo $ECHO_N "(cached) $ECHO_C" >&6
1929else
1930 if test -n "$CC"; then
1931 ac_cv_prog_CC="$CC" # Let the user override the test.
1932else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001933 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001934as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1935for as_dir in $PATH
1936do
1937 IFS=$as_save_IFS
1938 test -z "$as_dir" && as_dir=.
1939 for ac_exec_ext in '' $ac_executable_extensions; do
1940 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1941 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1942 ac_prog_rejected=yes
1943 continue
1944 fi
1945 ac_cv_prog_CC="cc"
1946 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1947 break 2
1948 fi
1949done
1950done
1951
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001952if test $ac_prog_rejected = yes; then
1953 # We found a bogon in the path, so make sure we never use it.
1954 set dummy $ac_cv_prog_CC
1955 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001956 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001957 # We chose a different compiler from the bogus one.
1958 # However, it has the same basename, so the bogon will be chosen
1959 # first if we set CC to just the basename; use the full file name.
1960 shift
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00001961 set dummy "$as_dir/$ac_word" ${1+"$@"}
1962 shift
1963 ac_cv_prog_CC="$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001964 fi
1965fi
1966fi
1967fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001968CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001969if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001970 echo "$as_me:$LINENO: result: $CC" >&5
1971echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001972else
Martin v. Löwis11437992002-04-12 09:54:03 +00001973 echo "$as_me:$LINENO: result: no" >&5
1974echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001975fi
1976
Martin v. Löwis11437992002-04-12 09:54:03 +00001977fi
1978if test -z "$CC"; then
1979 if test -n "$ac_tool_prefix"; then
1980 for ac_prog in cl
1981 do
1982 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1983set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1984echo "$as_me:$LINENO: checking for $ac_word" >&5
1985echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1986if test "${ac_cv_prog_CC+set}" = set; then
1987 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001988else
1989 if test -n "$CC"; then
1990 ac_cv_prog_CC="$CC" # Let the user override the test.
1991else
Martin v. Löwis11437992002-04-12 09:54:03 +00001992as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1993for as_dir in $PATH
1994do
1995 IFS=$as_save_IFS
1996 test -z "$as_dir" && as_dir=.
1997 for ac_exec_ext in '' $ac_executable_extensions; do
1998 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1999 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2000 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2001 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002002 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002003done
2004done
2005
2006fi
2007fi
2008CC=$ac_cv_prog_CC
2009if test -n "$CC"; then
2010 echo "$as_me:$LINENO: result: $CC" >&5
2011echo "${ECHO_T}$CC" >&6
2012else
2013 echo "$as_me:$LINENO: result: no" >&5
2014echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002015fi
2016
Martin v. Löwis11437992002-04-12 09:54:03 +00002017 test -n "$CC" && break
2018 done
2019fi
2020if test -z "$CC"; then
2021 ac_ct_CC=$CC
2022 for ac_prog in cl
2023do
2024 # Extract the first word of "$ac_prog", so it can be a program name with args.
2025set dummy $ac_prog; ac_word=$2
2026echo "$as_me:$LINENO: checking for $ac_word" >&5
2027echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2028if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2029 echo $ECHO_N "(cached) $ECHO_C" >&6
2030else
2031 if test -n "$ac_ct_CC"; then
2032 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2033else
2034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2035for as_dir in $PATH
2036do
2037 IFS=$as_save_IFS
2038 test -z "$as_dir" && as_dir=.
2039 for ac_exec_ext in '' $ac_executable_extensions; do
2040 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2041 ac_cv_prog_ac_ct_CC="$ac_prog"
2042 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2043 break 2
2044 fi
2045done
2046done
Jack Jansendd19cf82001-12-06 22:36:17 +00002047
Martin v. Löwis11437992002-04-12 09:54:03 +00002048fi
2049fi
2050ac_ct_CC=$ac_cv_prog_ac_ct_CC
2051if test -n "$ac_ct_CC"; then
2052 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2053echo "${ECHO_T}$ac_ct_CC" >&6
2054else
2055 echo "$as_me:$LINENO: result: no" >&5
2056echo "${ECHO_T}no" >&6
2057fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002058
Martin v. Löwis11437992002-04-12 09:54:03 +00002059 test -n "$ac_ct_CC" && break
2060done
Michael W. Hudson54241132001-12-07 15:38:26 +00002061
Martin v. Löwis11437992002-04-12 09:54:03 +00002062 CC=$ac_ct_CC
2063fi
2064
2065fi
2066
2067
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002068test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
2069echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002070 { (exit 1); exit 1; }; }
2071
2072# Provide some information about the compiler.
2073echo "$as_me:$LINENO:" \
2074 "checking for C compiler version" >&5
2075ac_compiler=`set X $ac_compile; echo $2`
2076{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2077 (eval $ac_compiler --version </dev/null >&5) 2>&5
2078 ac_status=$?
2079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2080 (exit $ac_status); }
2081{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2082 (eval $ac_compiler -v </dev/null >&5) 2>&5
2083 ac_status=$?
2084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2085 (exit $ac_status); }
2086{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2087 (eval $ac_compiler -V </dev/null >&5) 2>&5
2088 ac_status=$?
2089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2090 (exit $ac_status); }
2091
2092cat >conftest.$ac_ext <<_ACEOF
2093#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002094#include "confdefs.h"
Jack Jansendd19cf82001-12-06 22:36:17 +00002095
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002096#ifdef F77_DUMMY_MAIN
2097# ifdef __cplusplus
2098 extern "C"
2099# endif
2100 int F77_DUMMY_MAIN() { return 1; }
2101#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002102int
2103main ()
2104{
2105
2106 ;
2107 return 0;
2108}
2109_ACEOF
2110ac_clean_files_save=$ac_clean_files
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002111ac_clean_files="$ac_clean_files a.out a.exe"
Martin v. Löwis11437992002-04-12 09:54:03 +00002112# Try to create an executable without -o first, disregard a.out.
2113# It will help us diagnose broken compilers, and finding out an intuition
2114# of exeext.
2115echo "$as_me:$LINENO: checking for C compiler default output" >&5
2116echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2117ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2118if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2119 (eval $ac_link_default) 2>&5
2120 ac_status=$?
2121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2122 (exit $ac_status); }; then
2123 # Find the output, starting from the most likely. This scheme is
2124# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2125# resort.
2126
2127# Be careful to initialize this variable, since it used to be cached.
2128# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2129ac_cv_exeext=
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002130for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
2131 ls a.out conftest 2>/dev/null;
2132 ls a.* conftest.* 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002133 case $ac_file in
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002134 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
2135 a.out ) # We found the default executable, but exeext='' is most
2136 # certainly right.
2137 break;;
2138 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2139 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2140 export ac_cv_exeext
2141 break;;
2142 * ) break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002143 esac
2144done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002145else
Martin v. Löwis11437992002-04-12 09:54:03 +00002146 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002147cat conftest.$ac_ext >&5
2148{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2149echo "$as_me: error: C compiler cannot create executables" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002150 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002151fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002152
Martin v. Löwis11437992002-04-12 09:54:03 +00002153ac_exeext=$ac_cv_exeext
2154echo "$as_me:$LINENO: result: $ac_file" >&5
2155echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002156
Martin v. Löwis11437992002-04-12 09:54:03 +00002157# Check the compiler produces executables we can run. If not, either
2158# the compiler is broken, or we cross compile.
2159echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2160echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2161# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2162# If not cross compiling, check that we can run a simple program.
2163if test "$cross_compiling" != yes; then
2164 if { ac_try='./$ac_file'
2165 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2166 (eval $ac_try) 2>&5
2167 ac_status=$?
2168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2169 (exit $ac_status); }; }; then
2170 cross_compiling=no
2171 else
2172 if test "$cross_compiling" = maybe; then
2173 cross_compiling=yes
2174 else
2175 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002176If you meant to cross compile, use \`--host'." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002177echo "$as_me: error: cannot run C compiled programs.
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002178If you meant to cross compile, use \`--host'." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002179 { (exit 1); exit 1; }; }
2180 fi
2181 fi
2182fi
2183echo "$as_me:$LINENO: result: yes" >&5
2184echo "${ECHO_T}yes" >&6
2185
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002186rm -f a.out a.exe conftest$ac_cv_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +00002187ac_clean_files=$ac_clean_files_save
2188# Check the compiler produces executables we can run. If not, either
2189# the compiler is broken, or we cross compile.
2190echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2191echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2192echo "$as_me:$LINENO: result: $cross_compiling" >&5
2193echo "${ECHO_T}$cross_compiling" >&6
2194
2195echo "$as_me:$LINENO: checking for suffix of executables" >&5
2196echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2197if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2198 (eval $ac_link) 2>&5
2199 ac_status=$?
2200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2201 (exit $ac_status); }; then
2202 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2203# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2204# work properly (i.e., refer to `conftest.exe'), while it won't with
2205# `rm'.
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002206for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002207 case $ac_file in
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002208 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002209 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2210 export ac_cv_exeext
2211 break;;
2212 * ) break;;
2213 esac
2214done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002215else
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002216 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2217echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002218 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002219fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002220
Martin v. Löwis11437992002-04-12 09:54:03 +00002221rm -f conftest$ac_cv_exeext
2222echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2223echo "${ECHO_T}$ac_cv_exeext" >&6
2224
2225rm -f conftest.$ac_ext
2226EXEEXT=$ac_cv_exeext
2227ac_exeext=$EXEEXT
2228echo "$as_me:$LINENO: checking for suffix of object files" >&5
2229echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2230if test "${ac_cv_objext+set}" = set; then
2231 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002232else
Martin v. Löwis11437992002-04-12 09:54:03 +00002233 cat >conftest.$ac_ext <<_ACEOF
2234#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002235#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002236
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002237#ifdef F77_DUMMY_MAIN
2238# ifdef __cplusplus
2239 extern "C"
2240# endif
2241 int F77_DUMMY_MAIN() { return 1; }
2242#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002243int
2244main ()
2245{
2246
2247 ;
2248 return 0;
2249}
2250_ACEOF
2251rm -f conftest.o conftest.obj
2252if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2253 (eval $ac_compile) 2>&5
2254 ac_status=$?
2255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2256 (exit $ac_status); }; then
2257 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2258 case $ac_file in
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002259 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002260 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2261 break;;
2262 esac
2263done
2264else
2265 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002266cat conftest.$ac_ext >&5
2267{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2268echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002269 { (exit 1); exit 1; }; }
2270fi
2271
2272rm -f conftest.$ac_cv_objext conftest.$ac_ext
2273fi
2274echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2275echo "${ECHO_T}$ac_cv_objext" >&6
2276OBJEXT=$ac_cv_objext
2277ac_objext=$OBJEXT
2278echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2279echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2280if test "${ac_cv_c_compiler_gnu+set}" = set; then
2281 echo $ECHO_N "(cached) $ECHO_C" >&6
2282else
2283 cat >conftest.$ac_ext <<_ACEOF
2284#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002285#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002286
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002287#ifdef F77_DUMMY_MAIN
2288# ifdef __cplusplus
2289 extern "C"
2290# endif
2291 int F77_DUMMY_MAIN() { return 1; }
2292#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002293int
2294main ()
2295{
2296#ifndef __GNUC__
2297 choke me
2298#endif
2299
2300 ;
2301 return 0;
2302}
2303_ACEOF
2304rm -f conftest.$ac_objext
2305if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2306 (eval $ac_compile) 2>&5
2307 ac_status=$?
2308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2309 (exit $ac_status); } &&
2310 { ac_try='test -s conftest.$ac_objext'
2311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2312 (eval $ac_try) 2>&5
2313 ac_status=$?
2314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2315 (exit $ac_status); }; }; then
2316 ac_compiler_gnu=yes
2317else
2318 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002319cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002320ac_compiler_gnu=no
2321fi
2322rm -f conftest.$ac_objext conftest.$ac_ext
2323ac_cv_c_compiler_gnu=$ac_compiler_gnu
2324
2325fi
2326echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2327echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2328GCC=`test $ac_compiler_gnu = yes && echo yes`
2329ac_test_CFLAGS=${CFLAGS+set}
2330ac_save_CFLAGS=$CFLAGS
2331CFLAGS="-g"
2332echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2333echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2334if test "${ac_cv_prog_cc_g+set}" = set; then
2335 echo $ECHO_N "(cached) $ECHO_C" >&6
2336else
2337 cat >conftest.$ac_ext <<_ACEOF
2338#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002339#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002340
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002341#ifdef F77_DUMMY_MAIN
2342# ifdef __cplusplus
2343 extern "C"
2344# endif
2345 int F77_DUMMY_MAIN() { return 1; }
2346#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002347int
2348main ()
2349{
2350
2351 ;
2352 return 0;
2353}
2354_ACEOF
2355rm -f conftest.$ac_objext
2356if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2357 (eval $ac_compile) 2>&5
2358 ac_status=$?
2359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2360 (exit $ac_status); } &&
2361 { ac_try='test -s conftest.$ac_objext'
2362 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2363 (eval $ac_try) 2>&5
2364 ac_status=$?
2365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2366 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002367 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002368else
Martin v. Löwis11437992002-04-12 09:54:03 +00002369 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002370cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002371ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002372fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002373rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002374fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002375echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2376echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002377if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002378 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002379elif test $ac_cv_prog_cc_g = yes; then
2380 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002381 CFLAGS="-g -O2"
2382 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002383 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002384 fi
2385else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002386 if test "$GCC" = yes; then
2387 CFLAGS="-O2"
2388 else
2389 CFLAGS=
2390 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002391fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002392# Some people use a C++ compiler to compile C. Since we use `exit',
2393# in C++ we need to declare it. In case someone uses the same compiler
2394# for both compiling C and C++ we need to have the C++ compiler decide
2395# the declaration of exit, since it's the most demanding environment.
2396cat >conftest.$ac_ext <<_ACEOF
2397#ifndef __cplusplus
2398 choke me
2399#endif
2400_ACEOF
2401rm -f conftest.$ac_objext
2402if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2403 (eval $ac_compile) 2>&5
2404 ac_status=$?
2405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2406 (exit $ac_status); } &&
2407 { ac_try='test -s conftest.$ac_objext'
2408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2409 (eval $ac_try) 2>&5
2410 ac_status=$?
2411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2412 (exit $ac_status); }; }; then
2413 for ac_declaration in \
2414 ''\
2415 '#include <stdlib.h>' \
2416 'extern "C" void std::exit (int) throw (); using std::exit;' \
2417 'extern "C" void std::exit (int); using std::exit;' \
2418 'extern "C" void exit (int) throw ();' \
2419 'extern "C" void exit (int);' \
2420 'void exit (int);'
2421do
2422 cat >conftest.$ac_ext <<_ACEOF
2423#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002424#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002425#include <stdlib.h>
2426$ac_declaration
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002427#ifdef F77_DUMMY_MAIN
2428# ifdef __cplusplus
2429 extern "C"
2430# endif
2431 int F77_DUMMY_MAIN() { return 1; }
2432#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002433int
2434main ()
2435{
2436exit (42);
2437 ;
2438 return 0;
2439}
2440_ACEOF
2441rm -f conftest.$ac_objext
2442if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2443 (eval $ac_compile) 2>&5
2444 ac_status=$?
2445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2446 (exit $ac_status); } &&
2447 { ac_try='test -s conftest.$ac_objext'
2448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2449 (eval $ac_try) 2>&5
2450 ac_status=$?
2451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2452 (exit $ac_status); }; }; then
2453 :
2454else
2455 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002456cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002457continue
2458fi
2459rm -f conftest.$ac_objext conftest.$ac_ext
2460 cat >conftest.$ac_ext <<_ACEOF
2461#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002462#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002463$ac_declaration
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002464#ifdef F77_DUMMY_MAIN
2465# ifdef __cplusplus
2466 extern "C"
2467# endif
2468 int F77_DUMMY_MAIN() { return 1; }
2469#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002470int
2471main ()
2472{
2473exit (42);
2474 ;
2475 return 0;
2476}
2477_ACEOF
2478rm -f conftest.$ac_objext
2479if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2480 (eval $ac_compile) 2>&5
2481 ac_status=$?
2482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2483 (exit $ac_status); } &&
2484 { ac_try='test -s conftest.$ac_objext'
2485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2486 (eval $ac_try) 2>&5
2487 ac_status=$?
2488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2489 (exit $ac_status); }; }; then
2490 break
2491else
2492 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002493cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002494fi
2495rm -f conftest.$ac_objext conftest.$ac_ext
2496done
2497rm -f conftest*
2498if test -n "$ac_declaration"; then
2499 echo '#ifdef __cplusplus' >>confdefs.h
2500 echo $ac_declaration >>confdefs.h
2501 echo '#endif' >>confdefs.h
2502fi
2503
2504else
2505 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002506cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002507fi
2508rm -f conftest.$ac_objext conftest.$ac_ext
2509ac_ext=c
2510ac_cpp='$CPP $CPPFLAGS'
2511ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2512ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2513ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002514
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002515
2516# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002517
2518ac_ext=c
2519ac_cpp='$CPP $CPPFLAGS'
2520ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2521ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2522ac_compiler_gnu=$ac_cv_c_compiler_gnu
2523echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2524echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002525# On Suns, sometimes $CPP names a directory.
2526if test -n "$CPP" && test -d "$CPP"; then
2527 CPP=
2528fi
2529if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 if test "${ac_cv_prog_CPP+set}" = set; then
2531 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002532else
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 # Double quotes because CPP needs to be expanded
2534 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2535 do
2536 ac_preproc_ok=false
2537for ac_c_preproc_warn_flag in '' yes
2538do
2539 # Use a header file that comes with gcc, so configuring glibc
2540 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002541 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002542 # not just through cpp. "Syntax error" is here to catch this case.
2543 cat >conftest.$ac_ext <<_ACEOF
2544#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002545#include "confdefs.h"
2546#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002547 Syntax error
2548_ACEOF
2549if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2550 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2551 ac_status=$?
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002552 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002553 rm -f conftest.er1
2554 cat conftest.err >&5
2555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2556 (exit $ac_status); } >/dev/null; then
2557 if test -s conftest.err; then
2558 ac_cpp_err=$ac_c_preproc_warn_flag
2559 else
2560 ac_cpp_err=
2561 fi
2562else
2563 ac_cpp_err=yes
2564fi
2565if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002566 :
2567else
Martin v. Löwis11437992002-04-12 09:54:03 +00002568 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002569 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002570 # Broken: fails on valid input.
2571continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002572fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002573rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002574
Martin v. Löwis11437992002-04-12 09:54:03 +00002575 # OK, works on sane cases. Now check whether non-existent headers
2576 # can be detected and how.
2577 cat >conftest.$ac_ext <<_ACEOF
2578#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002579#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002580#include <ac_nonexistent.h>
2581_ACEOF
2582if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2583 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2584 ac_status=$?
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002585 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002586 rm -f conftest.er1
2587 cat conftest.err >&5
2588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2589 (exit $ac_status); } >/dev/null; then
2590 if test -s conftest.err; then
2591 ac_cpp_err=$ac_c_preproc_warn_flag
2592 else
2593 ac_cpp_err=
2594 fi
2595else
2596 ac_cpp_err=yes
2597fi
2598if test -z "$ac_cpp_err"; then
2599 # Broken: success on invalid input.
2600continue
2601else
2602 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002603 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002604 # Passes both tests.
2605ac_preproc_ok=:
2606break
2607fi
2608rm -f conftest.err conftest.$ac_ext
2609
2610done
2611# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2612rm -f conftest.err conftest.$ac_ext
2613if $ac_preproc_ok; then
2614 break
2615fi
2616
2617 done
2618 ac_cv_prog_CPP=$CPP
2619
2620fi
2621 CPP=$ac_cv_prog_CPP
2622else
2623 ac_cv_prog_CPP=$CPP
2624fi
2625echo "$as_me:$LINENO: result: $CPP" >&5
2626echo "${ECHO_T}$CPP" >&6
2627ac_preproc_ok=false
2628for ac_c_preproc_warn_flag in '' yes
2629do
2630 # Use a header file that comes with gcc, so configuring glibc
2631 # with a fresh cross-compiler works.
2632 # On the NeXT, cc -E runs the code through the compiler's parser,
2633 # not just through cpp. "Syntax error" is here to catch this case.
2634 cat >conftest.$ac_ext <<_ACEOF
2635#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002636#include "confdefs.h"
2637#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 Syntax error
2639_ACEOF
2640if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2641 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2642 ac_status=$?
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002643 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002644 rm -f conftest.er1
2645 cat conftest.err >&5
2646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2647 (exit $ac_status); } >/dev/null; then
2648 if test -s conftest.err; then
2649 ac_cpp_err=$ac_c_preproc_warn_flag
2650 else
2651 ac_cpp_err=
2652 fi
2653else
2654 ac_cpp_err=yes
2655fi
2656if test -z "$ac_cpp_err"; then
2657 :
2658else
2659 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002660 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002661 # Broken: fails on valid input.
2662continue
2663fi
2664rm -f conftest.err conftest.$ac_ext
2665
2666 # OK, works on sane cases. Now check whether non-existent headers
2667 # can be detected and how.
2668 cat >conftest.$ac_ext <<_ACEOF
2669#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002670#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002671#include <ac_nonexistent.h>
2672_ACEOF
2673if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2674 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2675 ac_status=$?
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002676 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002677 rm -f conftest.er1
2678 cat conftest.err >&5
2679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2680 (exit $ac_status); } >/dev/null; then
2681 if test -s conftest.err; then
2682 ac_cpp_err=$ac_c_preproc_warn_flag
2683 else
2684 ac_cpp_err=
2685 fi
2686else
2687 ac_cpp_err=yes
2688fi
2689if test -z "$ac_cpp_err"; then
2690 # Broken: success on invalid input.
2691continue
2692else
2693 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002694 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002695 # Passes both tests.
2696ac_preproc_ok=:
2697break
2698fi
2699rm -f conftest.err conftest.$ac_ext
2700
2701done
2702# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2703rm -f conftest.err conftest.$ac_ext
2704if $ac_preproc_ok; then
2705 :
2706else
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002707 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2708echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002709 { (exit 1); exit 1; }; }
2710fi
2711
2712ac_ext=c
2713ac_cpp='$CPP $CPPFLAGS'
2714ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2715ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2716ac_compiler_gnu=$ac_cv_c_compiler_gnu
2717
2718
2719
2720echo "$as_me:$LINENO: checking for AIX" >&5
2721echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2722cat >conftest.$ac_ext <<_ACEOF
2723#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002724#include "confdefs.h"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002725#ifdef _AIX
2726 yes
2727#endif
2728
Martin v. Löwis11437992002-04-12 09:54:03 +00002729_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002730if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002731 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002732 echo "$as_me:$LINENO: result: yes" >&5
2733echo "${ECHO_T}yes" >&6
2734cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002735#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002736_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002737
2738else
Martin v. Löwis11437992002-04-12 09:54:03 +00002739 echo "$as_me:$LINENO: result: no" >&5
2740echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002741fi
2742rm -f conftest*
2743
Michael W. Hudson54241132001-12-07 15:38:26 +00002744
Martin v. Löwis11437992002-04-12 09:54:03 +00002745echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2746echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2747if test "${ac_cv_header_stdc+set}" = set; then
2748 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002749else
Martin v. Löwis11437992002-04-12 09:54:03 +00002750 cat >conftest.$ac_ext <<_ACEOF
2751#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002752#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002753#include <stdlib.h>
2754#include <stdarg.h>
2755#include <string.h>
2756#include <float.h>
2757
2758_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002759if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2760 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002761 ac_status=$?
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002762 egrep -v '^ *\+' conftest.er1 >conftest.err
2763 rm -f conftest.er1
2764 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002766 (exit $ac_status); } >/dev/null; then
2767 if test -s conftest.err; then
2768 ac_cpp_err=$ac_c_preproc_warn_flag
2769 else
2770 ac_cpp_err=
2771 fi
2772else
2773 ac_cpp_err=yes
2774fi
2775if test -z "$ac_cpp_err"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002776 ac_cv_header_stdc=yes
2777else
2778 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002779 cat conftest.$ac_ext >&5
2780 ac_cv_header_stdc=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002781fi
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002782rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002783
2784if test $ac_cv_header_stdc = yes; then
2785 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2786 cat >conftest.$ac_ext <<_ACEOF
2787#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002788#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002789#include <string.h>
2790
2791_ACEOF
2792if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002793 egrep "memchr" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002794 :
2795else
2796 ac_cv_header_stdc=no
2797fi
2798rm -f conftest*
2799
2800fi
2801
2802if test $ac_cv_header_stdc = yes; then
2803 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2804 cat >conftest.$ac_ext <<_ACEOF
2805#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002806#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002807#include <stdlib.h>
2808
2809_ACEOF
2810if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002811 egrep "free" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002812 :
2813else
2814 ac_cv_header_stdc=no
2815fi
2816rm -f conftest*
2817
2818fi
2819
2820if test $ac_cv_header_stdc = yes; then
2821 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2822 if test "$cross_compiling" = yes; then
2823 :
2824else
2825 cat >conftest.$ac_ext <<_ACEOF
2826#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002827#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002828#include <ctype.h>
2829#if ((' ' & 0x0FF) == 0x020)
2830# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2831# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2832#else
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002833# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
Martin v. Löwis11437992002-04-12 09:54:03 +00002834 || ('j' <= (c) && (c) <= 'r') \
2835 || ('s' <= (c) && (c) <= 'z'))
2836# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2837#endif
2838
2839#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2840int
2841main ()
2842{
2843 int i;
2844 for (i = 0; i < 256; i++)
2845 if (XOR (islower (i), ISLOWER (i))
2846 || toupper (i) != TOUPPER (i))
2847 exit(2);
2848 exit (0);
2849}
2850_ACEOF
2851rm -f conftest$ac_exeext
2852if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2853 (eval $ac_link) 2>&5
2854 ac_status=$?
2855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2856 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2857 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2858 (eval $ac_try) 2>&5
2859 ac_status=$?
2860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2861 (exit $ac_status); }; }; then
2862 :
2863else
2864 echo "$as_me: program exited with status $ac_status" >&5
2865echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002866cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002867( exit $ac_status )
2868ac_cv_header_stdc=no
2869fi
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002870rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002871fi
2872fi
2873fi
2874echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2875echo "${ECHO_T}$ac_cv_header_stdc" >&6
2876if test $ac_cv_header_stdc = yes; then
2877
2878cat >>confdefs.h <<\_ACEOF
2879#define STDC_HEADERS 1
2880_ACEOF
2881
2882fi
2883
2884# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2895 inttypes.h stdint.h unistd.h
2896do
2897as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2898echo "$as_me:$LINENO: checking for $ac_header" >&5
2899echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2900if eval "test \"\${$as_ac_Header+set}\" = set"; then
2901 echo $ECHO_N "(cached) $ECHO_C" >&6
2902else
2903 cat >conftest.$ac_ext <<_ACEOF
2904#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002905#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002906$ac_includes_default
2907
2908#include <$ac_header>
2909_ACEOF
2910rm -f conftest.$ac_objext
2911if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2912 (eval $ac_compile) 2>&5
2913 ac_status=$?
2914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2915 (exit $ac_status); } &&
2916 { ac_try='test -s conftest.$ac_objext'
2917 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2918 (eval $ac_try) 2>&5
2919 ac_status=$?
2920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2921 (exit $ac_status); }; }; then
2922 eval "$as_ac_Header=yes"
2923else
2924 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002925cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002926eval "$as_ac_Header=no"
2927fi
2928rm -f conftest.$ac_objext conftest.$ac_ext
2929fi
2930echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2931echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2932if test `eval echo '${'$as_ac_Header'}'` = yes; then
2933 cat >>confdefs.h <<_ACEOF
2934#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2935_ACEOF
2936
2937fi
2938
2939done
2940
2941
2942if test "${ac_cv_header_minix_config_h+set}" = set; then
2943 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2944echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2945if test "${ac_cv_header_minix_config_h+set}" = set; then
2946 echo $ECHO_N "(cached) $ECHO_C" >&6
2947fi
2948echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2949echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2950else
2951 # Is the header compilable?
2952echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2953echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2954cat >conftest.$ac_ext <<_ACEOF
2955#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002956#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002957$ac_includes_default
2958#include <minix/config.h>
2959_ACEOF
2960rm -f conftest.$ac_objext
2961if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2962 (eval $ac_compile) 2>&5
2963 ac_status=$?
2964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2965 (exit $ac_status); } &&
2966 { ac_try='test -s conftest.$ac_objext'
2967 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2968 (eval $ac_try) 2>&5
2969 ac_status=$?
2970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2971 (exit $ac_status); }; }; then
2972 ac_header_compiler=yes
2973else
2974 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002975cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002976ac_header_compiler=no
2977fi
2978rm -f conftest.$ac_objext conftest.$ac_ext
2979echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2980echo "${ECHO_T}$ac_header_compiler" >&6
2981
2982# Is the header present?
2983echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2984echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2985cat >conftest.$ac_ext <<_ACEOF
2986#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002987#include "confdefs.h"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002988#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002989_ACEOF
2990if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2991 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2992 ac_status=$?
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00002993 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002994 rm -f conftest.er1
2995 cat conftest.err >&5
2996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2997 (exit $ac_status); } >/dev/null; then
2998 if test -s conftest.err; then
2999 ac_cpp_err=$ac_c_preproc_warn_flag
3000 else
3001 ac_cpp_err=
3002 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003003else
Martin v. Löwis11437992002-04-12 09:54:03 +00003004 ac_cpp_err=yes
3005fi
3006if test -z "$ac_cpp_err"; then
3007 ac_header_preproc=yes
3008else
3009 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00003010 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003011 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003012fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003013rm -f conftest.err conftest.$ac_ext
3014echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3015echo "${ECHO_T}$ac_header_preproc" >&6
3016
3017# So? What about this header?
3018case $ac_header_compiler:$ac_header_preproc in
3019 yes:no )
3020 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
3021echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3022 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00003023echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwis11437992002-04-12 09:54:03 +00003024 no:yes )
3025 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
3026echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
3027 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
3028echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
3029 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00003030echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwis11437992002-04-12 09:54:03 +00003031esac
3032echo "$as_me:$LINENO: checking for minix/config.h" >&5
3033echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3034if test "${ac_cv_header_minix_config_h+set}" = set; then
3035 echo $ECHO_N "(cached) $ECHO_C" >&6
3036else
3037 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003038fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003039echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3040echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3041
3042fi
3043if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003044 MINIX=yes
3045else
Martin v. Löwis11437992002-04-12 09:54:03 +00003046 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003047fi
3048
Martin v. Löwis11437992002-04-12 09:54:03 +00003049
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003050if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003051
3052cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003053#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003054_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003055
Martin v. Löwis11437992002-04-12 09:54:03 +00003056
3057cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003058#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00003059_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003060
Martin v. Löwis11437992002-04-12 09:54:03 +00003061
3062cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003063#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003064_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003065
3066fi
3067
3068
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003069# Check for unsupported systems
3070case $ac_sys_system/$ac_sys_release in
3071SunOS/4*|DYNIX/*|dgux*/*|IRIX/4*|Linux*/1*)
3072 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3073 echo See README for details.
3074 exit 1;;
3075esac
3076
3077if test "$MINIX" = yes; then
3078 echo This system \(MINIX\) is no longer supported.
3079 echo Read README for details.
3080 exit 1
3081fi
3082
Michael W. Hudson54241132001-12-07 15:38:26 +00003083
Martin v. Löwis11437992002-04-12 09:54:03 +00003084echo "$as_me:$LINENO: checking for --with-suffix" >&5
3085echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003086
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003087# Check whether --with-suffix or --without-suffix was given.
3088if test "${with_suffix+set}" = set; then
3089 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003090
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003091 case $withval in
3092 no) EXEEXT=;;
3093 yes) EXEEXT=.exe;;
3094 *) EXEEXT=$withval;;
3095 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003096fi;
3097echo "$as_me:$LINENO: result: $EXEEXT" >&5
3098echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003099
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003100# Test whether we're running on a non-case-sensitive system, in which
3101# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003102
Martin v. Löwis11437992002-04-12 09:54:03 +00003103echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3104echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003105if test ! -d CaseSensitiveTestDir; then
3106mkdir CaseSensitiveTestDir
3107fi
3108
3109if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003110then
Martin v. Löwis11437992002-04-12 09:54:03 +00003111 echo "$as_me:$LINENO: result: yes" >&5
3112echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003113 BUILDEXEEXT=.exe
3114else
Martin v. Löwis11437992002-04-12 09:54:03 +00003115 echo "$as_me:$LINENO: result: no" >&5
3116echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003117 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003118fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003119rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003120
Guido van Rossumdd997f71998-10-07 19:58:26 +00003121case $MACHDEP in
3122bsdos*)
3123 case $CC in
3124 gcc) CC="$CC -D_HAVE_BSDI";;
3125 esac;;
3126esac
3127
Guido van Rossum24b1e751997-08-21 02:29:16 +00003128case $ac_sys_system in
3129hp*|HP*)
3130 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003131 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003132 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003133Monterey*)
3134 case $CC in
3135 cc) CC="$CC -Wl,-Bexport";;
3136 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003137SunOS*)
3138 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003139
3140cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003141#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003142_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003143
3144 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003145esac
3146
Michael W. Hudson54241132001-12-07 15:38:26 +00003147
3148
Martin v. Löwis11437992002-04-12 09:54:03 +00003149echo "$as_me:$LINENO: checking LIBRARY" >&5
3150echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003151if test -z "$LIBRARY"
3152then
3153 LIBRARY='libpython$(VERSION).a'
3154fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003155echo "$as_me:$LINENO: result: $LIBRARY" >&5
3156echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003157
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003158# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003159# name of the library into which to insert object files). BLDLIBRARY is also
3160# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3161# is blank as the main program is not linked directly against LDLIBRARY.
3162# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3163# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3164# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3165# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003166#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003167# RUNSHARED is used to run shared python without installed libraries
3168#
3169# INSTSONAME is the name of the shared library that will be use to install
3170# on the system - some systems like version suffix, others don't
3171
3172
Michael W. Hudson54241132001-12-07 15:38:26 +00003173
3174
3175
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003176
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003177LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003178BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003179INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003180DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003181LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003182RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003183
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003184# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003185# If CXX is set, and if it is needed to link a main function that was
3186# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3187# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003188# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003189# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003190
Martin v. Löwis11437992002-04-12 09:54:03 +00003191echo "$as_me:$LINENO: checking LINKCC" >&5
3192echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003193if test -z "$LINKCC"
3194then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003195 if test -z "$CXX"; then
3196 LINKCC="\$(PURIFY) \$(CC)"
3197 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003198 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003199 $CXX -c conftest.$ac_ext 2>&5
3200 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3201 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3202 then
3203 LINKCC="\$(PURIFY) \$(CC)"
3204 else
3205 LINKCC="\$(PURIFY) \$(CXX)"
3206 fi
3207 rm -fr conftest*
3208 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003209 case $ac_sys_system in
3210 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003211 exp_extra="\"\""
3212 if test $ac_sys_release -ge 5 -o \
3213 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3214 exp_extra="."
3215 fi
3216 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003217 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003218 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003219 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003220 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003221 esac
3222fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003223echo "$as_me:$LINENO: result: $LINKCC" >&5
3224echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003225
Martin v. Löwis11437992002-04-12 09:54:03 +00003226echo "$as_me:$LINENO: checking for --enable-shared" >&5
3227echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003228# Check whether --enable-shared or --disable-shared was given.
3229if test "${enable_shared+set}" = set; then
3230 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003231
Martin v. Löwis11437992002-04-12 09:54:03 +00003232fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003233
3234if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003235then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003236 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003237 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003238 enable_shared="yes";;
3239 *)
3240 enable_shared="no";;
3241 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003242fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003243echo "$as_me:$LINENO: result: $enable_shared" >&5
3244echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003245
3246
Martin v. Löwis11437992002-04-12 09:54:03 +00003247echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3248echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003249
Guido van Rossumb8552162001-09-05 14:58:11 +00003250# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3251# library that we build, but we do not want to link against it (we
3252# will find it with a -framework option). For this reason there is an
3253# extra variable BLDLIBRARY against which Python and the extension
3254# modules are linked, BLDLIBRARY. This is normally the same as
3255# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003256if test "$enable_framework"
3257then
3258 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003259 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003260 BLDLIBRARY=''
3261else
3262 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003263fi
Jack Jansene578a632001-08-15 01:27:14 +00003264
Martin v. Löwis1142de32002-03-29 16:28:31 +00003265# Other platforms follow
3266if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003267
3268cat >>confdefs.h <<\_ACEOF
3269#define Py_ENABLE_SHARED 1
3270_ACEOF
3271
Martin v. Löwis1142de32002-03-29 16:28:31 +00003272 case $ac_sys_system in
3273 BeOS*)
3274 LDLIBRARY='libpython$(VERSION).so'
3275 ;;
3276 CYGWIN*)
3277 LDLIBRARY='libpython$(VERSION).dll.a'
3278 DLLLIBRARY='libpython$(VERSION).dll'
3279 ;;
3280 SunOS*)
3281 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00003282 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003283 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003284 ;;
Martin v. Löwis96ce8052003-05-31 07:58:45 +00003285 Linux*|GNU*|NetBSD*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003286 LDLIBRARY='libpython$(VERSION).so'
3287 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003288 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003289 INSTSONAME="$LDLIBRARY".$SOVERSION
3290 ;;
3291 hp*|HP*)
3292 LDLIBRARY='libpython$(VERSION).sl'
3293 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003294 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003295 ;;
3296 OSF*)
3297 LDLIBRARY='libpython$(VERSION).so'
3298 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003299 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003300 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003301 atheos*)
3302 LDLIBRARY='libpython$(VERSION).so'
3303 BLDLIBRARY='-L. -lpython$(VERSION)'
3304 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3305 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003306 esac
3307 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3308 case $MACHDEP in
3309 dguxR4)
3310 LDLIBRARY='libpython$(VERSION).so'
Skip Montanarodecc6a42003-01-01 20:07:49 +00003311 BASECFLAGS="$BASECFLAGS -pic"
Martin v. Löwis1142de32002-03-29 16:28:31 +00003312 ;;
3313 esac
Jason Tishler30765592003-09-04 11:04:06 +00003314else # shared is disabled
3315 case $ac_sys_system in
3316 CYGWIN*)
3317 BLDLIBRARY='$(LIBRARY)'
3318 LDLIBRARY='libpython$(VERSION).dll.a'
3319 ;;
3320 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003321fi
3322
Martin v. Löwis11437992002-04-12 09:54:03 +00003323echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3324echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003325
Martin v. Löwis11437992002-04-12 09:54:03 +00003326if test -n "$ac_tool_prefix"; then
3327 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3328set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3329echo "$as_me:$LINENO: checking for $ac_word" >&5
3330echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3331if test "${ac_cv_prog_RANLIB+set}" = set; then
3332 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003333else
3334 if test -n "$RANLIB"; then
3335 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3336else
Martin v. Löwis11437992002-04-12 09:54:03 +00003337as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3338for as_dir in $PATH
3339do
3340 IFS=$as_save_IFS
3341 test -z "$as_dir" && as_dir=.
3342 for ac_exec_ext in '' $ac_executable_extensions; do
3343 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3344 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3345 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3346 break 2
3347 fi
3348done
3349done
3350
Guido van Rossum627b2d71993-12-24 10:39:16 +00003351fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003352fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003353RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003354if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003355 echo "$as_me:$LINENO: result: $RANLIB" >&5
3356echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003357else
Martin v. Löwis11437992002-04-12 09:54:03 +00003358 echo "$as_me:$LINENO: result: no" >&5
3359echo "${ECHO_T}no" >&6
3360fi
3361
3362fi
3363if test -z "$ac_cv_prog_RANLIB"; then
3364 ac_ct_RANLIB=$RANLIB
3365 # Extract the first word of "ranlib", so it can be a program name with args.
3366set dummy ranlib; ac_word=$2
3367echo "$as_me:$LINENO: checking for $ac_word" >&5
3368echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3369if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3370 echo $ECHO_N "(cached) $ECHO_C" >&6
3371else
3372 if test -n "$ac_ct_RANLIB"; then
3373 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3374else
3375as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3376for as_dir in $PATH
3377do
3378 IFS=$as_save_IFS
3379 test -z "$as_dir" && as_dir=.
3380 for ac_exec_ext in '' $ac_executable_extensions; do
3381 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3382 ac_cv_prog_ac_ct_RANLIB="ranlib"
3383 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3384 break 2
3385 fi
3386done
3387done
3388
3389 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3390fi
3391fi
3392ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3393if test -n "$ac_ct_RANLIB"; then
3394 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3395echo "${ECHO_T}$ac_ct_RANLIB" >&6
3396else
3397 echo "$as_me:$LINENO: result: no" >&5
3398echo "${ECHO_T}no" >&6
3399fi
3400
3401 RANLIB=$ac_ct_RANLIB
3402else
3403 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003404fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003405
3406
Guido van Rossum7f43da71994-08-01 12:15:30 +00003407for ac_prog in ar aal
3408do
Martin v. Löwis11437992002-04-12 09:54:03 +00003409 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003410set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003411echo "$as_me:$LINENO: checking for $ac_word" >&5
3412echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3413if test "${ac_cv_prog_AR+set}" = set; then
3414 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003415else
3416 if test -n "$AR"; then
3417 ac_cv_prog_AR="$AR" # Let the user override the test.
3418else
Martin v. Löwis11437992002-04-12 09:54:03 +00003419as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3420for as_dir in $PATH
3421do
3422 IFS=$as_save_IFS
3423 test -z "$as_dir" && as_dir=.
3424 for ac_exec_ext in '' $ac_executable_extensions; do
3425 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3426 ac_cv_prog_AR="$ac_prog"
3427 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3428 break 2
3429 fi
3430done
3431done
3432
Guido van Rossum7f43da71994-08-01 12:15:30 +00003433fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003434fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003435AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003436if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003437 echo "$as_me:$LINENO: result: $AR" >&5
3438echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003439else
Martin v. Löwis11437992002-04-12 09:54:03 +00003440 echo "$as_me:$LINENO: result: no" >&5
3441echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003442fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003443
Martin v. Löwis11437992002-04-12 09:54:03 +00003444 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003445done
3446test -n "$AR" || AR="ar"
3447
Michael W. Hudson54241132001-12-07 15:38:26 +00003448
Neil Schemenauera42c8272001-03-31 00:01:55 +00003449case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003450bsdos*|hp*|HP*)
3451 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003452 if test -z "$INSTALL"
3453 then
3454 INSTALL="${srcdir}/install-sh -c"
3455 fi
3456esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003457ac_aux_dir=
3458for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3459 if test -f $ac_dir/install-sh; then
3460 ac_aux_dir=$ac_dir
3461 ac_install_sh="$ac_aux_dir/install-sh -c"
3462 break
3463 elif test -f $ac_dir/install.sh; then
3464 ac_aux_dir=$ac_dir
3465 ac_install_sh="$ac_aux_dir/install.sh -c"
3466 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003467 elif test -f $ac_dir/shtool; then
3468 ac_aux_dir=$ac_dir
3469 ac_install_sh="$ac_aux_dir/shtool install -c"
3470 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003471 fi
3472done
3473if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003474 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3475echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3476 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003477fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003478ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3479ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3480ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003481
3482# Find a good install program. We prefer a C program (faster),
3483# so one script is as good as another. But avoid the broken or
3484# incompatible versions:
3485# SysV /etc/install, /usr/sbin/install
3486# SunOS /usr/etc/install
3487# IRIX /sbin/install
3488# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003489# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003490# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3491# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3492# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3493# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003494echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3495echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003496if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003497if test "${ac_cv_path_install+set}" = set; then
3498 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003499else
Martin v. Löwis11437992002-04-12 09:54:03 +00003500 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3501for as_dir in $PATH
3502do
3503 IFS=$as_save_IFS
3504 test -z "$as_dir" && as_dir=.
3505 # Account for people who put trailing slashes in PATH elements.
3506case $as_dir/ in
3507 ./ | .// | /cC/* | \
3508 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3509 /usr/ucb/* ) ;;
3510 *)
3511 # OSF1 and SCO ODT 3.0 have their own names for install.
3512 # Don't use installbsd from OSF since it installs stuff as root
3513 # by default.
3514 for ac_prog in ginstall scoinst install; do
3515 for ac_exec_ext in '' $ac_executable_extensions; do
3516 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3517 if test $ac_prog = install &&
3518 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3519 # AIX install. It has an incompatible calling convention.
3520 :
3521 elif test $ac_prog = install &&
3522 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3523 # program-specific install script used by HP pwplus--don't use.
3524 :
3525 else
3526 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3527 break 3
3528 fi
3529 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003530 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003531 done
3532 ;;
3533esac
3534done
3535
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003536
3537fi
3538 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003539 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003540 else
3541 # As a last resort, use the slow shell script. We don't cache a
3542 # path for INSTALL within a source directory, because that will
3543 # break other packages using the cache if that directory is
3544 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003545 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003546 fi
3547fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003548echo "$as_me:$LINENO: result: $INSTALL" >&5
3549echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003550
3551# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3552# It thinks the first close brace ends the variable substitution.
3553test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3554
Martin v. Löwis11437992002-04-12 09:54:03 +00003555test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003556
3557test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3558
Michael W. Hudson54241132001-12-07 15:38:26 +00003559
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003560# Not every filesystem supports hard links
3561
3562if test -z "$LN" ; then
3563 case $ac_sys_system in
3564 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003565 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003566 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003567 *) LN=ln;;
3568 esac
3569fi
3570
Fred Drake109d9862001-07-11 06:27:56 +00003571# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003572echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3573echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3574
Fred Drake109d9862001-07-11 06:27:56 +00003575# Check whether --with-pydebug or --without-pydebug was given.
3576if test "${with_pydebug+set}" = set; then
3577 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003578
Fred Drake109d9862001-07-11 06:27:56 +00003579if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003580then
3581
3582cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003583#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003584_ACEOF
3585
3586 echo "$as_me:$LINENO: result: yes" >&5
3587echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003588 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003589else echo "$as_me:$LINENO: result: no" >&5
3590echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003591fi
3592else
Martin v. Löwis11437992002-04-12 09:54:03 +00003593 echo "$as_me:$LINENO: result: no" >&5
3594echo "${ECHO_T}no" >&6
3595fi;
Fred Drake109d9862001-07-11 06:27:56 +00003596
Skip Montanarodecc6a42003-01-01 20:07:49 +00003597# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3598# merged with this chunk of code?
3599
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003600# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003601# ------------------------
3602# (The following bit of code is complicated enough - please keep things
3603# indented properly. Just pretend you're editing Python code. ;-)
3604
3605# There are two parallel sets of case statements below, one that checks to
3606# see if OPT was set and one that does BASECFLAGS setting based upon
3607# compiler and platform. BASECFLAGS tweaks need to be made even if the
3608# user set OPT.
3609
3610# tweak OPT based on compiler and platform, only if the user didn't set
3611# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003612
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003613if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003614then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003615 case $GCC in
3616 yes)
3617 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003618 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003619 if test "$Py_DEBUG" = 'true' ; then
3620 # Optimization messes up debuggers, so turn it off for
3621 # debug builds.
3622 OPT="-g -Wall -Wstrict-prototypes"
3623 else
3624 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003625 fi
3626 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003627 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003628 OPT="-O3 -Wall -Wstrict-prototypes"
3629 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003630 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003631 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003632 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3633 ;;
3634 esac
Fred Drake109d9862001-07-11 06:27:56 +00003635 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003636
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003637 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003638 OPT="-O"
3639 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003640 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003641
3642 # The current (beta) Monterey compiler dies with optimizations
3643 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003644 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003645 Monterey*)
3646 OPT=""
3647 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003648 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003649
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003650fi
3651
Skip Montanarodecc6a42003-01-01 20:07:49 +00003652
3653# tweak BASECFLAGS based on compiler and platform
3654case $GCC in
3655yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003656 # Python violates C99 rules, by casting between incompatible
3657 # pointer types. GCC may generate bad code as a result of that,
3658 # so use -fno-strict-aliasing if supported.
3659 echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
3660echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6
3661 ac_save_cc="$CC"
3662 CC="$CC -fno-strict-aliasing"
3663 if test "$cross_compiling" = yes; then
3664 ac_cv_no_strict_aliasing_ok=no
3665else
3666 cat >conftest.$ac_ext <<_ACEOF
3667#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00003668#include "confdefs.h"
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003669int main() { return 0; }
3670_ACEOF
3671rm -f conftest$ac_exeext
3672if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3673 (eval $ac_link) 2>&5
3674 ac_status=$?
3675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3676 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3677 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3678 (eval $ac_try) 2>&5
3679 ac_status=$?
3680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3681 (exit $ac_status); }; }; then
3682 ac_cv_no_strict_aliasing_ok=yes
3683else
3684 echo "$as_me: program exited with status $ac_status" >&5
3685echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00003686cat conftest.$ac_ext >&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003687( exit $ac_status )
3688ac_cv_no_strict_aliasing_ok=no
3689fi
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00003690rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003691fi
3692 CC="$ac_save_cc"
3693 echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
3694echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6
3695 if test $ac_cv_no_strict_aliasing_ok = yes
3696 then
3697 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
3698 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00003699 case $ac_sys_system in
3700 SCO_SV*)
3701 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3702 ;;
3703 # is there any other compiler on Darwin besides gcc?
3704 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00003705 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003706 ;;
3707 esac
3708 ;;
3709
3710*)
3711 case $ac_sys_system in
3712 OpenUNIX*|UnixWare*)
3713 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3714 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00003715 OSF*)
3716 BASECFLAGS="$BASECFLAGS -ieee -std"
3717 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003718 SCO_SV*)
3719 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3720 ;;
3721 esac
3722 ;;
3723esac
3724
Fred Drakee1ceaa02001-12-04 20:55:47 +00003725if test "$Py_DEBUG" = 'true'; then
3726 :
3727else
3728 OPT="-DNDEBUG $OPT"
3729fi
3730
Guido van Rossum563e7081996-09-10 18:20:48 +00003731if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003732then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003733 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003734fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003735
Martin v. Löwis11437992002-04-12 09:54:03 +00003736echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3737echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3738if test "${ac_cv_opt_olimit_ok+set}" = set; then
3739 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003740else
3741 ac_save_cc="$CC"
3742CC="$CC -OPT:Olimit=0"
3743if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003744 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003745else
Martin v. Löwis11437992002-04-12 09:54:03 +00003746 cat >conftest.$ac_ext <<_ACEOF
3747#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00003748#include "confdefs.h"
Guido van Rossum91922671997-10-09 20:24:13 +00003749int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003750_ACEOF
3751rm -f conftest$ac_exeext
3752if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3753 (eval $ac_link) 2>&5
3754 ac_status=$?
3755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3756 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3758 (eval $ac_try) 2>&5
3759 ac_status=$?
3760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3761 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003762 ac_cv_opt_olimit_ok=yes
3763else
Martin v. Löwis11437992002-04-12 09:54:03 +00003764 echo "$as_me: program exited with status $ac_status" >&5
3765echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00003766cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003767( exit $ac_status )
3768ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003769fi
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00003770rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003771fi
Guido van Rossum91922671997-10-09 20:24:13 +00003772CC="$ac_save_cc"
3773fi
3774
Martin v. Löwis11437992002-04-12 09:54:03 +00003775echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3776echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003777if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003778 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003779 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3780 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3781 # environment?
3782 Darwin*)
3783 ;;
3784 *)
3785 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3786 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003787 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003788else
Martin v. Löwis11437992002-04-12 09:54:03 +00003789 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3790echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3791 if test "${ac_cv_olimit_ok+set}" = set; then
3792 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003793else
3794 ac_save_cc="$CC"
3795 CC="$CC -Olimit 1500"
3796 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003797 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003798else
Martin v. Löwis11437992002-04-12 09:54:03 +00003799 cat >conftest.$ac_ext <<_ACEOF
3800#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00003801#include "confdefs.h"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003802int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003803_ACEOF
3804rm -f conftest$ac_exeext
3805if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3806 (eval $ac_link) 2>&5
3807 ac_status=$?
3808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3809 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3810 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3811 (eval $ac_try) 2>&5
3812 ac_status=$?
3813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3814 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003815 ac_cv_olimit_ok=yes
3816else
Martin v. Löwis11437992002-04-12 09:54:03 +00003817 echo "$as_me: program exited with status $ac_status" >&5
3818echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00003819cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003820( exit $ac_status )
3821ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003822fi
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00003823rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003824fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003825 CC="$ac_save_cc"
3826fi
3827
Martin v. Löwis11437992002-04-12 09:54:03 +00003828 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3829echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003830 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003831 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003832 fi
3833fi
3834
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003835# On some compilers, pthreads are available without further options
3836# (e.g. MacOS X). On some of these systems, the compiler will not
3837# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3838# So we have to see first whether pthreads are available without
3839# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003840echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3841echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3842if test "${ac_cv_pthread_is_default+set}" = set; then
3843 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003844else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003845 if test "$cross_compiling" = yes; then
3846 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003847else
Martin v. Löwis11437992002-04-12 09:54:03 +00003848 cat >conftest.$ac_ext <<_ACEOF
3849#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00003850#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003851
Martin v. Löwis130fb172001-07-19 11:00:41 +00003852#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003853
3854void* routine(void* p){return NULL;}
3855
3856int main(){
3857 pthread_t p;
3858 if(pthread_create(&p,NULL,routine,NULL)!=0)
3859 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003860 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003861 return 0;
3862}
3863
Martin v. Löwis11437992002-04-12 09:54:03 +00003864_ACEOF
3865rm -f conftest$ac_exeext
3866if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3867 (eval $ac_link) 2>&5
3868 ac_status=$?
3869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3870 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3872 (eval $ac_try) 2>&5
3873 ac_status=$?
3874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3875 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00003876
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003877 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00003878 ac_cv_kthread=no
3879 ac_cv_pthread=no
3880
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003881else
Martin v. Löwis11437992002-04-12 09:54:03 +00003882 echo "$as_me: program exited with status $ac_status" >&5
3883echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00003884cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003885( exit $ac_status )
3886ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003887fi
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00003888rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003889fi
3890
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003891fi
3892
Martin v. Löwis11437992002-04-12 09:54:03 +00003893echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3894echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003895
Michael W. Hudson54241132001-12-07 15:38:26 +00003896
Martin v. Löwis11437992002-04-12 09:54:03 +00003897if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003898then
3899 ac_cv_kpthread=no
3900else
3901# -Kpthread, if available, provides the right #defines
3902# and linker options to make pthread_create available
3903# Some compilers won't report that they do not support -Kpthread,
3904# so we need to run a program to see whether it really made the
3905# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003906echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3907echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3908if test "${ac_cv_kpthread+set}" = set; then
3909 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003910else
3911 ac_save_cc="$CC"
3912CC="$CC -Kpthread"
3913if test "$cross_compiling" = yes; then
3914 ac_cv_kpthread=no
3915else
Martin v. Löwis11437992002-04-12 09:54:03 +00003916 cat >conftest.$ac_ext <<_ACEOF
3917#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00003918#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003919
3920#include <pthread.h>
3921
3922void* routine(void* p){return NULL;}
3923
3924int main(){
3925 pthread_t p;
3926 if(pthread_create(&p,NULL,routine,NULL)!=0)
3927 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003928 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003929 return 0;
3930}
3931
Martin v. Löwis11437992002-04-12 09:54:03 +00003932_ACEOF
3933rm -f conftest$ac_exeext
3934if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3935 (eval $ac_link) 2>&5
3936 ac_status=$?
3937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3938 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3939 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3940 (eval $ac_try) 2>&5
3941 ac_status=$?
3942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3943 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003944 ac_cv_kpthread=yes
3945else
Martin v. Löwis11437992002-04-12 09:54:03 +00003946 echo "$as_me: program exited with status $ac_status" >&5
3947echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00003948cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003949( exit $ac_status )
3950ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003951fi
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00003952rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003953fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003954CC="$ac_save_cc"
3955fi
3956
Martin v. Löwis11437992002-04-12 09:54:03 +00003957echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3958echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003959fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003960
Skip Montanarod8d39a02003-07-10 20:44:10 +00003961if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003962then
3963# -Kthread, if available, provides the right #defines
3964# and linker options to make pthread_create available
3965# Some compilers won't report that they do not support -Kthread,
3966# so we need to run a program to see whether it really made the
3967# function available.
3968echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
3969echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
3970if test "${ac_cv_kthread+set}" = set; then
3971 echo $ECHO_N "(cached) $ECHO_C" >&6
3972else
3973 ac_save_cc="$CC"
3974CC="$CC -Kthread"
3975if test "$cross_compiling" = yes; then
3976 ac_cv_kthread=no
3977else
3978 cat >conftest.$ac_ext <<_ACEOF
3979#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00003980#include "confdefs.h"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003981
3982#include <pthread.h>
3983
3984void* routine(void* p){return NULL;}
3985
3986int main(){
3987 pthread_t p;
3988 if(pthread_create(&p,NULL,routine,NULL)!=0)
3989 return 1;
3990 (void)pthread_detach(p);
3991 return 0;
3992}
3993
3994_ACEOF
3995rm -f conftest$ac_exeext
3996if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3997 (eval $ac_link) 2>&5
3998 ac_status=$?
3999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4000 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4001 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4002 (eval $ac_try) 2>&5
4003 ac_status=$?
4004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4005 (exit $ac_status); }; }; then
4006 ac_cv_kthread=yes
4007else
4008 echo "$as_me: program exited with status $ac_status" >&5
4009echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004010cat conftest.$ac_ext >&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004011( exit $ac_status )
4012ac_cv_kthread=no
4013fi
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004014rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004015fi
4016CC="$ac_save_cc"
4017fi
4018
4019echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
4020echo "${ECHO_T}$ac_cv_kthread" >&6
4021fi
4022
Skip Montanarod8d39a02003-07-10 20:44:10 +00004023if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004024then
4025# -pthread, if available, provides the right #defines
4026# and linker options to make pthread_create available
4027# Some compilers won't report that they do not support -pthread,
4028# so we need to run a program to see whether it really made the
4029# function available.
4030echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
4031echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
4032if test "${ac_cv_thread+set}" = set; then
4033 echo $ECHO_N "(cached) $ECHO_C" >&6
4034else
4035 ac_save_cc="$CC"
4036CC="$CC -pthread"
4037if test "$cross_compiling" = yes; then
4038 ac_cv_pthread=no
4039else
4040 cat >conftest.$ac_ext <<_ACEOF
4041#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004042#include "confdefs.h"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004043
4044#include <pthread.h>
4045
4046void* routine(void* p){return NULL;}
4047
4048int main(){
4049 pthread_t p;
4050 if(pthread_create(&p,NULL,routine,NULL)!=0)
4051 return 1;
4052 (void)pthread_detach(p);
4053 return 0;
4054}
4055
4056_ACEOF
4057rm -f conftest$ac_exeext
4058if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4059 (eval $ac_link) 2>&5
4060 ac_status=$?
4061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4062 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4063 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4064 (eval $ac_try) 2>&5
4065 ac_status=$?
4066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4067 (exit $ac_status); }; }; then
4068 ac_cv_pthread=yes
4069else
4070 echo "$as_me: program exited with status $ac_status" >&5
4071echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004072cat conftest.$ac_ext >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004073( exit $ac_status )
4074ac_cv_pthread=no
4075fi
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004076rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004077fi
4078CC="$ac_save_cc"
4079fi
4080
4081echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4082echo "${ECHO_T}$ac_cv_pthread" >&6
4083fi
4084
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004085# If we have set a CC compiler flag for thread support then
4086# check if it works for CXX, too.
4087ac_cv_cxx_thread=no
4088if test ! -z "$CXX"
4089then
4090echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
4091echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6
4092ac_save_cxx="$CXX"
4093
4094if test "$ac_cv_kpthread" = "yes"
4095then
4096 CXX="$CXX -Kpthread"
4097 ac_cv_cxx_thread=yes
4098elif test "$ac_cv_kthread" = "yes"
4099then
4100 CXX="$CXX -Kthread"
4101 ac_cv_cxx_thread=yes
4102elif test "$ac_cv_pthread" = "yes"
4103then
4104 CXX="$CXX -pthread"
4105 ac_cv_cxx_thread=yes
4106fi
4107
4108if test $ac_cv_cxx_thread = yes
4109then
4110 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
4111 $CXX -c conftest.$ac_ext 2>&5
4112 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
4113 && test -s conftest$ac_exeext && ./conftest$ac_exeext
4114 then
4115 ac_cv_cxx_thread=yes
4116 else
4117 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004118 fi
4119 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004120fi
4121fi
Martin v. Löwis519adae2003-09-20 10:47:47 +00004122CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004123echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
4124echo "${ECHO_T}$ac_cv_cxx_thread" >&6
4125
Michael W. Hudson54241132001-12-07 15:38:26 +00004126
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004127# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00004128echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4129echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4130if test "${ac_cv_header_stdc+set}" = set; then
4131 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004132else
Martin v. Löwis11437992002-04-12 09:54:03 +00004133 cat >conftest.$ac_ext <<_ACEOF
4134#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004135#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004136#include <stdlib.h>
4137#include <stdarg.h>
4138#include <string.h>
4139#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004140
4141_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004142if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4143 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004144 ac_status=$?
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004145 egrep -v '^ *\+' conftest.er1 >conftest.err
4146 rm -f conftest.er1
4147 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004149 (exit $ac_status); } >/dev/null; then
4150 if test -s conftest.err; then
4151 ac_cpp_err=$ac_c_preproc_warn_flag
4152 else
4153 ac_cpp_err=
4154 fi
4155else
4156 ac_cpp_err=yes
4157fi
4158if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004159 ac_cv_header_stdc=yes
4160else
Martin v. Löwis11437992002-04-12 09:54:03 +00004161 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004162 cat conftest.$ac_ext >&5
4163 ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004164fi
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004165rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004166
4167if test $ac_cv_header_stdc = yes; then
4168 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004169 cat >conftest.$ac_ext <<_ACEOF
4170#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004171#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004172#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004173
4174_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004175if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004176 egrep "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004177 :
4178else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004179 ac_cv_header_stdc=no
4180fi
4181rm -f conftest*
4182
4183fi
4184
4185if test $ac_cv_header_stdc = yes; then
4186 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004187 cat >conftest.$ac_ext <<_ACEOF
4188#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004189#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004190#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004191
4192_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004193if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004194 egrep "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004195 :
4196else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004197 ac_cv_header_stdc=no
4198fi
4199rm -f conftest*
4200
4201fi
4202
4203if test $ac_cv_header_stdc = yes; then
4204 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004205 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004206 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004207else
Martin v. Löwis11437992002-04-12 09:54:03 +00004208 cat >conftest.$ac_ext <<_ACEOF
4209#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004210#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004211#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004212#if ((' ' & 0x0FF) == 0x020)
4213# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4214# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4215#else
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004216# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
Martin v. Löwis11437992002-04-12 09:54:03 +00004217 || ('j' <= (c) && (c) <= 'r') \
4218 || ('s' <= (c) && (c) <= 'z'))
4219# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4220#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004221
Martin v. Löwis11437992002-04-12 09:54:03 +00004222#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4223int
4224main ()
4225{
4226 int i;
4227 for (i = 0; i < 256; i++)
4228 if (XOR (islower (i), ISLOWER (i))
4229 || toupper (i) != TOUPPER (i))
4230 exit(2);
4231 exit (0);
4232}
4233_ACEOF
4234rm -f conftest$ac_exeext
4235if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4236 (eval $ac_link) 2>&5
4237 ac_status=$?
4238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4239 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4241 (eval $ac_try) 2>&5
4242 ac_status=$?
4243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4244 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004245 :
4246else
Martin v. Löwis11437992002-04-12 09:54:03 +00004247 echo "$as_me: program exited with status $ac_status" >&5
4248echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004249cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004250( exit $ac_status )
4251ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004252fi
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004253rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004254fi
4255fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004256fi
4257echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4258echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004259if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004260
4261cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004262#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004263_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004264
4265fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004266
Martin v. Löwis11437992002-04-12 09:54:03 +00004267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004304
Barry Warsawfe33b792003-01-07 22:42:49 +00004305
Neal Norwitz82251032003-05-23 14:35:24 +00004306
Martin v. Löwis11437992002-04-12 09:54:03 +00004307for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004308libintl.h locale.h ncurses.h poll.h pthread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004309signal.h stdarg.h stddef.h stdlib.h stropts.h termios.h thread.h \
4310unistd.h utime.h \
Neal Norwitz82251032003-05-23 14:35:24 +00004311sys/audioio.h sys/bsdtty.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004312sys/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 +00004313sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Barry Warsawfe33b792003-01-07 22:42:49 +00004314sys/resource.h netpacket/packet.h sysexits.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004315do
Martin v. Löwis11437992002-04-12 09:54:03 +00004316as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4317if eval "test \"\${$as_ac_Header+set}\" = set"; then
4318 echo "$as_me:$LINENO: checking for $ac_header" >&5
4319echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4320if eval "test \"\${$as_ac_Header+set}\" = set"; then
4321 echo $ECHO_N "(cached) $ECHO_C" >&6
4322fi
4323echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4324echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004325else
Martin v. Löwis11437992002-04-12 09:54:03 +00004326 # Is the header compilable?
4327echo "$as_me:$LINENO: checking $ac_header usability" >&5
4328echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4329cat >conftest.$ac_ext <<_ACEOF
4330#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004331#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004332$ac_includes_default
4333#include <$ac_header>
4334_ACEOF
4335rm -f conftest.$ac_objext
4336if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4337 (eval $ac_compile) 2>&5
4338 ac_status=$?
4339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4340 (exit $ac_status); } &&
4341 { ac_try='test -s conftest.$ac_objext'
4342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4343 (eval $ac_try) 2>&5
4344 ac_status=$?
4345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4346 (exit $ac_status); }; }; then
4347 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004348else
Martin v. Löwis11437992002-04-12 09:54:03 +00004349 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004350cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004351ac_header_compiler=no
4352fi
4353rm -f conftest.$ac_objext conftest.$ac_ext
4354echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4355echo "${ECHO_T}$ac_header_compiler" >&6
4356
4357# Is the header present?
4358echo "$as_me:$LINENO: checking $ac_header presence" >&5
4359echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4360cat >conftest.$ac_ext <<_ACEOF
4361#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004362#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004363#include <$ac_header>
4364_ACEOF
4365if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4366 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4367 ac_status=$?
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004368 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004369 rm -f conftest.er1
4370 cat conftest.err >&5
4371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4372 (exit $ac_status); } >/dev/null; then
4373 if test -s conftest.err; then
4374 ac_cpp_err=$ac_c_preproc_warn_flag
4375 else
4376 ac_cpp_err=
4377 fi
4378else
4379 ac_cpp_err=yes
4380fi
4381if test -z "$ac_cpp_err"; then
4382 ac_header_preproc=yes
4383else
4384 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004385 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004386 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004387fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004388rm -f conftest.err conftest.$ac_ext
4389echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4390echo "${ECHO_T}$ac_header_preproc" >&6
4391
4392# So? What about this header?
4393case $ac_header_compiler:$ac_header_preproc in
4394 yes:no )
4395 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4396echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4397 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004398echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwis11437992002-04-12 09:54:03 +00004399 no:yes )
4400 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4401echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4402 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4403echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4404 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004405echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwis11437992002-04-12 09:54:03 +00004406esac
4407echo "$as_me:$LINENO: checking for $ac_header" >&5
4408echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4409if eval "test \"\${$as_ac_Header+set}\" = set"; then
4410 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004411else
Martin v. Löwis11437992002-04-12 09:54:03 +00004412 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004413fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004414echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4415echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4416
4417fi
4418if test `eval echo '${'$as_ac_Header'}'` = yes; then
4419 cat >>confdefs.h <<_ACEOF
4420#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4421_ACEOF
4422
4423fi
4424
Guido van Rossum627b2d71993-12-24 10:39:16 +00004425done
4426
Martin v. Löwis11437992002-04-12 09:54:03 +00004427
4428
4429
4430
4431
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004432ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004433for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4434 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4435echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4436echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4437if eval "test \"\${$as_ac_Header+set}\" = set"; then
4438 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004439else
Martin v. Löwis11437992002-04-12 09:54:03 +00004440 cat >conftest.$ac_ext <<_ACEOF
4441#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004442#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004443#include <sys/types.h>
4444#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004445
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004446#ifdef F77_DUMMY_MAIN
4447# ifdef __cplusplus
4448 extern "C"
4449# endif
4450 int F77_DUMMY_MAIN() { return 1; }
4451#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004452int
4453main ()
4454{
4455if ((DIR *) 0)
4456return 0;
4457 ;
4458 return 0;
4459}
4460_ACEOF
4461rm -f conftest.$ac_objext
4462if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4463 (eval $ac_compile) 2>&5
4464 ac_status=$?
4465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4466 (exit $ac_status); } &&
4467 { ac_try='test -s conftest.$ac_objext'
4468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4469 (eval $ac_try) 2>&5
4470 ac_status=$?
4471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4472 (exit $ac_status); }; }; then
4473 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004474else
Martin v. Löwis11437992002-04-12 09:54:03 +00004475 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004476cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004477eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004478fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004479rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004480fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004481echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4482echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4483if test `eval echo '${'$as_ac_Header'}'` = yes; then
4484 cat >>confdefs.h <<_ACEOF
4485#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4486_ACEOF
4487
4488ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004489fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004490
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004491done
4492# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4493if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004494 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4495echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4496if test "${ac_cv_search_opendir+set}" = set; then
4497 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004498else
Martin v. Löwis11437992002-04-12 09:54:03 +00004499 ac_func_search_save_LIBS=$LIBS
4500ac_cv_search_opendir=no
4501cat >conftest.$ac_ext <<_ACEOF
4502#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004503#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004504
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004505/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004506#ifdef __cplusplus
4507extern "C"
4508#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004509/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004510 builtin and then its argument prototype would still apply. */
4511char opendir ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004512#ifdef F77_DUMMY_MAIN
4513# ifdef __cplusplus
4514 extern "C"
4515# endif
4516 int F77_DUMMY_MAIN() { return 1; }
4517#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004518int
4519main ()
4520{
4521opendir ();
4522 ;
4523 return 0;
4524}
4525_ACEOF
4526rm -f conftest.$ac_objext conftest$ac_exeext
4527if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4528 (eval $ac_link) 2>&5
4529 ac_status=$?
4530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4531 (exit $ac_status); } &&
4532 { ac_try='test -s conftest$ac_exeext'
4533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4534 (eval $ac_try) 2>&5
4535 ac_status=$?
4536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4537 (exit $ac_status); }; }; then
4538 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004539else
Martin v. Löwis11437992002-04-12 09:54:03 +00004540 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004541cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004542fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004543rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4544if test "$ac_cv_search_opendir" = no; then
4545 for ac_lib in dir; do
4546 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4547 cat >conftest.$ac_ext <<_ACEOF
4548#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004549#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004550
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004551/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004552#ifdef __cplusplus
4553extern "C"
4554#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004555/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004556 builtin and then its argument prototype would still apply. */
4557char opendir ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004558#ifdef F77_DUMMY_MAIN
4559# ifdef __cplusplus
4560 extern "C"
4561# endif
4562 int F77_DUMMY_MAIN() { return 1; }
4563#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004564int
4565main ()
4566{
4567opendir ();
4568 ;
4569 return 0;
4570}
4571_ACEOF
4572rm -f conftest.$ac_objext conftest$ac_exeext
4573if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4574 (eval $ac_link) 2>&5
4575 ac_status=$?
4576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4577 (exit $ac_status); } &&
4578 { ac_try='test -s conftest$ac_exeext'
4579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4580 (eval $ac_try) 2>&5
4581 ac_status=$?
4582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4583 (exit $ac_status); }; }; then
4584 ac_cv_search_opendir="-l$ac_lib"
4585break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004586else
Martin v. Löwis11437992002-04-12 09:54:03 +00004587 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004588cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004589fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004590rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4591 done
4592fi
4593LIBS=$ac_func_search_save_LIBS
4594fi
4595echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4596echo "${ECHO_T}$ac_cv_search_opendir" >&6
4597if test "$ac_cv_search_opendir" != no; then
4598 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004599
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004600fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004601
Michael W. Hudson54241132001-12-07 15:38:26 +00004602else
Martin v. Löwis11437992002-04-12 09:54:03 +00004603 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4604echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4605if test "${ac_cv_search_opendir+set}" = set; then
4606 echo $ECHO_N "(cached) $ECHO_C" >&6
4607else
4608 ac_func_search_save_LIBS=$LIBS
4609ac_cv_search_opendir=no
4610cat >conftest.$ac_ext <<_ACEOF
4611#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004612#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004613
4614/* Override any gcc2 internal prototype to avoid an error. */
4615#ifdef __cplusplus
4616extern "C"
4617#endif
4618/* We use char because int might match the return type of a gcc2
4619 builtin and then its argument prototype would still apply. */
4620char opendir ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004621#ifdef F77_DUMMY_MAIN
4622# ifdef __cplusplus
4623 extern "C"
4624# endif
4625 int F77_DUMMY_MAIN() { return 1; }
4626#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004627int
4628main ()
4629{
4630opendir ();
4631 ;
4632 return 0;
4633}
4634_ACEOF
4635rm -f conftest.$ac_objext conftest$ac_exeext
4636if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4637 (eval $ac_link) 2>&5
4638 ac_status=$?
4639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4640 (exit $ac_status); } &&
4641 { ac_try='test -s conftest$ac_exeext'
4642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4643 (eval $ac_try) 2>&5
4644 ac_status=$?
4645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4646 (exit $ac_status); }; }; then
4647 ac_cv_search_opendir="none required"
4648else
4649 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004650cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004651fi
4652rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4653if test "$ac_cv_search_opendir" = no; then
4654 for ac_lib in x; do
4655 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4656 cat >conftest.$ac_ext <<_ACEOF
4657#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004658#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004659
4660/* Override any gcc2 internal prototype to avoid an error. */
4661#ifdef __cplusplus
4662extern "C"
4663#endif
4664/* We use char because int might match the return type of a gcc2
4665 builtin and then its argument prototype would still apply. */
4666char opendir ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004667#ifdef F77_DUMMY_MAIN
4668# ifdef __cplusplus
4669 extern "C"
4670# endif
4671 int F77_DUMMY_MAIN() { return 1; }
4672#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004673int
4674main ()
4675{
4676opendir ();
4677 ;
4678 return 0;
4679}
4680_ACEOF
4681rm -f conftest.$ac_objext conftest$ac_exeext
4682if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4683 (eval $ac_link) 2>&5
4684 ac_status=$?
4685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4686 (exit $ac_status); } &&
4687 { ac_try='test -s conftest$ac_exeext'
4688 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4689 (eval $ac_try) 2>&5
4690 ac_status=$?
4691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4692 (exit $ac_status); }; }; then
4693 ac_cv_search_opendir="-l$ac_lib"
4694break
4695else
4696 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004697cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004698fi
4699rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4700 done
4701fi
4702LIBS=$ac_func_search_save_LIBS
4703fi
4704echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4705echo "${ECHO_T}$ac_cv_search_opendir" >&6
4706if test "$ac_cv_search_opendir" != no; then
4707 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4708
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004709fi
4710
4711fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004712
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004713echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4714echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4715if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4716 echo $ECHO_N "(cached) $ECHO_C" >&6
4717else
4718 cat >conftest.$ac_ext <<_ACEOF
4719#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004720#include "confdefs.h"
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004721#include <sys/types.h>
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004722#ifdef F77_DUMMY_MAIN
4723# ifdef __cplusplus
4724 extern "C"
4725# endif
4726 int F77_DUMMY_MAIN() { return 1; }
4727#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004728int
4729main ()
4730{
4731return makedev(0, 0);
4732 ;
4733 return 0;
4734}
4735_ACEOF
4736rm -f conftest.$ac_objext conftest$ac_exeext
4737if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4738 (eval $ac_link) 2>&5
4739 ac_status=$?
4740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4741 (exit $ac_status); } &&
4742 { ac_try='test -s conftest$ac_exeext'
4743 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4744 (eval $ac_try) 2>&5
4745 ac_status=$?
4746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4747 (exit $ac_status); }; }; then
4748 ac_cv_header_sys_types_h_makedev=yes
4749else
4750 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004751cat conftest.$ac_ext >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004752ac_cv_header_sys_types_h_makedev=no
4753fi
4754rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4755
4756fi
4757echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4758echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4759
4760if test $ac_cv_header_sys_types_h_makedev = no; then
4761if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4762 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4763echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4764if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4765 echo $ECHO_N "(cached) $ECHO_C" >&6
4766fi
4767echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4768echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4769else
4770 # Is the header compilable?
4771echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4772echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4773cat >conftest.$ac_ext <<_ACEOF
4774#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004775#include "confdefs.h"
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004776$ac_includes_default
4777#include <sys/mkdev.h>
4778_ACEOF
4779rm -f conftest.$ac_objext
4780if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4781 (eval $ac_compile) 2>&5
4782 ac_status=$?
4783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4784 (exit $ac_status); } &&
4785 { ac_try='test -s conftest.$ac_objext'
4786 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4787 (eval $ac_try) 2>&5
4788 ac_status=$?
4789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4790 (exit $ac_status); }; }; then
4791 ac_header_compiler=yes
4792else
4793 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004794cat conftest.$ac_ext >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004795ac_header_compiler=no
4796fi
4797rm -f conftest.$ac_objext conftest.$ac_ext
4798echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4799echo "${ECHO_T}$ac_header_compiler" >&6
4800
4801# Is the header present?
4802echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4803echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4804cat >conftest.$ac_ext <<_ACEOF
4805#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004806#include "confdefs.h"
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004807#include <sys/mkdev.h>
4808_ACEOF
4809if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4810 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4811 ac_status=$?
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004812 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004813 rm -f conftest.er1
4814 cat conftest.err >&5
4815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4816 (exit $ac_status); } >/dev/null; then
4817 if test -s conftest.err; then
4818 ac_cpp_err=$ac_c_preproc_warn_flag
4819 else
4820 ac_cpp_err=
4821 fi
4822else
4823 ac_cpp_err=yes
4824fi
4825if test -z "$ac_cpp_err"; then
4826 ac_header_preproc=yes
4827else
4828 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004829 cat conftest.$ac_ext >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004830 ac_header_preproc=no
4831fi
4832rm -f conftest.err conftest.$ac_ext
4833echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4834echo "${ECHO_T}$ac_header_preproc" >&6
4835
4836# So? What about this header?
4837case $ac_header_compiler:$ac_header_preproc in
4838 yes:no )
4839 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4840echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4841 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004842echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004843 no:yes )
4844 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4845echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4846 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4847echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4848 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004849echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004850esac
4851echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4852echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4853if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4854 echo $ECHO_N "(cached) $ECHO_C" >&6
4855else
4856 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4857fi
4858echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4859echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4860
4861fi
4862if test $ac_cv_header_sys_mkdev_h = yes; then
4863
4864cat >>confdefs.h <<\_ACEOF
4865#define MAJOR_IN_MKDEV 1
4866_ACEOF
4867
4868fi
4869
4870
4871
4872 if test $ac_cv_header_sys_mkdev_h = no; then
4873 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4874 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4875echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4876if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4877 echo $ECHO_N "(cached) $ECHO_C" >&6
4878fi
4879echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4880echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4881else
4882 # Is the header compilable?
4883echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4884echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4885cat >conftest.$ac_ext <<_ACEOF
4886#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004887#include "confdefs.h"
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004888$ac_includes_default
4889#include <sys/sysmacros.h>
4890_ACEOF
4891rm -f conftest.$ac_objext
4892if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4893 (eval $ac_compile) 2>&5
4894 ac_status=$?
4895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4896 (exit $ac_status); } &&
4897 { ac_try='test -s conftest.$ac_objext'
4898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4899 (eval $ac_try) 2>&5
4900 ac_status=$?
4901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4902 (exit $ac_status); }; }; then
4903 ac_header_compiler=yes
4904else
4905 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004906cat conftest.$ac_ext >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004907ac_header_compiler=no
4908fi
4909rm -f conftest.$ac_objext conftest.$ac_ext
4910echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4911echo "${ECHO_T}$ac_header_compiler" >&6
4912
4913# Is the header present?
4914echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
4915echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
4916cat >conftest.$ac_ext <<_ACEOF
4917#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004918#include "confdefs.h"
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004919#include <sys/sysmacros.h>
4920_ACEOF
4921if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4922 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4923 ac_status=$?
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004924 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004925 rm -f conftest.er1
4926 cat conftest.err >&5
4927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4928 (exit $ac_status); } >/dev/null; then
4929 if test -s conftest.err; then
4930 ac_cpp_err=$ac_c_preproc_warn_flag
4931 else
4932 ac_cpp_err=
4933 fi
4934else
4935 ac_cpp_err=yes
4936fi
4937if test -z "$ac_cpp_err"; then
4938 ac_header_preproc=yes
4939else
4940 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004941 cat conftest.$ac_ext >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004942 ac_header_preproc=no
4943fi
4944rm -f conftest.err conftest.$ac_ext
4945echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4946echo "${ECHO_T}$ac_header_preproc" >&6
4947
4948# So? What about this header?
4949case $ac_header_compiler:$ac_header_preproc in
4950 yes:no )
4951 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
4952echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4953 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004954echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004955 no:yes )
4956 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
4957echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
4958 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
4959echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
4960 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004961echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004962esac
4963echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4964echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4965if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4966 echo $ECHO_N "(cached) $ECHO_C" >&6
4967else
4968 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
4969fi
4970echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4971echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4972
4973fi
4974if test $ac_cv_header_sys_sysmacros_h = yes; then
4975
4976cat >>confdefs.h <<\_ACEOF
4977#define MAJOR_IN_SYSMACROS 1
4978_ACEOF
4979
4980fi
4981
4982
4983 fi
4984fi
4985
Michael W. Hudson54241132001-12-07 15:38:26 +00004986
Guido van Rossum627b2d71993-12-24 10:39:16 +00004987# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004988was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004989echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4990echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4991cat >conftest.$ac_ext <<_ACEOF
4992#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004993#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004994#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004995
4996_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004997if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00004998 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004999 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005000else
Martin v. Löwis11437992002-04-12 09:54:03 +00005001
5002
5003cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005004#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00005005_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005006
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005007
Guido van Rossum627b2d71993-12-24 10:39:16 +00005008fi
5009rm -f conftest*
5010
Martin v. Löwis11437992002-04-12 09:54:03 +00005011echo "$as_me:$LINENO: result: $was_it_defined" >&5
5012echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005013
Neal Norwitz11690112002-07-30 01:08:28 +00005014# Check whether using makedev requires defining _OSF_SOURCE
5015echo "$as_me:$LINENO: checking for makedev" >&5
5016echo $ECHO_N "checking for makedev... $ECHO_C" >&6
5017cat >conftest.$ac_ext <<_ACEOF
5018#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005019#include "confdefs.h"
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005020#include <sys/types.h>
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005021#ifdef F77_DUMMY_MAIN
5022# ifdef __cplusplus
5023 extern "C"
5024# endif
5025 int F77_DUMMY_MAIN() { return 1; }
5026#endif
Neal Norwitz11690112002-07-30 01:08:28 +00005027int
5028main ()
5029{
5030 makedev(0, 0)
5031 ;
5032 return 0;
5033}
5034_ACEOF
5035rm -f conftest.$ac_objext conftest$ac_exeext
5036if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5037 (eval $ac_link) 2>&5
5038 ac_status=$?
5039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5040 (exit $ac_status); } &&
5041 { ac_try='test -s conftest$ac_exeext'
5042 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5043 (eval $ac_try) 2>&5
5044 ac_status=$?
5045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5046 (exit $ac_status); }; }; then
5047 ac_cv_has_makedev=yes
5048else
5049 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005050cat conftest.$ac_ext >&5
Neal Norwitz11690112002-07-30 01:08:28 +00005051ac_cv_has_makedev=no
5052fi
5053rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5054if test "$ac_cv_has_makedev" = "no"; then
5055 # we didn't link, try if _OSF_SOURCE will allow us to link
5056 cat >conftest.$ac_ext <<_ACEOF
5057#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005058#include "confdefs.h"
Neal Norwitz11690112002-07-30 01:08:28 +00005059
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005060#define _OSF_SOURCE 1
5061#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005062
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005063#ifdef F77_DUMMY_MAIN
5064# ifdef __cplusplus
5065 extern "C"
5066# endif
5067 int F77_DUMMY_MAIN() { return 1; }
5068#endif
Neal Norwitz11690112002-07-30 01:08:28 +00005069int
5070main ()
5071{
5072 makedev(0, 0)
5073 ;
5074 return 0;
5075}
5076_ACEOF
5077rm -f conftest.$ac_objext conftest$ac_exeext
5078if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5079 (eval $ac_link) 2>&5
5080 ac_status=$?
5081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5082 (exit $ac_status); } &&
5083 { ac_try='test -s conftest$ac_exeext'
5084 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5085 (eval $ac_try) 2>&5
5086 ac_status=$?
5087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5088 (exit $ac_status); }; }; then
5089 ac_cv_has_makedev=yes
5090else
5091 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005092cat conftest.$ac_ext >&5
Neal Norwitz11690112002-07-30 01:08:28 +00005093ac_cv_has_makedev=no
5094fi
5095rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5096 if test "$ac_cv_has_makedev" = "yes"; then
5097
5098cat >>confdefs.h <<\_ACEOF
5099#define _OSF_SOURCE 1
5100_ACEOF
5101
5102 fi
5103fi
5104echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
5105echo "${ECHO_T}$ac_cv_has_makedev" >&6
5106if test "$ac_cv_has_makedev" = "yes"; then
5107
5108cat >>confdefs.h <<\_ACEOF
5109#define HAVE_MAKEDEV 1
5110_ACEOF
5111
5112fi
5113
Martin v. Löwis399a6892002-10-04 10:22:02 +00005114# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5115# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5116# defined, but the compiler does not support pragma redefine_extname,
5117# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5118# structures (such as rlimit64) without declaring them. As a
5119# work-around, disable LFS on such configurations
5120
5121use_lfs=yes
5122echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5123echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
5124cat >conftest.$ac_ext <<_ACEOF
5125#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005126#include "confdefs.h"
Martin v. Löwis399a6892002-10-04 10:22:02 +00005127
5128#define _LARGEFILE_SOURCE 1
5129#define _FILE_OFFSET_BITS 64
5130#include <sys/resource.h>
5131
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005132#ifdef F77_DUMMY_MAIN
5133# ifdef __cplusplus
5134 extern "C"
5135# endif
5136 int F77_DUMMY_MAIN() { return 1; }
5137#endif
Martin v. Löwis399a6892002-10-04 10:22:02 +00005138int
5139main ()
5140{
5141struct rlimit foo;
5142 ;
5143 return 0;
5144}
5145_ACEOF
5146rm -f conftest.$ac_objext
5147if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5148 (eval $ac_compile) 2>&5
5149 ac_status=$?
5150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5151 (exit $ac_status); } &&
5152 { ac_try='test -s conftest.$ac_objext'
5153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5154 (eval $ac_try) 2>&5
5155 ac_status=$?
5156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5157 (exit $ac_status); }; }; then
5158 sol_lfs_bug=no
5159else
5160 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005161cat conftest.$ac_ext >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00005162sol_lfs_bug=yes
5163fi
5164rm -f conftest.$ac_objext conftest.$ac_ext
5165echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5166echo "${ECHO_T}$sol_lfs_bug" >&6
5167if test "$sol_lfs_bug" = "yes"; then
5168 use_lfs=no
5169fi
5170
5171if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005172# Two defines needed to enable largefile support on various platforms
5173# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005174
Martin v. Löwis11437992002-04-12 09:54:03 +00005175cat >>confdefs.h <<\_ACEOF
5176#define _LARGEFILE_SOURCE 1
5177_ACEOF
5178
5179
5180cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005181#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005182_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005183
Martin v. Löwis399a6892002-10-04 10:22:02 +00005184fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005185
Guido van Rossum84e7b241996-08-19 21:59:00 +00005186# Add some code to confdefs.h so that the test for off_t works on SCO
5187cat >> confdefs.h <<\EOF
5188#if defined(SCO_DS)
5189#undef _OFF_T
5190#endif
5191EOF
5192
Guido van Rossumef2255b2000-03-10 22:30:29 +00005193# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005194echo "$as_me:$LINENO: checking for mode_t" >&5
5195echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5196if test "${ac_cv_type_mode_t+set}" = set; then
5197 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005198else
Martin v. Löwis11437992002-04-12 09:54:03 +00005199 cat >conftest.$ac_ext <<_ACEOF
5200#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005201#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005202$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +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{
5212if ((mode_t *) 0)
5213 return 0;
5214if (sizeof (mode_t))
5215 return 0;
5216 ;
5217 return 0;
5218}
5219_ACEOF
5220rm -f conftest.$ac_objext
5221if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5222 (eval $ac_compile) 2>&5
5223 ac_status=$?
5224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5225 (exit $ac_status); } &&
5226 { ac_try='test -s conftest.$ac_objext'
5227 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5228 (eval $ac_try) 2>&5
5229 ac_status=$?
5230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5231 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005232 ac_cv_type_mode_t=yes
5233else
Martin v. Löwis11437992002-04-12 09:54:03 +00005234 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005235cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005236ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005237fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005238rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005239fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005240echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5241echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5242if test $ac_cv_type_mode_t = yes; then
5243 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005244else
Martin v. Löwis11437992002-04-12 09:54:03 +00005245
5246cat >>confdefs.h <<_ACEOF
5247#define mode_t int
5248_ACEOF
5249
5250fi
5251
5252echo "$as_me:$LINENO: checking for off_t" >&5
5253echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5254if test "${ac_cv_type_off_t+set}" = set; then
5255 echo $ECHO_N "(cached) $ECHO_C" >&6
5256else
5257 cat >conftest.$ac_ext <<_ACEOF
5258#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005259#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005260$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005261#ifdef F77_DUMMY_MAIN
5262# ifdef __cplusplus
5263 extern "C"
5264# endif
5265 int F77_DUMMY_MAIN() { return 1; }
5266#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005267int
5268main ()
5269{
5270if ((off_t *) 0)
5271 return 0;
5272if (sizeof (off_t))
5273 return 0;
5274 ;
5275 return 0;
5276}
5277_ACEOF
5278rm -f conftest.$ac_objext
5279if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5280 (eval $ac_compile) 2>&5
5281 ac_status=$?
5282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5283 (exit $ac_status); } &&
5284 { ac_try='test -s conftest.$ac_objext'
5285 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5286 (eval $ac_try) 2>&5
5287 ac_status=$?
5288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5289 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005290 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005291else
Martin v. Löwis11437992002-04-12 09:54:03 +00005292 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005293cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005294ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005295fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005296rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005297fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005298echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5299echo "${ECHO_T}$ac_cv_type_off_t" >&6
5300if test $ac_cv_type_off_t = yes; then
5301 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005302else
Martin v. Löwis11437992002-04-12 09:54:03 +00005303
5304cat >>confdefs.h <<_ACEOF
5305#define off_t long
5306_ACEOF
5307
5308fi
5309
5310echo "$as_me:$LINENO: checking for pid_t" >&5
5311echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5312if test "${ac_cv_type_pid_t+set}" = set; then
5313 echo $ECHO_N "(cached) $ECHO_C" >&6
5314else
5315 cat >conftest.$ac_ext <<_ACEOF
5316#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005317#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005318$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005319#ifdef F77_DUMMY_MAIN
5320# ifdef __cplusplus
5321 extern "C"
5322# endif
5323 int F77_DUMMY_MAIN() { return 1; }
5324#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005325int
5326main ()
5327{
5328if ((pid_t *) 0)
5329 return 0;
5330if (sizeof (pid_t))
5331 return 0;
5332 ;
5333 return 0;
5334}
5335_ACEOF
5336rm -f conftest.$ac_objext
5337if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5338 (eval $ac_compile) 2>&5
5339 ac_status=$?
5340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5341 (exit $ac_status); } &&
5342 { ac_try='test -s conftest.$ac_objext'
5343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5344 (eval $ac_try) 2>&5
5345 ac_status=$?
5346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5347 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005348 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005349else
Martin v. Löwis11437992002-04-12 09:54:03 +00005350 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005351cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005352ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005353fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005354rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005355fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005356echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5357echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5358if test $ac_cv_type_pid_t = yes; then
5359 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005360else
Martin v. Löwis11437992002-04-12 09:54:03 +00005361
5362cat >>confdefs.h <<_ACEOF
5363#define pid_t int
5364_ACEOF
5365
5366fi
5367
5368echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5369echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5370if test "${ac_cv_type_signal+set}" = set; then
5371 echo $ECHO_N "(cached) $ECHO_C" >&6
5372else
5373 cat >conftest.$ac_ext <<_ACEOF
5374#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005375#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005376#include <sys/types.h>
5377#include <signal.h>
5378#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005379# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005380#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005381#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005382extern "C" void (*signal (int, void (*)(int)))(int);
5383#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005384void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005385#endif
5386
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005387#ifdef F77_DUMMY_MAIN
5388# ifdef __cplusplus
5389 extern "C"
5390# endif
5391 int F77_DUMMY_MAIN() { return 1; }
5392#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005393int
5394main ()
5395{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005396int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005397 ;
5398 return 0;
5399}
5400_ACEOF
5401rm -f conftest.$ac_objext
5402if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5403 (eval $ac_compile) 2>&5
5404 ac_status=$?
5405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5406 (exit $ac_status); } &&
5407 { ac_try='test -s conftest.$ac_objext'
5408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5409 (eval $ac_try) 2>&5
5410 ac_status=$?
5411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5412 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005413 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005414else
Martin v. Löwis11437992002-04-12 09:54:03 +00005415 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005416cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005417ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005418fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005419rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005420fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005421echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5422echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005423
Martin v. Löwis11437992002-04-12 09:54:03 +00005424cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005425#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005426_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005427
Michael W. Hudson54241132001-12-07 15:38:26 +00005428
Martin v. Löwis11437992002-04-12 09:54:03 +00005429echo "$as_me:$LINENO: checking for size_t" >&5
5430echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5431if test "${ac_cv_type_size_t+set}" = set; then
5432 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005433else
Martin v. Löwis11437992002-04-12 09:54:03 +00005434 cat >conftest.$ac_ext <<_ACEOF
5435#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005436#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005437$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005438#ifdef F77_DUMMY_MAIN
5439# ifdef __cplusplus
5440 extern "C"
5441# endif
5442 int F77_DUMMY_MAIN() { return 1; }
5443#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005444int
5445main ()
5446{
5447if ((size_t *) 0)
5448 return 0;
5449if (sizeof (size_t))
5450 return 0;
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
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005467 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005468else
Martin v. Löwis11437992002-04-12 09:54:03 +00005469 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005470cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005471ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005472fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005473rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005474fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005475echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5476echo "${ECHO_T}$ac_cv_type_size_t" >&6
5477if test $ac_cv_type_size_t = yes; then
5478 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005479else
Martin v. Löwis11437992002-04-12 09:54:03 +00005480
5481cat >>confdefs.h <<_ACEOF
5482#define size_t unsigned
5483_ACEOF
5484
5485fi
5486
5487echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5488echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5489if test "${ac_cv_type_uid_t+set}" = set; then
5490 echo $ECHO_N "(cached) $ECHO_C" >&6
5491else
5492 cat >conftest.$ac_ext <<_ACEOF
5493#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005494#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005495#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005496
5497_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005498if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005499 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005500 ac_cv_type_uid_t=yes
5501else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005502 ac_cv_type_uid_t=no
5503fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005504rm -f conftest*
5505
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005506fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005507echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5508echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005509if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005510
Martin v. Löwis11437992002-04-12 09:54:03 +00005511cat >>confdefs.h <<\_ACEOF
5512#define uid_t int
5513_ACEOF
5514
5515
5516cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005517#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005518_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005519
5520fi
5521
Jack Jansendd19cf82001-12-06 22:36:17 +00005522
Michael W. Hudson54241132001-12-07 15:38:26 +00005523# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00005524echo "$as_me:$LINENO: checking for int" >&5
5525echo $ECHO_N "checking for int... $ECHO_C" >&6
5526if test "${ac_cv_type_int+set}" = set; then
5527 echo $ECHO_N "(cached) $ECHO_C" >&6
5528else
5529 cat >conftest.$ac_ext <<_ACEOF
5530#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005531#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005532$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005533#ifdef F77_DUMMY_MAIN
5534# ifdef __cplusplus
5535 extern "C"
5536# endif
5537 int F77_DUMMY_MAIN() { return 1; }
5538#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005539int
5540main ()
5541{
5542if ((int *) 0)
5543 return 0;
5544if (sizeof (int))
5545 return 0;
5546 ;
5547 return 0;
5548}
5549_ACEOF
5550rm -f conftest.$ac_objext
5551if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5552 (eval $ac_compile) 2>&5
5553 ac_status=$?
5554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5555 (exit $ac_status); } &&
5556 { ac_try='test -s conftest.$ac_objext'
5557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5558 (eval $ac_try) 2>&5
5559 ac_status=$?
5560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5561 (exit $ac_status); }; }; then
5562 ac_cv_type_int=yes
5563else
5564 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005565cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005566ac_cv_type_int=no
5567fi
5568rm -f conftest.$ac_objext conftest.$ac_ext
5569fi
5570echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5571echo "${ECHO_T}$ac_cv_type_int" >&6
5572
5573echo "$as_me:$LINENO: checking size of int" >&5
5574echo $ECHO_N "checking size of int... $ECHO_C" >&6
5575if test "${ac_cv_sizeof_int+set}" = set; then
5576 echo $ECHO_N "(cached) $ECHO_C" >&6
5577else
5578 if test "$ac_cv_type_int" = yes; then
5579 # The cast to unsigned long works around a bug in the HP C Compiler
5580 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5581 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5582 # This bug is HP SR number 8606223364.
5583 if test "$cross_compiling" = yes; then
5584 # Depending upon the size, compute the lo and hi bounds.
5585cat >conftest.$ac_ext <<_ACEOF
5586#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005587#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005588$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005589#ifdef F77_DUMMY_MAIN
5590# ifdef __cplusplus
5591 extern "C"
5592# endif
5593 int F77_DUMMY_MAIN() { return 1; }
5594#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005595int
5596main ()
5597{
5598static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5599test_array [0] = 0
5600
5601 ;
5602 return 0;
5603}
5604_ACEOF
5605rm -f conftest.$ac_objext
5606if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5607 (eval $ac_compile) 2>&5
5608 ac_status=$?
5609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5610 (exit $ac_status); } &&
5611 { ac_try='test -s conftest.$ac_objext'
5612 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5613 (eval $ac_try) 2>&5
5614 ac_status=$?
5615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5616 (exit $ac_status); }; }; then
5617 ac_lo=0 ac_mid=0
5618 while :; do
5619 cat >conftest.$ac_ext <<_ACEOF
5620#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005621#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005622$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005623#ifdef F77_DUMMY_MAIN
5624# ifdef __cplusplus
5625 extern "C"
5626# endif
5627 int F77_DUMMY_MAIN() { return 1; }
5628#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005629int
5630main ()
5631{
5632static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5633test_array [0] = 0
5634
5635 ;
5636 return 0;
5637}
5638_ACEOF
5639rm -f conftest.$ac_objext
5640if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5641 (eval $ac_compile) 2>&5
5642 ac_status=$?
5643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5644 (exit $ac_status); } &&
5645 { ac_try='test -s conftest.$ac_objext'
5646 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5647 (eval $ac_try) 2>&5
5648 ac_status=$?
5649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5650 (exit $ac_status); }; }; then
5651 ac_hi=$ac_mid; break
5652else
5653 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005654cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005655ac_lo=`expr $ac_mid + 1`
5656 if test $ac_lo -le $ac_mid; then
5657 ac_lo= ac_hi=
5658 break
5659 fi
5660 ac_mid=`expr 2 '*' $ac_mid + 1`
5661fi
5662rm -f conftest.$ac_objext conftest.$ac_ext
5663 done
5664else
5665 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005666cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005667cat >conftest.$ac_ext <<_ACEOF
5668#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005669#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005670$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005671#ifdef F77_DUMMY_MAIN
5672# ifdef __cplusplus
5673 extern "C"
5674# endif
5675 int F77_DUMMY_MAIN() { return 1; }
5676#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005677int
5678main ()
5679{
5680static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5681test_array [0] = 0
5682
5683 ;
5684 return 0;
5685}
5686_ACEOF
5687rm -f conftest.$ac_objext
5688if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5689 (eval $ac_compile) 2>&5
5690 ac_status=$?
5691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5692 (exit $ac_status); } &&
5693 { ac_try='test -s conftest.$ac_objext'
5694 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5695 (eval $ac_try) 2>&5
5696 ac_status=$?
5697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5698 (exit $ac_status); }; }; then
5699 ac_hi=-1 ac_mid=-1
5700 while :; do
5701 cat >conftest.$ac_ext <<_ACEOF
5702#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005703#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005704$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005705#ifdef F77_DUMMY_MAIN
5706# ifdef __cplusplus
5707 extern "C"
5708# endif
5709 int F77_DUMMY_MAIN() { return 1; }
5710#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005711int
5712main ()
5713{
5714static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5715test_array [0] = 0
5716
5717 ;
5718 return 0;
5719}
5720_ACEOF
5721rm -f conftest.$ac_objext
5722if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5723 (eval $ac_compile) 2>&5
5724 ac_status=$?
5725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5726 (exit $ac_status); } &&
5727 { ac_try='test -s conftest.$ac_objext'
5728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5729 (eval $ac_try) 2>&5
5730 ac_status=$?
5731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5732 (exit $ac_status); }; }; then
5733 ac_lo=$ac_mid; break
5734else
5735 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005736cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005737ac_hi=`expr '(' $ac_mid ')' - 1`
5738 if test $ac_mid -le $ac_hi; then
5739 ac_lo= ac_hi=
5740 break
5741 fi
5742 ac_mid=`expr 2 '*' $ac_mid`
5743fi
5744rm -f conftest.$ac_objext conftest.$ac_ext
5745 done
5746else
5747 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005748cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005749ac_lo= ac_hi=
5750fi
5751rm -f conftest.$ac_objext conftest.$ac_ext
5752fi
5753rm -f conftest.$ac_objext conftest.$ac_ext
5754# Binary search between lo and hi bounds.
5755while test "x$ac_lo" != "x$ac_hi"; do
5756 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5757 cat >conftest.$ac_ext <<_ACEOF
5758#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005759#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005760$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005761#ifdef F77_DUMMY_MAIN
5762# ifdef __cplusplus
5763 extern "C"
5764# endif
5765 int F77_DUMMY_MAIN() { return 1; }
5766#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005767int
5768main ()
5769{
5770static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5771test_array [0] = 0
5772
5773 ;
5774 return 0;
5775}
5776_ACEOF
5777rm -f conftest.$ac_objext
5778if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5779 (eval $ac_compile) 2>&5
5780 ac_status=$?
5781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5782 (exit $ac_status); } &&
5783 { ac_try='test -s conftest.$ac_objext'
5784 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5785 (eval $ac_try) 2>&5
5786 ac_status=$?
5787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5788 (exit $ac_status); }; }; then
5789 ac_hi=$ac_mid
5790else
5791 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005792cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005793ac_lo=`expr '(' $ac_mid ')' + 1`
5794fi
5795rm -f conftest.$ac_objext conftest.$ac_ext
5796done
5797case $ac_lo in
5798?*) ac_cv_sizeof_int=$ac_lo;;
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005799'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5800echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005801 { (exit 1); exit 1; }; } ;;
5802esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005803else
5804 if test "$cross_compiling" = yes; then
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005805 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5806echo "$as_me: error: cannot run test program while cross compiling" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005807 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005808else
Martin v. Löwis11437992002-04-12 09:54:03 +00005809 cat >conftest.$ac_ext <<_ACEOF
5810#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005811#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005812$ac_includes_default
5813long longval () { return (long) (sizeof (int)); }
5814unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005815#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005816#include <stdlib.h>
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005817#ifdef F77_DUMMY_MAIN
5818# ifdef __cplusplus
5819 extern "C"
5820# endif
5821 int F77_DUMMY_MAIN() { return 1; }
5822#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005823int
5824main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005825{
Martin v. Löwis11437992002-04-12 09:54:03 +00005826
5827 FILE *f = fopen ("conftest.val", "w");
5828 if (! f)
5829 exit (1);
5830 if (((long) (sizeof (int))) < 0)
5831 {
5832 long i = longval ();
5833 if (i != ((long) (sizeof (int))))
5834 exit (1);
5835 fprintf (f, "%ld\n", i);
5836 }
5837 else
5838 {
5839 unsigned long i = ulongval ();
5840 if (i != ((long) (sizeof (int))))
5841 exit (1);
5842 fprintf (f, "%lu\n", i);
5843 }
5844 exit (ferror (f) || fclose (f) != 0);
5845
5846 ;
5847 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005848}
Martin v. Löwis11437992002-04-12 09:54:03 +00005849_ACEOF
5850rm -f conftest$ac_exeext
5851if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5852 (eval $ac_link) 2>&5
5853 ac_status=$?
5854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5855 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5857 (eval $ac_try) 2>&5
5858 ac_status=$?
5859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5860 (exit $ac_status); }; }; then
5861 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005862else
Martin v. Löwis11437992002-04-12 09:54:03 +00005863 echo "$as_me: program exited with status $ac_status" >&5
5864echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005865cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005866( exit $ac_status )
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005867{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5868echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005869 { (exit 1); exit 1; }; }
5870fi
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005871rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005872fi
5873fi
5874rm -f conftest.val
5875else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005876 ac_cv_sizeof_int=0
5877fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005878fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005879echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5880echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5881cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005882#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005883_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005884
5885
Martin v. Löwis11437992002-04-12 09:54:03 +00005886echo "$as_me:$LINENO: checking for long" >&5
5887echo $ECHO_N "checking for long... $ECHO_C" >&6
5888if test "${ac_cv_type_long+set}" = set; then
5889 echo $ECHO_N "(cached) $ECHO_C" >&6
5890else
5891 cat >conftest.$ac_ext <<_ACEOF
5892#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005893#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005894$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005895#ifdef F77_DUMMY_MAIN
5896# ifdef __cplusplus
5897 extern "C"
5898# endif
5899 int F77_DUMMY_MAIN() { return 1; }
5900#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005901int
5902main ()
5903{
5904if ((long *) 0)
5905 return 0;
5906if (sizeof (long))
5907 return 0;
5908 ;
5909 return 0;
5910}
5911_ACEOF
5912rm -f conftest.$ac_objext
5913if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5914 (eval $ac_compile) 2>&5
5915 ac_status=$?
5916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5917 (exit $ac_status); } &&
5918 { ac_try='test -s conftest.$ac_objext'
5919 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5920 (eval $ac_try) 2>&5
5921 ac_status=$?
5922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5923 (exit $ac_status); }; }; then
5924 ac_cv_type_long=yes
5925else
5926 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005927cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005928ac_cv_type_long=no
5929fi
5930rm -f conftest.$ac_objext conftest.$ac_ext
5931fi
5932echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5933echo "${ECHO_T}$ac_cv_type_long" >&6
5934
5935echo "$as_me:$LINENO: checking size of long" >&5
5936echo $ECHO_N "checking size of long... $ECHO_C" >&6
5937if test "${ac_cv_sizeof_long+set}" = set; then
5938 echo $ECHO_N "(cached) $ECHO_C" >&6
5939else
5940 if test "$ac_cv_type_long" = yes; then
5941 # The cast to unsigned long works around a bug in the HP C Compiler
5942 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5943 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5944 # This bug is HP SR number 8606223364.
5945 if test "$cross_compiling" = yes; then
5946 # Depending upon the size, compute the lo and hi bounds.
5947cat >conftest.$ac_ext <<_ACEOF
5948#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005949#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005950$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005951#ifdef F77_DUMMY_MAIN
5952# ifdef __cplusplus
5953 extern "C"
5954# endif
5955 int F77_DUMMY_MAIN() { return 1; }
5956#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005957int
5958main ()
5959{
5960static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5961test_array [0] = 0
5962
5963 ;
5964 return 0;
5965}
5966_ACEOF
5967rm -f conftest.$ac_objext
5968if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5969 (eval $ac_compile) 2>&5
5970 ac_status=$?
5971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5972 (exit $ac_status); } &&
5973 { ac_try='test -s conftest.$ac_objext'
5974 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5975 (eval $ac_try) 2>&5
5976 ac_status=$?
5977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5978 (exit $ac_status); }; }; then
5979 ac_lo=0 ac_mid=0
5980 while :; do
5981 cat >conftest.$ac_ext <<_ACEOF
5982#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005983#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005984$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00005985#ifdef F77_DUMMY_MAIN
5986# ifdef __cplusplus
5987 extern "C"
5988# endif
5989 int F77_DUMMY_MAIN() { return 1; }
5990#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005991int
5992main ()
5993{
5994static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5995test_array [0] = 0
5996
5997 ;
5998 return 0;
5999}
6000_ACEOF
6001rm -f conftest.$ac_objext
6002if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6003 (eval $ac_compile) 2>&5
6004 ac_status=$?
6005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6006 (exit $ac_status); } &&
6007 { ac_try='test -s conftest.$ac_objext'
6008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6009 (eval $ac_try) 2>&5
6010 ac_status=$?
6011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6012 (exit $ac_status); }; }; then
6013 ac_hi=$ac_mid; break
6014else
6015 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006016cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006017ac_lo=`expr $ac_mid + 1`
6018 if test $ac_lo -le $ac_mid; then
6019 ac_lo= ac_hi=
6020 break
6021 fi
6022 ac_mid=`expr 2 '*' $ac_mid + 1`
6023fi
6024rm -f conftest.$ac_objext conftest.$ac_ext
6025 done
6026else
6027 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006028cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006029cat >conftest.$ac_ext <<_ACEOF
6030#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006031#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006032$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006033#ifdef F77_DUMMY_MAIN
6034# ifdef __cplusplus
6035 extern "C"
6036# endif
6037 int F77_DUMMY_MAIN() { return 1; }
6038#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006039int
6040main ()
6041{
6042static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
6043test_array [0] = 0
6044
6045 ;
6046 return 0;
6047}
6048_ACEOF
6049rm -f conftest.$ac_objext
6050if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6051 (eval $ac_compile) 2>&5
6052 ac_status=$?
6053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6054 (exit $ac_status); } &&
6055 { ac_try='test -s conftest.$ac_objext'
6056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6057 (eval $ac_try) 2>&5
6058 ac_status=$?
6059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6060 (exit $ac_status); }; }; then
6061 ac_hi=-1 ac_mid=-1
6062 while :; do
6063 cat >conftest.$ac_ext <<_ACEOF
6064#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006065#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006066$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006067#ifdef F77_DUMMY_MAIN
6068# ifdef __cplusplus
6069 extern "C"
6070# endif
6071 int F77_DUMMY_MAIN() { return 1; }
6072#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006073int
6074main ()
6075{
6076static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
6077test_array [0] = 0
6078
6079 ;
6080 return 0;
6081}
6082_ACEOF
6083rm -f conftest.$ac_objext
6084if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6085 (eval $ac_compile) 2>&5
6086 ac_status=$?
6087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6088 (exit $ac_status); } &&
6089 { ac_try='test -s conftest.$ac_objext'
6090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6091 (eval $ac_try) 2>&5
6092 ac_status=$?
6093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6094 (exit $ac_status); }; }; then
6095 ac_lo=$ac_mid; break
6096else
6097 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006098cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006099ac_hi=`expr '(' $ac_mid ')' - 1`
6100 if test $ac_mid -le $ac_hi; then
6101 ac_lo= ac_hi=
6102 break
6103 fi
6104 ac_mid=`expr 2 '*' $ac_mid`
6105fi
6106rm -f conftest.$ac_objext conftest.$ac_ext
6107 done
6108else
6109 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006110cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006111ac_lo= ac_hi=
6112fi
6113rm -f conftest.$ac_objext conftest.$ac_ext
6114fi
6115rm -f conftest.$ac_objext conftest.$ac_ext
6116# Binary search between lo and hi bounds.
6117while test "x$ac_lo" != "x$ac_hi"; do
6118 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6119 cat >conftest.$ac_ext <<_ACEOF
6120#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006121#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006122$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006123#ifdef F77_DUMMY_MAIN
6124# ifdef __cplusplus
6125 extern "C"
6126# endif
6127 int F77_DUMMY_MAIN() { return 1; }
6128#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006129int
6130main ()
6131{
6132static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6133test_array [0] = 0
6134
6135 ;
6136 return 0;
6137}
6138_ACEOF
6139rm -f conftest.$ac_objext
6140if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6141 (eval $ac_compile) 2>&5
6142 ac_status=$?
6143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6144 (exit $ac_status); } &&
6145 { ac_try='test -s conftest.$ac_objext'
6146 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6147 (eval $ac_try) 2>&5
6148 ac_status=$?
6149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6150 (exit $ac_status); }; }; then
6151 ac_hi=$ac_mid
6152else
6153 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006154cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006155ac_lo=`expr '(' $ac_mid ')' + 1`
6156fi
6157rm -f conftest.$ac_objext conftest.$ac_ext
6158done
6159case $ac_lo in
6160?*) ac_cv_sizeof_long=$ac_lo;;
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006161'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
6162echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006163 { (exit 1); exit 1; }; } ;;
6164esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006165else
6166 if test "$cross_compiling" = yes; then
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006167 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6168echo "$as_me: error: cannot run test program while cross compiling" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006169 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006170else
Martin v. Löwis11437992002-04-12 09:54:03 +00006171 cat >conftest.$ac_ext <<_ACEOF
6172#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006173#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006174$ac_includes_default
6175long longval () { return (long) (sizeof (long)); }
6176unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006177#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006178#include <stdlib.h>
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006179#ifdef F77_DUMMY_MAIN
6180# ifdef __cplusplus
6181 extern "C"
6182# endif
6183 int F77_DUMMY_MAIN() { return 1; }
6184#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006185int
6186main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006187{
Martin v. Löwis11437992002-04-12 09:54:03 +00006188
6189 FILE *f = fopen ("conftest.val", "w");
6190 if (! f)
6191 exit (1);
6192 if (((long) (sizeof (long))) < 0)
6193 {
6194 long i = longval ();
6195 if (i != ((long) (sizeof (long))))
6196 exit (1);
6197 fprintf (f, "%ld\n", i);
6198 }
6199 else
6200 {
6201 unsigned long i = ulongval ();
6202 if (i != ((long) (sizeof (long))))
6203 exit (1);
6204 fprintf (f, "%lu\n", i);
6205 }
6206 exit (ferror (f) || fclose (f) != 0);
6207
6208 ;
6209 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006210}
Martin v. Löwis11437992002-04-12 09:54:03 +00006211_ACEOF
6212rm -f conftest$ac_exeext
6213if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6214 (eval $ac_link) 2>&5
6215 ac_status=$?
6216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6217 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6218 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6219 (eval $ac_try) 2>&5
6220 ac_status=$?
6221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6222 (exit $ac_status); }; }; then
6223 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006224else
Martin v. Löwis11437992002-04-12 09:54:03 +00006225 echo "$as_me: program exited with status $ac_status" >&5
6226echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006227cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006228( exit $ac_status )
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006229{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
6230echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006231 { (exit 1); exit 1; }; }
6232fi
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006233rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006234fi
6235fi
6236rm -f conftest.val
6237else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006238 ac_cv_sizeof_long=0
6239fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006240fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006241echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6242echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6243cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006244#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006245_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006246
6247
Martin v. Löwis11437992002-04-12 09:54:03 +00006248echo "$as_me:$LINENO: checking for void *" >&5
6249echo $ECHO_N "checking for void *... $ECHO_C" >&6
6250if test "${ac_cv_type_void_p+set}" = set; then
6251 echo $ECHO_N "(cached) $ECHO_C" >&6
6252else
6253 cat >conftest.$ac_ext <<_ACEOF
6254#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006255#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006256$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006257#ifdef F77_DUMMY_MAIN
6258# ifdef __cplusplus
6259 extern "C"
6260# endif
6261 int F77_DUMMY_MAIN() { return 1; }
6262#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006263int
6264main ()
6265{
6266if ((void * *) 0)
6267 return 0;
6268if (sizeof (void *))
6269 return 0;
6270 ;
6271 return 0;
6272}
6273_ACEOF
6274rm -f conftest.$ac_objext
6275if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6276 (eval $ac_compile) 2>&5
6277 ac_status=$?
6278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6279 (exit $ac_status); } &&
6280 { ac_try='test -s conftest.$ac_objext'
6281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6282 (eval $ac_try) 2>&5
6283 ac_status=$?
6284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6285 (exit $ac_status); }; }; then
6286 ac_cv_type_void_p=yes
6287else
6288 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006289cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006290ac_cv_type_void_p=no
6291fi
6292rm -f conftest.$ac_objext conftest.$ac_ext
6293fi
6294echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
6295echo "${ECHO_T}$ac_cv_type_void_p" >&6
6296
6297echo "$as_me:$LINENO: checking size of void *" >&5
6298echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6299if test "${ac_cv_sizeof_void_p+set}" = set; then
6300 echo $ECHO_N "(cached) $ECHO_C" >&6
6301else
6302 if test "$ac_cv_type_void_p" = yes; then
6303 # The cast to unsigned long works around a bug in the HP C Compiler
6304 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6305 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6306 # This bug is HP SR number 8606223364.
6307 if test "$cross_compiling" = yes; then
6308 # Depending upon the size, compute the lo and hi bounds.
6309cat >conftest.$ac_ext <<_ACEOF
6310#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006311#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006312$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006313#ifdef F77_DUMMY_MAIN
6314# ifdef __cplusplus
6315 extern "C"
6316# endif
6317 int F77_DUMMY_MAIN() { return 1; }
6318#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006319int
6320main ()
6321{
6322static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
6323test_array [0] = 0
6324
6325 ;
6326 return 0;
6327}
6328_ACEOF
6329rm -f conftest.$ac_objext
6330if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6331 (eval $ac_compile) 2>&5
6332 ac_status=$?
6333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6334 (exit $ac_status); } &&
6335 { ac_try='test -s conftest.$ac_objext'
6336 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6337 (eval $ac_try) 2>&5
6338 ac_status=$?
6339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6340 (exit $ac_status); }; }; then
6341 ac_lo=0 ac_mid=0
6342 while :; do
6343 cat >conftest.$ac_ext <<_ACEOF
6344#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006345#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006346$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006347#ifdef F77_DUMMY_MAIN
6348# ifdef __cplusplus
6349 extern "C"
6350# endif
6351 int F77_DUMMY_MAIN() { return 1; }
6352#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006353int
6354main ()
6355{
6356static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6357test_array [0] = 0
6358
6359 ;
6360 return 0;
6361}
6362_ACEOF
6363rm -f conftest.$ac_objext
6364if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6365 (eval $ac_compile) 2>&5
6366 ac_status=$?
6367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6368 (exit $ac_status); } &&
6369 { ac_try='test -s conftest.$ac_objext'
6370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6371 (eval $ac_try) 2>&5
6372 ac_status=$?
6373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6374 (exit $ac_status); }; }; then
6375 ac_hi=$ac_mid; break
6376else
6377 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006378cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006379ac_lo=`expr $ac_mid + 1`
6380 if test $ac_lo -le $ac_mid; then
6381 ac_lo= ac_hi=
6382 break
6383 fi
6384 ac_mid=`expr 2 '*' $ac_mid + 1`
6385fi
6386rm -f conftest.$ac_objext conftest.$ac_ext
6387 done
6388else
6389 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006390cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006391cat >conftest.$ac_ext <<_ACEOF
6392#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006393#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006394$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006395#ifdef F77_DUMMY_MAIN
6396# ifdef __cplusplus
6397 extern "C"
6398# endif
6399 int F77_DUMMY_MAIN() { return 1; }
6400#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006401int
6402main ()
6403{
6404static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6405test_array [0] = 0
6406
6407 ;
6408 return 0;
6409}
6410_ACEOF
6411rm -f conftest.$ac_objext
6412if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6413 (eval $ac_compile) 2>&5
6414 ac_status=$?
6415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6416 (exit $ac_status); } &&
6417 { ac_try='test -s conftest.$ac_objext'
6418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6419 (eval $ac_try) 2>&5
6420 ac_status=$?
6421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6422 (exit $ac_status); }; }; then
6423 ac_hi=-1 ac_mid=-1
6424 while :; do
6425 cat >conftest.$ac_ext <<_ACEOF
6426#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006427#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006428$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006429#ifdef F77_DUMMY_MAIN
6430# ifdef __cplusplus
6431 extern "C"
6432# endif
6433 int F77_DUMMY_MAIN() { return 1; }
6434#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006435int
6436main ()
6437{
6438static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6439test_array [0] = 0
6440
6441 ;
6442 return 0;
6443}
6444_ACEOF
6445rm -f conftest.$ac_objext
6446if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6447 (eval $ac_compile) 2>&5
6448 ac_status=$?
6449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6450 (exit $ac_status); } &&
6451 { ac_try='test -s conftest.$ac_objext'
6452 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6453 (eval $ac_try) 2>&5
6454 ac_status=$?
6455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6456 (exit $ac_status); }; }; then
6457 ac_lo=$ac_mid; break
6458else
6459 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006460cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006461ac_hi=`expr '(' $ac_mid ')' - 1`
6462 if test $ac_mid -le $ac_hi; then
6463 ac_lo= ac_hi=
6464 break
6465 fi
6466 ac_mid=`expr 2 '*' $ac_mid`
6467fi
6468rm -f conftest.$ac_objext conftest.$ac_ext
6469 done
6470else
6471 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006472cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006473ac_lo= ac_hi=
6474fi
6475rm -f conftest.$ac_objext conftest.$ac_ext
6476fi
6477rm -f conftest.$ac_objext conftest.$ac_ext
6478# Binary search between lo and hi bounds.
6479while test "x$ac_lo" != "x$ac_hi"; do
6480 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6481 cat >conftest.$ac_ext <<_ACEOF
6482#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006483#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006484$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006485#ifdef F77_DUMMY_MAIN
6486# ifdef __cplusplus
6487 extern "C"
6488# endif
6489 int F77_DUMMY_MAIN() { return 1; }
6490#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006491int
6492main ()
6493{
6494static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6495test_array [0] = 0
6496
6497 ;
6498 return 0;
6499}
6500_ACEOF
6501rm -f conftest.$ac_objext
6502if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6503 (eval $ac_compile) 2>&5
6504 ac_status=$?
6505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6506 (exit $ac_status); } &&
6507 { ac_try='test -s conftest.$ac_objext'
6508 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6509 (eval $ac_try) 2>&5
6510 ac_status=$?
6511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6512 (exit $ac_status); }; }; then
6513 ac_hi=$ac_mid
6514else
6515 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006516cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006517ac_lo=`expr '(' $ac_mid ')' + 1`
6518fi
6519rm -f conftest.$ac_objext conftest.$ac_ext
6520done
6521case $ac_lo in
6522?*) ac_cv_sizeof_void_p=$ac_lo;;
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006523'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6524echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006525 { (exit 1); exit 1; }; } ;;
6526esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006527else
6528 if test "$cross_compiling" = yes; then
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006529 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6530echo "$as_me: error: cannot run test program while cross compiling" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006531 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006532else
Martin v. Löwis11437992002-04-12 09:54:03 +00006533 cat >conftest.$ac_ext <<_ACEOF
6534#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006535#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006536$ac_includes_default
6537long longval () { return (long) (sizeof (void *)); }
6538unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006539#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006540#include <stdlib.h>
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006541#ifdef F77_DUMMY_MAIN
6542# ifdef __cplusplus
6543 extern "C"
6544# endif
6545 int F77_DUMMY_MAIN() { return 1; }
6546#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006547int
6548main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006549{
Martin v. Löwis11437992002-04-12 09:54:03 +00006550
6551 FILE *f = fopen ("conftest.val", "w");
6552 if (! f)
6553 exit (1);
6554 if (((long) (sizeof (void *))) < 0)
6555 {
6556 long i = longval ();
6557 if (i != ((long) (sizeof (void *))))
6558 exit (1);
6559 fprintf (f, "%ld\n", i);
6560 }
6561 else
6562 {
6563 unsigned long i = ulongval ();
6564 if (i != ((long) (sizeof (void *))))
6565 exit (1);
6566 fprintf (f, "%lu\n", i);
6567 }
6568 exit (ferror (f) || fclose (f) != 0);
6569
6570 ;
6571 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006572}
Martin v. Löwis11437992002-04-12 09:54:03 +00006573_ACEOF
6574rm -f conftest$ac_exeext
6575if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6576 (eval $ac_link) 2>&5
6577 ac_status=$?
6578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6579 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6581 (eval $ac_try) 2>&5
6582 ac_status=$?
6583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6584 (exit $ac_status); }; }; then
6585 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006586else
Martin v. Löwis11437992002-04-12 09:54:03 +00006587 echo "$as_me: program exited with status $ac_status" >&5
6588echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006589cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006590( exit $ac_status )
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006591{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6592echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006593 { (exit 1); exit 1; }; }
6594fi
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006595rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006596fi
6597fi
6598rm -f conftest.val
6599else
Guido van Rossumad678af1998-10-02 14:42:15 +00006600 ac_cv_sizeof_void_p=0
6601fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006602fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006603echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6604echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6605cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006606#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006607_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006608
6609
Martin v. Löwis11437992002-04-12 09:54:03 +00006610echo "$as_me:$LINENO: checking for char" >&5
6611echo $ECHO_N "checking for char... $ECHO_C" >&6
6612if test "${ac_cv_type_char+set}" = set; then
6613 echo $ECHO_N "(cached) $ECHO_C" >&6
6614else
6615 cat >conftest.$ac_ext <<_ACEOF
6616#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006617#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006618$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006619#ifdef F77_DUMMY_MAIN
6620# ifdef __cplusplus
6621 extern "C"
6622# endif
6623 int F77_DUMMY_MAIN() { return 1; }
6624#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006625int
6626main ()
6627{
6628if ((char *) 0)
6629 return 0;
6630if (sizeof (char))
6631 return 0;
6632 ;
6633 return 0;
6634}
6635_ACEOF
6636rm -f conftest.$ac_objext
6637if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6638 (eval $ac_compile) 2>&5
6639 ac_status=$?
6640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6641 (exit $ac_status); } &&
6642 { ac_try='test -s conftest.$ac_objext'
6643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6644 (eval $ac_try) 2>&5
6645 ac_status=$?
6646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6647 (exit $ac_status); }; }; then
6648 ac_cv_type_char=yes
6649else
6650 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006651cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006652ac_cv_type_char=no
6653fi
6654rm -f conftest.$ac_objext conftest.$ac_ext
6655fi
6656echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
6657echo "${ECHO_T}$ac_cv_type_char" >&6
6658
6659echo "$as_me:$LINENO: checking size of char" >&5
6660echo $ECHO_N "checking size of char... $ECHO_C" >&6
6661if test "${ac_cv_sizeof_char+set}" = set; then
6662 echo $ECHO_N "(cached) $ECHO_C" >&6
6663else
6664 if test "$ac_cv_type_char" = yes; then
6665 # The cast to unsigned long works around a bug in the HP C Compiler
6666 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6667 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6668 # This bug is HP SR number 8606223364.
6669 if test "$cross_compiling" = yes; then
6670 # Depending upon the size, compute the lo and hi bounds.
6671cat >conftest.$ac_ext <<_ACEOF
6672#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006673#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006674$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006675#ifdef F77_DUMMY_MAIN
6676# ifdef __cplusplus
6677 extern "C"
6678# endif
6679 int F77_DUMMY_MAIN() { return 1; }
6680#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006681int
6682main ()
6683{
6684static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
6685test_array [0] = 0
6686
6687 ;
6688 return 0;
6689}
6690_ACEOF
6691rm -f conftest.$ac_objext
6692if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6693 (eval $ac_compile) 2>&5
6694 ac_status=$?
6695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6696 (exit $ac_status); } &&
6697 { ac_try='test -s conftest.$ac_objext'
6698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6699 (eval $ac_try) 2>&5
6700 ac_status=$?
6701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6702 (exit $ac_status); }; }; then
6703 ac_lo=0 ac_mid=0
6704 while :; do
6705 cat >conftest.$ac_ext <<_ACEOF
6706#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006707#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006708$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006709#ifdef F77_DUMMY_MAIN
6710# ifdef __cplusplus
6711 extern "C"
6712# endif
6713 int F77_DUMMY_MAIN() { return 1; }
6714#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006715int
6716main ()
6717{
6718static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6719test_array [0] = 0
6720
6721 ;
6722 return 0;
6723}
6724_ACEOF
6725rm -f conftest.$ac_objext
6726if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6727 (eval $ac_compile) 2>&5
6728 ac_status=$?
6729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6730 (exit $ac_status); } &&
6731 { ac_try='test -s conftest.$ac_objext'
6732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6733 (eval $ac_try) 2>&5
6734 ac_status=$?
6735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6736 (exit $ac_status); }; }; then
6737 ac_hi=$ac_mid; break
6738else
6739 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006740cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006741ac_lo=`expr $ac_mid + 1`
6742 if test $ac_lo -le $ac_mid; then
6743 ac_lo= ac_hi=
6744 break
6745 fi
6746 ac_mid=`expr 2 '*' $ac_mid + 1`
6747fi
6748rm -f conftest.$ac_objext conftest.$ac_ext
6749 done
6750else
6751 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006752cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006753cat >conftest.$ac_ext <<_ACEOF
6754#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006755#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006756$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006757#ifdef F77_DUMMY_MAIN
6758# ifdef __cplusplus
6759 extern "C"
6760# endif
6761 int F77_DUMMY_MAIN() { return 1; }
6762#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006763int
6764main ()
6765{
6766static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
6767test_array [0] = 0
6768
6769 ;
6770 return 0;
6771}
6772_ACEOF
6773rm -f conftest.$ac_objext
6774if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6775 (eval $ac_compile) 2>&5
6776 ac_status=$?
6777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6778 (exit $ac_status); } &&
6779 { ac_try='test -s conftest.$ac_objext'
6780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6781 (eval $ac_try) 2>&5
6782 ac_status=$?
6783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6784 (exit $ac_status); }; }; then
6785 ac_hi=-1 ac_mid=-1
6786 while :; do
6787 cat >conftest.$ac_ext <<_ACEOF
6788#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006789#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006790$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006791#ifdef F77_DUMMY_MAIN
6792# ifdef __cplusplus
6793 extern "C"
6794# endif
6795 int F77_DUMMY_MAIN() { return 1; }
6796#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006797int
6798main ()
6799{
6800static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
6801test_array [0] = 0
6802
6803 ;
6804 return 0;
6805}
6806_ACEOF
6807rm -f conftest.$ac_objext
6808if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6809 (eval $ac_compile) 2>&5
6810 ac_status=$?
6811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6812 (exit $ac_status); } &&
6813 { ac_try='test -s conftest.$ac_objext'
6814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6815 (eval $ac_try) 2>&5
6816 ac_status=$?
6817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6818 (exit $ac_status); }; }; then
6819 ac_lo=$ac_mid; break
6820else
6821 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006822cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006823ac_hi=`expr '(' $ac_mid ')' - 1`
6824 if test $ac_mid -le $ac_hi; then
6825 ac_lo= ac_hi=
6826 break
6827 fi
6828 ac_mid=`expr 2 '*' $ac_mid`
6829fi
6830rm -f conftest.$ac_objext conftest.$ac_ext
6831 done
6832else
6833 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006834cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006835ac_lo= ac_hi=
6836fi
6837rm -f conftest.$ac_objext conftest.$ac_ext
6838fi
6839rm -f conftest.$ac_objext conftest.$ac_ext
6840# Binary search between lo and hi bounds.
6841while test "x$ac_lo" != "x$ac_hi"; do
6842 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6843 cat >conftest.$ac_ext <<_ACEOF
6844#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006845#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006846$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006847#ifdef F77_DUMMY_MAIN
6848# ifdef __cplusplus
6849 extern "C"
6850# endif
6851 int F77_DUMMY_MAIN() { return 1; }
6852#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006853int
6854main ()
6855{
6856static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6857test_array [0] = 0
6858
6859 ;
6860 return 0;
6861}
6862_ACEOF
6863rm -f conftest.$ac_objext
6864if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6865 (eval $ac_compile) 2>&5
6866 ac_status=$?
6867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6868 (exit $ac_status); } &&
6869 { ac_try='test -s conftest.$ac_objext'
6870 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6871 (eval $ac_try) 2>&5
6872 ac_status=$?
6873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6874 (exit $ac_status); }; }; then
6875 ac_hi=$ac_mid
6876else
6877 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006878cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006879ac_lo=`expr '(' $ac_mid ')' + 1`
6880fi
6881rm -f conftest.$ac_objext conftest.$ac_ext
6882done
6883case $ac_lo in
6884?*) ac_cv_sizeof_char=$ac_lo;;
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006885'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6886echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006887 { (exit 1); exit 1; }; } ;;
6888esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006889else
6890 if test "$cross_compiling" = yes; then
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006891 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6892echo "$as_me: error: cannot run test program while cross compiling" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006893 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006894else
Martin v. Löwis11437992002-04-12 09:54:03 +00006895 cat >conftest.$ac_ext <<_ACEOF
6896#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006897#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006898$ac_includes_default
6899long longval () { return (long) (sizeof (char)); }
6900unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006901#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006902#include <stdlib.h>
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006903#ifdef F77_DUMMY_MAIN
6904# ifdef __cplusplus
6905 extern "C"
6906# endif
6907 int F77_DUMMY_MAIN() { return 1; }
6908#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006909int
6910main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006911{
Martin v. Löwis11437992002-04-12 09:54:03 +00006912
6913 FILE *f = fopen ("conftest.val", "w");
6914 if (! f)
6915 exit (1);
6916 if (((long) (sizeof (char))) < 0)
6917 {
6918 long i = longval ();
6919 if (i != ((long) (sizeof (char))))
6920 exit (1);
6921 fprintf (f, "%ld\n", i);
6922 }
6923 else
6924 {
6925 unsigned long i = ulongval ();
6926 if (i != ((long) (sizeof (char))))
6927 exit (1);
6928 fprintf (f, "%lu\n", i);
6929 }
6930 exit (ferror (f) || fclose (f) != 0);
6931
6932 ;
6933 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006934}
Martin v. Löwis11437992002-04-12 09:54:03 +00006935_ACEOF
6936rm -f conftest$ac_exeext
6937if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6938 (eval $ac_link) 2>&5
6939 ac_status=$?
6940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6941 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6943 (eval $ac_try) 2>&5
6944 ac_status=$?
6945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6946 (exit $ac_status); }; }; then
6947 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006948else
Martin v. Löwis11437992002-04-12 09:54:03 +00006949 echo "$as_me: program exited with status $ac_status" >&5
6950echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006951cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006952( exit $ac_status )
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006953{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6954echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006955 { (exit 1); exit 1; }; }
6956fi
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006957rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006958fi
6959fi
6960rm -f conftest.val
6961else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006962 ac_cv_sizeof_char=0
6963fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006964fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006965echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6966echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6967cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006968#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006969_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006970
6971
Martin v. Löwis11437992002-04-12 09:54:03 +00006972echo "$as_me:$LINENO: checking for short" >&5
6973echo $ECHO_N "checking for short... $ECHO_C" >&6
6974if test "${ac_cv_type_short+set}" = set; then
6975 echo $ECHO_N "(cached) $ECHO_C" >&6
6976else
6977 cat >conftest.$ac_ext <<_ACEOF
6978#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006979#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006980$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00006981#ifdef F77_DUMMY_MAIN
6982# ifdef __cplusplus
6983 extern "C"
6984# endif
6985 int F77_DUMMY_MAIN() { return 1; }
6986#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006987int
6988main ()
6989{
6990if ((short *) 0)
6991 return 0;
6992if (sizeof (short))
6993 return 0;
6994 ;
6995 return 0;
6996}
6997_ACEOF
6998rm -f conftest.$ac_objext
6999if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7000 (eval $ac_compile) 2>&5
7001 ac_status=$?
7002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7003 (exit $ac_status); } &&
7004 { ac_try='test -s conftest.$ac_objext'
7005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7006 (eval $ac_try) 2>&5
7007 ac_status=$?
7008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7009 (exit $ac_status); }; }; then
7010 ac_cv_type_short=yes
7011else
7012 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007013cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007014ac_cv_type_short=no
7015fi
7016rm -f conftest.$ac_objext conftest.$ac_ext
7017fi
7018echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
7019echo "${ECHO_T}$ac_cv_type_short" >&6
7020
7021echo "$as_me:$LINENO: checking size of short" >&5
7022echo $ECHO_N "checking size of short... $ECHO_C" >&6
7023if test "${ac_cv_sizeof_short+set}" = set; then
7024 echo $ECHO_N "(cached) $ECHO_C" >&6
7025else
7026 if test "$ac_cv_type_short" = yes; then
7027 # The cast to unsigned long works around a bug in the HP C Compiler
7028 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7029 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7030 # This bug is HP SR number 8606223364.
7031 if test "$cross_compiling" = yes; then
7032 # Depending upon the size, compute the lo and hi bounds.
7033cat >conftest.$ac_ext <<_ACEOF
7034#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007035#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007036$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007037#ifdef F77_DUMMY_MAIN
7038# ifdef __cplusplus
7039 extern "C"
7040# endif
7041 int F77_DUMMY_MAIN() { return 1; }
7042#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007043int
7044main ()
7045{
7046static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
7047test_array [0] = 0
7048
7049 ;
7050 return 0;
7051}
7052_ACEOF
7053rm -f conftest.$ac_objext
7054if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7055 (eval $ac_compile) 2>&5
7056 ac_status=$?
7057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7058 (exit $ac_status); } &&
7059 { ac_try='test -s conftest.$ac_objext'
7060 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7061 (eval $ac_try) 2>&5
7062 ac_status=$?
7063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7064 (exit $ac_status); }; }; then
7065 ac_lo=0 ac_mid=0
7066 while :; do
7067 cat >conftest.$ac_ext <<_ACEOF
7068#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007069#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007070$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007071#ifdef F77_DUMMY_MAIN
7072# ifdef __cplusplus
7073 extern "C"
7074# endif
7075 int F77_DUMMY_MAIN() { return 1; }
7076#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007077int
7078main ()
7079{
7080static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7081test_array [0] = 0
7082
7083 ;
7084 return 0;
7085}
7086_ACEOF
7087rm -f conftest.$ac_objext
7088if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7089 (eval $ac_compile) 2>&5
7090 ac_status=$?
7091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7092 (exit $ac_status); } &&
7093 { ac_try='test -s conftest.$ac_objext'
7094 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7095 (eval $ac_try) 2>&5
7096 ac_status=$?
7097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7098 (exit $ac_status); }; }; then
7099 ac_hi=$ac_mid; break
7100else
7101 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007102cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007103ac_lo=`expr $ac_mid + 1`
7104 if test $ac_lo -le $ac_mid; then
7105 ac_lo= ac_hi=
7106 break
7107 fi
7108 ac_mid=`expr 2 '*' $ac_mid + 1`
7109fi
7110rm -f conftest.$ac_objext conftest.$ac_ext
7111 done
7112else
7113 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007114cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007115cat >conftest.$ac_ext <<_ACEOF
7116#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007117#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007118$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007119#ifdef F77_DUMMY_MAIN
7120# ifdef __cplusplus
7121 extern "C"
7122# endif
7123 int F77_DUMMY_MAIN() { return 1; }
7124#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007125int
7126main ()
7127{
7128static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
7129test_array [0] = 0
7130
7131 ;
7132 return 0;
7133}
7134_ACEOF
7135rm -f conftest.$ac_objext
7136if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7137 (eval $ac_compile) 2>&5
7138 ac_status=$?
7139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7140 (exit $ac_status); } &&
7141 { ac_try='test -s conftest.$ac_objext'
7142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7143 (eval $ac_try) 2>&5
7144 ac_status=$?
7145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7146 (exit $ac_status); }; }; then
7147 ac_hi=-1 ac_mid=-1
7148 while :; do
7149 cat >conftest.$ac_ext <<_ACEOF
7150#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007151#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007152$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007153#ifdef F77_DUMMY_MAIN
7154# ifdef __cplusplus
7155 extern "C"
7156# endif
7157 int F77_DUMMY_MAIN() { return 1; }
7158#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007159int
7160main ()
7161{
7162static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
7163test_array [0] = 0
7164
7165 ;
7166 return 0;
7167}
7168_ACEOF
7169rm -f conftest.$ac_objext
7170if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7171 (eval $ac_compile) 2>&5
7172 ac_status=$?
7173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7174 (exit $ac_status); } &&
7175 { ac_try='test -s conftest.$ac_objext'
7176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7177 (eval $ac_try) 2>&5
7178 ac_status=$?
7179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7180 (exit $ac_status); }; }; then
7181 ac_lo=$ac_mid; break
7182else
7183 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007184cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007185ac_hi=`expr '(' $ac_mid ')' - 1`
7186 if test $ac_mid -le $ac_hi; then
7187 ac_lo= ac_hi=
7188 break
7189 fi
7190 ac_mid=`expr 2 '*' $ac_mid`
7191fi
7192rm -f conftest.$ac_objext conftest.$ac_ext
7193 done
7194else
7195 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007196cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007197ac_lo= ac_hi=
7198fi
7199rm -f conftest.$ac_objext conftest.$ac_ext
7200fi
7201rm -f conftest.$ac_objext conftest.$ac_ext
7202# Binary search between lo and hi bounds.
7203while test "x$ac_lo" != "x$ac_hi"; do
7204 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7205 cat >conftest.$ac_ext <<_ACEOF
7206#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007207#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007208$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007209#ifdef F77_DUMMY_MAIN
7210# ifdef __cplusplus
7211 extern "C"
7212# endif
7213 int F77_DUMMY_MAIN() { return 1; }
7214#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007215int
7216main ()
7217{
7218static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7219test_array [0] = 0
7220
7221 ;
7222 return 0;
7223}
7224_ACEOF
7225rm -f conftest.$ac_objext
7226if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7227 (eval $ac_compile) 2>&5
7228 ac_status=$?
7229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7230 (exit $ac_status); } &&
7231 { ac_try='test -s conftest.$ac_objext'
7232 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7233 (eval $ac_try) 2>&5
7234 ac_status=$?
7235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7236 (exit $ac_status); }; }; then
7237 ac_hi=$ac_mid
7238else
7239 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007240cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007241ac_lo=`expr '(' $ac_mid ')' + 1`
7242fi
7243rm -f conftest.$ac_objext conftest.$ac_ext
7244done
7245case $ac_lo in
7246?*) ac_cv_sizeof_short=$ac_lo;;
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007247'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
7248echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007249 { (exit 1); exit 1; }; } ;;
7250esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007251else
7252 if test "$cross_compiling" = yes; then
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007253 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7254echo "$as_me: error: cannot run test program while cross compiling" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007255 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007256else
Martin v. Löwis11437992002-04-12 09:54:03 +00007257 cat >conftest.$ac_ext <<_ACEOF
7258#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007259#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007260$ac_includes_default
7261long longval () { return (long) (sizeof (short)); }
7262unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007263#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007264#include <stdlib.h>
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007265#ifdef F77_DUMMY_MAIN
7266# ifdef __cplusplus
7267 extern "C"
7268# endif
7269 int F77_DUMMY_MAIN() { return 1; }
7270#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007271int
7272main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007273{
Martin v. Löwis11437992002-04-12 09:54:03 +00007274
7275 FILE *f = fopen ("conftest.val", "w");
7276 if (! f)
7277 exit (1);
7278 if (((long) (sizeof (short))) < 0)
7279 {
7280 long i = longval ();
7281 if (i != ((long) (sizeof (short))))
7282 exit (1);
7283 fprintf (f, "%ld\n", i);
7284 }
7285 else
7286 {
7287 unsigned long i = ulongval ();
7288 if (i != ((long) (sizeof (short))))
7289 exit (1);
7290 fprintf (f, "%lu\n", i);
7291 }
7292 exit (ferror (f) || fclose (f) != 0);
7293
7294 ;
7295 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007296}
Martin v. Löwis11437992002-04-12 09:54:03 +00007297_ACEOF
7298rm -f conftest$ac_exeext
7299if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7300 (eval $ac_link) 2>&5
7301 ac_status=$?
7302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7303 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7304 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7305 (eval $ac_try) 2>&5
7306 ac_status=$?
7307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7308 (exit $ac_status); }; }; then
7309 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007310else
Martin v. Löwis11437992002-04-12 09:54:03 +00007311 echo "$as_me: program exited with status $ac_status" >&5
7312echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007313cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007314( exit $ac_status )
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007315{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
7316echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007317 { (exit 1); exit 1; }; }
7318fi
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007319rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007320fi
7321fi
7322rm -f conftest.val
7323else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007324 ac_cv_sizeof_short=0
7325fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007326fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007327echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7328echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7329cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007330#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007331_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007332
7333
Martin v. Löwis11437992002-04-12 09:54:03 +00007334echo "$as_me:$LINENO: checking for float" >&5
7335echo $ECHO_N "checking for float... $ECHO_C" >&6
7336if test "${ac_cv_type_float+set}" = set; then
7337 echo $ECHO_N "(cached) $ECHO_C" >&6
7338else
7339 cat >conftest.$ac_ext <<_ACEOF
7340#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007341#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007342$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007343#ifdef F77_DUMMY_MAIN
7344# ifdef __cplusplus
7345 extern "C"
7346# endif
7347 int F77_DUMMY_MAIN() { return 1; }
7348#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007349int
7350main ()
7351{
7352if ((float *) 0)
7353 return 0;
7354if (sizeof (float))
7355 return 0;
7356 ;
7357 return 0;
7358}
7359_ACEOF
7360rm -f conftest.$ac_objext
7361if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7362 (eval $ac_compile) 2>&5
7363 ac_status=$?
7364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7365 (exit $ac_status); } &&
7366 { ac_try='test -s conftest.$ac_objext'
7367 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7368 (eval $ac_try) 2>&5
7369 ac_status=$?
7370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7371 (exit $ac_status); }; }; then
7372 ac_cv_type_float=yes
7373else
7374 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007375cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007376ac_cv_type_float=no
7377fi
7378rm -f conftest.$ac_objext conftest.$ac_ext
7379fi
7380echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7381echo "${ECHO_T}$ac_cv_type_float" >&6
7382
7383echo "$as_me:$LINENO: checking size of float" >&5
7384echo $ECHO_N "checking size of float... $ECHO_C" >&6
7385if test "${ac_cv_sizeof_float+set}" = set; then
7386 echo $ECHO_N "(cached) $ECHO_C" >&6
7387else
7388 if test "$ac_cv_type_float" = yes; then
7389 # The cast to unsigned long works around a bug in the HP C Compiler
7390 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7391 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7392 # This bug is HP SR number 8606223364.
7393 if test "$cross_compiling" = yes; then
7394 # Depending upon the size, compute the lo and hi bounds.
7395cat >conftest.$ac_ext <<_ACEOF
7396#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007397#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007398$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007399#ifdef F77_DUMMY_MAIN
7400# ifdef __cplusplus
7401 extern "C"
7402# endif
7403 int F77_DUMMY_MAIN() { return 1; }
7404#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007405int
7406main ()
7407{
7408static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7409test_array [0] = 0
7410
7411 ;
7412 return 0;
7413}
7414_ACEOF
7415rm -f conftest.$ac_objext
7416if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7417 (eval $ac_compile) 2>&5
7418 ac_status=$?
7419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7420 (exit $ac_status); } &&
7421 { ac_try='test -s conftest.$ac_objext'
7422 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7423 (eval $ac_try) 2>&5
7424 ac_status=$?
7425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7426 (exit $ac_status); }; }; then
7427 ac_lo=0 ac_mid=0
7428 while :; do
7429 cat >conftest.$ac_ext <<_ACEOF
7430#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007431#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007432$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007433#ifdef F77_DUMMY_MAIN
7434# ifdef __cplusplus
7435 extern "C"
7436# endif
7437 int F77_DUMMY_MAIN() { return 1; }
7438#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007439int
7440main ()
7441{
7442static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7443test_array [0] = 0
7444
7445 ;
7446 return 0;
7447}
7448_ACEOF
7449rm -f conftest.$ac_objext
7450if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7451 (eval $ac_compile) 2>&5
7452 ac_status=$?
7453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7454 (exit $ac_status); } &&
7455 { ac_try='test -s conftest.$ac_objext'
7456 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7457 (eval $ac_try) 2>&5
7458 ac_status=$?
7459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7460 (exit $ac_status); }; }; then
7461 ac_hi=$ac_mid; break
7462else
7463 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007464cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007465ac_lo=`expr $ac_mid + 1`
7466 if test $ac_lo -le $ac_mid; then
7467 ac_lo= ac_hi=
7468 break
7469 fi
7470 ac_mid=`expr 2 '*' $ac_mid + 1`
7471fi
7472rm -f conftest.$ac_objext conftest.$ac_ext
7473 done
7474else
7475 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007476cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007477cat >conftest.$ac_ext <<_ACEOF
7478#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007479#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007480$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007481#ifdef F77_DUMMY_MAIN
7482# ifdef __cplusplus
7483 extern "C"
7484# endif
7485 int F77_DUMMY_MAIN() { return 1; }
7486#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007487int
7488main ()
7489{
7490static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7491test_array [0] = 0
7492
7493 ;
7494 return 0;
7495}
7496_ACEOF
7497rm -f conftest.$ac_objext
7498if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7499 (eval $ac_compile) 2>&5
7500 ac_status=$?
7501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7502 (exit $ac_status); } &&
7503 { ac_try='test -s conftest.$ac_objext'
7504 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7505 (eval $ac_try) 2>&5
7506 ac_status=$?
7507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7508 (exit $ac_status); }; }; then
7509 ac_hi=-1 ac_mid=-1
7510 while :; do
7511 cat >conftest.$ac_ext <<_ACEOF
7512#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007513#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007514$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007515#ifdef F77_DUMMY_MAIN
7516# ifdef __cplusplus
7517 extern "C"
7518# endif
7519 int F77_DUMMY_MAIN() { return 1; }
7520#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007521int
7522main ()
7523{
7524static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7525test_array [0] = 0
7526
7527 ;
7528 return 0;
7529}
7530_ACEOF
7531rm -f conftest.$ac_objext
7532if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7533 (eval $ac_compile) 2>&5
7534 ac_status=$?
7535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7536 (exit $ac_status); } &&
7537 { ac_try='test -s conftest.$ac_objext'
7538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7539 (eval $ac_try) 2>&5
7540 ac_status=$?
7541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7542 (exit $ac_status); }; }; then
7543 ac_lo=$ac_mid; break
7544else
7545 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007546cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007547ac_hi=`expr '(' $ac_mid ')' - 1`
7548 if test $ac_mid -le $ac_hi; then
7549 ac_lo= ac_hi=
7550 break
7551 fi
7552 ac_mid=`expr 2 '*' $ac_mid`
7553fi
7554rm -f conftest.$ac_objext conftest.$ac_ext
7555 done
7556else
7557 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007558cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007559ac_lo= ac_hi=
7560fi
7561rm -f conftest.$ac_objext conftest.$ac_ext
7562fi
7563rm -f conftest.$ac_objext conftest.$ac_ext
7564# Binary search between lo and hi bounds.
7565while test "x$ac_lo" != "x$ac_hi"; do
7566 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7567 cat >conftest.$ac_ext <<_ACEOF
7568#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007569#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007570$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007571#ifdef F77_DUMMY_MAIN
7572# ifdef __cplusplus
7573 extern "C"
7574# endif
7575 int F77_DUMMY_MAIN() { return 1; }
7576#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007577int
7578main ()
7579{
7580static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7581test_array [0] = 0
7582
7583 ;
7584 return 0;
7585}
7586_ACEOF
7587rm -f conftest.$ac_objext
7588if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7589 (eval $ac_compile) 2>&5
7590 ac_status=$?
7591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7592 (exit $ac_status); } &&
7593 { ac_try='test -s conftest.$ac_objext'
7594 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7595 (eval $ac_try) 2>&5
7596 ac_status=$?
7597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7598 (exit $ac_status); }; }; then
7599 ac_hi=$ac_mid
7600else
7601 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007602cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007603ac_lo=`expr '(' $ac_mid ')' + 1`
7604fi
7605rm -f conftest.$ac_objext conftest.$ac_ext
7606done
7607case $ac_lo in
7608?*) ac_cv_sizeof_float=$ac_lo;;
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007609'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7610echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007611 { (exit 1); exit 1; }; } ;;
7612esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007613else
7614 if test "$cross_compiling" = yes; then
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007615 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7616echo "$as_me: error: cannot run test program while cross compiling" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007617 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007618else
Martin v. Löwis11437992002-04-12 09:54:03 +00007619 cat >conftest.$ac_ext <<_ACEOF
7620#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007621#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007622$ac_includes_default
7623long longval () { return (long) (sizeof (float)); }
7624unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007625#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007626#include <stdlib.h>
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007627#ifdef F77_DUMMY_MAIN
7628# ifdef __cplusplus
7629 extern "C"
7630# endif
7631 int F77_DUMMY_MAIN() { return 1; }
7632#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007633int
7634main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007635{
Martin v. Löwis11437992002-04-12 09:54:03 +00007636
7637 FILE *f = fopen ("conftest.val", "w");
7638 if (! f)
7639 exit (1);
7640 if (((long) (sizeof (float))) < 0)
7641 {
7642 long i = longval ();
7643 if (i != ((long) (sizeof (float))))
7644 exit (1);
7645 fprintf (f, "%ld\n", i);
7646 }
7647 else
7648 {
7649 unsigned long i = ulongval ();
7650 if (i != ((long) (sizeof (float))))
7651 exit (1);
7652 fprintf (f, "%lu\n", i);
7653 }
7654 exit (ferror (f) || fclose (f) != 0);
7655
7656 ;
7657 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007658}
Martin v. Löwis11437992002-04-12 09:54:03 +00007659_ACEOF
7660rm -f conftest$ac_exeext
7661if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7662 (eval $ac_link) 2>&5
7663 ac_status=$?
7664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7665 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7667 (eval $ac_try) 2>&5
7668 ac_status=$?
7669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7670 (exit $ac_status); }; }; then
7671 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007672else
Martin v. Löwis11437992002-04-12 09:54:03 +00007673 echo "$as_me: program exited with status $ac_status" >&5
7674echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007675cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007676( exit $ac_status )
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007677{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7678echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007679 { (exit 1); exit 1; }; }
7680fi
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007681rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007682fi
7683fi
7684rm -f conftest.val
7685else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007686 ac_cv_sizeof_float=0
7687fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007688fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007689echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7690echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7691cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007692#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007693_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007694
7695
Martin v. Löwis11437992002-04-12 09:54:03 +00007696echo "$as_me:$LINENO: checking for double" >&5
7697echo $ECHO_N "checking for double... $ECHO_C" >&6
7698if test "${ac_cv_type_double+set}" = set; then
7699 echo $ECHO_N "(cached) $ECHO_C" >&6
7700else
7701 cat >conftest.$ac_ext <<_ACEOF
7702#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007703#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007704$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007705#ifdef F77_DUMMY_MAIN
7706# ifdef __cplusplus
7707 extern "C"
7708# endif
7709 int F77_DUMMY_MAIN() { return 1; }
7710#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007711int
7712main ()
7713{
7714if ((double *) 0)
7715 return 0;
7716if (sizeof (double))
7717 return 0;
7718 ;
7719 return 0;
7720}
7721_ACEOF
7722rm -f conftest.$ac_objext
7723if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7724 (eval $ac_compile) 2>&5
7725 ac_status=$?
7726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7727 (exit $ac_status); } &&
7728 { ac_try='test -s conftest.$ac_objext'
7729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7730 (eval $ac_try) 2>&5
7731 ac_status=$?
7732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7733 (exit $ac_status); }; }; then
7734 ac_cv_type_double=yes
7735else
7736 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007737cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007738ac_cv_type_double=no
7739fi
7740rm -f conftest.$ac_objext conftest.$ac_ext
7741fi
7742echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7743echo "${ECHO_T}$ac_cv_type_double" >&6
7744
7745echo "$as_me:$LINENO: checking size of double" >&5
7746echo $ECHO_N "checking size of double... $ECHO_C" >&6
7747if test "${ac_cv_sizeof_double+set}" = set; then
7748 echo $ECHO_N "(cached) $ECHO_C" >&6
7749else
7750 if test "$ac_cv_type_double" = yes; then
7751 # The cast to unsigned long works around a bug in the HP C Compiler
7752 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7753 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7754 # This bug is HP SR number 8606223364.
7755 if test "$cross_compiling" = yes; then
7756 # Depending upon the size, compute the lo and hi bounds.
7757cat >conftest.$ac_ext <<_ACEOF
7758#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007759#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007760$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007761#ifdef F77_DUMMY_MAIN
7762# ifdef __cplusplus
7763 extern "C"
7764# endif
7765 int F77_DUMMY_MAIN() { return 1; }
7766#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007767int
7768main ()
7769{
7770static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7771test_array [0] = 0
7772
7773 ;
7774 return 0;
7775}
7776_ACEOF
7777rm -f conftest.$ac_objext
7778if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7779 (eval $ac_compile) 2>&5
7780 ac_status=$?
7781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7782 (exit $ac_status); } &&
7783 { ac_try='test -s conftest.$ac_objext'
7784 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7785 (eval $ac_try) 2>&5
7786 ac_status=$?
7787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7788 (exit $ac_status); }; }; then
7789 ac_lo=0 ac_mid=0
7790 while :; do
7791 cat >conftest.$ac_ext <<_ACEOF
7792#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007793#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007794$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007795#ifdef F77_DUMMY_MAIN
7796# ifdef __cplusplus
7797 extern "C"
7798# endif
7799 int F77_DUMMY_MAIN() { return 1; }
7800#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007801int
7802main ()
7803{
7804static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7805test_array [0] = 0
7806
7807 ;
7808 return 0;
7809}
7810_ACEOF
7811rm -f conftest.$ac_objext
7812if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7813 (eval $ac_compile) 2>&5
7814 ac_status=$?
7815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7816 (exit $ac_status); } &&
7817 { ac_try='test -s conftest.$ac_objext'
7818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7819 (eval $ac_try) 2>&5
7820 ac_status=$?
7821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7822 (exit $ac_status); }; }; then
7823 ac_hi=$ac_mid; break
7824else
7825 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007826cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007827ac_lo=`expr $ac_mid + 1`
7828 if test $ac_lo -le $ac_mid; then
7829 ac_lo= ac_hi=
7830 break
7831 fi
7832 ac_mid=`expr 2 '*' $ac_mid + 1`
7833fi
7834rm -f conftest.$ac_objext conftest.$ac_ext
7835 done
7836else
7837 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007838cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007839cat >conftest.$ac_ext <<_ACEOF
7840#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007841#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007842$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007843#ifdef F77_DUMMY_MAIN
7844# ifdef __cplusplus
7845 extern "C"
7846# endif
7847 int F77_DUMMY_MAIN() { return 1; }
7848#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007849int
7850main ()
7851{
7852static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7853test_array [0] = 0
7854
7855 ;
7856 return 0;
7857}
7858_ACEOF
7859rm -f conftest.$ac_objext
7860if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7861 (eval $ac_compile) 2>&5
7862 ac_status=$?
7863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7864 (exit $ac_status); } &&
7865 { ac_try='test -s conftest.$ac_objext'
7866 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7867 (eval $ac_try) 2>&5
7868 ac_status=$?
7869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7870 (exit $ac_status); }; }; then
7871 ac_hi=-1 ac_mid=-1
7872 while :; do
7873 cat >conftest.$ac_ext <<_ACEOF
7874#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007875#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007876$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007877#ifdef F77_DUMMY_MAIN
7878# ifdef __cplusplus
7879 extern "C"
7880# endif
7881 int F77_DUMMY_MAIN() { return 1; }
7882#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007883int
7884main ()
7885{
7886static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7887test_array [0] = 0
7888
7889 ;
7890 return 0;
7891}
7892_ACEOF
7893rm -f conftest.$ac_objext
7894if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7895 (eval $ac_compile) 2>&5
7896 ac_status=$?
7897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7898 (exit $ac_status); } &&
7899 { ac_try='test -s conftest.$ac_objext'
7900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7901 (eval $ac_try) 2>&5
7902 ac_status=$?
7903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7904 (exit $ac_status); }; }; then
7905 ac_lo=$ac_mid; break
7906else
7907 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007908cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007909ac_hi=`expr '(' $ac_mid ')' - 1`
7910 if test $ac_mid -le $ac_hi; then
7911 ac_lo= ac_hi=
7912 break
7913 fi
7914 ac_mid=`expr 2 '*' $ac_mid`
7915fi
7916rm -f conftest.$ac_objext conftest.$ac_ext
7917 done
7918else
7919 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007920cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007921ac_lo= ac_hi=
7922fi
7923rm -f conftest.$ac_objext conftest.$ac_ext
7924fi
7925rm -f conftest.$ac_objext conftest.$ac_ext
7926# Binary search between lo and hi bounds.
7927while test "x$ac_lo" != "x$ac_hi"; do
7928 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7929 cat >conftest.$ac_ext <<_ACEOF
7930#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007931#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007932$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007933#ifdef F77_DUMMY_MAIN
7934# ifdef __cplusplus
7935 extern "C"
7936# endif
7937 int F77_DUMMY_MAIN() { return 1; }
7938#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007939int
7940main ()
7941{
7942static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7943test_array [0] = 0
7944
7945 ;
7946 return 0;
7947}
7948_ACEOF
7949rm -f conftest.$ac_objext
7950if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7951 (eval $ac_compile) 2>&5
7952 ac_status=$?
7953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7954 (exit $ac_status); } &&
7955 { ac_try='test -s conftest.$ac_objext'
7956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7957 (eval $ac_try) 2>&5
7958 ac_status=$?
7959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7960 (exit $ac_status); }; }; then
7961 ac_hi=$ac_mid
7962else
7963 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007964cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007965ac_lo=`expr '(' $ac_mid ')' + 1`
7966fi
7967rm -f conftest.$ac_objext conftest.$ac_ext
7968done
7969case $ac_lo in
7970?*) ac_cv_sizeof_double=$ac_lo;;
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007971'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7972echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007973 { (exit 1); exit 1; }; } ;;
7974esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007975else
7976 if test "$cross_compiling" = yes; then
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007977 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7978echo "$as_me: error: cannot run test program while cross compiling" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007979 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007980else
Martin v. Löwis11437992002-04-12 09:54:03 +00007981 cat >conftest.$ac_ext <<_ACEOF
7982#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007983#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007984$ac_includes_default
7985long longval () { return (long) (sizeof (double)); }
7986unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007987#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007988#include <stdlib.h>
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00007989#ifdef F77_DUMMY_MAIN
7990# ifdef __cplusplus
7991 extern "C"
7992# endif
7993 int F77_DUMMY_MAIN() { return 1; }
7994#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007995int
7996main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007997{
Martin v. Löwis11437992002-04-12 09:54:03 +00007998
7999 FILE *f = fopen ("conftest.val", "w");
8000 if (! f)
8001 exit (1);
8002 if (((long) (sizeof (double))) < 0)
8003 {
8004 long i = longval ();
8005 if (i != ((long) (sizeof (double))))
8006 exit (1);
8007 fprintf (f, "%ld\n", i);
8008 }
8009 else
8010 {
8011 unsigned long i = ulongval ();
8012 if (i != ((long) (sizeof (double))))
8013 exit (1);
8014 fprintf (f, "%lu\n", i);
8015 }
8016 exit (ferror (f) || fclose (f) != 0);
8017
8018 ;
8019 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008020}
Martin v. Löwis11437992002-04-12 09:54:03 +00008021_ACEOF
8022rm -f conftest$ac_exeext
8023if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8024 (eval $ac_link) 2>&5
8025 ac_status=$?
8026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8027 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8029 (eval $ac_try) 2>&5
8030 ac_status=$?
8031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8032 (exit $ac_status); }; }; then
8033 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008034else
Martin v. Löwis11437992002-04-12 09:54:03 +00008035 echo "$as_me: program exited with status $ac_status" >&5
8036echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008037cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008038( exit $ac_status )
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008039{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
8040echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008041 { (exit 1); exit 1; }; }
8042fi
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008043rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008044fi
8045fi
8046rm -f conftest.val
8047else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008048 ac_cv_sizeof_double=0
8049fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008050fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008051echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
8052echo "${ECHO_T}$ac_cv_sizeof_double" >&6
8053cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008054#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008055_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008056
8057
Martin v. Löwis11437992002-04-12 09:54:03 +00008058echo "$as_me:$LINENO: checking for fpos_t" >&5
8059echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
8060if test "${ac_cv_type_fpos_t+set}" = set; then
8061 echo $ECHO_N "(cached) $ECHO_C" >&6
8062else
8063 cat >conftest.$ac_ext <<_ACEOF
8064#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008065#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008066$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008067#ifdef F77_DUMMY_MAIN
8068# ifdef __cplusplus
8069 extern "C"
8070# endif
8071 int F77_DUMMY_MAIN() { return 1; }
8072#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008073int
8074main ()
8075{
8076if ((fpos_t *) 0)
8077 return 0;
8078if (sizeof (fpos_t))
8079 return 0;
8080 ;
8081 return 0;
8082}
8083_ACEOF
8084rm -f conftest.$ac_objext
8085if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8086 (eval $ac_compile) 2>&5
8087 ac_status=$?
8088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8089 (exit $ac_status); } &&
8090 { ac_try='test -s conftest.$ac_objext'
8091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8092 (eval $ac_try) 2>&5
8093 ac_status=$?
8094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8095 (exit $ac_status); }; }; then
8096 ac_cv_type_fpos_t=yes
8097else
8098 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008099cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008100ac_cv_type_fpos_t=no
8101fi
8102rm -f conftest.$ac_objext conftest.$ac_ext
8103fi
8104echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
8105echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
8106
8107echo "$as_me:$LINENO: checking size of fpos_t" >&5
8108echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
8109if test "${ac_cv_sizeof_fpos_t+set}" = set; then
8110 echo $ECHO_N "(cached) $ECHO_C" >&6
8111else
8112 if test "$ac_cv_type_fpos_t" = yes; then
8113 # The cast to unsigned long works around a bug in the HP C Compiler
8114 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8115 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8116 # This bug is HP SR number 8606223364.
8117 if test "$cross_compiling" = yes; then
8118 # Depending upon the size, compute the lo and hi bounds.
8119cat >conftest.$ac_ext <<_ACEOF
8120#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008121#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008122$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008123#ifdef F77_DUMMY_MAIN
8124# ifdef __cplusplus
8125 extern "C"
8126# endif
8127 int F77_DUMMY_MAIN() { return 1; }
8128#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008129int
8130main ()
8131{
8132static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
8133test_array [0] = 0
8134
8135 ;
8136 return 0;
8137}
8138_ACEOF
8139rm -f conftest.$ac_objext
8140if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8141 (eval $ac_compile) 2>&5
8142 ac_status=$?
8143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8144 (exit $ac_status); } &&
8145 { ac_try='test -s conftest.$ac_objext'
8146 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8147 (eval $ac_try) 2>&5
8148 ac_status=$?
8149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8150 (exit $ac_status); }; }; then
8151 ac_lo=0 ac_mid=0
8152 while :; do
8153 cat >conftest.$ac_ext <<_ACEOF
8154#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008155#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008156$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008157#ifdef F77_DUMMY_MAIN
8158# ifdef __cplusplus
8159 extern "C"
8160# endif
8161 int F77_DUMMY_MAIN() { return 1; }
8162#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008163int
8164main ()
8165{
8166static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8167test_array [0] = 0
8168
8169 ;
8170 return 0;
8171}
8172_ACEOF
8173rm -f conftest.$ac_objext
8174if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8175 (eval $ac_compile) 2>&5
8176 ac_status=$?
8177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8178 (exit $ac_status); } &&
8179 { ac_try='test -s conftest.$ac_objext'
8180 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8181 (eval $ac_try) 2>&5
8182 ac_status=$?
8183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8184 (exit $ac_status); }; }; then
8185 ac_hi=$ac_mid; break
8186else
8187 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008188cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008189ac_lo=`expr $ac_mid + 1`
8190 if test $ac_lo -le $ac_mid; then
8191 ac_lo= ac_hi=
8192 break
8193 fi
8194 ac_mid=`expr 2 '*' $ac_mid + 1`
8195fi
8196rm -f conftest.$ac_objext conftest.$ac_ext
8197 done
8198else
8199 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008200cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008201cat >conftest.$ac_ext <<_ACEOF
8202#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008203#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008204$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008205#ifdef F77_DUMMY_MAIN
8206# ifdef __cplusplus
8207 extern "C"
8208# endif
8209 int F77_DUMMY_MAIN() { return 1; }
8210#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008211int
8212main ()
8213{
8214static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
8215test_array [0] = 0
8216
8217 ;
8218 return 0;
8219}
8220_ACEOF
8221rm -f conftest.$ac_objext
8222if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8223 (eval $ac_compile) 2>&5
8224 ac_status=$?
8225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8226 (exit $ac_status); } &&
8227 { ac_try='test -s conftest.$ac_objext'
8228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8229 (eval $ac_try) 2>&5
8230 ac_status=$?
8231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8232 (exit $ac_status); }; }; then
8233 ac_hi=-1 ac_mid=-1
8234 while :; do
8235 cat >conftest.$ac_ext <<_ACEOF
8236#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008237#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008238$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008239#ifdef F77_DUMMY_MAIN
8240# ifdef __cplusplus
8241 extern "C"
8242# endif
8243 int F77_DUMMY_MAIN() { return 1; }
8244#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008245int
8246main ()
8247{
8248static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8249test_array [0] = 0
8250
8251 ;
8252 return 0;
8253}
8254_ACEOF
8255rm -f conftest.$ac_objext
8256if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8257 (eval $ac_compile) 2>&5
8258 ac_status=$?
8259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8260 (exit $ac_status); } &&
8261 { ac_try='test -s conftest.$ac_objext'
8262 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8263 (eval $ac_try) 2>&5
8264 ac_status=$?
8265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8266 (exit $ac_status); }; }; then
8267 ac_lo=$ac_mid; break
8268else
8269 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008270cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008271ac_hi=`expr '(' $ac_mid ')' - 1`
8272 if test $ac_mid -le $ac_hi; then
8273 ac_lo= ac_hi=
8274 break
8275 fi
8276 ac_mid=`expr 2 '*' $ac_mid`
8277fi
8278rm -f conftest.$ac_objext conftest.$ac_ext
8279 done
8280else
8281 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008282cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008283ac_lo= ac_hi=
8284fi
8285rm -f conftest.$ac_objext conftest.$ac_ext
8286fi
8287rm -f conftest.$ac_objext conftest.$ac_ext
8288# Binary search between lo and hi bounds.
8289while test "x$ac_lo" != "x$ac_hi"; do
8290 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8291 cat >conftest.$ac_ext <<_ACEOF
8292#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008293#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008294$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +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{
8304static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8305test_array [0] = 0
8306
8307 ;
8308 return 0;
8309}
8310_ACEOF
8311rm -f conftest.$ac_objext
8312if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8313 (eval $ac_compile) 2>&5
8314 ac_status=$?
8315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8316 (exit $ac_status); } &&
8317 { ac_try='test -s conftest.$ac_objext'
8318 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8319 (eval $ac_try) 2>&5
8320 ac_status=$?
8321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8322 (exit $ac_status); }; }; then
8323 ac_hi=$ac_mid
8324else
8325 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008326cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008327ac_lo=`expr '(' $ac_mid ')' + 1`
8328fi
8329rm -f conftest.$ac_objext conftest.$ac_ext
8330done
8331case $ac_lo in
8332?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008333'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8334echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008335 { (exit 1); exit 1; }; } ;;
8336esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008337else
8338 if test "$cross_compiling" = yes; then
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008339 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8340echo "$as_me: error: cannot run test program while cross compiling" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008341 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008342else
Martin v. Löwis11437992002-04-12 09:54:03 +00008343 cat >conftest.$ac_ext <<_ACEOF
8344#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008345#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008346$ac_includes_default
8347long longval () { return (long) (sizeof (fpos_t)); }
8348unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008349#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008350#include <stdlib.h>
Marc-André Lemburgd7160f82003-09-22 11:14:40 +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 ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008359{
Martin v. Löwis11437992002-04-12 09:54:03 +00008360
8361 FILE *f = fopen ("conftest.val", "w");
8362 if (! f)
8363 exit (1);
8364 if (((long) (sizeof (fpos_t))) < 0)
8365 {
8366 long i = longval ();
8367 if (i != ((long) (sizeof (fpos_t))))
8368 exit (1);
8369 fprintf (f, "%ld\n", i);
8370 }
8371 else
8372 {
8373 unsigned long i = ulongval ();
8374 if (i != ((long) (sizeof (fpos_t))))
8375 exit (1);
8376 fprintf (f, "%lu\n", i);
8377 }
8378 exit (ferror (f) || fclose (f) != 0);
8379
8380 ;
8381 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008382}
Martin v. Löwis11437992002-04-12 09:54:03 +00008383_ACEOF
8384rm -f conftest$ac_exeext
8385if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8386 (eval $ac_link) 2>&5
8387 ac_status=$?
8388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8389 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8390 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8391 (eval $ac_try) 2>&5
8392 ac_status=$?
8393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8394 (exit $ac_status); }; }; then
8395 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008396else
Martin v. Löwis11437992002-04-12 09:54:03 +00008397 echo "$as_me: program exited with status $ac_status" >&5
8398echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008399cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008400( exit $ac_status )
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008401{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8402echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008403 { (exit 1); exit 1; }; }
8404fi
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008405rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008406fi
8407fi
8408rm -f conftest.val
8409else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008410 ac_cv_sizeof_fpos_t=0
8411fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008412fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008413echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8414echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8415cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008416#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008417_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008418
Michael W. Hudson54241132001-12-07 15:38:26 +00008419
8420
Martin v. Löwis11437992002-04-12 09:54:03 +00008421echo "$as_me:$LINENO: checking for long long support" >&5
8422echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008423have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008424cat >conftest.$ac_ext <<_ACEOF
8425#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008426#include "confdefs.h"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008427
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008428#ifdef F77_DUMMY_MAIN
8429# ifdef __cplusplus
8430 extern "C"
8431# endif
8432 int F77_DUMMY_MAIN() { return 1; }
8433#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008434int
8435main ()
8436{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008437long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008438 ;
8439 return 0;
8440}
8441_ACEOF
8442rm -f conftest.$ac_objext
8443if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8444 (eval $ac_compile) 2>&5
8445 ac_status=$?
8446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8447 (exit $ac_status); } &&
8448 { ac_try='test -s conftest.$ac_objext'
8449 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8450 (eval $ac_try) 2>&5
8451 ac_status=$?
8452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8453 (exit $ac_status); }; }; then
8454
8455
8456cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008457#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008458_ACEOF
8459
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008460 have_long_long=yes
8461
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008462else
Martin v. Löwis11437992002-04-12 09:54:03 +00008463 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008464cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008465fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008466rm -f conftest.$ac_objext conftest.$ac_ext
8467echo "$as_me:$LINENO: result: $have_long_long" >&5
8468echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008469if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008470echo "$as_me:$LINENO: checking for long long" >&5
8471echo $ECHO_N "checking for long long... $ECHO_C" >&6
8472if test "${ac_cv_type_long_long+set}" = set; then
8473 echo $ECHO_N "(cached) $ECHO_C" >&6
8474else
8475 cat >conftest.$ac_ext <<_ACEOF
8476#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008477#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008478$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008479#ifdef F77_DUMMY_MAIN
8480# ifdef __cplusplus
8481 extern "C"
8482# endif
8483 int F77_DUMMY_MAIN() { return 1; }
8484#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008485int
8486main ()
8487{
8488if ((long long *) 0)
8489 return 0;
8490if (sizeof (long long))
8491 return 0;
8492 ;
8493 return 0;
8494}
8495_ACEOF
8496rm -f conftest.$ac_objext
8497if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8498 (eval $ac_compile) 2>&5
8499 ac_status=$?
8500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8501 (exit $ac_status); } &&
8502 { ac_try='test -s conftest.$ac_objext'
8503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8504 (eval $ac_try) 2>&5
8505 ac_status=$?
8506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8507 (exit $ac_status); }; }; then
8508 ac_cv_type_long_long=yes
8509else
8510 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008511cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008512ac_cv_type_long_long=no
8513fi
8514rm -f conftest.$ac_objext conftest.$ac_ext
8515fi
8516echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8517echo "${ECHO_T}$ac_cv_type_long_long" >&6
8518
8519echo "$as_me:$LINENO: checking size of long long" >&5
8520echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8521if test "${ac_cv_sizeof_long_long+set}" = set; then
8522 echo $ECHO_N "(cached) $ECHO_C" >&6
8523else
8524 if test "$ac_cv_type_long_long" = yes; then
8525 # The cast to unsigned long works around a bug in the HP C Compiler
8526 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8527 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8528 # This bug is HP SR number 8606223364.
8529 if test "$cross_compiling" = yes; then
8530 # Depending upon the size, compute the lo and hi bounds.
8531cat >conftest.$ac_ext <<_ACEOF
8532#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008533#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008534$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008535#ifdef F77_DUMMY_MAIN
8536# ifdef __cplusplus
8537 extern "C"
8538# endif
8539 int F77_DUMMY_MAIN() { return 1; }
8540#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008541int
8542main ()
8543{
8544static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8545test_array [0] = 0
8546
8547 ;
8548 return 0;
8549}
8550_ACEOF
8551rm -f conftest.$ac_objext
8552if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8553 (eval $ac_compile) 2>&5
8554 ac_status=$?
8555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8556 (exit $ac_status); } &&
8557 { ac_try='test -s conftest.$ac_objext'
8558 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8559 (eval $ac_try) 2>&5
8560 ac_status=$?
8561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8562 (exit $ac_status); }; }; then
8563 ac_lo=0 ac_mid=0
8564 while :; do
8565 cat >conftest.$ac_ext <<_ACEOF
8566#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008567#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008568$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008569#ifdef F77_DUMMY_MAIN
8570# ifdef __cplusplus
8571 extern "C"
8572# endif
8573 int F77_DUMMY_MAIN() { return 1; }
8574#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008575int
8576main ()
8577{
8578static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8579test_array [0] = 0
8580
8581 ;
8582 return 0;
8583}
8584_ACEOF
8585rm -f conftest.$ac_objext
8586if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8587 (eval $ac_compile) 2>&5
8588 ac_status=$?
8589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8590 (exit $ac_status); } &&
8591 { ac_try='test -s conftest.$ac_objext'
8592 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8593 (eval $ac_try) 2>&5
8594 ac_status=$?
8595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8596 (exit $ac_status); }; }; then
8597 ac_hi=$ac_mid; break
8598else
8599 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008600cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008601ac_lo=`expr $ac_mid + 1`
8602 if test $ac_lo -le $ac_mid; then
8603 ac_lo= ac_hi=
8604 break
8605 fi
8606 ac_mid=`expr 2 '*' $ac_mid + 1`
8607fi
8608rm -f conftest.$ac_objext conftest.$ac_ext
8609 done
8610else
8611 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008612cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008613cat >conftest.$ac_ext <<_ACEOF
8614#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008615#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008616$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008617#ifdef F77_DUMMY_MAIN
8618# ifdef __cplusplus
8619 extern "C"
8620# endif
8621 int F77_DUMMY_MAIN() { return 1; }
8622#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008623int
8624main ()
8625{
8626static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8627test_array [0] = 0
8628
8629 ;
8630 return 0;
8631}
8632_ACEOF
8633rm -f conftest.$ac_objext
8634if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8635 (eval $ac_compile) 2>&5
8636 ac_status=$?
8637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8638 (exit $ac_status); } &&
8639 { ac_try='test -s conftest.$ac_objext'
8640 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8641 (eval $ac_try) 2>&5
8642 ac_status=$?
8643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8644 (exit $ac_status); }; }; then
8645 ac_hi=-1 ac_mid=-1
8646 while :; do
8647 cat >conftest.$ac_ext <<_ACEOF
8648#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008649#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008650$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008651#ifdef F77_DUMMY_MAIN
8652# ifdef __cplusplus
8653 extern "C"
8654# endif
8655 int F77_DUMMY_MAIN() { return 1; }
8656#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008657int
8658main ()
8659{
8660static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8661test_array [0] = 0
8662
8663 ;
8664 return 0;
8665}
8666_ACEOF
8667rm -f conftest.$ac_objext
8668if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8669 (eval $ac_compile) 2>&5
8670 ac_status=$?
8671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8672 (exit $ac_status); } &&
8673 { ac_try='test -s conftest.$ac_objext'
8674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8675 (eval $ac_try) 2>&5
8676 ac_status=$?
8677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8678 (exit $ac_status); }; }; then
8679 ac_lo=$ac_mid; break
8680else
8681 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008682cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008683ac_hi=`expr '(' $ac_mid ')' - 1`
8684 if test $ac_mid -le $ac_hi; then
8685 ac_lo= ac_hi=
8686 break
8687 fi
8688 ac_mid=`expr 2 '*' $ac_mid`
8689fi
8690rm -f conftest.$ac_objext conftest.$ac_ext
8691 done
8692else
8693 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008694cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008695ac_lo= ac_hi=
8696fi
8697rm -f conftest.$ac_objext conftest.$ac_ext
8698fi
8699rm -f conftest.$ac_objext conftest.$ac_ext
8700# Binary search between lo and hi bounds.
8701while test "x$ac_lo" != "x$ac_hi"; do
8702 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8703 cat >conftest.$ac_ext <<_ACEOF
8704#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008705#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008706$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008707#ifdef F77_DUMMY_MAIN
8708# ifdef __cplusplus
8709 extern "C"
8710# endif
8711 int F77_DUMMY_MAIN() { return 1; }
8712#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008713int
8714main ()
8715{
8716static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8717test_array [0] = 0
8718
8719 ;
8720 return 0;
8721}
8722_ACEOF
8723rm -f conftest.$ac_objext
8724if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8725 (eval $ac_compile) 2>&5
8726 ac_status=$?
8727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8728 (exit $ac_status); } &&
8729 { ac_try='test -s conftest.$ac_objext'
8730 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8731 (eval $ac_try) 2>&5
8732 ac_status=$?
8733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8734 (exit $ac_status); }; }; then
8735 ac_hi=$ac_mid
8736else
8737 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008738cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008739ac_lo=`expr '(' $ac_mid ')' + 1`
8740fi
8741rm -f conftest.$ac_objext conftest.$ac_ext
8742done
8743case $ac_lo in
8744?*) ac_cv_sizeof_long_long=$ac_lo;;
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008745'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8746echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008747 { (exit 1); exit 1; }; } ;;
8748esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008749else
8750 if test "$cross_compiling" = yes; then
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008751 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8752echo "$as_me: error: cannot run test program while cross compiling" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008753 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008754else
Martin v. Löwis11437992002-04-12 09:54:03 +00008755 cat >conftest.$ac_ext <<_ACEOF
8756#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008757#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008758$ac_includes_default
8759long longval () { return (long) (sizeof (long long)); }
8760unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008761#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008762#include <stdlib.h>
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008763#ifdef F77_DUMMY_MAIN
8764# ifdef __cplusplus
8765 extern "C"
8766# endif
8767 int F77_DUMMY_MAIN() { return 1; }
8768#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008769int
8770main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008771{
Martin v. Löwis11437992002-04-12 09:54:03 +00008772
8773 FILE *f = fopen ("conftest.val", "w");
8774 if (! f)
8775 exit (1);
8776 if (((long) (sizeof (long long))) < 0)
8777 {
8778 long i = longval ();
8779 if (i != ((long) (sizeof (long long))))
8780 exit (1);
8781 fprintf (f, "%ld\n", i);
8782 }
8783 else
8784 {
8785 unsigned long i = ulongval ();
8786 if (i != ((long) (sizeof (long long))))
8787 exit (1);
8788 fprintf (f, "%lu\n", i);
8789 }
8790 exit (ferror (f) || fclose (f) != 0);
8791
8792 ;
8793 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008794}
Martin v. Löwis11437992002-04-12 09:54:03 +00008795_ACEOF
8796rm -f conftest$ac_exeext
8797if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8798 (eval $ac_link) 2>&5
8799 ac_status=$?
8800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8801 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8803 (eval $ac_try) 2>&5
8804 ac_status=$?
8805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8806 (exit $ac_status); }; }; then
8807 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008808else
Martin v. Löwis11437992002-04-12 09:54:03 +00008809 echo "$as_me: program exited with status $ac_status" >&5
8810echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008811cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008812( exit $ac_status )
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008813{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8814echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008815 { (exit 1); exit 1; }; }
8816fi
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008817rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008818fi
8819fi
8820rm -f conftest.val
8821else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008822 ac_cv_sizeof_long_long=0
8823fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008824fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008825echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8826echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8827cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008828#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008829_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008830
Michael W. Hudson54241132001-12-07 15:38:26 +00008831
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008832fi
8833
Martin v. Löwis11437992002-04-12 09:54:03 +00008834echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8835echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008836have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008837cat >conftest.$ac_ext <<_ACEOF
8838#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008839#include "confdefs.h"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008840
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008841#ifdef F77_DUMMY_MAIN
8842# ifdef __cplusplus
8843 extern "C"
8844# endif
8845 int F77_DUMMY_MAIN() { return 1; }
8846#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008847int
8848main ()
8849{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008850uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008851 ;
8852 return 0;
8853}
8854_ACEOF
8855rm -f conftest.$ac_objext
8856if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8857 (eval $ac_compile) 2>&5
8858 ac_status=$?
8859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8860 (exit $ac_status); } &&
8861 { ac_try='test -s conftest.$ac_objext'
8862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8863 (eval $ac_try) 2>&5
8864 ac_status=$?
8865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8866 (exit $ac_status); }; }; then
8867
8868
8869cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008870#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008871_ACEOF
8872
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008873 have_uintptr_t=yes
8874
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008875else
Martin v. Löwis11437992002-04-12 09:54:03 +00008876 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008877cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008878fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008879rm -f conftest.$ac_objext conftest.$ac_ext
8880echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8881echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008882if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008883echo "$as_me:$LINENO: checking for uintptr_t" >&5
8884echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8885if test "${ac_cv_type_uintptr_t+set}" = set; then
8886 echo $ECHO_N "(cached) $ECHO_C" >&6
8887else
8888 cat >conftest.$ac_ext <<_ACEOF
8889#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008890#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008891$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008892#ifdef F77_DUMMY_MAIN
8893# ifdef __cplusplus
8894 extern "C"
8895# endif
8896 int F77_DUMMY_MAIN() { return 1; }
8897#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008898int
8899main ()
8900{
8901if ((uintptr_t *) 0)
8902 return 0;
8903if (sizeof (uintptr_t))
8904 return 0;
8905 ;
8906 return 0;
8907}
8908_ACEOF
8909rm -f conftest.$ac_objext
8910if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8911 (eval $ac_compile) 2>&5
8912 ac_status=$?
8913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8914 (exit $ac_status); } &&
8915 { ac_try='test -s conftest.$ac_objext'
8916 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8917 (eval $ac_try) 2>&5
8918 ac_status=$?
8919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8920 (exit $ac_status); }; }; then
8921 ac_cv_type_uintptr_t=yes
8922else
8923 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008924cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008925ac_cv_type_uintptr_t=no
8926fi
8927rm -f conftest.$ac_objext conftest.$ac_ext
8928fi
8929echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8930echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8931
8932echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8933echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8934if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8935 echo $ECHO_N "(cached) $ECHO_C" >&6
8936else
8937 if test "$ac_cv_type_uintptr_t" = yes; then
8938 # The cast to unsigned long works around a bug in the HP C Compiler
8939 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8940 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8941 # This bug is HP SR number 8606223364.
8942 if test "$cross_compiling" = yes; then
8943 # Depending upon the size, compute the lo and hi bounds.
8944cat >conftest.$ac_ext <<_ACEOF
8945#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008946#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008947$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008948#ifdef F77_DUMMY_MAIN
8949# ifdef __cplusplus
8950 extern "C"
8951# endif
8952 int F77_DUMMY_MAIN() { return 1; }
8953#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008954int
8955main ()
8956{
8957static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8958test_array [0] = 0
8959
8960 ;
8961 return 0;
8962}
8963_ACEOF
8964rm -f conftest.$ac_objext
8965if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8966 (eval $ac_compile) 2>&5
8967 ac_status=$?
8968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8969 (exit $ac_status); } &&
8970 { ac_try='test -s conftest.$ac_objext'
8971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8972 (eval $ac_try) 2>&5
8973 ac_status=$?
8974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8975 (exit $ac_status); }; }; then
8976 ac_lo=0 ac_mid=0
8977 while :; do
8978 cat >conftest.$ac_ext <<_ACEOF
8979#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008980#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008981$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00008982#ifdef F77_DUMMY_MAIN
8983# ifdef __cplusplus
8984 extern "C"
8985# endif
8986 int F77_DUMMY_MAIN() { return 1; }
8987#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008988int
8989main ()
8990{
8991static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8992test_array [0] = 0
8993
8994 ;
8995 return 0;
8996}
8997_ACEOF
8998rm -f conftest.$ac_objext
8999if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9000 (eval $ac_compile) 2>&5
9001 ac_status=$?
9002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9003 (exit $ac_status); } &&
9004 { ac_try='test -s conftest.$ac_objext'
9005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9006 (eval $ac_try) 2>&5
9007 ac_status=$?
9008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9009 (exit $ac_status); }; }; then
9010 ac_hi=$ac_mid; break
9011else
9012 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009013cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009014ac_lo=`expr $ac_mid + 1`
9015 if test $ac_lo -le $ac_mid; then
9016 ac_lo= ac_hi=
9017 break
9018 fi
9019 ac_mid=`expr 2 '*' $ac_mid + 1`
9020fi
9021rm -f conftest.$ac_objext conftest.$ac_ext
9022 done
9023else
9024 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009025cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009026cat >conftest.$ac_ext <<_ACEOF
9027#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009028#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009029$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009030#ifdef F77_DUMMY_MAIN
9031# ifdef __cplusplus
9032 extern "C"
9033# endif
9034 int F77_DUMMY_MAIN() { return 1; }
9035#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009036int
9037main ()
9038{
9039static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
9040test_array [0] = 0
9041
9042 ;
9043 return 0;
9044}
9045_ACEOF
9046rm -f conftest.$ac_objext
9047if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9048 (eval $ac_compile) 2>&5
9049 ac_status=$?
9050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9051 (exit $ac_status); } &&
9052 { ac_try='test -s conftest.$ac_objext'
9053 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9054 (eval $ac_try) 2>&5
9055 ac_status=$?
9056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9057 (exit $ac_status); }; }; then
9058 ac_hi=-1 ac_mid=-1
9059 while :; do
9060 cat >conftest.$ac_ext <<_ACEOF
9061#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009062#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009063$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009064#ifdef F77_DUMMY_MAIN
9065# ifdef __cplusplus
9066 extern "C"
9067# endif
9068 int F77_DUMMY_MAIN() { return 1; }
9069#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009070int
9071main ()
9072{
9073static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
9074test_array [0] = 0
9075
9076 ;
9077 return 0;
9078}
9079_ACEOF
9080rm -f conftest.$ac_objext
9081if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9082 (eval $ac_compile) 2>&5
9083 ac_status=$?
9084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9085 (exit $ac_status); } &&
9086 { ac_try='test -s conftest.$ac_objext'
9087 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9088 (eval $ac_try) 2>&5
9089 ac_status=$?
9090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9091 (exit $ac_status); }; }; then
9092 ac_lo=$ac_mid; break
9093else
9094 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009095cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009096ac_hi=`expr '(' $ac_mid ')' - 1`
9097 if test $ac_mid -le $ac_hi; then
9098 ac_lo= ac_hi=
9099 break
9100 fi
9101 ac_mid=`expr 2 '*' $ac_mid`
9102fi
9103rm -f conftest.$ac_objext conftest.$ac_ext
9104 done
9105else
9106 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009107cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009108ac_lo= ac_hi=
9109fi
9110rm -f conftest.$ac_objext conftest.$ac_ext
9111fi
9112rm -f conftest.$ac_objext conftest.$ac_ext
9113# Binary search between lo and hi bounds.
9114while test "x$ac_lo" != "x$ac_hi"; do
9115 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9116 cat >conftest.$ac_ext <<_ACEOF
9117#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009118#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009119$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009120#ifdef F77_DUMMY_MAIN
9121# ifdef __cplusplus
9122 extern "C"
9123# endif
9124 int F77_DUMMY_MAIN() { return 1; }
9125#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009126int
9127main ()
9128{
9129static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
9130test_array [0] = 0
9131
9132 ;
9133 return 0;
9134}
9135_ACEOF
9136rm -f conftest.$ac_objext
9137if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9138 (eval $ac_compile) 2>&5
9139 ac_status=$?
9140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9141 (exit $ac_status); } &&
9142 { ac_try='test -s conftest.$ac_objext'
9143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9144 (eval $ac_try) 2>&5
9145 ac_status=$?
9146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9147 (exit $ac_status); }; }; then
9148 ac_hi=$ac_mid
9149else
9150 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009151cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009152ac_lo=`expr '(' $ac_mid ')' + 1`
9153fi
9154rm -f conftest.$ac_objext conftest.$ac_ext
9155done
9156case $ac_lo in
9157?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009158'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
9159echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009160 { (exit 1); exit 1; }; } ;;
9161esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009162else
9163 if test "$cross_compiling" = yes; then
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009164 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
9165echo "$as_me: error: cannot run test program while cross compiling" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009166 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009167else
Martin v. Löwis11437992002-04-12 09:54:03 +00009168 cat >conftest.$ac_ext <<_ACEOF
9169#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009170#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009171$ac_includes_default
9172long longval () { return (long) (sizeof (uintptr_t)); }
9173unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009174#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009175#include <stdlib.h>
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009176#ifdef F77_DUMMY_MAIN
9177# ifdef __cplusplus
9178 extern "C"
9179# endif
9180 int F77_DUMMY_MAIN() { return 1; }
9181#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009182int
9183main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009184{
Martin v. Löwis11437992002-04-12 09:54:03 +00009185
9186 FILE *f = fopen ("conftest.val", "w");
9187 if (! f)
9188 exit (1);
9189 if (((long) (sizeof (uintptr_t))) < 0)
9190 {
9191 long i = longval ();
9192 if (i != ((long) (sizeof (uintptr_t))))
9193 exit (1);
9194 fprintf (f, "%ld\n", i);
9195 }
9196 else
9197 {
9198 unsigned long i = ulongval ();
9199 if (i != ((long) (sizeof (uintptr_t))))
9200 exit (1);
9201 fprintf (f, "%lu\n", i);
9202 }
9203 exit (ferror (f) || fclose (f) != 0);
9204
9205 ;
9206 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009207}
Martin v. Löwis11437992002-04-12 09:54:03 +00009208_ACEOF
9209rm -f conftest$ac_exeext
9210if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9211 (eval $ac_link) 2>&5
9212 ac_status=$?
9213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9214 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9215 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9216 (eval $ac_try) 2>&5
9217 ac_status=$?
9218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9219 (exit $ac_status); }; }; then
9220 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009221else
Martin v. Löwis11437992002-04-12 09:54:03 +00009222 echo "$as_me: program exited with status $ac_status" >&5
9223echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009224cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009225( exit $ac_status )
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009226{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
9227echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009228 { (exit 1); exit 1; }; }
9229fi
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009230rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009231fi
9232fi
9233rm -f conftest.val
9234else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009235 ac_cv_sizeof_uintptr_t=0
9236fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009237fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009238echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
9239echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
9240cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009241#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009242_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009243
Michael W. Hudson54241132001-12-07 15:38:26 +00009244
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009245fi
9246
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009247# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009248echo "$as_me:$LINENO: checking size of off_t" >&5
9249echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
9250if test "${ac_cv_sizeof_off_t+set}" = set; then
9251 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009252else
9253 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009254 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009255else
Martin v. Löwis11437992002-04-12 09:54:03 +00009256 cat >conftest.$ac_ext <<_ACEOF
9257#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009258#include "confdefs.h"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009259#include <stdio.h>
9260#include <sys/types.h>
9261main()
9262{
9263 FILE *f=fopen("conftestval", "w");
9264 if (!f) exit(1);
9265 fprintf(f, "%d\n", sizeof(off_t));
9266 exit(0);
9267}
Martin v. Löwis11437992002-04-12 09:54:03 +00009268_ACEOF
9269rm -f conftest$ac_exeext
9270if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9271 (eval $ac_link) 2>&5
9272 ac_status=$?
9273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9274 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9275 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9276 (eval $ac_try) 2>&5
9277 ac_status=$?
9278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9279 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009280 ac_cv_sizeof_off_t=`cat conftestval`
9281else
Martin v. Löwis11437992002-04-12 09:54:03 +00009282 echo "$as_me: program exited with status $ac_status" >&5
9283echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009284cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009285( exit $ac_status )
9286ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009287fi
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009288rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009289fi
9290
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009291fi
9292
Martin v. Löwis11437992002-04-12 09:54:03 +00009293echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
9294echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
9295
9296cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009297#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009298_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009299
Michael W. Hudson54241132001-12-07 15:38:26 +00009300
Martin v. Löwis11437992002-04-12 09:54:03 +00009301echo "$as_me:$LINENO: checking whether to enable large file support" >&5
9302echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009303if test "$have_long_long" = yes -a \
9304 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
9305 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009306
Martin v. Löwis11437992002-04-12 09:54:03 +00009307cat >>confdefs.h <<\_ACEOF
9308#define HAVE_LARGEFILE_SUPPORT 1
9309_ACEOF
9310
9311 echo "$as_me:$LINENO: result: yes" >&5
9312echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009313else
Martin v. Löwis11437992002-04-12 09:54:03 +00009314 echo "$as_me:$LINENO: result: no" >&5
9315echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009316fi
9317
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009318# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009319echo "$as_me:$LINENO: checking size of time_t" >&5
9320echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
9321if test "${ac_cv_sizeof_time_t+set}" = set; then
9322 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009323else
9324 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009325 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009326else
Martin v. Löwis11437992002-04-12 09:54:03 +00009327 cat >conftest.$ac_ext <<_ACEOF
9328#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009329#include "confdefs.h"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009330#include <stdio.h>
9331#include <time.h>
9332main()
9333{
9334 FILE *f=fopen("conftestval", "w");
9335 if (!f) exit(1);
9336 fprintf(f, "%d\n", sizeof(time_t));
9337 exit(0);
9338}
Martin v. Löwis11437992002-04-12 09:54:03 +00009339_ACEOF
9340rm -f conftest$ac_exeext
9341if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9342 (eval $ac_link) 2>&5
9343 ac_status=$?
9344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9345 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9347 (eval $ac_try) 2>&5
9348 ac_status=$?
9349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9350 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009351 ac_cv_sizeof_time_t=`cat conftestval`
9352else
Martin v. Löwis11437992002-04-12 09:54:03 +00009353 echo "$as_me: program exited with status $ac_status" >&5
9354echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009355cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009356( exit $ac_status )
9357ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009358fi
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009359rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009360fi
9361
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009362fi
9363
Martin v. Löwis11437992002-04-12 09:54:03 +00009364echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9365echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9366
9367cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009368#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009369_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009370
Michael W. Hudson54241132001-12-07 15:38:26 +00009371
9372
Trent Mick635f6fb2000-08-23 21:33:05 +00009373# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009374ac_save_cc="$CC"
9375if test "$ac_cv_kpthread" = "yes"
9376then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009377elif test "$ac_cv_kthread" = "yes"
9378then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009379elif test "$ac_cv_pthread" = "yes"
9380then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009381fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009382echo "$as_me:$LINENO: checking for pthread_t" >&5
9383echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009384have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009385cat >conftest.$ac_ext <<_ACEOF
9386#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009387#include "confdefs.h"
Trent Mick635f6fb2000-08-23 21:33:05 +00009388#include <pthread.h>
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009389#ifdef F77_DUMMY_MAIN
9390# ifdef __cplusplus
9391 extern "C"
9392# endif
9393 int F77_DUMMY_MAIN() { return 1; }
9394#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009395int
9396main ()
9397{
Guido van Rossum12580492000-09-24 16:47:19 +00009398pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009399 ;
9400 return 0;
9401}
9402_ACEOF
9403rm -f conftest.$ac_objext
9404if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9405 (eval $ac_compile) 2>&5
9406 ac_status=$?
9407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9408 (exit $ac_status); } &&
9409 { ac_try='test -s conftest.$ac_objext'
9410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9411 (eval $ac_try) 2>&5
9412 ac_status=$?
9413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9414 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009415 have_pthread_t=yes
9416else
Martin v. Löwis11437992002-04-12 09:54:03 +00009417 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009418cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00009419fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009420rm -f conftest.$ac_objext conftest.$ac_ext
9421echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9422echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009423if test "$have_pthread_t" = yes ; then
9424 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009425 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9426echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9427 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9428 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009429else
9430 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009431 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009432else
Martin v. Löwis11437992002-04-12 09:54:03 +00009433 cat >conftest.$ac_ext <<_ACEOF
9434#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009435#include "confdefs.h"
Trent Mick635f6fb2000-08-23 21:33:05 +00009436#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009437#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +00009438 main()
9439 {
9440 FILE *f=fopen("conftestval", "w");
9441 if (!f) exit(1);
9442 fprintf(f, "%d\n", sizeof(pthread_t));
9443 exit(0);
9444 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009445_ACEOF
9446rm -f conftest$ac_exeext
9447if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9448 (eval $ac_link) 2>&5
9449 ac_status=$?
9450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9451 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9452 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9453 (eval $ac_try) 2>&5
9454 ac_status=$?
9455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9456 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009457 ac_cv_sizeof_pthread_t=`cat conftestval`
9458else
Martin v. Löwis11437992002-04-12 09:54:03 +00009459 echo "$as_me: program exited with status $ac_status" >&5
9460echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009461cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009462( exit $ac_status )
9463ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009464fi
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009465rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009466fi
9467
Trent Mick635f6fb2000-08-23 21:33:05 +00009468fi
9469
Martin v. Löwis11437992002-04-12 09:54:03 +00009470 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9471echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9472
9473cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009474#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009475_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009476
9477fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009478CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009479
Martin v. Löwis11437992002-04-12 09:54:03 +00009480echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9481echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009482# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9483if test "${enable_toolbox_glue+set}" = set; then
9484 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009485
Martin v. Löwis11437992002-04-12 09:54:03 +00009486fi;
Jack Jansene578a632001-08-15 01:27:14 +00009487
9488if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009489then
Jack Jansene578a632001-08-15 01:27:14 +00009490 case $ac_sys_system/$ac_sys_release in
9491 Darwin/*)
9492 enable_toolbox_glue="yes";;
9493 *)
9494 enable_toolbox_glue="no";;
9495 esac
9496fi
9497case "$enable_toolbox_glue" in
9498yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009499 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009500 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009501 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009502
9503cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009504#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009505_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009506
9507 ;;
9508*)
9509 extra_frameworks=""
9510 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009511 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009512 ;;
9513esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009514echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9515echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009516
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009517
9518case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009519 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009520 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009521 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansen66b84832003-07-04 12:14:39 +00009522 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python'
Jack Jansena3891ea2001-09-07 14:25:12 +00009523 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009524 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009525 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009526 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansen66b84832003-07-04 12:14:39 +00009527 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python'
Jack Jansene578a632001-08-15 01:27:14 +00009528 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009529esac
9530
Martin v. Löwis11437992002-04-12 09:54:03 +00009531echo "$as_me:$LINENO: checking for --enable-framework" >&5
9532echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009533if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009534then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009535 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009536 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009537 # in the build location.
Jack Jansenea0c3822002-08-01 21:57:49 +00009538 LDFLAGS="$LDFLAGS -Wl,-F."
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009539
Martin v. Löwis11437992002-04-12 09:54:03 +00009540cat >>confdefs.h <<\_ACEOF
9541#define WITH_NEXT_FRAMEWORK 1
9542_ACEOF
9543
9544 echo "$as_me:$LINENO: result: yes" >&5
9545echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009546else
Martin v. Löwis11437992002-04-12 09:54:03 +00009547 echo "$as_me:$LINENO: result: no" >&5
9548echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009549fi
9550
Martin v. Löwis11437992002-04-12 09:54:03 +00009551echo "$as_me:$LINENO: checking for dyld" >&5
9552echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009553case $ac_sys_system/$ac_sys_release in
9554 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009555
Martin v. Löwis11437992002-04-12 09:54:03 +00009556cat >>confdefs.h <<\_ACEOF
9557#define WITH_DYLD 1
9558_ACEOF
9559
9560 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9561echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009562 ;;
9563 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009564 echo "$as_me:$LINENO: result: no" >&5
9565echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009566 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009567esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009568
Guido van Rossum0a516c91994-09-12 10:58:40 +00009569# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009570
Michael W. Hudson54241132001-12-07 15:38:26 +00009571
9572
9573
9574
Guido van Rossum0a516c91994-09-12 10:58:40 +00009575# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009576# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009577echo "$as_me:$LINENO: checking SO" >&5
9578echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009579if test -z "$SO"
9580then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009581 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009582 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009583 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009584 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009585 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00009586else
9587 # this might also be a termcap variable, see #610332
9588 echo
9589 echo '====================================================================='
9590 echo '+ +'
9591 echo '+ WARNING: You have set SO in your environment. +'
9592 echo '+ Do you really mean to change the extension for shared libraries? +'
9593 echo '+ Continuing in 10 seconds to let you to ponder. +'
9594 echo '+ +'
9595 echo '====================================================================='
9596 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00009597fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009598echo "$as_me:$LINENO: result: $SO" >&5
9599echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009600# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00009601# -- "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 +00009602# (Shared libraries in this instance are shared modules to be loaded into
9603# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009604echo "$as_me:$LINENO: checking LDSHARED" >&5
9605echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009606if test -z "$LDSHARED"
9607then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009608 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009609 AIX*)
9610 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009611 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009612 ;;
9613 BeOS*)
9614 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009615 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009616 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009617 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009618 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009619 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009620 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00009621 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009622 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009623 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +00009624 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009625 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009626 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
9627 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009628 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009629 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9630 if test "$enable_framework" ; then
9631 # Link against the framework. All externals should be defined.
9632 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9633 else
9634 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009635 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009636 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009637 Darwin/*)
9638 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9639 if test "$enable_framework" ; then
9640 # Link against the framework. All externals should be defined.
9641 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9642 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009643 # No framework, use the Python app as bundle-loader
9644 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009645 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009646 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009647 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00009648 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009649 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009650 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009651 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009652 then
9653 LDSHARED="cc -shared ${LDFLAGS}"
9654 else
9655 LDSHARED="ld -Bshareable ${LDFLAGS}"
9656 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009657 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009658 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009659 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009660 then LDSHARED='$(CC) -shared'
9661 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009662 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009663 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +00009664 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009665 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009666 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009667 *) LDSHARED="ld";;
9668 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009669fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009670echo "$as_me:$LINENO: result: $LDSHARED" >&5
9671echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009672BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009673# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009674# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009675echo "$as_me:$LINENO: checking CCSHARED" >&5
9676echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009677if test -z "$CCSHARED"
9678then
Guido van Rossum07397971997-04-29 21:49:50 +00009679 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009680 SunOS*) if test "$GCC" = yes;
9681 then CCSHARED="-fPIC";
9682 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009683 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009684 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009685 else CCSHARED="+z";
9686 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009687 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009688 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009689 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009690 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009691 if test "$GCC" = "yes"
9692 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009693 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009694 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009695 SCO_SV*)
9696 if test "$GCC" = "yes"
9697 then CCSHARED="-fPIC"
9698 else CCSHARED="-Kpic -belf"
9699 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009700 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009701 IRIX*/6*) case $CC in
9702 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009703 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009704 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009705 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009706 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009707fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009708echo "$as_me:$LINENO: result: $CCSHARED" >&5
9709echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009710# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009711# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009712echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9713echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009714if test -z "$LINKFORSHARED"
9715then
Guido van Rossum07397971997-04-29 21:49:50 +00009716 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009717 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009718 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009719 LINKFORSHARED="-Wl,-E -Wl,+s";;
9720# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009721 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009722 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009723 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009724 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009725 # -u __dummy makes the linker aware of the objc runtime
9726 # in System.framework; otherwise, __objcInit (referenced in
9727 # crt1.o) gets erroneously defined as common, which breaks dynamic
9728 # loading of any modules which reference it in System.framework.
9729 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9730 # not used by the core itself but which needs to be in the core so
9731 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00009732 # -prebind is no longer used, because it actually seems to give a
9733 # slowdown in stead of a speedup, maybe due to the large number of
9734 # dynamic loads Python does.
9735 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009736 if test "$enable_framework"
9737 then
9738 LINKFORSHARED="$LINKFORSHARED -framework Python"
9739 fi
9740 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009741 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009742 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009743 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009744 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009745 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9746 then
9747 LINKFORSHARED="-Wl,--export-dynamic"
9748 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009749 SunOS/5*) case $CC in
9750 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009751 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009752 then
9753 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009754 fi;;
9755 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009756 CYGWIN*)
9757 if test $enable_shared = "no"
9758 then
9759 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9760 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009761 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009762fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009763echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9764echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009765
Michael W. Hudson54241132001-12-07 15:38:26 +00009766
Martin v. Löwis11437992002-04-12 09:54:03 +00009767echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9768echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009769if test ! "$LIBRARY" = "$LDLIBRARY"
9770then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009771 case $ac_sys_system in
9772 CYGWIN*)
9773 # Cygwin needs CCSHARED when building extension DLLs
9774 # but not when building the interpreter DLL.
9775 CFLAGSFORSHARED='';;
9776 *)
9777 CFLAGSFORSHARED='$(CCSHARED)'
9778 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009779fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009780echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9781echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009782
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009783# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9784# library (with --enable-shared).
9785# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009786# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9787# if it is not required, since it creates a dependency of the shared library
9788# to LIBS. This, in turn, means that applications linking the shared libpython
9789# don't need to link LIBS explicitly. The default should be only changed
9790# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009791
9792echo "$as_me:$LINENO: checking SHLIBS" >&5
9793echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9794case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009795 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009796 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009797esac
9798echo "$as_me:$LINENO: result: $SHLIBS" >&5
9799echo "${ECHO_T}$SHLIBS" >&6
9800
9801
Guido van Rossum627b2d71993-12-24 10:39:16 +00009802# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009803
9804echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9805echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9806if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9807 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009808else
Martin v. Löwis11437992002-04-12 09:54:03 +00009809 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009810LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009811cat >conftest.$ac_ext <<_ACEOF
9812#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009813#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009814
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009815/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009816#ifdef __cplusplus
9817extern "C"
9818#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009819/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009820 builtin and then its argument prototype would still apply. */
9821char dlopen ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009822#ifdef F77_DUMMY_MAIN
9823# ifdef __cplusplus
9824 extern "C"
9825# endif
9826 int F77_DUMMY_MAIN() { return 1; }
9827#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009828int
9829main ()
9830{
9831dlopen ();
9832 ;
9833 return 0;
9834}
9835_ACEOF
9836rm -f conftest.$ac_objext conftest$ac_exeext
9837if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9838 (eval $ac_link) 2>&5
9839 ac_status=$?
9840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9841 (exit $ac_status); } &&
9842 { ac_try='test -s conftest$ac_exeext'
9843 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9844 (eval $ac_try) 2>&5
9845 ac_status=$?
9846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9847 (exit $ac_status); }; }; then
9848 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009849else
Martin v. Löwis11437992002-04-12 09:54:03 +00009850 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009851cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009852ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009853fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009854rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9855LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009856fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009857echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9858echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9859if test $ac_cv_lib_dl_dlopen = yes; then
9860 cat >>confdefs.h <<_ACEOF
9861#define HAVE_LIBDL 1
9862_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009863
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009864 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009865
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009866fi
9867 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009868
9869echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9870echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9871if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9872 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009873else
Martin v. Löwis11437992002-04-12 09:54:03 +00009874 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009875LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009876cat >conftest.$ac_ext <<_ACEOF
9877#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009878#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009879
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009880/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009881#ifdef __cplusplus
9882extern "C"
9883#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009884/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009885 builtin and then its argument prototype would still apply. */
9886char shl_load ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009887#ifdef F77_DUMMY_MAIN
9888# ifdef __cplusplus
9889 extern "C"
9890# endif
9891 int F77_DUMMY_MAIN() { return 1; }
9892#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009893int
9894main ()
9895{
9896shl_load ();
9897 ;
9898 return 0;
9899}
9900_ACEOF
9901rm -f conftest.$ac_objext conftest$ac_exeext
9902if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9903 (eval $ac_link) 2>&5
9904 ac_status=$?
9905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9906 (exit $ac_status); } &&
9907 { ac_try='test -s conftest$ac_exeext'
9908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9909 (eval $ac_try) 2>&5
9910 ac_status=$?
9911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9912 (exit $ac_status); }; }; then
9913 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009914else
Martin v. Löwis11437992002-04-12 09:54:03 +00009915 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009916cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009917ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009918fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009919rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9920LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009921fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009922echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9923echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9924if test $ac_cv_lib_dld_shl_load = yes; then
9925 cat >>confdefs.h <<_ACEOF
9926#define HAVE_LIBDLD 1
9927_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009928
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009929 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009930
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009931fi
9932 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009933
9934# only check for sem_ini if thread support is requested
9935if test "$with_threads" = "yes" -o -z "$with_threads"; then
9936 echo "$as_me:$LINENO: checking for library containing sem_init" >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009937echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9938if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009939 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009940else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009941 ac_func_search_save_LIBS=$LIBS
9942ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009943cat >conftest.$ac_ext <<_ACEOF
9944#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009945#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009946
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009947/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009948#ifdef __cplusplus
9949extern "C"
9950#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009951/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009952 builtin and then its argument prototype would still apply. */
9953char sem_init ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009954#ifdef F77_DUMMY_MAIN
9955# ifdef __cplusplus
9956 extern "C"
9957# endif
9958 int F77_DUMMY_MAIN() { return 1; }
9959#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009960int
9961main ()
9962{
9963sem_init ();
9964 ;
9965 return 0;
9966}
9967_ACEOF
9968rm -f conftest.$ac_objext conftest$ac_exeext
9969if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9970 (eval $ac_link) 2>&5
9971 ac_status=$?
9972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9973 (exit $ac_status); } &&
9974 { ac_try='test -s conftest$ac_exeext'
9975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9976 (eval $ac_try) 2>&5
9977 ac_status=$?
9978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9979 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009980 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009981else
Martin v. Löwis11437992002-04-12 09:54:03 +00009982 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009983cat conftest.$ac_ext >&5
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009984fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009985rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009986if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009987 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009988 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9989 cat >conftest.$ac_ext <<_ACEOF
9990#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +00009991#include "confdefs.h"
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009992
9993/* Override any gcc2 internal prototype to avoid an error. */
9994#ifdef __cplusplus
9995extern "C"
9996#endif
9997/* We use char because int might match the return type of a gcc2
9998 builtin and then its argument prototype would still apply. */
9999char sem_init ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010000#ifdef F77_DUMMY_MAIN
10001# ifdef __cplusplus
10002 extern "C"
10003# endif
10004 int F77_DUMMY_MAIN() { return 1; }
10005#endif
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010006int
10007main ()
10008{
10009sem_init ();
10010 ;
10011 return 0;
10012}
Martin v. Löwis11437992002-04-12 09:54:03 +000010013_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010014rm -f conftest.$ac_objext conftest$ac_exeext
10015if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10016 (eval $ac_link) 2>&5
10017 ac_status=$?
10018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10019 (exit $ac_status); } &&
10020 { ac_try='test -s conftest$ac_exeext'
10021 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10022 (eval $ac_try) 2>&5
10023 ac_status=$?
10024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10025 (exit $ac_status); }; }; then
10026 ac_cv_search_sem_init="-l$ac_lib"
10027break
10028else
10029 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010030cat conftest.$ac_ext >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010031fi
10032rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10033 done
10034fi
10035LIBS=$ac_func_search_save_LIBS
10036fi
10037echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
10038echo "${ECHO_T}$ac_cv_search_sem_init" >&6
10039if test "$ac_cv_search_sem_init" != no; then
10040 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010041
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010042fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000010043 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000010044 # posix4 on Solaris 2.6
10045 # pthread (first!) on Linux
10046fi
10047
Martin v. Löwis19d17342003-06-14 21:03:05 +000010048# check if we need libintl for locale functions
10049echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
10050echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6
10051if test "${ac_cv_lib_intl_textdomain+set}" = set; then
10052 echo $ECHO_N "(cached) $ECHO_C" >&6
10053else
10054 ac_check_lib_save_LIBS=$LIBS
10055LIBS="-lintl $LIBS"
10056cat >conftest.$ac_ext <<_ACEOF
10057#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010058#include "confdefs.h"
Martin v. Löwis19d17342003-06-14 21:03:05 +000010059
10060/* Override any gcc2 internal prototype to avoid an error. */
10061#ifdef __cplusplus
10062extern "C"
10063#endif
10064/* We use char because int might match the return type of a gcc2
10065 builtin and then its argument prototype would still apply. */
10066char textdomain ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010067#ifdef F77_DUMMY_MAIN
10068# ifdef __cplusplus
10069 extern "C"
10070# endif
10071 int F77_DUMMY_MAIN() { return 1; }
10072#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000010073int
10074main ()
10075{
10076textdomain ();
10077 ;
10078 return 0;
10079}
10080_ACEOF
10081rm -f conftest.$ac_objext conftest$ac_exeext
10082if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10083 (eval $ac_link) 2>&5
10084 ac_status=$?
10085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10086 (exit $ac_status); } &&
10087 { ac_try='test -s conftest$ac_exeext'
10088 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10089 (eval $ac_try) 2>&5
10090 ac_status=$?
10091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10092 (exit $ac_status); }; }; then
10093 ac_cv_lib_intl_textdomain=yes
10094else
10095 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010096cat conftest.$ac_ext >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000010097ac_cv_lib_intl_textdomain=no
10098fi
10099rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10100LIBS=$ac_check_lib_save_LIBS
10101fi
10102echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
10103echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6
10104if test $ac_cv_lib_intl_textdomain = yes; then
10105
10106cat >>confdefs.h <<\_ACEOF
10107#define WITH_LIBINTL 1
10108_ACEOF
10109
10110fi
10111
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010112
10113# checks for system dependent C++ extensions support
10114case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +000010115 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
10116echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
10117 cat >conftest.$ac_ext <<_ACEOF
10118#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010119#include "confdefs.h"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010120#include "/usr/lpp/xlC/include/load.h"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010121#ifdef F77_DUMMY_MAIN
10122# ifdef __cplusplus
10123 extern "C"
10124# endif
10125 int F77_DUMMY_MAIN() { return 1; }
10126#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010127int
10128main ()
10129{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010130loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010131 ;
10132 return 0;
10133}
10134_ACEOF
10135rm -f conftest.$ac_objext conftest$ac_exeext
10136if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10137 (eval $ac_link) 2>&5
10138 ac_status=$?
10139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10140 (exit $ac_status); } &&
10141 { ac_try='test -s conftest$ac_exeext'
10142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10143 (eval $ac_try) 2>&5
10144 ac_status=$?
10145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10146 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010147
Martin v. Löwis11437992002-04-12 09:54:03 +000010148cat >>confdefs.h <<\_ACEOF
10149#define AIX_GENUINE_CPLUSPLUS 1
10150_ACEOF
10151
10152 echo "$as_me:$LINENO: result: yes" >&5
10153echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010154else
Martin v. Löwis11437992002-04-12 09:54:03 +000010155 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010156cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010157echo "$as_me:$LINENO: result: no" >&5
10158echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010159fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010160rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010161 *) ;;
10162esac
10163
Guido van Rossum70c7f481998-03-26 18:44:10 +000010164# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Martin v. Löwise1172582002-11-13 08:51:19 +000010165# However on SGI IRIX 4, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010166# BeOS' sockets are stashed in libnet.
10167case "$ac_sys_system" in
10168IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +000010169*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010170echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
10171echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
10172if test "${ac_cv_lib_nsl_t_open+set}" = set; then
10173 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010174else
Martin v. Löwis11437992002-04-12 09:54:03 +000010175 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010176LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010177cat >conftest.$ac_ext <<_ACEOF
10178#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010179#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010180
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010181/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010182#ifdef __cplusplus
10183extern "C"
10184#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010185/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010186 builtin and then its argument prototype would still apply. */
10187char t_open ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010188#ifdef F77_DUMMY_MAIN
10189# ifdef __cplusplus
10190 extern "C"
10191# endif
10192 int F77_DUMMY_MAIN() { return 1; }
10193#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010194int
10195main ()
10196{
10197t_open ();
10198 ;
10199 return 0;
10200}
10201_ACEOF
10202rm -f conftest.$ac_objext conftest$ac_exeext
10203if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10204 (eval $ac_link) 2>&5
10205 ac_status=$?
10206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10207 (exit $ac_status); } &&
10208 { ac_try='test -s conftest$ac_exeext'
10209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10210 (eval $ac_try) 2>&5
10211 ac_status=$?
10212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10213 (exit $ac_status); }; }; then
10214 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010215else
Martin v. Löwis11437992002-04-12 09:54:03 +000010216 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010217cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010218ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010219fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010220rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10221LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010222fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010223echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
10224echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
10225if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010226 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010227fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010228 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +000010229echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
10230echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
10231if test "${ac_cv_lib_socket_socket+set}" = set; then
10232 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010233else
Martin v. Löwis11437992002-04-12 09:54:03 +000010234 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010235LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010236cat >conftest.$ac_ext <<_ACEOF
10237#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010238#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010239
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010240/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010241#ifdef __cplusplus
10242extern "C"
10243#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010244/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010245 builtin and then its argument prototype would still apply. */
10246char socket ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010247#ifdef F77_DUMMY_MAIN
10248# ifdef __cplusplus
10249 extern "C"
10250# endif
10251 int F77_DUMMY_MAIN() { return 1; }
10252#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010253int
10254main ()
10255{
10256socket ();
10257 ;
10258 return 0;
10259}
10260_ACEOF
10261rm -f conftest.$ac_objext conftest$ac_exeext
10262if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10263 (eval $ac_link) 2>&5
10264 ac_status=$?
10265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10266 (exit $ac_status); } &&
10267 { ac_try='test -s conftest$ac_exeext'
10268 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10269 (eval $ac_try) 2>&5
10270 ac_status=$?
10271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10272 (exit $ac_status); }; }; then
10273 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010274else
Martin v. Löwis11437992002-04-12 09:54:03 +000010275 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010276cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010277ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010278fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010279rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10280LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010281fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010282echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
10283echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
10284if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000010285 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010286fi
10287 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000010288;;
10289esac
10290case "$ac_sys_system" in
10291BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010292echo "$as_me:$LINENO: checking for socket in -lnet" >&5
10293echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
10294if test "${ac_cv_lib_net_socket+set}" = set; then
10295 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010296else
Martin v. Löwis11437992002-04-12 09:54:03 +000010297 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010298LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010299cat >conftest.$ac_ext <<_ACEOF
10300#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010301#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010302
Guido van Rossumad678af1998-10-02 14:42:15 +000010303/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010304#ifdef __cplusplus
10305extern "C"
10306#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010307/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010308 builtin and then its argument prototype would still apply. */
10309char socket ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010310#ifdef F77_DUMMY_MAIN
10311# ifdef __cplusplus
10312 extern "C"
10313# endif
10314 int F77_DUMMY_MAIN() { return 1; }
10315#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010316int
10317main ()
10318{
10319socket ();
10320 ;
10321 return 0;
10322}
10323_ACEOF
10324rm -f conftest.$ac_objext conftest$ac_exeext
10325if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10326 (eval $ac_link) 2>&5
10327 ac_status=$?
10328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10329 (exit $ac_status); } &&
10330 { ac_try='test -s conftest$ac_exeext'
10331 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10332 (eval $ac_try) 2>&5
10333 ac_status=$?
10334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10335 (exit $ac_status); }; }; then
10336 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010337else
Martin v. Löwis11437992002-04-12 09:54:03 +000010338 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010339cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010340ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010341fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010342rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10343LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010344fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010345echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
10346echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
10347if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010348 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010349fi
10350 # BeOS
10351;;
10352esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000010353
Martin v. Löwis11437992002-04-12 09:54:03 +000010354echo "$as_me:$LINENO: checking for --with-libs" >&5
10355echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
10356
Guido van Rossuma68acba1996-07-31 17:36:39 +000010357# Check whether --with-libs or --without-libs was given.
10358if test "${with_libs+set}" = set; then
10359 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000010360
10361echo "$as_me:$LINENO: result: $withval" >&5
10362echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000010363LIBS="$withval $LIBS"
10364
10365else
Martin v. Löwis11437992002-04-12 09:54:03 +000010366 echo "$as_me:$LINENO: result: no" >&5
10367echo "${ECHO_T}no" >&6
10368fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000010369
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010370# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010371
10372
Martin v. Löwis11437992002-04-12 09:54:03 +000010373echo "$as_me:$LINENO: checking for --with-signal-module" >&5
10374echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
10375
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010376# Check whether --with-signal-module or --without-signal-module was given.
10377if test "${with_signal_module+set}" = set; then
10378 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010379
Martin v. Löwis11437992002-04-12 09:54:03 +000010380fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010381
10382if test -z "$with_signal_module"
10383then with_signal_module="yes"
10384fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010385echo "$as_me:$LINENO: result: $with_signal_module" >&5
10386echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010387
10388if test "${with_signal_module}" = "yes"; then
10389 USE_SIGNAL_MODULE=""
10390 SIGNAL_OBJS=""
10391else
10392 USE_SIGNAL_MODULE="#"
10393 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10394fi
10395
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010396# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010397
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010398USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010399
Martin v. Löwis11437992002-04-12 09:54:03 +000010400echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
10401echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
10402
Guido van Rossumec2f0731997-01-22 20:54:01 +000010403
10404# Check whether --with-dec-threads or --without-dec-threads was given.
10405if test "${with_dec_threads+set}" = set; then
10406 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000010407
10408echo "$as_me:$LINENO: result: $withval" >&5
10409echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000010410LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000010411if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000010412 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000010413fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010414else
Martin v. Löwis11437992002-04-12 09:54:03 +000010415 echo "$as_me:$LINENO: result: no" >&5
10416echo "${ECHO_T}no" >&6
10417fi;
10418
10419# Templates for things AC_DEFINEd more than once.
10420# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010421
10422
Martin v. Löwis11437992002-04-12 09:54:03 +000010423
10424
10425
10426
10427
10428echo "$as_me:$LINENO: checking for --with-threads" >&5
10429echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
10430
Guido van Rossumec2f0731997-01-22 20:54:01 +000010431# Check whether --with-threads or --without-threads was given.
10432if test "${with_threads+set}" = set; then
10433 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000010434
Martin v. Löwis11437992002-04-12 09:54:03 +000010435fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000010436
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010437# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010438
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010439# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010440if test "${with_thread+set}" = set; then
10441 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010442 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000010443fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010444
10445if test -z "$with_threads"
10446then with_threads="yes"
10447fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010448echo "$as_me:$LINENO: result: $with_threads" >&5
10449echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010450
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010451
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010452if test "$with_threads" = "no"
10453then
10454 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010455elif test "$ac_cv_pthread_is_default" = yes
10456then
Martin v. Löwis11437992002-04-12 09:54:03 +000010457 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010458#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010459_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010460
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010461 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010462 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010463#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010464_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010465
10466 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010467 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010468elif test "$ac_cv_kpthread" = "yes"
10469then
10470 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010471 if test "$ac_cv_cxx_thread" = "yes"; then
10472 CXX="$CXX -Kpthread"
10473 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010474 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010475#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010476_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010477
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010478 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010479 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010480elif test "$ac_cv_kthread" = "yes"
10481then
10482 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010483 if test "$ac_cv_cxx_thread" = "yes"; then
10484 CXX="$CXX -Kthread"
10485 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010486 cat >>confdefs.h <<\_ACEOF
10487#define WITH_THREAD 1
10488_ACEOF
10489
10490 posix_threads=yes
10491 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010492elif test "$ac_cv_pthread" = "yes"
10493then
10494 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010495 if test "$ac_cv_cxx_thread" = "yes"; then
10496 CXX="$CXX -pthread"
10497 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010498 cat >>confdefs.h <<\_ACEOF
10499#define WITH_THREAD 1
10500_ACEOF
10501
10502 posix_threads=yes
10503 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010504else
10505 if test ! -z "$with_threads" -a -d "$with_threads"
10506 then LDFLAGS="$LDFLAGS -L$with_threads"
10507 fi
10508 if test ! -z "$withval" -a -d "$withval"
10509 then LDFLAGS="$LDFLAGS -L$withval"
10510 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010511
10512 # According to the POSIX spec, a pthreads implementation must
10513 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010514 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10515echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10516 cat >conftest.$ac_ext <<_ACEOF
10517#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010518#include "confdefs.h"
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010519
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010520#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010521#ifdef _POSIX_THREADS
10522yes
10523#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010524
10525_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010526if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010527 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010528 unistd_defines_pthreads=yes
10529else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010530 unistd_defines_pthreads=no
10531fi
10532rm -f conftest*
10533
Martin v. Löwis11437992002-04-12 09:54:03 +000010534 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10535echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010536
Martin v. Löwis11437992002-04-12 09:54:03 +000010537 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010538#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010539_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010540
Martin v. Löwis11437992002-04-12 09:54:03 +000010541 if test "${ac_cv_header_cthreads_h+set}" = set; then
10542 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10543echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10544if test "${ac_cv_header_cthreads_h+set}" = set; then
10545 echo $ECHO_N "(cached) $ECHO_C" >&6
10546fi
10547echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10548echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010549else
Martin v. Löwis11437992002-04-12 09:54:03 +000010550 # Is the header compilable?
10551echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10552echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10553cat >conftest.$ac_ext <<_ACEOF
10554#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010555#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010556$ac_includes_default
10557#include <cthreads.h>
10558_ACEOF
10559rm -f conftest.$ac_objext
10560if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10561 (eval $ac_compile) 2>&5
10562 ac_status=$?
10563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10564 (exit $ac_status); } &&
10565 { ac_try='test -s conftest.$ac_objext'
10566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10567 (eval $ac_try) 2>&5
10568 ac_status=$?
10569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10570 (exit $ac_status); }; }; then
10571 ac_header_compiler=yes
10572else
10573 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010574cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010575ac_header_compiler=no
10576fi
10577rm -f conftest.$ac_objext conftest.$ac_ext
10578echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10579echo "${ECHO_T}$ac_header_compiler" >&6
10580
10581# Is the header present?
10582echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10583echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10584cat >conftest.$ac_ext <<_ACEOF
10585#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010586#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010587#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010588_ACEOF
10589if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10590 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10591 ac_status=$?
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010592 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010593 rm -f conftest.er1
10594 cat conftest.err >&5
10595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10596 (exit $ac_status); } >/dev/null; then
10597 if test -s conftest.err; then
10598 ac_cpp_err=$ac_c_preproc_warn_flag
10599 else
10600 ac_cpp_err=
10601 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010602else
Martin v. Löwis11437992002-04-12 09:54:03 +000010603 ac_cpp_err=yes
10604fi
10605if test -z "$ac_cpp_err"; then
10606 ac_header_preproc=yes
10607else
10608 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010609 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010610 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010611fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010612rm -f conftest.err conftest.$ac_ext
10613echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10614echo "${ECHO_T}$ac_header_preproc" >&6
10615
10616# So? What about this header?
10617case $ac_header_compiler:$ac_header_preproc in
10618 yes:no )
10619 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10620echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10621 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010622echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwis11437992002-04-12 09:54:03 +000010623 no:yes )
10624 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10625echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10626 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10627echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10628 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010629echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwis11437992002-04-12 09:54:03 +000010630esac
10631echo "$as_me:$LINENO: checking for cthreads.h" >&5
10632echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10633if test "${ac_cv_header_cthreads_h+set}" = set; then
10634 echo $ECHO_N "(cached) $ECHO_C" >&6
10635else
10636 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010637fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010638echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10639echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10640
10641fi
10642if test $ac_cv_header_cthreads_h = yes; then
10643 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010644#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010645_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010646
Martin v. Löwis11437992002-04-12 09:54:03 +000010647 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010648#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010649_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010650
Martin v. Löwis11437992002-04-12 09:54:03 +000010651
10652cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010653#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010654_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010655
10656 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010657 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010658else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010659
Martin v. Löwis11437992002-04-12 09:54:03 +000010660 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10661 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10662echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10663if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10664 echo $ECHO_N "(cached) $ECHO_C" >&6
10665fi
10666echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10667echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010668else
Martin v. Löwis11437992002-04-12 09:54:03 +000010669 # Is the header compilable?
10670echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10671echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10672cat >conftest.$ac_ext <<_ACEOF
10673#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010674#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010675$ac_includes_default
10676#include <mach/cthreads.h>
10677_ACEOF
10678rm -f conftest.$ac_objext
10679if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10680 (eval $ac_compile) 2>&5
10681 ac_status=$?
10682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10683 (exit $ac_status); } &&
10684 { ac_try='test -s conftest.$ac_objext'
10685 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10686 (eval $ac_try) 2>&5
10687 ac_status=$?
10688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10689 (exit $ac_status); }; }; then
10690 ac_header_compiler=yes
10691else
10692 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010693cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010694ac_header_compiler=no
10695fi
10696rm -f conftest.$ac_objext conftest.$ac_ext
10697echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10698echo "${ECHO_T}$ac_header_compiler" >&6
10699
10700# Is the header present?
10701echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10702echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10703cat >conftest.$ac_ext <<_ACEOF
10704#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010705#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010706#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010707_ACEOF
10708if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10709 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10710 ac_status=$?
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010711 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010712 rm -f conftest.er1
10713 cat conftest.err >&5
10714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10715 (exit $ac_status); } >/dev/null; then
10716 if test -s conftest.err; then
10717 ac_cpp_err=$ac_c_preproc_warn_flag
10718 else
10719 ac_cpp_err=
10720 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010721else
Martin v. Löwis11437992002-04-12 09:54:03 +000010722 ac_cpp_err=yes
10723fi
10724if test -z "$ac_cpp_err"; then
10725 ac_header_preproc=yes
10726else
10727 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010728 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010729 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010730fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010731rm -f conftest.err conftest.$ac_ext
10732echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10733echo "${ECHO_T}$ac_header_preproc" >&6
10734
10735# So? What about this header?
10736case $ac_header_compiler:$ac_header_preproc in
10737 yes:no )
10738 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10739echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10740 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010741echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwis11437992002-04-12 09:54:03 +000010742 no:yes )
10743 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10744echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10745 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10746echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10747 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010748echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwis11437992002-04-12 09:54:03 +000010749esac
10750echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10751echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10752if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10753 echo $ECHO_N "(cached) $ECHO_C" >&6
10754else
10755 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010756fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010757echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10758echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10759
10760fi
10761if test $ac_cv_header_mach_cthreads_h = yes; then
10762 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010763#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010764_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010765
Martin v. Löwis11437992002-04-12 09:54:03 +000010766 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010767#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010768_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010769
Martin v. Löwis11437992002-04-12 09:54:03 +000010770
10771cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010772#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010773_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010774
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010775 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010776else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010777
Martin v. Löwis11437992002-04-12 09:54:03 +000010778 echo "$as_me:$LINENO: checking for --with-pth" >&5
10779echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10780
10781# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010782if test "${with_pth+set}" = set; then
10783 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010784 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010785echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010786 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010787#define WITH_THREAD 1
10788_ACEOF
10789
10790
10791cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010792#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010793_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010794
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010795 LIBS="-lpth $LIBS"
10796 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010797else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010798 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010799echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010800
10801 # Just looking for pthread_create in libpthread is not enough:
10802 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10803 # So we really have to include pthread.h, and then link.
10804 _libs=$LIBS
10805 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010806 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10807echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10808 cat >conftest.$ac_ext <<_ACEOF
10809#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010810#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010811#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010812
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010813void * start_routine (void *arg) { exit (0); }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010814#ifdef F77_DUMMY_MAIN
10815# ifdef __cplusplus
10816 extern "C"
10817# endif
10818 int F77_DUMMY_MAIN() { return 1; }
10819#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010820int
10821main ()
10822{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010823
10824pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010825 ;
10826 return 0;
10827}
10828_ACEOF
10829rm -f conftest.$ac_objext conftest$ac_exeext
10830if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10831 (eval $ac_link) 2>&5
10832 ac_status=$?
10833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10834 (exit $ac_status); } &&
10835 { ac_try='test -s conftest$ac_exeext'
10836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10837 (eval $ac_try) 2>&5
10838 ac_status=$?
10839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10840 (exit $ac_status); }; }; then
10841
10842 echo "$as_me:$LINENO: result: yes" >&5
10843echo "${ECHO_T}yes" >&6
10844 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010845#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010846_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010847
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010848 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010849 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010850else
Martin v. Löwis11437992002-04-12 09:54:03 +000010851 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010852cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010853
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010854 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010855 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10856echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10857if test "${ac_cv_func_pthread_detach+set}" = set; then
10858 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010859else
Martin v. Löwis11437992002-04-12 09:54:03 +000010860 cat >conftest.$ac_ext <<_ACEOF
10861#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010862#include "confdefs.h"
Guido van Rossumad678af1998-10-02 14:42:15 +000010863/* System header to define __stub macros and hopefully few prototypes,
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010864 which can conflict with char pthread_detach (); below. */
10865#include <assert.h>
Guido van Rossumad678af1998-10-02 14:42:15 +000010866/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010867#ifdef __cplusplus
10868extern "C"
10869#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010870/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010871 builtin and then its argument prototype would still apply. */
10872char pthread_detach ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010873char (*f) ();
10874
10875#ifdef F77_DUMMY_MAIN
10876# ifdef __cplusplus
10877 extern "C"
10878# endif
10879 int F77_DUMMY_MAIN() { return 1; }
10880#endif
10881int
10882main ()
10883{
Guido van Rossumad678af1998-10-02 14:42:15 +000010884/* The GNU C library defines this for functions which it implements
10885 to always fail with ENOSYS. Some functions are actually named
10886 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010887#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010888choke me
10889#else
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010890f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +000010891#endif
10892
Martin v. Löwis11437992002-04-12 09:54:03 +000010893 ;
10894 return 0;
10895}
10896_ACEOF
10897rm -f conftest.$ac_objext conftest$ac_exeext
10898if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10899 (eval $ac_link) 2>&5
10900 ac_status=$?
10901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10902 (exit $ac_status); } &&
10903 { ac_try='test -s conftest$ac_exeext'
10904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10905 (eval $ac_try) 2>&5
10906 ac_status=$?
10907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10908 (exit $ac_status); }; }; then
10909 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010910else
Martin v. Löwis11437992002-04-12 09:54:03 +000010911 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010912cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010913ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010914fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010915rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010916fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010917echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10918echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10919if test $ac_cv_func_pthread_detach = yes; then
10920 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010921#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010922_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010923
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010924 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010925 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010926else
Guido van Rossumad678af1998-10-02 14:42:15 +000010927
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010928 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10929 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10930echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10931if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10932 echo $ECHO_N "(cached) $ECHO_C" >&6
10933fi
10934echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10935echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10936else
10937 # Is the header compilable?
10938echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10939echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10940cat >conftest.$ac_ext <<_ACEOF
10941#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010942#include "confdefs.h"
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010943$ac_includes_default
10944#include <atheos/threads.h>
10945_ACEOF
10946rm -f conftest.$ac_objext
10947if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10948 (eval $ac_compile) 2>&5
10949 ac_status=$?
10950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10951 (exit $ac_status); } &&
10952 { ac_try='test -s conftest.$ac_objext'
10953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10954 (eval $ac_try) 2>&5
10955 ac_status=$?
10956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10957 (exit $ac_status); }; }; then
10958 ac_header_compiler=yes
10959else
10960 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010961cat conftest.$ac_ext >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010962ac_header_compiler=no
10963fi
10964rm -f conftest.$ac_objext conftest.$ac_ext
10965echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10966echo "${ECHO_T}$ac_header_compiler" >&6
10967
10968# Is the header present?
10969echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10970echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10971cat >conftest.$ac_ext <<_ACEOF
10972#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010973#include "confdefs.h"
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010974#include <atheos/threads.h>
10975_ACEOF
10976if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10977 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10978 ac_status=$?
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010979 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010980 rm -f conftest.er1
10981 cat conftest.err >&5
10982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10983 (exit $ac_status); } >/dev/null; then
10984 if test -s conftest.err; then
10985 ac_cpp_err=$ac_c_preproc_warn_flag
10986 else
10987 ac_cpp_err=
10988 fi
10989else
10990 ac_cpp_err=yes
10991fi
10992if test -z "$ac_cpp_err"; then
10993 ac_header_preproc=yes
10994else
10995 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000010996 cat conftest.$ac_ext >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010997 ac_header_preproc=no
10998fi
10999rm -f conftest.err conftest.$ac_ext
11000echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11001echo "${ECHO_T}$ac_header_preproc" >&6
11002
11003# So? What about this header?
11004case $ac_header_compiler:$ac_header_preproc in
11005 yes:no )
11006 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11007echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11008 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011009echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011010 no:yes )
11011 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
11012echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
11013 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
11014echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
11015 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011016echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011017esac
11018echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
11019echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
11020if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11021 echo $ECHO_N "(cached) $ECHO_C" >&6
11022else
11023 ac_cv_header_atheos_threads_h=$ac_header_preproc
11024fi
11025echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
11026echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
11027
11028fi
11029if test $ac_cv_header_atheos_threads_h = yes; then
11030 cat >>confdefs.h <<\_ACEOF
11031#define WITH_THREAD 1
11032_ACEOF
11033
11034
11035cat >>confdefs.h <<\_ACEOF
11036#define ATHEOS_THREADS 1
11037_ACEOF
11038
11039 THREADOBJ="Python/thread.o"
11040else
11041
Martin v. Löwis11437992002-04-12 09:54:03 +000011042 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11043 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
11044echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
11045if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11046 echo $ECHO_N "(cached) $ECHO_C" >&6
11047fi
11048echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
11049echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011050else
Martin v. Löwis11437992002-04-12 09:54:03 +000011051 # Is the header compilable?
11052echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
11053echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
11054cat >conftest.$ac_ext <<_ACEOF
11055#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011056#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011057$ac_includes_default
11058#include <kernel/OS.h>
11059_ACEOF
11060rm -f conftest.$ac_objext
11061if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11062 (eval $ac_compile) 2>&5
11063 ac_status=$?
11064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11065 (exit $ac_status); } &&
11066 { ac_try='test -s conftest.$ac_objext'
11067 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11068 (eval $ac_try) 2>&5
11069 ac_status=$?
11070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11071 (exit $ac_status); }; }; then
11072 ac_header_compiler=yes
11073else
11074 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011075cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011076ac_header_compiler=no
11077fi
11078rm -f conftest.$ac_objext conftest.$ac_ext
11079echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11080echo "${ECHO_T}$ac_header_compiler" >&6
11081
11082# Is the header present?
11083echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
11084echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
11085cat >conftest.$ac_ext <<_ACEOF
11086#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011087#include "confdefs.h"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011088#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011089_ACEOF
11090if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11091 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11092 ac_status=$?
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011093 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011094 rm -f conftest.er1
11095 cat conftest.err >&5
11096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11097 (exit $ac_status); } >/dev/null; then
11098 if test -s conftest.err; then
11099 ac_cpp_err=$ac_c_preproc_warn_flag
11100 else
11101 ac_cpp_err=
11102 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011103else
Martin v. Löwis11437992002-04-12 09:54:03 +000011104 ac_cpp_err=yes
11105fi
11106if test -z "$ac_cpp_err"; then
11107 ac_header_preproc=yes
11108else
11109 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011110 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011111 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011112fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011113rm -f conftest.err conftest.$ac_ext
11114echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11115echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011116
Martin v. Löwis11437992002-04-12 09:54:03 +000011117# So? What about this header?
11118case $ac_header_compiler:$ac_header_preproc in
11119 yes:no )
11120 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
11121echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11122 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011123echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwis11437992002-04-12 09:54:03 +000011124 no:yes )
11125 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
11126echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
11127 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
11128echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
11129 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011130echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwis11437992002-04-12 09:54:03 +000011131esac
11132echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
11133echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
11134if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11135 echo $ECHO_N "(cached) $ECHO_C" >&6
11136else
11137 ac_cv_header_kernel_OS_h=$ac_header_preproc
11138fi
11139echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
11140echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
11141
11142fi
11143if test $ac_cv_header_kernel_OS_h = yes; then
11144 cat >>confdefs.h <<\_ACEOF
11145#define WITH_THREAD 1
11146_ACEOF
11147
11148
11149cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011150#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011151_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011152
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011153 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011154else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011155
Martin v. Löwis11437992002-04-12 09:54:03 +000011156 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
11157echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
11158if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
11159 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011160else
Martin v. Löwis11437992002-04-12 09:54:03 +000011161 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011162LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011163cat >conftest.$ac_ext <<_ACEOF
11164#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011165#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011166
Greg Steinadf63d62000-07-05 10:38:09 +000011167/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011168#ifdef __cplusplus
11169extern "C"
11170#endif
Greg Steinadf63d62000-07-05 10:38:09 +000011171/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011172 builtin and then its argument prototype would still apply. */
11173char pthread_create ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011174#ifdef F77_DUMMY_MAIN
11175# ifdef __cplusplus
11176 extern "C"
11177# endif
11178 int F77_DUMMY_MAIN() { return 1; }
11179#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011180int
11181main ()
11182{
11183pthread_create ();
11184 ;
11185 return 0;
11186}
11187_ACEOF
11188rm -f conftest.$ac_objext conftest$ac_exeext
11189if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11190 (eval $ac_link) 2>&5
11191 ac_status=$?
11192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11193 (exit $ac_status); } &&
11194 { ac_try='test -s conftest$ac_exeext'
11195 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11196 (eval $ac_try) 2>&5
11197 ac_status=$?
11198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11199 (exit $ac_status); }; }; then
11200 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000011201else
Martin v. Löwis11437992002-04-12 09:54:03 +000011202 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011203cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011204ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000011205fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011206rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11207LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011208fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011209echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
11210echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
11211if test $ac_cv_lib_pthreads_pthread_create = yes; then
11212 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011213#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011214_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011215
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011216 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011217 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011218 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000011219else
Greg Steinadf63d62000-07-05 10:38:09 +000011220
Martin v. Löwis11437992002-04-12 09:54:03 +000011221 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
11222echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
11223if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
11224 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000011225else
Martin v. Löwis11437992002-04-12 09:54:03 +000011226 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011227LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011228cat >conftest.$ac_ext <<_ACEOF
11229#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011230#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011231
Guido van Rossum49545951997-12-02 19:28:29 +000011232/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011233#ifdef __cplusplus
11234extern "C"
11235#endif
Guido van Rossum49545951997-12-02 19:28:29 +000011236/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011237 builtin and then its argument prototype would still apply. */
11238char pthread_create ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011239#ifdef F77_DUMMY_MAIN
11240# ifdef __cplusplus
11241 extern "C"
11242# endif
11243 int F77_DUMMY_MAIN() { return 1; }
11244#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011245int
11246main ()
11247{
11248pthread_create ();
11249 ;
11250 return 0;
11251}
11252_ACEOF
11253rm -f conftest.$ac_objext conftest$ac_exeext
11254if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11255 (eval $ac_link) 2>&5
11256 ac_status=$?
11257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11258 (exit $ac_status); } &&
11259 { ac_try='test -s conftest$ac_exeext'
11260 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11261 (eval $ac_try) 2>&5
11262 ac_status=$?
11263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11264 (exit $ac_status); }; }; then
11265 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000011266else
Martin v. Löwis11437992002-04-12 09:54:03 +000011267 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011268cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011269ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000011270fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011271rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11272LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000011273fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011274echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
11275echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
11276if test $ac_cv_lib_c_r_pthread_create = yes; then
11277 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011278#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011279_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011280
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011281 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011282 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011283 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011284else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011285
Martin v. Löwis11437992002-04-12 09:54:03 +000011286 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
11287echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
11288if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
11289 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011290else
Martin v. Löwis11437992002-04-12 09:54:03 +000011291 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011292LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011293cat >conftest.$ac_ext <<_ACEOF
11294#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011295#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011296
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011297/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011298#ifdef __cplusplus
11299extern "C"
11300#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011301/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011302 builtin and then its argument prototype would still apply. */
11303char __d6_pthread_create ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011304#ifdef F77_DUMMY_MAIN
11305# ifdef __cplusplus
11306 extern "C"
11307# endif
11308 int F77_DUMMY_MAIN() { return 1; }
11309#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011310int
11311main ()
11312{
11313__d6_pthread_create ();
11314 ;
11315 return 0;
11316}
11317_ACEOF
11318rm -f conftest.$ac_objext conftest$ac_exeext
11319if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11320 (eval $ac_link) 2>&5
11321 ac_status=$?
11322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11323 (exit $ac_status); } &&
11324 { ac_try='test -s conftest$ac_exeext'
11325 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11326 (eval $ac_try) 2>&5
11327 ac_status=$?
11328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11329 (exit $ac_status); }; }; then
11330 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011331else
Martin v. Löwis11437992002-04-12 09:54:03 +000011332 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011333cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011334ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011335fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011336rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11337LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011338fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011339echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
11340echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
11341if test $ac_cv_lib_thread___d6_pthread_create = yes; then
11342 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011343#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011344_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011345
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011346 echo Systems with __d6_pthread_create are not supported anymore.
11347 echo See README
11348 exit 1
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011349 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011350 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011351 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000011352else
Guido van Rossum49545951997-12-02 19:28:29 +000011353
Martin v. Löwis11437992002-04-12 09:54:03 +000011354 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
11355echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
11356if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
11357 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011358else
Martin v. Löwis11437992002-04-12 09:54:03 +000011359 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011360LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011361cat >conftest.$ac_ext <<_ACEOF
11362#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011363#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011364
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011365/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011366#ifdef __cplusplus
11367extern "C"
11368#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011369/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011370 builtin and then its argument prototype would still apply. */
11371char __pthread_create_system ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011372#ifdef F77_DUMMY_MAIN
11373# ifdef __cplusplus
11374 extern "C"
11375# endif
11376 int F77_DUMMY_MAIN() { return 1; }
11377#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011378int
11379main ()
11380{
11381__pthread_create_system ();
11382 ;
11383 return 0;
11384}
11385_ACEOF
11386rm -f conftest.$ac_objext conftest$ac_exeext
11387if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11388 (eval $ac_link) 2>&5
11389 ac_status=$?
11390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11391 (exit $ac_status); } &&
11392 { ac_try='test -s conftest$ac_exeext'
11393 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11394 (eval $ac_try) 2>&5
11395 ac_status=$?
11396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11397 (exit $ac_status); }; }; then
11398 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011399else
Martin v. Löwis11437992002-04-12 09:54:03 +000011400 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011401cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011402ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011403fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011404rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11405LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011406fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011407echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11408echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
11409if test $ac_cv_lib_pthread___pthread_create_system = yes; then
11410 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011411#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011412_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011413
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011414 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011415 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011416 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011417else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011418
Martin v. Löwis11437992002-04-12 09:54:03 +000011419 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
11420echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
11421if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
11422 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000011423else
Martin v. Löwis11437992002-04-12 09:54:03 +000011424 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011425LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011426cat >conftest.$ac_ext <<_ACEOF
11427#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011428#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011429
Guido van Rossumb93a8621998-05-07 13:27:32 +000011430/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011431#ifdef __cplusplus
11432extern "C"
11433#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000011434/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011435 builtin and then its argument prototype would still apply. */
11436char pthread_create ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011437#ifdef F77_DUMMY_MAIN
11438# ifdef __cplusplus
11439 extern "C"
11440# endif
11441 int F77_DUMMY_MAIN() { return 1; }
11442#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011443int
11444main ()
11445{
11446pthread_create ();
11447 ;
11448 return 0;
11449}
11450_ACEOF
11451rm -f conftest.$ac_objext conftest$ac_exeext
11452if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11453 (eval $ac_link) 2>&5
11454 ac_status=$?
11455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11456 (exit $ac_status); } &&
11457 { ac_try='test -s conftest$ac_exeext'
11458 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11459 (eval $ac_try) 2>&5
11460 ac_status=$?
11461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11462 (exit $ac_status); }; }; then
11463 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000011464else
Martin v. Löwis11437992002-04-12 09:54:03 +000011465 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011466cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011467ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011468fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011469rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11470LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011471fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011472echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
11473echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
11474if test $ac_cv_lib_cma_pthread_create = yes; then
11475 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011476#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011477_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011478
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011479 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011480 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011481 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011482else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011483
Martin v. Löwis130fb172001-07-19 11:00:41 +000011484 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000011485fi
11486
Guido van Rossum627b2d71993-12-24 10:39:16 +000011487
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011488fi
11489
Guido van Rossum0be3e491997-05-22 20:33:33 +000011490fi
11491
Guido van Rossum49545951997-12-02 19:28:29 +000011492fi
11493
Guido van Rossumb93a8621998-05-07 13:27:32 +000011494fi
11495
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011496fi
11497
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011498
Michael W. Hudson54241132001-12-07 15:38:26 +000011499fi
11500
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011501
11502fi
11503
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011504fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011505rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11506fi;
11507fi
11508
11509
11510fi
11511
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011512
Michael W. Hudson54241132001-12-07 15:38:26 +000011513
Martin v. Löwis11437992002-04-12 09:54:03 +000011514 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11515echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11516if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11517 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011518else
Martin v. Löwis11437992002-04-12 09:54:03 +000011519 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011520LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011521cat >conftest.$ac_ext <<_ACEOF
11522#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011523#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011524
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011525/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011526#ifdef __cplusplus
11527extern "C"
11528#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011529/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011530 builtin and then its argument prototype would still apply. */
11531char usconfig ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011532#ifdef F77_DUMMY_MAIN
11533# ifdef __cplusplus
11534 extern "C"
11535# endif
11536 int F77_DUMMY_MAIN() { return 1; }
11537#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011538int
11539main ()
11540{
11541usconfig ();
11542 ;
11543 return 0;
11544}
11545_ACEOF
11546rm -f conftest.$ac_objext conftest$ac_exeext
11547if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11548 (eval $ac_link) 2>&5
11549 ac_status=$?
11550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11551 (exit $ac_status); } &&
11552 { ac_try='test -s conftest$ac_exeext'
11553 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11554 (eval $ac_try) 2>&5
11555 ac_status=$?
11556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11557 (exit $ac_status); }; }; then
11558 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011559else
Martin v. Löwis11437992002-04-12 09:54:03 +000011560 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011561cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011562ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011563fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011564rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11565LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011566fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011567echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11568echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11569if test $ac_cv_lib_mpc_usconfig = yes; then
11570 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011571#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011572_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011573
Martin v. Löwis130fb172001-07-19 11:00:41 +000011574 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011575 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011576 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011577fi
11578
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011579
Neal Norwitza978ab02002-11-02 16:58:05 +000011580 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011581 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11582echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11583if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11584 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011585else
Martin v. Löwis11437992002-04-12 09:54:03 +000011586 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011587LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011588cat >conftest.$ac_ext <<_ACEOF
11589#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011590#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011591
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011592/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011593#ifdef __cplusplus
11594extern "C"
11595#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011596/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011597 builtin and then its argument prototype would still apply. */
11598char thr_create ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011599#ifdef F77_DUMMY_MAIN
11600# ifdef __cplusplus
11601 extern "C"
11602# endif
11603 int F77_DUMMY_MAIN() { return 1; }
11604#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011605int
11606main ()
11607{
11608thr_create ();
11609 ;
11610 return 0;
11611}
11612_ACEOF
11613rm -f conftest.$ac_objext conftest$ac_exeext
11614if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11615 (eval $ac_link) 2>&5
11616 ac_status=$?
11617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11618 (exit $ac_status); } &&
11619 { ac_try='test -s conftest$ac_exeext'
11620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11621 (eval $ac_try) 2>&5
11622 ac_status=$?
11623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11624 (exit $ac_status); }; }; then
11625 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011626else
Martin v. Löwis11437992002-04-12 09:54:03 +000011627 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011628cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011629ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011630fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011631rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11632LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011633fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011634echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11635echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11636if test $ac_cv_lib_thread_thr_create = yes; then
11637 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011638#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011639_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011640
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011641 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011642 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011643 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011644fi
11645
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011646 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011647
Martin v. Löwis130fb172001-07-19 11:00:41 +000011648 if test "$USE_THREAD_MODULE" != "#"
11649 then
11650 # If the above checks didn't disable threads, (at least) OSF1
11651 # needs this '-threads' argument during linking.
11652 case $ac_sys_system in
11653 OSF1) LDLAST=-threads;;
11654 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011655 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011656fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011657
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011658if test "$posix_threads" = "yes"; then
11659 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011660
11661cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011662#define _POSIX_THREADS 1
11663_ACEOF
11664
11665 fi
11666
11667 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11668 case $ac_sys_system/$ac_sys_release in
11669 SunOS/5.6)
11670cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011671#define HAVE_PTHREAD_DESTRUCTOR 1
11672_ACEOF
11673
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011674 ;;
11675 SunOS/5.8)
11676cat >>confdefs.h <<\_ACEOF
11677#define HAVE_BROKEN_POSIX_SEMAPHORES 1
11678_ACEOF
11679
11680 ;;
11681 esac
11682
11683 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11684echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11685 if test "${ac_cv_pthread_system_supported+set}" = set; then
11686 echo $ECHO_N "(cached) $ECHO_C" >&6
11687else
11688 if test "$cross_compiling" = yes; then
11689 ac_cv_pthread_system_supported=no
11690else
11691 cat >conftest.$ac_ext <<_ACEOF
11692#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011693#include "confdefs.h"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011694#include <pthread.h>
11695 void *foo(void *parm) {
11696 return NULL;
11697 }
11698 main() {
11699 pthread_attr_t attr;
11700 pthread_t id;
11701 if (pthread_attr_init(&attr)) exit(-1);
11702 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
11703 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
11704 exit(0);
11705 }
11706_ACEOF
11707rm -f conftest$ac_exeext
11708if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11709 (eval $ac_link) 2>&5
11710 ac_status=$?
11711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11712 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11714 (eval $ac_try) 2>&5
11715 ac_status=$?
11716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11717 (exit $ac_status); }; }; then
11718 ac_cv_pthread_system_supported=yes
11719else
11720 echo "$as_me: program exited with status $ac_status" >&5
11721echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011722cat conftest.$ac_ext >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011723( exit $ac_status )
11724ac_cv_pthread_system_supported=no
11725fi
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011726rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011727fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011728
Guido van Rossum627b2d71993-12-24 10:39:16 +000011729fi
11730
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011731 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11732echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
11733 if test "$ac_cv_pthread_system_supported" = "yes"; then
11734
11735cat >>confdefs.h <<\_ACEOF
11736#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
11737_ACEOF
11738
11739 fi
11740
11741for ac_func in pthread_sigmask
11742do
11743as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11744echo "$as_me:$LINENO: checking for $ac_func" >&5
11745echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11746if eval "test \"\${$as_ac_var+set}\" = set"; then
11747 echo $ECHO_N "(cached) $ECHO_C" >&6
11748else
11749 cat >conftest.$ac_ext <<_ACEOF
11750#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011751#include "confdefs.h"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011752/* System header to define __stub macros and hopefully few prototypes,
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011753 which can conflict with char $ac_func (); below. */
11754#include <assert.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011755/* Override any gcc2 internal prototype to avoid an error. */
11756#ifdef __cplusplus
11757extern "C"
11758#endif
11759/* We use char because int might match the return type of a gcc2
11760 builtin and then its argument prototype would still apply. */
11761char $ac_func ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011762char (*f) ();
11763
11764#ifdef F77_DUMMY_MAIN
11765# ifdef __cplusplus
11766 extern "C"
11767# endif
11768 int F77_DUMMY_MAIN() { return 1; }
11769#endif
11770int
11771main ()
11772{
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011773/* The GNU C library defines this for functions which it implements
11774 to always fail with ENOSYS. Some functions are actually named
11775 something starting with __ and the normal name is an alias. */
11776#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11777choke me
11778#else
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011779f = $ac_func;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011780#endif
11781
11782 ;
11783 return 0;
11784}
11785_ACEOF
11786rm -f conftest.$ac_objext conftest$ac_exeext
11787if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11788 (eval $ac_link) 2>&5
11789 ac_status=$?
11790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11791 (exit $ac_status); } &&
11792 { ac_try='test -s conftest$ac_exeext'
11793 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11794 (eval $ac_try) 2>&5
11795 ac_status=$?
11796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11797 (exit $ac_status); }; }; then
11798 eval "$as_ac_var=yes"
11799else
11800 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011801cat conftest.$ac_ext >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011802eval "$as_ac_var=no"
11803fi
11804rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11805fi
11806echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11807echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11808if test `eval echo '${'$as_ac_var'}'` = yes; then
11809 cat >>confdefs.h <<_ACEOF
11810#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11811_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011812 case $ac_sys_system in
11813 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011814
Jason Tishlerfac083d2003-07-22 15:20:49 +000011815cat >>confdefs.h <<\_ACEOF
11816#define HAVE_BROKEN_PTHREAD_SIGMASK 1
11817_ACEOF
11818
11819 ;;
11820 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011821fi
11822done
11823
11824fi
11825
11826
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011827# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011828
11829
11830echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11831echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011832# Check whether --enable-ipv6 or --disable-ipv6 was given.
11833if test "${enable_ipv6+set}" = set; then
11834 enableval="$enable_ipv6"
11835 case "$enableval" in
11836 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011837 echo "$as_me:$LINENO: result: no" >&5
11838echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011839 ipv6=no
11840 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011841 *) echo "$as_me:$LINENO: result: yes" >&5
11842echo "${ECHO_T}yes" >&6
11843 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011844#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011845_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011846
11847 ipv6=yes
11848 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011849 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011850else
Martin v. Löwis11437992002-04-12 09:54:03 +000011851
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011852 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011853 echo "$as_me:$LINENO: result: no" >&5
11854echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011855 ipv6=no
11856
11857else
Martin v. Löwis11437992002-04-12 09:54:03 +000011858 cat >conftest.$ac_ext <<_ACEOF
11859#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011860#include "confdefs.h"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011861 /* AF_INET6 available check */
11862#include <sys/types.h>
11863#include <sys/socket.h>
11864main()
11865{
11866 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11867 exit(1);
11868 else
11869 exit(0);
11870}
11871
Martin v. Löwis11437992002-04-12 09:54:03 +000011872_ACEOF
11873rm -f conftest$ac_exeext
11874if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11875 (eval $ac_link) 2>&5
11876 ac_status=$?
11877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11878 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11879 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11880 (eval $ac_try) 2>&5
11881 ac_status=$?
11882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11883 (exit $ac_status); }; }; then
11884 echo "$as_me:$LINENO: result: yes" >&5
11885echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011886 ipv6=yes
11887else
Martin v. Löwis11437992002-04-12 09:54:03 +000011888 echo "$as_me: program exited with status $ac_status" >&5
11889echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011890cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011891( exit $ac_status )
11892echo "$as_me:$LINENO: result: no" >&5
11893echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011894 ipv6=no
11895fi
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011896rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011897fi
11898
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011899if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011900 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11901echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11902 cat >conftest.$ac_ext <<_ACEOF
11903#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011904#include "confdefs.h"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011905#include <sys/types.h>
11906#include <netinet/in.h>
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011907#ifdef F77_DUMMY_MAIN
11908# ifdef __cplusplus
11909 extern "C"
11910# endif
11911 int F77_DUMMY_MAIN() { return 1; }
11912#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011913int
11914main ()
11915{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011916struct sockaddr_in6 x;
11917x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011918 ;
11919 return 0;
11920}
11921_ACEOF
11922rm -f conftest.$ac_objext
11923if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11924 (eval $ac_compile) 2>&5
11925 ac_status=$?
11926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11927 (exit $ac_status); } &&
11928 { ac_try='test -s conftest.$ac_objext'
11929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11930 (eval $ac_try) 2>&5
11931 ac_status=$?
11932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11933 (exit $ac_status); }; }; then
11934 echo "$as_me:$LINENO: result: yes" >&5
11935echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011936 ipv6=yes
11937else
Martin v. Löwis11437992002-04-12 09:54:03 +000011938 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011939cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011940echo "$as_me:$LINENO: result: no" >&5
11941echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011942 ipv6=no
11943fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011944rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011945fi
11946
11947if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011948 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011949#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011950_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011951
11952fi
11953
Martin v. Löwis11437992002-04-12 09:54:03 +000011954fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011955
11956ipv6type=unknown
11957ipv6lib=none
11958ipv6trylibc=no
11959
11960if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011961 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11962echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011963 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11964 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011965 case $i in
11966 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011967 cat >conftest.$ac_ext <<_ACEOF
11968#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011969#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011970
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011971#include <netinet/in.h>
11972#ifdef IPV6_INRIA_VERSION
11973yes
11974#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011975_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011976if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011977 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011978 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011979fi
11980rm -f conftest*
11981
11982 ;;
11983 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011984 cat >conftest.$ac_ext <<_ACEOF
11985#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011986#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011987
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011988#include <netinet/in.h>
11989#ifdef __KAME__
11990yes
11991#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011992_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011993if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011994 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011995 ipv6type=$i;
11996 ipv6lib=inet6
11997 ipv6libdir=/usr/local/v6/lib
11998 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011999fi
12000rm -f conftest*
12001
12002 ;;
12003 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000012004 cat >conftest.$ac_ext <<_ACEOF
12005#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012006#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012007
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012008#include <features.h>
12009#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
12010yes
12011#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012012_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012013if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012014 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012015 ipv6type=$i;
12016 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012017fi
12018rm -f conftest*
12019
12020 ;;
12021 linux-inet6)
12022 if test -d /usr/inet6; then
12023 ipv6type=$i
12024 ipv6lib=inet6
12025 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000012026 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012027 fi
12028 ;;
12029 solaris)
12030 if test -f /etc/netconfig; then
12031 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
12032 ipv6type=$i
12033 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012034 fi
12035 fi
12036 ;;
12037 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000012038 cat >conftest.$ac_ext <<_ACEOF
12039#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012040#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012041
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012042#include <sys/param.h>
12043#ifdef _TOSHIBA_INET6
12044yes
12045#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012046_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012047if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012048 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012049 ipv6type=$i;
12050 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012051 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012052fi
12053rm -f conftest*
12054
12055 ;;
12056 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000012057 cat >conftest.$ac_ext <<_ACEOF
12058#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012059#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012060
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012061#include </usr/local/v6/include/sys/v6config.h>
12062#ifdef __V6D__
12063yes
12064#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012065_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012066if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012067 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012068 ipv6type=$i;
12069 ipv6lib=v6;
12070 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000012071 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012072fi
12073rm -f conftest*
12074
12075 ;;
12076 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000012077 cat >conftest.$ac_ext <<_ACEOF
12078#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012079#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012080
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012081#include <sys/param.h>
12082#ifdef _ZETA_MINAMI_INET6
12083yes
12084#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012085_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012086if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012087 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012088 ipv6type=$i;
12089 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012090 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012091fi
12092rm -f conftest*
12093
12094 ;;
12095 esac
12096 if test "$ipv6type" != "unknown"; then
12097 break
12098 fi
12099 done
Martin v. Löwis11437992002-04-12 09:54:03 +000012100 echo "$as_me:$LINENO: result: $ipv6type" >&5
12101echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012102fi
12103
12104if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
12105 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
12106 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
12107 echo "using lib$ipv6lib"
12108 else
12109 if test $ipv6trylibc = "yes"; then
12110 echo "using libc"
12111 else
12112 echo 'Fatal: no $ipv6lib library found. cannot continue.'
12113 echo "You need to fetch lib$ipv6lib.a from appropriate"
12114 echo 'ipv6 kit and compile beforehand.'
12115 exit 1
12116 fi
12117 fi
12118fi
12119
Jack Jansen7b8c7542002-04-14 20:12:41 +000012120# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000012121echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
12122echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000012123
12124# Check whether --with-universal-newlines or --without-universal-newlines was given.
12125if test "${with_universal_newlines+set}" = set; then
12126 withval="$with_universal_newlines"
12127
12128fi;
12129
12130if test -z "$with_universal_newlines"
12131then with_universal_newlines="yes"
12132fi
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000012133if test "$with_universal_newlines" = "no"
Martin v. Löwis03d00d52002-12-19 19:03:31 +000012134then
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000012135 echo --without-universal-newlines is unsupported, see README
12136 exit 1
Martin v. Löwis03d00d52002-12-19 19:03:31 +000012137else
Martin v. Löwise8aea582002-04-16 05:51:02 +000012138
12139cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000012140#define WITH_UNIVERSAL_NEWLINES 1
12141_ACEOF
12142
12143fi
12144echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
12145echo "${ECHO_T}$with_universal_newlines" >&6
12146
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000012147# Check for --with-doc-strings
12148echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
12149echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
12150
12151# Check whether --with-doc-strings or --without-doc-strings was given.
12152if test "${with_doc_strings+set}" = set; then
12153 withval="$with_doc_strings"
12154
12155fi;
12156
12157if test -z "$with_doc_strings"
12158then with_doc_strings="yes"
12159fi
12160if test "$with_doc_strings" != "no"
12161then
12162
12163cat >>confdefs.h <<\_ACEOF
12164#define WITH_DOC_STRINGS 1
12165_ACEOF
12166
12167fi
12168echo "$as_me:$LINENO: result: $with_doc_strings" >&5
12169echo "${ECHO_T}$with_doc_strings" >&6
12170
Neil Schemenauera35c6882001-02-27 04:45:05 +000012171# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000012172echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
12173echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
12174
Neil Schemenauera35c6882001-02-27 04:45:05 +000012175# Check whether --with-pymalloc or --without-pymalloc was given.
12176if test "${with_pymalloc+set}" = set; then
12177 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000012178
Martin v. Löwis11437992002-04-12 09:54:03 +000012179fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000012180
Neil Schemenauer16c22972002-03-22 15:34:49 +000012181if test -z "$with_pymalloc"
12182then with_pymalloc="yes"
12183fi
12184if test "$with_pymalloc" != "no"
12185then
Martin v. Löwis11437992002-04-12 09:54:03 +000012186
12187cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012188#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012189_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012190
12191fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012192echo "$as_me:$LINENO: result: $with_pymalloc" >&5
12193echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000012194
Barry Warsawef82cd72000-06-30 16:21:01 +000012195# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012196echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
12197echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
12198
Barry Warsawef82cd72000-06-30 16:21:01 +000012199# Check whether --with-wctype-functions or --without-wctype-functions was given.
12200if test "${with_wctype_functions+set}" = set; then
12201 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000012202
Barry Warsawef82cd72000-06-30 16:21:01 +000012203if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012204then
12205
12206cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000012207#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012208_ACEOF
12209
12210 echo "$as_me:$LINENO: result: yes" >&5
12211echo "${ECHO_T}yes" >&6
12212else echo "$as_me:$LINENO: result: no" >&5
12213echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000012214fi
12215else
Martin v. Löwis11437992002-04-12 09:54:03 +000012216 echo "$as_me:$LINENO: result: no" >&5
12217echo "${ECHO_T}no" >&6
12218fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000012219
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012220# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000012221
Guido van Rossum98935bf2001-09-05 19:13:16 +000012222DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000012223
Martin v. Löwis11437992002-04-12 09:54:03 +000012224echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
12225echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
12226
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012227# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012228if test "${with_sgi_dl+set}" = set; then
12229 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000012230
12231echo "$as_me:$LINENO: result: $withval" >&5
12232echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000012233echo --with-sgi-dl is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000012234exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012235
12236cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012237#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012238_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000012239
Guido van Rossume97ee181999-12-20 21:27:22 +000012240DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012241dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000012242if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000012243then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000012244else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
12245echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
12246 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012247fi
12248DLINCLDIR=${dldir}
12249LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000012250else
Martin v. Löwis11437992002-04-12 09:54:03 +000012251 echo "$as_me:$LINENO: result: no" >&5
12252echo "${ECHO_T}no" >&6
12253fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000012254
Martin v. Löwis11437992002-04-12 09:54:03 +000012255echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
12256echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000012257
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012258# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012259if test "${with_dl_dld+set}" = set; then
12260 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000012261
12262echo "$as_me:$LINENO: result: $withval" >&5
12263echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000012264echo --with-dl-dld is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000012265exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012266
12267cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012268#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012269_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000012270
Guido van Rossume97ee181999-12-20 21:27:22 +000012271DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012272dldir=`echo "$withval" | sed 's/,.*//'`
12273dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000012274if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000012275then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012276else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&5
12277echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&2;}
12278 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012279fi
12280DLINCLDIR=${dldir}
12281LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000012282else
Martin v. Löwis11437992002-04-12 09:54:03 +000012283 echo "$as_me:$LINENO: result: no" >&5
12284echo "${ECHO_T}no" >&6
12285fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000012286
Guido van Rossume97ee181999-12-20 21:27:22 +000012287# the dlopen() function means we might want to use dynload_shlib.o. some
12288# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012289
Thomas Wouters3a584202000-08-05 23:28:51 +000012290for ac_func in dlopen
12291do
Martin v. Löwis11437992002-04-12 09:54:03 +000012292as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12293echo "$as_me:$LINENO: checking for $ac_func" >&5
12294echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12295if eval "test \"\${$as_ac_var+set}\" = set"; then
12296 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012297else
Martin v. Löwis11437992002-04-12 09:54:03 +000012298 cat >conftest.$ac_ext <<_ACEOF
12299#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012300#include "confdefs.h"
Guido van Rossume97ee181999-12-20 21:27:22 +000012301/* System header to define __stub macros and hopefully few prototypes,
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012302 which can conflict with char $ac_func (); below. */
12303#include <assert.h>
Guido van Rossume97ee181999-12-20 21:27:22 +000012304/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012305#ifdef __cplusplus
12306extern "C"
12307#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012308/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012309 builtin and then its argument prototype would still apply. */
12310char $ac_func ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012311char (*f) ();
12312
12313#ifdef F77_DUMMY_MAIN
12314# ifdef __cplusplus
12315 extern "C"
12316# endif
12317 int F77_DUMMY_MAIN() { return 1; }
12318#endif
12319int
12320main ()
12321{
Guido van Rossume97ee181999-12-20 21:27:22 +000012322/* The GNU C library defines this for functions which it implements
12323 to always fail with ENOSYS. Some functions are actually named
12324 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012325#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000012326choke me
12327#else
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012328f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000012329#endif
12330
Martin v. Löwis11437992002-04-12 09:54:03 +000012331 ;
12332 return 0;
12333}
12334_ACEOF
12335rm -f conftest.$ac_objext conftest$ac_exeext
12336if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12337 (eval $ac_link) 2>&5
12338 ac_status=$?
12339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12340 (exit $ac_status); } &&
12341 { ac_try='test -s conftest$ac_exeext'
12342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12343 (eval $ac_try) 2>&5
12344 ac_status=$?
12345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12346 (exit $ac_status); }; }; then
12347 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012348else
Martin v. Löwis11437992002-04-12 09:54:03 +000012349 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012350cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012351eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012352fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012353rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012354fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012355echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12356echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12357if test `eval echo '${'$as_ac_var'}'` = yes; then
12358 cat >>confdefs.h <<_ACEOF
12359#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12360_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012361
Guido van Rossume97ee181999-12-20 21:27:22 +000012362fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012363done
Guido van Rossume97ee181999-12-20 21:27:22 +000012364
Michael W. Hudson54241132001-12-07 15:38:26 +000012365
Guido van Rossume97ee181999-12-20 21:27:22 +000012366# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12367# loading of modules.
12368
Martin v. Löwis11437992002-04-12 09:54:03 +000012369echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
12370echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012371if test -z "$DYNLOADFILE"
12372then
12373 case $ac_sys_system/$ac_sys_release in
12374 AIX*) DYNLOADFILE="dynload_aix.o";;
12375 BeOS*) DYNLOADFILE="dynload_beos.o";;
12376 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000012377 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012378 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000012379 *)
12380 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
12381 # out any dynamic loading
12382 if test "$ac_cv_func_dlopen" = yes
12383 then DYNLOADFILE="dynload_shlib.o"
12384 else DYNLOADFILE="dynload_stub.o"
12385 fi
12386 ;;
12387 esac
12388fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012389echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
12390echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012391if test "$DYNLOADFILE" != "dynload_stub.o"
12392then
Martin v. Löwis11437992002-04-12 09:54:03 +000012393
12394cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012395#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012396_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012397
12398fi
12399
Neil Schemenauer4e425612001-06-19 15:44:15 +000012400# MACHDEP_OBJS can be set to platform-specific object files needed by Python
12401
Michael W. Hudson54241132001-12-07 15:38:26 +000012402
Martin v. Löwis11437992002-04-12 09:54:03 +000012403echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
12404echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012405if test -z "$MACHDEP_OBJS"
12406then
Jack Jansene578a632001-08-15 01:27:14 +000012407 MACHDEP_OBJS=$extra_machdep_objs
12408else
12409 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000012410fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012411echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
12412echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012413
Guido van Rossum627b2d71993-12-24 10:39:16 +000012414# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012415
12416
12417
12418
12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
12459
12460
12461
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
Martin v. Löwisd5843682002-11-21 20:41:28 +000012486for ac_func in alarm chown clock confstr ctermid execv \
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012487 fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012488 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
12489 getpriority getpwent getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000012490 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000012491 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000012492 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000012493 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000012494 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012495 sigaction siginterrupt sigrelse strftime strptime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000012496 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012497 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000012498do
Martin v. Löwis11437992002-04-12 09:54:03 +000012499as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12500echo "$as_me:$LINENO: checking for $ac_func" >&5
12501echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12502if eval "test \"\${$as_ac_var+set}\" = set"; then
12503 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012504else
Martin v. Löwis11437992002-04-12 09:54:03 +000012505 cat >conftest.$ac_ext <<_ACEOF
12506#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012507#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012508/* System header to define __stub macros and hopefully few prototypes,
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012509 which can conflict with char $ac_func (); below. */
12510#include <assert.h>
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012511/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012512#ifdef __cplusplus
12513extern "C"
12514#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012515/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012516 builtin and then its argument prototype would still apply. */
12517char $ac_func ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012518char (*f) ();
12519
12520#ifdef F77_DUMMY_MAIN
12521# ifdef __cplusplus
12522 extern "C"
12523# endif
12524 int F77_DUMMY_MAIN() { return 1; }
12525#endif
12526int
12527main ()
12528{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012529/* The GNU C library defines this for functions which it implements
12530 to always fail with ENOSYS. Some functions are actually named
12531 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012532#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012533choke me
12534#else
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012535f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012536#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012537
Martin v. Löwis11437992002-04-12 09:54:03 +000012538 ;
12539 return 0;
12540}
12541_ACEOF
12542rm -f conftest.$ac_objext conftest$ac_exeext
12543if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12544 (eval $ac_link) 2>&5
12545 ac_status=$?
12546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12547 (exit $ac_status); } &&
12548 { ac_try='test -s conftest$ac_exeext'
12549 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12550 (eval $ac_try) 2>&5
12551 ac_status=$?
12552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12553 (exit $ac_status); }; }; then
12554 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012555else
Martin v. Löwis11437992002-04-12 09:54:03 +000012556 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012557cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012558eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012559fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012560rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012561fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012562echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12563echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12564if test `eval echo '${'$as_ac_var'}'` = yes; then
12565 cat >>confdefs.h <<_ACEOF
12566#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12567_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012568
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012569fi
12570done
12571
Michael W. Hudson54241132001-12-07 15:38:26 +000012572
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012573# For some functions, having a definition is not sufficient, since
12574# we want to take their address.
12575echo "$as_me:$LINENO: checking for chroot" >&5
12576echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12577cat >conftest.$ac_ext <<_ACEOF
12578#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012579#include "confdefs.h"
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012580#include <unistd.h>
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012581#ifdef F77_DUMMY_MAIN
12582# ifdef __cplusplus
12583 extern "C"
12584# endif
12585 int F77_DUMMY_MAIN() { return 1; }
12586#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012587int
12588main ()
12589{
12590void *x=chroot
12591 ;
12592 return 0;
12593}
12594_ACEOF
12595rm -f conftest.$ac_objext
12596if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12597 (eval $ac_compile) 2>&5
12598 ac_status=$?
12599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12600 (exit $ac_status); } &&
12601 { ac_try='test -s conftest.$ac_objext'
12602 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12603 (eval $ac_try) 2>&5
12604 ac_status=$?
12605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12606 (exit $ac_status); }; }; then
12607
12608cat >>confdefs.h <<\_ACEOF
12609#define HAVE_CHROOT 1
12610_ACEOF
12611
12612 echo "$as_me:$LINENO: result: yes" >&5
12613echo "${ECHO_T}yes" >&6
12614else
12615 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012616cat conftest.$ac_ext >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012617echo "$as_me:$LINENO: result: no" >&5
12618echo "${ECHO_T}no" >&6
12619
12620fi
12621rm -f conftest.$ac_objext conftest.$ac_ext
12622echo "$as_me:$LINENO: checking for link" >&5
12623echo $ECHO_N "checking for link... $ECHO_C" >&6
12624cat >conftest.$ac_ext <<_ACEOF
12625#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012626#include "confdefs.h"
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012627#include <unistd.h>
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012628#ifdef F77_DUMMY_MAIN
12629# ifdef __cplusplus
12630 extern "C"
12631# endif
12632 int F77_DUMMY_MAIN() { return 1; }
12633#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012634int
12635main ()
12636{
12637void *x=link
12638 ;
12639 return 0;
12640}
12641_ACEOF
12642rm -f conftest.$ac_objext
12643if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12644 (eval $ac_compile) 2>&5
12645 ac_status=$?
12646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12647 (exit $ac_status); } &&
12648 { ac_try='test -s conftest.$ac_objext'
12649 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12650 (eval $ac_try) 2>&5
12651 ac_status=$?
12652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12653 (exit $ac_status); }; }; then
12654
12655cat >>confdefs.h <<\_ACEOF
12656#define HAVE_LINK 1
12657_ACEOF
12658
12659 echo "$as_me:$LINENO: result: yes" >&5
12660echo "${ECHO_T}yes" >&6
12661else
12662 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012663cat conftest.$ac_ext >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012664echo "$as_me:$LINENO: result: no" >&5
12665echo "${ECHO_T}no" >&6
12666
12667fi
12668rm -f conftest.$ac_objext conftest.$ac_ext
12669echo "$as_me:$LINENO: checking for symlink" >&5
12670echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12671cat >conftest.$ac_ext <<_ACEOF
12672#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012673#include "confdefs.h"
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012674#include <unistd.h>
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012675#ifdef F77_DUMMY_MAIN
12676# ifdef __cplusplus
12677 extern "C"
12678# endif
12679 int F77_DUMMY_MAIN() { return 1; }
12680#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012681int
12682main ()
12683{
12684void *x=symlink
12685 ;
12686 return 0;
12687}
12688_ACEOF
12689rm -f conftest.$ac_objext
12690if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12691 (eval $ac_compile) 2>&5
12692 ac_status=$?
12693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12694 (exit $ac_status); } &&
12695 { ac_try='test -s conftest.$ac_objext'
12696 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12697 (eval $ac_try) 2>&5
12698 ac_status=$?
12699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12700 (exit $ac_status); }; }; then
12701
12702cat >>confdefs.h <<\_ACEOF
12703#define HAVE_SYMLINK 1
12704_ACEOF
12705
12706 echo "$as_me:$LINENO: result: yes" >&5
12707echo "${ECHO_T}yes" >&6
12708else
12709 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012710cat conftest.$ac_ext >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012711echo "$as_me:$LINENO: result: no" >&5
12712echo "${ECHO_T}no" >&6
12713
12714fi
12715rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012716echo "$as_me:$LINENO: checking for fchdir" >&5
12717echo $ECHO_N "checking for fchdir... $ECHO_C" >&6
12718cat >conftest.$ac_ext <<_ACEOF
12719#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012720#include "confdefs.h"
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012721#include <unistd.h>
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012722#ifdef F77_DUMMY_MAIN
12723# ifdef __cplusplus
12724 extern "C"
12725# endif
12726 int F77_DUMMY_MAIN() { return 1; }
12727#endif
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012728int
12729main ()
12730{
12731void *x=fchdir
12732 ;
12733 return 0;
12734}
12735_ACEOF
12736rm -f conftest.$ac_objext
12737if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12738 (eval $ac_compile) 2>&5
12739 ac_status=$?
12740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12741 (exit $ac_status); } &&
12742 { ac_try='test -s conftest.$ac_objext'
12743 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12744 (eval $ac_try) 2>&5
12745 ac_status=$?
12746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12747 (exit $ac_status); }; }; then
12748
12749cat >>confdefs.h <<\_ACEOF
12750#define HAVE_FCHDIR 1
12751_ACEOF
12752
12753 echo "$as_me:$LINENO: result: yes" >&5
12754echo "${ECHO_T}yes" >&6
12755else
12756 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012757cat conftest.$ac_ext >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012758echo "$as_me:$LINENO: result: no" >&5
12759echo "${ECHO_T}no" >&6
12760
12761fi
12762rm -f conftest.$ac_objext conftest.$ac_ext
12763echo "$as_me:$LINENO: checking for fsync" >&5
12764echo $ECHO_N "checking for fsync... $ECHO_C" >&6
12765cat >conftest.$ac_ext <<_ACEOF
12766#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012767#include "confdefs.h"
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012768#include <unistd.h>
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012769#ifdef F77_DUMMY_MAIN
12770# ifdef __cplusplus
12771 extern "C"
12772# endif
12773 int F77_DUMMY_MAIN() { return 1; }
12774#endif
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012775int
12776main ()
12777{
12778void *x=fsync
12779 ;
12780 return 0;
12781}
12782_ACEOF
12783rm -f conftest.$ac_objext
12784if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12785 (eval $ac_compile) 2>&5
12786 ac_status=$?
12787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12788 (exit $ac_status); } &&
12789 { ac_try='test -s conftest.$ac_objext'
12790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12791 (eval $ac_try) 2>&5
12792 ac_status=$?
12793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12794 (exit $ac_status); }; }; then
12795
12796cat >>confdefs.h <<\_ACEOF
12797#define HAVE_SYNC 1
12798_ACEOF
12799
12800 echo "$as_me:$LINENO: result: yes" >&5
12801echo "${ECHO_T}yes" >&6
12802else
12803 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012804cat conftest.$ac_ext >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012805echo "$as_me:$LINENO: result: no" >&5
12806echo "${ECHO_T}no" >&6
12807
12808fi
12809rm -f conftest.$ac_objext conftest.$ac_ext
12810echo "$as_me:$LINENO: checking for fdatasync" >&5
12811echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
12812cat >conftest.$ac_ext <<_ACEOF
12813#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012814#include "confdefs.h"
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012815#include <unistd.h>
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012816#ifdef F77_DUMMY_MAIN
12817# ifdef __cplusplus
12818 extern "C"
12819# endif
12820 int F77_DUMMY_MAIN() { return 1; }
12821#endif
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012822int
12823main ()
12824{
12825void *x=fdatasync
12826 ;
12827 return 0;
12828}
12829_ACEOF
12830rm -f conftest.$ac_objext
12831if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12832 (eval $ac_compile) 2>&5
12833 ac_status=$?
12834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12835 (exit $ac_status); } &&
12836 { ac_try='test -s conftest.$ac_objext'
12837 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12838 (eval $ac_try) 2>&5
12839 ac_status=$?
12840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12841 (exit $ac_status); }; }; then
12842
12843cat >>confdefs.h <<\_ACEOF
12844#define HAVE_FDATASYNC 1
12845_ACEOF
12846
12847 echo "$as_me:$LINENO: result: yes" >&5
12848echo "${ECHO_T}yes" >&6
12849else
12850 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012851cat conftest.$ac_ext >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012852echo "$as_me:$LINENO: result: no" >&5
12853echo "${ECHO_T}no" >&6
12854
12855fi
12856rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012857
Martin v. Löwisd5843682002-11-21 20:41:28 +000012858# On some systems (eg. FreeBSD 5), we would find a definition of the
12859# functions ctermid_r, setgroups in the library, but no prototype
12860# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12861# address to avoid compiler warnings and potential miscompilations
12862# because of the missing prototypes.
12863
12864echo "$as_me:$LINENO: checking for ctermid_r" >&5
12865echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
12866cat >conftest.$ac_ext <<_ACEOF
12867#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012868#include "confdefs.h"
Martin v. Löwisd5843682002-11-21 20:41:28 +000012869
12870#include "confdefs.h"
12871#include <stdio.h>
12872
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012873#ifdef F77_DUMMY_MAIN
12874# ifdef __cplusplus
12875 extern "C"
12876# endif
12877 int F77_DUMMY_MAIN() { return 1; }
12878#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012879int
12880main ()
12881{
12882void* p = ctermid_r
12883 ;
12884 return 0;
12885}
12886_ACEOF
12887rm -f conftest.$ac_objext
12888if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12889 (eval $ac_compile) 2>&5
12890 ac_status=$?
12891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12892 (exit $ac_status); } &&
12893 { ac_try='test -s conftest.$ac_objext'
12894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12895 (eval $ac_try) 2>&5
12896 ac_status=$?
12897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12898 (exit $ac_status); }; }; then
12899
12900cat >>confdefs.h <<\_ACEOF
12901#define HAVE_CTERMID_R 1
12902_ACEOF
12903
12904 echo "$as_me:$LINENO: result: yes" >&5
12905echo "${ECHO_T}yes" >&6
12906else
12907 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012908cat conftest.$ac_ext >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000012909echo "$as_me:$LINENO: result: no" >&5
12910echo "${ECHO_T}no" >&6
12911
12912fi
12913rm -f conftest.$ac_objext conftest.$ac_ext
12914
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012915echo "$as_me:$LINENO: checking for flock" >&5
12916echo $ECHO_N "checking for flock... $ECHO_C" >&6
12917cat >conftest.$ac_ext <<_ACEOF
12918#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012919#include "confdefs.h"
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012920
12921#include "confdefs.h"
12922#include <sys/file.h>
12923
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012924#ifdef F77_DUMMY_MAIN
12925# ifdef __cplusplus
12926 extern "C"
12927# endif
12928 int F77_DUMMY_MAIN() { return 1; }
12929#endif
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012930int
12931main ()
12932{
12933void* p = flock
12934 ;
12935 return 0;
12936}
12937_ACEOF
12938rm -f conftest.$ac_objext
12939if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12940 (eval $ac_compile) 2>&5
12941 ac_status=$?
12942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12943 (exit $ac_status); } &&
12944 { ac_try='test -s conftest.$ac_objext'
12945 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12946 (eval $ac_try) 2>&5
12947 ac_status=$?
12948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12949 (exit $ac_status); }; }; then
12950
12951cat >>confdefs.h <<\_ACEOF
12952#define HAVE_FLOCK 1
12953_ACEOF
12954
12955 echo "$as_me:$LINENO: result: yes" >&5
12956echo "${ECHO_T}yes" >&6
12957else
12958 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012959cat conftest.$ac_ext >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012960echo "$as_me:$LINENO: result: no" >&5
12961echo "${ECHO_T}no" >&6
12962
12963fi
12964rm -f conftest.$ac_objext conftest.$ac_ext
12965
12966echo "$as_me:$LINENO: checking for getpagesize" >&5
12967echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
12968cat >conftest.$ac_ext <<_ACEOF
12969#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012970#include "confdefs.h"
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012971
12972#include "confdefs.h"
12973#include <unistd.h>
12974
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012975#ifdef F77_DUMMY_MAIN
12976# ifdef __cplusplus
12977 extern "C"
12978# endif
12979 int F77_DUMMY_MAIN() { return 1; }
12980#endif
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012981int
12982main ()
12983{
12984void* p = getpagesize
12985 ;
12986 return 0;
12987}
12988_ACEOF
12989rm -f conftest.$ac_objext
12990if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12991 (eval $ac_compile) 2>&5
12992 ac_status=$?
12993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12994 (exit $ac_status); } &&
12995 { ac_try='test -s conftest.$ac_objext'
12996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12997 (eval $ac_try) 2>&5
12998 ac_status=$?
12999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13000 (exit $ac_status); }; }; then
13001
13002cat >>confdefs.h <<\_ACEOF
13003#define HAVE_GETPAGESIZE 1
13004_ACEOF
13005
13006 echo "$as_me:$LINENO: result: yes" >&5
13007echo "${ECHO_T}yes" >&6
13008else
13009 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013010cat conftest.$ac_ext >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013011echo "$as_me:$LINENO: result: no" >&5
13012echo "${ECHO_T}no" >&6
13013
13014fi
13015rm -f conftest.$ac_objext conftest.$ac_ext
13016
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013017for ac_prog in true
13018do
13019 # Extract the first word of "$ac_prog", so it can be a program name with args.
13020set dummy $ac_prog; ac_word=$2
13021echo "$as_me:$LINENO: checking for $ac_word" >&5
13022echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13023if test "${ac_cv_prog_TRUE+set}" = set; then
13024 echo $ECHO_N "(cached) $ECHO_C" >&6
13025else
13026 if test -n "$TRUE"; then
13027 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
13028else
13029as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13030for as_dir in $PATH
13031do
13032 IFS=$as_save_IFS
13033 test -z "$as_dir" && as_dir=.
13034 for ac_exec_ext in '' $ac_executable_extensions; do
13035 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13036 ac_cv_prog_TRUE="$ac_prog"
13037 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13038 break 2
13039 fi
13040done
13041done
13042
13043fi
13044fi
13045TRUE=$ac_cv_prog_TRUE
13046if test -n "$TRUE"; then
13047 echo "$as_me:$LINENO: result: $TRUE" >&5
13048echo "${ECHO_T}$TRUE" >&6
13049else
13050 echo "$as_me:$LINENO: result: no" >&5
13051echo "${ECHO_T}no" >&6
13052fi
13053
13054 test -n "$TRUE" && break
13055done
13056test -n "$TRUE" || TRUE="/bin/true"
13057
13058
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013059echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
13060echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
13061if test "${ac_cv_lib_c_inet_aton+set}" = set; then
13062 echo $ECHO_N "(cached) $ECHO_C" >&6
13063else
13064 ac_check_lib_save_LIBS=$LIBS
13065LIBS="-lc $LIBS"
13066cat >conftest.$ac_ext <<_ACEOF
13067#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013068#include "confdefs.h"
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013069
13070/* Override any gcc2 internal prototype to avoid an error. */
13071#ifdef __cplusplus
13072extern "C"
13073#endif
13074/* We use char because int might match the return type of a gcc2
13075 builtin and then its argument prototype would still apply. */
13076char inet_aton ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013077#ifdef F77_DUMMY_MAIN
13078# ifdef __cplusplus
13079 extern "C"
13080# endif
13081 int F77_DUMMY_MAIN() { return 1; }
13082#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013083int
13084main ()
13085{
13086inet_aton ();
13087 ;
13088 return 0;
13089}
13090_ACEOF
13091rm -f conftest.$ac_objext conftest$ac_exeext
13092if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13093 (eval $ac_link) 2>&5
13094 ac_status=$?
13095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13096 (exit $ac_status); } &&
13097 { ac_try='test -s conftest$ac_exeext'
13098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13099 (eval $ac_try) 2>&5
13100 ac_status=$?
13101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13102 (exit $ac_status); }; }; then
13103 ac_cv_lib_c_inet_aton=yes
13104else
13105 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013106cat conftest.$ac_ext >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013107ac_cv_lib_c_inet_aton=no
13108fi
13109rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13110LIBS=$ac_check_lib_save_LIBS
13111fi
13112echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
13113echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
13114if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013115 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013116else
13117
13118echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
13119echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
13120if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
13121 echo $ECHO_N "(cached) $ECHO_C" >&6
13122else
13123 ac_check_lib_save_LIBS=$LIBS
13124LIBS="-lresolv $LIBS"
13125cat >conftest.$ac_ext <<_ACEOF
13126#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013127#include "confdefs.h"
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013128
13129/* Override any gcc2 internal prototype to avoid an error. */
13130#ifdef __cplusplus
13131extern "C"
13132#endif
13133/* We use char because int might match the return type of a gcc2
13134 builtin and then its argument prototype would still apply. */
13135char inet_aton ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013136#ifdef F77_DUMMY_MAIN
13137# ifdef __cplusplus
13138 extern "C"
13139# endif
13140 int F77_DUMMY_MAIN() { return 1; }
13141#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013142int
13143main ()
13144{
13145inet_aton ();
13146 ;
13147 return 0;
13148}
13149_ACEOF
13150rm -f conftest.$ac_objext conftest$ac_exeext
13151if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13152 (eval $ac_link) 2>&5
13153 ac_status=$?
13154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13155 (exit $ac_status); } &&
13156 { ac_try='test -s conftest$ac_exeext'
13157 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13158 (eval $ac_try) 2>&5
13159 ac_status=$?
13160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13161 (exit $ac_status); }; }; then
13162 ac_cv_lib_resolv_inet_aton=yes
13163else
13164 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013165cat conftest.$ac_ext >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013166ac_cv_lib_resolv_inet_aton=no
13167fi
13168rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13169LIBS=$ac_check_lib_save_LIBS
13170fi
13171echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
13172echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
13173if test $ac_cv_lib_resolv_inet_aton = yes; then
13174 cat >>confdefs.h <<_ACEOF
13175#define HAVE_LIBRESOLV 1
13176_ACEOF
13177
13178 LIBS="-lresolv $LIBS"
13179
13180fi
13181
13182
13183fi
13184
13185
Martin v. Löwise9416172003-05-03 10:12:45 +000013186echo "$as_me:$LINENO: checking for hstrerror" >&5
13187echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
13188cat >conftest.$ac_ext <<_ACEOF
13189#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013190#include "confdefs.h"
Martin v. Löwise9416172003-05-03 10:12:45 +000013191
13192#include "confdefs.h"
13193#include <netdb.h>
13194
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013195#ifdef F77_DUMMY_MAIN
13196# ifdef __cplusplus
13197 extern "C"
13198# endif
13199 int F77_DUMMY_MAIN() { return 1; }
13200#endif
Martin v. Löwise9416172003-05-03 10:12:45 +000013201int
13202main ()
13203{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013204void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013205 ;
13206 return 0;
13207}
13208_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013209rm -f conftest.$ac_objext conftest$ac_exeext
13210if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13211 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013212 ac_status=$?
13213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13214 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013215 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13217 (eval $ac_try) 2>&5
13218 ac_status=$?
13219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13220 (exit $ac_status); }; }; then
13221
13222cat >>confdefs.h <<\_ACEOF
13223#define HAVE_HSTRERROR 1
13224_ACEOF
13225
13226 echo "$as_me:$LINENO: result: yes" >&5
13227echo "${ECHO_T}yes" >&6
13228else
13229 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013230cat conftest.$ac_ext >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013231echo "$as_me:$LINENO: result: no" >&5
13232echo "${ECHO_T}no" >&6
13233
13234fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013235rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013236
13237echo "$as_me:$LINENO: checking for inet_aton" >&5
13238echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
13239cat >conftest.$ac_ext <<_ACEOF
13240#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013241#include "confdefs.h"
Martin v. Löwise9416172003-05-03 10:12:45 +000013242
13243#include "confdefs.h"
13244#include <sys/socket.h>
13245#include <netinet/in.h>
13246#include <arpa/inet.h>
13247
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013248#ifdef F77_DUMMY_MAIN
13249# ifdef __cplusplus
13250 extern "C"
13251# endif
13252 int F77_DUMMY_MAIN() { return 1; }
13253#endif
Martin v. Löwise9416172003-05-03 10:12:45 +000013254int
13255main ()
13256{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013257void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013258 ;
13259 return 0;
13260}
13261_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013262rm -f conftest.$ac_objext conftest$ac_exeext
13263if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13264 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013265 ac_status=$?
13266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13267 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013268 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13270 (eval $ac_try) 2>&5
13271 ac_status=$?
13272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13273 (exit $ac_status); }; }; then
13274
13275cat >>confdefs.h <<\_ACEOF
13276#define HAVE_INET_ATON 1
13277_ACEOF
13278
13279 echo "$as_me:$LINENO: result: yes" >&5
13280echo "${ECHO_T}yes" >&6
13281else
13282 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013283cat conftest.$ac_ext >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013284echo "$as_me:$LINENO: result: no" >&5
13285echo "${ECHO_T}no" >&6
13286
13287fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013288rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013289
13290echo "$as_me:$LINENO: checking for inet_pton" >&5
13291echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
13292cat >conftest.$ac_ext <<_ACEOF
13293#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013294#include "confdefs.h"
Martin v. Löwise9416172003-05-03 10:12:45 +000013295
13296#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013297#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000013298#include <sys/socket.h>
13299#include <netinet/in.h>
13300#include <arpa/inet.h>
13301
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013302#ifdef F77_DUMMY_MAIN
13303# ifdef __cplusplus
13304 extern "C"
13305# endif
13306 int F77_DUMMY_MAIN() { return 1; }
13307#endif
Martin v. Löwise9416172003-05-03 10:12:45 +000013308int
13309main ()
13310{
13311void* p = inet_pton
13312 ;
13313 return 0;
13314}
13315_ACEOF
13316rm -f conftest.$ac_objext
13317if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13318 (eval $ac_compile) 2>&5
13319 ac_status=$?
13320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13321 (exit $ac_status); } &&
13322 { ac_try='test -s conftest.$ac_objext'
13323 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13324 (eval $ac_try) 2>&5
13325 ac_status=$?
13326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13327 (exit $ac_status); }; }; then
13328
13329cat >>confdefs.h <<\_ACEOF
13330#define HAVE_INET_PTON 1
13331_ACEOF
13332
13333 echo "$as_me:$LINENO: result: yes" >&5
13334echo "${ECHO_T}yes" >&6
13335else
13336 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013337cat conftest.$ac_ext >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013338echo "$as_me:$LINENO: result: no" >&5
13339echo "${ECHO_T}no" >&6
13340
13341fi
13342rm -f conftest.$ac_objext conftest.$ac_ext
13343
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013344# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000013345echo "$as_me:$LINENO: checking for setgroups" >&5
13346echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
13347cat >conftest.$ac_ext <<_ACEOF
13348#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013349#include "confdefs.h"
Martin v. Löwisd5843682002-11-21 20:41:28 +000013350
13351#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013352#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013353#ifdef HAVE_GRP_H
13354#include <grp.h>
13355#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000013356
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013357#ifdef F77_DUMMY_MAIN
13358# ifdef __cplusplus
13359 extern "C"
13360# endif
13361 int F77_DUMMY_MAIN() { return 1; }
13362#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000013363int
13364main ()
13365{
13366void* p = setgroups
13367 ;
13368 return 0;
13369}
13370_ACEOF
13371rm -f conftest.$ac_objext
13372if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13373 (eval $ac_compile) 2>&5
13374 ac_status=$?
13375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13376 (exit $ac_status); } &&
13377 { ac_try='test -s conftest.$ac_objext'
13378 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13379 (eval $ac_try) 2>&5
13380 ac_status=$?
13381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13382 (exit $ac_status); }; }; then
13383
13384cat >>confdefs.h <<\_ACEOF
13385#define HAVE_SETGROUPS 1
13386_ACEOF
13387
13388 echo "$as_me:$LINENO: result: yes" >&5
13389echo "${ECHO_T}yes" >&6
13390else
13391 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013392cat conftest.$ac_ext >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000013393echo "$as_me:$LINENO: result: no" >&5
13394echo "${ECHO_T}no" >&6
13395
13396fi
13397rm -f conftest.$ac_objext conftest.$ac_ext
13398
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013399# check for openpty and forkpty
13400
Martin v. Löwis11437992002-04-12 09:54:03 +000013401
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013402for ac_func in openpty
13403do
Martin v. Löwis11437992002-04-12 09:54:03 +000013404as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13405echo "$as_me:$LINENO: checking for $ac_func" >&5
13406echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13407if eval "test \"\${$as_ac_var+set}\" = set"; then
13408 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013409else
Martin v. Löwis11437992002-04-12 09:54:03 +000013410 cat >conftest.$ac_ext <<_ACEOF
13411#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013412#include "confdefs.h"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013413/* System header to define __stub macros and hopefully few prototypes,
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013414 which can conflict with char $ac_func (); below. */
13415#include <assert.h>
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013416/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013417#ifdef __cplusplus
13418extern "C"
13419#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013420/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013421 builtin and then its argument prototype would still apply. */
13422char $ac_func ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013423char (*f) ();
13424
13425#ifdef F77_DUMMY_MAIN
13426# ifdef __cplusplus
13427 extern "C"
13428# endif
13429 int F77_DUMMY_MAIN() { return 1; }
13430#endif
13431int
13432main ()
13433{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013434/* The GNU C library defines this for functions which it implements
13435 to always fail with ENOSYS. Some functions are actually named
13436 something starting with __ and the normal name is an alias. */
13437#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13438choke me
13439#else
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013440f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013441#endif
13442
Martin v. Löwis11437992002-04-12 09:54:03 +000013443 ;
13444 return 0;
13445}
13446_ACEOF
13447rm -f conftest.$ac_objext conftest$ac_exeext
13448if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13449 (eval $ac_link) 2>&5
13450 ac_status=$?
13451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13452 (exit $ac_status); } &&
13453 { ac_try='test -s conftest$ac_exeext'
13454 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13455 (eval $ac_try) 2>&5
13456 ac_status=$?
13457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13458 (exit $ac_status); }; }; then
13459 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013460else
Martin v. Löwis11437992002-04-12 09:54:03 +000013461 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013462cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013463eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013464fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013465rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013466fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013467echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13468echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13469if test `eval echo '${'$as_ac_var'}'` = yes; then
13470 cat >>confdefs.h <<_ACEOF
13471#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13472_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013473
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013474else
Martin v. Löwis11437992002-04-12 09:54:03 +000013475 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
13476echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
13477if test "${ac_cv_lib_util_openpty+set}" = set; then
13478 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013479else
Martin v. Löwis11437992002-04-12 09:54:03 +000013480 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013481LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013482cat >conftest.$ac_ext <<_ACEOF
13483#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013484#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013485
Fred Drake8cef4cf2000-06-28 16:40:38 +000013486/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013487#ifdef __cplusplus
13488extern "C"
13489#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013490/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013491 builtin and then its argument prototype would still apply. */
13492char openpty ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013493#ifdef F77_DUMMY_MAIN
13494# ifdef __cplusplus
13495 extern "C"
13496# endif
13497 int F77_DUMMY_MAIN() { return 1; }
13498#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013499int
13500main ()
13501{
13502openpty ();
13503 ;
13504 return 0;
13505}
13506_ACEOF
13507rm -f conftest.$ac_objext conftest$ac_exeext
13508if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13509 (eval $ac_link) 2>&5
13510 ac_status=$?
13511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13512 (exit $ac_status); } &&
13513 { ac_try='test -s conftest$ac_exeext'
13514 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13515 (eval $ac_try) 2>&5
13516 ac_status=$?
13517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13518 (exit $ac_status); }; }; then
13519 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013520else
Martin v. Löwis11437992002-04-12 09:54:03 +000013521 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013522cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013523ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013524fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013525rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13526LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013527fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013528echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
13529echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
13530if test $ac_cv_lib_util_openpty = yes; then
13531 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013532#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013533_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013534 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013535fi
13536
13537fi
13538done
13539
Martin v. Löwis11437992002-04-12 09:54:03 +000013540
Fred Drake8cef4cf2000-06-28 16:40:38 +000013541for ac_func in forkpty
13542do
Martin v. Löwis11437992002-04-12 09:54:03 +000013543as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13544echo "$as_me:$LINENO: checking for $ac_func" >&5
13545echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13546if eval "test \"\${$as_ac_var+set}\" = set"; then
13547 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013548else
Martin v. Löwis11437992002-04-12 09:54:03 +000013549 cat >conftest.$ac_ext <<_ACEOF
13550#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013551#include "confdefs.h"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013552/* System header to define __stub macros and hopefully few prototypes,
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013553 which can conflict with char $ac_func (); below. */
13554#include <assert.h>
Fred Drake8cef4cf2000-06-28 16:40:38 +000013555/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013556#ifdef __cplusplus
13557extern "C"
13558#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013559/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013560 builtin and then its argument prototype would still apply. */
13561char $ac_func ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013562char (*f) ();
13563
13564#ifdef F77_DUMMY_MAIN
13565# ifdef __cplusplus
13566 extern "C"
13567# endif
13568 int F77_DUMMY_MAIN() { return 1; }
13569#endif
13570int
13571main ()
13572{
Fred Drake8cef4cf2000-06-28 16:40:38 +000013573/* The GNU C library defines this for functions which it implements
13574 to always fail with ENOSYS. Some functions are actually named
13575 something starting with __ and the normal name is an alias. */
13576#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13577choke me
13578#else
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013579f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000013580#endif
13581
Martin v. Löwis11437992002-04-12 09:54:03 +000013582 ;
13583 return 0;
13584}
13585_ACEOF
13586rm -f conftest.$ac_objext conftest$ac_exeext
13587if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13588 (eval $ac_link) 2>&5
13589 ac_status=$?
13590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13591 (exit $ac_status); } &&
13592 { ac_try='test -s conftest$ac_exeext'
13593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13594 (eval $ac_try) 2>&5
13595 ac_status=$?
13596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13597 (exit $ac_status); }; }; then
13598 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013599else
Martin v. Löwis11437992002-04-12 09:54:03 +000013600 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013601cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013602eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013603fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013604rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013605fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013606echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13607echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13608if test `eval echo '${'$as_ac_var'}'` = yes; then
13609 cat >>confdefs.h <<_ACEOF
13610#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13611_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013612
Fred Drake8cef4cf2000-06-28 16:40:38 +000013613else
Martin v. Löwis11437992002-04-12 09:54:03 +000013614 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
13615echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
13616if test "${ac_cv_lib_util_forkpty+set}" = set; then
13617 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013618else
Martin v. Löwis11437992002-04-12 09:54:03 +000013619 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013620LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013621cat >conftest.$ac_ext <<_ACEOF
13622#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013623#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013624
Fred Drake8cef4cf2000-06-28 16:40:38 +000013625/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013626#ifdef __cplusplus
13627extern "C"
13628#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013629/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013630 builtin and then its argument prototype would still apply. */
13631char forkpty ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013632#ifdef F77_DUMMY_MAIN
13633# ifdef __cplusplus
13634 extern "C"
13635# endif
13636 int F77_DUMMY_MAIN() { return 1; }
13637#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013638int
13639main ()
13640{
13641forkpty ();
13642 ;
13643 return 0;
13644}
13645_ACEOF
13646rm -f conftest.$ac_objext conftest$ac_exeext
13647if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13648 (eval $ac_link) 2>&5
13649 ac_status=$?
13650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13651 (exit $ac_status); } &&
13652 { ac_try='test -s conftest$ac_exeext'
13653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13654 (eval $ac_try) 2>&5
13655 ac_status=$?
13656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13657 (exit $ac_status); }; }; then
13658 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013659else
Martin v. Löwis11437992002-04-12 09:54:03 +000013660 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013661cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013662ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013663fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013664rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13665LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013666fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013667echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
13668echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
13669if test $ac_cv_lib_util_forkpty = yes; then
13670 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013671#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013672_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013673 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013674fi
13675
13676fi
13677done
13678
Jack Jansendd19cf82001-12-06 22:36:17 +000013679
Michael W. Hudson54241132001-12-07 15:38:26 +000013680# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013681
13682
13683
13684
13685
13686
Fred Drake8cef4cf2000-06-28 16:40:38 +000013687for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
13688do
Martin v. Löwis11437992002-04-12 09:54:03 +000013689as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13690echo "$as_me:$LINENO: checking for $ac_func" >&5
13691echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13692if eval "test \"\${$as_ac_var+set}\" = set"; then
13693 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013694else
Martin v. Löwis11437992002-04-12 09:54:03 +000013695 cat >conftest.$ac_ext <<_ACEOF
13696#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013697#include "confdefs.h"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013698/* System header to define __stub macros and hopefully few prototypes,
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013699 which can conflict with char $ac_func (); below. */
13700#include <assert.h>
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013701/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013702#ifdef __cplusplus
13703extern "C"
13704#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013705/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013706 builtin and then its argument prototype would still apply. */
13707char $ac_func ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013708char (*f) ();
13709
13710#ifdef F77_DUMMY_MAIN
13711# ifdef __cplusplus
13712 extern "C"
13713# endif
13714 int F77_DUMMY_MAIN() { return 1; }
13715#endif
13716int
13717main ()
13718{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013719/* The GNU C library defines this for functions which it implements
13720 to always fail with ENOSYS. Some functions are actually named
13721 something starting with __ and the normal name is an alias. */
13722#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13723choke me
13724#else
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013725f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013726#endif
13727
Martin v. Löwis11437992002-04-12 09:54:03 +000013728 ;
13729 return 0;
13730}
13731_ACEOF
13732rm -f conftest.$ac_objext conftest$ac_exeext
13733if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13734 (eval $ac_link) 2>&5
13735 ac_status=$?
13736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13737 (exit $ac_status); } &&
13738 { ac_try='test -s conftest$ac_exeext'
13739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13740 (eval $ac_try) 2>&5
13741 ac_status=$?
13742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13743 (exit $ac_status); }; }; then
13744 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013745else
Martin v. Löwis11437992002-04-12 09:54:03 +000013746 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013747cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013748eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013749fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013750rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013751fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013752echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13753echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13754if test `eval echo '${'$as_ac_var'}'` = yes; then
13755 cat >>confdefs.h <<_ACEOF
13756#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13757_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000013758
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013759fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000013760done
13761
Michael W. Hudson54241132001-12-07 15:38:26 +000013762
Martin v. Löwis11437992002-04-12 09:54:03 +000013763
13764
13765
13766
13767
Martin v. Löwis1142de32002-03-29 16:28:31 +000013768for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000013769do
Martin v. Löwis11437992002-04-12 09:54:03 +000013770as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13771echo "$as_me:$LINENO: checking for $ac_func" >&5
13772echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13773if eval "test \"\${$as_ac_var+set}\" = set"; then
13774 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013775else
Martin v. Löwis11437992002-04-12 09:54:03 +000013776 cat >conftest.$ac_ext <<_ACEOF
13777#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013778#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013779/* System header to define __stub macros and hopefully few prototypes,
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013780 which can conflict with char $ac_func (); below. */
13781#include <assert.h>
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013782/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013783#ifdef __cplusplus
13784extern "C"
13785#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013786/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013787 builtin and then its argument prototype would still apply. */
13788char $ac_func ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013789char (*f) ();
13790
13791#ifdef F77_DUMMY_MAIN
13792# ifdef __cplusplus
13793 extern "C"
13794# endif
13795 int F77_DUMMY_MAIN() { return 1; }
13796#endif
13797int
13798main ()
13799{
Guido van Rossum627b2d71993-12-24 10:39:16 +000013800/* The GNU C library defines this for functions which it implements
13801 to always fail with ENOSYS. Some functions are actually named
13802 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013803#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013804choke me
13805#else
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013806f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013807#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013808
Martin v. Löwis11437992002-04-12 09:54:03 +000013809 ;
13810 return 0;
13811}
13812_ACEOF
13813rm -f conftest.$ac_objext conftest$ac_exeext
13814if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13815 (eval $ac_link) 2>&5
13816 ac_status=$?
13817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13818 (exit $ac_status); } &&
13819 { ac_try='test -s conftest$ac_exeext'
13820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13821 (eval $ac_try) 2>&5
13822 ac_status=$?
13823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13824 (exit $ac_status); }; }; then
13825 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013826else
Martin v. Löwis11437992002-04-12 09:54:03 +000013827 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013828cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013829eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013830fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013831rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000013832fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013833echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13834echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13835if test `eval echo '${'$as_ac_var'}'` = yes; then
13836 cat >>confdefs.h <<_ACEOF
13837#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13838_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000013839
Martin v. Löwis1142de32002-03-29 16:28:31 +000013840else
Martin v. Löwis11437992002-04-12 09:54:03 +000013841 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013842fi
13843done
13844
13845
Martin v. Löwis11437992002-04-12 09:54:03 +000013846
Martin v. Löwis1142de32002-03-29 16:28:31 +000013847for ac_func in getpgrp
13848do
Martin v. Löwis11437992002-04-12 09:54:03 +000013849as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13850echo "$as_me:$LINENO: checking for $ac_func" >&5
13851echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13852if eval "test \"\${$as_ac_var+set}\" = set"; then
13853 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000013854else
Martin v. Löwis11437992002-04-12 09:54:03 +000013855 cat >conftest.$ac_ext <<_ACEOF
13856#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013857#include "confdefs.h"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013858/* System header to define __stub macros and hopefully few prototypes,
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013859 which can conflict with char $ac_func (); below. */
13860#include <assert.h>
Martin v. Löwis1142de32002-03-29 16:28:31 +000013861/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013862#ifdef __cplusplus
13863extern "C"
13864#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013865/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013866 builtin and then its argument prototype would still apply. */
13867char $ac_func ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013868char (*f) ();
13869
13870#ifdef F77_DUMMY_MAIN
13871# ifdef __cplusplus
13872 extern "C"
13873# endif
13874 int F77_DUMMY_MAIN() { return 1; }
13875#endif
13876int
13877main ()
13878{
Martin v. Löwis1142de32002-03-29 16:28:31 +000013879/* The GNU C library defines this for functions which it implements
13880 to always fail with ENOSYS. Some functions are actually named
13881 something starting with __ and the normal name is an alias. */
13882#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13883choke me
13884#else
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013885f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000013886#endif
13887
Martin v. Löwis11437992002-04-12 09:54:03 +000013888 ;
13889 return 0;
13890}
13891_ACEOF
13892rm -f conftest.$ac_objext conftest$ac_exeext
13893if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13894 (eval $ac_link) 2>&5
13895 ac_status=$?
13896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13897 (exit $ac_status); } &&
13898 { ac_try='test -s conftest$ac_exeext'
13899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13900 (eval $ac_try) 2>&5
13901 ac_status=$?
13902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13903 (exit $ac_status); }; }; then
13904 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013905else
Martin v. Löwis11437992002-04-12 09:54:03 +000013906 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013907cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013908eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013909fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013910rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013911fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013912echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13913echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13914if test `eval echo '${'$as_ac_var'}'` = yes; then
13915 cat >>confdefs.h <<_ACEOF
13916#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13917_ACEOF
13918 cat >conftest.$ac_ext <<_ACEOF
13919#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013920#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013921#include <unistd.h>
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013922#ifdef F77_DUMMY_MAIN
13923# ifdef __cplusplus
13924 extern "C"
13925# endif
13926 int F77_DUMMY_MAIN() { return 1; }
13927#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013928int
13929main ()
13930{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013931getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013932 ;
13933 return 0;
13934}
13935_ACEOF
13936rm -f conftest.$ac_objext
13937if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13938 (eval $ac_compile) 2>&5
13939 ac_status=$?
13940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13941 (exit $ac_status); } &&
13942 { ac_try='test -s conftest.$ac_objext'
13943 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13944 (eval $ac_try) 2>&5
13945 ac_status=$?
13946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13947 (exit $ac_status); }; }; then
13948
13949cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013950#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013951_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013952
Martin v. Löwis11437992002-04-12 09:54:03 +000013953
Guido van Rossumf78abae1997-01-21 22:02:36 +000013954else
Martin v. Löwis11437992002-04-12 09:54:03 +000013955 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013956cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013957fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013958rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013959
Guido van Rossum627b2d71993-12-24 10:39:16 +000013960fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013961done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013962
Jack Jansen150753c2003-03-29 22:07:47 +000013963
13964for ac_func in setpgrp
13965do
13966as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13967echo "$as_me:$LINENO: checking for $ac_func" >&5
13968echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13969if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013970 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013971else
Martin v. Löwis11437992002-04-12 09:54:03 +000013972 cat >conftest.$ac_ext <<_ACEOF
13973#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013974#include "confdefs.h"
Jack Jansen150753c2003-03-29 22:07:47 +000013975/* System header to define __stub macros and hopefully few prototypes,
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013976 which can conflict with char $ac_func (); below. */
13977#include <assert.h>
Jack Jansen150753c2003-03-29 22:07:47 +000013978/* Override any gcc2 internal prototype to avoid an error. */
13979#ifdef __cplusplus
13980extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000013981#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013982/* We use char because int might match the return type of a gcc2
13983 builtin and then its argument prototype would still apply. */
13984char $ac_func ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013985char (*f) ();
13986
13987#ifdef F77_DUMMY_MAIN
13988# ifdef __cplusplus
13989 extern "C"
13990# endif
13991 int F77_DUMMY_MAIN() { return 1; }
13992#endif
13993int
13994main ()
13995{
Jack Jansen150753c2003-03-29 22:07:47 +000013996/* The GNU C library defines this for functions which it implements
13997 to always fail with ENOSYS. Some functions are actually named
13998 something starting with __ and the normal name is an alias. */
13999#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14000choke me
14001#else
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014002f = $ac_func;
Jack Jansen150753c2003-03-29 22:07:47 +000014003#endif
14004
Martin v. Löwis11437992002-04-12 09:54:03 +000014005 ;
14006 return 0;
14007}
14008_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000014009rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000014010if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14011 (eval $ac_link) 2>&5
14012 ac_status=$?
14013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000014014 (exit $ac_status); } &&
14015 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014016 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14017 (eval $ac_try) 2>&5
14018 ac_status=$?
14019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14020 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000014021 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014022else
Jack Jansen150753c2003-03-29 22:07:47 +000014023 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014024cat conftest.$ac_ext >&5
Jack Jansen150753c2003-03-29 22:07:47 +000014025eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014026fi
Jack Jansen150753c2003-03-29 22:07:47 +000014027rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014028fi
Jack Jansen150753c2003-03-29 22:07:47 +000014029echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14030echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14031if test `eval echo '${'$as_ac_var'}'` = yes; then
14032 cat >>confdefs.h <<_ACEOF
14033#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14034_ACEOF
14035 cat >conftest.$ac_ext <<_ACEOF
14036#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014037#include "confdefs.h"
Jack Jansen150753c2003-03-29 22:07:47 +000014038#include <unistd.h>
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014039#ifdef F77_DUMMY_MAIN
14040# ifdef __cplusplus
14041 extern "C"
14042# endif
14043 int F77_DUMMY_MAIN() { return 1; }
14044#endif
Jack Jansen150753c2003-03-29 22:07:47 +000014045int
14046main ()
14047{
14048setpgrp(0,0);
14049 ;
14050 return 0;
14051}
14052_ACEOF
14053rm -f conftest.$ac_objext
14054if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14055 (eval $ac_compile) 2>&5
14056 ac_status=$?
14057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14058 (exit $ac_status); } &&
14059 { ac_try='test -s conftest.$ac_objext'
14060 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14061 (eval $ac_try) 2>&5
14062 ac_status=$?
14063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14064 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014065
14066cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000014067#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014068_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000014069
Jack Jansen150753c2003-03-29 22:07:47 +000014070
14071else
14072 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014073cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +000014074fi
Jack Jansen150753c2003-03-29 22:07:47 +000014075rm -f conftest.$ac_objext conftest.$ac_ext
14076
14077fi
14078done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000014079
Martin v. Löwis11437992002-04-12 09:54:03 +000014080
Thomas Wouters3a584202000-08-05 23:28:51 +000014081for ac_func in gettimeofday
14082do
Martin v. Löwis11437992002-04-12 09:54:03 +000014083as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14084echo "$as_me:$LINENO: checking for $ac_func" >&5
14085echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14086if eval "test \"\${$as_ac_var+set}\" = set"; then
14087 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014088else
Martin v. Löwis11437992002-04-12 09:54:03 +000014089 cat >conftest.$ac_ext <<_ACEOF
14090#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014091#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014092/* System header to define __stub macros and hopefully few prototypes,
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014093 which can conflict with char $ac_func (); below. */
14094#include <assert.h>
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014095/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014096#ifdef __cplusplus
14097extern "C"
14098#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014099/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014100 builtin and then its argument prototype would still apply. */
14101char $ac_func ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014102char (*f) ();
14103
14104#ifdef F77_DUMMY_MAIN
14105# ifdef __cplusplus
14106 extern "C"
14107# endif
14108 int F77_DUMMY_MAIN() { return 1; }
14109#endif
14110int
14111main ()
14112{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014113/* The GNU C library defines this for functions which it implements
14114 to always fail with ENOSYS. Some functions are actually named
14115 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014116#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014117choke me
14118#else
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014119f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014120#endif
14121
Martin v. Löwis11437992002-04-12 09:54:03 +000014122 ;
14123 return 0;
14124}
14125_ACEOF
14126rm -f conftest.$ac_objext conftest$ac_exeext
14127if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14128 (eval $ac_link) 2>&5
14129 ac_status=$?
14130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14131 (exit $ac_status); } &&
14132 { ac_try='test -s conftest$ac_exeext'
14133 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14134 (eval $ac_try) 2>&5
14135 ac_status=$?
14136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14137 (exit $ac_status); }; }; then
14138 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014139else
Martin v. Löwis11437992002-04-12 09:54:03 +000014140 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014141cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014142eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014143fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014144rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014145fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014146echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14147echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14148if test `eval echo '${'$as_ac_var'}'` = yes; then
14149 cat >>confdefs.h <<_ACEOF
14150#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14151_ACEOF
14152 cat >conftest.$ac_ext <<_ACEOF
14153#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014154#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014155#include <sys/time.h>
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014156#ifdef F77_DUMMY_MAIN
14157# ifdef __cplusplus
14158 extern "C"
14159# endif
14160 int F77_DUMMY_MAIN() { return 1; }
14161#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014162int
14163main ()
14164{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014165gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000014166 ;
14167 return 0;
14168}
14169_ACEOF
14170rm -f conftest.$ac_objext
14171if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14172 (eval $ac_compile) 2>&5
14173 ac_status=$?
14174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14175 (exit $ac_status); } &&
14176 { ac_try='test -s conftest.$ac_objext'
14177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14178 (eval $ac_try) 2>&5
14179 ac_status=$?
14180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14181 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014182 :
14183else
Martin v. Löwis11437992002-04-12 09:54:03 +000014184 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014185cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014186
14187cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014188#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014189_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014190
Martin v. Löwis11437992002-04-12 09:54:03 +000014191
Guido van Rossum627b2d71993-12-24 10:39:16 +000014192fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014193rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014194
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014195fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014196done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014197
Michael W. Hudson54241132001-12-07 15:38:26 +000014198
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014199echo "$as_me:$LINENO: checking for major" >&5
14200echo $ECHO_N "checking for major... $ECHO_C" >&6
14201cat >conftest.$ac_ext <<_ACEOF
14202#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014203#include "confdefs.h"
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014204
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014205#if defined(MAJOR_IN_MKDEV)
14206#include <sys/mkdev.h>
14207#elif defined(MAJOR_IN_SYSMACROS)
14208#include <sys/sysmacros.h>
14209#else
14210#include <sys/types.h>
14211#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014212
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014213#ifdef F77_DUMMY_MAIN
14214# ifdef __cplusplus
14215 extern "C"
14216# endif
14217 int F77_DUMMY_MAIN() { return 1; }
14218#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014219int
14220main ()
14221{
14222
14223 makedev(major(0),minor(0));
14224
14225 ;
14226 return 0;
14227}
14228_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000014229rm -f conftest.$ac_objext conftest$ac_exeext
14230if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14231 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014232 ac_status=$?
14233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14234 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000014235 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14237 (eval $ac_try) 2>&5
14238 ac_status=$?
14239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14240 (exit $ac_status); }; }; then
14241
14242
14243cat >>confdefs.h <<\_ACEOF
14244#define HAVE_DEVICE_MACROS 1
14245_ACEOF
14246
14247 echo "$as_me:$LINENO: result: yes" >&5
14248echo "${ECHO_T}yes" >&6
14249
14250else
14251 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014252cat conftest.$ac_ext >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014253
14254 echo "$as_me:$LINENO: result: no" >&5
14255echo "${ECHO_T}no" >&6
14256
14257fi
Martin v. Löwise3271202002-11-07 07:42:30 +000014258rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014259
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014260# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000014261# for [no]getaddrinfo in netdb.h.
14262echo "$as_me:$LINENO: checking for getaddrinfo" >&5
14263echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
14264cat >conftest.$ac_ext <<_ACEOF
14265#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014266#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014267
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014268#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014269#include <sys/socket.h>
14270#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014271#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014272
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014273#ifdef F77_DUMMY_MAIN
14274# ifdef __cplusplus
14275 extern "C"
14276# endif
14277 int F77_DUMMY_MAIN() { return 1; }
14278#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014279int
14280main ()
14281{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014282
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014283getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014284
Martin v. Löwis11437992002-04-12 09:54:03 +000014285 ;
14286 return 0;
14287}
14288_ACEOF
14289rm -f conftest.$ac_objext conftest$ac_exeext
14290if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14291 (eval $ac_link) 2>&5
14292 ac_status=$?
14293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14294 (exit $ac_status); } &&
14295 { ac_try='test -s conftest$ac_exeext'
14296 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14297 (eval $ac_try) 2>&5
14298 ac_status=$?
14299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14300 (exit $ac_status); }; }; then
14301
14302echo "$as_me:$LINENO: result: yes" >&5
14303echo "${ECHO_T}yes" >&6
14304echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
14305echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014306if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014307 echo "$as_me:$LINENO: result: buggy" >&5
14308echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014309buggygetaddrinfo=yes
14310else
Martin v. Löwis11437992002-04-12 09:54:03 +000014311 cat >conftest.$ac_ext <<_ACEOF
14312#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014313#include "confdefs.h"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014314
14315#include <sys/types.h>
14316#include <netdb.h>
14317#include <string.h>
14318#include <sys/socket.h>
14319#include <netinet/in.h>
14320
14321main()
14322{
14323 int passive, gaierr, inet4 = 0, inet6 = 0;
14324 struct addrinfo hints, *ai, *aitop;
14325 char straddr[INET6_ADDRSTRLEN], strport[16];
14326
14327 for (passive = 0; passive <= 1; passive++) {
14328 memset(&hints, 0, sizeof(hints));
14329 hints.ai_family = AF_UNSPEC;
14330 hints.ai_flags = passive ? AI_PASSIVE : 0;
14331 hints.ai_socktype = SOCK_STREAM;
14332 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
14333 (void)gai_strerror(gaierr);
14334 goto bad;
14335 }
14336 for (ai = aitop; ai; ai = ai->ai_next) {
14337 if (ai->ai_addr == NULL ||
14338 ai->ai_addrlen == 0 ||
14339 getnameinfo(ai->ai_addr, ai->ai_addrlen,
14340 straddr, sizeof(straddr), strport, sizeof(strport),
14341 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
14342 goto bad;
14343 }
14344 switch (ai->ai_family) {
14345 case AF_INET:
14346 if (strcmp(strport, "54321") != 0) {
14347 goto bad;
14348 }
14349 if (passive) {
14350 if (strcmp(straddr, "0.0.0.0") != 0) {
14351 goto bad;
14352 }
14353 } else {
14354 if (strcmp(straddr, "127.0.0.1") != 0) {
14355 goto bad;
14356 }
14357 }
14358 inet4++;
14359 break;
14360 case AF_INET6:
14361 if (strcmp(strport, "54321") != 0) {
14362 goto bad;
14363 }
14364 if (passive) {
14365 if (strcmp(straddr, "::") != 0) {
14366 goto bad;
14367 }
14368 } else {
14369 if (strcmp(straddr, "::1") != 0) {
14370 goto bad;
14371 }
14372 }
14373 inet6++;
14374 break;
14375 case AF_UNSPEC:
14376 goto bad;
14377 break;
14378 default:
14379 /* another family support? */
14380 break;
14381 }
14382 }
14383 }
14384
14385 if (!(inet4 == 0 || inet4 == 2))
14386 goto bad;
14387 if (!(inet6 == 0 || inet6 == 2))
14388 goto bad;
14389
14390 if (aitop)
14391 freeaddrinfo(aitop);
14392 exit(0);
14393
14394 bad:
14395 if (aitop)
14396 freeaddrinfo(aitop);
14397 exit(1);
14398}
14399
Martin v. Löwis11437992002-04-12 09:54:03 +000014400_ACEOF
14401rm -f conftest$ac_exeext
14402if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14403 (eval $ac_link) 2>&5
14404 ac_status=$?
14405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14406 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14407 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14408 (eval $ac_try) 2>&5
14409 ac_status=$?
14410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14411 (exit $ac_status); }; }; then
14412 echo "$as_me:$LINENO: result: good" >&5
14413echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014414buggygetaddrinfo=no
14415else
Martin v. Löwis11437992002-04-12 09:54:03 +000014416 echo "$as_me: program exited with status $ac_status" >&5
14417echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014418cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014419( exit $ac_status )
14420echo "$as_me:$LINENO: result: buggy" >&5
14421echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014422buggygetaddrinfo=yes
14423fi
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014424rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014425fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014426else
Martin v. Löwis11437992002-04-12 09:54:03 +000014427 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014428cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014429
14430echo "$as_me:$LINENO: result: no" >&5
14431echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014432buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014433
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014434fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014435rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014436
14437if test "$buggygetaddrinfo" = "yes"; then
14438 if test "$ipv6" = "yes"; then
14439 echo 'Fatal: You must get working getaddrinfo() function.'
14440 echo ' or you can specify "--disable-ipv6"'.
14441 exit 1
14442 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014443else
Martin v. Löwis11437992002-04-12 09:54:03 +000014444
14445cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014446#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014447_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014448
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014449fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014450
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014451for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014452do
Martin v. Löwis11437992002-04-12 09:54:03 +000014453as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14454echo "$as_me:$LINENO: checking for $ac_func" >&5
14455echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14456if eval "test \"\${$as_ac_var+set}\" = set"; then
14457 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014458else
Martin v. Löwis11437992002-04-12 09:54:03 +000014459 cat >conftest.$ac_ext <<_ACEOF
14460#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014461#include "confdefs.h"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014462/* System header to define __stub macros and hopefully few prototypes,
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014463 which can conflict with char $ac_func (); below. */
14464#include <assert.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014465/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014466#ifdef __cplusplus
14467extern "C"
14468#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014469/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014470 builtin and then its argument prototype would still apply. */
14471char $ac_func ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014472char (*f) ();
14473
14474#ifdef F77_DUMMY_MAIN
14475# ifdef __cplusplus
14476 extern "C"
14477# endif
14478 int F77_DUMMY_MAIN() { return 1; }
14479#endif
14480int
14481main ()
14482{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014483/* The GNU C library defines this for functions which it implements
14484 to always fail with ENOSYS. Some functions are actually named
14485 something starting with __ and the normal name is an alias. */
14486#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14487choke me
14488#else
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014489f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014490#endif
14491
Martin v. Löwis11437992002-04-12 09:54:03 +000014492 ;
14493 return 0;
14494}
14495_ACEOF
14496rm -f conftest.$ac_objext conftest$ac_exeext
14497if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14498 (eval $ac_link) 2>&5
14499 ac_status=$?
14500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14501 (exit $ac_status); } &&
14502 { ac_try='test -s conftest$ac_exeext'
14503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14504 (eval $ac_try) 2>&5
14505 ac_status=$?
14506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14507 (exit $ac_status); }; }; then
14508 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014509else
Martin v. Löwis11437992002-04-12 09:54:03 +000014510 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014511cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014512eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014513fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014514rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014515fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014516echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14517echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14518if test `eval echo '${'$as_ac_var'}'` = yes; then
14519 cat >>confdefs.h <<_ACEOF
14520#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14521_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014522
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014523fi
14524done
14525
Michael W. Hudson54241132001-12-07 15:38:26 +000014526
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014527# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000014528echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
14529echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14530if test "${ac_cv_header_time+set}" = set; then
14531 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014532else
Martin v. Löwis11437992002-04-12 09:54:03 +000014533 cat >conftest.$ac_ext <<_ACEOF
14534#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014535#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014536#include <sys/types.h>
14537#include <sys/time.h>
14538#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014539
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014540#ifdef F77_DUMMY_MAIN
14541# ifdef __cplusplus
14542 extern "C"
14543# endif
14544 int F77_DUMMY_MAIN() { return 1; }
14545#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014546int
14547main ()
14548{
14549if ((struct tm *) 0)
14550return 0;
14551 ;
14552 return 0;
14553}
14554_ACEOF
14555rm -f conftest.$ac_objext
14556if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14557 (eval $ac_compile) 2>&5
14558 ac_status=$?
14559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14560 (exit $ac_status); } &&
14561 { ac_try='test -s conftest.$ac_objext'
14562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14563 (eval $ac_try) 2>&5
14564 ac_status=$?
14565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14566 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014567 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014568else
Martin v. Löwis11437992002-04-12 09:54:03 +000014569 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014570cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014571ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014572fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014573rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014574fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014575echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
14576echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014577if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014578
14579cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014580#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014581_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014582
14583fi
14584
Martin v. Löwis11437992002-04-12 09:54:03 +000014585echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
14586echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
14587if test "${ac_cv_struct_tm+set}" = set; then
14588 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014589else
Martin v. Löwis11437992002-04-12 09:54:03 +000014590 cat >conftest.$ac_ext <<_ACEOF
14591#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014592#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014593#include <sys/types.h>
14594#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014595
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014596#ifdef F77_DUMMY_MAIN
14597# ifdef __cplusplus
14598 extern "C"
14599# endif
14600 int F77_DUMMY_MAIN() { return 1; }
14601#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014602int
14603main ()
14604{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014605struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000014606 ;
14607 return 0;
14608}
14609_ACEOF
14610rm -f conftest.$ac_objext
14611if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14612 (eval $ac_compile) 2>&5
14613 ac_status=$?
14614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14615 (exit $ac_status); } &&
14616 { ac_try='test -s conftest.$ac_objext'
14617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14618 (eval $ac_try) 2>&5
14619 ac_status=$?
14620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14621 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014622 ac_cv_struct_tm=time.h
14623else
Martin v. Löwis11437992002-04-12 09:54:03 +000014624 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014625cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014626ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014627fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014628rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014629fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014630echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
14631echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014632if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014633
14634cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014635#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014636_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014637
14638fi
14639
Martin v. Löwis11437992002-04-12 09:54:03 +000014640echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
14641echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
14642if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
14643 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014644else
Martin v. Löwis11437992002-04-12 09:54:03 +000014645 cat >conftest.$ac_ext <<_ACEOF
14646#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014647#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014648#include <sys/types.h>
14649#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000014650
14651
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014652#ifdef F77_DUMMY_MAIN
14653# ifdef __cplusplus
14654 extern "C"
14655# endif
14656 int F77_DUMMY_MAIN() { return 1; }
14657#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014658int
14659main ()
14660{
14661static struct tm ac_aggr;
14662if (ac_aggr.tm_zone)
14663return 0;
14664 ;
14665 return 0;
14666}
14667_ACEOF
14668rm -f conftest.$ac_objext
14669if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14670 (eval $ac_compile) 2>&5
14671 ac_status=$?
14672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14673 (exit $ac_status); } &&
14674 { ac_try='test -s conftest.$ac_objext'
14675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14676 (eval $ac_try) 2>&5
14677 ac_status=$?
14678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14679 (exit $ac_status); }; }; then
14680 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014681else
Martin v. Löwis11437992002-04-12 09:54:03 +000014682 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014683cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014684ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014685fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014686rm -f conftest.$ac_objext conftest.$ac_ext
14687fi
14688echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
14689echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
14690if test $ac_cv_member_struct_tm_tm_zone = yes; then
14691
14692cat >>confdefs.h <<_ACEOF
14693#define HAVE_STRUCT_TM_TM_ZONE 1
14694_ACEOF
14695
14696
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014697fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014698
Martin v. Löwis11437992002-04-12 09:54:03 +000014699if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14700
14701cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014702#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014703_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014704
14705else
Martin v. Löwis11437992002-04-12 09:54:03 +000014706 echo "$as_me:$LINENO: checking for tzname" >&5
14707echo $ECHO_N "checking for tzname... $ECHO_C" >&6
14708if test "${ac_cv_var_tzname+set}" = set; then
14709 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014710else
Martin v. Löwis11437992002-04-12 09:54:03 +000014711 cat >conftest.$ac_ext <<_ACEOF
14712#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014713#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014714#include <time.h>
14715#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014716extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014717#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014718
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014719#ifdef F77_DUMMY_MAIN
14720# ifdef __cplusplus
14721 extern "C"
14722# endif
14723 int F77_DUMMY_MAIN() { return 1; }
14724#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014725int
14726main ()
14727{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014728atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000014729 ;
14730 return 0;
14731}
14732_ACEOF
14733rm -f conftest.$ac_objext conftest$ac_exeext
14734if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14735 (eval $ac_link) 2>&5
14736 ac_status=$?
14737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14738 (exit $ac_status); } &&
14739 { ac_try='test -s conftest$ac_exeext'
14740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14741 (eval $ac_try) 2>&5
14742 ac_status=$?
14743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14744 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014745 ac_cv_var_tzname=yes
14746else
Martin v. Löwis11437992002-04-12 09:54:03 +000014747 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014748cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014749ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014750fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014751rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000014752fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014753echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
14754echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014755 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014756
14757cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014758#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014759_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014760
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014761 fi
14762fi
14763
Martin v. Löwis11437992002-04-12 09:54:03 +000014764echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
14765echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
14766if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
14767 echo $ECHO_N "(cached) $ECHO_C" >&6
14768else
14769 cat >conftest.$ac_ext <<_ACEOF
14770#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014771#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014772$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014773#ifdef F77_DUMMY_MAIN
14774# ifdef __cplusplus
14775 extern "C"
14776# endif
14777 int F77_DUMMY_MAIN() { return 1; }
14778#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014779int
14780main ()
14781{
14782static struct stat ac_aggr;
14783if (ac_aggr.st_rdev)
14784return 0;
14785 ;
14786 return 0;
14787}
14788_ACEOF
14789rm -f conftest.$ac_objext
14790if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14791 (eval $ac_compile) 2>&5
14792 ac_status=$?
14793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14794 (exit $ac_status); } &&
14795 { ac_try='test -s conftest.$ac_objext'
14796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14797 (eval $ac_try) 2>&5
14798 ac_status=$?
14799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14800 (exit $ac_status); }; }; then
14801 ac_cv_member_struct_stat_st_rdev=yes
14802else
14803 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014804cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014805ac_cv_member_struct_stat_st_rdev=no
14806fi
14807rm -f conftest.$ac_objext conftest.$ac_ext
14808fi
14809echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
14810echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
14811if test $ac_cv_member_struct_stat_st_rdev = yes; then
14812
14813cat >>confdefs.h <<_ACEOF
14814#define HAVE_STRUCT_STAT_ST_RDEV 1
14815_ACEOF
14816
14817
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014818fi
14819
Martin v. Löwis11437992002-04-12 09:54:03 +000014820echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
14821echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
14822if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
14823 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014824else
Martin v. Löwis11437992002-04-12 09:54:03 +000014825 cat >conftest.$ac_ext <<_ACEOF
14826#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014827#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014828$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014829#ifdef F77_DUMMY_MAIN
14830# ifdef __cplusplus
14831 extern "C"
14832# endif
14833 int F77_DUMMY_MAIN() { return 1; }
14834#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014835int
14836main ()
14837{
14838static struct stat ac_aggr;
14839if (ac_aggr.st_blksize)
14840return 0;
14841 ;
14842 return 0;
14843}
14844_ACEOF
14845rm -f conftest.$ac_objext
14846if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14847 (eval $ac_compile) 2>&5
14848 ac_status=$?
14849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14850 (exit $ac_status); } &&
14851 { ac_try='test -s conftest.$ac_objext'
14852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14853 (eval $ac_try) 2>&5
14854 ac_status=$?
14855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14856 (exit $ac_status); }; }; then
14857 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014858else
Martin v. Löwis11437992002-04-12 09:54:03 +000014859 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014860cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014861ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014862fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014863rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014864fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014865echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
14866echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
14867if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014868
Martin v. Löwis11437992002-04-12 09:54:03 +000014869cat >>confdefs.h <<_ACEOF
14870#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
14871_ACEOF
14872
14873
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014874fi
14875
Martin v. Löwis11437992002-04-12 09:54:03 +000014876echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
14877echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
14878if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
14879 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014880else
Martin v. Löwis11437992002-04-12 09:54:03 +000014881 cat >conftest.$ac_ext <<_ACEOF
14882#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014883#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014884$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014885#ifdef F77_DUMMY_MAIN
14886# ifdef __cplusplus
14887 extern "C"
14888# endif
14889 int F77_DUMMY_MAIN() { return 1; }
14890#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014891int
14892main ()
14893{
14894static struct stat ac_aggr;
14895if (ac_aggr.st_blocks)
14896return 0;
14897 ;
14898 return 0;
14899}
14900_ACEOF
14901rm -f conftest.$ac_objext
14902if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14903 (eval $ac_compile) 2>&5
14904 ac_status=$?
14905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14906 (exit $ac_status); } &&
14907 { ac_try='test -s conftest.$ac_objext'
14908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14909 (eval $ac_try) 2>&5
14910 ac_status=$?
14911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14912 (exit $ac_status); }; }; then
14913 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014914else
Martin v. Löwis11437992002-04-12 09:54:03 +000014915 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014916cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014917ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014918fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014919rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014920fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014921echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
14922echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
14923if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014924
Martin v. Löwis11437992002-04-12 09:54:03 +000014925cat >>confdefs.h <<_ACEOF
14926#define HAVE_STRUCT_STAT_ST_BLOCKS 1
14927_ACEOF
14928
14929
14930cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014931#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014932_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014933
14934else
Martin v. Löwis11437992002-04-12 09:54:03 +000014935 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014936fi
14937
Michael W. Hudson54241132001-12-07 15:38:26 +000014938
Martin v. Löwis11437992002-04-12 09:54:03 +000014939
14940echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
14941echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
14942if test "${ac_cv_header_time_altzone+set}" = set; then
14943 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014944else
Martin v. Löwis11437992002-04-12 09:54:03 +000014945 cat >conftest.$ac_ext <<_ACEOF
14946#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014947#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014948#include <time.h>
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014949#ifdef F77_DUMMY_MAIN
14950# ifdef __cplusplus
14951 extern "C"
14952# endif
14953 int F77_DUMMY_MAIN() { return 1; }
14954#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014955int
14956main ()
14957{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014958return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000014959 ;
14960 return 0;
14961}
14962_ACEOF
14963rm -f conftest.$ac_objext
14964if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14965 (eval $ac_compile) 2>&5
14966 ac_status=$?
14967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14968 (exit $ac_status); } &&
14969 { ac_try='test -s conftest.$ac_objext'
14970 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14971 (eval $ac_try) 2>&5
14972 ac_status=$?
14973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14974 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014975 ac_cv_header_time_altzone=yes
14976else
Martin v. Löwis11437992002-04-12 09:54:03 +000014977 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014978cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014979ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000014980fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014981rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014982fi
14983
Martin v. Löwis11437992002-04-12 09:54:03 +000014984echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
14985echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014986if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014987
14988cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014989#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014990_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014991
14992fi
14993
Guido van Rossumda88dad1995-01-26 00:46:29 +000014994was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014995echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
14996echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
14997cat >conftest.$ac_ext <<_ACEOF
14998#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014999#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015000
15001#include <sys/types.h>
15002#include <sys/select.h>
15003#include <sys/time.h>
15004
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015005#ifdef F77_DUMMY_MAIN
15006# ifdef __cplusplus
15007 extern "C"
15008# endif
15009 int F77_DUMMY_MAIN() { return 1; }
15010#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015011int
15012main ()
15013{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015014;
Martin v. Löwis11437992002-04-12 09:54:03 +000015015 ;
15016 return 0;
15017}
15018_ACEOF
15019rm -f conftest.$ac_objext
15020if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15021 (eval $ac_compile) 2>&5
15022 ac_status=$?
15023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15024 (exit $ac_status); } &&
15025 { ac_try='test -s conftest.$ac_objext'
15026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15027 (eval $ac_try) 2>&5
15028 ac_status=$?
15029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15030 (exit $ac_status); }; }; then
15031
15032
15033cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015034#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015035_ACEOF
15036
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015037 was_it_defined=yes
15038
Guido van Rossumf78abae1997-01-21 22:02:36 +000015039else
Martin v. Löwis11437992002-04-12 09:54:03 +000015040 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015041cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000015042fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015043rm -f conftest.$ac_objext conftest.$ac_ext
15044echo "$as_me:$LINENO: result: $was_it_defined" >&5
15045echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015046
Martin v. Löwis11437992002-04-12 09:54:03 +000015047echo "$as_me:$LINENO: checking for addrinfo" >&5
15048echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
15049if test "${ac_cv_struct_addrinfo+set}" = set; then
15050 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015051else
Martin v. Löwis11437992002-04-12 09:54:03 +000015052 cat >conftest.$ac_ext <<_ACEOF
15053#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015054#include "confdefs.h"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015055
15056# include <netdb.h>
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015057#ifdef F77_DUMMY_MAIN
15058# ifdef __cplusplus
15059 extern "C"
15060# endif
15061 int F77_DUMMY_MAIN() { return 1; }
15062#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015063int
15064main ()
15065{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015066struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000015067 ;
15068 return 0;
15069}
15070_ACEOF
15071rm -f conftest.$ac_objext
15072if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15073 (eval $ac_compile) 2>&5
15074 ac_status=$?
15075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15076 (exit $ac_status); } &&
15077 { ac_try='test -s conftest.$ac_objext'
15078 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15079 (eval $ac_try) 2>&5
15080 ac_status=$?
15081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15082 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015083 ac_cv_struct_addrinfo=yes
15084else
Martin v. Löwis11437992002-04-12 09:54:03 +000015085 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015086cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015087ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015088fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015089rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015090fi
15091
Martin v. Löwis11437992002-04-12 09:54:03 +000015092echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
15093echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015094if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015095
15096cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015097#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015098_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015099
15100fi
15101
Martin v. Löwis11437992002-04-12 09:54:03 +000015102echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
15103echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
15104if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
15105 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015106else
Martin v. Löwis11437992002-04-12 09:54:03 +000015107 cat >conftest.$ac_ext <<_ACEOF
15108#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015109#include "confdefs.h"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015110
15111# include <sys/types.h>
15112# include <sys/socket.h>
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015113#ifdef F77_DUMMY_MAIN
15114# ifdef __cplusplus
15115 extern "C"
15116# endif
15117 int F77_DUMMY_MAIN() { return 1; }
15118#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015119int
15120main ()
15121{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015122struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000015123 ;
15124 return 0;
15125}
15126_ACEOF
15127rm -f conftest.$ac_objext
15128if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15129 (eval $ac_compile) 2>&5
15130 ac_status=$?
15131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15132 (exit $ac_status); } &&
15133 { ac_try='test -s conftest.$ac_objext'
15134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15135 (eval $ac_try) 2>&5
15136 ac_status=$?
15137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15138 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015139 ac_cv_struct_sockaddr_storage=yes
15140else
Martin v. Löwis11437992002-04-12 09:54:03 +000015141 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015142cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015143ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015144fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015145rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015146fi
15147
Martin v. Löwis11437992002-04-12 09:54:03 +000015148echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
15149echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015150if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015151
15152cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015153#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015154_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015155
15156fi
15157
Guido van Rossum627b2d71993-12-24 10:39:16 +000015158# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000015159
Michael W. Hudson54241132001-12-07 15:38:26 +000015160
Martin v. Löwis11437992002-04-12 09:54:03 +000015161echo "$as_me:$LINENO: checking whether char is unsigned" >&5
15162echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
15163if test "${ac_cv_c_char_unsigned+set}" = set; then
15164 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000015165else
Martin v. Löwis11437992002-04-12 09:54:03 +000015166 cat >conftest.$ac_ext <<_ACEOF
15167#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015168#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015169$ac_includes_default
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015170#ifdef F77_DUMMY_MAIN
15171# ifdef __cplusplus
15172 extern "C"
15173# endif
15174 int F77_DUMMY_MAIN() { return 1; }
15175#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015176int
15177main ()
15178{
15179static int test_array [1 - 2 * !(((char) -1) < 0)];
15180test_array [0] = 0
15181
15182 ;
15183 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000015184}
Martin v. Löwis11437992002-04-12 09:54:03 +000015185_ACEOF
15186rm -f conftest.$ac_objext
15187if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15188 (eval $ac_compile) 2>&5
15189 ac_status=$?
15190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15191 (exit $ac_status); } &&
15192 { ac_try='test -s conftest.$ac_objext'
15193 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15194 (eval $ac_try) 2>&5
15195 ac_status=$?
15196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15197 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015198 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015199else
15200 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015201cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015202ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015203fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015204rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015205fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015206echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
15207echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015208if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015209 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015210#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015211_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015212
15213fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000015214
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015215echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
15216echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
15217if test "${ac_cv_prog_cc_stdc+set}" = set; then
15218 echo $ECHO_N "(cached) $ECHO_C" >&6
15219else
15220 ac_cv_prog_cc_stdc=no
15221ac_save_CC=$CC
15222cat >conftest.$ac_ext <<_ACEOF
15223#line $LINENO "configure"
15224#include "confdefs.h"
15225#include <stdarg.h>
15226#include <stdio.h>
15227#include <sys/types.h>
15228#include <sys/stat.h>
15229/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
15230struct buf { int x; };
15231FILE * (*rcsopen) (struct buf *, struct stat *, int);
15232static char *e (p, i)
15233 char **p;
15234 int i;
15235{
15236 return p[i];
15237}
15238static char *f (char * (*g) (char **, int), char **p, ...)
15239{
15240 char *s;
15241 va_list v;
15242 va_start (v,p);
15243 s = g (p, va_arg (v,int));
15244 va_end (v);
15245 return s;
15246}
15247int test (int i, double x);
15248struct s1 {int (*f) (int a);};
15249struct s2 {int (*f) (double a);};
15250int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
15251int argc;
15252char **argv;
15253#ifdef F77_DUMMY_MAIN
15254# ifdef __cplusplus
15255 extern "C"
15256# endif
15257 int F77_DUMMY_MAIN() { return 1; }
15258#endif
15259int
15260main ()
15261{
15262return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
15263 ;
15264 return 0;
15265}
15266_ACEOF
15267# Don't try gcc -ansi; that turns off useful extensions and
15268# breaks some systems' header files.
15269# AIX -qlanglvl=ansi
15270# Ultrix and OSF/1 -std1
15271# HP-UX 10.20 and later -Ae
15272# HP-UX older versions -Aa -D_HPUX_SOURCE
15273# SVR4 -Xc -D__EXTENSIONS__
15274for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
15275do
15276 CC="$ac_save_CC $ac_arg"
15277 rm -f conftest.$ac_objext
15278if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15279 (eval $ac_compile) 2>&5
15280 ac_status=$?
15281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15282 (exit $ac_status); } &&
15283 { ac_try='test -s conftest.$ac_objext'
15284 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15285 (eval $ac_try) 2>&5
15286 ac_status=$?
15287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15288 (exit $ac_status); }; }; then
15289 ac_cv_prog_cc_stdc=$ac_arg
15290break
15291else
15292 echo "$as_me: failed program was:" >&5
15293cat conftest.$ac_ext >&5
15294fi
15295rm -f conftest.$ac_objext
15296done
15297rm -f conftest.$ac_ext conftest.$ac_objext
15298CC=$ac_save_CC
15299
15300fi
15301
15302case "x$ac_cv_prog_cc_stdc" in
15303 x|xno)
15304 echo "$as_me:$LINENO: result: none needed" >&5
15305echo "${ECHO_T}none needed" >&6 ;;
15306 *)
15307 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
15308echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
15309 CC="$CC $ac_cv_prog_cc_stdc" ;;
15310esac
15311
Martin v. Löwis11437992002-04-12 09:54:03 +000015312echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
15313echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15314if test "${ac_cv_c_const+set}" = set; then
15315 echo $ECHO_N "(cached) $ECHO_C" >&6
15316else
15317 cat >conftest.$ac_ext <<_ACEOF
15318#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015319#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015320
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015321#ifdef F77_DUMMY_MAIN
15322# ifdef __cplusplus
15323 extern "C"
15324# endif
15325 int F77_DUMMY_MAIN() { return 1; }
15326#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015327int
15328main ()
15329{
15330/* FIXME: Include the comments suggested by Paul. */
15331#ifndef __cplusplus
15332 /* Ultrix mips cc rejects this. */
15333 typedef int charset[2];
15334 const charset x;
15335 /* SunOS 4.1.1 cc rejects this. */
15336 char const *const *ccp;
15337 char **p;
15338 /* NEC SVR4.0.2 mips cc rejects this. */
15339 struct point {int x, y;};
15340 static struct point const zero = {0,0};
15341 /* AIX XL C 1.02.0.0 rejects this.
15342 It does not let you subtract one const X* pointer from another in
15343 an arm of an if-expression whose if-part is not a constant
15344 expression */
15345 const char *g = "string";
15346 ccp = &g + (g ? g-g : 0);
15347 /* HPUX 7.0 cc rejects these. */
15348 ++ccp;
15349 p = (char**) ccp;
15350 ccp = (char const *const *) p;
15351 { /* SCO 3.2v4 cc rejects this. */
15352 char *t;
15353 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015354
Martin v. Löwis11437992002-04-12 09:54:03 +000015355 *t++ = 0;
15356 }
15357 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
15358 int x[] = {25, 17};
15359 const int *foo = &x[0];
15360 ++foo;
15361 }
15362 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15363 typedef const int *iptr;
15364 iptr p = 0;
15365 ++p;
15366 }
15367 { /* AIX XL C 1.02.0.0 rejects this saying
15368 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15369 struct s { int j; const int *ap[3]; };
15370 struct s *b; b->j = 5;
15371 }
15372 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15373 const int foo = 10;
15374 }
15375#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000015376
Martin v. Löwis11437992002-04-12 09:54:03 +000015377 ;
15378 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000015379}
Martin v. Löwis11437992002-04-12 09:54:03 +000015380_ACEOF
15381rm -f conftest.$ac_objext
15382if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15383 (eval $ac_compile) 2>&5
15384 ac_status=$?
15385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15386 (exit $ac_status); } &&
15387 { ac_try='test -s conftest.$ac_objext'
15388 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15389 (eval $ac_try) 2>&5
15390 ac_status=$?
15391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15392 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015393 ac_cv_c_const=yes
15394else
Martin v. Löwis11437992002-04-12 09:54:03 +000015395 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015396cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015397ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015398fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015399rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015400fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015401echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
15402echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015403if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015404
15405cat >>confdefs.h <<\_ACEOF
15406#define const
15407_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015408
15409fi
15410
Michael W. Hudson54241132001-12-07 15:38:26 +000015411
Guido van Rossumda88dad1995-01-26 00:46:29 +000015412works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015413echo "$as_me:$LINENO: checking for working volatile" >&5
15414echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
15415cat >conftest.$ac_ext <<_ACEOF
15416#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015417#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015418
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015419#ifdef F77_DUMMY_MAIN
15420# ifdef __cplusplus
15421 extern "C"
15422# endif
15423 int F77_DUMMY_MAIN() { return 1; }
15424#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015425int
15426main ()
15427{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015428volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015429 ;
15430 return 0;
15431}
15432_ACEOF
15433rm -f conftest.$ac_objext
15434if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15435 (eval $ac_compile) 2>&5
15436 ac_status=$?
15437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15438 (exit $ac_status); } &&
15439 { ac_try='test -s conftest.$ac_objext'
15440 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15441 (eval $ac_try) 2>&5
15442 ac_status=$?
15443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15444 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015445 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015446else
Martin v. Löwis11437992002-04-12 09:54:03 +000015447 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015448cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015449
15450cat >>confdefs.h <<\_ACEOF
15451#define volatile
15452_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015453
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015454
Guido van Rossum627b2d71993-12-24 10:39:16 +000015455fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015456rm -f conftest.$ac_objext conftest.$ac_ext
15457echo "$as_me:$LINENO: result: $works" >&5
15458echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015459
Guido van Rossumda88dad1995-01-26 00:46:29 +000015460works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015461echo "$as_me:$LINENO: checking for working signed char" >&5
15462echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
15463cat >conftest.$ac_ext <<_ACEOF
15464#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015465#include "confdefs.h"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015466
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015467#ifdef F77_DUMMY_MAIN
15468# ifdef __cplusplus
15469 extern "C"
15470# endif
15471 int F77_DUMMY_MAIN() { return 1; }
15472#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015473int
15474main ()
15475{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015476signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000015477 ;
15478 return 0;
15479}
15480_ACEOF
15481rm -f conftest.$ac_objext
15482if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15483 (eval $ac_compile) 2>&5
15484 ac_status=$?
15485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15486 (exit $ac_status); } &&
15487 { ac_try='test -s conftest.$ac_objext'
15488 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15489 (eval $ac_try) 2>&5
15490 ac_status=$?
15491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15492 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015493 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015494else
Martin v. Löwis11437992002-04-12 09:54:03 +000015495 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015496cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015497
15498cat >>confdefs.h <<\_ACEOF
15499#define signed
15500_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000015501
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015502
Guido van Rossum7f43da71994-08-01 12:15:30 +000015503fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015504rm -f conftest.$ac_objext conftest.$ac_ext
15505echo "$as_me:$LINENO: result: $works" >&5
15506echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015507
Guido van Rossumda88dad1995-01-26 00:46:29 +000015508have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015509echo "$as_me:$LINENO: checking for prototypes" >&5
15510echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
15511cat >conftest.$ac_ext <<_ACEOF
15512#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015513#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015514int foo(int x) { return 0; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015515#ifdef F77_DUMMY_MAIN
15516# ifdef __cplusplus
15517 extern "C"
15518# endif
15519 int F77_DUMMY_MAIN() { return 1; }
15520#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015521int
15522main ()
15523{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015524return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000015525 ;
15526 return 0;
15527}
15528_ACEOF
15529rm -f conftest.$ac_objext
15530if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15531 (eval $ac_compile) 2>&5
15532 ac_status=$?
15533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15534 (exit $ac_status); } &&
15535 { ac_try='test -s conftest.$ac_objext'
15536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15537 (eval $ac_try) 2>&5
15538 ac_status=$?
15539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15540 (exit $ac_status); }; }; then
15541
15542
15543cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015544#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015545_ACEOF
15546
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015547 have_prototypes=yes
15548
Guido van Rossumf78abae1997-01-21 22:02:36 +000015549else
Martin v. Löwis11437992002-04-12 09:54:03 +000015550 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015551cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000015552fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015553rm -f conftest.$ac_objext conftest.$ac_ext
15554echo "$as_me:$LINENO: result: $have_prototypes" >&5
15555echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015556
Guido van Rossumda88dad1995-01-26 00:46:29 +000015557works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015558echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
15559echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
15560cat >conftest.$ac_ext <<_ACEOF
15561#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015562#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015563
15564#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000015565int foo(int x, ...) {
15566 va_list va;
15567 va_start(va, x);
15568 va_arg(va, int);
15569 va_arg(va, char *);
15570 va_arg(va, double);
15571 return 0;
15572}
Guido van Rossum7f43da71994-08-01 12:15:30 +000015573
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015574#ifdef F77_DUMMY_MAIN
15575# ifdef __cplusplus
15576 extern "C"
15577# endif
15578 int F77_DUMMY_MAIN() { return 1; }
15579#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015580int
15581main ()
15582{
Guido van Rossum90eea071996-08-30 20:58:57 +000015583return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000015584 ;
15585 return 0;
15586}
15587_ACEOF
15588rm -f conftest.$ac_objext
15589if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15590 (eval $ac_compile) 2>&5
15591 ac_status=$?
15592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15593 (exit $ac_status); } &&
15594 { ac_try='test -s conftest.$ac_objext'
15595 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15596 (eval $ac_try) 2>&5
15597 ac_status=$?
15598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15599 (exit $ac_status); }; }; then
15600
15601
15602cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015603#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015604_ACEOF
15605
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015606 works=yes
15607
Guido van Rossumf78abae1997-01-21 22:02:36 +000015608else
Martin v. Löwis11437992002-04-12 09:54:03 +000015609 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015610cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000015611fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015612rm -f conftest.$ac_objext conftest.$ac_ext
15613echo "$as_me:$LINENO: result: $works" >&5
15614echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015615
Guido van Rossumda88dad1995-01-26 00:46:29 +000015616if test "$have_prototypes" = yes; then
15617bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015618echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
15619echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
15620cat >conftest.$ac_ext <<_ACEOF
15621#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015622#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015623#include <unistd.h>
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015624#ifdef F77_DUMMY_MAIN
15625# ifdef __cplusplus
15626 extern "C"
15627# endif
15628 int F77_DUMMY_MAIN() { return 1; }
15629#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015630int
15631main ()
15632{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015633char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000015634 ;
15635 return 0;
15636}
15637_ACEOF
15638rm -f conftest.$ac_objext
15639if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15640 (eval $ac_compile) 2>&5
15641 ac_status=$?
15642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15643 (exit $ac_status); } &&
15644 { ac_try='test -s conftest.$ac_objext'
15645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15646 (eval $ac_try) 2>&5
15647 ac_status=$?
15648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15649 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000015650 :
15651else
Martin v. Löwis11437992002-04-12 09:54:03 +000015652 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015653cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015654
15655cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015656#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015657_ACEOF
15658
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015659 bad_prototypes=yes
15660
Guido van Rossum627b2d71993-12-24 10:39:16 +000015661fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015662rm -f conftest.$ac_objext conftest.$ac_ext
15663echo "$as_me:$LINENO: result: $bad_prototypes" >&5
15664echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015665fi
15666
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015667# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000015668echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
15669echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
15670cat >conftest.$ac_ext <<_ACEOF
15671#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015672#include "confdefs.h"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015673#include <sys/types.h>
15674#include <sys/socket.h>
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015675#ifdef F77_DUMMY_MAIN
15676# ifdef __cplusplus
15677 extern "C"
15678# endif
15679 int F77_DUMMY_MAIN() { return 1; }
15680#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015681int
15682main ()
15683{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015684struct sockaddr x;
15685x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015686 ;
15687 return 0;
15688}
15689_ACEOF
15690rm -f conftest.$ac_objext
15691if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15692 (eval $ac_compile) 2>&5
15693 ac_status=$?
15694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15695 (exit $ac_status); } &&
15696 { ac_try='test -s conftest.$ac_objext'
15697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15698 (eval $ac_try) 2>&5
15699 ac_status=$?
15700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15701 (exit $ac_status); }; }; then
15702 echo "$as_me:$LINENO: result: yes" >&5
15703echo "${ECHO_T}yes" >&6
15704
15705cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015706#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015707_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015708
15709else
Martin v. Löwis11437992002-04-12 09:54:03 +000015710 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015711cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015712echo "$as_me:$LINENO: result: no" >&5
15713echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015714fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015715rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015716
Guido van Rossumda88dad1995-01-26 00:46:29 +000015717va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015718echo "$as_me:$LINENO: checking whether va_list is an array" >&5
15719echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
15720cat >conftest.$ac_ext <<_ACEOF
15721#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015722#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015723
15724#ifdef HAVE_STDARG_PROTOTYPES
15725#include <stdarg.h>
15726#else
15727#include <varargs.h>
15728#endif
15729
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015730#ifdef F77_DUMMY_MAIN
15731# ifdef __cplusplus
15732 extern "C"
15733# endif
15734 int F77_DUMMY_MAIN() { return 1; }
15735#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015736int
15737main ()
15738{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015739va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000015740 ;
15741 return 0;
15742}
15743_ACEOF
15744rm -f conftest.$ac_objext
15745if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15746 (eval $ac_compile) 2>&5
15747 ac_status=$?
15748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15749 (exit $ac_status); } &&
15750 { ac_try='test -s conftest.$ac_objext'
15751 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15752 (eval $ac_try) 2>&5
15753 ac_status=$?
15754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15755 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015756 :
15757else
Martin v. Löwis11437992002-04-12 09:54:03 +000015758 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015759cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015760
15761
15762cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015763#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015764_ACEOF
15765
Guido van Rossumda88dad1995-01-26 00:46:29 +000015766 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015767
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015768fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015769rm -f conftest.$ac_objext conftest.$ac_ext
15770echo "$as_me:$LINENO: result: $va_list_is_array" >&5
15771echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015772
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015773# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000015774
15775
15776
15777echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
15778echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
15779if test "${ac_cv_func_gethostbyname_r+set}" = set; then
15780 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015781else
Martin v. Löwis11437992002-04-12 09:54:03 +000015782 cat >conftest.$ac_ext <<_ACEOF
15783#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015784#include "confdefs.h"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015785/* System header to define __stub macros and hopefully few prototypes,
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015786 which can conflict with char gethostbyname_r (); below. */
15787#include <assert.h>
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015788/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015789#ifdef __cplusplus
15790extern "C"
15791#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015792/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015793 builtin and then its argument prototype would still apply. */
15794char gethostbyname_r ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015795char (*f) ();
15796
15797#ifdef F77_DUMMY_MAIN
15798# ifdef __cplusplus
15799 extern "C"
15800# endif
15801 int F77_DUMMY_MAIN() { return 1; }
15802#endif
15803int
15804main ()
15805{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015806/* The GNU C library defines this for functions which it implements
15807 to always fail with ENOSYS. Some functions are actually named
15808 something starting with __ and the normal name is an alias. */
15809#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
15810choke me
15811#else
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015812f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015813#endif
15814
Martin v. Löwis11437992002-04-12 09:54:03 +000015815 ;
15816 return 0;
15817}
15818_ACEOF
15819rm -f conftest.$ac_objext conftest$ac_exeext
15820if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15821 (eval $ac_link) 2>&5
15822 ac_status=$?
15823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15824 (exit $ac_status); } &&
15825 { ac_try='test -s conftest$ac_exeext'
15826 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15827 (eval $ac_try) 2>&5
15828 ac_status=$?
15829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15830 (exit $ac_status); }; }; then
15831 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015832else
Martin v. Löwis11437992002-04-12 09:54:03 +000015833 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015834cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015835ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015836fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015837rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015838fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015839echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
15840echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
15841if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015842
Martin v. Löwis11437992002-04-12 09:54:03 +000015843 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015844#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015845_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015846
Martin v. Löwis11437992002-04-12 09:54:03 +000015847 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
15848echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015849 OLD_CFLAGS=$CFLAGS
15850 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015851 cat >conftest.$ac_ext <<_ACEOF
15852#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015853#include "confdefs.h"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015854
15855# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015856
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015857#ifdef F77_DUMMY_MAIN
15858# ifdef __cplusplus
15859 extern "C"
15860# endif
15861 int F77_DUMMY_MAIN() { return 1; }
15862#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015863int
15864main ()
15865{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015866
15867 char *name;
15868 struct hostent *he, *res;
15869 char buffer[2048];
15870 int buflen = 2048;
15871 int h_errnop;
15872
15873 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015874
15875 ;
15876 return 0;
15877}
15878_ACEOF
15879rm -f conftest.$ac_objext
15880if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15881 (eval $ac_compile) 2>&5
15882 ac_status=$?
15883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15884 (exit $ac_status); } &&
15885 { ac_try='test -s conftest.$ac_objext'
15886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15887 (eval $ac_try) 2>&5
15888 ac_status=$?
15889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15890 (exit $ac_status); }; }; then
15891
15892 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015893#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015894_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015895
Martin v. Löwis11437992002-04-12 09:54:03 +000015896
15897cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015898#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015899_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015900
Martin v. Löwis11437992002-04-12 09:54:03 +000015901 echo "$as_me:$LINENO: result: yes" >&5
15902echo "${ECHO_T}yes" >&6
15903
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015904else
Martin v. Löwis11437992002-04-12 09:54:03 +000015905 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015906cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015907
15908 echo "$as_me:$LINENO: result: no" >&5
15909echo "${ECHO_T}no" >&6
15910 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
15911echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
15912 cat >conftest.$ac_ext <<_ACEOF
15913#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015914#include "confdefs.h"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015915
15916# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015917
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015918#ifdef F77_DUMMY_MAIN
15919# ifdef __cplusplus
15920 extern "C"
15921# endif
15922 int F77_DUMMY_MAIN() { return 1; }
15923#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015924int
15925main ()
15926{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015927
15928 char *name;
15929 struct hostent *he;
15930 char buffer[2048];
15931 int buflen = 2048;
15932 int h_errnop;
15933
15934 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015935
15936 ;
15937 return 0;
15938}
15939_ACEOF
15940rm -f conftest.$ac_objext
15941if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15942 (eval $ac_compile) 2>&5
15943 ac_status=$?
15944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15945 (exit $ac_status); } &&
15946 { ac_try='test -s conftest.$ac_objext'
15947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15948 (eval $ac_try) 2>&5
15949 ac_status=$?
15950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15951 (exit $ac_status); }; }; then
15952
15953 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015954#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015955_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015956
Martin v. Löwis11437992002-04-12 09:54:03 +000015957
15958cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015959#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015960_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015961
Martin v. Löwis11437992002-04-12 09:54:03 +000015962 echo "$as_me:$LINENO: result: yes" >&5
15963echo "${ECHO_T}yes" >&6
15964
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015965else
Martin v. Löwis11437992002-04-12 09:54:03 +000015966 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015967cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015968
15969 echo "$as_me:$LINENO: result: no" >&5
15970echo "${ECHO_T}no" >&6
15971 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
15972echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
15973 cat >conftest.$ac_ext <<_ACEOF
15974#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015975#include "confdefs.h"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015976
15977# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015978
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015979#ifdef F77_DUMMY_MAIN
15980# ifdef __cplusplus
15981 extern "C"
15982# endif
15983 int F77_DUMMY_MAIN() { return 1; }
15984#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015985int
15986main ()
15987{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015988
15989 char *name;
15990 struct hostent *he;
15991 struct hostent_data data;
15992
15993 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000015994
15995 ;
15996 return 0;
15997}
15998_ACEOF
15999rm -f conftest.$ac_objext
16000if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16001 (eval $ac_compile) 2>&5
16002 ac_status=$?
16003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16004 (exit $ac_status); } &&
16005 { ac_try='test -s conftest.$ac_objext'
16006 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16007 (eval $ac_try) 2>&5
16008 ac_status=$?
16009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16010 (exit $ac_status); }; }; then
16011
16012 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016013#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016014_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016015
Martin v. Löwis11437992002-04-12 09:54:03 +000016016
16017cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016018#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016019_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016020
Martin v. Löwis11437992002-04-12 09:54:03 +000016021 echo "$as_me:$LINENO: result: yes" >&5
16022echo "${ECHO_T}yes" >&6
16023
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016024else
Martin v. Löwis11437992002-04-12 09:54:03 +000016025 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016026cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016027
16028 echo "$as_me:$LINENO: result: no" >&5
16029echo "${ECHO_T}no" >&6
16030
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016031fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016032rm -f conftest.$ac_objext conftest.$ac_ext
16033
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016034fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016035rm -f conftest.$ac_objext conftest.$ac_ext
16036
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016037fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016038rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016039 CFLAGS=$OLD_CFLAGS
16040
16041else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016042
Martin v. Löwis11437992002-04-12 09:54:03 +000016043
16044for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000016045do
Martin v. Löwis11437992002-04-12 09:54:03 +000016046as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16047echo "$as_me:$LINENO: checking for $ac_func" >&5
16048echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16049if eval "test \"\${$as_ac_var+set}\" = set"; then
16050 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016051else
Martin v. Löwis11437992002-04-12 09:54:03 +000016052 cat >conftest.$ac_ext <<_ACEOF
16053#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016054#include "confdefs.h"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016055/* System header to define __stub macros and hopefully few prototypes,
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016056 which can conflict with char $ac_func (); below. */
16057#include <assert.h>
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016058/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016059#ifdef __cplusplus
16060extern "C"
16061#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016062/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016063 builtin and then its argument prototype would still apply. */
16064char $ac_func ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016065char (*f) ();
16066
16067#ifdef F77_DUMMY_MAIN
16068# ifdef __cplusplus
16069 extern "C"
16070# endif
16071 int F77_DUMMY_MAIN() { return 1; }
16072#endif
16073int
16074main ()
16075{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016076/* The GNU C library defines this for functions which it implements
16077 to always fail with ENOSYS. Some functions are actually named
16078 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000016079#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016080choke me
16081#else
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016082f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016083#endif
16084
Martin v. Löwis11437992002-04-12 09:54:03 +000016085 ;
16086 return 0;
16087}
16088_ACEOF
16089rm -f conftest.$ac_objext conftest$ac_exeext
16090if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16091 (eval $ac_link) 2>&5
16092 ac_status=$?
16093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16094 (exit $ac_status); } &&
16095 { ac_try='test -s conftest$ac_exeext'
16096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16097 (eval $ac_try) 2>&5
16098 ac_status=$?
16099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16100 (exit $ac_status); }; }; then
16101 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016102else
Martin v. Löwis11437992002-04-12 09:54:03 +000016103 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016104cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016105eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016106fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016107rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016108fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016109echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16110echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16111if test `eval echo '${'$as_ac_var'}'` = yes; then
16112 cat >>confdefs.h <<_ACEOF
16113#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16114_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016115
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016116fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016117done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016118
Michael W. Hudson54241132001-12-07 15:38:26 +000016119
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016120fi
16121
Michael W. Hudson54241132001-12-07 15:38:26 +000016122
16123
16124
16125
16126
16127
Guido van Rossum627b2d71993-12-24 10:39:16 +000016128# checks for system services
16129# (none yet)
16130
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016131# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000016132echo "$as_me:$LINENO: checking for __fpu_control" >&5
16133echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
16134if test "${ac_cv_func___fpu_control+set}" = set; then
16135 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016136else
Martin v. Löwis11437992002-04-12 09:54:03 +000016137 cat >conftest.$ac_ext <<_ACEOF
16138#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016139#include "confdefs.h"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016140/* System header to define __stub macros and hopefully few prototypes,
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016141 which can conflict with char __fpu_control (); below. */
16142#include <assert.h>
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016143/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016144#ifdef __cplusplus
16145extern "C"
16146#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016147/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016148 builtin and then its argument prototype would still apply. */
16149char __fpu_control ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016150char (*f) ();
16151
16152#ifdef F77_DUMMY_MAIN
16153# ifdef __cplusplus
16154 extern "C"
16155# endif
16156 int F77_DUMMY_MAIN() { return 1; }
16157#endif
16158int
16159main ()
16160{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016161/* The GNU C library defines this for functions which it implements
16162 to always fail with ENOSYS. Some functions are actually named
16163 something starting with __ and the normal name is an alias. */
16164#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
16165choke me
16166#else
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016167f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016168#endif
16169
Martin v. Löwis11437992002-04-12 09:54:03 +000016170 ;
16171 return 0;
16172}
16173_ACEOF
16174rm -f conftest.$ac_objext conftest$ac_exeext
16175if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16176 (eval $ac_link) 2>&5
16177 ac_status=$?
16178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16179 (exit $ac_status); } &&
16180 { ac_try='test -s conftest$ac_exeext'
16181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16182 (eval $ac_try) 2>&5
16183 ac_status=$?
16184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16185 (exit $ac_status); }; }; then
16186 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016187else
Martin v. Löwis11437992002-04-12 09:54:03 +000016188 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016189cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016190ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016191fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016192rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016193fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016194echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
16195echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
16196if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016197 :
16198else
Martin v. Löwis11437992002-04-12 09:54:03 +000016199
16200echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
16201echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
16202if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
16203 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016204else
Martin v. Löwis11437992002-04-12 09:54:03 +000016205 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016206LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016207cat >conftest.$ac_ext <<_ACEOF
16208#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016209#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016210
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016211/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016212#ifdef __cplusplus
16213extern "C"
16214#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016215/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016216 builtin and then its argument prototype would still apply. */
16217char __fpu_control ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016218#ifdef F77_DUMMY_MAIN
16219# ifdef __cplusplus
16220 extern "C"
16221# endif
16222 int F77_DUMMY_MAIN() { return 1; }
16223#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016224int
16225main ()
16226{
16227__fpu_control ();
16228 ;
16229 return 0;
16230}
16231_ACEOF
16232rm -f conftest.$ac_objext conftest$ac_exeext
16233if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16234 (eval $ac_link) 2>&5
16235 ac_status=$?
16236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16237 (exit $ac_status); } &&
16238 { ac_try='test -s conftest$ac_exeext'
16239 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16240 (eval $ac_try) 2>&5
16241 ac_status=$?
16242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16243 (exit $ac_status); }; }; then
16244 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000016245else
Martin v. Löwis11437992002-04-12 09:54:03 +000016246 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016247cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016248ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016249fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016250rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16251LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016252fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016253echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
16254echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
16255if test $ac_cv_lib_ieee___fpu_control = yes; then
16256 cat >>confdefs.h <<_ACEOF
16257#define HAVE_LIBIEEE 1
16258_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016259
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016260 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016261
Guido van Rossum627b2d71993-12-24 10:39:16 +000016262fi
16263
Michael W. Hudson54241132001-12-07 15:38:26 +000016264
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016265fi
16266
Michael W. Hudson54241132001-12-07 15:38:26 +000016267
Guido van Rossum7f253911997-05-09 02:42:48 +000016268# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000016269echo "$as_me:$LINENO: checking for --with-fpectl" >&5
16270echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
16271
Guido van Rossum7f253911997-05-09 02:42:48 +000016272# Check whether --with-fpectl or --without-fpectl was given.
16273if test "${with_fpectl+set}" = set; then
16274 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000016275
Guido van Rossum7f253911997-05-09 02:42:48 +000016276if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016277then
16278
16279cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000016280#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016281_ACEOF
16282
16283 echo "$as_me:$LINENO: result: yes" >&5
16284echo "${ECHO_T}yes" >&6
16285else echo "$as_me:$LINENO: result: no" >&5
16286echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016287fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016288else
Martin v. Löwis11437992002-04-12 09:54:03 +000016289 echo "$as_me:$LINENO: result: no" >&5
16290echo "${ECHO_T}no" >&6
16291fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000016292
Guido van Rossum7f43da71994-08-01 12:15:30 +000016293# check for --with-libm=...
16294
Guido van Rossum563e7081996-09-10 18:20:48 +000016295case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000016296Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016297BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000016298*) LIBM=-lm
16299esac
Martin v. Löwis11437992002-04-12 09:54:03 +000016300echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
16301echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
16302
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016303# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016304if test "${with_libm+set}" = set; then
16305 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000016306
Guido van Rossum7f253911997-05-09 02:42:48 +000016307if test "$withval" = no
16308then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000016309 echo "$as_me:$LINENO: result: force LIBM empty" >&5
16310echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016311elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016312then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000016313 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
16314echo "${ECHO_T}set LIBM=\"$withval\"" >&6
16315else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
16316echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
16317 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016318fi
Guido van Rossum7f253911997-05-09 02:42:48 +000016319else
Martin v. Löwis11437992002-04-12 09:54:03 +000016320 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
16321echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
16322fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016323
16324# check for --with-libc=...
16325
Martin v. Löwis11437992002-04-12 09:54:03 +000016326echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
16327echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
16328
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016329# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016330if test "${with_libc+set}" = set; then
16331 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000016332
Guido van Rossum7f253911997-05-09 02:42:48 +000016333if test "$withval" = no
16334then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000016335 echo "$as_me:$LINENO: result: force LIBC empty" >&5
16336echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016337elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016338then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000016339 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
16340echo "${ECHO_T}set LIBC=\"$withval\"" >&6
16341else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
16342echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
16343 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016344fi
Guido van Rossum7f253911997-05-09 02:42:48 +000016345else
Martin v. Löwis11437992002-04-12 09:54:03 +000016346 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
16347echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
16348fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016349
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016350# check for hypot() in math library
16351LIBS_SAVE=$LIBS
16352LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000016353
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016354for ac_func in hypot
16355do
Martin v. Löwis11437992002-04-12 09:54:03 +000016356as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16357echo "$as_me:$LINENO: checking for $ac_func" >&5
16358echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16359if eval "test \"\${$as_ac_var+set}\" = set"; then
16360 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016361else
Martin v. Löwis11437992002-04-12 09:54:03 +000016362 cat >conftest.$ac_ext <<_ACEOF
16363#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016364#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016365/* System header to define __stub macros and hopefully few prototypes,
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016366 which can conflict with char $ac_func (); below. */
16367#include <assert.h>
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016368/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016369#ifdef __cplusplus
16370extern "C"
16371#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016372/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016373 builtin and then its argument prototype would still apply. */
16374char $ac_func ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016375char (*f) ();
16376
16377#ifdef F77_DUMMY_MAIN
16378# ifdef __cplusplus
16379 extern "C"
16380# endif
16381 int F77_DUMMY_MAIN() { return 1; }
16382#endif
16383int
16384main ()
16385{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016386/* The GNU C library defines this for functions which it implements
16387 to always fail with ENOSYS. Some functions are actually named
16388 something starting with __ and the normal name is an alias. */
16389#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16390choke me
16391#else
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016392f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016393#endif
16394
Martin v. Löwis11437992002-04-12 09:54:03 +000016395 ;
16396 return 0;
16397}
16398_ACEOF
16399rm -f conftest.$ac_objext conftest$ac_exeext
16400if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16401 (eval $ac_link) 2>&5
16402 ac_status=$?
16403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16404 (exit $ac_status); } &&
16405 { ac_try='test -s conftest$ac_exeext'
16406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16407 (eval $ac_try) 2>&5
16408 ac_status=$?
16409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16410 (exit $ac_status); }; }; then
16411 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016412else
Martin v. Löwis11437992002-04-12 09:54:03 +000016413 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016414cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016415eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016416fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016417rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016418fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016419echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16420echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16421if test `eval echo '${'$as_ac_var'}'` = yes; then
16422 cat >>confdefs.h <<_ACEOF
16423#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16424_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000016425
Michael W. Hudson54241132001-12-07 15:38:26 +000016426else
Martin v. Löwis11437992002-04-12 09:54:03 +000016427 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016428fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016429done
16430
Michael W. Hudson54241132001-12-07 15:38:26 +000016431
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016432LIBS=$LIBS_SAVE
16433
Guido van Rossumef2255b2000-03-10 22:30:29 +000016434# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000016435if test "${ac_cv_header_wchar_h+set}" = set; then
16436 echo "$as_me:$LINENO: checking for wchar.h" >&5
16437echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16438if test "${ac_cv_header_wchar_h+set}" = set; then
16439 echo $ECHO_N "(cached) $ECHO_C" >&6
16440fi
16441echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16442echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000016443else
Martin v. Löwis11437992002-04-12 09:54:03 +000016444 # Is the header compilable?
16445echo "$as_me:$LINENO: checking wchar.h usability" >&5
16446echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
16447cat >conftest.$ac_ext <<_ACEOF
16448#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016449#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016450$ac_includes_default
16451#include <wchar.h>
16452_ACEOF
16453rm -f conftest.$ac_objext
16454if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16455 (eval $ac_compile) 2>&5
16456 ac_status=$?
16457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16458 (exit $ac_status); } &&
16459 { ac_try='test -s conftest.$ac_objext'
16460 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16461 (eval $ac_try) 2>&5
16462 ac_status=$?
16463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16464 (exit $ac_status); }; }; then
16465 ac_header_compiler=yes
16466else
16467 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016468cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016469ac_header_compiler=no
16470fi
16471rm -f conftest.$ac_objext conftest.$ac_ext
16472echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16473echo "${ECHO_T}$ac_header_compiler" >&6
16474
16475# Is the header present?
16476echo "$as_me:$LINENO: checking wchar.h presence" >&5
16477echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
16478cat >conftest.$ac_ext <<_ACEOF
16479#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016480#include "confdefs.h"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016481#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016482_ACEOF
16483if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16484 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16485 ac_status=$?
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016486 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016487 rm -f conftest.er1
16488 cat conftest.err >&5
16489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16490 (exit $ac_status); } >/dev/null; then
16491 if test -s conftest.err; then
16492 ac_cpp_err=$ac_c_preproc_warn_flag
16493 else
16494 ac_cpp_err=
16495 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016496else
Martin v. Löwis11437992002-04-12 09:54:03 +000016497 ac_cpp_err=yes
16498fi
16499if test -z "$ac_cpp_err"; then
16500 ac_header_preproc=yes
16501else
16502 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016503 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016504 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016505fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016506rm -f conftest.err conftest.$ac_ext
16507echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16508echo "${ECHO_T}$ac_header_preproc" >&6
16509
16510# So? What about this header?
16511case $ac_header_compiler:$ac_header_preproc in
16512 yes:no )
16513 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
16514echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16515 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016516echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwis11437992002-04-12 09:54:03 +000016517 no:yes )
16518 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
16519echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
16520 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
16521echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
16522 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016523echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
Martin v. Löwis11437992002-04-12 09:54:03 +000016524esac
16525echo "$as_me:$LINENO: checking for wchar.h" >&5
16526echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16527if test "${ac_cv_header_wchar_h+set}" = set; then
16528 echo $ECHO_N "(cached) $ECHO_C" >&6
16529else
16530 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000016531fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016532echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16533echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
16534
16535fi
16536if test $ac_cv_header_wchar_h = yes; then
16537
16538
16539cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016540#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016541_ACEOF
16542
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016543 wchar_h="yes"
16544
Guido van Rossumef2255b2000-03-10 22:30:29 +000016545else
Martin v. Löwis11437992002-04-12 09:54:03 +000016546 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016547
16548fi
16549
Michael W. Hudson54241132001-12-07 15:38:26 +000016550
Martin v. Löwis11437992002-04-12 09:54:03 +000016551
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016552# determine wchar_t size
16553if test "$wchar_h" = yes
16554then
Martin v. Löwis11437992002-04-12 09:54:03 +000016555 echo "$as_me:$LINENO: checking for wchar_t" >&5
16556echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
16557if test "${ac_cv_type_wchar_t+set}" = set; then
16558 echo $ECHO_N "(cached) $ECHO_C" >&6
16559else
16560 cat >conftest.$ac_ext <<_ACEOF
16561#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016562#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016563#include <wchar.h>
16564
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016565#ifdef F77_DUMMY_MAIN
16566# ifdef __cplusplus
16567 extern "C"
16568# endif
16569 int F77_DUMMY_MAIN() { return 1; }
16570#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016571int
16572main ()
16573{
16574if ((wchar_t *) 0)
16575 return 0;
16576if (sizeof (wchar_t))
16577 return 0;
16578 ;
16579 return 0;
16580}
16581_ACEOF
16582rm -f conftest.$ac_objext
16583if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16584 (eval $ac_compile) 2>&5
16585 ac_status=$?
16586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16587 (exit $ac_status); } &&
16588 { ac_try='test -s conftest.$ac_objext'
16589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16590 (eval $ac_try) 2>&5
16591 ac_status=$?
16592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16593 (exit $ac_status); }; }; then
16594 ac_cv_type_wchar_t=yes
16595else
16596 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016597cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016598ac_cv_type_wchar_t=no
16599fi
16600rm -f conftest.$ac_objext conftest.$ac_ext
16601fi
16602echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
16603echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
16604
16605echo "$as_me:$LINENO: checking size of wchar_t" >&5
16606echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
16607if test "${ac_cv_sizeof_wchar_t+set}" = set; then
16608 echo $ECHO_N "(cached) $ECHO_C" >&6
16609else
16610 if test "$ac_cv_type_wchar_t" = yes; then
16611 # The cast to unsigned long works around a bug in the HP C Compiler
16612 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16613 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16614 # This bug is HP SR number 8606223364.
16615 if test "$cross_compiling" = yes; then
16616 # Depending upon the size, compute the lo and hi bounds.
16617cat >conftest.$ac_ext <<_ACEOF
16618#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016619#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016620#include <wchar.h>
16621
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016622#ifdef F77_DUMMY_MAIN
16623# ifdef __cplusplus
16624 extern "C"
16625# endif
16626 int F77_DUMMY_MAIN() { return 1; }
16627#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016628int
16629main ()
16630{
16631static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
16632test_array [0] = 0
16633
16634 ;
16635 return 0;
16636}
16637_ACEOF
16638rm -f conftest.$ac_objext
16639if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16640 (eval $ac_compile) 2>&5
16641 ac_status=$?
16642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16643 (exit $ac_status); } &&
16644 { ac_try='test -s conftest.$ac_objext'
16645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16646 (eval $ac_try) 2>&5
16647 ac_status=$?
16648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16649 (exit $ac_status); }; }; then
16650 ac_lo=0 ac_mid=0
16651 while :; do
16652 cat >conftest.$ac_ext <<_ACEOF
16653#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016654#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016655#include <wchar.h>
16656
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016657#ifdef F77_DUMMY_MAIN
16658# ifdef __cplusplus
16659 extern "C"
16660# endif
16661 int F77_DUMMY_MAIN() { return 1; }
16662#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016663int
16664main ()
16665{
16666static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16667test_array [0] = 0
16668
16669 ;
16670 return 0;
16671}
16672_ACEOF
16673rm -f conftest.$ac_objext
16674if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16675 (eval $ac_compile) 2>&5
16676 ac_status=$?
16677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16678 (exit $ac_status); } &&
16679 { ac_try='test -s conftest.$ac_objext'
16680 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16681 (eval $ac_try) 2>&5
16682 ac_status=$?
16683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16684 (exit $ac_status); }; }; then
16685 ac_hi=$ac_mid; break
16686else
16687 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016688cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016689ac_lo=`expr $ac_mid + 1`
16690 if test $ac_lo -le $ac_mid; then
16691 ac_lo= ac_hi=
16692 break
16693 fi
16694 ac_mid=`expr 2 '*' $ac_mid + 1`
16695fi
16696rm -f conftest.$ac_objext conftest.$ac_ext
16697 done
16698else
16699 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016700cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016701cat >conftest.$ac_ext <<_ACEOF
16702#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016703#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016704#include <wchar.h>
16705
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016706#ifdef F77_DUMMY_MAIN
16707# ifdef __cplusplus
16708 extern "C"
16709# endif
16710 int F77_DUMMY_MAIN() { return 1; }
16711#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016712int
16713main ()
16714{
16715static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
16716test_array [0] = 0
16717
16718 ;
16719 return 0;
16720}
16721_ACEOF
16722rm -f conftest.$ac_objext
16723if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16724 (eval $ac_compile) 2>&5
16725 ac_status=$?
16726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16727 (exit $ac_status); } &&
16728 { ac_try='test -s conftest.$ac_objext'
16729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16730 (eval $ac_try) 2>&5
16731 ac_status=$?
16732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16733 (exit $ac_status); }; }; then
16734 ac_hi=-1 ac_mid=-1
16735 while :; do
16736 cat >conftest.$ac_ext <<_ACEOF
16737#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016738#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016739#include <wchar.h>
16740
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016741#ifdef F77_DUMMY_MAIN
16742# ifdef __cplusplus
16743 extern "C"
16744# endif
16745 int F77_DUMMY_MAIN() { return 1; }
16746#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016747int
16748main ()
16749{
16750static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
16751test_array [0] = 0
16752
16753 ;
16754 return 0;
16755}
16756_ACEOF
16757rm -f conftest.$ac_objext
16758if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16759 (eval $ac_compile) 2>&5
16760 ac_status=$?
16761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16762 (exit $ac_status); } &&
16763 { ac_try='test -s conftest.$ac_objext'
16764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16765 (eval $ac_try) 2>&5
16766 ac_status=$?
16767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16768 (exit $ac_status); }; }; then
16769 ac_lo=$ac_mid; break
16770else
16771 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016772cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016773ac_hi=`expr '(' $ac_mid ')' - 1`
16774 if test $ac_mid -le $ac_hi; then
16775 ac_lo= ac_hi=
16776 break
16777 fi
16778 ac_mid=`expr 2 '*' $ac_mid`
16779fi
16780rm -f conftest.$ac_objext conftest.$ac_ext
16781 done
16782else
16783 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016784cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016785ac_lo= ac_hi=
16786fi
16787rm -f conftest.$ac_objext conftest.$ac_ext
16788fi
16789rm -f conftest.$ac_objext conftest.$ac_ext
16790# Binary search between lo and hi bounds.
16791while test "x$ac_lo" != "x$ac_hi"; do
16792 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
16793 cat >conftest.$ac_ext <<_ACEOF
16794#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016795#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016796#include <wchar.h>
16797
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016798#ifdef F77_DUMMY_MAIN
16799# ifdef __cplusplus
16800 extern "C"
16801# endif
16802 int F77_DUMMY_MAIN() { return 1; }
16803#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016804int
16805main ()
16806{
16807static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16808test_array [0] = 0
16809
16810 ;
16811 return 0;
16812}
16813_ACEOF
16814rm -f conftest.$ac_objext
16815if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16816 (eval $ac_compile) 2>&5
16817 ac_status=$?
16818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16819 (exit $ac_status); } &&
16820 { ac_try='test -s conftest.$ac_objext'
16821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16822 (eval $ac_try) 2>&5
16823 ac_status=$?
16824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16825 (exit $ac_status); }; }; then
16826 ac_hi=$ac_mid
16827else
16828 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016829cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016830ac_lo=`expr '(' $ac_mid ')' + 1`
16831fi
16832rm -f conftest.$ac_objext conftest.$ac_ext
16833done
16834case $ac_lo in
16835?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016836'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
16837echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016838 { (exit 1); exit 1; }; } ;;
16839esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016840else
16841 if test "$cross_compiling" = yes; then
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016842 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
16843echo "$as_me: error: cannot run test program while cross compiling" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016844 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000016845else
Martin v. Löwis11437992002-04-12 09:54:03 +000016846 cat >conftest.$ac_ext <<_ACEOF
16847#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016848#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016849#include <wchar.h>
16850
16851long longval () { return (long) (sizeof (wchar_t)); }
16852unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000016853#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016854#include <stdlib.h>
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016855#ifdef F77_DUMMY_MAIN
16856# ifdef __cplusplus
16857 extern "C"
16858# endif
16859 int F77_DUMMY_MAIN() { return 1; }
16860#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016861int
16862main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016863{
Martin v. Löwis11437992002-04-12 09:54:03 +000016864
16865 FILE *f = fopen ("conftest.val", "w");
16866 if (! f)
16867 exit (1);
16868 if (((long) (sizeof (wchar_t))) < 0)
16869 {
16870 long i = longval ();
16871 if (i != ((long) (sizeof (wchar_t))))
16872 exit (1);
16873 fprintf (f, "%ld\n", i);
16874 }
16875 else
16876 {
16877 unsigned long i = ulongval ();
16878 if (i != ((long) (sizeof (wchar_t))))
16879 exit (1);
16880 fprintf (f, "%lu\n", i);
16881 }
16882 exit (ferror (f) || fclose (f) != 0);
16883
16884 ;
16885 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000016886}
Martin v. Löwis11437992002-04-12 09:54:03 +000016887_ACEOF
16888rm -f conftest$ac_exeext
16889if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16890 (eval $ac_link) 2>&5
16891 ac_status=$?
16892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16893 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16895 (eval $ac_try) 2>&5
16896 ac_status=$?
16897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16898 (exit $ac_status); }; }; then
16899 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000016900else
Martin v. Löwis11437992002-04-12 09:54:03 +000016901 echo "$as_me: program exited with status $ac_status" >&5
16902echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016903cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016904( exit $ac_status )
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016905{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
16906echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016907 { (exit 1); exit 1; }; }
16908fi
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016909rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016910fi
16911fi
16912rm -f conftest.val
16913else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016914 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000016915fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016916fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016917echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
16918echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
16919cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016920#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016921_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016922
Michael W. Hudson54241132001-12-07 15:38:26 +000016923
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016924fi
16925
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016926echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
16927echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6
16928have_ucs4_tcl=no
16929cat >conftest.$ac_ext <<_ACEOF
16930#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016931#include "confdefs.h"
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016932
16933#include <tcl.h>
16934#if TCL_UTF_MAX != 6
16935# error "NOT UCS4_TCL"
16936#endif
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016937#ifdef F77_DUMMY_MAIN
16938# ifdef __cplusplus
16939 extern "C"
16940# endif
16941 int F77_DUMMY_MAIN() { return 1; }
16942#endif
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016943int
16944main ()
16945{
16946
16947 ;
16948 return 0;
16949}
16950_ACEOF
16951rm -f conftest.$ac_objext
16952if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16953 (eval $ac_compile) 2>&5
16954 ac_status=$?
16955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16956 (exit $ac_status); } &&
16957 { ac_try='test -s conftest.$ac_objext'
16958 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16959 (eval $ac_try) 2>&5
16960 ac_status=$?
16961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16962 (exit $ac_status); }; }; then
16963
16964
16965cat >>confdefs.h <<\_ACEOF
16966#define HAVE_UCS4_TCL 1
16967_ACEOF
16968
16969 have_ucs4_tcl=yes
16970
16971else
16972 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016973cat conftest.$ac_ext >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016974fi
16975rm -f conftest.$ac_objext conftest.$ac_ext
16976echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
16977echo "${ECHO_T}$have_ucs4_tcl" >&6
16978
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016979if test "$wchar_h" = yes
16980then
16981 # check whether wchar_t is signed or not
16982 echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
16983echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6
16984 if test "${ac_cv_wchar_t_signed+set}" = set; then
16985 echo $ECHO_N "(cached) $ECHO_C" >&6
16986else
16987
16988 if test "$cross_compiling" = yes; then
16989 ac_cv_wchar_t_signed=yes
16990else
16991 cat >conftest.$ac_ext <<_ACEOF
16992#line $LINENO "configure"
16993#include "confdefs.h"
16994
16995 #include <wchar.h>
16996 int main()
16997 {
16998 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 1 : 0);
16999 }
17000
17001_ACEOF
17002rm -f conftest$ac_exeext
17003if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17004 (eval $ac_link) 2>&5
17005 ac_status=$?
17006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17007 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17009 (eval $ac_try) 2>&5
17010 ac_status=$?
17011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17012 (exit $ac_status); }; }; then
17013 ac_cv_wchar_t_signed=yes
17014else
17015 echo "$as_me: program exited with status $ac_status" >&5
17016echo "$as_me: failed program was:" >&5
17017cat conftest.$ac_ext >&5
17018( exit $ac_status )
17019ac_cv_wchar_t_signed=no
17020fi
17021rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17022fi
17023fi
17024
17025 echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
17026echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6
17027fi
17028
Martin v. Löwis11437992002-04-12 09:54:03 +000017029echo "$as_me:$LINENO: checking what type to use for unicode" >&5
17030echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017031# Check whether --enable-unicode or --disable-unicode was given.
17032if test "${enable_unicode+set}" = set; then
17033 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000017034
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017035else
17036 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000017037fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017038
17039if test $enable_unicode = yes
17040then
Martin v. Löwisfd917792001-06-27 20:22:04 +000017041 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017042 case "$have_ucs4_tcl" in
17043 yes) enable_unicode="ucs4"
17044 ;;
17045 *) enable_unicode="ucs2"
17046 ;;
17047 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017048fi
17049
Martin v. Löwis0036cba2002-04-12 09:58:45 +000017050
17051
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017052case "$enable_unicode" in
17053ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000017054 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017055#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000017056_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017057
17058 ;;
17059ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000017060 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017061#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000017062_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017063
17064 ;;
17065esac
17066
Michael W. Hudson54241132001-12-07 15:38:26 +000017067
Martin v. Löwis11437992002-04-12 09:54:03 +000017068
17069
Martin v. Löwis0036cba2002-04-12 09:58:45 +000017070
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017071if test "$enable_unicode" = "no"
17072then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000017073 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000017074 echo "$as_me:$LINENO: result: not used" >&5
17075echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017076else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000017077 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000017078
17079cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017080#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017081_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017082
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017083
17084 # wchar_t is only usable if it maps to an unsigned type
17085 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
17086 -a "$ac_cv_wchar_t_signed" == "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017087 then
17088 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017089
Martin v. Löwis11437992002-04-12 09:54:03 +000017090cat >>confdefs.h <<\_ACEOF
17091#define HAVE_USABLE_WCHAR_T 1
17092_ACEOF
17093
17094 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017095#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000017096_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017097
17098 elif test "$ac_cv_sizeof_short" = "$unicode_size"
17099 then
17100 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000017101 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017102#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000017103_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017104
17105 elif test "$ac_cv_sizeof_long" = "$unicode_size"
17106 then
17107 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000017108 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017109#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000017110_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017111
17112 else
17113 PY_UNICODE_TYPE="no type found"
17114 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017115 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
17116echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017117fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017118
17119# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017120echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
17121echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
17122if test "${ac_cv_c_bigendian+set}" = set; then
17123 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000017124else
Martin v. Löwis11437992002-04-12 09:54:03 +000017125 # See if sys/param.h defines the BYTE_ORDER macro.
17126cat >conftest.$ac_ext <<_ACEOF
17127#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017128#include "confdefs.h"
Guido van Rossumef2255b2000-03-10 22:30:29 +000017129#include <sys/types.h>
17130#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017131
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017132#ifdef F77_DUMMY_MAIN
17133# ifdef __cplusplus
17134 extern "C"
17135# endif
17136 int F77_DUMMY_MAIN() { return 1; }
17137#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017138int
17139main ()
17140{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017141#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
17142 bogus endian macros
17143#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017144
17145 ;
17146 return 0;
17147}
17148_ACEOF
17149rm -f conftest.$ac_objext
17150if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17151 (eval $ac_compile) 2>&5
17152 ac_status=$?
17153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17154 (exit $ac_status); } &&
17155 { ac_try='test -s conftest.$ac_objext'
17156 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17157 (eval $ac_try) 2>&5
17158 ac_status=$?
17159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17160 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017161 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000017162cat >conftest.$ac_ext <<_ACEOF
17163#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017164#include "confdefs.h"
Guido van Rossumef2255b2000-03-10 22:30:29 +000017165#include <sys/types.h>
17166#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017167
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017168#ifdef F77_DUMMY_MAIN
17169# ifdef __cplusplus
17170 extern "C"
17171# endif
17172 int F77_DUMMY_MAIN() { return 1; }
17173#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017174int
17175main ()
17176{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017177#if BYTE_ORDER != BIG_ENDIAN
17178 not big endian
17179#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017180
17181 ;
17182 return 0;
17183}
17184_ACEOF
17185rm -f conftest.$ac_objext
17186if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17187 (eval $ac_compile) 2>&5
17188 ac_status=$?
17189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17190 (exit $ac_status); } &&
17191 { ac_try='test -s conftest.$ac_objext'
17192 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17193 (eval $ac_try) 2>&5
17194 ac_status=$?
17195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17196 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017197 ac_cv_c_bigendian=yes
17198else
Martin v. Löwis11437992002-04-12 09:54:03 +000017199 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017200cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017201ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000017202fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017203rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000017204else
Martin v. Löwis11437992002-04-12 09:54:03 +000017205 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017206cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017207# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000017208if test "$cross_compiling" = yes; then
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017209 # try to guess the endianess by grep'ing values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000017210 ac_cv_c_bigendian=unknown
17211 cat >conftest.$ac_ext <<_ACEOF
17212#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017213#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000017214short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
17215short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
17216void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
17217short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
17218short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
17219void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017220#ifdef F77_DUMMY_MAIN
17221# ifdef __cplusplus
17222 extern "C"
17223# endif
17224 int F77_DUMMY_MAIN() { return 1; }
17225#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017226int
17227main ()
17228{
17229 _ascii (); _ebcdic ();
17230 ;
17231 return 0;
17232}
17233_ACEOF
17234rm -f conftest.$ac_objext
17235if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17236 (eval $ac_compile) 2>&5
17237 ac_status=$?
17238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17239 (exit $ac_status); } &&
17240 { ac_try='test -s conftest.$ac_objext'
17241 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17242 (eval $ac_try) 2>&5
17243 ac_status=$?
17244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17245 (exit $ac_status); }; }; then
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017246 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017247 ac_cv_c_bigendian=yes
17248fi
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017249if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017250 if test "$ac_cv_c_bigendian" = unknown; then
17251 ac_cv_c_bigendian=no
17252 else
17253 # finding both strings is unlikely to happen, but who knows?
17254 ac_cv_c_bigendian=unknown
17255 fi
17256fi
17257else
17258 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017259cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017260fi
17261rm -f conftest.$ac_objext conftest.$ac_ext
17262else
17263 cat >conftest.$ac_ext <<_ACEOF
17264#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017265#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000017266int
17267main ()
17268{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017269 /* Are we little or big endian? From Harbison&Steele. */
17270 union
17271 {
17272 long l;
17273 char c[sizeof (long)];
17274 } u;
17275 u.l = 1;
17276 exit (u.c[sizeof (long) - 1] == 1);
17277}
Martin v. Löwis11437992002-04-12 09:54:03 +000017278_ACEOF
17279rm -f conftest$ac_exeext
17280if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17281 (eval $ac_link) 2>&5
17282 ac_status=$?
17283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17284 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17285 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17286 (eval $ac_try) 2>&5
17287 ac_status=$?
17288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17289 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017290 ac_cv_c_bigendian=no
17291else
Martin v. Löwis11437992002-04-12 09:54:03 +000017292 echo "$as_me: program exited with status $ac_status" >&5
17293echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017294cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017295( exit $ac_status )
17296ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000017297fi
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017298rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000017299fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017300fi
17301rm -f conftest.$ac_objext conftest.$ac_ext
17302fi
17303echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
17304echo "${ECHO_T}$ac_cv_c_bigendian" >&6
17305case $ac_cv_c_bigendian in
17306 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000017307
Martin v. Löwis11437992002-04-12 09:54:03 +000017308cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000017309#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017310_ACEOF
17311 ;;
17312 no)
17313 ;;
17314 *)
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017315 { { echo "$as_me:$LINENO: error: unknown endianess
Martin v. Löwis11437992002-04-12 09:54:03 +000017316presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017317echo "$as_me: error: unknown endianess
Martin v. Löwis11437992002-04-12 09:54:03 +000017318presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
17319 { (exit 1); exit 1; }; } ;;
17320esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000017321
Michael W. Hudson54241132001-12-07 15:38:26 +000017322
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017323# Check whether right shifting a negative integer extends the sign bit
17324# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000017325echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
17326echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
17327if test "${ac_cv_rshift_extends_sign+set}" = set; then
17328 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000017329else
Martin v. Löwis11437992002-04-12 09:54:03 +000017330
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017331if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017332 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017333else
Martin v. Löwis11437992002-04-12 09:54:03 +000017334 cat >conftest.$ac_ext <<_ACEOF
17335#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017336#include "confdefs.h"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017337
17338int main()
17339{
Vladimir Marangozova6180282000-07-12 05:05:06 +000017340 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017341}
17342
Martin v. Löwis11437992002-04-12 09:54:03 +000017343_ACEOF
17344rm -f conftest$ac_exeext
17345if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17346 (eval $ac_link) 2>&5
17347 ac_status=$?
17348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17349 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17351 (eval $ac_try) 2>&5
17352 ac_status=$?
17353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17354 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000017355 ac_cv_rshift_extends_sign=yes
17356else
Martin v. Löwis11437992002-04-12 09:54:03 +000017357 echo "$as_me: program exited with status $ac_status" >&5
17358echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017359cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017360( exit $ac_status )
17361ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000017362fi
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017363rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017364fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000017365fi
17366
Martin v. Löwis11437992002-04-12 09:54:03 +000017367echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
17368echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000017369if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017370then
Martin v. Löwis11437992002-04-12 09:54:03 +000017371
17372cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017373#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017374_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017375
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017376fi
17377
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017378# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017379echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
17380echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
17381if test "${ac_cv_have_getc_unlocked+set}" = set; then
17382 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017383else
Martin v. Löwis11437992002-04-12 09:54:03 +000017384
17385cat >conftest.$ac_ext <<_ACEOF
17386#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017387#include "confdefs.h"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017388#include <stdio.h>
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017389#ifdef F77_DUMMY_MAIN
17390# ifdef __cplusplus
17391 extern "C"
17392# endif
17393 int F77_DUMMY_MAIN() { return 1; }
17394#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017395int
17396main ()
17397{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017398
17399 FILE *f = fopen("/dev/null", "r");
17400 flockfile(f);
17401 getc_unlocked(f);
17402 funlockfile(f);
17403
Martin v. Löwis11437992002-04-12 09:54:03 +000017404 ;
17405 return 0;
17406}
17407_ACEOF
17408rm -f conftest.$ac_objext conftest$ac_exeext
17409if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17410 (eval $ac_link) 2>&5
17411 ac_status=$?
17412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17413 (exit $ac_status); } &&
17414 { ac_try='test -s conftest$ac_exeext'
17415 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17416 (eval $ac_try) 2>&5
17417 ac_status=$?
17418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17419 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017420 ac_cv_have_getc_unlocked=yes
17421else
Martin v. Löwis11437992002-04-12 09:54:03 +000017422 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017423cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017424ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017425fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017426rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017427fi
17428
Martin v. Löwis11437992002-04-12 09:54:03 +000017429echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
17430echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017431if test "$ac_cv_have_getc_unlocked" = yes
17432then
Martin v. Löwis11437992002-04-12 09:54:03 +000017433
17434cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017435#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017436_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017437
17438fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017439
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017440# check for readline 2.2
17441cat >conftest.$ac_ext <<_ACEOF
17442#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017443#include "confdefs.h"
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017444#include <readline/readline.h>
17445_ACEOF
17446if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17447 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17448 ac_status=$?
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017449 egrep -v '^ *\+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017450 rm -f conftest.er1
17451 cat conftest.err >&5
17452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17453 (exit $ac_status); } >/dev/null; then
17454 if test -s conftest.err; then
17455 ac_cpp_err=$ac_c_preproc_warn_flag
17456 else
17457 ac_cpp_err=
17458 fi
17459else
17460 ac_cpp_err=yes
17461fi
17462if test -z "$ac_cpp_err"; then
17463 have_readline=yes
17464else
17465 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017466 cat conftest.$ac_ext >&5
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017467 have_readline=no
17468fi
17469rm -f conftest.err conftest.$ac_ext
17470if test $have_readline = yes
17471then
17472 cat >conftest.$ac_ext <<_ACEOF
17473#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017474#include "confdefs.h"
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017475#include <readline/readline.h>
17476
17477_ACEOF
17478if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017479 egrep "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017480
17481cat >>confdefs.h <<\_ACEOF
17482#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
17483_ACEOF
17484
17485fi
17486rm -f conftest*
17487
17488fi
17489
Martin v. Löwis0daad592001-09-30 21:09:59 +000017490# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000017491echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
17492echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
17493if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
17494 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000017495else
Martin v. Löwis11437992002-04-12 09:54:03 +000017496 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000017497LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017498cat >conftest.$ac_ext <<_ACEOF
17499#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017500#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000017501
Guido van Rossum353ae582001-07-10 16:45:32 +000017502/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017503#ifdef __cplusplus
17504extern "C"
17505#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000017506/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017507 builtin and then its argument prototype would still apply. */
17508char rl_pre_input_hook ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017509#ifdef F77_DUMMY_MAIN
17510# ifdef __cplusplus
17511 extern "C"
17512# endif
17513 int F77_DUMMY_MAIN() { return 1; }
17514#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017515int
17516main ()
17517{
17518rl_pre_input_hook ();
17519 ;
17520 return 0;
17521}
17522_ACEOF
17523rm -f conftest.$ac_objext conftest$ac_exeext
17524if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17525 (eval $ac_link) 2>&5
17526 ac_status=$?
17527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17528 (exit $ac_status); } &&
17529 { ac_try='test -s conftest$ac_exeext'
17530 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17531 (eval $ac_try) 2>&5
17532 ac_status=$?
17533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17534 (exit $ac_status); }; }; then
17535 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000017536else
Martin v. Löwis11437992002-04-12 09:54:03 +000017537 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017538cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017539ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000017540fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017541rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17542LIBS=$ac_check_lib_save_LIBS
17543fi
17544echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
17545echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
17546if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017547
Martin v. Löwis11437992002-04-12 09:54:03 +000017548cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017549#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017550_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017551
Martin v. Löwis0daad592001-09-30 21:09:59 +000017552fi
17553
Michael W. Hudson54241132001-12-07 15:38:26 +000017554
Martin v. Löwis0daad592001-09-30 21:09:59 +000017555# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000017556echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
17557echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
17558if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
17559 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000017560else
Martin v. Löwis11437992002-04-12 09:54:03 +000017561 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000017562LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017563cat >conftest.$ac_ext <<_ACEOF
17564#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017565#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000017566
Martin v. Löwis0daad592001-09-30 21:09:59 +000017567/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017568#ifdef __cplusplus
17569extern "C"
17570#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000017571/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017572 builtin and then its argument prototype would still apply. */
17573char rl_completion_matches ();
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017574#ifdef F77_DUMMY_MAIN
17575# ifdef __cplusplus
17576 extern "C"
17577# endif
17578 int F77_DUMMY_MAIN() { return 1; }
17579#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017580int
17581main ()
17582{
17583rl_completion_matches ();
17584 ;
17585 return 0;
17586}
17587_ACEOF
17588rm -f conftest.$ac_objext conftest$ac_exeext
17589if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17590 (eval $ac_link) 2>&5
17591 ac_status=$?
17592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17593 (exit $ac_status); } &&
17594 { ac_try='test -s conftest$ac_exeext'
17595 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17596 (eval $ac_try) 2>&5
17597 ac_status=$?
17598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17599 (exit $ac_status); }; }; then
17600 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000017601else
Martin v. Löwis11437992002-04-12 09:54:03 +000017602 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017603cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017604ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000017605fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017606rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17607LIBS=$ac_check_lib_save_LIBS
17608fi
17609echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
17610echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
17611if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017612
Martin v. Löwis11437992002-04-12 09:54:03 +000017613cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017614#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017615_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017616
Guido van Rossum353ae582001-07-10 16:45:32 +000017617fi
17618
Jack Jansendd19cf82001-12-06 22:36:17 +000017619
Martin v. Löwis11437992002-04-12 09:54:03 +000017620echo "$as_me:$LINENO: checking for broken nice()" >&5
17621echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
17622if test "${ac_cv_broken_nice+set}" = set; then
17623 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017624else
Martin v. Löwis11437992002-04-12 09:54:03 +000017625
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017626if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017627 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017628else
Martin v. Löwis11437992002-04-12 09:54:03 +000017629 cat >conftest.$ac_ext <<_ACEOF
17630#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017631#include "confdefs.h"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017632
17633int main()
17634{
17635 int val1 = nice(1);
17636 if (val1 != -1 && val1 == nice(2))
17637 exit(0);
17638 exit(1);
17639}
17640
Martin v. Löwis11437992002-04-12 09:54:03 +000017641_ACEOF
17642rm -f conftest$ac_exeext
17643if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17644 (eval $ac_link) 2>&5
17645 ac_status=$?
17646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17647 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17649 (eval $ac_try) 2>&5
17650 ac_status=$?
17651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17652 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017653 ac_cv_broken_nice=yes
17654else
Martin v. Löwis11437992002-04-12 09:54:03 +000017655 echo "$as_me: program exited with status $ac_status" >&5
17656echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017657cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017658( exit $ac_status )
17659ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017660fi
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017661rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017662fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017663fi
17664
Martin v. Löwis11437992002-04-12 09:54:03 +000017665echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
17666echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017667if test "$ac_cv_broken_nice" = yes
17668then
Martin v. Löwis11437992002-04-12 09:54:03 +000017669
17670cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017671#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017672_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017673
17674fi
17675
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017676# tzset(3) exists and works like we expect it to
17677echo "$as_me:$LINENO: checking for working tzset()" >&5
17678echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
17679if test "${ac_cv_working_tzset+set}" = set; then
17680 echo $ECHO_N "(cached) $ECHO_C" >&6
17681else
17682
17683if test "$cross_compiling" = yes; then
17684 ac_cv_working_tzset=no
17685else
17686 cat >conftest.$ac_ext <<_ACEOF
17687#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017688#include "confdefs.h"
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017689
17690#include <stdlib.h>
17691#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000017692#include <string.h>
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017693int main()
17694{
Brett Cannon18367812003-09-19 00:59:16 +000017695 /* Note that we need to ensure that not only does tzset(3)
17696 do 'something' with localtime, but it works as documented
17697 in the library reference and as expected by the test suite.
17698
17699 Red Hat 6.2 doesn't understand the southern hemisphere
17700 after New Year's Day; it thinks swaps on that day.
17701 */
17702
17703 time_t groundhogday = 1044144000; /* GMT-based; well, it's a colony */
17704 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
17705
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017706 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017707 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000017708 if (localtime(&groundhogday)->tm_hour != 0)
17709 exit(1);
17710
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017711 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017712 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000017713 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017714 exit(1);
Brett Cannon18367812003-09-19 00:59:16 +000017715
17716 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
17717 tzset();
17718 if (localtime(&groundhogday)->tm_hour != 11)
17719 exit(1);
17720 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
17721 exit(1);
17722 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
17723 exit(1);
17724
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017725 exit(0);
17726}
17727
17728_ACEOF
17729rm -f conftest$ac_exeext
17730if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17731 (eval $ac_link) 2>&5
17732 ac_status=$?
17733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17734 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17736 (eval $ac_try) 2>&5
17737 ac_status=$?
17738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17739 (exit $ac_status); }; }; then
17740 ac_cv_working_tzset=yes
17741else
17742 echo "$as_me: program exited with status $ac_status" >&5
17743echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017744cat conftest.$ac_ext >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017745( exit $ac_status )
17746ac_cv_working_tzset=no
17747fi
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017748rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017749fi
17750fi
17751
17752echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
17753echo "${ECHO_T}$ac_cv_working_tzset" >&6
17754if test "$ac_cv_working_tzset" = yes
17755then
17756
17757cat >>confdefs.h <<\_ACEOF
17758#define HAVE_WORKING_TZSET 1
17759_ACEOF
17760
17761fi
17762
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017763# Look for subsecond timestamps in struct stat
17764echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
17765echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
17766if test "${ac_cv_stat_tv_nsec+set}" = set; then
17767 echo $ECHO_N "(cached) $ECHO_C" >&6
17768else
17769 cat >conftest.$ac_ext <<_ACEOF
17770#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017771#include "confdefs.h"
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017772#include <sys/stat.h>
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017773#ifdef F77_DUMMY_MAIN
17774# ifdef __cplusplus
17775 extern "C"
17776# endif
17777 int F77_DUMMY_MAIN() { return 1; }
17778#endif
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017779int
17780main ()
17781{
17782
17783struct stat st;
17784st.st_mtim.tv_nsec = 1;
17785
17786 ;
17787 return 0;
17788}
17789_ACEOF
17790rm -f conftest.$ac_objext
17791if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17792 (eval $ac_compile) 2>&5
17793 ac_status=$?
17794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17795 (exit $ac_status); } &&
17796 { ac_try='test -s conftest.$ac_objext'
17797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17798 (eval $ac_try) 2>&5
17799 ac_status=$?
17800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17801 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000017802 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017803else
17804 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017805cat conftest.$ac_ext >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017806ac_cv_stat_tv_nsec=no
17807fi
17808rm -f conftest.$ac_objext conftest.$ac_ext
17809fi
17810
17811echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
17812echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
17813if test "$ac_cv_stat_tv_nsec" = yes
17814then
17815
17816cat >>confdefs.h <<\_ACEOF
17817#define HAVE_STAT_TV_NSEC 1
17818_ACEOF
17819
17820fi
17821
Jack Jansen666b1e72001-10-31 12:11:48 +000017822# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000017823echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
17824echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
17825if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
17826 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017827else
Martin v. Löwis11437992002-04-12 09:54:03 +000017828 cat >conftest.$ac_ext <<_ACEOF
17829#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017830#include "confdefs.h"
Jack Jansen666b1e72001-10-31 12:11:48 +000017831#include <curses.h>
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017832#ifdef F77_DUMMY_MAIN
17833# ifdef __cplusplus
17834 extern "C"
17835# endif
17836 int F77_DUMMY_MAIN() { return 1; }
17837#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017838int
17839main ()
17840{
Jack Jansen666b1e72001-10-31 12:11:48 +000017841
17842 int rtn;
17843 rtn = mvwdelch(0,0,0);
17844
Martin v. Löwis11437992002-04-12 09:54:03 +000017845 ;
17846 return 0;
17847}
17848_ACEOF
17849rm -f conftest.$ac_objext
17850if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17851 (eval $ac_compile) 2>&5
17852 ac_status=$?
17853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17854 (exit $ac_status); } &&
17855 { ac_try='test -s conftest.$ac_objext'
17856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17857 (eval $ac_try) 2>&5
17858 ac_status=$?
17859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17860 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017861 ac_cv_mvwdelch_is_expression=yes
17862else
Martin v. Löwis11437992002-04-12 09:54:03 +000017863 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017864cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017865ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017866fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017867rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017868fi
17869
Martin v. Löwis11437992002-04-12 09:54:03 +000017870echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
17871echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017872
17873if test "$ac_cv_mvwdelch_is_expression" = yes
17874then
Martin v. Löwis11437992002-04-12 09:54:03 +000017875
17876cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017877#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017878_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017879
17880fi
17881
Martin v. Löwis11437992002-04-12 09:54:03 +000017882echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
17883echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
17884if test "${ac_cv_window_has_flags+set}" = set; then
17885 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017886else
Martin v. Löwis11437992002-04-12 09:54:03 +000017887 cat >conftest.$ac_ext <<_ACEOF
17888#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017889#include "confdefs.h"
Jack Jansen666b1e72001-10-31 12:11:48 +000017890#include <curses.h>
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017891#ifdef F77_DUMMY_MAIN
17892# ifdef __cplusplus
17893 extern "C"
17894# endif
17895 int F77_DUMMY_MAIN() { return 1; }
17896#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017897int
17898main ()
17899{
Jack Jansen666b1e72001-10-31 12:11:48 +000017900
17901 WINDOW *w;
17902 w->_flags = 0;
17903
Martin v. Löwis11437992002-04-12 09:54:03 +000017904 ;
17905 return 0;
17906}
17907_ACEOF
17908rm -f conftest.$ac_objext
17909if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17910 (eval $ac_compile) 2>&5
17911 ac_status=$?
17912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17913 (exit $ac_status); } &&
17914 { ac_try='test -s conftest.$ac_objext'
17915 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17916 (eval $ac_try) 2>&5
17917 ac_status=$?
17918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17919 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017920 ac_cv_window_has_flags=yes
17921else
Martin v. Löwis11437992002-04-12 09:54:03 +000017922 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017923cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017924ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017925fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017926rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017927fi
17928
Martin v. Löwis11437992002-04-12 09:54:03 +000017929echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
17930echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017931
Jack Jansen666b1e72001-10-31 12:11:48 +000017932
17933if test "$ac_cv_window_has_flags" = yes
17934then
Martin v. Löwis11437992002-04-12 09:54:03 +000017935
17936cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017937#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017938_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017939
17940fi
17941
Martin v. Löwis24a880b2002-12-31 12:55:15 +000017942echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
17943echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
17944
17945if test -e /dev/ptmx
17946then
17947 echo "$as_me:$LINENO: result: yes" >&5
17948echo "${ECHO_T}yes" >&6
17949
17950cat >>confdefs.h <<\_ACEOF
17951#define HAVE_DEV_PTMX 1
17952_ACEOF
17953
17954else
17955 echo "$as_me:$LINENO: result: no" >&5
17956echo "${ECHO_T}no" >&6
17957fi
17958
Neal Norwitz865400f2003-03-21 01:42:58 +000017959echo "$as_me:$LINENO: checking for /dev/ptc" >&5
17960echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
17961
17962if test -e /dev/ptc
17963then
17964 echo "$as_me:$LINENO: result: yes" >&5
17965echo "${ECHO_T}yes" >&6
17966
17967cat >>confdefs.h <<\_ACEOF
17968#define HAVE_DEV_PTC 1
17969_ACEOF
17970
17971else
17972 echo "$as_me:$LINENO: result: no" >&5
17973echo "${ECHO_T}no" >&6
17974fi
17975
Martin v. Löwis11437992002-04-12 09:54:03 +000017976echo "$as_me:$LINENO: checking for socklen_t" >&5
17977echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
17978if test "${ac_cv_type_socklen_t+set}" = set; then
17979 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000017980else
Martin v. Löwis11437992002-04-12 09:54:03 +000017981 cat >conftest.$ac_ext <<_ACEOF
17982#line $LINENO "configure"
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017983#include "confdefs.h"
Martin v. Löwis01c04012002-11-11 14:58:44 +000017984
17985#ifdef HAVE_SYS_TYPES_H
17986#include <sys/types.h>
17987#endif
17988#ifdef HAVE_SYS_SOCKET_H
17989#include <sys/socket.h>
17990#endif
17991
17992
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017993#ifdef F77_DUMMY_MAIN
17994# ifdef __cplusplus
17995 extern "C"
17996# endif
17997 int F77_DUMMY_MAIN() { return 1; }
17998#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017999int
18000main ()
18001{
18002if ((socklen_t *) 0)
18003 return 0;
18004if (sizeof (socklen_t))
18005 return 0;
18006 ;
18007 return 0;
18008}
18009_ACEOF
18010rm -f conftest.$ac_objext
18011if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18012 (eval $ac_compile) 2>&5
18013 ac_status=$?
18014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18015 (exit $ac_status); } &&
18016 { ac_try='test -s conftest.$ac_objext'
18017 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18018 (eval $ac_try) 2>&5
18019 ac_status=$?
18020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18021 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000018022 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000018023else
Martin v. Löwis11437992002-04-12 09:54:03 +000018024 echo "$as_me: failed program was:" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018025cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018026ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000018027fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018028rm -f conftest.$ac_objext conftest.$ac_ext
18029fi
18030echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
18031echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
18032if test $ac_cv_type_socklen_t = yes; then
18033 :
18034else
Guido van Rossum95713eb2000-05-18 20:53:31 +000018035
Martin v. Löwis01c04012002-11-11 14:58:44 +000018036cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000018037#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000018038_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000018039
18040fi
18041
Michael W. Hudson54241132001-12-07 15:38:26 +000018042
Michael W. Hudson54241132001-12-07 15:38:26 +000018043
18044
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000018045for h in `(cd $srcdir;echo Python/thread_*.h)`
18046do
18047 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
18048done
18049
Michael W. Hudson54241132001-12-07 15:38:26 +000018050
Jack Jansen0b06be72002-06-21 14:48:38 +000018051SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000018052echo "$as_me:$LINENO: checking for build directories" >&5
18053echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000018054for dir in $SRCDIRS; do
18055 if test ! -d $dir; then
18056 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000018057 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000018058done
Martin v. Löwis11437992002-04-12 09:54:03 +000018059echo "$as_me:$LINENO: result: done" >&5
18060echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000018061
Guido van Rossum627b2d71993-12-24 10:39:16 +000018062# generate output files
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018063ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000018064
Martin v. Löwis11437992002-04-12 09:54:03 +000018065cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018066# This file is a shell script that caches the results of configure
18067# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000018068# scripts and configure runs, see configure's option --config-cache.
18069# It is not useful on other systems. If it contains results you don't
18070# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018071#
Martin v. Löwis11437992002-04-12 09:54:03 +000018072# config.status only pays attention to the cache file if you give it
18073# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018074#
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018075# `ac_cv_env_foo' variables (set or unset) will be overriden when
Martin v. Löwis11437992002-04-12 09:54:03 +000018076# loading this file, other *unset* `ac_cv_foo' will be assigned the
18077# following values.
18078
18079_ACEOF
18080
Guido van Rossumf78abae1997-01-21 22:02:36 +000018081# The following way of writing the cache mishandles newlines in values,
18082# but we know of no workaround that is simple, portable, and efficient.
18083# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018084# Ultrix sh set writes to stderr and can't be redirected directly,
18085# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000018086{
18087 (set) 2>&1 |
18088 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18089 *ac_space=\ *)
18090 # `set' does not quote correctly, so add quotes (double-quote
18091 # substitution turns \\\\ into \\, and sed turns \\ into \).
18092 sed -n \
18093 "s/'/'\\\\''/g;
18094 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18095 ;;
18096 *)
18097 # `set' quotes correctly as required by POSIX, so do not add quotes.
18098 sed -n \
18099 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18100 ;;
18101 esac;
18102} |
18103 sed '
18104 t clear
18105 : clear
18106 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18107 t end
18108 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18109 : end' >>confcache
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018110if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018111 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018112 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18113 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018114 else
18115 echo "not updating unwritable cache $cache_file"
18116 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018117fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018118rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000018119
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018120test "x$prefix" = xNONE && prefix=$ac_default_prefix
18121# Let make expand exec_prefix.
18122test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000018123
Martin v. Löwis11437992002-04-12 09:54:03 +000018124# VPATH may cause trouble with some makes, so we remove $(srcdir),
18125# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18126# trailing colons and then remove the whole line if VPATH becomes empty
18127# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000018128if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018129 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18130s/:*\$(srcdir):*/:/;
18131s/:*\${srcdir}:*/:/;
18132s/:*@srcdir@:*/:/;
18133s/^\([^=]*=[ ]*\):*/\1/;
18134s/:*$//;
18135s/^[^=]*=[ ]*$//;
18136}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018137fi
18138
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018139DEFS=-DHAVE_CONFIG_H
18140
Martin v. Löwis11437992002-04-12 09:54:03 +000018141
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018142: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000018143ac_clean_files_save=$ac_clean_files
18144ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18145{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
18146echo "$as_me: creating $CONFIG_STATUS" >&6;}
18147cat >$CONFIG_STATUS <<_ACEOF
18148#! $SHELL
18149# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018150# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018151# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000018152# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018153
Martin v. Löwis11437992002-04-12 09:54:03 +000018154debug=false
18155SHELL=\${CONFIG_SHELL-$SHELL}
18156_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000018157
Martin v. Löwis11437992002-04-12 09:54:03 +000018158cat >>$CONFIG_STATUS <<\_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018159
Martin v. Löwis11437992002-04-12 09:54:03 +000018160## --------------------- ##
18161## M4sh Initialization. ##
18162## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000018163
Martin v. Löwis11437992002-04-12 09:54:03 +000018164# Be Bourne compatible
18165if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18166 emulate sh
18167 NULLCMD=:
18168elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18169 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000018170fi
Michael W. Hudson54241132001-12-07 15:38:26 +000018171
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018172# NLS nuisances.
Martin v. Löwis11437992002-04-12 09:54:03 +000018173# Support unset when possible.
18174if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18175 as_unset=unset
18176else
18177 as_unset=false
18178fi
Michael W. Hudson54241132001-12-07 15:38:26 +000018179
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018180(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
18181 { $as_unset LANG || test "${LANG+set}" != set; } ||
18182 { LANG=C; export LANG; }
18183(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
18184 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
18185 { LC_ALL=C; export LC_ALL; }
18186(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
18187 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
18188 { LC_TIME=C; export LC_TIME; }
18189(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
18190 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
18191 { LC_CTYPE=C; export LC_CTYPE; }
18192(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
18193 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
18194 { LANGUAGE=C; export LANGUAGE; }
18195(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
18196 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
18197 { LC_COLLATE=C; export LC_COLLATE; }
18198(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
18199 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
18200 { LC_NUMERIC=C; export LC_NUMERIC; }
18201(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
18202 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
18203 { LC_MESSAGES=C; export LC_MESSAGES; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018204
18205
18206# Name of the executable.
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018207as_me=`(basename "$0") 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018208$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18209 X"$0" : 'X\(//\)$' \| \
18210 X"$0" : 'X\(/\)$' \| \
18211 . : '\(.\)' 2>/dev/null ||
18212echo X/"$0" |
18213 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
18214 /^X\/\(\/\/\)$/{ s//\1/; q; }
18215 /^X\/\(\/\).*/{ s//\1/; q; }
18216 s/.*/./; q'`
18217
18218# PATH needs CR, and LINENO needs CR and PATH.
18219# Avoid depending upon Character Ranges.
18220as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18221as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18222as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18223as_cr_digits='0123456789'
18224as_cr_alnum=$as_cr_Letters$as_cr_digits
18225
18226# The user is always right.
18227if test "${PATH_SEPARATOR+set}" != set; then
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018228 echo "#! /bin/sh" >conftest.sh
18229 echo "exit 0" >>conftest.sh
18230 chmod +x conftest.sh
18231 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018232 PATH_SEPARATOR=';'
18233 else
18234 PATH_SEPARATOR=:
18235 fi
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018236 rm -f conftest.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018237fi
18238
18239
18240 as_lineno_1=$LINENO
18241 as_lineno_2=$LINENO
18242 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18243 test "x$as_lineno_1" != "x$as_lineno_2" &&
18244 test "x$as_lineno_3" = "x$as_lineno_2" || {
18245 # Find who we are. Look in the path if we contain no path at all
18246 # relative or not.
18247 case $0 in
18248 *[\\/]* ) as_myself=$0 ;;
18249 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18250for as_dir in $PATH
18251do
18252 IFS=$as_save_IFS
18253 test -z "$as_dir" && as_dir=.
18254 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18255done
18256
18257 ;;
18258 esac
18259 # We did not find ourselves, most probably we were run as `sh COMMAND'
18260 # in which case we are not to be found in the path.
18261 if test "x$as_myself" = x; then
18262 as_myself=$0
18263 fi
18264 if test ! -f "$as_myself"; then
18265 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
18266echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
18267 { (exit 1); exit 1; }; }
18268 fi
18269 case $CONFIG_SHELL in
18270 '')
18271 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18272for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
18273do
18274 IFS=$as_save_IFS
18275 test -z "$as_dir" && as_dir=.
18276 for as_base in sh bash ksh sh5; do
18277 case $as_dir in
18278 /*)
18279 if ("$as_dir/$as_base" -c '
18280 as_lineno_1=$LINENO
18281 as_lineno_2=$LINENO
18282 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18283 test "x$as_lineno_1" != "x$as_lineno_2" &&
18284 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
18285 CONFIG_SHELL=$as_dir/$as_base
18286 export CONFIG_SHELL
18287 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
18288 fi;;
18289 esac
18290 done
18291done
18292;;
Jack Jansendd19cf82001-12-06 22:36:17 +000018293 esac
18294
Martin v. Löwis11437992002-04-12 09:54:03 +000018295 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
18296 # uniformly replaced by the line number. The first 'sed' inserts a
18297 # line-number line before each line; the second 'sed' does the real
18298 # work. The second script uses 'N' to pair each line-number line
18299 # with the numbered line, and appends trailing '-' during
18300 # substitution so that $LINENO is not a special case at line end.
18301 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
18302 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
18303 sed '=' <$as_myself |
18304 sed '
18305 N
18306 s,$,-,
18307 : loop
18308 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
18309 t loop
18310 s,-$,,
18311 s,^['$as_cr_digits']*\n,,
18312 ' >$as_me.lineno &&
18313 chmod +x $as_me.lineno ||
18314 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
18315echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
18316 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018317
Martin v. Löwis11437992002-04-12 09:54:03 +000018318 # Don't try to exec as it changes $[0], causing all sort of problems
18319 # (the dirname of $[0] is not the place where we might find the
18320 # original and so on. Autoconf is especially sensible to this).
18321 . ./$as_me.lineno
18322 # Exit status is that of the last command.
18323 exit
18324}
18325
18326
18327case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
18328 *c*,-n*) ECHO_N= ECHO_C='
18329' ECHO_T=' ' ;;
18330 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
18331 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
18332esac
18333
18334if expr a : '\(a\)' >/dev/null 2>&1; then
18335 as_expr=expr
18336else
18337 as_expr=false
18338fi
18339
18340rm -f conf$$ conf$$.exe conf$$.file
18341echo >conf$$.file
18342if ln -s conf$$.file conf$$ 2>/dev/null; then
18343 # We could just check for DJGPP; but this test a) works b) is more generic
18344 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18345 if test -f conf$$.exe; then
18346 # Don't use ln at all; we don't have any links
18347 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018348 else
Martin v. Löwis11437992002-04-12 09:54:03 +000018349 as_ln_s='ln -s'
18350 fi
18351elif ln conf$$.file conf$$ 2>/dev/null; then
18352 as_ln_s=ln
18353else
18354 as_ln_s='cp -p'
18355fi
18356rm -f conf$$ conf$$.exe conf$$.file
18357
18358as_executable_p="test -f"
18359
18360# Sed expression to map a string onto a valid CPP name.
18361as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
18362
18363# Sed expression to map a string onto a valid variable name.
18364as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
18365
18366
18367# IFS
18368# We need space, tab and new line, in precisely that order.
18369as_nl='
18370'
18371IFS=" $as_nl"
18372
18373# CDPATH.
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018374$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018375
18376exec 6>&1
18377
18378# Open the log real soon, to keep \$[0] and so on meaningful, and to
18379# report actual input values of CONFIG_FILES etc. instead of their
18380# values after options handling. Logging --version etc. is OK.
18381exec 5>>config.log
18382{
18383 echo
18384 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18385## Running $as_me. ##
18386_ASBOX
18387} >&5
18388cat >&5 <<_CSEOF
18389
Fred Drake9bd44622003-07-30 17:39:48 +000018390This file was extended by python $as_me 2.4, which was
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018391generated by GNU Autoconf 2.53. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018392
18393 CONFIG_FILES = $CONFIG_FILES
18394 CONFIG_HEADERS = $CONFIG_HEADERS
18395 CONFIG_LINKS = $CONFIG_LINKS
18396 CONFIG_COMMANDS = $CONFIG_COMMANDS
18397 $ $0 $@
18398
18399_CSEOF
18400echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
18401echo >&5
18402_ACEOF
18403
18404# Files that config.status was made for.
18405if test -n "$ac_config_files"; then
18406 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18407fi
18408
18409if test -n "$ac_config_headers"; then
18410 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18411fi
18412
18413if test -n "$ac_config_links"; then
18414 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18415fi
18416
18417if test -n "$ac_config_commands"; then
18418 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18419fi
18420
18421cat >>$CONFIG_STATUS <<\_ACEOF
18422
18423ac_cs_usage="\
18424\`$as_me' instantiates files from templates according to the
18425current configuration.
18426
18427Usage: $0 [OPTIONS] [FILE]...
18428
18429 -h, --help print this help, then exit
18430 -V, --version print version number, then exit
18431 -d, --debug don't remove temporary files
18432 --recheck update $as_me by reconfiguring in the same conditions
18433 --file=FILE[:TEMPLATE]
18434 instantiate the configuration file FILE
18435 --header=FILE[:TEMPLATE]
18436 instantiate the configuration header FILE
18437
18438Configuration files:
18439$config_files
18440
18441Configuration headers:
18442$config_headers
18443
18444Report bugs to <bug-autoconf@gnu.org>."
18445_ACEOF
18446
18447cat >>$CONFIG_STATUS <<_ACEOF
18448ac_cs_version="\\
Fred Drake9bd44622003-07-30 17:39:48 +000018449python config.status 2.4
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018450configured by $0, generated by GNU Autoconf 2.53,
Martin v. Löwis11437992002-04-12 09:54:03 +000018451 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18452
18453Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18454Free Software Foundation, Inc.
18455This config.status script is free software; the Free Software Foundation
18456gives unlimited permission to copy, distribute and modify it."
18457srcdir=$srcdir
18458INSTALL="$INSTALL"
18459_ACEOF
18460
18461cat >>$CONFIG_STATUS <<\_ACEOF
18462# If no file are specified by the user, then we need to provide default
18463# value. By we need to know if files were specified by the user.
18464ac_need_defaults=:
18465while test $# != 0
18466do
18467 case $1 in
18468 --*=*)
18469 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18470 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018471 shift
18472 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18473 shift
Martin v. Löwis11437992002-04-12 09:54:03 +000018474 ;;
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018475 -*);;
Martin v. Löwis11437992002-04-12 09:54:03 +000018476 *) # This is not an option, so the user has probably given explicit
18477 # arguments.
18478 ac_need_defaults=false;;
18479 esac
18480
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018481 case $1 in
Martin v. Löwis11437992002-04-12 09:54:03 +000018482 # Handling of the options.
18483_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018484cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +000018485 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018486 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18487 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18488_ACEOF
18489cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018490 --version | --vers* | -V )
18491 echo "$ac_cs_version"; exit 0 ;;
18492 --he | --h)
18493 # Conflict between --help and --header
18494 { { echo "$as_me:$LINENO: error: ambiguous option: $1
18495Try \`$0 --help' for more information." >&5
18496echo "$as_me: error: ambiguous option: $1
18497Try \`$0 --help' for more information." >&2;}
18498 { (exit 1); exit 1; }; };;
18499 --help | --hel | -h )
18500 echo "$ac_cs_usage"; exit 0 ;;
18501 --debug | --d* | -d )
18502 debug=: ;;
18503 --file | --fil | --fi | --f )
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018504 shift
18505 CONFIG_FILES="$CONFIG_FILES $1"
Martin v. Löwis11437992002-04-12 09:54:03 +000018506 ac_need_defaults=false;;
18507 --header | --heade | --head | --hea )
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018508 shift
18509 CONFIG_HEADERS="$CONFIG_HEADERS $1"
Martin v. Löwis11437992002-04-12 09:54:03 +000018510 ac_need_defaults=false;;
18511
18512 # This is an error.
18513 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
18514Try \`$0 --help' for more information." >&5
18515echo "$as_me: error: unrecognized option: $1
18516Try \`$0 --help' for more information." >&2;}
18517 { (exit 1); exit 1; }; } ;;
18518
18519 *) ac_config_targets="$ac_config_targets $1" ;;
18520
18521 esac
18522 shift
18523done
18524
18525_ACEOF
18526
18527
18528
18529
18530
18531cat >>$CONFIG_STATUS <<\_ACEOF
18532for ac_config_target in $ac_config_targets
18533do
18534 case "$ac_config_target" in
18535 # Handling of arguments.
18536 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
18537 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
18538 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18539 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
18540echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18541 { (exit 1); exit 1; }; };;
18542 esac
18543done
18544
18545# If the user did not use the arguments to specify the items to instantiate,
18546# then the envvar interface is used. Set only those that are not.
18547# We use the long form for the default assignment because of an extremely
18548# bizarre bug on SunOS 4.1.3.
18549if $ac_need_defaults; then
18550 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18551 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18552fi
18553
18554# Create a temporary directory, and hook for its removal unless debugging.
18555$debug ||
18556{
18557 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18558 trap '{ (exit 1); exit 1; }' 1 2 13 15
18559}
18560
18561# Create a (secure) tmp directory for tmp files.
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018562: ${TMPDIR=/tmp}
Martin v. Löwis11437992002-04-12 09:54:03 +000018563{
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018564 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018565 test -n "$tmp" && test -d "$tmp"
18566} ||
18567{
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018568 tmp=$TMPDIR/cs$$-$RANDOM
Martin v. Löwis11437992002-04-12 09:54:03 +000018569 (umask 077 && mkdir $tmp)
18570} ||
18571{
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018572 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000018573 { (exit 1); exit 1; }
18574}
18575
18576_ACEOF
18577
18578cat >>$CONFIG_STATUS <<_ACEOF
18579
18580#
18581# CONFIG_FILES section.
18582#
18583
18584# No need to generate the scripts if there are no CONFIG_FILES.
18585# This happens for instance when ./config.status config.h
18586if test -n "\$CONFIG_FILES"; then
18587 # Protect against being on the right side of a sed subst in config.status.
18588 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18589 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18590s,@SHELL@,$SHELL,;t t
18591s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18592s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18593s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18594s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18595s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18596s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18597s,@exec_prefix@,$exec_prefix,;t t
18598s,@prefix@,$prefix,;t t
18599s,@program_transform_name@,$program_transform_name,;t t
18600s,@bindir@,$bindir,;t t
18601s,@sbindir@,$sbindir,;t t
18602s,@libexecdir@,$libexecdir,;t t
18603s,@datadir@,$datadir,;t t
18604s,@sysconfdir@,$sysconfdir,;t t
18605s,@sharedstatedir@,$sharedstatedir,;t t
18606s,@localstatedir@,$localstatedir,;t t
18607s,@libdir@,$libdir,;t t
18608s,@includedir@,$includedir,;t t
18609s,@oldincludedir@,$oldincludedir,;t t
18610s,@infodir@,$infodir,;t t
18611s,@mandir@,$mandir,;t t
18612s,@build_alias@,$build_alias,;t t
18613s,@host_alias@,$host_alias,;t t
18614s,@target_alias@,$target_alias,;t t
18615s,@DEFS@,$DEFS,;t t
18616s,@ECHO_C@,$ECHO_C,;t t
18617s,@ECHO_N@,$ECHO_N,;t t
18618s,@ECHO_T@,$ECHO_T,;t t
18619s,@LIBS@,$LIBS,;t t
18620s,@VERSION@,$VERSION,;t t
18621s,@SOVERSION@,$SOVERSION,;t t
18622s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
18623s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
18624s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
18625s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
18626s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
18627s,@MACHDEP@,$MACHDEP,;t t
18628s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000018629s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000018630s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018631s,@CXX@,$CXX,;t t
18632s,@MAINOBJ@,$MAINOBJ,;t t
18633s,@EXEEXT@,$EXEEXT,;t t
18634s,@CC@,$CC,;t t
18635s,@CFLAGS@,$CFLAGS,;t t
18636s,@LDFLAGS@,$LDFLAGS,;t t
18637s,@CPPFLAGS@,$CPPFLAGS,;t t
18638s,@ac_ct_CC@,$ac_ct_CC,;t t
18639s,@OBJEXT@,$OBJEXT,;t t
18640s,@CPP@,$CPP,;t t
18641s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
18642s,@LIBRARY@,$LIBRARY,;t t
18643s,@LDLIBRARY@,$LDLIBRARY,;t t
18644s,@DLLLIBRARY@,$DLLLIBRARY,;t t
18645s,@BLDLIBRARY@,$BLDLIBRARY,;t t
18646s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
18647s,@INSTSONAME@,$INSTSONAME,;t t
18648s,@RUNSHARED@,$RUNSHARED,;t t
18649s,@LINKCC@,$LINKCC,;t t
18650s,@RANLIB@,$RANLIB,;t t
18651s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18652s,@AR@,$AR,;t t
18653s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18654s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18655s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18656s,@LN@,$LN,;t t
18657s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000018658s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018659s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
18660s,@SO@,$SO,;t t
18661s,@LDSHARED@,$LDSHARED,;t t
18662s,@BLDSHARED@,$BLDSHARED,;t t
18663s,@CCSHARED@,$CCSHARED,;t t
18664s,@LINKFORSHARED@,$LINKFORSHARED,;t t
18665s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018666s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018667s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
18668s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
18669s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
18670s,@LDLAST@,$LDLAST,;t t
18671s,@THREADOBJ@,$THREADOBJ,;t t
18672s,@DLINCLDIR@,$DLINCLDIR,;t t
18673s,@DYNLOADFILE@,$DYNLOADFILE,;t t
18674s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018675s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018676s,@LIBOBJS@,$LIBOBJS,;t t
18677s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
18678s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
18679s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
18680s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
18681s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
18682s,@LIBM@,$LIBM,;t t
18683s,@LIBC@,$LIBC,;t t
18684s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
18685s,@THREADHEADERS@,$THREADHEADERS,;t t
18686s,@SRCDIRS@,$SRCDIRS,;t t
18687CEOF
18688
18689_ACEOF
18690
18691 cat >>$CONFIG_STATUS <<\_ACEOF
18692 # Split the substitutions into bite-sized pieces for seds with
18693 # small command number limits, like on Digital OSF/1 and HP-UX.
18694 ac_max_sed_lines=48
18695 ac_sed_frag=1 # Number of current file.
18696 ac_beg=1 # First line for current file.
18697 ac_end=$ac_max_sed_lines # Line after last line for current file.
18698 ac_more_lines=:
18699 ac_sed_cmds=
18700 while $ac_more_lines; do
18701 if test $ac_beg -gt 1; then
18702 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18703 else
18704 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18705 fi
18706 if test ! -s $tmp/subs.frag; then
18707 ac_more_lines=false
18708 else
18709 # The purpose of the label and of the branching condition is to
18710 # speed up the sed processing (if there are no `@' at all, there
18711 # is no need to browse any of the substitutions).
18712 # These are the two extra sed commands mentioned above.
18713 (echo ':t
18714 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18715 if test -z "$ac_sed_cmds"; then
18716 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18717 else
18718 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18719 fi
18720 ac_sed_frag=`expr $ac_sed_frag + 1`
18721 ac_beg=$ac_end
18722 ac_end=`expr $ac_end + $ac_max_sed_lines`
18723 fi
18724 done
18725 if test -z "$ac_sed_cmds"; then
18726 ac_sed_cmds=cat
18727 fi
18728fi # test -n "$CONFIG_FILES"
18729
18730_ACEOF
18731cat >>$CONFIG_STATUS <<\_ACEOF
18732for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18733 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18734 case $ac_file in
18735 - | *:- | *:-:* ) # input from stdin
18736 cat >$tmp/stdin
18737 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18738 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18739 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18740 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18741 * ) ac_file_in=$ac_file.in ;;
18742 esac
18743
18744 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18745 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18746$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18747 X"$ac_file" : 'X\(//\)[^/]' \| \
18748 X"$ac_file" : 'X\(//\)$' \| \
18749 X"$ac_file" : 'X\(/\)' \| \
18750 . : '\(.\)' 2>/dev/null ||
18751echo X"$ac_file" |
18752 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18753 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18754 /^X\(\/\/\)$/{ s//\1/; q; }
18755 /^X\(\/\).*/{ s//\1/; q; }
18756 s/.*/./; q'`
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018757 { case "$ac_dir" in
18758 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18759 *) as_incr_dir=.;;
18760esac
18761as_dummy="$ac_dir"
18762for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18763 case $as_mkdir_dir in
18764 # Skip DOS drivespec
18765 ?:) as_incr_dir=$as_mkdir_dir ;;
18766 *)
18767 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18768 test -d "$as_incr_dir" ||
18769 mkdir "$as_incr_dir" ||
18770 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18771echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18772 { (exit 1); exit 1; }; }
18773 ;;
18774 esac
18775done; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018776
18777 ac_builddir=.
18778
18779if test "$ac_dir" != .; then
18780 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18781 # A "../" for each directory in $ac_dir_suffix.
18782 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18783else
18784 ac_dir_suffix= ac_top_builddir=
18785fi
18786
18787case $srcdir in
18788 .) # No --srcdir option. We are building in place.
18789 ac_srcdir=.
18790 if test -z "$ac_top_builddir"; then
18791 ac_top_srcdir=.
18792 else
18793 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18794 fi ;;
18795 [\\/]* | ?:[\\/]* ) # Absolute path.
18796 ac_srcdir=$srcdir$ac_dir_suffix;
18797 ac_top_srcdir=$srcdir ;;
18798 *) # Relative path.
18799 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18800 ac_top_srcdir=$ac_top_builddir$srcdir ;;
18801esac
18802# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18803# absolute.
18804ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +000018805ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000018806ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18807ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18808
18809
18810 case $INSTALL in
18811 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18812 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
18813 esac
18814
18815 if test x"$ac_file" != x-; then
18816 { echo "$as_me:$LINENO: creating $ac_file" >&5
18817echo "$as_me: creating $ac_file" >&6;}
18818 rm -f "$ac_file"
18819 fi
18820 # Let's still pretend it is `configure' which instantiates (i.e., don't
18821 # use $as_me), people would be surprised to read:
18822 # /* config.h. Generated by config.status. */
18823 if test x"$ac_file" = x-; then
18824 configure_input=
18825 else
18826 configure_input="$ac_file. "
18827 fi
18828 configure_input=$configure_input"Generated from `echo $ac_file_in |
18829 sed 's,.*/,,'` by configure."
18830
18831 # First look for the input files in the build tree, otherwise in the
18832 # src tree.
18833 ac_file_inputs=`IFS=:
18834 for f in $ac_file_in; do
18835 case $f in
18836 -) echo $tmp/stdin ;;
18837 [\\/$]*)
18838 # Absolute (can't be DOS-style, as IFS=:)
18839 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18840echo "$as_me: error: cannot find input file: $f" >&2;}
18841 { (exit 1); exit 1; }; }
18842 echo $f;;
18843 *) # Relative
18844 if test -f "$f"; then
18845 # Build tree
18846 echo $f
18847 elif test -f "$srcdir/$f"; then
18848 # Source tree
18849 echo $srcdir/$f
18850 else
18851 # /dev/null tree
18852 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18853echo "$as_me: error: cannot find input file: $f" >&2;}
18854 { (exit 1); exit 1; }; }
18855 fi;;
18856 esac
18857 done` || { (exit 1); exit 1; }
18858_ACEOF
18859cat >>$CONFIG_STATUS <<_ACEOF
18860 sed "$ac_vpsub
18861$extrasub
18862_ACEOF
18863cat >>$CONFIG_STATUS <<\_ACEOF
18864:t
18865/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18866s,@configure_input@,$configure_input,;t t
18867s,@srcdir@,$ac_srcdir,;t t
18868s,@abs_srcdir@,$ac_abs_srcdir,;t t
18869s,@top_srcdir@,$ac_top_srcdir,;t t
18870s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18871s,@builddir@,$ac_builddir,;t t
18872s,@abs_builddir@,$ac_abs_builddir,;t t
18873s,@top_builddir@,$ac_top_builddir,;t t
18874s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
18875s,@INSTALL@,$ac_INSTALL,;t t
18876" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18877 rm -f $tmp/stdin
18878 if test x"$ac_file" != x-; then
18879 mv $tmp/out $ac_file
18880 else
18881 cat $tmp/out
18882 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018883 fi
18884
Martin v. Löwis11437992002-04-12 09:54:03 +000018885done
18886_ACEOF
18887cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018888
Martin v. Löwis11437992002-04-12 09:54:03 +000018889#
18890# CONFIG_HEADER section.
18891#
Guido van Rossum627b2d71993-12-24 10:39:16 +000018892
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018893# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18894# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000018895#
18896# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000018897ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18898ac_dB='[ ].*$,\1#\2'
18899ac_dC=' '
18900ac_dD=',;t'
18901# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18902ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18903ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018904ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000018905ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018906
Martin v. Löwis11437992002-04-12 09:54:03 +000018907for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000018908 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000018909 case $ac_file in
18910 - | *:- | *:-:* ) # input from stdin
18911 cat >$tmp/stdin
18912 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18913 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18914 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18915 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18916 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018917 esac
18918
Martin v. Löwis11437992002-04-12 09:54:03 +000018919 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
18920echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000018921
Martin v. Löwis11437992002-04-12 09:54:03 +000018922 # First look for the input files in the build tree, otherwise in the
18923 # src tree.
18924 ac_file_inputs=`IFS=:
18925 for f in $ac_file_in; do
18926 case $f in
18927 -) echo $tmp/stdin ;;
18928 [\\/$]*)
18929 # Absolute (can't be DOS-style, as IFS=:)
18930 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18931echo "$as_me: error: cannot find input file: $f" >&2;}
18932 { (exit 1); exit 1; }; }
18933 echo $f;;
18934 *) # Relative
18935 if test -f "$f"; then
18936 # Build tree
18937 echo $f
18938 elif test -f "$srcdir/$f"; then
18939 # Source tree
18940 echo $srcdir/$f
18941 else
18942 # /dev/null tree
18943 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18944echo "$as_me: error: cannot find input file: $f" >&2;}
18945 { (exit 1); exit 1; }; }
18946 fi;;
18947 esac
18948 done` || { (exit 1); exit 1; }
18949 # Remove the trailing spaces.
18950 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018951
Martin v. Löwis11437992002-04-12 09:54:03 +000018952_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018953
Martin v. Löwis11437992002-04-12 09:54:03 +000018954# Transform confdefs.h into two sed scripts, `conftest.defines' and
18955# `conftest.undefs', that substitutes the proper values into
18956# config.h.in to produce config.h. The first handles `#define'
18957# templates, and the second `#undef' templates.
18958# And first: Protect against being on the right side of a sed subst in
18959# config.status. Protect against being in an unquoted here document
18960# in config.status.
18961rm -f conftest.defines conftest.undefs
18962# Using a here document instead of a string reduces the quoting nightmare.
18963# Putting comments in sed scripts is not portable.
18964#
18965# `end' is used to avoid that the second main sed command (meant for
18966# 0-ary CPP macros) applies to n-ary macro definitions.
18967# See the Autoconf documentation for `clear'.
18968cat >confdef2sed.sed <<\_ACEOF
18969s/[\\&,]/\\&/g
18970s,[\\$`],\\&,g
18971t clear
18972: clear
18973s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
18974t end
18975s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
18976: end
18977_ACEOF
18978# If some macros were called several times there might be several times
18979# the same #defines, which is useless. Nevertheless, we may not want to
18980# sort them, since we want the *last* AC-DEFINE to be honored.
18981uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
18982sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
18983rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018984
18985# This sed command replaces #undef with comments. This is necessary, for
18986# example, in the case of _POSIX_SOURCE, which is predefined and required
18987# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000018988cat >>conftest.undefs <<\_ACEOF
18989s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
18990_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018991
Martin v. Löwis11437992002-04-12 09:54:03 +000018992# Break up conftest.defines because some shells have a limit on the size
18993# of here documents, and old seds have small limits too (100 cmds).
18994echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018995echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018996echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
18997echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018998rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000018999while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000019000do
Martin v. Löwis11437992002-04-12 09:54:03 +000019001 # Write a limited-size here document to $tmp/defines.sed.
19002 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
19003 # Speed up: don't consider the non `#define' lines.
19004 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
19005 # Work around the forget-to-reset-the-flag bug.
19006 echo 't clr' >>$CONFIG_STATUS
19007 echo ': clr' >>$CONFIG_STATUS
19008 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019009 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000019010 sed -f $tmp/defines.sed $tmp/in >$tmp/out
19011 rm -f $tmp/in
19012 mv $tmp/out $tmp/in
19013' >>$CONFIG_STATUS
19014 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
19015 rm -f conftest.defines
19016 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000019017done
Martin v. Löwis11437992002-04-12 09:54:03 +000019018rm -f conftest.defines
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019019echo ' fi # egrep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019020echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019021
Martin v. Löwis11437992002-04-12 09:54:03 +000019022# Break up conftest.undefs because some shells have a limit on the size
19023# of here documents, and old seds have small limits too (100 cmds).
19024echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
19025rm -f conftest.tail
19026while grep . conftest.undefs >/dev/null
19027do
19028 # Write a limited-size here document to $tmp/undefs.sed.
19029 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
19030 # Speed up: don't consider the non `#undef'
19031 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
19032 # Work around the forget-to-reset-the-flag bug.
19033 echo 't clr' >>$CONFIG_STATUS
19034 echo ': clr' >>$CONFIG_STATUS
19035 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
19036 echo 'CEOF
19037 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
19038 rm -f $tmp/in
19039 mv $tmp/out $tmp/in
19040' >>$CONFIG_STATUS
19041 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
19042 rm -f conftest.undefs
19043 mv conftest.tail conftest.undefs
19044done
19045rm -f conftest.undefs
19046
19047cat >>$CONFIG_STATUS <<\_ACEOF
19048 # Let's still pretend it is `configure' which instantiates (i.e., don't
19049 # use $as_me), people would be surprised to read:
19050 # /* config.h. Generated by config.status. */
19051 if test x"$ac_file" = x-; then
19052 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000019053 else
Martin v. Löwis11437992002-04-12 09:54:03 +000019054 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000019055 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019056 cat $tmp/in >>$tmp/config.h
19057 rm -f $tmp/in
19058 if test x"$ac_file" != x-; then
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019059 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019060 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
19061echo "$as_me: $ac_file is unchanged" >&6;}
19062 else
19063 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19064$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19065 X"$ac_file" : 'X\(//\)[^/]' \| \
19066 X"$ac_file" : 'X\(//\)$' \| \
19067 X"$ac_file" : 'X\(/\)' \| \
19068 . : '\(.\)' 2>/dev/null ||
19069echo X"$ac_file" |
19070 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19071 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19072 /^X\(\/\/\)$/{ s//\1/; q; }
19073 /^X\(\/\).*/{ s//\1/; q; }
19074 s/.*/./; q'`
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019075 { case "$ac_dir" in
19076 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19077 *) as_incr_dir=.;;
19078esac
19079as_dummy="$ac_dir"
19080for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19081 case $as_mkdir_dir in
19082 # Skip DOS drivespec
19083 ?:) as_incr_dir=$as_mkdir_dir ;;
19084 *)
19085 as_incr_dir=$as_incr_dir/$as_mkdir_dir
19086 test -d "$as_incr_dir" ||
19087 mkdir "$as_incr_dir" ||
19088 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
19089echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
19090 { (exit 1); exit 1; }; }
19091 ;;
19092 esac
19093done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019094
Martin v. Löwis11437992002-04-12 09:54:03 +000019095 rm -f $ac_file
19096 mv $tmp/config.h $ac_file
19097 fi
19098 else
19099 cat $tmp/config.h
19100 rm -f $tmp/config.h
19101 fi
19102done
19103_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000019104
Martin v. Löwis11437992002-04-12 09:54:03 +000019105cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019106
Martin v. Löwis11437992002-04-12 09:54:03 +000019107{ (exit 0); exit 0; }
19108_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019109chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019110ac_clean_files=$ac_clean_files_save
19111
19112
19113# configure is writing to config.log, and then calls config.status.
19114# config.status does its own redirection, appending to config.log.
19115# Unfortunately, on DOS this fails, as config.log is still kept open
19116# by configure, so config.status won't be able to write to it; its
19117# output is simply discarded. So we exec the FD to /dev/null,
19118# effectively closing config.log, so it can be properly (re)opened and
19119# appended to by config.status. When coming back to configure, we
19120# need to make the FD available again.
19121if test "$no_create" != yes; then
19122 ac_cs_success=:
19123 exec 5>/dev/null
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019124 $SHELL $CONFIG_STATUS || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000019125 exec 5>>config.log
19126 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19127 # would make configure fail if this is the last instruction.
19128 $ac_cs_success || { (exit 1); exit 1; }
19129fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019130
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019131
19132echo "creating Setup"
19133if test ! -f Modules/Setup
19134then
19135 cp $srcdir/Modules/Setup.dist Modules/Setup
19136fi
19137
19138echo "creating Setup.local"
19139if test ! -f Modules/Setup.local
19140then
19141 echo "# Edit this file for local setup changes" >Modules/Setup.local
19142fi
19143
19144echo "creating Makefile"
19145$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
19146 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000019147 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000019148mv config.c Modules