blob: 591da29dbedb0e26108a4d8c71cfe7bf86e16293 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Neal Norwitz7f2588c2003-04-11 15:35:53 +00002# From configure.in Revision: 1.400 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Barry Warsawfe33b792003-01-07 22:42:49 +00004# Generated by GNU Autoconf 2.53 for python 2.3.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis11437992002-04-12 09:54:03 +00006# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
7# Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008# This configure script is free software; the Free Software Foundation
9# gives unlimited permission to copy, distribute and modify it.
Barry Warsawfe33b792003-01-07 22:42:49 +000010
11if expr a : '\(a\)' >/dev/null 2>&1; then
12 as_expr=expr
13else
14 as_expr=false
15fi
16
17
Martin v. Löwis11437992002-04-12 09:54:03 +000018## --------------------- ##
19## M4sh Initialization. ##
20## --------------------- ##
21
22# Be Bourne compatible
23if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24 emulate sh
25 NULLCMD=:
26elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
27 set -o posix
28fi
29
Barry Warsawfe33b792003-01-07 22:42:49 +000030# NLS nuisances.
Martin v. Löwis11437992002-04-12 09:54:03 +000031# Support unset when possible.
32if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
33 as_unset=unset
34else
35 as_unset=false
36fi
37
Barry Warsawfe33b792003-01-07 22:42:49 +000038(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
39 { $as_unset LANG || test "${LANG+set}" != set; } ||
40 { LANG=C; export LANG; }
41(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
42 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
43 { LC_ALL=C; export LC_ALL; }
44(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
45 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
46 { LC_TIME=C; export LC_TIME; }
47(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
48 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
49 { LC_CTYPE=C; export LC_CTYPE; }
50(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
51 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
52 { LANGUAGE=C; export LANGUAGE; }
53(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
54 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
55 { LC_COLLATE=C; export LC_COLLATE; }
56(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
57 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
58 { LC_NUMERIC=C; export LC_NUMERIC; }
59(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
60 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
61 { LC_MESSAGES=C; export LC_MESSAGES; }
Martin v. Löwis11437992002-04-12 09:54:03 +000062
63
64# Name of the executable.
Barry Warsawfe33b792003-01-07 22:42:49 +000065as_me=`(basename "$0") 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000066$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67 X"$0" : 'X\(//\)$' \| \
68 X"$0" : 'X\(/\)$' \| \
69 . : '\(.\)' 2>/dev/null ||
70echo X/"$0" |
71 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
72 /^X\/\(\/\/\)$/{ s//\1/; q; }
73 /^X\/\(\/\).*/{ s//\1/; q; }
74 s/.*/./; q'`
75
76# PATH needs CR, and LINENO needs CR and PATH.
77# Avoid depending upon Character Ranges.
78as_cr_letters='abcdefghijklmnopqrstuvwxyz'
79as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
80as_cr_Letters=$as_cr_letters$as_cr_LETTERS
81as_cr_digits='0123456789'
82as_cr_alnum=$as_cr_Letters$as_cr_digits
83
84# The user is always right.
85if test "${PATH_SEPARATOR+set}" != set; then
86 echo "#! /bin/sh" >conftest.sh
87 echo "exit 0" >>conftest.sh
88 chmod +x conftest.sh
Barry Warsawfe33b792003-01-07 22:42:49 +000089 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000090 PATH_SEPARATOR=';'
91 else
92 PATH_SEPARATOR=:
93 fi
94 rm -f conftest.sh
95fi
96
97
98 as_lineno_1=$LINENO
99 as_lineno_2=$LINENO
100 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
101 test "x$as_lineno_1" != "x$as_lineno_2" &&
102 test "x$as_lineno_3" = "x$as_lineno_2" || {
103 # Find who we are. Look in the path if we contain no path at all
104 # relative or not.
105 case $0 in
106 *[\\/]* ) as_myself=$0 ;;
107 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
108for as_dir in $PATH
109do
110 IFS=$as_save_IFS
111 test -z "$as_dir" && as_dir=.
112 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
113done
114
115 ;;
116 esac
117 # We did not find ourselves, most probably we were run as `sh COMMAND'
118 # in which case we are not to be found in the path.
119 if test "x$as_myself" = x; then
120 as_myself=$0
121 fi
122 if test ! -f "$as_myself"; then
123 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
124 { (exit 1); exit 1; }; }
125 fi
126 case $CONFIG_SHELL in
127 '')
128 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
129for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
130do
131 IFS=$as_save_IFS
132 test -z "$as_dir" && as_dir=.
133 for as_base in sh bash ksh sh5; do
134 case $as_dir in
135 /*)
136 if ("$as_dir/$as_base" -c '
137 as_lineno_1=$LINENO
138 as_lineno_2=$LINENO
139 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
140 test "x$as_lineno_1" != "x$as_lineno_2" &&
141 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
142 CONFIG_SHELL=$as_dir/$as_base
143 export CONFIG_SHELL
144 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
145 fi;;
146 esac
147 done
148done
149;;
150 esac
151
152 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
153 # uniformly replaced by the line number. The first 'sed' inserts a
154 # line-number line before each line; the second 'sed' does the real
155 # work. The second script uses 'N' to pair each line-number line
156 # with the numbered line, and appends trailing '-' during
157 # substitution so that $LINENO is not a special case at line end.
158 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
159 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
160 sed '=' <$as_myself |
161 sed '
162 N
163 s,$,-,
164 : loop
165 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
166 t loop
167 s,-$,,
168 s,^['$as_cr_digits']*\n,,
169 ' >$as_me.lineno &&
170 chmod +x $as_me.lineno ||
171 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
172 { (exit 1); exit 1; }; }
173
174 # Don't try to exec as it changes $[0], causing all sort of problems
175 # (the dirname of $[0] is not the place where we might find the
176 # original and so on. Autoconf is especially sensible to this).
177 . ./$as_me.lineno
178 # Exit status is that of the last command.
179 exit
180}
181
182
183case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
184 *c*,-n*) ECHO_N= ECHO_C='
185' ECHO_T=' ' ;;
186 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
187 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
188esac
189
190if expr a : '\(a\)' >/dev/null 2>&1; then
191 as_expr=expr
192else
193 as_expr=false
194fi
195
196rm -f conf$$ conf$$.exe conf$$.file
197echo >conf$$.file
198if ln -s conf$$.file conf$$ 2>/dev/null; then
199 # We could just check for DJGPP; but this test a) works b) is more generic
200 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
201 if test -f conf$$.exe; then
202 # Don't use ln at all; we don't have any links
203 as_ln_s='cp -p'
204 else
205 as_ln_s='ln -s'
206 fi
207elif ln conf$$.file conf$$ 2>/dev/null; then
208 as_ln_s=ln
209else
210 as_ln_s='cp -p'
211fi
212rm -f conf$$ conf$$.exe conf$$.file
213
214as_executable_p="test -f"
215
216# Sed expression to map a string onto a valid CPP name.
217as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
218
219# Sed expression to map a string onto a valid variable name.
220as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
221
222
223# IFS
224# We need space, tab and new line, in precisely that order.
225as_nl='
226'
227IFS=" $as_nl"
228
229# CDPATH.
Barry Warsawfe33b792003-01-07 22:42:49 +0000230$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000231
232
233# Name of the host.
234# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
235# so uname gets run too.
236ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
237
238exec 6>&1
239
240#
241# Initializations.
242#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000243ac_default_prefix=/usr/local
Martin v. Löwis11437992002-04-12 09:54:03 +0000244cross_compiling=no
245subdirs=
246MFLAGS=
247MAKEFLAGS=
248SHELL=${CONFIG_SHELL-/bin/sh}
249
250# Maximum number of lines to put in a shell here document.
251# This variable seems obsolete. It should probably be removed, and
252# only ac_max_sed_lines should be used.
253: ${ac_max_here_lines=38}
254
255# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000256PACKAGE_NAME='python'
257PACKAGE_TARNAME='python'
258PACKAGE_VERSION='2.3'
259PACKAGE_STRING='python 2.3'
260PACKAGE_BUGREPORT=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000261
262ac_unique_file="Include/object.h"
263# Factoring default headers for most tests.
264ac_includes_default="\
265#include <stdio.h>
266#if HAVE_SYS_TYPES_H
267# include <sys/types.h>
268#endif
269#if HAVE_SYS_STAT_H
270# include <sys/stat.h>
271#endif
272#if STDC_HEADERS
273# include <stdlib.h>
274# include <stddef.h>
275#else
276# if HAVE_STDLIB_H
277# include <stdlib.h>
278# endif
279#endif
280#if HAVE_STRING_H
281# if !STDC_HEADERS && HAVE_MEMORY_H
282# include <memory.h>
283# endif
284# include <string.h>
285#endif
286#if HAVE_STRINGS_H
287# include <strings.h>
288#endif
289#if HAVE_INTTYPES_H
290# include <inttypes.h>
291#else
292# if HAVE_STDINT_H
293# include <stdint.h>
294# endif
295#endif
296#if HAVE_UNISTD_H
297# include <unistd.h>
298#endif"
299
Guido van Rossum627b2d71993-12-24 10:39:16 +0000300
Guido van Rossum7f43da71994-08-01 12:15:30 +0000301# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000302ac_init_help=
303ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000304# The variables have the same names as the options, with
305# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000306cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000307exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000308no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000309no_recursion=
310prefix=NONE
311program_prefix=NONE
312program_suffix=NONE
313program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000314silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000315site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000316srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000317verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000318x_includes=NONE
319x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000320
321# Installation directory options.
322# These are left unexpanded so users can "make install exec_prefix=/foo"
323# and all the variables that are supposed to be based on exec_prefix
324# by default will actually change.
325# Use braces instead of parens because sh, perl, etc. also accept them.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000326bindir='${exec_prefix}/bin'
327sbindir='${exec_prefix}/sbin'
328libexecdir='${exec_prefix}/libexec'
329datadir='${prefix}/share'
330sysconfdir='${prefix}/etc'
331sharedstatedir='${prefix}/com'
332localstatedir='${prefix}/var'
333libdir='${exec_prefix}/lib'
334includedir='${prefix}/include'
335oldincludedir='/usr/include'
336infodir='${prefix}/info'
337mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000338
Guido van Rossum7f43da71994-08-01 12:15:30 +0000339ac_prev=
340for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000341do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000342 # If the previous option needs an argument, assign it.
343 if test -n "$ac_prev"; then
344 eval "$ac_prev=\$ac_option"
345 ac_prev=
346 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000347 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000348
Martin v. Löwis11437992002-04-12 09:54:03 +0000349 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000350
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000351 # Accept the important Cygnus configure options, so we can diagnose typos.
352
Martin v. Löwis11437992002-04-12 09:54:03 +0000353 case $ac_option in
Guido van Rossum7f43da71994-08-01 12:15:30 +0000354
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000355 -bindir | --bindir | --bindi | --bind | --bin | --bi)
356 ac_prev=bindir ;;
357 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000358 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000359
360 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000361 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000362 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000363 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000364
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000365 -cache-file | --cache-file | --cache-fil | --cache-fi \
366 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
367 ac_prev=cache_file ;;
368 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
369 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000370 cache_file=$ac_optarg ;;
371
372 --config-cache | -C)
373 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000374
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000375 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
376 ac_prev=datadir ;;
377 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
378 | --da=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000379 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000380
Guido van Rossum7f43da71994-08-01 12:15:30 +0000381 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000382 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000383 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000384 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
385 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
386 { (exit 1); exit 1; }; }
387 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
388 eval "enable_$ac_feature=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000389
390 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000391 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000392 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000393 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
394 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
395 { (exit 1); exit 1; }; }
396 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
397 case $ac_option in
398 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000399 *) ac_optarg=yes ;;
400 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000401 eval "enable_$ac_feature='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000402
Guido van Rossum7f43da71994-08-01 12:15:30 +0000403 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
404 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
405 | --exec | --exe | --ex)
406 ac_prev=exec_prefix ;;
407 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
408 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
409 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000410 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000411
412 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000413 # Obsolete; use --with-gas.
414 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000415
Martin v. Löwis11437992002-04-12 09:54:03 +0000416 -help | --help | --hel | --he | -h)
417 ac_init_help=long ;;
418 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
419 ac_init_help=recursive ;;
420 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
421 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000422
423 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000424 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000425 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000426 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000427
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000428 -includedir | --includedir | --includedi | --included | --include \
429 | --includ | --inclu | --incl | --inc)
430 ac_prev=includedir ;;
431 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
432 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000433 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000434
435 -infodir | --infodir | --infodi | --infod | --info | --inf)
436 ac_prev=infodir ;;
437 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000439
440 -libdir | --libdir | --libdi | --libd)
441 ac_prev=libdir ;;
442 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000443 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000444
445 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
446 | --libexe | --libex | --libe)
447 ac_prev=libexecdir ;;
448 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
449 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000451
452 -localstatedir | --localstatedir | --localstatedi | --localstated \
453 | --localstate | --localstat | --localsta | --localst \
454 | --locals | --local | --loca | --loc | --lo)
455 ac_prev=localstatedir ;;
456 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
457 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
458 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000459 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000460
461 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
462 ac_prev=mandir ;;
463 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000465
Guido van Rossum7f43da71994-08-01 12:15:30 +0000466 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000467 # Obsolete; use --without-fp.
468 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000469
470 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000471 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000472 no_create=yes ;;
473
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000474 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
475 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
476 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000477
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000478 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
479 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
480 | --oldin | --oldi | --old | --ol | --o)
481 ac_prev=oldincludedir ;;
482 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
483 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
484 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000486
Guido van Rossum7f43da71994-08-01 12:15:30 +0000487 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
488 ac_prev=prefix ;;
489 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000490 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000491
492 -program-prefix | --program-prefix | --program-prefi | --program-pref \
493 | --program-pre | --program-pr | --program-p)
494 ac_prev=program_prefix ;;
495 -program-prefix=* | --program-prefix=* | --program-prefi=* \
496 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000497 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000498
499 -program-suffix | --program-suffix | --program-suffi | --program-suff \
500 | --program-suf | --program-su | --program-s)
501 ac_prev=program_suffix ;;
502 -program-suffix=* | --program-suffix=* | --program-suffi=* \
503 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000504 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000505
506 -program-transform-name | --program-transform-name \
507 | --program-transform-nam | --program-transform-na \
508 | --program-transform-n | --program-transform- \
509 | --program-transform | --program-transfor \
510 | --program-transfo | --program-transf \
511 | --program-trans | --program-tran \
512 | --progr-tra | --program-tr | --program-t)
513 ac_prev=program_transform_name ;;
514 -program-transform-name=* | --program-transform-name=* \
515 | --program-transform-nam=* | --program-transform-na=* \
516 | --program-transform-n=* | --program-transform-=* \
517 | --program-transform=* | --program-transfor=* \
518 | --program-transfo=* | --program-transf=* \
519 | --program-trans=* | --program-tran=* \
520 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000521 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000522
523 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
524 | -silent | --silent | --silen | --sile | --sil)
525 silent=yes ;;
526
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000527 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
528 ac_prev=sbindir ;;
529 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
530 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000531 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000532
533 -sharedstatedir | --sharedstatedir | --sharedstatedi \
534 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
535 | --sharedst | --shareds | --shared | --share | --shar \
536 | --sha | --sh)
537 ac_prev=sharedstatedir ;;
538 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
539 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
540 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
541 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000542 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000543
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544 -site | --site | --sit)
545 ac_prev=site ;;
546 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000547 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000548
Guido van Rossum7f43da71994-08-01 12:15:30 +0000549 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
550 ac_prev=srcdir ;;
551 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000552 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000553
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000554 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
555 | --syscon | --sysco | --sysc | --sys | --sy)
556 ac_prev=sysconfdir ;;
557 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
558 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000559 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000560
Guido van Rossum7f43da71994-08-01 12:15:30 +0000561 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +0000562 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000563 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000564 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000565
566 -v | -verbose | --verbose | --verbos | --verbo | --verb)
567 verbose=yes ;;
568
Martin v. Löwis11437992002-04-12 09:54:03 +0000569 -version | --version | --versio | --versi | --vers | -V)
570 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000571
572 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000573 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000574 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000575 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
576 { echo "$as_me: error: invalid package name: $ac_package" >&2
577 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000578 ac_package=`echo $ac_package| sed 's/-/_/g'`
Martin v. Löwis11437992002-04-12 09:54:03 +0000579 case $ac_option in
580 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000581 *) ac_optarg=yes ;;
582 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000583 eval "with_$ac_package='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000584
585 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000586 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000587 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000588 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
589 { echo "$as_me: error: invalid package name: $ac_package" >&2
590 { (exit 1); exit 1; }; }
591 ac_package=`echo $ac_package | sed 's/-/_/g'`
592 eval "with_$ac_package=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000593
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000594 --x)
595 # Obsolete; use --with-x.
596 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000597
598 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
599 | --x-incl | --x-inc | --x-in | --x-i)
600 ac_prev=x_includes ;;
601 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
602 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000603 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000604
605 -x-libraries | --x-libraries | --x-librarie | --x-librari \
606 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
607 ac_prev=x_libraries ;;
608 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
609 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000610 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000611
Martin v. Löwis11437992002-04-12 09:54:03 +0000612 -*) { echo "$as_me: error: unrecognized option: $ac_option
613Try \`$0 --help' for more information." >&2
614 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000615 ;;
616
Martin v. Löwis11437992002-04-12 09:54:03 +0000617 *=*)
618 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
619 # Reject names that are not valid shell variable names.
620 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
621 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
622 { (exit 1); exit 1; }; }
623 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
624 eval "$ac_envvar='$ac_optarg'"
625 export $ac_envvar ;;
626
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000627 *)
Martin v. Löwis11437992002-04-12 09:54:03 +0000628 # FIXME: should be removed in autoconf 3.0.
629 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
630 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
631 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
632 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000633 ;;
634
635 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000636done
637
Guido van Rossum7f43da71994-08-01 12:15:30 +0000638if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000639 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
640 { echo "$as_me: error: missing argument to $ac_option" >&2
641 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000642fi
643
Martin v. Löwis11437992002-04-12 09:54:03 +0000644# Be sure to have absolute paths.
645for ac_var in exec_prefix prefix
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000646do
Martin v. Löwis11437992002-04-12 09:54:03 +0000647 eval ac_val=$`echo $ac_var`
648 case $ac_val in
649 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
650 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
651 { (exit 1); exit 1; }; };;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000652 esac
653done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000654
Martin v. Löwis11437992002-04-12 09:54:03 +0000655# Be sure to have absolute paths.
656for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
657 localstatedir libdir includedir oldincludedir infodir mandir
658do
659 eval ac_val=$`echo $ac_var`
660 case $ac_val in
661 [\\/$]* | ?:[\\/]* ) ;;
662 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
663 { (exit 1); exit 1; }; };;
664 esac
665done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000666
Martin v. Löwis11437992002-04-12 09:54:03 +0000667# There might be people who depend on the old broken behavior: `$host'
668# used to hold the argument of --host etc.
669# FIXME: To remove some day.
670build=$build_alias
671host=$host_alias
672target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +0000673
Martin v. Löwis11437992002-04-12 09:54:03 +0000674# FIXME: To remove some day.
675if test "x$host_alias" != x; then
676 if test "x$build_alias" = x; then
677 cross_compiling=maybe
678 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
679 If a cross compiler is detected then cross compile mode will be used." >&2
680 elif test "x$build_alias" != "x$host_alias"; then
681 cross_compiling=yes
682 fi
683fi
684
685ac_tool_prefix=
686test -n "$host_alias" && ac_tool_prefix=$host_alias-
687
688test "$silent" = yes && exec 6>/dev/null
689
Guido van Rossum627b2d71993-12-24 10:39:16 +0000690
691# Find the source files, if location was not specified.
692if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000693 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000694 # Try the directory containing this script, then its parent.
Martin v. Löwis11437992002-04-12 09:54:03 +0000695 ac_confdir=`(dirname "$0") 2>/dev/null ||
696$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
697 X"$0" : 'X\(//\)[^/]' \| \
698 X"$0" : 'X\(//\)$' \| \
699 X"$0" : 'X\(/\)' \| \
700 . : '\(.\)' 2>/dev/null ||
701echo X"$0" |
702 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
703 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
704 /^X\(\/\/\)$/{ s//\1/; q; }
705 /^X\(\/\).*/{ s//\1/; q; }
706 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000707 srcdir=$ac_confdir
708 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000709 srcdir=..
710 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000711else
712 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000713fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000714if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000715 if test "$ac_srcdir_defaulted" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000716 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
717 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000718 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000719 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
720 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000721 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000722fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000723srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
724ac_env_build_alias_set=${build_alias+set}
725ac_env_build_alias_value=$build_alias
726ac_cv_env_build_alias_set=${build_alias+set}
727ac_cv_env_build_alias_value=$build_alias
728ac_env_host_alias_set=${host_alias+set}
729ac_env_host_alias_value=$host_alias
730ac_cv_env_host_alias_set=${host_alias+set}
731ac_cv_env_host_alias_value=$host_alias
732ac_env_target_alias_set=${target_alias+set}
733ac_env_target_alias_value=$target_alias
734ac_cv_env_target_alias_set=${target_alias+set}
735ac_cv_env_target_alias_value=$target_alias
736ac_env_CC_set=${CC+set}
737ac_env_CC_value=$CC
738ac_cv_env_CC_set=${CC+set}
739ac_cv_env_CC_value=$CC
740ac_env_CFLAGS_set=${CFLAGS+set}
741ac_env_CFLAGS_value=$CFLAGS
742ac_cv_env_CFLAGS_set=${CFLAGS+set}
743ac_cv_env_CFLAGS_value=$CFLAGS
744ac_env_LDFLAGS_set=${LDFLAGS+set}
745ac_env_LDFLAGS_value=$LDFLAGS
746ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
747ac_cv_env_LDFLAGS_value=$LDFLAGS
748ac_env_CPPFLAGS_set=${CPPFLAGS+set}
749ac_env_CPPFLAGS_value=$CPPFLAGS
750ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
751ac_cv_env_CPPFLAGS_value=$CPPFLAGS
752ac_env_CPP_set=${CPP+set}
753ac_env_CPP_value=$CPP
754ac_cv_env_CPP_set=${CPP+set}
755ac_cv_env_CPP_value=$CPP
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000756
Martin v. Löwis11437992002-04-12 09:54:03 +0000757#
758# Report the --help message.
759#
760if test "$ac_init_help" = "long"; then
761 # Omit some internal or obsolete options to make the list less imposing.
762 # This message is too long to be a string in the A/UX 3.1 sh.
763 cat <<_ACEOF
Martin v. Löwis88afe662002-10-26 13:47:44 +0000764\`configure' configures python 2.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +0000765
766Usage: $0 [OPTION]... [VAR=VALUE]...
767
768To assign environment variables (e.g., CC, CFLAGS...), specify them as
769VAR=VALUE. See below for descriptions of some of the useful variables.
770
771Defaults for the options are specified in brackets.
772
773Configuration:
774 -h, --help display this help and exit
775 --help=short display options specific to this package
776 --help=recursive display the short help of all the included packages
777 -V, --version display version information and exit
778 -q, --quiet, --silent do not print \`checking...' messages
779 --cache-file=FILE cache test results in FILE [disabled]
780 -C, --config-cache alias for \`--cache-file=config.cache'
781 -n, --no-create do not create output files
782 --srcdir=DIR find the sources in DIR [configure dir or \`..']
783
784_ACEOF
785
786 cat <<_ACEOF
787Installation directories:
788 --prefix=PREFIX install architecture-independent files in PREFIX
789 [$ac_default_prefix]
790 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
791 [PREFIX]
792
793By default, \`make install' will install all the files in
794\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
795an installation prefix other than \`$ac_default_prefix' using \`--prefix',
796for instance \`--prefix=\$HOME'.
797
798For better control, use the options below.
799
800Fine tuning of the installation directories:
801 --bindir=DIR user executables [EPREFIX/bin]
802 --sbindir=DIR system admin executables [EPREFIX/sbin]
803 --libexecdir=DIR program executables [EPREFIX/libexec]
804 --datadir=DIR read-only architecture-independent data [PREFIX/share]
805 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
806 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
807 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
808 --libdir=DIR object code libraries [EPREFIX/lib]
809 --includedir=DIR C header files [PREFIX/include]
810 --oldincludedir=DIR C header files for non-gcc [/usr/include]
811 --infodir=DIR info documentation [PREFIX/info]
812 --mandir=DIR man documentation [PREFIX/man]
813_ACEOF
814
815 cat <<\_ACEOF
816_ACEOF
817fi
818
819if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +0000820 case $ac_init_help in
821 short | recursive ) echo "Configuration of python 2.3:";;
822 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 cat <<\_ACEOF
824
825Optional Features:
826 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
827 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000828 --enable-framework[=INSTALLDIR]
829 Build (MacOSX|Darwin) framework
830 --enable-shared disable/enable building shared python library
831 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
832 --enable-ipv6 Enable ipv6 (with ipv4) support
833 --disable-ipv6 Disable ipv6 support
834 --enable-unicode[=ucs[24]]
835 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +0000836
837Optional Packages:
838 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
839 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000840 --without-gcc never use gcc
841 --with-cxx=<compiler> enable C++ support
842 --with-suffix=.exe set executable suffix
843 --with-pydebug build with Py_DEBUG defined
844 --with-libs='lib1 ...' link against additional libs
845 --with-signal-module disable/enable signal module
846 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
847 --with(out)-threads[=DIRECTORY]
848 disable/enable thread support
849 --with(out)-thread[=DIRECTORY]
850 deprecated; use --with(out)-threads
851 --with-pth use GNU pth threading libraries
852 --with(out)-universal-newlines
853 disable/enable foreign newlines
854 --with(out)-doc-strings disable/enable documentation strings
855 --with(out)-pymalloc disable/enable specialized mallocs
856 --with-wctype-functions use wctype.h functions
857 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking
858 --with-dl-dld=DL_DIR GNU dynamic linking
859 --with-fpectl enable SIGFPE catching
860 --with-libm=STRING math library
861 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +0000862
863Some influential environment variables:
864 CC C compiler command
865 CFLAGS C compiler flags
866 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
867 nonstandard directory <lib dir>
868 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
869 headers in a nonstandard directory <include dir>
870 CPP C preprocessor
871
872Use these variables to override the choices made by `configure' or to help
873it to find libraries and programs with nonstandard names/locations.
874
875_ACEOF
876fi
877
878if test "$ac_init_help" = "recursive"; then
879 # If there are subdirs, report their specific --help.
880 ac_popdir=`pwd`
881 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
882 test -d $ac_dir || continue
883 ac_builddir=.
884
885if test "$ac_dir" != .; then
886 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
887 # A "../" for each directory in $ac_dir_suffix.
888 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
889else
890 ac_dir_suffix= ac_top_builddir=
891fi
892
893case $srcdir in
894 .) # No --srcdir option. We are building in place.
895 ac_srcdir=.
896 if test -z "$ac_top_builddir"; then
897 ac_top_srcdir=.
898 else
899 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
900 fi ;;
901 [\\/]* | ?:[\\/]* ) # Absolute path.
902 ac_srcdir=$srcdir$ac_dir_suffix;
903 ac_top_srcdir=$srcdir ;;
904 *) # Relative path.
905 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
906 ac_top_srcdir=$ac_top_builddir$srcdir ;;
907esac
908# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
909# absolute.
910ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Neal Norwitz7f2588c2003-04-11 15:35:53 +0000911ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +0000912ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
913ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
914
915 cd $ac_dir
916 # Check for guested configure; otherwise get Cygnus style configure.
917 if test -f $ac_srcdir/configure.gnu; then
918 echo
919 $SHELL $ac_srcdir/configure.gnu --help=recursive
920 elif test -f $ac_srcdir/configure; then
921 echo
922 $SHELL $ac_srcdir/configure --help=recursive
923 elif test -f $ac_srcdir/configure.ac ||
924 test -f $ac_srcdir/configure.in; then
925 echo
926 $ac_configure --help
927 else
928 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
929 fi
930 cd $ac_popdir
931 done
932fi
933
934test -n "$ac_init_help" && exit 0
935if $ac_init_version; then
936 cat <<\_ACEOF
Martin v. Löwis88afe662002-10-26 13:47:44 +0000937python configure 2.3
Barry Warsawfe33b792003-01-07 22:42:49 +0000938generated by GNU Autoconf 2.53
Martin v. Löwis11437992002-04-12 09:54:03 +0000939
940Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
941Free Software Foundation, Inc.
942This configure script is free software; the Free Software Foundation
943gives unlimited permission to copy, distribute and modify it.
944_ACEOF
945 exit 0
946fi
947exec 5>config.log
948cat >&5 <<_ACEOF
949This file contains any messages produced by compilers while
950running configure, to aid debugging if configure makes a mistake.
951
Martin v. Löwis88afe662002-10-26 13:47:44 +0000952It was created by python $as_me 2.3, which was
Barry Warsawfe33b792003-01-07 22:42:49 +0000953generated by GNU Autoconf 2.53. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +0000954
955 $ $0 $@
956
957_ACEOF
958{
959cat <<_ASUNAME
960## --------- ##
961## Platform. ##
962## --------- ##
963
964hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
965uname -m = `(uname -m) 2>/dev/null || echo unknown`
966uname -r = `(uname -r) 2>/dev/null || echo unknown`
967uname -s = `(uname -s) 2>/dev/null || echo unknown`
968uname -v = `(uname -v) 2>/dev/null || echo unknown`
969
970/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
971/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
972
973/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
974/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
975/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
976hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
977/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
978/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
979/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
980
981_ASUNAME
982
983as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
984for as_dir in $PATH
985do
986 IFS=$as_save_IFS
987 test -z "$as_dir" && as_dir=.
988 echo "PATH: $as_dir"
989done
990
991} >&5
992
993cat >&5 <<_ACEOF
994
995
996## ----------- ##
997## Core tests. ##
998## ----------- ##
999
1000_ACEOF
1001
1002
1003# Keep a trace of the command line.
1004# Strip out --no-create and --no-recursion so they do not pile up.
1005# Also quote any args containing shell meta-characters.
1006ac_configure_args=
1007ac_sep=
1008for ac_arg
1009do
1010 case $ac_arg in
1011 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1012 | --no-cr | --no-c | -n ) continue ;;
1013 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1014 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1015 continue ;;
1016 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1017 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1018 esac
Barry Warsawfe33b792003-01-07 22:42:49 +00001019 case " $ac_configure_args " in
1020 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1021 *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1022 ac_sep=" " ;;
1023 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 # Get rid of the leading space.
1025done
1026
1027# When interrupted or exit'd, cleanup temporary files, and complete
1028# config.log. We remove comments because anyway the quotes in there
1029# would cause problems or look ugly.
1030# WARNING: Be sure not to use single quotes in there, as some shells,
1031# such as our DU 5.0 friend, will then `close' the trap.
1032trap 'exit_status=$?
1033 # Save into config.log some information that might help in debugging.
1034 {
1035 echo
1036 cat <<\_ASBOX
1037## ---------------- ##
1038## Cache variables. ##
1039## ---------------- ##
1040_ASBOX
1041 echo
1042 # The following way of writing the cache mishandles newlines in values,
1043{
1044 (set) 2>&1 |
1045 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1046 *ac_space=\ *)
1047 sed -n \
1048 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1049 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1050 ;;
1051 *)
1052 sed -n \
1053 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1054 ;;
1055 esac;
1056}
1057 echo
1058 if test -s confdefs.h; then
1059 cat <<\_ASBOX
1060## ----------- ##
1061## confdefs.h. ##
1062## ----------- ##
1063_ASBOX
1064 echo
Barry Warsawfe33b792003-01-07 22:42:49 +00001065 sed "/^$/d" confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001066 echo
1067 fi
1068 test "$ac_signal" != 0 &&
1069 echo "$as_me: caught signal $ac_signal"
1070 echo "$as_me: exit $exit_status"
1071 } >&5
1072 rm -f core core.* *.core &&
1073 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1074 exit $exit_status
1075 ' 0
1076for ac_signal in 1 2 13 15; do
1077 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1078done
1079ac_signal=0
1080
1081# confdefs.h avoids OS command line length limits that DEFS can exceed.
1082rm -rf conftest* confdefs.h
1083# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1084echo >confdefs.h
1085
1086# Predefined preprocessor variables.
1087
1088cat >>confdefs.h <<_ACEOF
1089#define PACKAGE_NAME "$PACKAGE_NAME"
1090_ACEOF
1091
1092
1093cat >>confdefs.h <<_ACEOF
1094#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1095_ACEOF
1096
1097
1098cat >>confdefs.h <<_ACEOF
1099#define PACKAGE_VERSION "$PACKAGE_VERSION"
1100_ACEOF
1101
1102
1103cat >>confdefs.h <<_ACEOF
1104#define PACKAGE_STRING "$PACKAGE_STRING"
1105_ACEOF
1106
1107
1108cat >>confdefs.h <<_ACEOF
1109#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1110_ACEOF
1111
1112
1113# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001114# Prefer explicitly selected file to automatically selected ones.
1115if test -z "$CONFIG_SITE"; then
1116 if test "x$prefix" != xNONE; then
1117 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1118 else
1119 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1120 fi
1121fi
1122for ac_site_file in $CONFIG_SITE; do
1123 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1125echo "$as_me: loading site script $ac_site_file" >&6;}
1126 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001127 . "$ac_site_file"
1128 fi
1129done
1130
1131if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 # Some versions of bash will fail to source /dev/null (special
1133 # files actually), so we avoid doing that.
1134 if test -f "$cache_file"; then
1135 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1136echo "$as_me: loading cache $cache_file" >&6;}
1137 case $cache_file in
1138 [\\/]* | ?:[\\/]* ) . $cache_file;;
1139 *) . ./$cache_file;;
1140 esac
1141 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001142else
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1144echo "$as_me: creating cache $cache_file" >&6;}
1145 >$cache_file
1146fi
1147
1148# Check that the precious variables saved in the cache have kept the same
1149# value.
1150ac_cache_corrupted=false
1151for ac_var in `(set) 2>&1 |
1152 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1153 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1154 eval ac_new_set=\$ac_env_${ac_var}_set
1155 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1156 eval ac_new_val="\$ac_env_${ac_var}_value"
1157 case $ac_old_set,$ac_new_set in
1158 set,)
1159 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1160echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1161 ac_cache_corrupted=: ;;
1162 ,set)
1163 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1164echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1165 ac_cache_corrupted=: ;;
1166 ,);;
1167 *)
1168 if test "x$ac_old_val" != "x$ac_new_val"; then
1169 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1170echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1171 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1172echo "$as_me: former value: $ac_old_val" >&2;}
1173 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1174echo "$as_me: current value: $ac_new_val" >&2;}
1175 ac_cache_corrupted=:
1176 fi;;
1177 esac
1178 # Pass precious variables to config.status.
1179 if test "$ac_new_set" = set; then
1180 case $ac_new_val in
1181 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1182 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1183 *) ac_arg=$ac_var=$ac_new_val ;;
1184 esac
1185 case " $ac_configure_args " in
1186 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1187 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1188 esac
1189 fi
1190done
1191if $ac_cache_corrupted; then
1192 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1193echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1194 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1195echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1196 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001197fi
1198
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001200ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001201ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1202ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1203ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001204
Guido van Rossum627b2d71993-12-24 10:39:16 +00001205
Michael W. Hudson54241132001-12-07 15:38:26 +00001206
1207
Guido van Rossum627b2d71993-12-24 10:39:16 +00001208
Martin v. Löwis11437992002-04-12 09:54:03 +00001209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
Martin v. Löwis88afe662002-10-26 13:47:44 +00001222
1223
1224
1225
1226
1227
1228
1229
1230
Barry Warsawfe33b792003-01-07 22:42:49 +00001231ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001232
1233
1234# This is for stuff that absolutely must end up in pyconfig.h.
1235# Please use pyport.h instead, if possible.
1236
1237
1238
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001239
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001240
1241
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00001242VERSION=2.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001243
Martin v. Löwis1142de32002-03-29 16:28:31 +00001244
1245SOVERSION=1.0
1246
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001247# The later defininition of _XOPEN_SOURCE disables certain features
1248# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1249
1250cat >>confdefs.h <<\_ACEOF
1251#define _GNU_SOURCE 1
1252_ACEOF
1253
1254
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001255define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001256
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001257# Arguments passed to configure.
1258
1259CONFIG_ARGS="$ac_configure_args"
1260
Jack Jansene578a632001-08-15 01:27:14 +00001261# Check whether --enable-framework or --disable-framework was given.
1262if test "${enable_framework+set}" = set; then
1263 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001264
Jack Jansene578a632001-08-15 01:27:14 +00001265 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001266 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001267 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001268 esac
1269 case $enableval in
1270 no)
1271 PYTHONFRAMEWORK=
1272 PYTHONFRAMEWORKDIR=no-framework
1273 PYTHONFRAMEWORKPREFIX=
1274 PYTHONFRAMEWORKINSTALLDIR=
1275 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001276 ;;
1277 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001278 PYTHONFRAMEWORK=Python
1279 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001280 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001281 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1282 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001283 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001284
Guido van Rossum563e7081996-09-10 18:20:48 +00001285else
Martin v. Löwis11437992002-04-12 09:54:03 +00001286
Jack Jansene578a632001-08-15 01:27:14 +00001287 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001288 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001289 PYTHONFRAMEWORKPREFIX=
1290 PYTHONFRAMEWORKINSTALLDIR=
1291 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001292
Martin v. Löwis11437992002-04-12 09:54:03 +00001293fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001294
1295
1296
1297
Jack Jansene578a632001-08-15 01:27:14 +00001298
1299##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001300## AC_HELP_STRING(--with-dyld,
1301## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001302##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001303# Set name for machine-dependent library files
1304
Martin v. Löwis11437992002-04-12 09:54:03 +00001305echo "$as_me:$LINENO: checking MACHDEP" >&5
1306echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001307if test -z "$MACHDEP"
1308then
Guido van Rossum563e7081996-09-10 18:20:48 +00001309 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001310 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1311 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001312 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001313 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001314 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001315 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001316 ac_md_system=`echo $ac_sys_system |
1317 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1318 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001319 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001320 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001321
Guido van Rossum07397971997-04-29 21:49:50 +00001322 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001323 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001324 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001325 atheos*) MACHDEP="atheos";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001326 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001327 esac
1328fi
Guido van Rossum91922671997-10-09 20:24:13 +00001329
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001330# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1331# disable features if it is defined, without any means to access these
1332# features as extensions. For these systems, we skip the definition of
1333# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1334# some feature, make sure there is no alternative way to access this
1335# feature. Also, when using wildcards, make sure you have verified the
1336# need for not defining _XOPEN_SOURCE on all systems matching the
1337# wildcard, and that the wildcard does not include future systems
1338# (which may remove their limitations).
1339case $ac_sys_system/$ac_sys_release in
1340 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1341 # even though select is a POSIX function. Reported by J. Ribbens.
1342 OpenBSD/2.* | OpenBSD/3.[012])
1343 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00001344 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
1345 # of union __?sigval. Reported by Stuart Bishop.
1346 SunOS/5.6)
1347 define_xopen_source=no;;
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001348esac
1349
1350if test $define_xopen_source = yes
1351then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001352
1353cat >>confdefs.h <<\_ACEOF
1354#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001355_ACEOF
1356
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001357
1358 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1359 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1360 # several APIs are not declared. Since this is also needed in some
1361 # cases for HP-UX, we define it globally.
1362
1363
1364cat >>confdefs.h <<\_ACEOF
1365#define _XOPEN_SOURCE_EXTENDED 1
1366_ACEOF
1367
1368
1369cat >>confdefs.h <<\_ACEOF
1370#define _POSIX_C_SOURCE 200112L
1371_ACEOF
1372
1373
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001374fi
1375
Guido van Rossum91922671997-10-09 20:24:13 +00001376#
1377# SGI compilers allow the specification of the both the ABI and the
1378# ISA on the command line. Depending on the values of these switches,
1379# different and often incompatable code will be generated.
1380#
1381# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1382# thus supply support for various ABI/ISA combinations. The MACHDEP
1383# variable is also adjusted.
1384#
1385
1386if test ! -z "$SGI_ABI"
1387then
1388 CC="cc $SGI_ABI"
1389 LDFLAGS="$SGI_ABI $LDFLAGS"
1390 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1391fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001392echo "$as_me:$LINENO: result: $MACHDEP" >&5
1393echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001394
Jack Jansen83f898c2002-12-30 22:23:40 +00001395# And add extra plat-mac for darwin
1396
Jack Jansen7b59b422003-03-17 15:44:10 +00001397
Jack Jansen83f898c2002-12-30 22:23:40 +00001398echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1399echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1400if test -z "$EXTRAPLATDIR"
1401then
1402 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001403 darwin)
1404 EXTRAPLATDIR="\$(PLATMACDIRS)"
1405 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1406 ;;
1407 *)
1408 EXTRAPLATDIR=""
1409 EXTRAMACHDEPPATH=""
1410 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001411 esac
1412fi
1413echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1414echo "${ECHO_T}$EXTRAPLATDIR" >&6
1415
Guido van Rossum627b2d71993-12-24 10:39:16 +00001416# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001417
1418# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1419# for debug/optimization stuff. BASECFLAGS is for flags that are required
1420# just to get things to compile and link. Users are free to override OPT
1421# when running configure or make. The build should not break if they do.
1422# BASECFLAGS should generally not be messed with, however.
1423
1424# XXX shouldn't some/most/all of this code be merged with the stuff later
1425# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001426echo "$as_me:$LINENO: checking for --without-gcc" >&5
1427echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1428
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001429# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001430if test "${with_gcc+set}" = set; then
1431 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001432
Guido van Rossum7f43da71994-08-01 12:15:30 +00001433 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001434 no) CC=cc
1435 without_gcc=yes;;
1436 yes) CC=gcc
1437 without_gcc=no;;
1438 *) CC=$withval
1439 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001440 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001441else
Martin v. Löwis11437992002-04-12 09:54:03 +00001442
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001443 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001444 AIX*) CC=cc_r
1445 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001446 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001447 case $BE_HOST_CPU in
1448 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001449 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001450 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001451 BASECFLAGS="$BASECFLAGS -export pragma"
1452 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001453 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001454 ;;
1455 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001456 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001457 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001458 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001459 ;;
1460 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001461 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1462echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1463 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001464 ;;
1465 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001466 AR="\$(srcdir)/Modules/ar_beos"
1467 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001468 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001469 Monterey*)
1470 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001471 without_gcc=;;
1472 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001473 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001474fi;
1475echo "$as_me:$LINENO: result: $without_gcc" >&5
1476echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001477
1478
Guido van Rossum95012191999-12-16 17:50:52 +00001479
Fred Drakea1a84e72001-03-06 05:52:16 +00001480MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001481echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1482echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1483
Guido van Rossum95012191999-12-16 17:50:52 +00001484# Check whether --with-cxx or --without-cxx was given.
1485if test "${with_cxx+set}" = set; then
1486 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001487
Martin v. Löwis22352952000-12-13 17:37:02 +00001488 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001489 case $withval in
1490 no) CXX=
1491 with_cxx=no;;
1492 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001493 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001494 with_cxx=$withval;;
1495 esac
1496else
Martin v. Löwis11437992002-04-12 09:54:03 +00001497
Guido van Rossum95012191999-12-16 17:50:52 +00001498 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001499 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001500
Martin v. Löwis11437992002-04-12 09:54:03 +00001501fi;
1502echo "$as_me:$LINENO: result: $with_cxx" >&5
1503echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001504
1505if test "$with_cxx" = "yes"
1506then
Martin v. Löwis11437992002-04-12 09:54:03 +00001507 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1508echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1509 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001510fi
1511
1512
1513
1514
Martin v. Löwis11437992002-04-12 09:54:03 +00001515if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001516then
1517 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1518do
Martin v. Löwis11437992002-04-12 09:54:03 +00001519 # 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 +00001520set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001521echo "$as_me:$LINENO: checking for $ac_word" >&5
1522echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1523if test "${ac_cv_prog_CXX+set}" = set; then
1524 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001525else
1526 if test -n "$CXX"; then
1527 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1528else
Martin v. Löwis11437992002-04-12 09:54:03 +00001529as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1530for as_dir in $PATH
1531do
1532 IFS=$as_save_IFS
1533 test -z "$as_dir" && as_dir=.
1534 for ac_exec_ext in '' $ac_executable_extensions; do
1535 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1536 ac_cv_prog_CXX="$ac_prog"
1537 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1538 break 2
1539 fi
1540done
1541done
1542
Martin v. Löwis22352952000-12-13 17:37:02 +00001543fi
1544fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001545CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001546if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001547 echo "$as_me:$LINENO: result: $CXX" >&5
1548echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001549else
Martin v. Löwis11437992002-04-12 09:54:03 +00001550 echo "$as_me:$LINENO: result: no" >&5
1551echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001552fi
1553
Martin v. Löwis11437992002-04-12 09:54:03 +00001554 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001555done
1556test -n "$CXX" || CXX="notfound"
1557
1558 if test "$CXX" = "notfound"
1559 then
1560 CXX=
1561 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001562 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001563ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001564ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1565ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1566ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1567 cat >conftest.$ac_ext <<_ACEOF
1568#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001569#include "confdefs.h"
1570
Barry Warsawfe33b792003-01-07 22:42:49 +00001571#ifdef F77_DUMMY_MAIN
1572# ifdef __cplusplus
1573 extern "C"
1574# endif
1575 int F77_DUMMY_MAIN() { return 1; }
1576#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00001577int
1578main ()
1579{
Michael W. Hudson54241132001-12-07 15:38:26 +00001580
Martin v. Löwis11437992002-04-12 09:54:03 +00001581 ;
1582 return 0;
1583}
1584_ACEOF
1585ac_clean_files_save=$ac_clean_files
1586ac_clean_files="$ac_clean_files a.out a.exe"
1587# Try to create an executable without -o first, disregard a.out.
1588# It will help us diagnose broken compilers, and finding out an intuition
1589# of exeext.
1590echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1591echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1592ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1593if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1594 (eval $ac_link_default) 2>&5
1595 ac_status=$?
1596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1597 (exit $ac_status); }; then
1598 # Find the output, starting from the most likely. This scheme is
1599# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1600# resort.
1601
1602# Be careful to initialize this variable, since it used to be cached.
1603# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1604ac_cv_exeext=
Barry Warsawfe33b792003-01-07 22:42:49 +00001605for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1606 ls a.out conftest 2>/dev/null;
1607 ls a.* conftest.* 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001608 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00001609 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001610 a.out ) # We found the default executable, but exeext='' is most
1611 # certainly right.
1612 break;;
1613 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1614 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1615 export ac_cv_exeext
1616 break;;
1617 * ) break;;
1618 esac
1619done
1620else
1621 echo "$as_me: failed program was:" >&5
1622cat conftest.$ac_ext >&5
Barry Warsawfe33b792003-01-07 22:42:49 +00001623{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1624echo "$as_me: error: C++ compiler cannot create executables" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001625 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001626fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001627
1628ac_exeext=$ac_cv_exeext
1629echo "$as_me:$LINENO: result: $ac_file" >&5
1630echo "${ECHO_T}$ac_file" >&6
1631
1632# Check the compiler produces executables we can run. If not, either
1633# the compiler is broken, or we cross compile.
1634echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1635echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1636# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1637# If not cross compiling, check that we can run a simple program.
1638if test "$cross_compiling" != yes; then
1639 if { ac_try='./$ac_file'
1640 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1641 (eval $ac_try) 2>&5
1642 ac_status=$?
1643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1644 (exit $ac_status); }; }; then
1645 cross_compiling=no
1646 else
1647 if test "$cross_compiling" = maybe; then
1648 cross_compiling=yes
1649 else
1650 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1651If you meant to cross compile, use \`--host'." >&5
1652echo "$as_me: error: cannot run C++ compiled programs.
1653If you meant to cross compile, use \`--host'." >&2;}
1654 { (exit 1); exit 1; }; }
1655 fi
1656 fi
1657fi
1658echo "$as_me:$LINENO: result: yes" >&5
1659echo "${ECHO_T}yes" >&6
1660
1661rm -f a.out a.exe conftest$ac_cv_exeext
1662ac_clean_files=$ac_clean_files_save
1663# Check the compiler produces executables we can run. If not, either
1664# the compiler is broken, or we cross compile.
1665echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1666echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1667echo "$as_me:$LINENO: result: $cross_compiling" >&5
1668echo "${ECHO_T}$cross_compiling" >&6
1669
1670echo "$as_me:$LINENO: checking for suffix of executables" >&5
1671echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1672if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1673 (eval $ac_link) 2>&5
1674 ac_status=$?
1675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1676 (exit $ac_status); }; then
1677 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1678# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1679# work properly (i.e., refer to `conftest.exe'), while it won't with
1680# `rm'.
Barry Warsawfe33b792003-01-07 22:42:49 +00001681for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001682 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00001683 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001684 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1685 export ac_cv_exeext
1686 break;;
1687 * ) break;;
1688 esac
1689done
1690else
1691 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1692echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1693 { (exit 1); exit 1; }; }
1694fi
1695
1696rm -f conftest$ac_cv_exeext
1697echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1698echo "${ECHO_T}$ac_cv_exeext" >&6
1699
1700rm -f conftest.$ac_ext
1701EXEEXT=$ac_cv_exeext
1702ac_exeext=$EXEEXT
1703
1704 ac_ext=c
1705ac_cpp='$CPP $CPPFLAGS'
1706ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1707ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1708ac_compiler_gnu=$ac_cv_c_compiler_gnu
1709
1710
Martin v. Löwis22352952000-12-13 17:37:02 +00001711
1712 fi
1713fi
1714
Guido van Rossum8b131c51995-03-09 14:10:13 +00001715# If the user switches compilers, we can't believe the cache
1716if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1717then
Martin v. Löwis11437992002-04-12 09:54:03 +00001718 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1719(it is also a good idea to do 'make clean' before compiling)" >&5
1720echo "$as_me: error: cached CC is different -- throw away $cache_file
1721(it is also a good idea to do 'make clean' before compiling)" >&2;}
1722 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001723fi
1724
Martin v. Löwis11437992002-04-12 09:54:03 +00001725ac_ext=c
1726ac_cpp='$CPP $CPPFLAGS'
1727ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1728ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1729ac_compiler_gnu=$ac_cv_c_compiler_gnu
1730if test -n "$ac_tool_prefix"; then
1731 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1732set dummy ${ac_tool_prefix}gcc; ac_word=$2
1733echo "$as_me:$LINENO: checking for $ac_word" >&5
1734echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1735if test "${ac_cv_prog_CC+set}" = set; then
1736 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001737else
1738 if test -n "$CC"; then
1739 ac_cv_prog_CC="$CC" # Let the user override the test.
1740else
Martin v. Löwis11437992002-04-12 09:54:03 +00001741as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1742for as_dir in $PATH
1743do
1744 IFS=$as_save_IFS
1745 test -z "$as_dir" && as_dir=.
1746 for ac_exec_ext in '' $ac_executable_extensions; do
1747 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1748 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1749 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1750 break 2
1751 fi
1752done
1753done
1754
Jack Jansendd19cf82001-12-06 22:36:17 +00001755fi
1756fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001757CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001758if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001759 echo "$as_me:$LINENO: result: $CC" >&5
1760echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001761else
Martin v. Löwis11437992002-04-12 09:54:03 +00001762 echo "$as_me:$LINENO: result: no" >&5
1763echo "${ECHO_T}no" >&6
1764fi
1765
1766fi
1767if test -z "$ac_cv_prog_CC"; then
1768 ac_ct_CC=$CC
1769 # Extract the first word of "gcc", so it can be a program name with args.
1770set dummy gcc; ac_word=$2
1771echo "$as_me:$LINENO: checking for $ac_word" >&5
1772echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1773if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1774 echo $ECHO_N "(cached) $ECHO_C" >&6
1775else
1776 if test -n "$ac_ct_CC"; then
1777 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1778else
1779as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1780for as_dir in $PATH
1781do
1782 IFS=$as_save_IFS
1783 test -z "$as_dir" && as_dir=.
1784 for ac_exec_ext in '' $ac_executable_extensions; do
1785 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1786 ac_cv_prog_ac_ct_CC="gcc"
1787 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1788 break 2
1789 fi
1790done
1791done
1792
1793fi
1794fi
1795ac_ct_CC=$ac_cv_prog_ac_ct_CC
1796if test -n "$ac_ct_CC"; then
1797 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1798echo "${ECHO_T}$ac_ct_CC" >&6
1799else
1800 echo "$as_me:$LINENO: result: no" >&5
1801echo "${ECHO_T}no" >&6
1802fi
1803
1804 CC=$ac_ct_CC
1805else
1806 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001807fi
1808
Jack Jansendd19cf82001-12-06 22:36:17 +00001809if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001810 if test -n "$ac_tool_prefix"; then
1811 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1812set dummy ${ac_tool_prefix}cc; ac_word=$2
1813echo "$as_me:$LINENO: checking for $ac_word" >&5
1814echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1815if test "${ac_cv_prog_CC+set}" = set; then
1816 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001817else
1818 if test -n "$CC"; then
1819 ac_cv_prog_CC="$CC" # Let the user override the test.
1820else
Martin v. Löwis11437992002-04-12 09:54:03 +00001821as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1822for as_dir in $PATH
1823do
1824 IFS=$as_save_IFS
1825 test -z "$as_dir" && as_dir=.
1826 for ac_exec_ext in '' $ac_executable_extensions; do
1827 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1828 ac_cv_prog_CC="${ac_tool_prefix}cc"
1829 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1830 break 2
1831 fi
1832done
1833done
1834
1835fi
1836fi
1837CC=$ac_cv_prog_CC
1838if test -n "$CC"; then
1839 echo "$as_me:$LINENO: result: $CC" >&5
1840echo "${ECHO_T}$CC" >&6
1841else
1842 echo "$as_me:$LINENO: result: no" >&5
1843echo "${ECHO_T}no" >&6
1844fi
1845
1846fi
1847if test -z "$ac_cv_prog_CC"; then
1848 ac_ct_CC=$CC
1849 # Extract the first word of "cc", so it can be a program name with args.
1850set dummy cc; ac_word=$2
1851echo "$as_me:$LINENO: checking for $ac_word" >&5
1852echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1853if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1854 echo $ECHO_N "(cached) $ECHO_C" >&6
1855else
1856 if test -n "$ac_ct_CC"; then
1857 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1858else
1859as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1860for as_dir in $PATH
1861do
1862 IFS=$as_save_IFS
1863 test -z "$as_dir" && as_dir=.
1864 for ac_exec_ext in '' $ac_executable_extensions; do
1865 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1866 ac_cv_prog_ac_ct_CC="cc"
1867 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1868 break 2
1869 fi
1870done
1871done
1872
1873fi
1874fi
1875ac_ct_CC=$ac_cv_prog_ac_ct_CC
1876if test -n "$ac_ct_CC"; then
1877 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1878echo "${ECHO_T}$ac_ct_CC" >&6
1879else
1880 echo "$as_me:$LINENO: result: no" >&5
1881echo "${ECHO_T}no" >&6
1882fi
1883
1884 CC=$ac_ct_CC
1885else
1886 CC="$ac_cv_prog_CC"
1887fi
1888
1889fi
1890if test -z "$CC"; then
1891 # Extract the first word of "cc", so it can be a program name with args.
1892set dummy cc; ac_word=$2
1893echo "$as_me:$LINENO: checking for $ac_word" >&5
1894echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1895if test "${ac_cv_prog_CC+set}" = set; then
1896 echo $ECHO_N "(cached) $ECHO_C" >&6
1897else
1898 if test -n "$CC"; then
1899 ac_cv_prog_CC="$CC" # Let the user override the test.
1900else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001901 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001902as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1903for as_dir in $PATH
1904do
1905 IFS=$as_save_IFS
1906 test -z "$as_dir" && as_dir=.
1907 for ac_exec_ext in '' $ac_executable_extensions; do
1908 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1909 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1910 ac_prog_rejected=yes
1911 continue
1912 fi
1913 ac_cv_prog_CC="cc"
1914 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1915 break 2
1916 fi
1917done
1918done
1919
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001920if test $ac_prog_rejected = yes; then
1921 # We found a bogon in the path, so make sure we never use it.
1922 set dummy $ac_cv_prog_CC
1923 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001924 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001925 # We chose a different compiler from the bogus one.
1926 # However, it has the same basename, so the bogon will be chosen
1927 # first if we set CC to just the basename; use the full file name.
1928 shift
Barry Warsawfe33b792003-01-07 22:42:49 +00001929 set dummy "$as_dir/$ac_word" ${1+"$@"}
1930 shift
1931 ac_cv_prog_CC="$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001932 fi
1933fi
1934fi
1935fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001936CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001937if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001938 echo "$as_me:$LINENO: result: $CC" >&5
1939echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001940else
Martin v. Löwis11437992002-04-12 09:54:03 +00001941 echo "$as_me:$LINENO: result: no" >&5
1942echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001943fi
1944
Martin v. Löwis11437992002-04-12 09:54:03 +00001945fi
1946if test -z "$CC"; then
1947 if test -n "$ac_tool_prefix"; then
1948 for ac_prog in cl
1949 do
1950 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1951set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1952echo "$as_me:$LINENO: checking for $ac_word" >&5
1953echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1954if test "${ac_cv_prog_CC+set}" = set; then
1955 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001956else
1957 if test -n "$CC"; then
1958 ac_cv_prog_CC="$CC" # Let the user override the test.
1959else
Martin v. Löwis11437992002-04-12 09:54:03 +00001960as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1961for as_dir in $PATH
1962do
1963 IFS=$as_save_IFS
1964 test -z "$as_dir" && as_dir=.
1965 for ac_exec_ext in '' $ac_executable_extensions; do
1966 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1967 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1968 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1969 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001970 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001971done
1972done
1973
1974fi
1975fi
1976CC=$ac_cv_prog_CC
1977if test -n "$CC"; then
1978 echo "$as_me:$LINENO: result: $CC" >&5
1979echo "${ECHO_T}$CC" >&6
1980else
1981 echo "$as_me:$LINENO: result: no" >&5
1982echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001983fi
1984
Martin v. Löwis11437992002-04-12 09:54:03 +00001985 test -n "$CC" && break
1986 done
1987fi
1988if test -z "$CC"; then
1989 ac_ct_CC=$CC
1990 for ac_prog in cl
1991do
1992 # Extract the first word of "$ac_prog", so it can be a program name with args.
1993set dummy $ac_prog; ac_word=$2
1994echo "$as_me:$LINENO: checking for $ac_word" >&5
1995echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1996if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1997 echo $ECHO_N "(cached) $ECHO_C" >&6
1998else
1999 if test -n "$ac_ct_CC"; then
2000 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2001else
2002as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2003for as_dir in $PATH
2004do
2005 IFS=$as_save_IFS
2006 test -z "$as_dir" && as_dir=.
2007 for ac_exec_ext in '' $ac_executable_extensions; do
2008 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2009 ac_cv_prog_ac_ct_CC="$ac_prog"
2010 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2011 break 2
2012 fi
2013done
2014done
Jack Jansendd19cf82001-12-06 22:36:17 +00002015
Martin v. Löwis11437992002-04-12 09:54:03 +00002016fi
2017fi
2018ac_ct_CC=$ac_cv_prog_ac_ct_CC
2019if test -n "$ac_ct_CC"; then
2020 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2021echo "${ECHO_T}$ac_ct_CC" >&6
2022else
2023 echo "$as_me:$LINENO: result: no" >&5
2024echo "${ECHO_T}no" >&6
2025fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002026
Martin v. Löwis11437992002-04-12 09:54:03 +00002027 test -n "$ac_ct_CC" && break
2028done
Michael W. Hudson54241132001-12-07 15:38:26 +00002029
Martin v. Löwis11437992002-04-12 09:54:03 +00002030 CC=$ac_ct_CC
2031fi
2032
2033fi
2034
2035
2036test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
2037echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
2038 { (exit 1); exit 1; }; }
2039
2040# Provide some information about the compiler.
2041echo "$as_me:$LINENO:" \
2042 "checking for C compiler version" >&5
2043ac_compiler=`set X $ac_compile; echo $2`
2044{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2045 (eval $ac_compiler --version </dev/null >&5) 2>&5
2046 ac_status=$?
2047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2048 (exit $ac_status); }
2049{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2050 (eval $ac_compiler -v </dev/null >&5) 2>&5
2051 ac_status=$?
2052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2053 (exit $ac_status); }
2054{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2055 (eval $ac_compiler -V </dev/null >&5) 2>&5
2056 ac_status=$?
2057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2058 (exit $ac_status); }
2059
2060cat >conftest.$ac_ext <<_ACEOF
2061#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00002062#include "confdefs.h"
2063
Barry Warsawfe33b792003-01-07 22:42:49 +00002064#ifdef F77_DUMMY_MAIN
2065# ifdef __cplusplus
2066 extern "C"
2067# endif
2068 int F77_DUMMY_MAIN() { return 1; }
2069#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002070int
2071main ()
2072{
2073
2074 ;
2075 return 0;
2076}
2077_ACEOF
2078ac_clean_files_save=$ac_clean_files
2079ac_clean_files="$ac_clean_files a.out a.exe"
2080# Try to create an executable without -o first, disregard a.out.
2081# It will help us diagnose broken compilers, and finding out an intuition
2082# of exeext.
2083echo "$as_me:$LINENO: checking for C compiler default output" >&5
2084echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2085ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2086if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2087 (eval $ac_link_default) 2>&5
2088 ac_status=$?
2089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2090 (exit $ac_status); }; then
2091 # Find the output, starting from the most likely. This scheme is
2092# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2093# resort.
2094
2095# Be careful to initialize this variable, since it used to be cached.
2096# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2097ac_cv_exeext=
Barry Warsawfe33b792003-01-07 22:42:49 +00002098for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
2099 ls a.out conftest 2>/dev/null;
2100 ls a.* conftest.* 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002101 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00002102 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002103 a.out ) # We found the default executable, but exeext='' is most
2104 # certainly right.
2105 break;;
2106 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2107 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2108 export ac_cv_exeext
2109 break;;
2110 * ) break;;
2111 esac
2112done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002113else
Martin v. Löwis11437992002-04-12 09:54:03 +00002114 echo "$as_me: failed program was:" >&5
2115cat conftest.$ac_ext >&5
Barry Warsawfe33b792003-01-07 22:42:49 +00002116{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2117echo "$as_me: error: C compiler cannot create executables" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002118 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002119fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002120
Martin v. Löwis11437992002-04-12 09:54:03 +00002121ac_exeext=$ac_cv_exeext
2122echo "$as_me:$LINENO: result: $ac_file" >&5
2123echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002124
Martin v. Löwis11437992002-04-12 09:54:03 +00002125# Check the compiler produces executables we can run. If not, either
2126# the compiler is broken, or we cross compile.
2127echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2128echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2129# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2130# If not cross compiling, check that we can run a simple program.
2131if test "$cross_compiling" != yes; then
2132 if { ac_try='./$ac_file'
2133 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2134 (eval $ac_try) 2>&5
2135 ac_status=$?
2136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2137 (exit $ac_status); }; }; then
2138 cross_compiling=no
2139 else
2140 if test "$cross_compiling" = maybe; then
2141 cross_compiling=yes
2142 else
2143 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2144If you meant to cross compile, use \`--host'." >&5
2145echo "$as_me: error: cannot run C compiled programs.
2146If you meant to cross compile, use \`--host'." >&2;}
2147 { (exit 1); exit 1; }; }
2148 fi
2149 fi
2150fi
2151echo "$as_me:$LINENO: result: yes" >&5
2152echo "${ECHO_T}yes" >&6
2153
2154rm -f a.out a.exe conftest$ac_cv_exeext
2155ac_clean_files=$ac_clean_files_save
2156# Check the compiler produces executables we can run. If not, either
2157# the compiler is broken, or we cross compile.
2158echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2159echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2160echo "$as_me:$LINENO: result: $cross_compiling" >&5
2161echo "${ECHO_T}$cross_compiling" >&6
2162
2163echo "$as_me:$LINENO: checking for suffix of executables" >&5
2164echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2165if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2166 (eval $ac_link) 2>&5
2167 ac_status=$?
2168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2169 (exit $ac_status); }; then
2170 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2171# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2172# work properly (i.e., refer to `conftest.exe'), while it won't with
2173# `rm'.
Barry Warsawfe33b792003-01-07 22:42:49 +00002174for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002175 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00002176 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002177 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2178 export ac_cv_exeext
2179 break;;
2180 * ) break;;
2181 esac
2182done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002183else
Martin v. Löwis11437992002-04-12 09:54:03 +00002184 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2185echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2186 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002187fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002188
Martin v. Löwis11437992002-04-12 09:54:03 +00002189rm -f conftest$ac_cv_exeext
2190echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2191echo "${ECHO_T}$ac_cv_exeext" >&6
2192
2193rm -f conftest.$ac_ext
2194EXEEXT=$ac_cv_exeext
2195ac_exeext=$EXEEXT
2196echo "$as_me:$LINENO: checking for suffix of object files" >&5
2197echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2198if test "${ac_cv_objext+set}" = set; then
2199 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002200else
Martin v. Löwis11437992002-04-12 09:54:03 +00002201 cat >conftest.$ac_ext <<_ACEOF
2202#line $LINENO "configure"
2203#include "confdefs.h"
2204
Barry Warsawfe33b792003-01-07 22:42:49 +00002205#ifdef F77_DUMMY_MAIN
2206# ifdef __cplusplus
2207 extern "C"
2208# endif
2209 int F77_DUMMY_MAIN() { return 1; }
2210#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002211int
2212main ()
2213{
2214
2215 ;
2216 return 0;
2217}
2218_ACEOF
2219rm -f conftest.o conftest.obj
2220if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2221 (eval $ac_compile) 2>&5
2222 ac_status=$?
2223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2224 (exit $ac_status); }; then
2225 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2226 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00002227 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002228 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2229 break;;
2230 esac
2231done
2232else
2233 echo "$as_me: failed program was:" >&5
2234cat conftest.$ac_ext >&5
2235{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2236echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2237 { (exit 1); exit 1; }; }
2238fi
2239
2240rm -f conftest.$ac_cv_objext conftest.$ac_ext
2241fi
2242echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2243echo "${ECHO_T}$ac_cv_objext" >&6
2244OBJEXT=$ac_cv_objext
2245ac_objext=$OBJEXT
2246echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2247echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2248if test "${ac_cv_c_compiler_gnu+set}" = set; then
2249 echo $ECHO_N "(cached) $ECHO_C" >&6
2250else
2251 cat >conftest.$ac_ext <<_ACEOF
2252#line $LINENO "configure"
2253#include "confdefs.h"
2254
Barry Warsawfe33b792003-01-07 22:42:49 +00002255#ifdef F77_DUMMY_MAIN
2256# ifdef __cplusplus
2257 extern "C"
2258# endif
2259 int F77_DUMMY_MAIN() { return 1; }
2260#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002261int
2262main ()
2263{
2264#ifndef __GNUC__
2265 choke me
2266#endif
2267
2268 ;
2269 return 0;
2270}
2271_ACEOF
2272rm -f conftest.$ac_objext
2273if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2274 (eval $ac_compile) 2>&5
2275 ac_status=$?
2276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2277 (exit $ac_status); } &&
2278 { ac_try='test -s conftest.$ac_objext'
2279 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2280 (eval $ac_try) 2>&5
2281 ac_status=$?
2282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2283 (exit $ac_status); }; }; then
2284 ac_compiler_gnu=yes
2285else
2286 echo "$as_me: failed program was:" >&5
2287cat conftest.$ac_ext >&5
2288ac_compiler_gnu=no
2289fi
2290rm -f conftest.$ac_objext conftest.$ac_ext
2291ac_cv_c_compiler_gnu=$ac_compiler_gnu
2292
2293fi
2294echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2295echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2296GCC=`test $ac_compiler_gnu = yes && echo yes`
2297ac_test_CFLAGS=${CFLAGS+set}
2298ac_save_CFLAGS=$CFLAGS
2299CFLAGS="-g"
2300echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2301echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2302if test "${ac_cv_prog_cc_g+set}" = set; then
2303 echo $ECHO_N "(cached) $ECHO_C" >&6
2304else
2305 cat >conftest.$ac_ext <<_ACEOF
2306#line $LINENO "configure"
2307#include "confdefs.h"
2308
Barry Warsawfe33b792003-01-07 22:42:49 +00002309#ifdef F77_DUMMY_MAIN
2310# ifdef __cplusplus
2311 extern "C"
2312# endif
2313 int F77_DUMMY_MAIN() { return 1; }
2314#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002315int
2316main ()
2317{
2318
2319 ;
2320 return 0;
2321}
2322_ACEOF
2323rm -f conftest.$ac_objext
2324if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2325 (eval $ac_compile) 2>&5
2326 ac_status=$?
2327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2328 (exit $ac_status); } &&
2329 { ac_try='test -s conftest.$ac_objext'
2330 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2331 (eval $ac_try) 2>&5
2332 ac_status=$?
2333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2334 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002335 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002336else
Martin v. Löwis11437992002-04-12 09:54:03 +00002337 echo "$as_me: failed program was:" >&5
2338cat conftest.$ac_ext >&5
2339ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002340fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002341rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002342fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002343echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2344echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002345if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002346 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002347elif test $ac_cv_prog_cc_g = yes; then
2348 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002349 CFLAGS="-g -O2"
2350 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002351 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002352 fi
2353else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002354 if test "$GCC" = yes; then
2355 CFLAGS="-O2"
2356 else
2357 CFLAGS=
2358 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002359fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002360# Some people use a C++ compiler to compile C. Since we use `exit',
2361# in C++ we need to declare it. In case someone uses the same compiler
2362# for both compiling C and C++ we need to have the C++ compiler decide
2363# the declaration of exit, since it's the most demanding environment.
2364cat >conftest.$ac_ext <<_ACEOF
2365#ifndef __cplusplus
2366 choke me
2367#endif
2368_ACEOF
2369rm -f conftest.$ac_objext
2370if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2371 (eval $ac_compile) 2>&5
2372 ac_status=$?
2373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2374 (exit $ac_status); } &&
2375 { ac_try='test -s conftest.$ac_objext'
2376 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2377 (eval $ac_try) 2>&5
2378 ac_status=$?
2379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2380 (exit $ac_status); }; }; then
2381 for ac_declaration in \
2382 ''\
2383 '#include <stdlib.h>' \
2384 'extern "C" void std::exit (int) throw (); using std::exit;' \
2385 'extern "C" void std::exit (int); using std::exit;' \
2386 'extern "C" void exit (int) throw ();' \
2387 'extern "C" void exit (int);' \
2388 'void exit (int);'
2389do
2390 cat >conftest.$ac_ext <<_ACEOF
2391#line $LINENO "configure"
2392#include "confdefs.h"
2393#include <stdlib.h>
2394$ac_declaration
Barry Warsawfe33b792003-01-07 22:42:49 +00002395#ifdef F77_DUMMY_MAIN
2396# ifdef __cplusplus
2397 extern "C"
2398# endif
2399 int F77_DUMMY_MAIN() { return 1; }
2400#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002401int
2402main ()
2403{
2404exit (42);
2405 ;
2406 return 0;
2407}
2408_ACEOF
2409rm -f conftest.$ac_objext
2410if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2411 (eval $ac_compile) 2>&5
2412 ac_status=$?
2413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2414 (exit $ac_status); } &&
2415 { ac_try='test -s conftest.$ac_objext'
2416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2417 (eval $ac_try) 2>&5
2418 ac_status=$?
2419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2420 (exit $ac_status); }; }; then
2421 :
2422else
2423 echo "$as_me: failed program was:" >&5
2424cat conftest.$ac_ext >&5
2425continue
2426fi
2427rm -f conftest.$ac_objext conftest.$ac_ext
2428 cat >conftest.$ac_ext <<_ACEOF
2429#line $LINENO "configure"
2430#include "confdefs.h"
2431$ac_declaration
Barry Warsawfe33b792003-01-07 22:42:49 +00002432#ifdef F77_DUMMY_MAIN
2433# ifdef __cplusplus
2434 extern "C"
2435# endif
2436 int F77_DUMMY_MAIN() { return 1; }
2437#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002438int
2439main ()
2440{
2441exit (42);
2442 ;
2443 return 0;
2444}
2445_ACEOF
2446rm -f conftest.$ac_objext
2447if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2448 (eval $ac_compile) 2>&5
2449 ac_status=$?
2450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2451 (exit $ac_status); } &&
2452 { ac_try='test -s conftest.$ac_objext'
2453 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2454 (eval $ac_try) 2>&5
2455 ac_status=$?
2456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2457 (exit $ac_status); }; }; then
2458 break
2459else
2460 echo "$as_me: failed program was:" >&5
2461cat conftest.$ac_ext >&5
2462fi
2463rm -f conftest.$ac_objext conftest.$ac_ext
2464done
2465rm -f conftest*
2466if test -n "$ac_declaration"; then
2467 echo '#ifdef __cplusplus' >>confdefs.h
2468 echo $ac_declaration >>confdefs.h
2469 echo '#endif' >>confdefs.h
2470fi
2471
2472else
2473 echo "$as_me: failed program was:" >&5
2474cat conftest.$ac_ext >&5
2475fi
2476rm -f conftest.$ac_objext conftest.$ac_ext
2477ac_ext=c
2478ac_cpp='$CPP $CPPFLAGS'
2479ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2480ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2481ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002482
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002483
2484# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002485
2486ac_ext=c
2487ac_cpp='$CPP $CPPFLAGS'
2488ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2489ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2490ac_compiler_gnu=$ac_cv_c_compiler_gnu
2491echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2492echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002493# On Suns, sometimes $CPP names a directory.
2494if test -n "$CPP" && test -d "$CPP"; then
2495 CPP=
2496fi
2497if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002498 if test "${ac_cv_prog_CPP+set}" = set; then
2499 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002500else
Martin v. Löwis11437992002-04-12 09:54:03 +00002501 # Double quotes because CPP needs to be expanded
2502 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2503 do
2504 ac_preproc_ok=false
2505for ac_c_preproc_warn_flag in '' yes
2506do
2507 # Use a header file that comes with gcc, so configuring glibc
2508 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002509 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002510 # not just through cpp. "Syntax error" is here to catch this case.
2511 cat >conftest.$ac_ext <<_ACEOF
2512#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002513#include "confdefs.h"
2514#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002515 Syntax error
2516_ACEOF
2517if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2518 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2519 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002520 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 rm -f conftest.er1
2522 cat conftest.err >&5
2523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2524 (exit $ac_status); } >/dev/null; then
2525 if test -s conftest.err; then
2526 ac_cpp_err=$ac_c_preproc_warn_flag
2527 else
2528 ac_cpp_err=
2529 fi
2530else
2531 ac_cpp_err=yes
2532fi
2533if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002534 :
2535else
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002537 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002538 # Broken: fails on valid input.
2539continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002540fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002541rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002542
Martin v. Löwis11437992002-04-12 09:54:03 +00002543 # OK, works on sane cases. Now check whether non-existent headers
2544 # can be detected and how.
2545 cat >conftest.$ac_ext <<_ACEOF
2546#line $LINENO "configure"
2547#include "confdefs.h"
2548#include <ac_nonexistent.h>
2549_ACEOF
2550if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2551 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2552 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002553 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002554 rm -f conftest.er1
2555 cat conftest.err >&5
2556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2557 (exit $ac_status); } >/dev/null; then
2558 if test -s conftest.err; then
2559 ac_cpp_err=$ac_c_preproc_warn_flag
2560 else
2561 ac_cpp_err=
2562 fi
2563else
2564 ac_cpp_err=yes
2565fi
2566if test -z "$ac_cpp_err"; then
2567 # Broken: success on invalid input.
2568continue
2569else
2570 echo "$as_me: failed program was:" >&5
2571 cat conftest.$ac_ext >&5
2572 # Passes both tests.
2573ac_preproc_ok=:
2574break
2575fi
2576rm -f conftest.err conftest.$ac_ext
2577
2578done
2579# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2580rm -f conftest.err conftest.$ac_ext
2581if $ac_preproc_ok; then
2582 break
2583fi
2584
2585 done
2586 ac_cv_prog_CPP=$CPP
2587
2588fi
2589 CPP=$ac_cv_prog_CPP
2590else
2591 ac_cv_prog_CPP=$CPP
2592fi
2593echo "$as_me:$LINENO: result: $CPP" >&5
2594echo "${ECHO_T}$CPP" >&6
2595ac_preproc_ok=false
2596for ac_c_preproc_warn_flag in '' yes
2597do
2598 # Use a header file that comes with gcc, so configuring glibc
2599 # with a fresh cross-compiler works.
2600 # On the NeXT, cc -E runs the code through the compiler's parser,
2601 # not just through cpp. "Syntax error" is here to catch this case.
2602 cat >conftest.$ac_ext <<_ACEOF
2603#line $LINENO "configure"
2604#include "confdefs.h"
2605#include <assert.h>
2606 Syntax error
2607_ACEOF
2608if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2609 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2610 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002611 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002612 rm -f conftest.er1
2613 cat conftest.err >&5
2614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2615 (exit $ac_status); } >/dev/null; then
2616 if test -s conftest.err; then
2617 ac_cpp_err=$ac_c_preproc_warn_flag
2618 else
2619 ac_cpp_err=
2620 fi
2621else
2622 ac_cpp_err=yes
2623fi
2624if test -z "$ac_cpp_err"; then
2625 :
2626else
2627 echo "$as_me: failed program was:" >&5
2628 cat conftest.$ac_ext >&5
2629 # Broken: fails on valid input.
2630continue
2631fi
2632rm -f conftest.err conftest.$ac_ext
2633
2634 # OK, works on sane cases. Now check whether non-existent headers
2635 # can be detected and how.
2636 cat >conftest.$ac_ext <<_ACEOF
2637#line $LINENO "configure"
2638#include "confdefs.h"
2639#include <ac_nonexistent.h>
2640_ACEOF
2641if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2642 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2643 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002644 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002645 rm -f conftest.er1
2646 cat conftest.err >&5
2647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2648 (exit $ac_status); } >/dev/null; then
2649 if test -s conftest.err; then
2650 ac_cpp_err=$ac_c_preproc_warn_flag
2651 else
2652 ac_cpp_err=
2653 fi
2654else
2655 ac_cpp_err=yes
2656fi
2657if test -z "$ac_cpp_err"; then
2658 # Broken: success on invalid input.
2659continue
2660else
2661 echo "$as_me: failed program was:" >&5
2662 cat conftest.$ac_ext >&5
2663 # Passes both tests.
2664ac_preproc_ok=:
2665break
2666fi
2667rm -f conftest.err conftest.$ac_ext
2668
2669done
2670# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2671rm -f conftest.err conftest.$ac_ext
2672if $ac_preproc_ok; then
2673 :
2674else
2675 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2676echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2677 { (exit 1); exit 1; }; }
2678fi
2679
2680ac_ext=c
2681ac_cpp='$CPP $CPPFLAGS'
2682ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2683ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2684ac_compiler_gnu=$ac_cv_c_compiler_gnu
2685
2686
2687
2688echo "$as_me:$LINENO: checking for AIX" >&5
2689echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2690cat >conftest.$ac_ext <<_ACEOF
2691#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002692#include "confdefs.h"
2693#ifdef _AIX
2694 yes
2695#endif
2696
Martin v. Löwis11437992002-04-12 09:54:03 +00002697_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002698if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00002699 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002700 echo "$as_me:$LINENO: result: yes" >&5
2701echo "${ECHO_T}yes" >&6
2702cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002703#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002704_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002705
2706else
Martin v. Löwis11437992002-04-12 09:54:03 +00002707 echo "$as_me:$LINENO: result: no" >&5
2708echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002709fi
2710rm -f conftest*
2711
Michael W. Hudson54241132001-12-07 15:38:26 +00002712
Martin v. Löwis11437992002-04-12 09:54:03 +00002713echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2714echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2715if test "${ac_cv_header_stdc+set}" = set; then
2716 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002717else
Martin v. Löwis11437992002-04-12 09:54:03 +00002718 cat >conftest.$ac_ext <<_ACEOF
2719#line $LINENO "configure"
2720#include "confdefs.h"
2721#include <stdlib.h>
2722#include <stdarg.h>
2723#include <string.h>
2724#include <float.h>
2725
2726_ACEOF
2727if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2728 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2729 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002730 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002731 rm -f conftest.er1
2732 cat conftest.err >&5
2733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2734 (exit $ac_status); } >/dev/null; then
2735 if test -s conftest.err; then
2736 ac_cpp_err=$ac_c_preproc_warn_flag
2737 else
2738 ac_cpp_err=
2739 fi
2740else
2741 ac_cpp_err=yes
2742fi
2743if test -z "$ac_cpp_err"; then
2744 ac_cv_header_stdc=yes
2745else
2746 echo "$as_me: failed program was:" >&5
2747 cat conftest.$ac_ext >&5
2748 ac_cv_header_stdc=no
2749fi
2750rm -f conftest.err conftest.$ac_ext
2751
2752if test $ac_cv_header_stdc = yes; then
2753 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2754 cat >conftest.$ac_ext <<_ACEOF
2755#line $LINENO "configure"
2756#include "confdefs.h"
2757#include <string.h>
2758
2759_ACEOF
2760if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00002761 egrep "memchr" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002762 :
2763else
2764 ac_cv_header_stdc=no
2765fi
2766rm -f conftest*
2767
2768fi
2769
2770if test $ac_cv_header_stdc = yes; then
2771 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2772 cat >conftest.$ac_ext <<_ACEOF
2773#line $LINENO "configure"
2774#include "confdefs.h"
2775#include <stdlib.h>
2776
2777_ACEOF
2778if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00002779 egrep "free" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002780 :
2781else
2782 ac_cv_header_stdc=no
2783fi
2784rm -f conftest*
2785
2786fi
2787
2788if test $ac_cv_header_stdc = yes; then
2789 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2790 if test "$cross_compiling" = yes; then
2791 :
2792else
2793 cat >conftest.$ac_ext <<_ACEOF
2794#line $LINENO "configure"
2795#include "confdefs.h"
2796#include <ctype.h>
2797#if ((' ' & 0x0FF) == 0x020)
2798# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2799# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2800#else
2801# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2802 || ('j' <= (c) && (c) <= 'r') \
2803 || ('s' <= (c) && (c) <= 'z'))
2804# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2805#endif
2806
2807#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2808int
2809main ()
2810{
2811 int i;
2812 for (i = 0; i < 256; i++)
2813 if (XOR (islower (i), ISLOWER (i))
2814 || toupper (i) != TOUPPER (i))
2815 exit(2);
2816 exit (0);
2817}
2818_ACEOF
2819rm -f conftest$ac_exeext
2820if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2821 (eval $ac_link) 2>&5
2822 ac_status=$?
2823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2824 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2826 (eval $ac_try) 2>&5
2827 ac_status=$?
2828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2829 (exit $ac_status); }; }; then
2830 :
2831else
2832 echo "$as_me: program exited with status $ac_status" >&5
2833echo "$as_me: failed program was:" >&5
2834cat conftest.$ac_ext >&5
2835( exit $ac_status )
2836ac_cv_header_stdc=no
2837fi
Barry Warsawfe33b792003-01-07 22:42:49 +00002838rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002839fi
2840fi
2841fi
2842echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2843echo "${ECHO_T}$ac_cv_header_stdc" >&6
2844if test $ac_cv_header_stdc = yes; then
2845
2846cat >>confdefs.h <<\_ACEOF
2847#define STDC_HEADERS 1
2848_ACEOF
2849
2850fi
2851
2852# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2863 inttypes.h stdint.h unistd.h
2864do
2865as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2866echo "$as_me:$LINENO: checking for $ac_header" >&5
2867echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2868if eval "test \"\${$as_ac_Header+set}\" = set"; then
2869 echo $ECHO_N "(cached) $ECHO_C" >&6
2870else
2871 cat >conftest.$ac_ext <<_ACEOF
2872#line $LINENO "configure"
2873#include "confdefs.h"
2874$ac_includes_default
2875
2876#include <$ac_header>
2877_ACEOF
2878rm -f conftest.$ac_objext
2879if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2880 (eval $ac_compile) 2>&5
2881 ac_status=$?
2882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2883 (exit $ac_status); } &&
2884 { ac_try='test -s conftest.$ac_objext'
2885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2886 (eval $ac_try) 2>&5
2887 ac_status=$?
2888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2889 (exit $ac_status); }; }; then
2890 eval "$as_ac_Header=yes"
2891else
2892 echo "$as_me: failed program was:" >&5
2893cat conftest.$ac_ext >&5
2894eval "$as_ac_Header=no"
2895fi
2896rm -f conftest.$ac_objext conftest.$ac_ext
2897fi
2898echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2899echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2900if test `eval echo '${'$as_ac_Header'}'` = yes; then
2901 cat >>confdefs.h <<_ACEOF
2902#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2903_ACEOF
2904
2905fi
2906
2907done
2908
2909
2910if test "${ac_cv_header_minix_config_h+set}" = set; then
2911 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2912echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2913if test "${ac_cv_header_minix_config_h+set}" = set; then
2914 echo $ECHO_N "(cached) $ECHO_C" >&6
2915fi
2916echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2917echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2918else
2919 # Is the header compilable?
2920echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2921echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2922cat >conftest.$ac_ext <<_ACEOF
2923#line $LINENO "configure"
2924#include "confdefs.h"
2925$ac_includes_default
2926#include <minix/config.h>
2927_ACEOF
2928rm -f conftest.$ac_objext
2929if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2930 (eval $ac_compile) 2>&5
2931 ac_status=$?
2932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2933 (exit $ac_status); } &&
2934 { ac_try='test -s conftest.$ac_objext'
2935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2936 (eval $ac_try) 2>&5
2937 ac_status=$?
2938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2939 (exit $ac_status); }; }; then
2940 ac_header_compiler=yes
2941else
2942 echo "$as_me: failed program was:" >&5
2943cat conftest.$ac_ext >&5
2944ac_header_compiler=no
2945fi
2946rm -f conftest.$ac_objext conftest.$ac_ext
2947echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2948echo "${ECHO_T}$ac_header_compiler" >&6
2949
2950# Is the header present?
2951echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2952echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2953cat >conftest.$ac_ext <<_ACEOF
2954#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002955#include "confdefs.h"
2956#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002957_ACEOF
2958if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2959 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2960 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002961 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002962 rm -f conftest.er1
2963 cat conftest.err >&5
2964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2965 (exit $ac_status); } >/dev/null; then
2966 if test -s conftest.err; then
2967 ac_cpp_err=$ac_c_preproc_warn_flag
2968 else
2969 ac_cpp_err=
2970 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002971else
Martin v. Löwis11437992002-04-12 09:54:03 +00002972 ac_cpp_err=yes
2973fi
2974if test -z "$ac_cpp_err"; then
2975 ac_header_preproc=yes
2976else
2977 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002978 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002979 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002980fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002981rm -f conftest.err conftest.$ac_ext
2982echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
2983echo "${ECHO_T}$ac_header_preproc" >&6
2984
2985# So? What about this header?
2986case $ac_header_compiler:$ac_header_preproc in
2987 yes:no )
2988 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
2989echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
2990 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2991echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2992 no:yes )
2993 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
2994echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
2995 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
2996echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
2997 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2998echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2999esac
3000echo "$as_me:$LINENO: checking for minix/config.h" >&5
3001echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3002if test "${ac_cv_header_minix_config_h+set}" = set; then
3003 echo $ECHO_N "(cached) $ECHO_C" >&6
3004else
3005 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003006fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003007echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3008echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3009
3010fi
3011if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003012 MINIX=yes
3013else
Martin v. Löwis11437992002-04-12 09:54:03 +00003014 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003015fi
3016
Martin v. Löwis11437992002-04-12 09:54:03 +00003017
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003018if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003019
3020cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003021#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003022_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003023
Martin v. Löwis11437992002-04-12 09:54:03 +00003024
3025cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003026#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00003027_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003028
Martin v. Löwis11437992002-04-12 09:54:03 +00003029
3030cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003031#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003032_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003033
3034fi
3035
3036
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003037# Check for unsupported systems
3038case $ac_sys_system/$ac_sys_release in
3039SunOS/4*|DYNIX/*|dgux*/*|IRIX/4*|Linux*/1*)
3040 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3041 echo See README for details.
3042 exit 1;;
3043esac
3044
3045if test "$MINIX" = yes; then
3046 echo This system \(MINIX\) is no longer supported.
3047 echo Read README for details.
3048 exit 1
3049fi
3050
Michael W. Hudson54241132001-12-07 15:38:26 +00003051
Martin v. Löwis11437992002-04-12 09:54:03 +00003052echo "$as_me:$LINENO: checking for --with-suffix" >&5
3053echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003054
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003055# Check whether --with-suffix or --without-suffix was given.
3056if test "${with_suffix+set}" = set; then
3057 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003058
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003059 case $withval in
3060 no) EXEEXT=;;
3061 yes) EXEEXT=.exe;;
3062 *) EXEEXT=$withval;;
3063 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003064fi;
3065echo "$as_me:$LINENO: result: $EXEEXT" >&5
3066echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003067
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003068# Test whether we're running on a non-case-sensitive system, in which
3069# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003070
Martin v. Löwis11437992002-04-12 09:54:03 +00003071echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3072echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003073if test ! -d CaseSensitiveTestDir; then
3074mkdir CaseSensitiveTestDir
3075fi
3076
3077if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003078then
Martin v. Löwis11437992002-04-12 09:54:03 +00003079 echo "$as_me:$LINENO: result: yes" >&5
3080echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003081 BUILDEXEEXT=.exe
3082else
Martin v. Löwis11437992002-04-12 09:54:03 +00003083 echo "$as_me:$LINENO: result: no" >&5
3084echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003085 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003086fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003087rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003088
Guido van Rossumdd997f71998-10-07 19:58:26 +00003089case $MACHDEP in
3090bsdos*)
3091 case $CC in
3092 gcc) CC="$CC -D_HAVE_BSDI";;
3093 esac;;
3094esac
3095
Guido van Rossum24b1e751997-08-21 02:29:16 +00003096case $ac_sys_system in
3097hp*|HP*)
3098 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003099 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003100 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003101Monterey*)
3102 case $CC in
3103 cc) CC="$CC -Wl,-Bexport";;
3104 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003105SunOS*)
3106 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003107
3108cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003109#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003110_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003111
3112 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003113esac
3114
Michael W. Hudson54241132001-12-07 15:38:26 +00003115
3116
Martin v. Löwis11437992002-04-12 09:54:03 +00003117echo "$as_me:$LINENO: checking LIBRARY" >&5
3118echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003119if test -z "$LIBRARY"
3120then
3121 LIBRARY='libpython$(VERSION).a'
3122fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003123echo "$as_me:$LINENO: result: $LIBRARY" >&5
3124echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003125
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003126# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003127# name of the library into which to insert object files). BLDLIBRARY is also
3128# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3129# is blank as the main program is not linked directly against LDLIBRARY.
3130# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3131# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3132# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3133# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003134#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003135# RUNSHARED is used to run shared python without installed libraries
3136#
3137# INSTSONAME is the name of the shared library that will be use to install
3138# on the system - some systems like version suffix, others don't
3139
3140
Michael W. Hudson54241132001-12-07 15:38:26 +00003141
3142
3143
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003144
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003145LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003146BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003147INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003148DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003149LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003150RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003151
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003152# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003153# If CXX is set, and if it is needed to link a main function that was
3154# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3155# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003156# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003157# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003158
Martin v. Löwis11437992002-04-12 09:54:03 +00003159echo "$as_me:$LINENO: checking LINKCC" >&5
3160echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003161if test -z "$LINKCC"
3162then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003163 if test -z "$CXX"; then
3164 LINKCC="\$(PURIFY) \$(CC)"
3165 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003166 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003167 $CXX -c conftest.$ac_ext 2>&5
3168 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3169 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3170 then
3171 LINKCC="\$(PURIFY) \$(CC)"
3172 else
3173 LINKCC="\$(PURIFY) \$(CXX)"
3174 fi
3175 rm -fr conftest*
3176 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003177 case $ac_sys_system in
3178 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003179 exp_extra="\"\""
3180 if test $ac_sys_release -ge 5 -o \
3181 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3182 exp_extra="."
3183 fi
3184 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003185 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003186 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003187 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003188 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003189 esac
3190fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003191echo "$as_me:$LINENO: result: $LINKCC" >&5
3192echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003193
Martin v. Löwis11437992002-04-12 09:54:03 +00003194echo "$as_me:$LINENO: checking for --enable-shared" >&5
3195echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003196# Check whether --enable-shared or --disable-shared was given.
3197if test "${enable_shared+set}" = set; then
3198 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003199
Martin v. Löwis11437992002-04-12 09:54:03 +00003200fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003201
3202if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003203then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003204 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003205 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003206 enable_shared="yes";;
3207 *)
3208 enable_shared="no";;
3209 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003210fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003211echo "$as_me:$LINENO: result: $enable_shared" >&5
3212echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003213
3214
Martin v. Löwis11437992002-04-12 09:54:03 +00003215echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3216echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003217
Guido van Rossumb8552162001-09-05 14:58:11 +00003218# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3219# library that we build, but we do not want to link against it (we
3220# will find it with a -framework option). For this reason there is an
3221# extra variable BLDLIBRARY against which Python and the extension
3222# modules are linked, BLDLIBRARY. This is normally the same as
3223# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003224if test "$enable_framework"
3225then
3226 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3227 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3228 BLDLIBRARY=''
3229else
3230 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003231fi
Jack Jansene578a632001-08-15 01:27:14 +00003232
Martin v. Löwis1142de32002-03-29 16:28:31 +00003233# Other platforms follow
3234if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003235
3236cat >>confdefs.h <<\_ACEOF
3237#define Py_ENABLE_SHARED 1
3238_ACEOF
3239
Martin v. Löwis1142de32002-03-29 16:28:31 +00003240 case $ac_sys_system in
3241 BeOS*)
3242 LDLIBRARY='libpython$(VERSION).so'
3243 ;;
3244 CYGWIN*)
3245 LDLIBRARY='libpython$(VERSION).dll.a'
3246 DLLLIBRARY='libpython$(VERSION).dll'
3247 ;;
3248 SunOS*)
3249 LDLIBRARY='libpython$(VERSION).so'
3250 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3251 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3252 ;;
Martin v. Löwis1bc894b2002-07-30 20:19:58 +00003253 Linux*|GNU*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003254 LDLIBRARY='libpython$(VERSION).so'
3255 BLDLIBRARY='-L. -lpython$(VERSION)'
3256 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3257 INSTSONAME="$LDLIBRARY".$SOVERSION
3258 ;;
3259 hp*|HP*)
3260 LDLIBRARY='libpython$(VERSION).sl'
3261 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3262 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3263 ;;
3264 OSF*)
3265 LDLIBRARY='libpython$(VERSION).so'
3266 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3267 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3268 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003269 atheos*)
3270 LDLIBRARY='libpython$(VERSION).so'
3271 BLDLIBRARY='-L. -lpython$(VERSION)'
3272 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3273 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003274 esac
3275 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3276 case $MACHDEP in
3277 dguxR4)
3278 LDLIBRARY='libpython$(VERSION).so'
Skip Montanarodecc6a42003-01-01 20:07:49 +00003279 BASECFLAGS="$BASECFLAGS -pic"
Martin v. Löwis1142de32002-03-29 16:28:31 +00003280 ;;
3281 esac
3282fi
3283
Martin v. Löwis11437992002-04-12 09:54:03 +00003284echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3285echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003286
Martin v. Löwis11437992002-04-12 09:54:03 +00003287if test -n "$ac_tool_prefix"; then
3288 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3289set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3290echo "$as_me:$LINENO: checking for $ac_word" >&5
3291echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3292if test "${ac_cv_prog_RANLIB+set}" = set; then
3293 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003294else
3295 if test -n "$RANLIB"; then
3296 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3297else
Martin v. Löwis11437992002-04-12 09:54:03 +00003298as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3299for as_dir in $PATH
3300do
3301 IFS=$as_save_IFS
3302 test -z "$as_dir" && as_dir=.
3303 for ac_exec_ext in '' $ac_executable_extensions; do
3304 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3305 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3306 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3307 break 2
3308 fi
3309done
3310done
3311
Guido van Rossum627b2d71993-12-24 10:39:16 +00003312fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003313fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003314RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003315if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003316 echo "$as_me:$LINENO: result: $RANLIB" >&5
3317echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003318else
Martin v. Löwis11437992002-04-12 09:54:03 +00003319 echo "$as_me:$LINENO: result: no" >&5
3320echo "${ECHO_T}no" >&6
3321fi
3322
3323fi
3324if test -z "$ac_cv_prog_RANLIB"; then
3325 ac_ct_RANLIB=$RANLIB
3326 # Extract the first word of "ranlib", so it can be a program name with args.
3327set dummy ranlib; ac_word=$2
3328echo "$as_me:$LINENO: checking for $ac_word" >&5
3329echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3330if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3331 echo $ECHO_N "(cached) $ECHO_C" >&6
3332else
3333 if test -n "$ac_ct_RANLIB"; then
3334 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3335else
3336as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3337for as_dir in $PATH
3338do
3339 IFS=$as_save_IFS
3340 test -z "$as_dir" && as_dir=.
3341 for ac_exec_ext in '' $ac_executable_extensions; do
3342 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3343 ac_cv_prog_ac_ct_RANLIB="ranlib"
3344 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3345 break 2
3346 fi
3347done
3348done
3349
3350 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3351fi
3352fi
3353ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3354if test -n "$ac_ct_RANLIB"; then
3355 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3356echo "${ECHO_T}$ac_ct_RANLIB" >&6
3357else
3358 echo "$as_me:$LINENO: result: no" >&5
3359echo "${ECHO_T}no" >&6
3360fi
3361
3362 RANLIB=$ac_ct_RANLIB
3363else
3364 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003365fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003366
3367
Guido van Rossum7f43da71994-08-01 12:15:30 +00003368for ac_prog in ar aal
3369do
Martin v. Löwis11437992002-04-12 09:54:03 +00003370 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003371set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003372echo "$as_me:$LINENO: checking for $ac_word" >&5
3373echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3374if test "${ac_cv_prog_AR+set}" = set; then
3375 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003376else
3377 if test -n "$AR"; then
3378 ac_cv_prog_AR="$AR" # Let the user override the test.
3379else
Martin v. Löwis11437992002-04-12 09:54:03 +00003380as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3381for as_dir in $PATH
3382do
3383 IFS=$as_save_IFS
3384 test -z "$as_dir" && as_dir=.
3385 for ac_exec_ext in '' $ac_executable_extensions; do
3386 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3387 ac_cv_prog_AR="$ac_prog"
3388 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3389 break 2
3390 fi
3391done
3392done
3393
Guido van Rossum7f43da71994-08-01 12:15:30 +00003394fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003395fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003396AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003397if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003398 echo "$as_me:$LINENO: result: $AR" >&5
3399echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003400else
Martin v. Löwis11437992002-04-12 09:54:03 +00003401 echo "$as_me:$LINENO: result: no" >&5
3402echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003403fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003404
Martin v. Löwis11437992002-04-12 09:54:03 +00003405 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003406done
3407test -n "$AR" || AR="ar"
3408
Michael W. Hudson54241132001-12-07 15:38:26 +00003409
Neil Schemenauera42c8272001-03-31 00:01:55 +00003410case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003411bsdos*|hp*|HP*)
3412 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003413 if test -z "$INSTALL"
3414 then
3415 INSTALL="${srcdir}/install-sh -c"
3416 fi
3417esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003418ac_aux_dir=
3419for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3420 if test -f $ac_dir/install-sh; then
3421 ac_aux_dir=$ac_dir
3422 ac_install_sh="$ac_aux_dir/install-sh -c"
3423 break
3424 elif test -f $ac_dir/install.sh; then
3425 ac_aux_dir=$ac_dir
3426 ac_install_sh="$ac_aux_dir/install.sh -c"
3427 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003428 elif test -f $ac_dir/shtool; then
3429 ac_aux_dir=$ac_dir
3430 ac_install_sh="$ac_aux_dir/shtool install -c"
3431 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003432 fi
3433done
3434if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003435 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3436echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3437 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003438fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003439ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3440ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3441ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003442
3443# Find a good install program. We prefer a C program (faster),
3444# so one script is as good as another. But avoid the broken or
3445# incompatible versions:
3446# SysV /etc/install, /usr/sbin/install
3447# SunOS /usr/etc/install
3448# IRIX /sbin/install
3449# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003450# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003451# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3452# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3453# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3454# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003455echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3456echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003457if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003458if test "${ac_cv_path_install+set}" = set; then
3459 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003460else
Martin v. Löwis11437992002-04-12 09:54:03 +00003461 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3462for as_dir in $PATH
3463do
3464 IFS=$as_save_IFS
3465 test -z "$as_dir" && as_dir=.
3466 # Account for people who put trailing slashes in PATH elements.
3467case $as_dir/ in
3468 ./ | .// | /cC/* | \
3469 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3470 /usr/ucb/* ) ;;
3471 *)
3472 # OSF1 and SCO ODT 3.0 have their own names for install.
3473 # Don't use installbsd from OSF since it installs stuff as root
3474 # by default.
3475 for ac_prog in ginstall scoinst install; do
3476 for ac_exec_ext in '' $ac_executable_extensions; do
3477 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3478 if test $ac_prog = install &&
3479 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3480 # AIX install. It has an incompatible calling convention.
3481 :
3482 elif test $ac_prog = install &&
3483 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3484 # program-specific install script used by HP pwplus--don't use.
3485 :
3486 else
3487 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3488 break 3
3489 fi
3490 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003491 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003492 done
3493 ;;
3494esac
3495done
3496
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003497
3498fi
3499 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003500 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003501 else
3502 # As a last resort, use the slow shell script. We don't cache a
3503 # path for INSTALL within a source directory, because that will
3504 # break other packages using the cache if that directory is
3505 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003506 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003507 fi
3508fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003509echo "$as_me:$LINENO: result: $INSTALL" >&5
3510echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003511
3512# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3513# It thinks the first close brace ends the variable substitution.
3514test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3515
Martin v. Löwis11437992002-04-12 09:54:03 +00003516test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003517
3518test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3519
Michael W. Hudson54241132001-12-07 15:38:26 +00003520
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003521# Not every filesystem supports hard links
3522
3523if test -z "$LN" ; then
3524 case $ac_sys_system in
3525 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003526 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003527 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003528 *) LN=ln;;
3529 esac
3530fi
3531
Fred Drake109d9862001-07-11 06:27:56 +00003532# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003533echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3534echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3535
Fred Drake109d9862001-07-11 06:27:56 +00003536# Check whether --with-pydebug or --without-pydebug was given.
3537if test "${with_pydebug+set}" = set; then
3538 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003539
Fred Drake109d9862001-07-11 06:27:56 +00003540if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003541then
3542
3543cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003544#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003545_ACEOF
3546
3547 echo "$as_me:$LINENO: result: yes" >&5
3548echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003549 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003550else echo "$as_me:$LINENO: result: no" >&5
3551echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003552fi
3553else
Martin v. Löwis11437992002-04-12 09:54:03 +00003554 echo "$as_me:$LINENO: result: no" >&5
3555echo "${ECHO_T}no" >&6
3556fi;
Fred Drake109d9862001-07-11 06:27:56 +00003557
Skip Montanarodecc6a42003-01-01 20:07:49 +00003558# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3559# merged with this chunk of code?
3560
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003561# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003562# ------------------------
3563# (The following bit of code is complicated enough - please keep things
3564# indented properly. Just pretend you're editing Python code. ;-)
3565
3566# There are two parallel sets of case statements below, one that checks to
3567# see if OPT was set and one that does BASECFLAGS setting based upon
3568# compiler and platform. BASECFLAGS tweaks need to be made even if the
3569# user set OPT.
3570
3571# tweak OPT based on compiler and platform, only if the user didn't set
3572# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003573
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003574if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003575then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003576 case $GCC in
3577 yes)
3578 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003579 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003580 if test "$Py_DEBUG" = 'true' ; then
3581 # Optimization messes up debuggers, so turn it off for
3582 # debug builds.
3583 OPT="-g -Wall -Wstrict-prototypes"
3584 else
3585 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003586 fi
3587 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003588 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003589 OPT="-O3 -Wall -Wstrict-prototypes"
3590 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003591 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003592 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003593 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3594 ;;
3595 esac
Fred Drake109d9862001-07-11 06:27:56 +00003596 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003597
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003598 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003599 OPT="-O"
3600 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003601 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003602
3603 # The current (beta) Monterey compiler dies with optimizations
3604 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003605 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003606 Monterey*)
3607 OPT=""
3608 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003609 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003610
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003611fi
3612
Skip Montanarodecc6a42003-01-01 20:07:49 +00003613
3614# tweak BASECFLAGS based on compiler and platform
3615case $GCC in
3616yes)
3617 case $ac_sys_system in
3618 SCO_SV*)
3619 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3620 ;;
3621 # is there any other compiler on Darwin besides gcc?
3622 Darwin*)
3623 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp"
3624 ;;
3625 esac
3626 ;;
3627
3628*)
3629 case $ac_sys_system in
3630 OpenUNIX*|UnixWare*)
3631 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3632 ;;
3633 SCO_SV*)
3634 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3635 ;;
3636 esac
3637 ;;
3638esac
3639
Fred Drakee1ceaa02001-12-04 20:55:47 +00003640if test "$Py_DEBUG" = 'true'; then
3641 :
3642else
3643 OPT="-DNDEBUG $OPT"
3644fi
3645
Guido van Rossum563e7081996-09-10 18:20:48 +00003646if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003647then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003648 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003649fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003650
Martin v. Löwis11437992002-04-12 09:54:03 +00003651echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3652echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3653if test "${ac_cv_opt_olimit_ok+set}" = set; then
3654 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003655else
3656 ac_save_cc="$CC"
3657CC="$CC -OPT:Olimit=0"
3658if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003659 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003660else
Martin v. Löwis11437992002-04-12 09:54:03 +00003661 cat >conftest.$ac_ext <<_ACEOF
3662#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003663#include "confdefs.h"
3664int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003665_ACEOF
3666rm -f conftest$ac_exeext
3667if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3668 (eval $ac_link) 2>&5
3669 ac_status=$?
3670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3671 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3673 (eval $ac_try) 2>&5
3674 ac_status=$?
3675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3676 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003677 ac_cv_opt_olimit_ok=yes
3678else
Martin v. Löwis11437992002-04-12 09:54:03 +00003679 echo "$as_me: program exited with status $ac_status" >&5
3680echo "$as_me: failed program was:" >&5
3681cat conftest.$ac_ext >&5
3682( exit $ac_status )
3683ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003684fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003685rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003686fi
Guido van Rossum91922671997-10-09 20:24:13 +00003687CC="$ac_save_cc"
3688fi
3689
Martin v. Löwis11437992002-04-12 09:54:03 +00003690echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3691echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003692if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003693 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003694 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3695 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3696 # environment?
3697 Darwin*)
3698 ;;
3699 *)
3700 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3701 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003702 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003703else
Martin v. Löwis11437992002-04-12 09:54:03 +00003704 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3705echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3706 if test "${ac_cv_olimit_ok+set}" = set; then
3707 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003708else
3709 ac_save_cc="$CC"
3710 CC="$CC -Olimit 1500"
3711 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003712 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003713else
Martin v. Löwis11437992002-04-12 09:54:03 +00003714 cat >conftest.$ac_ext <<_ACEOF
3715#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003716#include "confdefs.h"
3717int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003718_ACEOF
3719rm -f conftest$ac_exeext
3720if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3721 (eval $ac_link) 2>&5
3722 ac_status=$?
3723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3724 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3726 (eval $ac_try) 2>&5
3727 ac_status=$?
3728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3729 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003730 ac_cv_olimit_ok=yes
3731else
Martin v. Löwis11437992002-04-12 09:54:03 +00003732 echo "$as_me: program exited with status $ac_status" >&5
3733echo "$as_me: failed program was:" >&5
3734cat conftest.$ac_ext >&5
3735( exit $ac_status )
3736ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003737fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003738rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003739fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003740 CC="$ac_save_cc"
3741fi
3742
Martin v. Löwis11437992002-04-12 09:54:03 +00003743 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3744echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003745 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003746 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003747 fi
3748fi
3749
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003750# On some compilers, pthreads are available without further options
3751# (e.g. MacOS X). On some of these systems, the compiler will not
3752# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3753# So we have to see first whether pthreads are available without
3754# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003755echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3756echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3757if test "${ac_cv_pthread_is_default+set}" = set; then
3758 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003759else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003760 if test "$cross_compiling" = yes; then
3761 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003762else
Martin v. Löwis11437992002-04-12 09:54:03 +00003763 cat >conftest.$ac_ext <<_ACEOF
3764#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003765#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003766
Martin v. Löwis130fb172001-07-19 11:00:41 +00003767#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003768
3769void* routine(void* p){return NULL;}
3770
3771int main(){
3772 pthread_t p;
3773 if(pthread_create(&p,NULL,routine,NULL)!=0)
3774 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003775 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003776 return 0;
3777}
3778
Martin v. Löwis11437992002-04-12 09:54:03 +00003779_ACEOF
3780rm -f conftest$ac_exeext
3781if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3782 (eval $ac_link) 2>&5
3783 ac_status=$?
3784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3785 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3786 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3787 (eval $ac_try) 2>&5
3788 ac_status=$?
3789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3790 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003791 ac_cv_pthread_is_default=yes
3792else
Martin v. Löwis11437992002-04-12 09:54:03 +00003793 echo "$as_me: program exited with status $ac_status" >&5
3794echo "$as_me: failed program was:" >&5
3795cat conftest.$ac_ext >&5
3796( exit $ac_status )
3797ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003798fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003799rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003800fi
3801
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003802fi
3803
Martin v. Löwis11437992002-04-12 09:54:03 +00003804echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3805echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003806
Michael W. Hudson54241132001-12-07 15:38:26 +00003807
Martin v. Löwis11437992002-04-12 09:54:03 +00003808if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003809then
3810 ac_cv_kpthread=no
3811else
3812# -Kpthread, if available, provides the right #defines
3813# and linker options to make pthread_create available
3814# Some compilers won't report that they do not support -Kpthread,
3815# so we need to run a program to see whether it really made the
3816# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003817echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3818echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3819if test "${ac_cv_kpthread+set}" = set; then
3820 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003821else
3822 ac_save_cc="$CC"
3823CC="$CC -Kpthread"
3824if test "$cross_compiling" = yes; then
3825 ac_cv_kpthread=no
3826else
Martin v. Löwis11437992002-04-12 09:54:03 +00003827 cat >conftest.$ac_ext <<_ACEOF
3828#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003829#include "confdefs.h"
3830
3831#include <pthread.h>
3832
3833void* routine(void* p){return NULL;}
3834
3835int main(){
3836 pthread_t p;
3837 if(pthread_create(&p,NULL,routine,NULL)!=0)
3838 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003839 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003840 return 0;
3841}
3842
Martin v. Löwis11437992002-04-12 09:54:03 +00003843_ACEOF
3844rm -f conftest$ac_exeext
3845if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3846 (eval $ac_link) 2>&5
3847 ac_status=$?
3848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3849 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3850 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3851 (eval $ac_try) 2>&5
3852 ac_status=$?
3853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3854 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003855 ac_cv_kpthread=yes
3856else
Martin v. Löwis11437992002-04-12 09:54:03 +00003857 echo "$as_me: program exited with status $ac_status" >&5
3858echo "$as_me: failed program was:" >&5
3859cat conftest.$ac_ext >&5
3860( exit $ac_status )
3861ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003862fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003863rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003864fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003865CC="$ac_save_cc"
3866fi
3867
Martin v. Löwis11437992002-04-12 09:54:03 +00003868echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3869echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003870fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003871
Michael W. Hudson54241132001-12-07 15:38:26 +00003872
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003873# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003874echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3875echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3876if test "${ac_cv_header_stdc+set}" = set; then
3877 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003878else
Martin v. Löwis11437992002-04-12 09:54:03 +00003879 cat >conftest.$ac_ext <<_ACEOF
3880#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003881#include "confdefs.h"
3882#include <stdlib.h>
3883#include <stdarg.h>
3884#include <string.h>
3885#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003886
3887_ACEOF
3888if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3889 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3890 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00003891 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003892 rm -f conftest.er1
3893 cat conftest.err >&5
3894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3895 (exit $ac_status); } >/dev/null; then
3896 if test -s conftest.err; then
3897 ac_cpp_err=$ac_c_preproc_warn_flag
3898 else
3899 ac_cpp_err=
3900 fi
3901else
3902 ac_cpp_err=yes
3903fi
3904if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003905 ac_cv_header_stdc=yes
3906else
Martin v. Löwis11437992002-04-12 09:54:03 +00003907 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003908 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003909 ac_cv_header_stdc=no
3910fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003911rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003912
3913if test $ac_cv_header_stdc = yes; then
3914 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003915 cat >conftest.$ac_ext <<_ACEOF
3916#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003917#include "confdefs.h"
3918#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003919
3920_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003921if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00003922 egrep "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003923 :
3924else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003925 ac_cv_header_stdc=no
3926fi
3927rm -f conftest*
3928
3929fi
3930
3931if test $ac_cv_header_stdc = yes; then
3932 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003933 cat >conftest.$ac_ext <<_ACEOF
3934#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003935#include "confdefs.h"
3936#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003937
3938_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003939if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00003940 egrep "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003941 :
3942else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003943 ac_cv_header_stdc=no
3944fi
3945rm -f conftest*
3946
3947fi
3948
3949if test $ac_cv_header_stdc = yes; then
3950 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00003951 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003952 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003953else
Martin v. Löwis11437992002-04-12 09:54:03 +00003954 cat >conftest.$ac_ext <<_ACEOF
3955#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003956#include "confdefs.h"
3957#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003958#if ((' ' & 0x0FF) == 0x020)
3959# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3960# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3961#else
3962# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3963 || ('j' <= (c) && (c) <= 'r') \
3964 || ('s' <= (c) && (c) <= 'z'))
3965# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3966#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003967
Martin v. Löwis11437992002-04-12 09:54:03 +00003968#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3969int
3970main ()
3971{
3972 int i;
3973 for (i = 0; i < 256; i++)
3974 if (XOR (islower (i), ISLOWER (i))
3975 || toupper (i) != TOUPPER (i))
3976 exit(2);
3977 exit (0);
3978}
3979_ACEOF
3980rm -f conftest$ac_exeext
3981if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3982 (eval $ac_link) 2>&5
3983 ac_status=$?
3984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3985 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3986 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3987 (eval $ac_try) 2>&5
3988 ac_status=$?
3989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3990 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003991 :
3992else
Martin v. Löwis11437992002-04-12 09:54:03 +00003993 echo "$as_me: program exited with status $ac_status" >&5
3994echo "$as_me: failed program was:" >&5
3995cat conftest.$ac_ext >&5
3996( exit $ac_status )
3997ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003998fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003999rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004000fi
4001fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004002fi
4003echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4004echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004005if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004006
4007cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004008#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004009_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004010
4011fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004012
Martin v. Löwis11437992002-04-12 09:54:03 +00004013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004050
Barry Warsawfe33b792003-01-07 22:42:49 +00004051
Martin v. Löwis11437992002-04-12 09:54:03 +00004052for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004053libintl.h locale.h ncurses.h poll.h pthread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004054signal.h stdarg.h stddef.h stdlib.h stropts.h termios.h thread.h \
4055unistd.h utime.h \
Skip Montanaro57454e52002-06-14 20:30:31 +00004056sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004057sys/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 +00004058sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Barry Warsawfe33b792003-01-07 22:42:49 +00004059sys/resource.h netpacket/packet.h sysexits.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004060do
Martin v. Löwis11437992002-04-12 09:54:03 +00004061as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4062if eval "test \"\${$as_ac_Header+set}\" = set"; then
4063 echo "$as_me:$LINENO: checking for $ac_header" >&5
4064echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4065if eval "test \"\${$as_ac_Header+set}\" = set"; then
4066 echo $ECHO_N "(cached) $ECHO_C" >&6
4067fi
4068echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4069echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004070else
Martin v. Löwis11437992002-04-12 09:54:03 +00004071 # Is the header compilable?
4072echo "$as_me:$LINENO: checking $ac_header usability" >&5
4073echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4074cat >conftest.$ac_ext <<_ACEOF
4075#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004076#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004077$ac_includes_default
4078#include <$ac_header>
4079_ACEOF
4080rm -f conftest.$ac_objext
4081if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4082 (eval $ac_compile) 2>&5
4083 ac_status=$?
4084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4085 (exit $ac_status); } &&
4086 { ac_try='test -s conftest.$ac_objext'
4087 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4088 (eval $ac_try) 2>&5
4089 ac_status=$?
4090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4091 (exit $ac_status); }; }; then
4092 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004093else
Martin v. Löwis11437992002-04-12 09:54:03 +00004094 echo "$as_me: failed program was:" >&5
4095cat conftest.$ac_ext >&5
4096ac_header_compiler=no
4097fi
4098rm -f conftest.$ac_objext conftest.$ac_ext
4099echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4100echo "${ECHO_T}$ac_header_compiler" >&6
4101
4102# Is the header present?
4103echo "$as_me:$LINENO: checking $ac_header presence" >&5
4104echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4105cat >conftest.$ac_ext <<_ACEOF
4106#line $LINENO "configure"
4107#include "confdefs.h"
4108#include <$ac_header>
4109_ACEOF
4110if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4111 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4112 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004113 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004114 rm -f conftest.er1
4115 cat conftest.err >&5
4116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4117 (exit $ac_status); } >/dev/null; then
4118 if test -s conftest.err; then
4119 ac_cpp_err=$ac_c_preproc_warn_flag
4120 else
4121 ac_cpp_err=
4122 fi
4123else
4124 ac_cpp_err=yes
4125fi
4126if test -z "$ac_cpp_err"; then
4127 ac_header_preproc=yes
4128else
4129 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004130 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004131 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004132fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004133rm -f conftest.err conftest.$ac_ext
4134echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4135echo "${ECHO_T}$ac_header_preproc" >&6
4136
4137# So? What about this header?
4138case $ac_header_compiler:$ac_header_preproc in
4139 yes:no )
4140 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4141echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4142 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4143echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4144 no:yes )
4145 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4146echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4147 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4148echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4149 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4150echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4151esac
4152echo "$as_me:$LINENO: checking for $ac_header" >&5
4153echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4154if eval "test \"\${$as_ac_Header+set}\" = set"; then
4155 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004156else
Martin v. Löwis11437992002-04-12 09:54:03 +00004157 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004158fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004159echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4160echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4161
4162fi
4163if test `eval echo '${'$as_ac_Header'}'` = yes; then
4164 cat >>confdefs.h <<_ACEOF
4165#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4166_ACEOF
4167
4168fi
4169
Guido van Rossum627b2d71993-12-24 10:39:16 +00004170done
4171
Martin v. Löwis11437992002-04-12 09:54:03 +00004172
4173
4174
4175
4176
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004177ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004178for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4179 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4180echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4181echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4182if eval "test \"\${$as_ac_Header+set}\" = set"; then
4183 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004184else
Martin v. Löwis11437992002-04-12 09:54:03 +00004185 cat >conftest.$ac_ext <<_ACEOF
4186#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004187#include "confdefs.h"
4188#include <sys/types.h>
4189#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004190
Barry Warsawfe33b792003-01-07 22:42:49 +00004191#ifdef F77_DUMMY_MAIN
4192# ifdef __cplusplus
4193 extern "C"
4194# endif
4195 int F77_DUMMY_MAIN() { return 1; }
4196#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004197int
4198main ()
4199{
4200if ((DIR *) 0)
4201return 0;
4202 ;
4203 return 0;
4204}
4205_ACEOF
4206rm -f conftest.$ac_objext
4207if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4208 (eval $ac_compile) 2>&5
4209 ac_status=$?
4210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4211 (exit $ac_status); } &&
4212 { ac_try='test -s conftest.$ac_objext'
4213 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4214 (eval $ac_try) 2>&5
4215 ac_status=$?
4216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4217 (exit $ac_status); }; }; then
4218 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004219else
Martin v. Löwis11437992002-04-12 09:54:03 +00004220 echo "$as_me: failed program was:" >&5
4221cat conftest.$ac_ext >&5
4222eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004223fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004224rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004225fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004226echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4227echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4228if test `eval echo '${'$as_ac_Header'}'` = yes; then
4229 cat >>confdefs.h <<_ACEOF
4230#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4231_ACEOF
4232
4233ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004234fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004235
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004236done
4237# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4238if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004239 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4240echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4241if test "${ac_cv_search_opendir+set}" = set; then
4242 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004243else
Martin v. Löwis11437992002-04-12 09:54:03 +00004244 ac_func_search_save_LIBS=$LIBS
4245ac_cv_search_opendir=no
4246cat >conftest.$ac_ext <<_ACEOF
4247#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004248#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004249
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004250/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004251#ifdef __cplusplus
4252extern "C"
4253#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004254/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004255 builtin and then its argument prototype would still apply. */
4256char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004257#ifdef F77_DUMMY_MAIN
4258# ifdef __cplusplus
4259 extern "C"
4260# endif
4261 int F77_DUMMY_MAIN() { return 1; }
4262#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004263int
4264main ()
4265{
4266opendir ();
4267 ;
4268 return 0;
4269}
4270_ACEOF
4271rm -f conftest.$ac_objext conftest$ac_exeext
4272if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4273 (eval $ac_link) 2>&5
4274 ac_status=$?
4275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4276 (exit $ac_status); } &&
4277 { ac_try='test -s conftest$ac_exeext'
4278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4279 (eval $ac_try) 2>&5
4280 ac_status=$?
4281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4282 (exit $ac_status); }; }; then
4283 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004284else
Martin v. Löwis11437992002-04-12 09:54:03 +00004285 echo "$as_me: failed program was:" >&5
4286cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004287fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004288rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4289if test "$ac_cv_search_opendir" = no; then
4290 for ac_lib in dir; do
4291 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4292 cat >conftest.$ac_ext <<_ACEOF
4293#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004294#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004295
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004296/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004297#ifdef __cplusplus
4298extern "C"
4299#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004300/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004301 builtin and then its argument prototype would still apply. */
4302char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004303#ifdef F77_DUMMY_MAIN
4304# ifdef __cplusplus
4305 extern "C"
4306# endif
4307 int F77_DUMMY_MAIN() { return 1; }
4308#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004309int
4310main ()
4311{
4312opendir ();
4313 ;
4314 return 0;
4315}
4316_ACEOF
4317rm -f conftest.$ac_objext conftest$ac_exeext
4318if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4319 (eval $ac_link) 2>&5
4320 ac_status=$?
4321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4322 (exit $ac_status); } &&
4323 { ac_try='test -s conftest$ac_exeext'
4324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4325 (eval $ac_try) 2>&5
4326 ac_status=$?
4327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4328 (exit $ac_status); }; }; then
4329 ac_cv_search_opendir="-l$ac_lib"
4330break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004331else
Martin v. Löwis11437992002-04-12 09:54:03 +00004332 echo "$as_me: failed program was:" >&5
4333cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004334fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004335rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4336 done
4337fi
4338LIBS=$ac_func_search_save_LIBS
4339fi
4340echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4341echo "${ECHO_T}$ac_cv_search_opendir" >&6
4342if test "$ac_cv_search_opendir" != no; then
4343 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004344
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004345fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004346
Michael W. Hudson54241132001-12-07 15:38:26 +00004347else
Martin v. Löwis11437992002-04-12 09:54:03 +00004348 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4349echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4350if test "${ac_cv_search_opendir+set}" = set; then
4351 echo $ECHO_N "(cached) $ECHO_C" >&6
4352else
4353 ac_func_search_save_LIBS=$LIBS
4354ac_cv_search_opendir=no
4355cat >conftest.$ac_ext <<_ACEOF
4356#line $LINENO "configure"
4357#include "confdefs.h"
4358
4359/* Override any gcc2 internal prototype to avoid an error. */
4360#ifdef __cplusplus
4361extern "C"
4362#endif
4363/* We use char because int might match the return type of a gcc2
4364 builtin and then its argument prototype would still apply. */
4365char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004366#ifdef F77_DUMMY_MAIN
4367# ifdef __cplusplus
4368 extern "C"
4369# endif
4370 int F77_DUMMY_MAIN() { return 1; }
4371#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004372int
4373main ()
4374{
4375opendir ();
4376 ;
4377 return 0;
4378}
4379_ACEOF
4380rm -f conftest.$ac_objext conftest$ac_exeext
4381if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4382 (eval $ac_link) 2>&5
4383 ac_status=$?
4384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4385 (exit $ac_status); } &&
4386 { ac_try='test -s conftest$ac_exeext'
4387 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4388 (eval $ac_try) 2>&5
4389 ac_status=$?
4390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4391 (exit $ac_status); }; }; then
4392 ac_cv_search_opendir="none required"
4393else
4394 echo "$as_me: failed program was:" >&5
4395cat conftest.$ac_ext >&5
4396fi
4397rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4398if test "$ac_cv_search_opendir" = no; then
4399 for ac_lib in x; do
4400 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4401 cat >conftest.$ac_ext <<_ACEOF
4402#line $LINENO "configure"
4403#include "confdefs.h"
4404
4405/* Override any gcc2 internal prototype to avoid an error. */
4406#ifdef __cplusplus
4407extern "C"
4408#endif
4409/* We use char because int might match the return type of a gcc2
4410 builtin and then its argument prototype would still apply. */
4411char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004412#ifdef F77_DUMMY_MAIN
4413# ifdef __cplusplus
4414 extern "C"
4415# endif
4416 int F77_DUMMY_MAIN() { return 1; }
4417#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004418int
4419main ()
4420{
4421opendir ();
4422 ;
4423 return 0;
4424}
4425_ACEOF
4426rm -f conftest.$ac_objext conftest$ac_exeext
4427if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4428 (eval $ac_link) 2>&5
4429 ac_status=$?
4430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4431 (exit $ac_status); } &&
4432 { ac_try='test -s conftest$ac_exeext'
4433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4434 (eval $ac_try) 2>&5
4435 ac_status=$?
4436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4437 (exit $ac_status); }; }; then
4438 ac_cv_search_opendir="-l$ac_lib"
4439break
4440else
4441 echo "$as_me: failed program was:" >&5
4442cat conftest.$ac_ext >&5
4443fi
4444rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4445 done
4446fi
4447LIBS=$ac_func_search_save_LIBS
4448fi
4449echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4450echo "${ECHO_T}$ac_cv_search_opendir" >&6
4451if test "$ac_cv_search_opendir" != no; then
4452 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4453
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004454fi
4455
4456fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004457
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004458echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4459echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4460if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4461 echo $ECHO_N "(cached) $ECHO_C" >&6
4462else
4463 cat >conftest.$ac_ext <<_ACEOF
4464#line $LINENO "configure"
4465#include "confdefs.h"
4466#include <sys/types.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00004467#ifdef F77_DUMMY_MAIN
4468# ifdef __cplusplus
4469 extern "C"
4470# endif
4471 int F77_DUMMY_MAIN() { return 1; }
4472#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004473int
4474main ()
4475{
4476return makedev(0, 0);
4477 ;
4478 return 0;
4479}
4480_ACEOF
4481rm -f conftest.$ac_objext conftest$ac_exeext
4482if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4483 (eval $ac_link) 2>&5
4484 ac_status=$?
4485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4486 (exit $ac_status); } &&
4487 { ac_try='test -s conftest$ac_exeext'
4488 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4489 (eval $ac_try) 2>&5
4490 ac_status=$?
4491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4492 (exit $ac_status); }; }; then
4493 ac_cv_header_sys_types_h_makedev=yes
4494else
4495 echo "$as_me: failed program was:" >&5
4496cat conftest.$ac_ext >&5
4497ac_cv_header_sys_types_h_makedev=no
4498fi
4499rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4500
4501fi
4502echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4503echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4504
4505if test $ac_cv_header_sys_types_h_makedev = no; then
4506if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4507 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4508echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4509if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4510 echo $ECHO_N "(cached) $ECHO_C" >&6
4511fi
4512echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4513echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4514else
4515 # Is the header compilable?
4516echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4517echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4518cat >conftest.$ac_ext <<_ACEOF
4519#line $LINENO "configure"
4520#include "confdefs.h"
4521$ac_includes_default
4522#include <sys/mkdev.h>
4523_ACEOF
4524rm -f conftest.$ac_objext
4525if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4526 (eval $ac_compile) 2>&5
4527 ac_status=$?
4528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4529 (exit $ac_status); } &&
4530 { ac_try='test -s conftest.$ac_objext'
4531 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4532 (eval $ac_try) 2>&5
4533 ac_status=$?
4534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4535 (exit $ac_status); }; }; then
4536 ac_header_compiler=yes
4537else
4538 echo "$as_me: failed program was:" >&5
4539cat conftest.$ac_ext >&5
4540ac_header_compiler=no
4541fi
4542rm -f conftest.$ac_objext conftest.$ac_ext
4543echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4544echo "${ECHO_T}$ac_header_compiler" >&6
4545
4546# Is the header present?
4547echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4548echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4549cat >conftest.$ac_ext <<_ACEOF
4550#line $LINENO "configure"
4551#include "confdefs.h"
4552#include <sys/mkdev.h>
4553_ACEOF
4554if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4555 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4556 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004557 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004558 rm -f conftest.er1
4559 cat conftest.err >&5
4560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4561 (exit $ac_status); } >/dev/null; then
4562 if test -s conftest.err; then
4563 ac_cpp_err=$ac_c_preproc_warn_flag
4564 else
4565 ac_cpp_err=
4566 fi
4567else
4568 ac_cpp_err=yes
4569fi
4570if test -z "$ac_cpp_err"; then
4571 ac_header_preproc=yes
4572else
4573 echo "$as_me: failed program was:" >&5
4574 cat conftest.$ac_ext >&5
4575 ac_header_preproc=no
4576fi
4577rm -f conftest.err conftest.$ac_ext
4578echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4579echo "${ECHO_T}$ac_header_preproc" >&6
4580
4581# So? What about this header?
4582case $ac_header_compiler:$ac_header_preproc in
4583 yes:no )
4584 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4585echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4586 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4587echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4588 no:yes )
4589 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4590echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4591 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4592echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4593 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4594echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4595esac
4596echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4597echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4598if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4599 echo $ECHO_N "(cached) $ECHO_C" >&6
4600else
4601 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4602fi
4603echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4604echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4605
4606fi
4607if test $ac_cv_header_sys_mkdev_h = yes; then
4608
4609cat >>confdefs.h <<\_ACEOF
4610#define MAJOR_IN_MKDEV 1
4611_ACEOF
4612
4613fi
4614
4615
4616
4617 if test $ac_cv_header_sys_mkdev_h = no; then
4618 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4619 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4620echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4621if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4622 echo $ECHO_N "(cached) $ECHO_C" >&6
4623fi
4624echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4625echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4626else
4627 # Is the header compilable?
4628echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4629echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4630cat >conftest.$ac_ext <<_ACEOF
4631#line $LINENO "configure"
4632#include "confdefs.h"
4633$ac_includes_default
4634#include <sys/sysmacros.h>
4635_ACEOF
4636rm -f conftest.$ac_objext
4637if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4638 (eval $ac_compile) 2>&5
4639 ac_status=$?
4640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4641 (exit $ac_status); } &&
4642 { ac_try='test -s conftest.$ac_objext'
4643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4644 (eval $ac_try) 2>&5
4645 ac_status=$?
4646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4647 (exit $ac_status); }; }; then
4648 ac_header_compiler=yes
4649else
4650 echo "$as_me: failed program was:" >&5
4651cat conftest.$ac_ext >&5
4652ac_header_compiler=no
4653fi
4654rm -f conftest.$ac_objext conftest.$ac_ext
4655echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4656echo "${ECHO_T}$ac_header_compiler" >&6
4657
4658# Is the header present?
4659echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
4660echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
4661cat >conftest.$ac_ext <<_ACEOF
4662#line $LINENO "configure"
4663#include "confdefs.h"
4664#include <sys/sysmacros.h>
4665_ACEOF
4666if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4667 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4668 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004669 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004670 rm -f conftest.er1
4671 cat conftest.err >&5
4672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4673 (exit $ac_status); } >/dev/null; then
4674 if test -s conftest.err; then
4675 ac_cpp_err=$ac_c_preproc_warn_flag
4676 else
4677 ac_cpp_err=
4678 fi
4679else
4680 ac_cpp_err=yes
4681fi
4682if test -z "$ac_cpp_err"; then
4683 ac_header_preproc=yes
4684else
4685 echo "$as_me: failed program was:" >&5
4686 cat conftest.$ac_ext >&5
4687 ac_header_preproc=no
4688fi
4689rm -f conftest.err conftest.$ac_ext
4690echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4691echo "${ECHO_T}$ac_header_preproc" >&6
4692
4693# So? What about this header?
4694case $ac_header_compiler:$ac_header_preproc in
4695 yes:no )
4696 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
4697echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4698 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4699echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4700 no:yes )
4701 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
4702echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
4703 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
4704echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
4705 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4706echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4707esac
4708echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4709echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4710if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4711 echo $ECHO_N "(cached) $ECHO_C" >&6
4712else
4713 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
4714fi
4715echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4716echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4717
4718fi
4719if test $ac_cv_header_sys_sysmacros_h = yes; then
4720
4721cat >>confdefs.h <<\_ACEOF
4722#define MAJOR_IN_SYSMACROS 1
4723_ACEOF
4724
4725fi
4726
4727
4728 fi
4729fi
4730
Michael W. Hudson54241132001-12-07 15:38:26 +00004731
Guido van Rossum627b2d71993-12-24 10:39:16 +00004732# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004733was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004734echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4735echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4736cat >conftest.$ac_ext <<_ACEOF
4737#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004738#include "confdefs.h"
4739#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004740
4741_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004742if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00004743 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004744 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004745else
Martin v. Löwis11437992002-04-12 09:54:03 +00004746
4747
4748cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004749#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004750_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004751
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004752
Guido van Rossum627b2d71993-12-24 10:39:16 +00004753fi
4754rm -f conftest*
4755
Martin v. Löwis11437992002-04-12 09:54:03 +00004756echo "$as_me:$LINENO: result: $was_it_defined" >&5
4757echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004758
Neal Norwitz11690112002-07-30 01:08:28 +00004759# Check whether using makedev requires defining _OSF_SOURCE
4760echo "$as_me:$LINENO: checking for makedev" >&5
4761echo $ECHO_N "checking for makedev... $ECHO_C" >&6
4762cat >conftest.$ac_ext <<_ACEOF
4763#line $LINENO "configure"
4764#include "confdefs.h"
Neal Norwitz6eb37f02003-02-23 23:28:15 +00004765#include <sys/types.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00004766#ifdef F77_DUMMY_MAIN
4767# ifdef __cplusplus
4768 extern "C"
4769# endif
4770 int F77_DUMMY_MAIN() { return 1; }
4771#endif
Neal Norwitz11690112002-07-30 01:08:28 +00004772int
4773main ()
4774{
4775 makedev(0, 0)
4776 ;
4777 return 0;
4778}
4779_ACEOF
4780rm -f conftest.$ac_objext conftest$ac_exeext
4781if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4782 (eval $ac_link) 2>&5
4783 ac_status=$?
4784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4785 (exit $ac_status); } &&
4786 { ac_try='test -s conftest$ac_exeext'
4787 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4788 (eval $ac_try) 2>&5
4789 ac_status=$?
4790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4791 (exit $ac_status); }; }; then
4792 ac_cv_has_makedev=yes
4793else
4794 echo "$as_me: failed program was:" >&5
4795cat conftest.$ac_ext >&5
4796ac_cv_has_makedev=no
4797fi
4798rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4799if test "$ac_cv_has_makedev" = "no"; then
4800 # we didn't link, try if _OSF_SOURCE will allow us to link
4801 cat >conftest.$ac_ext <<_ACEOF
4802#line $LINENO "configure"
4803#include "confdefs.h"
4804
Neal Norwitz6eb37f02003-02-23 23:28:15 +00004805#define _OSF_SOURCE 1
4806#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00004807
Barry Warsawfe33b792003-01-07 22:42:49 +00004808#ifdef F77_DUMMY_MAIN
4809# ifdef __cplusplus
4810 extern "C"
4811# endif
4812 int F77_DUMMY_MAIN() { return 1; }
4813#endif
Neal Norwitz11690112002-07-30 01:08:28 +00004814int
4815main ()
4816{
4817 makedev(0, 0)
4818 ;
4819 return 0;
4820}
4821_ACEOF
4822rm -f conftest.$ac_objext conftest$ac_exeext
4823if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4824 (eval $ac_link) 2>&5
4825 ac_status=$?
4826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4827 (exit $ac_status); } &&
4828 { ac_try='test -s conftest$ac_exeext'
4829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4830 (eval $ac_try) 2>&5
4831 ac_status=$?
4832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4833 (exit $ac_status); }; }; then
4834 ac_cv_has_makedev=yes
4835else
4836 echo "$as_me: failed program was:" >&5
4837cat conftest.$ac_ext >&5
4838ac_cv_has_makedev=no
4839fi
4840rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4841 if test "$ac_cv_has_makedev" = "yes"; then
4842
4843cat >>confdefs.h <<\_ACEOF
4844#define _OSF_SOURCE 1
4845_ACEOF
4846
4847 fi
4848fi
4849echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
4850echo "${ECHO_T}$ac_cv_has_makedev" >&6
4851if test "$ac_cv_has_makedev" = "yes"; then
4852
4853cat >>confdefs.h <<\_ACEOF
4854#define HAVE_MAKEDEV 1
4855_ACEOF
4856
4857fi
4858
Martin v. Löwis399a6892002-10-04 10:22:02 +00004859# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
4860# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
4861# defined, but the compiler does not support pragma redefine_extname,
4862# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
4863# structures (such as rlimit64) without declaring them. As a
4864# work-around, disable LFS on such configurations
4865
4866use_lfs=yes
4867echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
4868echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
4869cat >conftest.$ac_ext <<_ACEOF
4870#line $LINENO "configure"
4871#include "confdefs.h"
4872
4873#define _LARGEFILE_SOURCE 1
4874#define _FILE_OFFSET_BITS 64
4875#include <sys/resource.h>
4876
Barry Warsawfe33b792003-01-07 22:42:49 +00004877#ifdef F77_DUMMY_MAIN
4878# ifdef __cplusplus
4879 extern "C"
4880# endif
4881 int F77_DUMMY_MAIN() { return 1; }
4882#endif
Martin v. Löwis399a6892002-10-04 10:22:02 +00004883int
4884main ()
4885{
4886struct rlimit foo;
4887 ;
4888 return 0;
4889}
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 sol_lfs_bug=no
4904else
4905 echo "$as_me: failed program was:" >&5
4906cat conftest.$ac_ext >&5
4907sol_lfs_bug=yes
4908fi
4909rm -f conftest.$ac_objext conftest.$ac_ext
4910echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
4911echo "${ECHO_T}$sol_lfs_bug" >&6
4912if test "$sol_lfs_bug" = "yes"; then
4913 use_lfs=no
4914fi
4915
4916if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00004917# Two defines needed to enable largefile support on various platforms
4918# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004919
Martin v. Löwis11437992002-04-12 09:54:03 +00004920cat >>confdefs.h <<\_ACEOF
4921#define _LARGEFILE_SOURCE 1
4922_ACEOF
4923
4924
4925cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004926#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004927_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004928
Martin v. Löwis399a6892002-10-04 10:22:02 +00004929fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004930
Guido van Rossum84e7b241996-08-19 21:59:00 +00004931# Add some code to confdefs.h so that the test for off_t works on SCO
4932cat >> confdefs.h <<\EOF
4933#if defined(SCO_DS)
4934#undef _OFF_T
4935#endif
4936EOF
4937
Guido van Rossumef2255b2000-03-10 22:30:29 +00004938# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004939echo "$as_me:$LINENO: checking for mode_t" >&5
4940echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4941if test "${ac_cv_type_mode_t+set}" = set; then
4942 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004943else
Martin v. Löwis11437992002-04-12 09:54:03 +00004944 cat >conftest.$ac_ext <<_ACEOF
4945#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004946#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004947$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00004948#ifdef F77_DUMMY_MAIN
4949# ifdef __cplusplus
4950 extern "C"
4951# endif
4952 int F77_DUMMY_MAIN() { return 1; }
4953#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004954int
4955main ()
4956{
4957if ((mode_t *) 0)
4958 return 0;
4959if (sizeof (mode_t))
4960 return 0;
4961 ;
4962 return 0;
4963}
4964_ACEOF
4965rm -f conftest.$ac_objext
4966if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4967 (eval $ac_compile) 2>&5
4968 ac_status=$?
4969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4970 (exit $ac_status); } &&
4971 { ac_try='test -s conftest.$ac_objext'
4972 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4973 (eval $ac_try) 2>&5
4974 ac_status=$?
4975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4976 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00004977 ac_cv_type_mode_t=yes
4978else
Martin v. Löwis11437992002-04-12 09:54:03 +00004979 echo "$as_me: failed program was:" >&5
4980cat conftest.$ac_ext >&5
4981ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00004982fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004983rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004984fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004985echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4986echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4987if test $ac_cv_type_mode_t = yes; then
4988 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004989else
Martin v. Löwis11437992002-04-12 09:54:03 +00004990
4991cat >>confdefs.h <<_ACEOF
4992#define mode_t int
4993_ACEOF
4994
4995fi
4996
4997echo "$as_me:$LINENO: checking for off_t" >&5
4998echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4999if test "${ac_cv_type_off_t+set}" = set; then
5000 echo $ECHO_N "(cached) $ECHO_C" >&6
5001else
5002 cat >conftest.$ac_ext <<_ACEOF
5003#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005004#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005005$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005006#ifdef F77_DUMMY_MAIN
5007# ifdef __cplusplus
5008 extern "C"
5009# endif
5010 int F77_DUMMY_MAIN() { return 1; }
5011#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005012int
5013main ()
5014{
5015if ((off_t *) 0)
5016 return 0;
5017if (sizeof (off_t))
5018 return 0;
5019 ;
5020 return 0;
5021}
5022_ACEOF
5023rm -f conftest.$ac_objext
5024if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5025 (eval $ac_compile) 2>&5
5026 ac_status=$?
5027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5028 (exit $ac_status); } &&
5029 { ac_try='test -s conftest.$ac_objext'
5030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5031 (eval $ac_try) 2>&5
5032 ac_status=$?
5033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5034 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005035 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005036else
Martin v. Löwis11437992002-04-12 09:54:03 +00005037 echo "$as_me: failed program was:" >&5
5038cat conftest.$ac_ext >&5
5039ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005040fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005041rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005042fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005043echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5044echo "${ECHO_T}$ac_cv_type_off_t" >&6
5045if test $ac_cv_type_off_t = yes; then
5046 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005047else
Martin v. Löwis11437992002-04-12 09:54:03 +00005048
5049cat >>confdefs.h <<_ACEOF
5050#define off_t long
5051_ACEOF
5052
5053fi
5054
5055echo "$as_me:$LINENO: checking for pid_t" >&5
5056echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5057if test "${ac_cv_type_pid_t+set}" = set; then
5058 echo $ECHO_N "(cached) $ECHO_C" >&6
5059else
5060 cat >conftest.$ac_ext <<_ACEOF
5061#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005062#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005063$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005064#ifdef F77_DUMMY_MAIN
5065# ifdef __cplusplus
5066 extern "C"
5067# endif
5068 int F77_DUMMY_MAIN() { return 1; }
5069#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005070int
5071main ()
5072{
5073if ((pid_t *) 0)
5074 return 0;
5075if (sizeof (pid_t))
5076 return 0;
5077 ;
5078 return 0;
5079}
5080_ACEOF
5081rm -f conftest.$ac_objext
5082if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5083 (eval $ac_compile) 2>&5
5084 ac_status=$?
5085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5086 (exit $ac_status); } &&
5087 { ac_try='test -s conftest.$ac_objext'
5088 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5089 (eval $ac_try) 2>&5
5090 ac_status=$?
5091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5092 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005093 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005094else
Martin v. Löwis11437992002-04-12 09:54:03 +00005095 echo "$as_me: failed program was:" >&5
5096cat conftest.$ac_ext >&5
5097ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005098fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005099rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005100fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005101echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5102echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5103if test $ac_cv_type_pid_t = yes; then
5104 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005105else
Martin v. Löwis11437992002-04-12 09:54:03 +00005106
5107cat >>confdefs.h <<_ACEOF
5108#define pid_t int
5109_ACEOF
5110
5111fi
5112
5113echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5114echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5115if test "${ac_cv_type_signal+set}" = set; then
5116 echo $ECHO_N "(cached) $ECHO_C" >&6
5117else
5118 cat >conftest.$ac_ext <<_ACEOF
5119#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005120#include "confdefs.h"
5121#include <sys/types.h>
5122#include <signal.h>
5123#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005124# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005125#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005126#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005127extern "C" void (*signal (int, void (*)(int)))(int);
5128#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005129void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005130#endif
5131
Barry Warsawfe33b792003-01-07 22:42:49 +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öwis11437992002-04-12 09:54:03 +00005138int
5139main ()
5140{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005141int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005142 ;
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
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005158 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005159else
Martin v. Löwis11437992002-04-12 09:54:03 +00005160 echo "$as_me: failed program was:" >&5
5161cat conftest.$ac_ext >&5
5162ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005163fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005164rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005165fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005166echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5167echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005168
Martin v. Löwis11437992002-04-12 09:54:03 +00005169cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005170#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005171_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005172
Michael W. Hudson54241132001-12-07 15:38:26 +00005173
Martin v. Löwis11437992002-04-12 09:54:03 +00005174echo "$as_me:$LINENO: checking for size_t" >&5
5175echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5176if test "${ac_cv_type_size_t+set}" = set; then
5177 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005178else
Martin v. Löwis11437992002-04-12 09:54:03 +00005179 cat >conftest.$ac_ext <<_ACEOF
5180#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005181#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005182$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005183#ifdef F77_DUMMY_MAIN
5184# ifdef __cplusplus
5185 extern "C"
5186# endif
5187 int F77_DUMMY_MAIN() { return 1; }
5188#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005189int
5190main ()
5191{
5192if ((size_t *) 0)
5193 return 0;
5194if (sizeof (size_t))
5195 return 0;
5196 ;
5197 return 0;
5198}
5199_ACEOF
5200rm -f conftest.$ac_objext
5201if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5202 (eval $ac_compile) 2>&5
5203 ac_status=$?
5204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5205 (exit $ac_status); } &&
5206 { ac_try='test -s conftest.$ac_objext'
5207 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5208 (eval $ac_try) 2>&5
5209 ac_status=$?
5210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5211 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005212 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005213else
Martin v. Löwis11437992002-04-12 09:54:03 +00005214 echo "$as_me: failed program was:" >&5
5215cat conftest.$ac_ext >&5
5216ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005217fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005218rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005219fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005220echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5221echo "${ECHO_T}$ac_cv_type_size_t" >&6
5222if test $ac_cv_type_size_t = yes; then
5223 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005224else
Martin v. Löwis11437992002-04-12 09:54:03 +00005225
5226cat >>confdefs.h <<_ACEOF
5227#define size_t unsigned
5228_ACEOF
5229
5230fi
5231
5232echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5233echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5234if test "${ac_cv_type_uid_t+set}" = set; then
5235 echo $ECHO_N "(cached) $ECHO_C" >&6
5236else
5237 cat >conftest.$ac_ext <<_ACEOF
5238#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005239#include "confdefs.h"
5240#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005241
5242_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005243if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00005244 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005245 ac_cv_type_uid_t=yes
5246else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005247 ac_cv_type_uid_t=no
5248fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005249rm -f conftest*
5250
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005251fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005252echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5253echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005254if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005255
Martin v. Löwis11437992002-04-12 09:54:03 +00005256cat >>confdefs.h <<\_ACEOF
5257#define uid_t int
5258_ACEOF
5259
5260
5261cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005262#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005263_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005264
5265fi
5266
Jack Jansendd19cf82001-12-06 22:36:17 +00005267
Michael W. Hudson54241132001-12-07 15:38:26 +00005268# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00005269echo "$as_me:$LINENO: checking for int" >&5
5270echo $ECHO_N "checking for int... $ECHO_C" >&6
5271if test "${ac_cv_type_int+set}" = set; then
5272 echo $ECHO_N "(cached) $ECHO_C" >&6
5273else
5274 cat >conftest.$ac_ext <<_ACEOF
5275#line $LINENO "configure"
5276#include "confdefs.h"
5277$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005278#ifdef F77_DUMMY_MAIN
5279# ifdef __cplusplus
5280 extern "C"
5281# endif
5282 int F77_DUMMY_MAIN() { return 1; }
5283#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005284int
5285main ()
5286{
5287if ((int *) 0)
5288 return 0;
5289if (sizeof (int))
5290 return 0;
5291 ;
5292 return 0;
5293}
5294_ACEOF
5295rm -f conftest.$ac_objext
5296if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5297 (eval $ac_compile) 2>&5
5298 ac_status=$?
5299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5300 (exit $ac_status); } &&
5301 { ac_try='test -s conftest.$ac_objext'
5302 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5303 (eval $ac_try) 2>&5
5304 ac_status=$?
5305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5306 (exit $ac_status); }; }; then
5307 ac_cv_type_int=yes
5308else
5309 echo "$as_me: failed program was:" >&5
5310cat conftest.$ac_ext >&5
5311ac_cv_type_int=no
5312fi
5313rm -f conftest.$ac_objext conftest.$ac_ext
5314fi
5315echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5316echo "${ECHO_T}$ac_cv_type_int" >&6
5317
5318echo "$as_me:$LINENO: checking size of int" >&5
5319echo $ECHO_N "checking size of int... $ECHO_C" >&6
5320if test "${ac_cv_sizeof_int+set}" = set; then
5321 echo $ECHO_N "(cached) $ECHO_C" >&6
5322else
5323 if test "$ac_cv_type_int" = yes; then
5324 # The cast to unsigned long works around a bug in the HP C Compiler
5325 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5326 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5327 # This bug is HP SR number 8606223364.
5328 if test "$cross_compiling" = yes; then
5329 # Depending upon the size, compute the lo and hi bounds.
5330cat >conftest.$ac_ext <<_ACEOF
5331#line $LINENO "configure"
5332#include "confdefs.h"
5333$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005334#ifdef F77_DUMMY_MAIN
5335# ifdef __cplusplus
5336 extern "C"
5337# endif
5338 int F77_DUMMY_MAIN() { return 1; }
5339#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005340int
5341main ()
5342{
5343static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5344test_array [0] = 0
5345
5346 ;
5347 return 0;
5348}
5349_ACEOF
5350rm -f conftest.$ac_objext
5351if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5352 (eval $ac_compile) 2>&5
5353 ac_status=$?
5354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5355 (exit $ac_status); } &&
5356 { ac_try='test -s conftest.$ac_objext'
5357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5358 (eval $ac_try) 2>&5
5359 ac_status=$?
5360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5361 (exit $ac_status); }; }; then
5362 ac_lo=0 ac_mid=0
5363 while :; do
5364 cat >conftest.$ac_ext <<_ACEOF
5365#line $LINENO "configure"
5366#include "confdefs.h"
5367$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005368#ifdef F77_DUMMY_MAIN
5369# ifdef __cplusplus
5370 extern "C"
5371# endif
5372 int F77_DUMMY_MAIN() { return 1; }
5373#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005374int
5375main ()
5376{
5377static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5378test_array [0] = 0
5379
5380 ;
5381 return 0;
5382}
5383_ACEOF
5384rm -f conftest.$ac_objext
5385if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5386 (eval $ac_compile) 2>&5
5387 ac_status=$?
5388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5389 (exit $ac_status); } &&
5390 { ac_try='test -s conftest.$ac_objext'
5391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5392 (eval $ac_try) 2>&5
5393 ac_status=$?
5394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5395 (exit $ac_status); }; }; then
5396 ac_hi=$ac_mid; break
5397else
5398 echo "$as_me: failed program was:" >&5
5399cat conftest.$ac_ext >&5
5400ac_lo=`expr $ac_mid + 1`
5401 if test $ac_lo -le $ac_mid; then
5402 ac_lo= ac_hi=
5403 break
5404 fi
5405 ac_mid=`expr 2 '*' $ac_mid + 1`
5406fi
5407rm -f conftest.$ac_objext conftest.$ac_ext
5408 done
5409else
5410 echo "$as_me: failed program was:" >&5
5411cat conftest.$ac_ext >&5
5412cat >conftest.$ac_ext <<_ACEOF
5413#line $LINENO "configure"
5414#include "confdefs.h"
5415$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005416#ifdef F77_DUMMY_MAIN
5417# ifdef __cplusplus
5418 extern "C"
5419# endif
5420 int F77_DUMMY_MAIN() { return 1; }
5421#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005422int
5423main ()
5424{
5425static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5426test_array [0] = 0
5427
5428 ;
5429 return 0;
5430}
5431_ACEOF
5432rm -f conftest.$ac_objext
5433if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5434 (eval $ac_compile) 2>&5
5435 ac_status=$?
5436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5437 (exit $ac_status); } &&
5438 { ac_try='test -s conftest.$ac_objext'
5439 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5440 (eval $ac_try) 2>&5
5441 ac_status=$?
5442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5443 (exit $ac_status); }; }; then
5444 ac_hi=-1 ac_mid=-1
5445 while :; do
5446 cat >conftest.$ac_ext <<_ACEOF
5447#line $LINENO "configure"
5448#include "confdefs.h"
5449$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005450#ifdef F77_DUMMY_MAIN
5451# ifdef __cplusplus
5452 extern "C"
5453# endif
5454 int F77_DUMMY_MAIN() { return 1; }
5455#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005456int
5457main ()
5458{
5459static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5460test_array [0] = 0
5461
5462 ;
5463 return 0;
5464}
5465_ACEOF
5466rm -f conftest.$ac_objext
5467if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5468 (eval $ac_compile) 2>&5
5469 ac_status=$?
5470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5471 (exit $ac_status); } &&
5472 { ac_try='test -s conftest.$ac_objext'
5473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5474 (eval $ac_try) 2>&5
5475 ac_status=$?
5476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5477 (exit $ac_status); }; }; then
5478 ac_lo=$ac_mid; break
5479else
5480 echo "$as_me: failed program was:" >&5
5481cat conftest.$ac_ext >&5
5482ac_hi=`expr '(' $ac_mid ')' - 1`
5483 if test $ac_mid -le $ac_hi; then
5484 ac_lo= ac_hi=
5485 break
5486 fi
5487 ac_mid=`expr 2 '*' $ac_mid`
5488fi
5489rm -f conftest.$ac_objext conftest.$ac_ext
5490 done
5491else
5492 echo "$as_me: failed program was:" >&5
5493cat conftest.$ac_ext >&5
5494ac_lo= ac_hi=
5495fi
5496rm -f conftest.$ac_objext conftest.$ac_ext
5497fi
5498rm -f conftest.$ac_objext conftest.$ac_ext
5499# Binary search between lo and hi bounds.
5500while test "x$ac_lo" != "x$ac_hi"; do
5501 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5502 cat >conftest.$ac_ext <<_ACEOF
5503#line $LINENO "configure"
5504#include "confdefs.h"
5505$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005506#ifdef F77_DUMMY_MAIN
5507# ifdef __cplusplus
5508 extern "C"
5509# endif
5510 int F77_DUMMY_MAIN() { return 1; }
5511#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005512int
5513main ()
5514{
5515static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5516test_array [0] = 0
5517
5518 ;
5519 return 0;
5520}
5521_ACEOF
5522rm -f conftest.$ac_objext
5523if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5524 (eval $ac_compile) 2>&5
5525 ac_status=$?
5526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5527 (exit $ac_status); } &&
5528 { ac_try='test -s conftest.$ac_objext'
5529 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5530 (eval $ac_try) 2>&5
5531 ac_status=$?
5532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5533 (exit $ac_status); }; }; then
5534 ac_hi=$ac_mid
5535else
5536 echo "$as_me: failed program was:" >&5
5537cat conftest.$ac_ext >&5
5538ac_lo=`expr '(' $ac_mid ')' + 1`
5539fi
5540rm -f conftest.$ac_objext conftest.$ac_ext
5541done
5542case $ac_lo in
5543?*) ac_cv_sizeof_int=$ac_lo;;
5544'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5545echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5546 { (exit 1); exit 1; }; } ;;
5547esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005548else
5549 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005550 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5551echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5552 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005553else
Martin v. Löwis11437992002-04-12 09:54:03 +00005554 cat >conftest.$ac_ext <<_ACEOF
5555#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005556#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005557$ac_includes_default
5558long longval () { return (long) (sizeof (int)); }
5559unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005560#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005561#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00005562#ifdef F77_DUMMY_MAIN
5563# ifdef __cplusplus
5564 extern "C"
5565# endif
5566 int F77_DUMMY_MAIN() { return 1; }
5567#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005568int
5569main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005570{
Martin v. Löwis11437992002-04-12 09:54:03 +00005571
5572 FILE *f = fopen ("conftest.val", "w");
5573 if (! f)
5574 exit (1);
5575 if (((long) (sizeof (int))) < 0)
5576 {
5577 long i = longval ();
5578 if (i != ((long) (sizeof (int))))
5579 exit (1);
5580 fprintf (f, "%ld\n", i);
5581 }
5582 else
5583 {
5584 unsigned long i = ulongval ();
5585 if (i != ((long) (sizeof (int))))
5586 exit (1);
5587 fprintf (f, "%lu\n", i);
5588 }
5589 exit (ferror (f) || fclose (f) != 0);
5590
5591 ;
5592 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005593}
Martin v. Löwis11437992002-04-12 09:54:03 +00005594_ACEOF
5595rm -f conftest$ac_exeext
5596if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5597 (eval $ac_link) 2>&5
5598 ac_status=$?
5599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5600 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5601 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5602 (eval $ac_try) 2>&5
5603 ac_status=$?
5604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5605 (exit $ac_status); }; }; then
5606 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005607else
Martin v. Löwis11437992002-04-12 09:54:03 +00005608 echo "$as_me: program exited with status $ac_status" >&5
5609echo "$as_me: failed program was:" >&5
5610cat conftest.$ac_ext >&5
5611( exit $ac_status )
5612{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5613echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5614 { (exit 1); exit 1; }; }
5615fi
Barry Warsawfe33b792003-01-07 22:42:49 +00005616rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005617fi
5618fi
5619rm -f conftest.val
5620else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005621 ac_cv_sizeof_int=0
5622fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005623fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005624echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5625echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5626cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005627#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005628_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005629
5630
Martin v. Löwis11437992002-04-12 09:54:03 +00005631echo "$as_me:$LINENO: checking for long" >&5
5632echo $ECHO_N "checking for long... $ECHO_C" >&6
5633if test "${ac_cv_type_long+set}" = set; then
5634 echo $ECHO_N "(cached) $ECHO_C" >&6
5635else
5636 cat >conftest.$ac_ext <<_ACEOF
5637#line $LINENO "configure"
5638#include "confdefs.h"
5639$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005640#ifdef F77_DUMMY_MAIN
5641# ifdef __cplusplus
5642 extern "C"
5643# endif
5644 int F77_DUMMY_MAIN() { return 1; }
5645#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005646int
5647main ()
5648{
5649if ((long *) 0)
5650 return 0;
5651if (sizeof (long))
5652 return 0;
5653 ;
5654 return 0;
5655}
5656_ACEOF
5657rm -f conftest.$ac_objext
5658if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5659 (eval $ac_compile) 2>&5
5660 ac_status=$?
5661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5662 (exit $ac_status); } &&
5663 { ac_try='test -s conftest.$ac_objext'
5664 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5665 (eval $ac_try) 2>&5
5666 ac_status=$?
5667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5668 (exit $ac_status); }; }; then
5669 ac_cv_type_long=yes
5670else
5671 echo "$as_me: failed program was:" >&5
5672cat conftest.$ac_ext >&5
5673ac_cv_type_long=no
5674fi
5675rm -f conftest.$ac_objext conftest.$ac_ext
5676fi
5677echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5678echo "${ECHO_T}$ac_cv_type_long" >&6
5679
5680echo "$as_me:$LINENO: checking size of long" >&5
5681echo $ECHO_N "checking size of long... $ECHO_C" >&6
5682if test "${ac_cv_sizeof_long+set}" = set; then
5683 echo $ECHO_N "(cached) $ECHO_C" >&6
5684else
5685 if test "$ac_cv_type_long" = yes; then
5686 # The cast to unsigned long works around a bug in the HP C Compiler
5687 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5688 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5689 # This bug is HP SR number 8606223364.
5690 if test "$cross_compiling" = yes; then
5691 # Depending upon the size, compute the lo and hi bounds.
5692cat >conftest.$ac_ext <<_ACEOF
5693#line $LINENO "configure"
5694#include "confdefs.h"
5695$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005696#ifdef F77_DUMMY_MAIN
5697# ifdef __cplusplus
5698 extern "C"
5699# endif
5700 int F77_DUMMY_MAIN() { return 1; }
5701#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005702int
5703main ()
5704{
5705static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5706test_array [0] = 0
5707
5708 ;
5709 return 0;
5710}
5711_ACEOF
5712rm -f conftest.$ac_objext
5713if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5714 (eval $ac_compile) 2>&5
5715 ac_status=$?
5716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5717 (exit $ac_status); } &&
5718 { ac_try='test -s conftest.$ac_objext'
5719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5720 (eval $ac_try) 2>&5
5721 ac_status=$?
5722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5723 (exit $ac_status); }; }; then
5724 ac_lo=0 ac_mid=0
5725 while :; do
5726 cat >conftest.$ac_ext <<_ACEOF
5727#line $LINENO "configure"
5728#include "confdefs.h"
5729$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005730#ifdef F77_DUMMY_MAIN
5731# ifdef __cplusplus
5732 extern "C"
5733# endif
5734 int F77_DUMMY_MAIN() { return 1; }
5735#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005736int
5737main ()
5738{
5739static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5740test_array [0] = 0
5741
5742 ;
5743 return 0;
5744}
5745_ACEOF
5746rm -f conftest.$ac_objext
5747if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5748 (eval $ac_compile) 2>&5
5749 ac_status=$?
5750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5751 (exit $ac_status); } &&
5752 { ac_try='test -s conftest.$ac_objext'
5753 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5754 (eval $ac_try) 2>&5
5755 ac_status=$?
5756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5757 (exit $ac_status); }; }; then
5758 ac_hi=$ac_mid; break
5759else
5760 echo "$as_me: failed program was:" >&5
5761cat conftest.$ac_ext >&5
5762ac_lo=`expr $ac_mid + 1`
5763 if test $ac_lo -le $ac_mid; then
5764 ac_lo= ac_hi=
5765 break
5766 fi
5767 ac_mid=`expr 2 '*' $ac_mid + 1`
5768fi
5769rm -f conftest.$ac_objext conftest.$ac_ext
5770 done
5771else
5772 echo "$as_me: failed program was:" >&5
5773cat conftest.$ac_ext >&5
5774cat >conftest.$ac_ext <<_ACEOF
5775#line $LINENO "configure"
5776#include "confdefs.h"
5777$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005778#ifdef F77_DUMMY_MAIN
5779# ifdef __cplusplus
5780 extern "C"
5781# endif
5782 int F77_DUMMY_MAIN() { return 1; }
5783#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005784int
5785main ()
5786{
5787static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5788test_array [0] = 0
5789
5790 ;
5791 return 0;
5792}
5793_ACEOF
5794rm -f conftest.$ac_objext
5795if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5796 (eval $ac_compile) 2>&5
5797 ac_status=$?
5798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5799 (exit $ac_status); } &&
5800 { ac_try='test -s conftest.$ac_objext'
5801 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5802 (eval $ac_try) 2>&5
5803 ac_status=$?
5804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5805 (exit $ac_status); }; }; then
5806 ac_hi=-1 ac_mid=-1
5807 while :; do
5808 cat >conftest.$ac_ext <<_ACEOF
5809#line $LINENO "configure"
5810#include "confdefs.h"
5811$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005812#ifdef F77_DUMMY_MAIN
5813# ifdef __cplusplus
5814 extern "C"
5815# endif
5816 int F77_DUMMY_MAIN() { return 1; }
5817#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005818int
5819main ()
5820{
5821static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5822test_array [0] = 0
5823
5824 ;
5825 return 0;
5826}
5827_ACEOF
5828rm -f conftest.$ac_objext
5829if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5830 (eval $ac_compile) 2>&5
5831 ac_status=$?
5832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5833 (exit $ac_status); } &&
5834 { ac_try='test -s conftest.$ac_objext'
5835 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5836 (eval $ac_try) 2>&5
5837 ac_status=$?
5838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5839 (exit $ac_status); }; }; then
5840 ac_lo=$ac_mid; break
5841else
5842 echo "$as_me: failed program was:" >&5
5843cat conftest.$ac_ext >&5
5844ac_hi=`expr '(' $ac_mid ')' - 1`
5845 if test $ac_mid -le $ac_hi; then
5846 ac_lo= ac_hi=
5847 break
5848 fi
5849 ac_mid=`expr 2 '*' $ac_mid`
5850fi
5851rm -f conftest.$ac_objext conftest.$ac_ext
5852 done
5853else
5854 echo "$as_me: failed program was:" >&5
5855cat conftest.$ac_ext >&5
5856ac_lo= ac_hi=
5857fi
5858rm -f conftest.$ac_objext conftest.$ac_ext
5859fi
5860rm -f conftest.$ac_objext conftest.$ac_ext
5861# Binary search between lo and hi bounds.
5862while test "x$ac_lo" != "x$ac_hi"; do
5863 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5864 cat >conftest.$ac_ext <<_ACEOF
5865#line $LINENO "configure"
5866#include "confdefs.h"
5867$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005868#ifdef F77_DUMMY_MAIN
5869# ifdef __cplusplus
5870 extern "C"
5871# endif
5872 int F77_DUMMY_MAIN() { return 1; }
5873#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005874int
5875main ()
5876{
5877static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5878test_array [0] = 0
5879
5880 ;
5881 return 0;
5882}
5883_ACEOF
5884rm -f conftest.$ac_objext
5885if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5886 (eval $ac_compile) 2>&5
5887 ac_status=$?
5888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5889 (exit $ac_status); } &&
5890 { ac_try='test -s conftest.$ac_objext'
5891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5892 (eval $ac_try) 2>&5
5893 ac_status=$?
5894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5895 (exit $ac_status); }; }; then
5896 ac_hi=$ac_mid
5897else
5898 echo "$as_me: failed program was:" >&5
5899cat conftest.$ac_ext >&5
5900ac_lo=`expr '(' $ac_mid ')' + 1`
5901fi
5902rm -f conftest.$ac_objext conftest.$ac_ext
5903done
5904case $ac_lo in
5905?*) ac_cv_sizeof_long=$ac_lo;;
5906'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5907echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5908 { (exit 1); exit 1; }; } ;;
5909esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005910else
5911 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005912 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5913echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5914 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005915else
Martin v. Löwis11437992002-04-12 09:54:03 +00005916 cat >conftest.$ac_ext <<_ACEOF
5917#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005918#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005919$ac_includes_default
5920long longval () { return (long) (sizeof (long)); }
5921unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005922#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005923#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00005924#ifdef F77_DUMMY_MAIN
5925# ifdef __cplusplus
5926 extern "C"
5927# endif
5928 int F77_DUMMY_MAIN() { return 1; }
5929#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005930int
5931main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005932{
Martin v. Löwis11437992002-04-12 09:54:03 +00005933
5934 FILE *f = fopen ("conftest.val", "w");
5935 if (! f)
5936 exit (1);
5937 if (((long) (sizeof (long))) < 0)
5938 {
5939 long i = longval ();
5940 if (i != ((long) (sizeof (long))))
5941 exit (1);
5942 fprintf (f, "%ld\n", i);
5943 }
5944 else
5945 {
5946 unsigned long i = ulongval ();
5947 if (i != ((long) (sizeof (long))))
5948 exit (1);
5949 fprintf (f, "%lu\n", i);
5950 }
5951 exit (ferror (f) || fclose (f) != 0);
5952
5953 ;
5954 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005955}
Martin v. Löwis11437992002-04-12 09:54:03 +00005956_ACEOF
5957rm -f conftest$ac_exeext
5958if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5959 (eval $ac_link) 2>&5
5960 ac_status=$?
5961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5962 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5963 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5964 (eval $ac_try) 2>&5
5965 ac_status=$?
5966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5967 (exit $ac_status); }; }; then
5968 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005969else
Martin v. Löwis11437992002-04-12 09:54:03 +00005970 echo "$as_me: program exited with status $ac_status" >&5
5971echo "$as_me: failed program was:" >&5
5972cat conftest.$ac_ext >&5
5973( exit $ac_status )
5974{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5975echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5976 { (exit 1); exit 1; }; }
5977fi
Barry Warsawfe33b792003-01-07 22:42:49 +00005978rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005979fi
5980fi
5981rm -f conftest.val
5982else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005983 ac_cv_sizeof_long=0
5984fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005985fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005986echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5987echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5988cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005989#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00005990_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005991
5992
Martin v. Löwis11437992002-04-12 09:54:03 +00005993echo "$as_me:$LINENO: checking for void *" >&5
5994echo $ECHO_N "checking for void *... $ECHO_C" >&6
5995if test "${ac_cv_type_void_p+set}" = set; then
5996 echo $ECHO_N "(cached) $ECHO_C" >&6
5997else
5998 cat >conftest.$ac_ext <<_ACEOF
5999#line $LINENO "configure"
6000#include "confdefs.h"
6001$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006002#ifdef F77_DUMMY_MAIN
6003# ifdef __cplusplus
6004 extern "C"
6005# endif
6006 int F77_DUMMY_MAIN() { return 1; }
6007#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006008int
6009main ()
6010{
6011if ((void * *) 0)
6012 return 0;
6013if (sizeof (void *))
6014 return 0;
6015 ;
6016 return 0;
6017}
6018_ACEOF
6019rm -f conftest.$ac_objext
6020if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6021 (eval $ac_compile) 2>&5
6022 ac_status=$?
6023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6024 (exit $ac_status); } &&
6025 { ac_try='test -s conftest.$ac_objext'
6026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6027 (eval $ac_try) 2>&5
6028 ac_status=$?
6029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6030 (exit $ac_status); }; }; then
6031 ac_cv_type_void_p=yes
6032else
6033 echo "$as_me: failed program was:" >&5
6034cat conftest.$ac_ext >&5
6035ac_cv_type_void_p=no
6036fi
6037rm -f conftest.$ac_objext conftest.$ac_ext
6038fi
6039echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
6040echo "${ECHO_T}$ac_cv_type_void_p" >&6
6041
6042echo "$as_me:$LINENO: checking size of void *" >&5
6043echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6044if test "${ac_cv_sizeof_void_p+set}" = set; then
6045 echo $ECHO_N "(cached) $ECHO_C" >&6
6046else
6047 if test "$ac_cv_type_void_p" = yes; then
6048 # The cast to unsigned long works around a bug in the HP C Compiler
6049 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6050 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6051 # This bug is HP SR number 8606223364.
6052 if test "$cross_compiling" = yes; then
6053 # Depending upon the size, compute the lo and hi bounds.
6054cat >conftest.$ac_ext <<_ACEOF
6055#line $LINENO "configure"
6056#include "confdefs.h"
6057$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006058#ifdef F77_DUMMY_MAIN
6059# ifdef __cplusplus
6060 extern "C"
6061# endif
6062 int F77_DUMMY_MAIN() { return 1; }
6063#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006064int
6065main ()
6066{
6067static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
6068test_array [0] = 0
6069
6070 ;
6071 return 0;
6072}
6073_ACEOF
6074rm -f conftest.$ac_objext
6075if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6076 (eval $ac_compile) 2>&5
6077 ac_status=$?
6078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6079 (exit $ac_status); } &&
6080 { ac_try='test -s conftest.$ac_objext'
6081 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6082 (eval $ac_try) 2>&5
6083 ac_status=$?
6084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6085 (exit $ac_status); }; }; then
6086 ac_lo=0 ac_mid=0
6087 while :; do
6088 cat >conftest.$ac_ext <<_ACEOF
6089#line $LINENO "configure"
6090#include "confdefs.h"
6091$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006092#ifdef F77_DUMMY_MAIN
6093# ifdef __cplusplus
6094 extern "C"
6095# endif
6096 int F77_DUMMY_MAIN() { return 1; }
6097#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006098int
6099main ()
6100{
6101static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6102test_array [0] = 0
6103
6104 ;
6105 return 0;
6106}
6107_ACEOF
6108rm -f conftest.$ac_objext
6109if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6110 (eval $ac_compile) 2>&5
6111 ac_status=$?
6112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6113 (exit $ac_status); } &&
6114 { ac_try='test -s conftest.$ac_objext'
6115 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6116 (eval $ac_try) 2>&5
6117 ac_status=$?
6118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6119 (exit $ac_status); }; }; then
6120 ac_hi=$ac_mid; break
6121else
6122 echo "$as_me: failed program was:" >&5
6123cat conftest.$ac_ext >&5
6124ac_lo=`expr $ac_mid + 1`
6125 if test $ac_lo -le $ac_mid; then
6126 ac_lo= ac_hi=
6127 break
6128 fi
6129 ac_mid=`expr 2 '*' $ac_mid + 1`
6130fi
6131rm -f conftest.$ac_objext conftest.$ac_ext
6132 done
6133else
6134 echo "$as_me: failed program was:" >&5
6135cat conftest.$ac_ext >&5
6136cat >conftest.$ac_ext <<_ACEOF
6137#line $LINENO "configure"
6138#include "confdefs.h"
6139$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006140#ifdef F77_DUMMY_MAIN
6141# ifdef __cplusplus
6142 extern "C"
6143# endif
6144 int F77_DUMMY_MAIN() { return 1; }
6145#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006146int
6147main ()
6148{
6149static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6150test_array [0] = 0
6151
6152 ;
6153 return 0;
6154}
6155_ACEOF
6156rm -f conftest.$ac_objext
6157if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6158 (eval $ac_compile) 2>&5
6159 ac_status=$?
6160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6161 (exit $ac_status); } &&
6162 { ac_try='test -s conftest.$ac_objext'
6163 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6164 (eval $ac_try) 2>&5
6165 ac_status=$?
6166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6167 (exit $ac_status); }; }; then
6168 ac_hi=-1 ac_mid=-1
6169 while :; do
6170 cat >conftest.$ac_ext <<_ACEOF
6171#line $LINENO "configure"
6172#include "confdefs.h"
6173$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006174#ifdef F77_DUMMY_MAIN
6175# ifdef __cplusplus
6176 extern "C"
6177# endif
6178 int F77_DUMMY_MAIN() { return 1; }
6179#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006180int
6181main ()
6182{
6183static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6184test_array [0] = 0
6185
6186 ;
6187 return 0;
6188}
6189_ACEOF
6190rm -f conftest.$ac_objext
6191if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6192 (eval $ac_compile) 2>&5
6193 ac_status=$?
6194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6195 (exit $ac_status); } &&
6196 { ac_try='test -s conftest.$ac_objext'
6197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6198 (eval $ac_try) 2>&5
6199 ac_status=$?
6200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6201 (exit $ac_status); }; }; then
6202 ac_lo=$ac_mid; break
6203else
6204 echo "$as_me: failed program was:" >&5
6205cat conftest.$ac_ext >&5
6206ac_hi=`expr '(' $ac_mid ')' - 1`
6207 if test $ac_mid -le $ac_hi; then
6208 ac_lo= ac_hi=
6209 break
6210 fi
6211 ac_mid=`expr 2 '*' $ac_mid`
6212fi
6213rm -f conftest.$ac_objext conftest.$ac_ext
6214 done
6215else
6216 echo "$as_me: failed program was:" >&5
6217cat conftest.$ac_ext >&5
6218ac_lo= ac_hi=
6219fi
6220rm -f conftest.$ac_objext conftest.$ac_ext
6221fi
6222rm -f conftest.$ac_objext conftest.$ac_ext
6223# Binary search between lo and hi bounds.
6224while test "x$ac_lo" != "x$ac_hi"; do
6225 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6226 cat >conftest.$ac_ext <<_ACEOF
6227#line $LINENO "configure"
6228#include "confdefs.h"
6229$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006230#ifdef F77_DUMMY_MAIN
6231# ifdef __cplusplus
6232 extern "C"
6233# endif
6234 int F77_DUMMY_MAIN() { return 1; }
6235#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006236int
6237main ()
6238{
6239static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6240test_array [0] = 0
6241
6242 ;
6243 return 0;
6244}
6245_ACEOF
6246rm -f conftest.$ac_objext
6247if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6248 (eval $ac_compile) 2>&5
6249 ac_status=$?
6250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6251 (exit $ac_status); } &&
6252 { ac_try='test -s conftest.$ac_objext'
6253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6254 (eval $ac_try) 2>&5
6255 ac_status=$?
6256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6257 (exit $ac_status); }; }; then
6258 ac_hi=$ac_mid
6259else
6260 echo "$as_me: failed program was:" >&5
6261cat conftest.$ac_ext >&5
6262ac_lo=`expr '(' $ac_mid ')' + 1`
6263fi
6264rm -f conftest.$ac_objext conftest.$ac_ext
6265done
6266case $ac_lo in
6267?*) ac_cv_sizeof_void_p=$ac_lo;;
6268'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6269echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6270 { (exit 1); exit 1; }; } ;;
6271esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006272else
6273 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006274 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6275echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6276 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006277else
Martin v. Löwis11437992002-04-12 09:54:03 +00006278 cat >conftest.$ac_ext <<_ACEOF
6279#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00006280#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006281$ac_includes_default
6282long longval () { return (long) (sizeof (void *)); }
6283unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006284#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006285#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00006286#ifdef F77_DUMMY_MAIN
6287# ifdef __cplusplus
6288 extern "C"
6289# endif
6290 int F77_DUMMY_MAIN() { return 1; }
6291#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006292int
6293main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006294{
Martin v. Löwis11437992002-04-12 09:54:03 +00006295
6296 FILE *f = fopen ("conftest.val", "w");
6297 if (! f)
6298 exit (1);
6299 if (((long) (sizeof (void *))) < 0)
6300 {
6301 long i = longval ();
6302 if (i != ((long) (sizeof (void *))))
6303 exit (1);
6304 fprintf (f, "%ld\n", i);
6305 }
6306 else
6307 {
6308 unsigned long i = ulongval ();
6309 if (i != ((long) (sizeof (void *))))
6310 exit (1);
6311 fprintf (f, "%lu\n", i);
6312 }
6313 exit (ferror (f) || fclose (f) != 0);
6314
6315 ;
6316 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006317}
Martin v. Löwis11437992002-04-12 09:54:03 +00006318_ACEOF
6319rm -f conftest$ac_exeext
6320if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6321 (eval $ac_link) 2>&5
6322 ac_status=$?
6323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6324 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6325 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6326 (eval $ac_try) 2>&5
6327 ac_status=$?
6328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6329 (exit $ac_status); }; }; then
6330 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006331else
Martin v. Löwis11437992002-04-12 09:54:03 +00006332 echo "$as_me: program exited with status $ac_status" >&5
6333echo "$as_me: failed program was:" >&5
6334cat conftest.$ac_ext >&5
6335( exit $ac_status )
6336{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6337echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6338 { (exit 1); exit 1; }; }
6339fi
Barry Warsawfe33b792003-01-07 22:42:49 +00006340rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006341fi
6342fi
6343rm -f conftest.val
6344else
Guido van Rossumad678af1998-10-02 14:42:15 +00006345 ac_cv_sizeof_void_p=0
6346fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006347fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006348echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6349echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6350cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006351#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006352_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006353
6354
Martin v. Löwis11437992002-04-12 09:54:03 +00006355echo "$as_me:$LINENO: checking for char" >&5
6356echo $ECHO_N "checking for char... $ECHO_C" >&6
6357if test "${ac_cv_type_char+set}" = set; then
6358 echo $ECHO_N "(cached) $ECHO_C" >&6
6359else
6360 cat >conftest.$ac_ext <<_ACEOF
6361#line $LINENO "configure"
6362#include "confdefs.h"
6363$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006364#ifdef F77_DUMMY_MAIN
6365# ifdef __cplusplus
6366 extern "C"
6367# endif
6368 int F77_DUMMY_MAIN() { return 1; }
6369#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006370int
6371main ()
6372{
6373if ((char *) 0)
6374 return 0;
6375if (sizeof (char))
6376 return 0;
6377 ;
6378 return 0;
6379}
6380_ACEOF
6381rm -f conftest.$ac_objext
6382if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6383 (eval $ac_compile) 2>&5
6384 ac_status=$?
6385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6386 (exit $ac_status); } &&
6387 { ac_try='test -s conftest.$ac_objext'
6388 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6389 (eval $ac_try) 2>&5
6390 ac_status=$?
6391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6392 (exit $ac_status); }; }; then
6393 ac_cv_type_char=yes
6394else
6395 echo "$as_me: failed program was:" >&5
6396cat conftest.$ac_ext >&5
6397ac_cv_type_char=no
6398fi
6399rm -f conftest.$ac_objext conftest.$ac_ext
6400fi
6401echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
6402echo "${ECHO_T}$ac_cv_type_char" >&6
6403
6404echo "$as_me:$LINENO: checking size of char" >&5
6405echo $ECHO_N "checking size of char... $ECHO_C" >&6
6406if test "${ac_cv_sizeof_char+set}" = set; then
6407 echo $ECHO_N "(cached) $ECHO_C" >&6
6408else
6409 if test "$ac_cv_type_char" = yes; then
6410 # The cast to unsigned long works around a bug in the HP C Compiler
6411 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6412 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6413 # This bug is HP SR number 8606223364.
6414 if test "$cross_compiling" = yes; then
6415 # Depending upon the size, compute the lo and hi bounds.
6416cat >conftest.$ac_ext <<_ACEOF
6417#line $LINENO "configure"
6418#include "confdefs.h"
6419$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006420#ifdef F77_DUMMY_MAIN
6421# ifdef __cplusplus
6422 extern "C"
6423# endif
6424 int F77_DUMMY_MAIN() { return 1; }
6425#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006426int
6427main ()
6428{
6429static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
6430test_array [0] = 0
6431
6432 ;
6433 return 0;
6434}
6435_ACEOF
6436rm -f conftest.$ac_objext
6437if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6438 (eval $ac_compile) 2>&5
6439 ac_status=$?
6440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6441 (exit $ac_status); } &&
6442 { ac_try='test -s conftest.$ac_objext'
6443 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6444 (eval $ac_try) 2>&5
6445 ac_status=$?
6446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6447 (exit $ac_status); }; }; then
6448 ac_lo=0 ac_mid=0
6449 while :; do
6450 cat >conftest.$ac_ext <<_ACEOF
6451#line $LINENO "configure"
6452#include "confdefs.h"
6453$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006454#ifdef F77_DUMMY_MAIN
6455# ifdef __cplusplus
6456 extern "C"
6457# endif
6458 int F77_DUMMY_MAIN() { return 1; }
6459#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006460int
6461main ()
6462{
6463static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6464test_array [0] = 0
6465
6466 ;
6467 return 0;
6468}
6469_ACEOF
6470rm -f conftest.$ac_objext
6471if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6472 (eval $ac_compile) 2>&5
6473 ac_status=$?
6474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6475 (exit $ac_status); } &&
6476 { ac_try='test -s conftest.$ac_objext'
6477 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6478 (eval $ac_try) 2>&5
6479 ac_status=$?
6480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6481 (exit $ac_status); }; }; then
6482 ac_hi=$ac_mid; break
6483else
6484 echo "$as_me: failed program was:" >&5
6485cat conftest.$ac_ext >&5
6486ac_lo=`expr $ac_mid + 1`
6487 if test $ac_lo -le $ac_mid; then
6488 ac_lo= ac_hi=
6489 break
6490 fi
6491 ac_mid=`expr 2 '*' $ac_mid + 1`
6492fi
6493rm -f conftest.$ac_objext conftest.$ac_ext
6494 done
6495else
6496 echo "$as_me: failed program was:" >&5
6497cat conftest.$ac_ext >&5
6498cat >conftest.$ac_ext <<_ACEOF
6499#line $LINENO "configure"
6500#include "confdefs.h"
6501$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006502#ifdef F77_DUMMY_MAIN
6503# ifdef __cplusplus
6504 extern "C"
6505# endif
6506 int F77_DUMMY_MAIN() { return 1; }
6507#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006508int
6509main ()
6510{
6511static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
6512test_array [0] = 0
6513
6514 ;
6515 return 0;
6516}
6517_ACEOF
6518rm -f conftest.$ac_objext
6519if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6520 (eval $ac_compile) 2>&5
6521 ac_status=$?
6522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6523 (exit $ac_status); } &&
6524 { ac_try='test -s conftest.$ac_objext'
6525 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6526 (eval $ac_try) 2>&5
6527 ac_status=$?
6528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6529 (exit $ac_status); }; }; then
6530 ac_hi=-1 ac_mid=-1
6531 while :; do
6532 cat >conftest.$ac_ext <<_ACEOF
6533#line $LINENO "configure"
6534#include "confdefs.h"
6535$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006536#ifdef F77_DUMMY_MAIN
6537# ifdef __cplusplus
6538 extern "C"
6539# endif
6540 int F77_DUMMY_MAIN() { return 1; }
6541#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006542int
6543main ()
6544{
6545static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
6546test_array [0] = 0
6547
6548 ;
6549 return 0;
6550}
6551_ACEOF
6552rm -f conftest.$ac_objext
6553if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6554 (eval $ac_compile) 2>&5
6555 ac_status=$?
6556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6557 (exit $ac_status); } &&
6558 { ac_try='test -s conftest.$ac_objext'
6559 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6560 (eval $ac_try) 2>&5
6561 ac_status=$?
6562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6563 (exit $ac_status); }; }; then
6564 ac_lo=$ac_mid; break
6565else
6566 echo "$as_me: failed program was:" >&5
6567cat conftest.$ac_ext >&5
6568ac_hi=`expr '(' $ac_mid ')' - 1`
6569 if test $ac_mid -le $ac_hi; then
6570 ac_lo= ac_hi=
6571 break
6572 fi
6573 ac_mid=`expr 2 '*' $ac_mid`
6574fi
6575rm -f conftest.$ac_objext conftest.$ac_ext
6576 done
6577else
6578 echo "$as_me: failed program was:" >&5
6579cat conftest.$ac_ext >&5
6580ac_lo= ac_hi=
6581fi
6582rm -f conftest.$ac_objext conftest.$ac_ext
6583fi
6584rm -f conftest.$ac_objext conftest.$ac_ext
6585# Binary search between lo and hi bounds.
6586while test "x$ac_lo" != "x$ac_hi"; do
6587 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6588 cat >conftest.$ac_ext <<_ACEOF
6589#line $LINENO "configure"
6590#include "confdefs.h"
6591$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006592#ifdef F77_DUMMY_MAIN
6593# ifdef __cplusplus
6594 extern "C"
6595# endif
6596 int F77_DUMMY_MAIN() { return 1; }
6597#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006598int
6599main ()
6600{
6601static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6602test_array [0] = 0
6603
6604 ;
6605 return 0;
6606}
6607_ACEOF
6608rm -f conftest.$ac_objext
6609if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6610 (eval $ac_compile) 2>&5
6611 ac_status=$?
6612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6613 (exit $ac_status); } &&
6614 { ac_try='test -s conftest.$ac_objext'
6615 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6616 (eval $ac_try) 2>&5
6617 ac_status=$?
6618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6619 (exit $ac_status); }; }; then
6620 ac_hi=$ac_mid
6621else
6622 echo "$as_me: failed program was:" >&5
6623cat conftest.$ac_ext >&5
6624ac_lo=`expr '(' $ac_mid ')' + 1`
6625fi
6626rm -f conftest.$ac_objext conftest.$ac_ext
6627done
6628case $ac_lo in
6629?*) ac_cv_sizeof_char=$ac_lo;;
6630'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6631echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6632 { (exit 1); exit 1; }; } ;;
6633esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006634else
6635 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006636 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6637echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6638 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006639else
Martin v. Löwis11437992002-04-12 09:54:03 +00006640 cat >conftest.$ac_ext <<_ACEOF
6641#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006642#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006643$ac_includes_default
6644long longval () { return (long) (sizeof (char)); }
6645unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006646#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006647#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00006648#ifdef F77_DUMMY_MAIN
6649# ifdef __cplusplus
6650 extern "C"
6651# endif
6652 int F77_DUMMY_MAIN() { return 1; }
6653#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006654int
6655main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006656{
Martin v. Löwis11437992002-04-12 09:54:03 +00006657
6658 FILE *f = fopen ("conftest.val", "w");
6659 if (! f)
6660 exit (1);
6661 if (((long) (sizeof (char))) < 0)
6662 {
6663 long i = longval ();
6664 if (i != ((long) (sizeof (char))))
6665 exit (1);
6666 fprintf (f, "%ld\n", i);
6667 }
6668 else
6669 {
6670 unsigned long i = ulongval ();
6671 if (i != ((long) (sizeof (char))))
6672 exit (1);
6673 fprintf (f, "%lu\n", i);
6674 }
6675 exit (ferror (f) || fclose (f) != 0);
6676
6677 ;
6678 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006679}
Martin v. Löwis11437992002-04-12 09:54:03 +00006680_ACEOF
6681rm -f conftest$ac_exeext
6682if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6683 (eval $ac_link) 2>&5
6684 ac_status=$?
6685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6686 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6687 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6688 (eval $ac_try) 2>&5
6689 ac_status=$?
6690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6691 (exit $ac_status); }; }; then
6692 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006693else
Martin v. Löwis11437992002-04-12 09:54:03 +00006694 echo "$as_me: program exited with status $ac_status" >&5
6695echo "$as_me: failed program was:" >&5
6696cat conftest.$ac_ext >&5
6697( exit $ac_status )
6698{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6699echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6700 { (exit 1); exit 1; }; }
6701fi
Barry Warsawfe33b792003-01-07 22:42:49 +00006702rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006703fi
6704fi
6705rm -f conftest.val
6706else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006707 ac_cv_sizeof_char=0
6708fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006709fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006710echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6711echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6712cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006713#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006714_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006715
6716
Martin v. Löwis11437992002-04-12 09:54:03 +00006717echo "$as_me:$LINENO: checking for short" >&5
6718echo $ECHO_N "checking for short... $ECHO_C" >&6
6719if test "${ac_cv_type_short+set}" = set; then
6720 echo $ECHO_N "(cached) $ECHO_C" >&6
6721else
6722 cat >conftest.$ac_ext <<_ACEOF
6723#line $LINENO "configure"
6724#include "confdefs.h"
6725$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006726#ifdef F77_DUMMY_MAIN
6727# ifdef __cplusplus
6728 extern "C"
6729# endif
6730 int F77_DUMMY_MAIN() { return 1; }
6731#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006732int
6733main ()
6734{
6735if ((short *) 0)
6736 return 0;
6737if (sizeof (short))
6738 return 0;
6739 ;
6740 return 0;
6741}
6742_ACEOF
6743rm -f conftest.$ac_objext
6744if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6745 (eval $ac_compile) 2>&5
6746 ac_status=$?
6747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6748 (exit $ac_status); } &&
6749 { ac_try='test -s conftest.$ac_objext'
6750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6751 (eval $ac_try) 2>&5
6752 ac_status=$?
6753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6754 (exit $ac_status); }; }; then
6755 ac_cv_type_short=yes
6756else
6757 echo "$as_me: failed program was:" >&5
6758cat conftest.$ac_ext >&5
6759ac_cv_type_short=no
6760fi
6761rm -f conftest.$ac_objext conftest.$ac_ext
6762fi
6763echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6764echo "${ECHO_T}$ac_cv_type_short" >&6
6765
6766echo "$as_me:$LINENO: checking size of short" >&5
6767echo $ECHO_N "checking size of short... $ECHO_C" >&6
6768if test "${ac_cv_sizeof_short+set}" = set; then
6769 echo $ECHO_N "(cached) $ECHO_C" >&6
6770else
6771 if test "$ac_cv_type_short" = yes; then
6772 # The cast to unsigned long works around a bug in the HP C Compiler
6773 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6774 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6775 # This bug is HP SR number 8606223364.
6776 if test "$cross_compiling" = yes; then
6777 # Depending upon the size, compute the lo and hi bounds.
6778cat >conftest.$ac_ext <<_ACEOF
6779#line $LINENO "configure"
6780#include "confdefs.h"
6781$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006782#ifdef F77_DUMMY_MAIN
6783# ifdef __cplusplus
6784 extern "C"
6785# endif
6786 int F77_DUMMY_MAIN() { return 1; }
6787#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006788int
6789main ()
6790{
6791static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6792test_array [0] = 0
6793
6794 ;
6795 return 0;
6796}
6797_ACEOF
6798rm -f conftest.$ac_objext
6799if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6800 (eval $ac_compile) 2>&5
6801 ac_status=$?
6802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6803 (exit $ac_status); } &&
6804 { ac_try='test -s conftest.$ac_objext'
6805 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6806 (eval $ac_try) 2>&5
6807 ac_status=$?
6808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6809 (exit $ac_status); }; }; then
6810 ac_lo=0 ac_mid=0
6811 while :; do
6812 cat >conftest.$ac_ext <<_ACEOF
6813#line $LINENO "configure"
6814#include "confdefs.h"
6815$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006816#ifdef F77_DUMMY_MAIN
6817# ifdef __cplusplus
6818 extern "C"
6819# endif
6820 int F77_DUMMY_MAIN() { return 1; }
6821#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006822int
6823main ()
6824{
6825static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6826test_array [0] = 0
6827
6828 ;
6829 return 0;
6830}
6831_ACEOF
6832rm -f conftest.$ac_objext
6833if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6834 (eval $ac_compile) 2>&5
6835 ac_status=$?
6836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6837 (exit $ac_status); } &&
6838 { ac_try='test -s conftest.$ac_objext'
6839 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6840 (eval $ac_try) 2>&5
6841 ac_status=$?
6842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6843 (exit $ac_status); }; }; then
6844 ac_hi=$ac_mid; break
6845else
6846 echo "$as_me: failed program was:" >&5
6847cat conftest.$ac_ext >&5
6848ac_lo=`expr $ac_mid + 1`
6849 if test $ac_lo -le $ac_mid; then
6850 ac_lo= ac_hi=
6851 break
6852 fi
6853 ac_mid=`expr 2 '*' $ac_mid + 1`
6854fi
6855rm -f conftest.$ac_objext conftest.$ac_ext
6856 done
6857else
6858 echo "$as_me: failed program was:" >&5
6859cat conftest.$ac_ext >&5
6860cat >conftest.$ac_ext <<_ACEOF
6861#line $LINENO "configure"
6862#include "confdefs.h"
6863$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006864#ifdef F77_DUMMY_MAIN
6865# ifdef __cplusplus
6866 extern "C"
6867# endif
6868 int F77_DUMMY_MAIN() { return 1; }
6869#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006870int
6871main ()
6872{
6873static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6874test_array [0] = 0
6875
6876 ;
6877 return 0;
6878}
6879_ACEOF
6880rm -f conftest.$ac_objext
6881if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6882 (eval $ac_compile) 2>&5
6883 ac_status=$?
6884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6885 (exit $ac_status); } &&
6886 { ac_try='test -s conftest.$ac_objext'
6887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6888 (eval $ac_try) 2>&5
6889 ac_status=$?
6890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6891 (exit $ac_status); }; }; then
6892 ac_hi=-1 ac_mid=-1
6893 while :; do
6894 cat >conftest.$ac_ext <<_ACEOF
6895#line $LINENO "configure"
6896#include "confdefs.h"
6897$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006898#ifdef F77_DUMMY_MAIN
6899# ifdef __cplusplus
6900 extern "C"
6901# endif
6902 int F77_DUMMY_MAIN() { return 1; }
6903#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006904int
6905main ()
6906{
6907static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6908test_array [0] = 0
6909
6910 ;
6911 return 0;
6912}
6913_ACEOF
6914rm -f conftest.$ac_objext
6915if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6916 (eval $ac_compile) 2>&5
6917 ac_status=$?
6918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6919 (exit $ac_status); } &&
6920 { ac_try='test -s conftest.$ac_objext'
6921 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6922 (eval $ac_try) 2>&5
6923 ac_status=$?
6924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6925 (exit $ac_status); }; }; then
6926 ac_lo=$ac_mid; break
6927else
6928 echo "$as_me: failed program was:" >&5
6929cat conftest.$ac_ext >&5
6930ac_hi=`expr '(' $ac_mid ')' - 1`
6931 if test $ac_mid -le $ac_hi; then
6932 ac_lo= ac_hi=
6933 break
6934 fi
6935 ac_mid=`expr 2 '*' $ac_mid`
6936fi
6937rm -f conftest.$ac_objext conftest.$ac_ext
6938 done
6939else
6940 echo "$as_me: failed program was:" >&5
6941cat conftest.$ac_ext >&5
6942ac_lo= ac_hi=
6943fi
6944rm -f conftest.$ac_objext conftest.$ac_ext
6945fi
6946rm -f conftest.$ac_objext conftest.$ac_ext
6947# Binary search between lo and hi bounds.
6948while test "x$ac_lo" != "x$ac_hi"; do
6949 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6950 cat >conftest.$ac_ext <<_ACEOF
6951#line $LINENO "configure"
6952#include "confdefs.h"
6953$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006954#ifdef F77_DUMMY_MAIN
6955# ifdef __cplusplus
6956 extern "C"
6957# endif
6958 int F77_DUMMY_MAIN() { return 1; }
6959#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006960int
6961main ()
6962{
6963static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6964test_array [0] = 0
6965
6966 ;
6967 return 0;
6968}
6969_ACEOF
6970rm -f conftest.$ac_objext
6971if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6972 (eval $ac_compile) 2>&5
6973 ac_status=$?
6974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6975 (exit $ac_status); } &&
6976 { ac_try='test -s conftest.$ac_objext'
6977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6978 (eval $ac_try) 2>&5
6979 ac_status=$?
6980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6981 (exit $ac_status); }; }; then
6982 ac_hi=$ac_mid
6983else
6984 echo "$as_me: failed program was:" >&5
6985cat conftest.$ac_ext >&5
6986ac_lo=`expr '(' $ac_mid ')' + 1`
6987fi
6988rm -f conftest.$ac_objext conftest.$ac_ext
6989done
6990case $ac_lo in
6991?*) ac_cv_sizeof_short=$ac_lo;;
6992'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6993echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6994 { (exit 1); exit 1; }; } ;;
6995esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006996else
6997 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006998 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6999echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7000 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007001else
Martin v. Löwis11437992002-04-12 09:54:03 +00007002 cat >conftest.$ac_ext <<_ACEOF
7003#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007004#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007005$ac_includes_default
7006long longval () { return (long) (sizeof (short)); }
7007unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007008#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007009#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00007010#ifdef F77_DUMMY_MAIN
7011# ifdef __cplusplus
7012 extern "C"
7013# endif
7014 int F77_DUMMY_MAIN() { return 1; }
7015#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007016int
7017main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007018{
Martin v. Löwis11437992002-04-12 09:54:03 +00007019
7020 FILE *f = fopen ("conftest.val", "w");
7021 if (! f)
7022 exit (1);
7023 if (((long) (sizeof (short))) < 0)
7024 {
7025 long i = longval ();
7026 if (i != ((long) (sizeof (short))))
7027 exit (1);
7028 fprintf (f, "%ld\n", i);
7029 }
7030 else
7031 {
7032 unsigned long i = ulongval ();
7033 if (i != ((long) (sizeof (short))))
7034 exit (1);
7035 fprintf (f, "%lu\n", i);
7036 }
7037 exit (ferror (f) || fclose (f) != 0);
7038
7039 ;
7040 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007041}
Martin v. Löwis11437992002-04-12 09:54:03 +00007042_ACEOF
7043rm -f conftest$ac_exeext
7044if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7045 (eval $ac_link) 2>&5
7046 ac_status=$?
7047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7048 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7049 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7050 (eval $ac_try) 2>&5
7051 ac_status=$?
7052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7053 (exit $ac_status); }; }; then
7054 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007055else
Martin v. Löwis11437992002-04-12 09:54:03 +00007056 echo "$as_me: program exited with status $ac_status" >&5
7057echo "$as_me: failed program was:" >&5
7058cat conftest.$ac_ext >&5
7059( exit $ac_status )
7060{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
7061echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
7062 { (exit 1); exit 1; }; }
7063fi
Barry Warsawfe33b792003-01-07 22:42:49 +00007064rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007065fi
7066fi
7067rm -f conftest.val
7068else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007069 ac_cv_sizeof_short=0
7070fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007071fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007072echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7073echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7074cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007075#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007076_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007077
7078
Martin v. Löwis11437992002-04-12 09:54:03 +00007079echo "$as_me:$LINENO: checking for float" >&5
7080echo $ECHO_N "checking for float... $ECHO_C" >&6
7081if test "${ac_cv_type_float+set}" = set; then
7082 echo $ECHO_N "(cached) $ECHO_C" >&6
7083else
7084 cat >conftest.$ac_ext <<_ACEOF
7085#line $LINENO "configure"
7086#include "confdefs.h"
7087$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007088#ifdef F77_DUMMY_MAIN
7089# ifdef __cplusplus
7090 extern "C"
7091# endif
7092 int F77_DUMMY_MAIN() { return 1; }
7093#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007094int
7095main ()
7096{
7097if ((float *) 0)
7098 return 0;
7099if (sizeof (float))
7100 return 0;
7101 ;
7102 return 0;
7103}
7104_ACEOF
7105rm -f conftest.$ac_objext
7106if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7107 (eval $ac_compile) 2>&5
7108 ac_status=$?
7109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7110 (exit $ac_status); } &&
7111 { ac_try='test -s conftest.$ac_objext'
7112 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7113 (eval $ac_try) 2>&5
7114 ac_status=$?
7115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7116 (exit $ac_status); }; }; then
7117 ac_cv_type_float=yes
7118else
7119 echo "$as_me: failed program was:" >&5
7120cat conftest.$ac_ext >&5
7121ac_cv_type_float=no
7122fi
7123rm -f conftest.$ac_objext conftest.$ac_ext
7124fi
7125echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7126echo "${ECHO_T}$ac_cv_type_float" >&6
7127
7128echo "$as_me:$LINENO: checking size of float" >&5
7129echo $ECHO_N "checking size of float... $ECHO_C" >&6
7130if test "${ac_cv_sizeof_float+set}" = set; then
7131 echo $ECHO_N "(cached) $ECHO_C" >&6
7132else
7133 if test "$ac_cv_type_float" = yes; then
7134 # The cast to unsigned long works around a bug in the HP C Compiler
7135 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7136 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7137 # This bug is HP SR number 8606223364.
7138 if test "$cross_compiling" = yes; then
7139 # Depending upon the size, compute the lo and hi bounds.
7140cat >conftest.$ac_ext <<_ACEOF
7141#line $LINENO "configure"
7142#include "confdefs.h"
7143$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007144#ifdef F77_DUMMY_MAIN
7145# ifdef __cplusplus
7146 extern "C"
7147# endif
7148 int F77_DUMMY_MAIN() { return 1; }
7149#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007150int
7151main ()
7152{
7153static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7154test_array [0] = 0
7155
7156 ;
7157 return 0;
7158}
7159_ACEOF
7160rm -f conftest.$ac_objext
7161if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7162 (eval $ac_compile) 2>&5
7163 ac_status=$?
7164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7165 (exit $ac_status); } &&
7166 { ac_try='test -s conftest.$ac_objext'
7167 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7168 (eval $ac_try) 2>&5
7169 ac_status=$?
7170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7171 (exit $ac_status); }; }; then
7172 ac_lo=0 ac_mid=0
7173 while :; do
7174 cat >conftest.$ac_ext <<_ACEOF
7175#line $LINENO "configure"
7176#include "confdefs.h"
7177$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007178#ifdef F77_DUMMY_MAIN
7179# ifdef __cplusplus
7180 extern "C"
7181# endif
7182 int F77_DUMMY_MAIN() { return 1; }
7183#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007184int
7185main ()
7186{
7187static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7188test_array [0] = 0
7189
7190 ;
7191 return 0;
7192}
7193_ACEOF
7194rm -f conftest.$ac_objext
7195if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7196 (eval $ac_compile) 2>&5
7197 ac_status=$?
7198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7199 (exit $ac_status); } &&
7200 { ac_try='test -s conftest.$ac_objext'
7201 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7202 (eval $ac_try) 2>&5
7203 ac_status=$?
7204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7205 (exit $ac_status); }; }; then
7206 ac_hi=$ac_mid; break
7207else
7208 echo "$as_me: failed program was:" >&5
7209cat conftest.$ac_ext >&5
7210ac_lo=`expr $ac_mid + 1`
7211 if test $ac_lo -le $ac_mid; then
7212 ac_lo= ac_hi=
7213 break
7214 fi
7215 ac_mid=`expr 2 '*' $ac_mid + 1`
7216fi
7217rm -f conftest.$ac_objext conftest.$ac_ext
7218 done
7219else
7220 echo "$as_me: failed program was:" >&5
7221cat conftest.$ac_ext >&5
7222cat >conftest.$ac_ext <<_ACEOF
7223#line $LINENO "configure"
7224#include "confdefs.h"
7225$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007226#ifdef F77_DUMMY_MAIN
7227# ifdef __cplusplus
7228 extern "C"
7229# endif
7230 int F77_DUMMY_MAIN() { return 1; }
7231#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007232int
7233main ()
7234{
7235static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7236test_array [0] = 0
7237
7238 ;
7239 return 0;
7240}
7241_ACEOF
7242rm -f conftest.$ac_objext
7243if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7244 (eval $ac_compile) 2>&5
7245 ac_status=$?
7246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7247 (exit $ac_status); } &&
7248 { ac_try='test -s conftest.$ac_objext'
7249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7250 (eval $ac_try) 2>&5
7251 ac_status=$?
7252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7253 (exit $ac_status); }; }; then
7254 ac_hi=-1 ac_mid=-1
7255 while :; do
7256 cat >conftest.$ac_ext <<_ACEOF
7257#line $LINENO "configure"
7258#include "confdefs.h"
7259$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007260#ifdef F77_DUMMY_MAIN
7261# ifdef __cplusplus
7262 extern "C"
7263# endif
7264 int F77_DUMMY_MAIN() { return 1; }
7265#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007266int
7267main ()
7268{
7269static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7270test_array [0] = 0
7271
7272 ;
7273 return 0;
7274}
7275_ACEOF
7276rm -f conftest.$ac_objext
7277if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7278 (eval $ac_compile) 2>&5
7279 ac_status=$?
7280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7281 (exit $ac_status); } &&
7282 { ac_try='test -s conftest.$ac_objext'
7283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7284 (eval $ac_try) 2>&5
7285 ac_status=$?
7286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7287 (exit $ac_status); }; }; then
7288 ac_lo=$ac_mid; break
7289else
7290 echo "$as_me: failed program was:" >&5
7291cat conftest.$ac_ext >&5
7292ac_hi=`expr '(' $ac_mid ')' - 1`
7293 if test $ac_mid -le $ac_hi; then
7294 ac_lo= ac_hi=
7295 break
7296 fi
7297 ac_mid=`expr 2 '*' $ac_mid`
7298fi
7299rm -f conftest.$ac_objext conftest.$ac_ext
7300 done
7301else
7302 echo "$as_me: failed program was:" >&5
7303cat conftest.$ac_ext >&5
7304ac_lo= ac_hi=
7305fi
7306rm -f conftest.$ac_objext conftest.$ac_ext
7307fi
7308rm -f conftest.$ac_objext conftest.$ac_ext
7309# Binary search between lo and hi bounds.
7310while test "x$ac_lo" != "x$ac_hi"; do
7311 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7312 cat >conftest.$ac_ext <<_ACEOF
7313#line $LINENO "configure"
7314#include "confdefs.h"
7315$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007316#ifdef F77_DUMMY_MAIN
7317# ifdef __cplusplus
7318 extern "C"
7319# endif
7320 int F77_DUMMY_MAIN() { return 1; }
7321#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007322int
7323main ()
7324{
7325static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7326test_array [0] = 0
7327
7328 ;
7329 return 0;
7330}
7331_ACEOF
7332rm -f conftest.$ac_objext
7333if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7334 (eval $ac_compile) 2>&5
7335 ac_status=$?
7336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7337 (exit $ac_status); } &&
7338 { ac_try='test -s conftest.$ac_objext'
7339 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7340 (eval $ac_try) 2>&5
7341 ac_status=$?
7342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7343 (exit $ac_status); }; }; then
7344 ac_hi=$ac_mid
7345else
7346 echo "$as_me: failed program was:" >&5
7347cat conftest.$ac_ext >&5
7348ac_lo=`expr '(' $ac_mid ')' + 1`
7349fi
7350rm -f conftest.$ac_objext conftest.$ac_ext
7351done
7352case $ac_lo in
7353?*) ac_cv_sizeof_float=$ac_lo;;
7354'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7355echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7356 { (exit 1); exit 1; }; } ;;
7357esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007358else
7359 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007360 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7361echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7362 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007363else
Martin v. Löwis11437992002-04-12 09:54:03 +00007364 cat >conftest.$ac_ext <<_ACEOF
7365#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007366#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007367$ac_includes_default
7368long longval () { return (long) (sizeof (float)); }
7369unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007370#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007371#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00007372#ifdef F77_DUMMY_MAIN
7373# ifdef __cplusplus
7374 extern "C"
7375# endif
7376 int F77_DUMMY_MAIN() { return 1; }
7377#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007378int
7379main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007380{
Martin v. Löwis11437992002-04-12 09:54:03 +00007381
7382 FILE *f = fopen ("conftest.val", "w");
7383 if (! f)
7384 exit (1);
7385 if (((long) (sizeof (float))) < 0)
7386 {
7387 long i = longval ();
7388 if (i != ((long) (sizeof (float))))
7389 exit (1);
7390 fprintf (f, "%ld\n", i);
7391 }
7392 else
7393 {
7394 unsigned long i = ulongval ();
7395 if (i != ((long) (sizeof (float))))
7396 exit (1);
7397 fprintf (f, "%lu\n", i);
7398 }
7399 exit (ferror (f) || fclose (f) != 0);
7400
7401 ;
7402 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007403}
Martin v. Löwis11437992002-04-12 09:54:03 +00007404_ACEOF
7405rm -f conftest$ac_exeext
7406if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7407 (eval $ac_link) 2>&5
7408 ac_status=$?
7409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7410 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7411 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7412 (eval $ac_try) 2>&5
7413 ac_status=$?
7414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7415 (exit $ac_status); }; }; then
7416 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007417else
Martin v. Löwis11437992002-04-12 09:54:03 +00007418 echo "$as_me: program exited with status $ac_status" >&5
7419echo "$as_me: failed program was:" >&5
7420cat conftest.$ac_ext >&5
7421( exit $ac_status )
7422{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7423echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7424 { (exit 1); exit 1; }; }
7425fi
Barry Warsawfe33b792003-01-07 22:42:49 +00007426rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007427fi
7428fi
7429rm -f conftest.val
7430else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007431 ac_cv_sizeof_float=0
7432fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007433fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007434echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7435echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7436cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007437#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007438_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007439
7440
Martin v. Löwis11437992002-04-12 09:54:03 +00007441echo "$as_me:$LINENO: checking for double" >&5
7442echo $ECHO_N "checking for double... $ECHO_C" >&6
7443if test "${ac_cv_type_double+set}" = set; then
7444 echo $ECHO_N "(cached) $ECHO_C" >&6
7445else
7446 cat >conftest.$ac_ext <<_ACEOF
7447#line $LINENO "configure"
7448#include "confdefs.h"
7449$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007450#ifdef F77_DUMMY_MAIN
7451# ifdef __cplusplus
7452 extern "C"
7453# endif
7454 int F77_DUMMY_MAIN() { return 1; }
7455#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007456int
7457main ()
7458{
7459if ((double *) 0)
7460 return 0;
7461if (sizeof (double))
7462 return 0;
7463 ;
7464 return 0;
7465}
7466_ACEOF
7467rm -f conftest.$ac_objext
7468if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7469 (eval $ac_compile) 2>&5
7470 ac_status=$?
7471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7472 (exit $ac_status); } &&
7473 { ac_try='test -s conftest.$ac_objext'
7474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7475 (eval $ac_try) 2>&5
7476 ac_status=$?
7477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7478 (exit $ac_status); }; }; then
7479 ac_cv_type_double=yes
7480else
7481 echo "$as_me: failed program was:" >&5
7482cat conftest.$ac_ext >&5
7483ac_cv_type_double=no
7484fi
7485rm -f conftest.$ac_objext conftest.$ac_ext
7486fi
7487echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7488echo "${ECHO_T}$ac_cv_type_double" >&6
7489
7490echo "$as_me:$LINENO: checking size of double" >&5
7491echo $ECHO_N "checking size of double... $ECHO_C" >&6
7492if test "${ac_cv_sizeof_double+set}" = set; then
7493 echo $ECHO_N "(cached) $ECHO_C" >&6
7494else
7495 if test "$ac_cv_type_double" = yes; then
7496 # The cast to unsigned long works around a bug in the HP C Compiler
7497 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7498 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7499 # This bug is HP SR number 8606223364.
7500 if test "$cross_compiling" = yes; then
7501 # Depending upon the size, compute the lo and hi bounds.
7502cat >conftest.$ac_ext <<_ACEOF
7503#line $LINENO "configure"
7504#include "confdefs.h"
7505$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007506#ifdef F77_DUMMY_MAIN
7507# ifdef __cplusplus
7508 extern "C"
7509# endif
7510 int F77_DUMMY_MAIN() { return 1; }
7511#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007512int
7513main ()
7514{
7515static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7516test_array [0] = 0
7517
7518 ;
7519 return 0;
7520}
7521_ACEOF
7522rm -f conftest.$ac_objext
7523if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7524 (eval $ac_compile) 2>&5
7525 ac_status=$?
7526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7527 (exit $ac_status); } &&
7528 { ac_try='test -s conftest.$ac_objext'
7529 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7530 (eval $ac_try) 2>&5
7531 ac_status=$?
7532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7533 (exit $ac_status); }; }; then
7534 ac_lo=0 ac_mid=0
7535 while :; do
7536 cat >conftest.$ac_ext <<_ACEOF
7537#line $LINENO "configure"
7538#include "confdefs.h"
7539$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007540#ifdef F77_DUMMY_MAIN
7541# ifdef __cplusplus
7542 extern "C"
7543# endif
7544 int F77_DUMMY_MAIN() { return 1; }
7545#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007546int
7547main ()
7548{
7549static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7550test_array [0] = 0
7551
7552 ;
7553 return 0;
7554}
7555_ACEOF
7556rm -f conftest.$ac_objext
7557if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7558 (eval $ac_compile) 2>&5
7559 ac_status=$?
7560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7561 (exit $ac_status); } &&
7562 { ac_try='test -s conftest.$ac_objext'
7563 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7564 (eval $ac_try) 2>&5
7565 ac_status=$?
7566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7567 (exit $ac_status); }; }; then
7568 ac_hi=$ac_mid; break
7569else
7570 echo "$as_me: failed program was:" >&5
7571cat conftest.$ac_ext >&5
7572ac_lo=`expr $ac_mid + 1`
7573 if test $ac_lo -le $ac_mid; then
7574 ac_lo= ac_hi=
7575 break
7576 fi
7577 ac_mid=`expr 2 '*' $ac_mid + 1`
7578fi
7579rm -f conftest.$ac_objext conftest.$ac_ext
7580 done
7581else
7582 echo "$as_me: failed program was:" >&5
7583cat conftest.$ac_ext >&5
7584cat >conftest.$ac_ext <<_ACEOF
7585#line $LINENO "configure"
7586#include "confdefs.h"
7587$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007588#ifdef F77_DUMMY_MAIN
7589# ifdef __cplusplus
7590 extern "C"
7591# endif
7592 int F77_DUMMY_MAIN() { return 1; }
7593#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007594int
7595main ()
7596{
7597static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7598test_array [0] = 0
7599
7600 ;
7601 return 0;
7602}
7603_ACEOF
7604rm -f conftest.$ac_objext
7605if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7606 (eval $ac_compile) 2>&5
7607 ac_status=$?
7608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7609 (exit $ac_status); } &&
7610 { ac_try='test -s conftest.$ac_objext'
7611 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7612 (eval $ac_try) 2>&5
7613 ac_status=$?
7614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7615 (exit $ac_status); }; }; then
7616 ac_hi=-1 ac_mid=-1
7617 while :; do
7618 cat >conftest.$ac_ext <<_ACEOF
7619#line $LINENO "configure"
7620#include "confdefs.h"
7621$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007622#ifdef F77_DUMMY_MAIN
7623# ifdef __cplusplus
7624 extern "C"
7625# endif
7626 int F77_DUMMY_MAIN() { return 1; }
7627#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007628int
7629main ()
7630{
7631static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7632test_array [0] = 0
7633
7634 ;
7635 return 0;
7636}
7637_ACEOF
7638rm -f conftest.$ac_objext
7639if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7640 (eval $ac_compile) 2>&5
7641 ac_status=$?
7642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7643 (exit $ac_status); } &&
7644 { ac_try='test -s conftest.$ac_objext'
7645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7646 (eval $ac_try) 2>&5
7647 ac_status=$?
7648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7649 (exit $ac_status); }; }; then
7650 ac_lo=$ac_mid; break
7651else
7652 echo "$as_me: failed program was:" >&5
7653cat conftest.$ac_ext >&5
7654ac_hi=`expr '(' $ac_mid ')' - 1`
7655 if test $ac_mid -le $ac_hi; then
7656 ac_lo= ac_hi=
7657 break
7658 fi
7659 ac_mid=`expr 2 '*' $ac_mid`
7660fi
7661rm -f conftest.$ac_objext conftest.$ac_ext
7662 done
7663else
7664 echo "$as_me: failed program was:" >&5
7665cat conftest.$ac_ext >&5
7666ac_lo= ac_hi=
7667fi
7668rm -f conftest.$ac_objext conftest.$ac_ext
7669fi
7670rm -f conftest.$ac_objext conftest.$ac_ext
7671# Binary search between lo and hi bounds.
7672while test "x$ac_lo" != "x$ac_hi"; do
7673 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7674 cat >conftest.$ac_ext <<_ACEOF
7675#line $LINENO "configure"
7676#include "confdefs.h"
7677$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007678#ifdef F77_DUMMY_MAIN
7679# ifdef __cplusplus
7680 extern "C"
7681# endif
7682 int F77_DUMMY_MAIN() { return 1; }
7683#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007684int
7685main ()
7686{
7687static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7688test_array [0] = 0
7689
7690 ;
7691 return 0;
7692}
7693_ACEOF
7694rm -f conftest.$ac_objext
7695if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7696 (eval $ac_compile) 2>&5
7697 ac_status=$?
7698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7699 (exit $ac_status); } &&
7700 { ac_try='test -s conftest.$ac_objext'
7701 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7702 (eval $ac_try) 2>&5
7703 ac_status=$?
7704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7705 (exit $ac_status); }; }; then
7706 ac_hi=$ac_mid
7707else
7708 echo "$as_me: failed program was:" >&5
7709cat conftest.$ac_ext >&5
7710ac_lo=`expr '(' $ac_mid ')' + 1`
7711fi
7712rm -f conftest.$ac_objext conftest.$ac_ext
7713done
7714case $ac_lo in
7715?*) ac_cv_sizeof_double=$ac_lo;;
7716'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7717echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7718 { (exit 1); exit 1; }; } ;;
7719esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007720else
7721 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007722 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7723echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7724 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007725else
Martin v. Löwis11437992002-04-12 09:54:03 +00007726 cat >conftest.$ac_ext <<_ACEOF
7727#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007728#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007729$ac_includes_default
7730long longval () { return (long) (sizeof (double)); }
7731unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007732#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007733#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00007734#ifdef F77_DUMMY_MAIN
7735# ifdef __cplusplus
7736 extern "C"
7737# endif
7738 int F77_DUMMY_MAIN() { return 1; }
7739#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007740int
7741main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007742{
Martin v. Löwis11437992002-04-12 09:54:03 +00007743
7744 FILE *f = fopen ("conftest.val", "w");
7745 if (! f)
7746 exit (1);
7747 if (((long) (sizeof (double))) < 0)
7748 {
7749 long i = longval ();
7750 if (i != ((long) (sizeof (double))))
7751 exit (1);
7752 fprintf (f, "%ld\n", i);
7753 }
7754 else
7755 {
7756 unsigned long i = ulongval ();
7757 if (i != ((long) (sizeof (double))))
7758 exit (1);
7759 fprintf (f, "%lu\n", i);
7760 }
7761 exit (ferror (f) || fclose (f) != 0);
7762
7763 ;
7764 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007765}
Martin v. Löwis11437992002-04-12 09:54:03 +00007766_ACEOF
7767rm -f conftest$ac_exeext
7768if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7769 (eval $ac_link) 2>&5
7770 ac_status=$?
7771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7772 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7774 (eval $ac_try) 2>&5
7775 ac_status=$?
7776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7777 (exit $ac_status); }; }; then
7778 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007779else
Martin v. Löwis11437992002-04-12 09:54:03 +00007780 echo "$as_me: program exited with status $ac_status" >&5
7781echo "$as_me: failed program was:" >&5
7782cat conftest.$ac_ext >&5
7783( exit $ac_status )
7784{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7785echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7786 { (exit 1); exit 1; }; }
7787fi
Barry Warsawfe33b792003-01-07 22:42:49 +00007788rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007789fi
7790fi
7791rm -f conftest.val
7792else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007793 ac_cv_sizeof_double=0
7794fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007795fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007796echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7797echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7798cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007799#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007800_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007801
7802
Martin v. Löwis11437992002-04-12 09:54:03 +00007803echo "$as_me:$LINENO: checking for fpos_t" >&5
7804echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7805if test "${ac_cv_type_fpos_t+set}" = set; then
7806 echo $ECHO_N "(cached) $ECHO_C" >&6
7807else
7808 cat >conftest.$ac_ext <<_ACEOF
7809#line $LINENO "configure"
7810#include "confdefs.h"
7811$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007812#ifdef F77_DUMMY_MAIN
7813# ifdef __cplusplus
7814 extern "C"
7815# endif
7816 int F77_DUMMY_MAIN() { return 1; }
7817#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007818int
7819main ()
7820{
7821if ((fpos_t *) 0)
7822 return 0;
7823if (sizeof (fpos_t))
7824 return 0;
7825 ;
7826 return 0;
7827}
7828_ACEOF
7829rm -f conftest.$ac_objext
7830if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7831 (eval $ac_compile) 2>&5
7832 ac_status=$?
7833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7834 (exit $ac_status); } &&
7835 { ac_try='test -s conftest.$ac_objext'
7836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7837 (eval $ac_try) 2>&5
7838 ac_status=$?
7839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7840 (exit $ac_status); }; }; then
7841 ac_cv_type_fpos_t=yes
7842else
7843 echo "$as_me: failed program was:" >&5
7844cat conftest.$ac_ext >&5
7845ac_cv_type_fpos_t=no
7846fi
7847rm -f conftest.$ac_objext conftest.$ac_ext
7848fi
7849echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7850echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7851
7852echo "$as_me:$LINENO: checking size of fpos_t" >&5
7853echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7854if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7855 echo $ECHO_N "(cached) $ECHO_C" >&6
7856else
7857 if test "$ac_cv_type_fpos_t" = yes; then
7858 # The cast to unsigned long works around a bug in the HP C Compiler
7859 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7860 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7861 # This bug is HP SR number 8606223364.
7862 if test "$cross_compiling" = yes; then
7863 # Depending upon the size, compute the lo and hi bounds.
7864cat >conftest.$ac_ext <<_ACEOF
7865#line $LINENO "configure"
7866#include "confdefs.h"
7867$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007868#ifdef F77_DUMMY_MAIN
7869# ifdef __cplusplus
7870 extern "C"
7871# endif
7872 int F77_DUMMY_MAIN() { return 1; }
7873#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007874int
7875main ()
7876{
7877static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7878test_array [0] = 0
7879
7880 ;
7881 return 0;
7882}
7883_ACEOF
7884rm -f conftest.$ac_objext
7885if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7886 (eval $ac_compile) 2>&5
7887 ac_status=$?
7888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7889 (exit $ac_status); } &&
7890 { ac_try='test -s conftest.$ac_objext'
7891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7892 (eval $ac_try) 2>&5
7893 ac_status=$?
7894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7895 (exit $ac_status); }; }; then
7896 ac_lo=0 ac_mid=0
7897 while :; do
7898 cat >conftest.$ac_ext <<_ACEOF
7899#line $LINENO "configure"
7900#include "confdefs.h"
7901$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007902#ifdef F77_DUMMY_MAIN
7903# ifdef __cplusplus
7904 extern "C"
7905# endif
7906 int F77_DUMMY_MAIN() { return 1; }
7907#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007908int
7909main ()
7910{
7911static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7912test_array [0] = 0
7913
7914 ;
7915 return 0;
7916}
7917_ACEOF
7918rm -f conftest.$ac_objext
7919if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7920 (eval $ac_compile) 2>&5
7921 ac_status=$?
7922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7923 (exit $ac_status); } &&
7924 { ac_try='test -s conftest.$ac_objext'
7925 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7926 (eval $ac_try) 2>&5
7927 ac_status=$?
7928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7929 (exit $ac_status); }; }; then
7930 ac_hi=$ac_mid; break
7931else
7932 echo "$as_me: failed program was:" >&5
7933cat conftest.$ac_ext >&5
7934ac_lo=`expr $ac_mid + 1`
7935 if test $ac_lo -le $ac_mid; then
7936 ac_lo= ac_hi=
7937 break
7938 fi
7939 ac_mid=`expr 2 '*' $ac_mid + 1`
7940fi
7941rm -f conftest.$ac_objext conftest.$ac_ext
7942 done
7943else
7944 echo "$as_me: failed program was:" >&5
7945cat conftest.$ac_ext >&5
7946cat >conftest.$ac_ext <<_ACEOF
7947#line $LINENO "configure"
7948#include "confdefs.h"
7949$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007950#ifdef F77_DUMMY_MAIN
7951# ifdef __cplusplus
7952 extern "C"
7953# endif
7954 int F77_DUMMY_MAIN() { return 1; }
7955#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007956int
7957main ()
7958{
7959static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7960test_array [0] = 0
7961
7962 ;
7963 return 0;
7964}
7965_ACEOF
7966rm -f conftest.$ac_objext
7967if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7968 (eval $ac_compile) 2>&5
7969 ac_status=$?
7970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7971 (exit $ac_status); } &&
7972 { ac_try='test -s conftest.$ac_objext'
7973 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7974 (eval $ac_try) 2>&5
7975 ac_status=$?
7976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7977 (exit $ac_status); }; }; then
7978 ac_hi=-1 ac_mid=-1
7979 while :; do
7980 cat >conftest.$ac_ext <<_ACEOF
7981#line $LINENO "configure"
7982#include "confdefs.h"
7983$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007984#ifdef F77_DUMMY_MAIN
7985# ifdef __cplusplus
7986 extern "C"
7987# endif
7988 int F77_DUMMY_MAIN() { return 1; }
7989#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007990int
7991main ()
7992{
7993static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7994test_array [0] = 0
7995
7996 ;
7997 return 0;
7998}
7999_ACEOF
8000rm -f conftest.$ac_objext
8001if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8002 (eval $ac_compile) 2>&5
8003 ac_status=$?
8004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8005 (exit $ac_status); } &&
8006 { ac_try='test -s conftest.$ac_objext'
8007 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8008 (eval $ac_try) 2>&5
8009 ac_status=$?
8010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8011 (exit $ac_status); }; }; then
8012 ac_lo=$ac_mid; break
8013else
8014 echo "$as_me: failed program was:" >&5
8015cat conftest.$ac_ext >&5
8016ac_hi=`expr '(' $ac_mid ')' - 1`
8017 if test $ac_mid -le $ac_hi; then
8018 ac_lo= ac_hi=
8019 break
8020 fi
8021 ac_mid=`expr 2 '*' $ac_mid`
8022fi
8023rm -f conftest.$ac_objext conftest.$ac_ext
8024 done
8025else
8026 echo "$as_me: failed program was:" >&5
8027cat conftest.$ac_ext >&5
8028ac_lo= ac_hi=
8029fi
8030rm -f conftest.$ac_objext conftest.$ac_ext
8031fi
8032rm -f conftest.$ac_objext conftest.$ac_ext
8033# Binary search between lo and hi bounds.
8034while test "x$ac_lo" != "x$ac_hi"; do
8035 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8036 cat >conftest.$ac_ext <<_ACEOF
8037#line $LINENO "configure"
8038#include "confdefs.h"
8039$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008040#ifdef F77_DUMMY_MAIN
8041# ifdef __cplusplus
8042 extern "C"
8043# endif
8044 int F77_DUMMY_MAIN() { return 1; }
8045#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008046int
8047main ()
8048{
8049static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8050test_array [0] = 0
8051
8052 ;
8053 return 0;
8054}
8055_ACEOF
8056rm -f conftest.$ac_objext
8057if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8058 (eval $ac_compile) 2>&5
8059 ac_status=$?
8060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8061 (exit $ac_status); } &&
8062 { ac_try='test -s conftest.$ac_objext'
8063 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8064 (eval $ac_try) 2>&5
8065 ac_status=$?
8066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8067 (exit $ac_status); }; }; then
8068 ac_hi=$ac_mid
8069else
8070 echo "$as_me: failed program was:" >&5
8071cat conftest.$ac_ext >&5
8072ac_lo=`expr '(' $ac_mid ')' + 1`
8073fi
8074rm -f conftest.$ac_objext conftest.$ac_ext
8075done
8076case $ac_lo in
8077?*) ac_cv_sizeof_fpos_t=$ac_lo;;
8078'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8079echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
8080 { (exit 1); exit 1; }; } ;;
8081esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008082else
8083 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008084 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8085echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8086 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008087else
Martin v. Löwis11437992002-04-12 09:54:03 +00008088 cat >conftest.$ac_ext <<_ACEOF
8089#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008090#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008091$ac_includes_default
8092long longval () { return (long) (sizeof (fpos_t)); }
8093unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008094#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008095#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00008096#ifdef F77_DUMMY_MAIN
8097# ifdef __cplusplus
8098 extern "C"
8099# endif
8100 int F77_DUMMY_MAIN() { return 1; }
8101#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008102int
8103main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008104{
Martin v. Löwis11437992002-04-12 09:54:03 +00008105
8106 FILE *f = fopen ("conftest.val", "w");
8107 if (! f)
8108 exit (1);
8109 if (((long) (sizeof (fpos_t))) < 0)
8110 {
8111 long i = longval ();
8112 if (i != ((long) (sizeof (fpos_t))))
8113 exit (1);
8114 fprintf (f, "%ld\n", i);
8115 }
8116 else
8117 {
8118 unsigned long i = ulongval ();
8119 if (i != ((long) (sizeof (fpos_t))))
8120 exit (1);
8121 fprintf (f, "%lu\n", i);
8122 }
8123 exit (ferror (f) || fclose (f) != 0);
8124
8125 ;
8126 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008127}
Martin v. Löwis11437992002-04-12 09:54:03 +00008128_ACEOF
8129rm -f conftest$ac_exeext
8130if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8131 (eval $ac_link) 2>&5
8132 ac_status=$?
8133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8134 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8136 (eval $ac_try) 2>&5
8137 ac_status=$?
8138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8139 (exit $ac_status); }; }; then
8140 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008141else
Martin v. Löwis11437992002-04-12 09:54:03 +00008142 echo "$as_me: program exited with status $ac_status" >&5
8143echo "$as_me: failed program was:" >&5
8144cat conftest.$ac_ext >&5
8145( exit $ac_status )
8146{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8147echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
8148 { (exit 1); exit 1; }; }
8149fi
Barry Warsawfe33b792003-01-07 22:42:49 +00008150rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008151fi
8152fi
8153rm -f conftest.val
8154else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008155 ac_cv_sizeof_fpos_t=0
8156fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008157fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008158echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8159echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8160cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008161#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008162_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008163
Michael W. Hudson54241132001-12-07 15:38:26 +00008164
8165
Martin v. Löwis11437992002-04-12 09:54:03 +00008166echo "$as_me:$LINENO: checking for long long support" >&5
8167echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008168have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008169cat >conftest.$ac_ext <<_ACEOF
8170#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008171#include "confdefs.h"
8172
Barry Warsawfe33b792003-01-07 22:42:49 +00008173#ifdef F77_DUMMY_MAIN
8174# ifdef __cplusplus
8175 extern "C"
8176# endif
8177 int F77_DUMMY_MAIN() { return 1; }
8178#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008179int
8180main ()
8181{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008182long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008183 ;
8184 return 0;
8185}
8186_ACEOF
8187rm -f conftest.$ac_objext
8188if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8189 (eval $ac_compile) 2>&5
8190 ac_status=$?
8191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8192 (exit $ac_status); } &&
8193 { ac_try='test -s conftest.$ac_objext'
8194 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8195 (eval $ac_try) 2>&5
8196 ac_status=$?
8197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8198 (exit $ac_status); }; }; then
8199
8200
8201cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008202#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008203_ACEOF
8204
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008205 have_long_long=yes
8206
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008207else
Martin v. Löwis11437992002-04-12 09:54:03 +00008208 echo "$as_me: failed program was:" >&5
8209cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008210fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008211rm -f conftest.$ac_objext conftest.$ac_ext
8212echo "$as_me:$LINENO: result: $have_long_long" >&5
8213echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008214if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008215echo "$as_me:$LINENO: checking for long long" >&5
8216echo $ECHO_N "checking for long long... $ECHO_C" >&6
8217if test "${ac_cv_type_long_long+set}" = set; then
8218 echo $ECHO_N "(cached) $ECHO_C" >&6
8219else
8220 cat >conftest.$ac_ext <<_ACEOF
8221#line $LINENO "configure"
8222#include "confdefs.h"
8223$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008224#ifdef F77_DUMMY_MAIN
8225# ifdef __cplusplus
8226 extern "C"
8227# endif
8228 int F77_DUMMY_MAIN() { return 1; }
8229#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008230int
8231main ()
8232{
8233if ((long long *) 0)
8234 return 0;
8235if (sizeof (long long))
8236 return 0;
8237 ;
8238 return 0;
8239}
8240_ACEOF
8241rm -f conftest.$ac_objext
8242if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8243 (eval $ac_compile) 2>&5
8244 ac_status=$?
8245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8246 (exit $ac_status); } &&
8247 { ac_try='test -s conftest.$ac_objext'
8248 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8249 (eval $ac_try) 2>&5
8250 ac_status=$?
8251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8252 (exit $ac_status); }; }; then
8253 ac_cv_type_long_long=yes
8254else
8255 echo "$as_me: failed program was:" >&5
8256cat conftest.$ac_ext >&5
8257ac_cv_type_long_long=no
8258fi
8259rm -f conftest.$ac_objext conftest.$ac_ext
8260fi
8261echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8262echo "${ECHO_T}$ac_cv_type_long_long" >&6
8263
8264echo "$as_me:$LINENO: checking size of long long" >&5
8265echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8266if test "${ac_cv_sizeof_long_long+set}" = set; then
8267 echo $ECHO_N "(cached) $ECHO_C" >&6
8268else
8269 if test "$ac_cv_type_long_long" = yes; then
8270 # The cast to unsigned long works around a bug in the HP C Compiler
8271 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8272 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8273 # This bug is HP SR number 8606223364.
8274 if test "$cross_compiling" = yes; then
8275 # Depending upon the size, compute the lo and hi bounds.
8276cat >conftest.$ac_ext <<_ACEOF
8277#line $LINENO "configure"
8278#include "confdefs.h"
8279$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008280#ifdef F77_DUMMY_MAIN
8281# ifdef __cplusplus
8282 extern "C"
8283# endif
8284 int F77_DUMMY_MAIN() { return 1; }
8285#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008286int
8287main ()
8288{
8289static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8290test_array [0] = 0
8291
8292 ;
8293 return 0;
8294}
8295_ACEOF
8296rm -f conftest.$ac_objext
8297if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8298 (eval $ac_compile) 2>&5
8299 ac_status=$?
8300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8301 (exit $ac_status); } &&
8302 { ac_try='test -s conftest.$ac_objext'
8303 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8304 (eval $ac_try) 2>&5
8305 ac_status=$?
8306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8307 (exit $ac_status); }; }; then
8308 ac_lo=0 ac_mid=0
8309 while :; do
8310 cat >conftest.$ac_ext <<_ACEOF
8311#line $LINENO "configure"
8312#include "confdefs.h"
8313$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008314#ifdef F77_DUMMY_MAIN
8315# ifdef __cplusplus
8316 extern "C"
8317# endif
8318 int F77_DUMMY_MAIN() { return 1; }
8319#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008320int
8321main ()
8322{
8323static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8324test_array [0] = 0
8325
8326 ;
8327 return 0;
8328}
8329_ACEOF
8330rm -f conftest.$ac_objext
8331if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8332 (eval $ac_compile) 2>&5
8333 ac_status=$?
8334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8335 (exit $ac_status); } &&
8336 { ac_try='test -s conftest.$ac_objext'
8337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8338 (eval $ac_try) 2>&5
8339 ac_status=$?
8340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8341 (exit $ac_status); }; }; then
8342 ac_hi=$ac_mid; break
8343else
8344 echo "$as_me: failed program was:" >&5
8345cat conftest.$ac_ext >&5
8346ac_lo=`expr $ac_mid + 1`
8347 if test $ac_lo -le $ac_mid; then
8348 ac_lo= ac_hi=
8349 break
8350 fi
8351 ac_mid=`expr 2 '*' $ac_mid + 1`
8352fi
8353rm -f conftest.$ac_objext conftest.$ac_ext
8354 done
8355else
8356 echo "$as_me: failed program was:" >&5
8357cat conftest.$ac_ext >&5
8358cat >conftest.$ac_ext <<_ACEOF
8359#line $LINENO "configure"
8360#include "confdefs.h"
8361$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008362#ifdef F77_DUMMY_MAIN
8363# ifdef __cplusplus
8364 extern "C"
8365# endif
8366 int F77_DUMMY_MAIN() { return 1; }
8367#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008368int
8369main ()
8370{
8371static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8372test_array [0] = 0
8373
8374 ;
8375 return 0;
8376}
8377_ACEOF
8378rm -f conftest.$ac_objext
8379if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8380 (eval $ac_compile) 2>&5
8381 ac_status=$?
8382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8383 (exit $ac_status); } &&
8384 { ac_try='test -s conftest.$ac_objext'
8385 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8386 (eval $ac_try) 2>&5
8387 ac_status=$?
8388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8389 (exit $ac_status); }; }; then
8390 ac_hi=-1 ac_mid=-1
8391 while :; do
8392 cat >conftest.$ac_ext <<_ACEOF
8393#line $LINENO "configure"
8394#include "confdefs.h"
8395$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008396#ifdef F77_DUMMY_MAIN
8397# ifdef __cplusplus
8398 extern "C"
8399# endif
8400 int F77_DUMMY_MAIN() { return 1; }
8401#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008402int
8403main ()
8404{
8405static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8406test_array [0] = 0
8407
8408 ;
8409 return 0;
8410}
8411_ACEOF
8412rm -f conftest.$ac_objext
8413if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8414 (eval $ac_compile) 2>&5
8415 ac_status=$?
8416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8417 (exit $ac_status); } &&
8418 { ac_try='test -s conftest.$ac_objext'
8419 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8420 (eval $ac_try) 2>&5
8421 ac_status=$?
8422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8423 (exit $ac_status); }; }; then
8424 ac_lo=$ac_mid; break
8425else
8426 echo "$as_me: failed program was:" >&5
8427cat conftest.$ac_ext >&5
8428ac_hi=`expr '(' $ac_mid ')' - 1`
8429 if test $ac_mid -le $ac_hi; then
8430 ac_lo= ac_hi=
8431 break
8432 fi
8433 ac_mid=`expr 2 '*' $ac_mid`
8434fi
8435rm -f conftest.$ac_objext conftest.$ac_ext
8436 done
8437else
8438 echo "$as_me: failed program was:" >&5
8439cat conftest.$ac_ext >&5
8440ac_lo= ac_hi=
8441fi
8442rm -f conftest.$ac_objext conftest.$ac_ext
8443fi
8444rm -f conftest.$ac_objext conftest.$ac_ext
8445# Binary search between lo and hi bounds.
8446while test "x$ac_lo" != "x$ac_hi"; do
8447 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8448 cat >conftest.$ac_ext <<_ACEOF
8449#line $LINENO "configure"
8450#include "confdefs.h"
8451$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008452#ifdef F77_DUMMY_MAIN
8453# ifdef __cplusplus
8454 extern "C"
8455# endif
8456 int F77_DUMMY_MAIN() { return 1; }
8457#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008458int
8459main ()
8460{
8461static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8462test_array [0] = 0
8463
8464 ;
8465 return 0;
8466}
8467_ACEOF
8468rm -f conftest.$ac_objext
8469if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8470 (eval $ac_compile) 2>&5
8471 ac_status=$?
8472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8473 (exit $ac_status); } &&
8474 { ac_try='test -s conftest.$ac_objext'
8475 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8476 (eval $ac_try) 2>&5
8477 ac_status=$?
8478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8479 (exit $ac_status); }; }; then
8480 ac_hi=$ac_mid
8481else
8482 echo "$as_me: failed program was:" >&5
8483cat conftest.$ac_ext >&5
8484ac_lo=`expr '(' $ac_mid ')' + 1`
8485fi
8486rm -f conftest.$ac_objext conftest.$ac_ext
8487done
8488case $ac_lo in
8489?*) ac_cv_sizeof_long_long=$ac_lo;;
8490'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8491echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8492 { (exit 1); exit 1; }; } ;;
8493esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008494else
8495 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008496 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8497echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8498 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008499else
Martin v. Löwis11437992002-04-12 09:54:03 +00008500 cat >conftest.$ac_ext <<_ACEOF
8501#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008502#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008503$ac_includes_default
8504long longval () { return (long) (sizeof (long long)); }
8505unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008506#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008507#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00008508#ifdef F77_DUMMY_MAIN
8509# ifdef __cplusplus
8510 extern "C"
8511# endif
8512 int F77_DUMMY_MAIN() { return 1; }
8513#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008514int
8515main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008516{
Martin v. Löwis11437992002-04-12 09:54:03 +00008517
8518 FILE *f = fopen ("conftest.val", "w");
8519 if (! f)
8520 exit (1);
8521 if (((long) (sizeof (long long))) < 0)
8522 {
8523 long i = longval ();
8524 if (i != ((long) (sizeof (long long))))
8525 exit (1);
8526 fprintf (f, "%ld\n", i);
8527 }
8528 else
8529 {
8530 unsigned long i = ulongval ();
8531 if (i != ((long) (sizeof (long long))))
8532 exit (1);
8533 fprintf (f, "%lu\n", i);
8534 }
8535 exit (ferror (f) || fclose (f) != 0);
8536
8537 ;
8538 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008539}
Martin v. Löwis11437992002-04-12 09:54:03 +00008540_ACEOF
8541rm -f conftest$ac_exeext
8542if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8543 (eval $ac_link) 2>&5
8544 ac_status=$?
8545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8546 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8547 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8548 (eval $ac_try) 2>&5
8549 ac_status=$?
8550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8551 (exit $ac_status); }; }; then
8552 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008553else
Martin v. Löwis11437992002-04-12 09:54:03 +00008554 echo "$as_me: program exited with status $ac_status" >&5
8555echo "$as_me: failed program was:" >&5
8556cat conftest.$ac_ext >&5
8557( exit $ac_status )
8558{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8559echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8560 { (exit 1); exit 1; }; }
8561fi
Barry Warsawfe33b792003-01-07 22:42:49 +00008562rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008563fi
8564fi
8565rm -f conftest.val
8566else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008567 ac_cv_sizeof_long_long=0
8568fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008569fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008570echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8571echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8572cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008573#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008574_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008575
Michael W. Hudson54241132001-12-07 15:38:26 +00008576
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008577fi
8578
Martin v. Löwis11437992002-04-12 09:54:03 +00008579echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8580echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008581have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008582cat >conftest.$ac_ext <<_ACEOF
8583#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008584#include "confdefs.h"
8585
Barry Warsawfe33b792003-01-07 22:42:49 +00008586#ifdef F77_DUMMY_MAIN
8587# ifdef __cplusplus
8588 extern "C"
8589# endif
8590 int F77_DUMMY_MAIN() { return 1; }
8591#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008592int
8593main ()
8594{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008595uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008596 ;
8597 return 0;
8598}
8599_ACEOF
8600rm -f conftest.$ac_objext
8601if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8602 (eval $ac_compile) 2>&5
8603 ac_status=$?
8604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8605 (exit $ac_status); } &&
8606 { ac_try='test -s conftest.$ac_objext'
8607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8608 (eval $ac_try) 2>&5
8609 ac_status=$?
8610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8611 (exit $ac_status); }; }; then
8612
8613
8614cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008615#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008616_ACEOF
8617
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008618 have_uintptr_t=yes
8619
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008620else
Martin v. Löwis11437992002-04-12 09:54:03 +00008621 echo "$as_me: failed program was:" >&5
8622cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008623fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008624rm -f conftest.$ac_objext conftest.$ac_ext
8625echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8626echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008627if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008628echo "$as_me:$LINENO: checking for uintptr_t" >&5
8629echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8630if test "${ac_cv_type_uintptr_t+set}" = set; then
8631 echo $ECHO_N "(cached) $ECHO_C" >&6
8632else
8633 cat >conftest.$ac_ext <<_ACEOF
8634#line $LINENO "configure"
8635#include "confdefs.h"
8636$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008637#ifdef F77_DUMMY_MAIN
8638# ifdef __cplusplus
8639 extern "C"
8640# endif
8641 int F77_DUMMY_MAIN() { return 1; }
8642#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008643int
8644main ()
8645{
8646if ((uintptr_t *) 0)
8647 return 0;
8648if (sizeof (uintptr_t))
8649 return 0;
8650 ;
8651 return 0;
8652}
8653_ACEOF
8654rm -f conftest.$ac_objext
8655if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8656 (eval $ac_compile) 2>&5
8657 ac_status=$?
8658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8659 (exit $ac_status); } &&
8660 { ac_try='test -s conftest.$ac_objext'
8661 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8662 (eval $ac_try) 2>&5
8663 ac_status=$?
8664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8665 (exit $ac_status); }; }; then
8666 ac_cv_type_uintptr_t=yes
8667else
8668 echo "$as_me: failed program was:" >&5
8669cat conftest.$ac_ext >&5
8670ac_cv_type_uintptr_t=no
8671fi
8672rm -f conftest.$ac_objext conftest.$ac_ext
8673fi
8674echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8675echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8676
8677echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8678echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8679if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8680 echo $ECHO_N "(cached) $ECHO_C" >&6
8681else
8682 if test "$ac_cv_type_uintptr_t" = yes; then
8683 # The cast to unsigned long works around a bug in the HP C Compiler
8684 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8685 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8686 # This bug is HP SR number 8606223364.
8687 if test "$cross_compiling" = yes; then
8688 # Depending upon the size, compute the lo and hi bounds.
8689cat >conftest.$ac_ext <<_ACEOF
8690#line $LINENO "configure"
8691#include "confdefs.h"
8692$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008693#ifdef F77_DUMMY_MAIN
8694# ifdef __cplusplus
8695 extern "C"
8696# endif
8697 int F77_DUMMY_MAIN() { return 1; }
8698#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008699int
8700main ()
8701{
8702static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8703test_array [0] = 0
8704
8705 ;
8706 return 0;
8707}
8708_ACEOF
8709rm -f conftest.$ac_objext
8710if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8711 (eval $ac_compile) 2>&5
8712 ac_status=$?
8713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8714 (exit $ac_status); } &&
8715 { ac_try='test -s conftest.$ac_objext'
8716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8717 (eval $ac_try) 2>&5
8718 ac_status=$?
8719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8720 (exit $ac_status); }; }; then
8721 ac_lo=0 ac_mid=0
8722 while :; do
8723 cat >conftest.$ac_ext <<_ACEOF
8724#line $LINENO "configure"
8725#include "confdefs.h"
8726$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008727#ifdef F77_DUMMY_MAIN
8728# ifdef __cplusplus
8729 extern "C"
8730# endif
8731 int F77_DUMMY_MAIN() { return 1; }
8732#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008733int
8734main ()
8735{
8736static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8737test_array [0] = 0
8738
8739 ;
8740 return 0;
8741}
8742_ACEOF
8743rm -f conftest.$ac_objext
8744if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8745 (eval $ac_compile) 2>&5
8746 ac_status=$?
8747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8748 (exit $ac_status); } &&
8749 { ac_try='test -s conftest.$ac_objext'
8750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8751 (eval $ac_try) 2>&5
8752 ac_status=$?
8753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8754 (exit $ac_status); }; }; then
8755 ac_hi=$ac_mid; break
8756else
8757 echo "$as_me: failed program was:" >&5
8758cat conftest.$ac_ext >&5
8759ac_lo=`expr $ac_mid + 1`
8760 if test $ac_lo -le $ac_mid; then
8761 ac_lo= ac_hi=
8762 break
8763 fi
8764 ac_mid=`expr 2 '*' $ac_mid + 1`
8765fi
8766rm -f conftest.$ac_objext conftest.$ac_ext
8767 done
8768else
8769 echo "$as_me: failed program was:" >&5
8770cat conftest.$ac_ext >&5
8771cat >conftest.$ac_ext <<_ACEOF
8772#line $LINENO "configure"
8773#include "confdefs.h"
8774$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008775#ifdef F77_DUMMY_MAIN
8776# ifdef __cplusplus
8777 extern "C"
8778# endif
8779 int F77_DUMMY_MAIN() { return 1; }
8780#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008781int
8782main ()
8783{
8784static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8785test_array [0] = 0
8786
8787 ;
8788 return 0;
8789}
8790_ACEOF
8791rm -f conftest.$ac_objext
8792if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8793 (eval $ac_compile) 2>&5
8794 ac_status=$?
8795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8796 (exit $ac_status); } &&
8797 { ac_try='test -s conftest.$ac_objext'
8798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8799 (eval $ac_try) 2>&5
8800 ac_status=$?
8801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8802 (exit $ac_status); }; }; then
8803 ac_hi=-1 ac_mid=-1
8804 while :; do
8805 cat >conftest.$ac_ext <<_ACEOF
8806#line $LINENO "configure"
8807#include "confdefs.h"
8808$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008809#ifdef F77_DUMMY_MAIN
8810# ifdef __cplusplus
8811 extern "C"
8812# endif
8813 int F77_DUMMY_MAIN() { return 1; }
8814#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008815int
8816main ()
8817{
8818static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8819test_array [0] = 0
8820
8821 ;
8822 return 0;
8823}
8824_ACEOF
8825rm -f conftest.$ac_objext
8826if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8827 (eval $ac_compile) 2>&5
8828 ac_status=$?
8829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8830 (exit $ac_status); } &&
8831 { ac_try='test -s conftest.$ac_objext'
8832 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8833 (eval $ac_try) 2>&5
8834 ac_status=$?
8835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8836 (exit $ac_status); }; }; then
8837 ac_lo=$ac_mid; break
8838else
8839 echo "$as_me: failed program was:" >&5
8840cat conftest.$ac_ext >&5
8841ac_hi=`expr '(' $ac_mid ')' - 1`
8842 if test $ac_mid -le $ac_hi; then
8843 ac_lo= ac_hi=
8844 break
8845 fi
8846 ac_mid=`expr 2 '*' $ac_mid`
8847fi
8848rm -f conftest.$ac_objext conftest.$ac_ext
8849 done
8850else
8851 echo "$as_me: failed program was:" >&5
8852cat conftest.$ac_ext >&5
8853ac_lo= ac_hi=
8854fi
8855rm -f conftest.$ac_objext conftest.$ac_ext
8856fi
8857rm -f conftest.$ac_objext conftest.$ac_ext
8858# Binary search between lo and hi bounds.
8859while test "x$ac_lo" != "x$ac_hi"; do
8860 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8861 cat >conftest.$ac_ext <<_ACEOF
8862#line $LINENO "configure"
8863#include "confdefs.h"
8864$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008865#ifdef F77_DUMMY_MAIN
8866# ifdef __cplusplus
8867 extern "C"
8868# endif
8869 int F77_DUMMY_MAIN() { return 1; }
8870#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008871int
8872main ()
8873{
8874static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8875test_array [0] = 0
8876
8877 ;
8878 return 0;
8879}
8880_ACEOF
8881rm -f conftest.$ac_objext
8882if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8883 (eval $ac_compile) 2>&5
8884 ac_status=$?
8885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8886 (exit $ac_status); } &&
8887 { ac_try='test -s conftest.$ac_objext'
8888 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8889 (eval $ac_try) 2>&5
8890 ac_status=$?
8891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8892 (exit $ac_status); }; }; then
8893 ac_hi=$ac_mid
8894else
8895 echo "$as_me: failed program was:" >&5
8896cat conftest.$ac_ext >&5
8897ac_lo=`expr '(' $ac_mid ')' + 1`
8898fi
8899rm -f conftest.$ac_objext conftest.$ac_ext
8900done
8901case $ac_lo in
8902?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8903'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8904echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8905 { (exit 1); exit 1; }; } ;;
8906esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008907else
8908 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008909 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8910echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8911 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008912else
Martin v. Löwis11437992002-04-12 09:54:03 +00008913 cat >conftest.$ac_ext <<_ACEOF
8914#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008915#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008916$ac_includes_default
8917long longval () { return (long) (sizeof (uintptr_t)); }
8918unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008919#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008920#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00008921#ifdef F77_DUMMY_MAIN
8922# ifdef __cplusplus
8923 extern "C"
8924# endif
8925 int F77_DUMMY_MAIN() { return 1; }
8926#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008927int
8928main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008929{
Martin v. Löwis11437992002-04-12 09:54:03 +00008930
8931 FILE *f = fopen ("conftest.val", "w");
8932 if (! f)
8933 exit (1);
8934 if (((long) (sizeof (uintptr_t))) < 0)
8935 {
8936 long i = longval ();
8937 if (i != ((long) (sizeof (uintptr_t))))
8938 exit (1);
8939 fprintf (f, "%ld\n", i);
8940 }
8941 else
8942 {
8943 unsigned long i = ulongval ();
8944 if (i != ((long) (sizeof (uintptr_t))))
8945 exit (1);
8946 fprintf (f, "%lu\n", i);
8947 }
8948 exit (ferror (f) || fclose (f) != 0);
8949
8950 ;
8951 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008952}
Martin v. Löwis11437992002-04-12 09:54:03 +00008953_ACEOF
8954rm -f conftest$ac_exeext
8955if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8956 (eval $ac_link) 2>&5
8957 ac_status=$?
8958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8959 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8960 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8961 (eval $ac_try) 2>&5
8962 ac_status=$?
8963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8964 (exit $ac_status); }; }; then
8965 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008966else
Martin v. Löwis11437992002-04-12 09:54:03 +00008967 echo "$as_me: program exited with status $ac_status" >&5
8968echo "$as_me: failed program was:" >&5
8969cat conftest.$ac_ext >&5
8970( exit $ac_status )
8971{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8972echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8973 { (exit 1); exit 1; }; }
8974fi
Barry Warsawfe33b792003-01-07 22:42:49 +00008975rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008976fi
8977fi
8978rm -f conftest.val
8979else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008980 ac_cv_sizeof_uintptr_t=0
8981fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008982fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008983echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8984echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8985cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008986#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008987_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008988
Michael W. Hudson54241132001-12-07 15:38:26 +00008989
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008990fi
8991
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008992# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008993echo "$as_me:$LINENO: checking size of off_t" >&5
8994echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8995if test "${ac_cv_sizeof_off_t+set}" = set; then
8996 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008997else
8998 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008999 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009000else
Martin v. Löwis11437992002-04-12 09:54:03 +00009001 cat >conftest.$ac_ext <<_ACEOF
9002#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009003#include "confdefs.h"
9004#include <stdio.h>
9005#include <sys/types.h>
9006main()
9007{
9008 FILE *f=fopen("conftestval", "w");
9009 if (!f) exit(1);
9010 fprintf(f, "%d\n", sizeof(off_t));
9011 exit(0);
9012}
Martin v. Löwis11437992002-04-12 09:54:03 +00009013_ACEOF
9014rm -f conftest$ac_exeext
9015if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9016 (eval $ac_link) 2>&5
9017 ac_status=$?
9018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9019 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9020 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9021 (eval $ac_try) 2>&5
9022 ac_status=$?
9023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9024 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009025 ac_cv_sizeof_off_t=`cat conftestval`
9026else
Martin v. Löwis11437992002-04-12 09:54:03 +00009027 echo "$as_me: program exited with status $ac_status" >&5
9028echo "$as_me: failed program was:" >&5
9029cat conftest.$ac_ext >&5
9030( exit $ac_status )
9031ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009032fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009033rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009034fi
9035
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009036fi
9037
Martin v. Löwis11437992002-04-12 09:54:03 +00009038echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
9039echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
9040
9041cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009042#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009043_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009044
Michael W. Hudson54241132001-12-07 15:38:26 +00009045
Martin v. Löwis11437992002-04-12 09:54:03 +00009046echo "$as_me:$LINENO: checking whether to enable large file support" >&5
9047echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009048if test "$have_long_long" = yes -a \
9049 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
9050 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009051
Martin v. Löwis11437992002-04-12 09:54:03 +00009052cat >>confdefs.h <<\_ACEOF
9053#define HAVE_LARGEFILE_SUPPORT 1
9054_ACEOF
9055
9056 echo "$as_me:$LINENO: result: yes" >&5
9057echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009058else
Martin v. Löwis11437992002-04-12 09:54:03 +00009059 echo "$as_me:$LINENO: result: no" >&5
9060echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009061fi
9062
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009063# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009064echo "$as_me:$LINENO: checking size of time_t" >&5
9065echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
9066if test "${ac_cv_sizeof_time_t+set}" = set; then
9067 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009068else
9069 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009070 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009071else
Martin v. Löwis11437992002-04-12 09:54:03 +00009072 cat >conftest.$ac_ext <<_ACEOF
9073#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009074#include "confdefs.h"
9075#include <stdio.h>
9076#include <time.h>
9077main()
9078{
9079 FILE *f=fopen("conftestval", "w");
9080 if (!f) exit(1);
9081 fprintf(f, "%d\n", sizeof(time_t));
9082 exit(0);
9083}
Martin v. Löwis11437992002-04-12 09:54:03 +00009084_ACEOF
9085rm -f conftest$ac_exeext
9086if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9087 (eval $ac_link) 2>&5
9088 ac_status=$?
9089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9090 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9092 (eval $ac_try) 2>&5
9093 ac_status=$?
9094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9095 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009096 ac_cv_sizeof_time_t=`cat conftestval`
9097else
Martin v. Löwis11437992002-04-12 09:54:03 +00009098 echo "$as_me: program exited with status $ac_status" >&5
9099echo "$as_me: failed program was:" >&5
9100cat conftest.$ac_ext >&5
9101( exit $ac_status )
9102ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009103fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009104rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009105fi
9106
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009107fi
9108
Martin v. Löwis11437992002-04-12 09:54:03 +00009109echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9110echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9111
9112cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009113#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009114_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009115
Michael W. Hudson54241132001-12-07 15:38:26 +00009116
9117
Trent Mick635f6fb2000-08-23 21:33:05 +00009118# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009119ac_save_cc="$CC"
9120if test "$ac_cv_kpthread" = "yes"
9121then CC="$CC -Kpthread"
9122fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009123echo "$as_me:$LINENO: checking for pthread_t" >&5
9124echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009125have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009126cat >conftest.$ac_ext <<_ACEOF
9127#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009128#include "confdefs.h"
9129#include <pthread.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00009130#ifdef F77_DUMMY_MAIN
9131# ifdef __cplusplus
9132 extern "C"
9133# endif
9134 int F77_DUMMY_MAIN() { return 1; }
9135#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009136int
9137main ()
9138{
Guido van Rossum12580492000-09-24 16:47:19 +00009139pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009140 ;
9141 return 0;
9142}
9143_ACEOF
9144rm -f conftest.$ac_objext
9145if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9146 (eval $ac_compile) 2>&5
9147 ac_status=$?
9148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9149 (exit $ac_status); } &&
9150 { ac_try='test -s conftest.$ac_objext'
9151 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9152 (eval $ac_try) 2>&5
9153 ac_status=$?
9154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9155 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009156 have_pthread_t=yes
9157else
Martin v. Löwis11437992002-04-12 09:54:03 +00009158 echo "$as_me: failed program was:" >&5
9159cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00009160fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009161rm -f conftest.$ac_objext conftest.$ac_ext
9162echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9163echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009164if test "$have_pthread_t" = yes ; then
9165 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009166 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9167echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9168 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9169 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009170else
9171 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009172 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009173else
Martin v. Löwis11437992002-04-12 09:54:03 +00009174 cat >conftest.$ac_ext <<_ACEOF
9175#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009176#include "confdefs.h"
9177#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009178#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +00009179 main()
9180 {
9181 FILE *f=fopen("conftestval", "w");
9182 if (!f) exit(1);
9183 fprintf(f, "%d\n", sizeof(pthread_t));
9184 exit(0);
9185 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009186_ACEOF
9187rm -f conftest$ac_exeext
9188if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9189 (eval $ac_link) 2>&5
9190 ac_status=$?
9191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9192 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9193 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9194 (eval $ac_try) 2>&5
9195 ac_status=$?
9196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9197 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009198 ac_cv_sizeof_pthread_t=`cat conftestval`
9199else
Martin v. Löwis11437992002-04-12 09:54:03 +00009200 echo "$as_me: program exited with status $ac_status" >&5
9201echo "$as_me: failed program was:" >&5
9202cat conftest.$ac_ext >&5
9203( exit $ac_status )
9204ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009205fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009206rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009207fi
9208
Trent Mick635f6fb2000-08-23 21:33:05 +00009209fi
9210
Martin v. Löwis11437992002-04-12 09:54:03 +00009211 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9212echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9213
9214cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009215#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009216_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009217
9218fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009219CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009220
Martin v. Löwis11437992002-04-12 09:54:03 +00009221echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9222echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009223# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9224if test "${enable_toolbox_glue+set}" = set; then
9225 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009226
Martin v. Löwis11437992002-04-12 09:54:03 +00009227fi;
Jack Jansene578a632001-08-15 01:27:14 +00009228
9229if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009230then
Jack Jansene578a632001-08-15 01:27:14 +00009231 case $ac_sys_system/$ac_sys_release in
9232 Darwin/*)
9233 enable_toolbox_glue="yes";;
9234 *)
9235 enable_toolbox_glue="no";;
9236 esac
9237fi
9238case "$enable_toolbox_glue" in
9239yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009240 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009241 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009242 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009243
9244cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009245#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009246_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009247
9248 ;;
9249*)
9250 extra_frameworks=""
9251 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009252 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009253 ;;
9254esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009255echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9256echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009257
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009258
9259case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009260 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009261 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009262 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00009263 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9264 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009265 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009266 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009267 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00009268 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9269 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009270esac
9271
Martin v. Löwis11437992002-04-12 09:54:03 +00009272echo "$as_me:$LINENO: checking for --enable-framework" >&5
9273echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009274if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009275then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009276 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009277 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009278 # in the build location.
Jack Jansenea0c3822002-08-01 21:57:49 +00009279 LDFLAGS="$LDFLAGS -Wl,-F."
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009280
Martin v. Löwis11437992002-04-12 09:54:03 +00009281cat >>confdefs.h <<\_ACEOF
9282#define WITH_NEXT_FRAMEWORK 1
9283_ACEOF
9284
9285 echo "$as_me:$LINENO: result: yes" >&5
9286echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009287else
Martin v. Löwis11437992002-04-12 09:54:03 +00009288 echo "$as_me:$LINENO: result: no" >&5
9289echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009290fi
9291
Martin v. Löwis11437992002-04-12 09:54:03 +00009292echo "$as_me:$LINENO: checking for dyld" >&5
9293echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009294case $ac_sys_system/$ac_sys_release in
9295 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009296
Martin v. Löwis11437992002-04-12 09:54:03 +00009297cat >>confdefs.h <<\_ACEOF
9298#define WITH_DYLD 1
9299_ACEOF
9300
9301 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9302echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009303 ;;
9304 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009305 echo "$as_me:$LINENO: result: no" >&5
9306echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009307 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009308esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009309
Guido van Rossum0a516c91994-09-12 10:58:40 +00009310# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009311
Michael W. Hudson54241132001-12-07 15:38:26 +00009312
9313
9314
9315
Guido van Rossum0a516c91994-09-12 10:58:40 +00009316# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009317# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009318echo "$as_me:$LINENO: checking SO" >&5
9319echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009320if test -z "$SO"
9321then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009322 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009323 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009324 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009325 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009326 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009327fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009328echo "$as_me:$LINENO: result: $SO" >&5
9329echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009330# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00009331# -- "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 +00009332# (Shared libraries in this instance are shared modules to be loaded into
9333# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009334echo "$as_me:$LINENO: checking LDSHARED" >&5
9335echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009336if test -z "$LDSHARED"
9337then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009338 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009339 AIX*)
9340 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009341 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009342 ;;
9343 BeOS*)
9344 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009345 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009346 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009347 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009348 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009349 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009350 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00009351 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009352 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009353 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +00009354 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009355 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009356 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
9357 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009358 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009359 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9360 if test "$enable_framework" ; then
9361 # Link against the framework. All externals should be defined.
9362 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9363 else
9364 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009365 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009366 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009367 Darwin/*)
9368 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9369 if test "$enable_framework" ; then
9370 # Link against the framework. All externals should be defined.
9371 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9372 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009373 # No framework, use the Python app as bundle-loader
9374 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009375 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009376 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009377 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00009378 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009379 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009380 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009381 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009382 then
9383 LDSHARED="cc -shared ${LDFLAGS}"
9384 else
9385 LDSHARED="ld -Bshareable ${LDFLAGS}"
9386 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009387 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009388 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009389 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009390 then LDSHARED='$(CC) -shared'
9391 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009392 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009393 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +00009394 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009395 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009396 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009397 *) LDSHARED="ld";;
9398 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009399fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009400echo "$as_me:$LINENO: result: $LDSHARED" >&5
9401echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009402BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009403# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009404# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009405echo "$as_me:$LINENO: checking CCSHARED" >&5
9406echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009407if test -z "$CCSHARED"
9408then
Guido van Rossum07397971997-04-29 21:49:50 +00009409 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009410 SunOS*) if test "$GCC" = yes;
9411 then CCSHARED="-fPIC";
9412 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009413 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009414 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009415 else CCSHARED="+z";
9416 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009417 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009418 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009419 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009420 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009421 if test "$GCC" = "yes"
9422 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009423 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009424 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009425 SCO_SV*)
9426 if test "$GCC" = "yes"
9427 then CCSHARED="-fPIC"
9428 else CCSHARED="-Kpic -belf"
9429 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009430 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009431 IRIX*/6*) case $CC in
9432 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009433 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009434 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009435 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009436 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009437fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009438echo "$as_me:$LINENO: result: $CCSHARED" >&5
9439echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009440# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009441# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009442echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9443echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009444if test -z "$LINKFORSHARED"
9445then
Guido van Rossum07397971997-04-29 21:49:50 +00009446 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009447 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009448 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009449 LINKFORSHARED="-Wl,-E -Wl,+s";;
9450# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009451 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009452 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009453 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009454 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009455 # -u __dummy makes the linker aware of the objc runtime
9456 # in System.framework; otherwise, __objcInit (referenced in
9457 # crt1.o) gets erroneously defined as common, which breaks dynamic
9458 # loading of any modules which reference it in System.framework.
9459 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9460 # not used by the core itself but which needs to be in the core so
9461 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00009462 # -prebind is no longer used, because it actually seems to give a
9463 # slowdown in stead of a speedup, maybe due to the large number of
9464 # dynamic loads Python does.
9465 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009466 if test "$enable_framework"
9467 then
9468 LINKFORSHARED="$LINKFORSHARED -framework Python"
9469 fi
9470 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009471 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009472 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009473 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009474 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009475 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9476 then
9477 LINKFORSHARED="-Wl,--export-dynamic"
9478 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009479 SunOS/5*) case $CC in
9480 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009481 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009482 then
9483 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009484 fi;;
9485 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009486 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009487fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009488echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9489echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009490
Michael W. Hudson54241132001-12-07 15:38:26 +00009491
Martin v. Löwis11437992002-04-12 09:54:03 +00009492echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9493echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009494if test ! "$LIBRARY" = "$LDLIBRARY"
9495then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009496 case $ac_sys_system in
9497 CYGWIN*)
9498 # Cygwin needs CCSHARED when building extension DLLs
9499 # but not when building the interpreter DLL.
9500 CFLAGSFORSHARED='';;
9501 *)
9502 CFLAGSFORSHARED='$(CCSHARED)'
9503 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009504fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009505echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9506echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009507
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009508# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9509# library (with --enable-shared).
9510# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009511# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9512# if it is not required, since it creates a dependency of the shared library
9513# to LIBS. This, in turn, means that applications linking the shared libpython
9514# don't need to link LIBS explicitly. The default should be only changed
9515# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009516
9517echo "$as_me:$LINENO: checking SHLIBS" >&5
9518echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9519case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009520 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009521 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009522esac
9523echo "$as_me:$LINENO: result: $SHLIBS" >&5
9524echo "${ECHO_T}$SHLIBS" >&6
9525
9526
Guido van Rossum627b2d71993-12-24 10:39:16 +00009527# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009528
9529echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9530echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9531if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9532 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009533else
Martin v. Löwis11437992002-04-12 09:54:03 +00009534 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009535LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009536cat >conftest.$ac_ext <<_ACEOF
9537#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009538#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009539
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009540/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009541#ifdef __cplusplus
9542extern "C"
9543#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009544/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009545 builtin and then its argument prototype would still apply. */
9546char dlopen ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009547#ifdef F77_DUMMY_MAIN
9548# ifdef __cplusplus
9549 extern "C"
9550# endif
9551 int F77_DUMMY_MAIN() { return 1; }
9552#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009553int
9554main ()
9555{
9556dlopen ();
9557 ;
9558 return 0;
9559}
9560_ACEOF
9561rm -f conftest.$ac_objext conftest$ac_exeext
9562if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9563 (eval $ac_link) 2>&5
9564 ac_status=$?
9565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9566 (exit $ac_status); } &&
9567 { ac_try='test -s conftest$ac_exeext'
9568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9569 (eval $ac_try) 2>&5
9570 ac_status=$?
9571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9572 (exit $ac_status); }; }; then
9573 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009574else
Martin v. Löwis11437992002-04-12 09:54:03 +00009575 echo "$as_me: failed program was:" >&5
9576cat conftest.$ac_ext >&5
9577ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009578fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009579rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9580LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009581fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009582echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9583echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9584if test $ac_cv_lib_dl_dlopen = yes; then
9585 cat >>confdefs.h <<_ACEOF
9586#define HAVE_LIBDL 1
9587_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009588
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009589 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009590
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009591fi
9592 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009593
9594echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9595echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9596if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9597 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009598else
Martin v. Löwis11437992002-04-12 09:54:03 +00009599 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009600LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009601cat >conftest.$ac_ext <<_ACEOF
9602#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009603#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009604
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009605/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009606#ifdef __cplusplus
9607extern "C"
9608#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009609/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009610 builtin and then its argument prototype would still apply. */
9611char shl_load ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009612#ifdef F77_DUMMY_MAIN
9613# ifdef __cplusplus
9614 extern "C"
9615# endif
9616 int F77_DUMMY_MAIN() { return 1; }
9617#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009618int
9619main ()
9620{
9621shl_load ();
9622 ;
9623 return 0;
9624}
9625_ACEOF
9626rm -f conftest.$ac_objext conftest$ac_exeext
9627if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9628 (eval $ac_link) 2>&5
9629 ac_status=$?
9630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9631 (exit $ac_status); } &&
9632 { ac_try='test -s conftest$ac_exeext'
9633 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9634 (eval $ac_try) 2>&5
9635 ac_status=$?
9636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9637 (exit $ac_status); }; }; then
9638 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009639else
Martin v. Löwis11437992002-04-12 09:54:03 +00009640 echo "$as_me: failed program was:" >&5
9641cat conftest.$ac_ext >&5
9642ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009643fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009644rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9645LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009646fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009647echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9648echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9649if test $ac_cv_lib_dld_shl_load = yes; then
9650 cat >>confdefs.h <<_ACEOF
9651#define HAVE_LIBDLD 1
9652_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009653
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009654 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009655
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009656fi
9657 # Dynamic linking for HP-UX
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009658echo "$as_me:$LINENO: checking for library containing sem_init" >&5
9659echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9660if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009661 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009662else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009663 ac_func_search_save_LIBS=$LIBS
9664ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009665cat >conftest.$ac_ext <<_ACEOF
9666#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009667#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009668
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009669/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009670#ifdef __cplusplus
9671extern "C"
9672#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009673/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009674 builtin and then its argument prototype would still apply. */
9675char sem_init ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009676#ifdef F77_DUMMY_MAIN
9677# ifdef __cplusplus
9678 extern "C"
9679# endif
9680 int F77_DUMMY_MAIN() { return 1; }
9681#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009682int
9683main ()
9684{
9685sem_init ();
9686 ;
9687 return 0;
9688}
9689_ACEOF
9690rm -f conftest.$ac_objext conftest$ac_exeext
9691if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9692 (eval $ac_link) 2>&5
9693 ac_status=$?
9694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9695 (exit $ac_status); } &&
9696 { ac_try='test -s conftest$ac_exeext'
9697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9698 (eval $ac_try) 2>&5
9699 ac_status=$?
9700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9701 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009702 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009703else
Martin v. Löwis11437992002-04-12 09:54:03 +00009704 echo "$as_me: failed program was:" >&5
9705cat conftest.$ac_ext >&5
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009706fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009707rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009708if test "$ac_cv_search_sem_init" = no; then
9709 for ac_lib in rt posix4; do
9710 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9711 cat >conftest.$ac_ext <<_ACEOF
9712#line $LINENO "configure"
9713#include "confdefs.h"
9714
9715/* Override any gcc2 internal prototype to avoid an error. */
9716#ifdef __cplusplus
9717extern "C"
9718#endif
9719/* We use char because int might match the return type of a gcc2
9720 builtin and then its argument prototype would still apply. */
9721char sem_init ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009722#ifdef F77_DUMMY_MAIN
9723# ifdef __cplusplus
9724 extern "C"
9725# endif
9726 int F77_DUMMY_MAIN() { return 1; }
9727#endif
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009728int
9729main ()
9730{
9731sem_init ();
9732 ;
9733 return 0;
9734}
Martin v. Löwis11437992002-04-12 09:54:03 +00009735_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009736rm -f conftest.$ac_objext conftest$ac_exeext
9737if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9738 (eval $ac_link) 2>&5
9739 ac_status=$?
9740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9741 (exit $ac_status); } &&
9742 { ac_try='test -s conftest$ac_exeext'
9743 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9744 (eval $ac_try) 2>&5
9745 ac_status=$?
9746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9747 (exit $ac_status); }; }; then
9748 ac_cv_search_sem_init="-l$ac_lib"
9749break
9750else
9751 echo "$as_me: failed program was:" >&5
9752cat conftest.$ac_ext >&5
9753fi
9754rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9755 done
9756fi
9757LIBS=$ac_func_search_save_LIBS
9758fi
9759echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9760echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9761if test "$ac_cv_search_sem_init" != no; then
9762 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009763
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009764fi
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009765 # 'Real Time' functions on Solaris,
9766 # posix4 on Solaris 2.6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009767
9768# checks for system dependent C++ extensions support
9769case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009770 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9771echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9772 cat >conftest.$ac_ext <<_ACEOF
9773#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009774#include "confdefs.h"
9775#include "/usr/lpp/xlC/include/load.h"
Barry Warsawfe33b792003-01-07 22:42:49 +00009776#ifdef F77_DUMMY_MAIN
9777# ifdef __cplusplus
9778 extern "C"
9779# endif
9780 int F77_DUMMY_MAIN() { return 1; }
9781#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009782int
9783main ()
9784{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009785loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009786 ;
9787 return 0;
9788}
9789_ACEOF
9790rm -f conftest.$ac_objext conftest$ac_exeext
9791if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9792 (eval $ac_link) 2>&5
9793 ac_status=$?
9794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9795 (exit $ac_status); } &&
9796 { ac_try='test -s conftest$ac_exeext'
9797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9798 (eval $ac_try) 2>&5
9799 ac_status=$?
9800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9801 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009802
Martin v. Löwis11437992002-04-12 09:54:03 +00009803cat >>confdefs.h <<\_ACEOF
9804#define AIX_GENUINE_CPLUSPLUS 1
9805_ACEOF
9806
9807 echo "$as_me:$LINENO: result: yes" >&5
9808echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009809else
Martin v. Löwis11437992002-04-12 09:54:03 +00009810 echo "$as_me: failed program was:" >&5
9811cat conftest.$ac_ext >&5
9812echo "$as_me:$LINENO: result: no" >&5
9813echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009814fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009815rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009816 *) ;;
9817esac
9818
Guido van Rossum70c7f481998-03-26 18:44:10 +00009819# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Martin v. Löwise1172582002-11-13 08:51:19 +00009820# However on SGI IRIX 4, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009821# BeOS' sockets are stashed in libnet.
9822case "$ac_sys_system" in
9823IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009824*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009825echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9826echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9827if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9828 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009829else
Martin v. Löwis11437992002-04-12 09:54:03 +00009830 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009831LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009832cat >conftest.$ac_ext <<_ACEOF
9833#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009834#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009835
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009836/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009837#ifdef __cplusplus
9838extern "C"
9839#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009840/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009841 builtin and then its argument prototype would still apply. */
9842char t_open ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009843#ifdef F77_DUMMY_MAIN
9844# ifdef __cplusplus
9845 extern "C"
9846# endif
9847 int F77_DUMMY_MAIN() { return 1; }
9848#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009849int
9850main ()
9851{
9852t_open ();
9853 ;
9854 return 0;
9855}
9856_ACEOF
9857rm -f conftest.$ac_objext conftest$ac_exeext
9858if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9859 (eval $ac_link) 2>&5
9860 ac_status=$?
9861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9862 (exit $ac_status); } &&
9863 { ac_try='test -s conftest$ac_exeext'
9864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9865 (eval $ac_try) 2>&5
9866 ac_status=$?
9867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9868 (exit $ac_status); }; }; then
9869 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009870else
Martin v. Löwis11437992002-04-12 09:54:03 +00009871 echo "$as_me: failed program was:" >&5
9872cat conftest.$ac_ext >&5
9873ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009874fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009875rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9876LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009877fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009878echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9879echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9880if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009881 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009882fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009883 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009884echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9885echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9886if test "${ac_cv_lib_socket_socket+set}" = set; then
9887 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009888else
Martin v. Löwis11437992002-04-12 09:54:03 +00009889 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009890LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009891cat >conftest.$ac_ext <<_ACEOF
9892#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009893#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009894
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009895/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009896#ifdef __cplusplus
9897extern "C"
9898#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009899/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009900 builtin and then its argument prototype would still apply. */
9901char socket ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009902#ifdef F77_DUMMY_MAIN
9903# ifdef __cplusplus
9904 extern "C"
9905# endif
9906 int F77_DUMMY_MAIN() { return 1; }
9907#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009908int
9909main ()
9910{
9911socket ();
9912 ;
9913 return 0;
9914}
9915_ACEOF
9916rm -f conftest.$ac_objext conftest$ac_exeext
9917if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9918 (eval $ac_link) 2>&5
9919 ac_status=$?
9920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9921 (exit $ac_status); } &&
9922 { ac_try='test -s conftest$ac_exeext'
9923 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9924 (eval $ac_try) 2>&5
9925 ac_status=$?
9926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9927 (exit $ac_status); }; }; then
9928 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009929else
Martin v. Löwis11437992002-04-12 09:54:03 +00009930 echo "$as_me: failed program was:" >&5
9931cat conftest.$ac_ext >&5
9932ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009933fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009934rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9935LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009936fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009937echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9938echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9939if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009940 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009941fi
9942 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009943;;
9944esac
9945case "$ac_sys_system" in
9946BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009947echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9948echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9949if test "${ac_cv_lib_net_socket+set}" = set; then
9950 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009951else
Martin v. Löwis11437992002-04-12 09:54:03 +00009952 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009953LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009954cat >conftest.$ac_ext <<_ACEOF
9955#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009956#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009957
Guido van Rossumad678af1998-10-02 14:42:15 +00009958/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009959#ifdef __cplusplus
9960extern "C"
9961#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009962/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009963 builtin and then its argument prototype would still apply. */
9964char socket ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009965#ifdef F77_DUMMY_MAIN
9966# ifdef __cplusplus
9967 extern "C"
9968# endif
9969 int F77_DUMMY_MAIN() { return 1; }
9970#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009971int
9972main ()
9973{
9974socket ();
9975 ;
9976 return 0;
9977}
9978_ACEOF
9979rm -f conftest.$ac_objext conftest$ac_exeext
9980if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9981 (eval $ac_link) 2>&5
9982 ac_status=$?
9983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9984 (exit $ac_status); } &&
9985 { ac_try='test -s conftest$ac_exeext'
9986 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9987 (eval $ac_try) 2>&5
9988 ac_status=$?
9989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9990 (exit $ac_status); }; }; then
9991 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009992else
Martin v. Löwis11437992002-04-12 09:54:03 +00009993 echo "$as_me: failed program was:" >&5
9994cat conftest.$ac_ext >&5
9995ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009996fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009997rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9998LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009999fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010000echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
10001echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
10002if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010003 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010004fi
10005 # BeOS
10006;;
10007esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000010008
Martin v. Löwis11437992002-04-12 09:54:03 +000010009echo "$as_me:$LINENO: checking for --with-libs" >&5
10010echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
10011
Guido van Rossuma68acba1996-07-31 17:36:39 +000010012# Check whether --with-libs or --without-libs was given.
10013if test "${with_libs+set}" = set; then
10014 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000010015
10016echo "$as_me:$LINENO: result: $withval" >&5
10017echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000010018LIBS="$withval $LIBS"
10019
10020else
Martin v. Löwis11437992002-04-12 09:54:03 +000010021 echo "$as_me:$LINENO: result: no" >&5
10022echo "${ECHO_T}no" >&6
10023fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000010024
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010025# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010026
10027
Martin v. Löwis11437992002-04-12 09:54:03 +000010028echo "$as_me:$LINENO: checking for --with-signal-module" >&5
10029echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
10030
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010031# Check whether --with-signal-module or --without-signal-module was given.
10032if test "${with_signal_module+set}" = set; then
10033 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010034
Martin v. Löwis11437992002-04-12 09:54:03 +000010035fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010036
10037if test -z "$with_signal_module"
10038then with_signal_module="yes"
10039fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010040echo "$as_me:$LINENO: result: $with_signal_module" >&5
10041echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010042
10043if test "${with_signal_module}" = "yes"; then
10044 USE_SIGNAL_MODULE=""
10045 SIGNAL_OBJS=""
10046else
10047 USE_SIGNAL_MODULE="#"
10048 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10049fi
10050
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010051# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010052
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010053USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010054
Martin v. Löwis11437992002-04-12 09:54:03 +000010055echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
10056echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
10057
Guido van Rossumec2f0731997-01-22 20:54:01 +000010058
10059# Check whether --with-dec-threads or --without-dec-threads was given.
10060if test "${with_dec_threads+set}" = set; then
10061 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000010062
10063echo "$as_me:$LINENO: result: $withval" >&5
10064echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000010065LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000010066if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000010067 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000010068fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010069else
Martin v. Löwis11437992002-04-12 09:54:03 +000010070 echo "$as_me:$LINENO: result: no" >&5
10071echo "${ECHO_T}no" >&6
10072fi;
10073
10074# Templates for things AC_DEFINEd more than once.
10075# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010076
10077
Martin v. Löwis11437992002-04-12 09:54:03 +000010078
10079
10080
10081
10082
10083echo "$as_me:$LINENO: checking for --with-threads" >&5
10084echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
10085
Guido van Rossumec2f0731997-01-22 20:54:01 +000010086# Check whether --with-threads or --without-threads was given.
10087if test "${with_threads+set}" = set; then
10088 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000010089
Martin v. Löwis11437992002-04-12 09:54:03 +000010090fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000010091
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010092# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010093
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010094# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010095if test "${with_thread+set}" = set; then
10096 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010097 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000010098fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010099
10100if test -z "$with_threads"
10101then with_threads="yes"
10102fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010103echo "$as_me:$LINENO: result: $with_threads" >&5
10104echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010105
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010106
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010107if test "$with_threads" = "no"
10108then
10109 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010110elif test "$ac_cv_pthread_is_default" = yes
10111then
Martin v. Löwis11437992002-04-12 09:54:03 +000010112 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010113#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010114_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010115
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010116 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010117 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010118#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010119_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010120
10121 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010122 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010123elif test "$ac_cv_kpthread" = "yes"
10124then
10125 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010126 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010127#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010128_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010129
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010130 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010131 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010132else
10133 if test ! -z "$with_threads" -a -d "$with_threads"
10134 then LDFLAGS="$LDFLAGS -L$with_threads"
10135 fi
10136 if test ! -z "$withval" -a -d "$withval"
10137 then LDFLAGS="$LDFLAGS -L$withval"
10138 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010139
10140 # According to the POSIX spec, a pthreads implementation must
10141 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010142 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10143echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10144 cat >conftest.$ac_ext <<_ACEOF
10145#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010146#include "confdefs.h"
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010147
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010148#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010149#ifdef _POSIX_THREADS
10150yes
10151#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010152
10153_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010154if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000010155 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010156 unistd_defines_pthreads=yes
10157else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010158 unistd_defines_pthreads=no
10159fi
10160rm -f conftest*
10161
Martin v. Löwis11437992002-04-12 09:54:03 +000010162 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10163echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010164
Martin v. Löwis11437992002-04-12 09:54:03 +000010165 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010166#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010167_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010168
Martin v. Löwis11437992002-04-12 09:54:03 +000010169 if test "${ac_cv_header_cthreads_h+set}" = set; then
10170 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10171echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10172if test "${ac_cv_header_cthreads_h+set}" = set; then
10173 echo $ECHO_N "(cached) $ECHO_C" >&6
10174fi
10175echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10176echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010177else
Martin v. Löwis11437992002-04-12 09:54:03 +000010178 # Is the header compilable?
10179echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10180echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10181cat >conftest.$ac_ext <<_ACEOF
10182#line $LINENO "configure"
10183#include "confdefs.h"
10184$ac_includes_default
10185#include <cthreads.h>
10186_ACEOF
10187rm -f conftest.$ac_objext
10188if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10189 (eval $ac_compile) 2>&5
10190 ac_status=$?
10191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10192 (exit $ac_status); } &&
10193 { ac_try='test -s conftest.$ac_objext'
10194 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10195 (eval $ac_try) 2>&5
10196 ac_status=$?
10197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10198 (exit $ac_status); }; }; then
10199 ac_header_compiler=yes
10200else
10201 echo "$as_me: failed program was:" >&5
10202cat conftest.$ac_ext >&5
10203ac_header_compiler=no
10204fi
10205rm -f conftest.$ac_objext conftest.$ac_ext
10206echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10207echo "${ECHO_T}$ac_header_compiler" >&6
10208
10209# Is the header present?
10210echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10211echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10212cat >conftest.$ac_ext <<_ACEOF
10213#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010214#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010215#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010216_ACEOF
10217if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10218 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10219 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010220 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010221 rm -f conftest.er1
10222 cat conftest.err >&5
10223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10224 (exit $ac_status); } >/dev/null; then
10225 if test -s conftest.err; then
10226 ac_cpp_err=$ac_c_preproc_warn_flag
10227 else
10228 ac_cpp_err=
10229 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010230else
Martin v. Löwis11437992002-04-12 09:54:03 +000010231 ac_cpp_err=yes
10232fi
10233if test -z "$ac_cpp_err"; then
10234 ac_header_preproc=yes
10235else
10236 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +000010237 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010238 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010239fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010240rm -f conftest.err conftest.$ac_ext
10241echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10242echo "${ECHO_T}$ac_header_preproc" >&6
10243
10244# So? What about this header?
10245case $ac_header_compiler:$ac_header_preproc in
10246 yes:no )
10247 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10248echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10249 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10250echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10251 no:yes )
10252 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10253echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10254 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10255echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10256 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10257echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10258esac
10259echo "$as_me:$LINENO: checking for cthreads.h" >&5
10260echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10261if test "${ac_cv_header_cthreads_h+set}" = set; then
10262 echo $ECHO_N "(cached) $ECHO_C" >&6
10263else
10264 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010265fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010266echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10267echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10268
10269fi
10270if test $ac_cv_header_cthreads_h = yes; then
10271 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010272#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010273_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010274
Martin v. Löwis11437992002-04-12 09:54:03 +000010275 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010276#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010277_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010278
Martin v. Löwis11437992002-04-12 09:54:03 +000010279
10280cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010281#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010282_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010283
10284 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010285 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010286else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010287
Martin v. Löwis11437992002-04-12 09:54:03 +000010288 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10289 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10290echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10291if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10292 echo $ECHO_N "(cached) $ECHO_C" >&6
10293fi
10294echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10295echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010296else
Martin v. Löwis11437992002-04-12 09:54:03 +000010297 # Is the header compilable?
10298echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10299echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10300cat >conftest.$ac_ext <<_ACEOF
10301#line $LINENO "configure"
10302#include "confdefs.h"
10303$ac_includes_default
10304#include <mach/cthreads.h>
10305_ACEOF
10306rm -f conftest.$ac_objext
10307if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10308 (eval $ac_compile) 2>&5
10309 ac_status=$?
10310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10311 (exit $ac_status); } &&
10312 { ac_try='test -s conftest.$ac_objext'
10313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10314 (eval $ac_try) 2>&5
10315 ac_status=$?
10316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10317 (exit $ac_status); }; }; then
10318 ac_header_compiler=yes
10319else
10320 echo "$as_me: failed program was:" >&5
10321cat conftest.$ac_ext >&5
10322ac_header_compiler=no
10323fi
10324rm -f conftest.$ac_objext conftest.$ac_ext
10325echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10326echo "${ECHO_T}$ac_header_compiler" >&6
10327
10328# Is the header present?
10329echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10330echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10331cat >conftest.$ac_ext <<_ACEOF
10332#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010333#include "confdefs.h"
10334#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010335_ACEOF
10336if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10337 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10338 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010339 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010340 rm -f conftest.er1
10341 cat conftest.err >&5
10342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10343 (exit $ac_status); } >/dev/null; then
10344 if test -s conftest.err; then
10345 ac_cpp_err=$ac_c_preproc_warn_flag
10346 else
10347 ac_cpp_err=
10348 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010349else
Martin v. Löwis11437992002-04-12 09:54:03 +000010350 ac_cpp_err=yes
10351fi
10352if test -z "$ac_cpp_err"; then
10353 ac_header_preproc=yes
10354else
10355 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010356 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010357 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010358fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010359rm -f conftest.err conftest.$ac_ext
10360echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10361echo "${ECHO_T}$ac_header_preproc" >&6
10362
10363# So? What about this header?
10364case $ac_header_compiler:$ac_header_preproc in
10365 yes:no )
10366 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10367echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10368 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10369echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10370 no:yes )
10371 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10372echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10373 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10374echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10375 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10376echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10377esac
10378echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10379echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10380if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10381 echo $ECHO_N "(cached) $ECHO_C" >&6
10382else
10383 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010384fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010385echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10386echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10387
10388fi
10389if test $ac_cv_header_mach_cthreads_h = yes; then
10390 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010391#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010392_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010393
Martin v. Löwis11437992002-04-12 09:54:03 +000010394 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010395#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010396_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010397
Martin v. Löwis11437992002-04-12 09:54:03 +000010398
10399cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010400#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010401_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010402
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010403 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010404else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010405
Martin v. Löwis11437992002-04-12 09:54:03 +000010406 echo "$as_me:$LINENO: checking for --with-pth" >&5
10407echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10408
10409# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010410if test "${with_pth+set}" = set; then
10411 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010412 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010413echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010414 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010415#define WITH_THREAD 1
10416_ACEOF
10417
10418
10419cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010420#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010421_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010422
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010423 LIBS="-lpth $LIBS"
10424 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010425else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010426 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010427echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010428
10429 # Just looking for pthread_create in libpthread is not enough:
10430 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10431 # So we really have to include pthread.h, and then link.
10432 _libs=$LIBS
10433 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010434 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10435echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10436 cat >conftest.$ac_ext <<_ACEOF
10437#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010438#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010439#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010440
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010441void * start_routine (void *arg) { exit (0); }
Barry Warsawfe33b792003-01-07 22:42:49 +000010442#ifdef F77_DUMMY_MAIN
10443# ifdef __cplusplus
10444 extern "C"
10445# endif
10446 int F77_DUMMY_MAIN() { return 1; }
10447#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010448int
10449main ()
10450{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010451
10452pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010453 ;
10454 return 0;
10455}
10456_ACEOF
10457rm -f conftest.$ac_objext conftest$ac_exeext
10458if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10459 (eval $ac_link) 2>&5
10460 ac_status=$?
10461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10462 (exit $ac_status); } &&
10463 { ac_try='test -s conftest$ac_exeext'
10464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10465 (eval $ac_try) 2>&5
10466 ac_status=$?
10467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10468 (exit $ac_status); }; }; then
10469
10470 echo "$as_me:$LINENO: result: yes" >&5
10471echo "${ECHO_T}yes" >&6
10472 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010473#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010474_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010475
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010476 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010477 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010478else
Martin v. Löwis11437992002-04-12 09:54:03 +000010479 echo "$as_me: failed program was:" >&5
10480cat conftest.$ac_ext >&5
10481
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010482 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010483 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10484echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10485if test "${ac_cv_func_pthread_detach+set}" = set; then
10486 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010487else
Martin v. Löwis11437992002-04-12 09:54:03 +000010488 cat >conftest.$ac_ext <<_ACEOF
10489#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010490#include "confdefs.h"
10491/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010492 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010493#include <assert.h>
10494/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010495#ifdef __cplusplus
10496extern "C"
10497#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010498/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010499 builtin and then its argument prototype would still apply. */
10500char pthread_detach ();
10501char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010502
Barry Warsawfe33b792003-01-07 22:42:49 +000010503#ifdef F77_DUMMY_MAIN
10504# ifdef __cplusplus
10505 extern "C"
10506# endif
10507 int F77_DUMMY_MAIN() { return 1; }
10508#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010509int
10510main ()
10511{
Guido van Rossumad678af1998-10-02 14:42:15 +000010512/* The GNU C library defines this for functions which it implements
10513 to always fail with ENOSYS. Some functions are actually named
10514 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010515#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010516choke me
10517#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010518f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +000010519#endif
10520
Martin v. Löwis11437992002-04-12 09:54:03 +000010521 ;
10522 return 0;
10523}
10524_ACEOF
10525rm -f conftest.$ac_objext conftest$ac_exeext
10526if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10527 (eval $ac_link) 2>&5
10528 ac_status=$?
10529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10530 (exit $ac_status); } &&
10531 { ac_try='test -s conftest$ac_exeext'
10532 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10533 (eval $ac_try) 2>&5
10534 ac_status=$?
10535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10536 (exit $ac_status); }; }; then
10537 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010538else
Martin v. Löwis11437992002-04-12 09:54:03 +000010539 echo "$as_me: failed program was:" >&5
10540cat conftest.$ac_ext >&5
10541ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010542fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010543rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010544fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010545echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10546echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10547if test $ac_cv_func_pthread_detach = yes; then
10548 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010549#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010550_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010551
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010552 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010553 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010554else
Guido van Rossumad678af1998-10-02 14:42:15 +000010555
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010556 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10557 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10558echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10559if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10560 echo $ECHO_N "(cached) $ECHO_C" >&6
10561fi
10562echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10563echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10564else
10565 # Is the header compilable?
10566echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10567echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10568cat >conftest.$ac_ext <<_ACEOF
10569#line $LINENO "configure"
10570#include "confdefs.h"
10571$ac_includes_default
10572#include <atheos/threads.h>
10573_ACEOF
10574rm -f conftest.$ac_objext
10575if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10576 (eval $ac_compile) 2>&5
10577 ac_status=$?
10578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10579 (exit $ac_status); } &&
10580 { ac_try='test -s conftest.$ac_objext'
10581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10582 (eval $ac_try) 2>&5
10583 ac_status=$?
10584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10585 (exit $ac_status); }; }; then
10586 ac_header_compiler=yes
10587else
10588 echo "$as_me: failed program was:" >&5
10589cat conftest.$ac_ext >&5
10590ac_header_compiler=no
10591fi
10592rm -f conftest.$ac_objext conftest.$ac_ext
10593echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10594echo "${ECHO_T}$ac_header_compiler" >&6
10595
10596# Is the header present?
10597echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10598echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10599cat >conftest.$ac_ext <<_ACEOF
10600#line $LINENO "configure"
10601#include "confdefs.h"
10602#include <atheos/threads.h>
10603_ACEOF
10604if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10605 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10606 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010607 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010608 rm -f conftest.er1
10609 cat conftest.err >&5
10610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10611 (exit $ac_status); } >/dev/null; then
10612 if test -s conftest.err; then
10613 ac_cpp_err=$ac_c_preproc_warn_flag
10614 else
10615 ac_cpp_err=
10616 fi
10617else
10618 ac_cpp_err=yes
10619fi
10620if test -z "$ac_cpp_err"; then
10621 ac_header_preproc=yes
10622else
10623 echo "$as_me: failed program was:" >&5
10624 cat conftest.$ac_ext >&5
10625 ac_header_preproc=no
10626fi
10627rm -f conftest.err conftest.$ac_ext
10628echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10629echo "${ECHO_T}$ac_header_preproc" >&6
10630
10631# So? What about this header?
10632case $ac_header_compiler:$ac_header_preproc in
10633 yes:no )
10634 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10635echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10636 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10637echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10638 no:yes )
10639 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10640echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10641 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10642echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10643 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10644echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10645esac
10646echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10647echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10648if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10649 echo $ECHO_N "(cached) $ECHO_C" >&6
10650else
10651 ac_cv_header_atheos_threads_h=$ac_header_preproc
10652fi
10653echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10654echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10655
10656fi
10657if test $ac_cv_header_atheos_threads_h = yes; then
10658 cat >>confdefs.h <<\_ACEOF
10659#define WITH_THREAD 1
10660_ACEOF
10661
10662
10663cat >>confdefs.h <<\_ACEOF
10664#define ATHEOS_THREADS 1
10665_ACEOF
10666
10667 THREADOBJ="Python/thread.o"
10668else
10669
Martin v. Löwis11437992002-04-12 09:54:03 +000010670 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10671 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10672echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10673if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10674 echo $ECHO_N "(cached) $ECHO_C" >&6
10675fi
10676echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10677echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010678else
Martin v. Löwis11437992002-04-12 09:54:03 +000010679 # Is the header compilable?
10680echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10681echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10682cat >conftest.$ac_ext <<_ACEOF
10683#line $LINENO "configure"
10684#include "confdefs.h"
10685$ac_includes_default
10686#include <kernel/OS.h>
10687_ACEOF
10688rm -f conftest.$ac_objext
10689if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10690 (eval $ac_compile) 2>&5
10691 ac_status=$?
10692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10693 (exit $ac_status); } &&
10694 { ac_try='test -s conftest.$ac_objext'
10695 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10696 (eval $ac_try) 2>&5
10697 ac_status=$?
10698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10699 (exit $ac_status); }; }; then
10700 ac_header_compiler=yes
10701else
10702 echo "$as_me: failed program was:" >&5
10703cat conftest.$ac_ext >&5
10704ac_header_compiler=no
10705fi
10706rm -f conftest.$ac_objext conftest.$ac_ext
10707echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10708echo "${ECHO_T}$ac_header_compiler" >&6
10709
10710# Is the header present?
10711echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10712echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10713cat >conftest.$ac_ext <<_ACEOF
10714#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010715#include "confdefs.h"
10716#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010717_ACEOF
10718if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10719 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10720 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010721 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010722 rm -f conftest.er1
10723 cat conftest.err >&5
10724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10725 (exit $ac_status); } >/dev/null; then
10726 if test -s conftest.err; then
10727 ac_cpp_err=$ac_c_preproc_warn_flag
10728 else
10729 ac_cpp_err=
10730 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010731else
Martin v. Löwis11437992002-04-12 09:54:03 +000010732 ac_cpp_err=yes
10733fi
10734if test -z "$ac_cpp_err"; then
10735 ac_header_preproc=yes
10736else
10737 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010738 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010739 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010740fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010741rm -f conftest.err conftest.$ac_ext
10742echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10743echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010744
Martin v. Löwis11437992002-04-12 09:54:03 +000010745# So? What about this header?
10746case $ac_header_compiler:$ac_header_preproc in
10747 yes:no )
10748 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10749echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10750 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10751echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10752 no:yes )
10753 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10754echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10755 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10756echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10757 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10758echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10759esac
10760echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10761echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10762if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10763 echo $ECHO_N "(cached) $ECHO_C" >&6
10764else
10765 ac_cv_header_kernel_OS_h=$ac_header_preproc
10766fi
10767echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10768echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10769
10770fi
10771if test $ac_cv_header_kernel_OS_h = yes; then
10772 cat >>confdefs.h <<\_ACEOF
10773#define WITH_THREAD 1
10774_ACEOF
10775
10776
10777cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010778#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010779_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010780
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010781 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010782else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010783
Martin v. Löwis11437992002-04-12 09:54:03 +000010784 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10785echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10786if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10787 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010788else
Martin v. Löwis11437992002-04-12 09:54:03 +000010789 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010790LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010791cat >conftest.$ac_ext <<_ACEOF
10792#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010793#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010794
Greg Steinadf63d62000-07-05 10:38:09 +000010795/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010796#ifdef __cplusplus
10797extern "C"
10798#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010799/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010800 builtin and then its argument prototype would still apply. */
10801char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010802#ifdef F77_DUMMY_MAIN
10803# ifdef __cplusplus
10804 extern "C"
10805# endif
10806 int F77_DUMMY_MAIN() { return 1; }
10807#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010808int
10809main ()
10810{
10811pthread_create ();
10812 ;
10813 return 0;
10814}
10815_ACEOF
10816rm -f conftest.$ac_objext conftest$ac_exeext
10817if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10818 (eval $ac_link) 2>&5
10819 ac_status=$?
10820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10821 (exit $ac_status); } &&
10822 { ac_try='test -s conftest$ac_exeext'
10823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10824 (eval $ac_try) 2>&5
10825 ac_status=$?
10826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10827 (exit $ac_status); }; }; then
10828 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010829else
Martin v. Löwis11437992002-04-12 09:54:03 +000010830 echo "$as_me: failed program was:" >&5
10831cat conftest.$ac_ext >&5
10832ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010833fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010834rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10835LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010836fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010837echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10838echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10839if test $ac_cv_lib_pthreads_pthread_create = yes; then
10840 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010841#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010842_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010843
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010844 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010845 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010846 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010847else
Greg Steinadf63d62000-07-05 10:38:09 +000010848
Martin v. Löwis11437992002-04-12 09:54:03 +000010849 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10850echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10851if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10852 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010853else
Martin v. Löwis11437992002-04-12 09:54:03 +000010854 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010855LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010856cat >conftest.$ac_ext <<_ACEOF
10857#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010858#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010859
Guido van Rossum49545951997-12-02 19:28:29 +000010860/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010861#ifdef __cplusplus
10862extern "C"
10863#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010864/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010865 builtin and then its argument prototype would still apply. */
10866char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010867#ifdef F77_DUMMY_MAIN
10868# ifdef __cplusplus
10869 extern "C"
10870# endif
10871 int F77_DUMMY_MAIN() { return 1; }
10872#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010873int
10874main ()
10875{
10876pthread_create ();
10877 ;
10878 return 0;
10879}
10880_ACEOF
10881rm -f conftest.$ac_objext conftest$ac_exeext
10882if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10883 (eval $ac_link) 2>&5
10884 ac_status=$?
10885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10886 (exit $ac_status); } &&
10887 { ac_try='test -s conftest$ac_exeext'
10888 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10889 (eval $ac_try) 2>&5
10890 ac_status=$?
10891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10892 (exit $ac_status); }; }; then
10893 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010894else
Martin v. Löwis11437992002-04-12 09:54:03 +000010895 echo "$as_me: failed program was:" >&5
10896cat conftest.$ac_ext >&5
10897ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010898fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010899rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10900LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010901fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010902echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10903echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10904if test $ac_cv_lib_c_r_pthread_create = yes; then
10905 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010906#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010907_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010908
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010909 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010910 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010911 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010912else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010913
Martin v. Löwis11437992002-04-12 09:54:03 +000010914 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10915echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10916if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10917 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010918else
Martin v. Löwis11437992002-04-12 09:54:03 +000010919 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010920LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010921cat >conftest.$ac_ext <<_ACEOF
10922#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010923#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010924
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010925/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010926#ifdef __cplusplus
10927extern "C"
10928#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010929/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010930 builtin and then its argument prototype would still apply. */
10931char __d6_pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010932#ifdef F77_DUMMY_MAIN
10933# ifdef __cplusplus
10934 extern "C"
10935# endif
10936 int F77_DUMMY_MAIN() { return 1; }
10937#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010938int
10939main ()
10940{
10941__d6_pthread_create ();
10942 ;
10943 return 0;
10944}
10945_ACEOF
10946rm -f conftest.$ac_objext conftest$ac_exeext
10947if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10948 (eval $ac_link) 2>&5
10949 ac_status=$?
10950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10951 (exit $ac_status); } &&
10952 { ac_try='test -s conftest$ac_exeext'
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_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010959else
Martin v. Löwis11437992002-04-12 09:54:03 +000010960 echo "$as_me: failed program was:" >&5
10961cat conftest.$ac_ext >&5
10962ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010963fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010964rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10965LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010966fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010967echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10968echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10969if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10970 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010971#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010972_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010973
Martin v. Löwis779ffc02002-12-02 22:17:01 +000010974 echo Systems with __d6_pthread_create are not supported anymore.
10975 echo See README
10976 exit 1
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010977 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010978 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010979 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010980else
Guido van Rossum49545951997-12-02 19:28:29 +000010981
Martin v. Löwis11437992002-04-12 09:54:03 +000010982 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10983echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10984if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10985 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010986else
Martin v. Löwis11437992002-04-12 09:54:03 +000010987 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010988LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010989cat >conftest.$ac_ext <<_ACEOF
10990#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010991#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010992
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010993/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010994#ifdef __cplusplus
10995extern "C"
10996#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010997/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010998 builtin and then its argument prototype would still apply. */
10999char __pthread_create_system ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011000#ifdef F77_DUMMY_MAIN
11001# ifdef __cplusplus
11002 extern "C"
11003# endif
11004 int F77_DUMMY_MAIN() { return 1; }
11005#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011006int
11007main ()
11008{
11009__pthread_create_system ();
11010 ;
11011 return 0;
11012}
11013_ACEOF
11014rm -f conftest.$ac_objext conftest$ac_exeext
11015if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11016 (eval $ac_link) 2>&5
11017 ac_status=$?
11018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11019 (exit $ac_status); } &&
11020 { ac_try='test -s conftest$ac_exeext'
11021 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11022 (eval $ac_try) 2>&5
11023 ac_status=$?
11024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11025 (exit $ac_status); }; }; then
11026 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011027else
Martin v. Löwis11437992002-04-12 09:54:03 +000011028 echo "$as_me: failed program was:" >&5
11029cat conftest.$ac_ext >&5
11030ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011031fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011032rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11033LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011034fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011035echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11036echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
11037if test $ac_cv_lib_pthread___pthread_create_system = yes; then
11038 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011039#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011040_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011041
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011042 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011043 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011044 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011045else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011046
Martin v. Löwis11437992002-04-12 09:54:03 +000011047 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
11048echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
11049if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
11050 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000011051else
Martin v. Löwis11437992002-04-12 09:54:03 +000011052 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011053LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011054cat >conftest.$ac_ext <<_ACEOF
11055#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011056#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011057
Guido van Rossumb93a8621998-05-07 13:27:32 +000011058/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011059#ifdef __cplusplus
11060extern "C"
11061#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000011062/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011063 builtin and then its argument prototype would still apply. */
11064char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011065#ifdef F77_DUMMY_MAIN
11066# ifdef __cplusplus
11067 extern "C"
11068# endif
11069 int F77_DUMMY_MAIN() { return 1; }
11070#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011071int
11072main ()
11073{
11074pthread_create ();
11075 ;
11076 return 0;
11077}
11078_ACEOF
11079rm -f conftest.$ac_objext conftest$ac_exeext
11080if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11081 (eval $ac_link) 2>&5
11082 ac_status=$?
11083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11084 (exit $ac_status); } &&
11085 { ac_try='test -s conftest$ac_exeext'
11086 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11087 (eval $ac_try) 2>&5
11088 ac_status=$?
11089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11090 (exit $ac_status); }; }; then
11091 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000011092else
Martin v. Löwis11437992002-04-12 09:54:03 +000011093 echo "$as_me: failed program was:" >&5
11094cat conftest.$ac_ext >&5
11095ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011096fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011097rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11098LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011099fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011100echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
11101echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
11102if test $ac_cv_lib_cma_pthread_create = yes; then
11103 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011104#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011105_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011106
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011107 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011108 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011109 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011110else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011111
Martin v. Löwis130fb172001-07-19 11:00:41 +000011112 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000011113fi
11114
Guido van Rossum627b2d71993-12-24 10:39:16 +000011115
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011116fi
11117
Guido van Rossum0be3e491997-05-22 20:33:33 +000011118fi
11119
Guido van Rossum49545951997-12-02 19:28:29 +000011120fi
11121
Guido van Rossumb93a8621998-05-07 13:27:32 +000011122fi
11123
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011124fi
11125
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011126
Michael W. Hudson54241132001-12-07 15:38:26 +000011127fi
11128
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011129
11130fi
11131
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011132fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011133rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11134fi;
11135fi
11136
11137
11138fi
11139
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011140
Michael W. Hudson54241132001-12-07 15:38:26 +000011141
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011142 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011143 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011144
11145cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011146#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011147_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011148
11149 fi
11150
Martin v. Löwisdfc33fd2003-01-21 10:14:41 +000011151 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11152 case $ac_sys_system/$ac_sys_release in
11153 SunOS/5.8)
11154cat >>confdefs.h <<\_ACEOF
11155#define HAVE_BROKEN_POSIX_SEMAPHORES 1
11156_ACEOF
11157;;
11158 esac
11159
Martin v. Löwis11437992002-04-12 09:54:03 +000011160 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11161echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11162 if test "${ac_cv_pthread_system_supported+set}" = set; then
11163 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011164else
11165 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011166 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011167else
Martin v. Löwis11437992002-04-12 09:54:03 +000011168 cat >conftest.$ac_ext <<_ACEOF
11169#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011170#include "confdefs.h"
11171#include <pthread.h>
11172 void *foo(void *parm) {
11173 return NULL;
11174 }
11175 main() {
11176 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011177 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011178 if (pthread_attr_init(&attr)) exit(-1);
11179 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011180 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011181 exit(0);
11182 }
Martin v. Löwis11437992002-04-12 09:54:03 +000011183_ACEOF
11184rm -f conftest$ac_exeext
11185if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11186 (eval $ac_link) 2>&5
11187 ac_status=$?
11188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11189 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11191 (eval $ac_try) 2>&5
11192 ac_status=$?
11193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11194 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011195 ac_cv_pthread_system_supported=yes
11196else
Martin v. Löwis11437992002-04-12 09:54:03 +000011197 echo "$as_me: program exited with status $ac_status" >&5
11198echo "$as_me: failed program was:" >&5
11199cat conftest.$ac_ext >&5
11200( exit $ac_status )
11201ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011202fi
Barry Warsawfe33b792003-01-07 22:42:49 +000011203rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011204fi
11205
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011206fi
11207
Martin v. Löwis11437992002-04-12 09:54:03 +000011208 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11209echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011210 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011211
11212cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011213#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011214_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011215
11216 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011217
11218for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011219do
Martin v. Löwis11437992002-04-12 09:54:03 +000011220as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11221echo "$as_me:$LINENO: checking for $ac_func" >&5
11222echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11223if eval "test \"\${$as_ac_var+set}\" = set"; then
11224 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011225else
Martin v. Löwis11437992002-04-12 09:54:03 +000011226 cat >conftest.$ac_ext <<_ACEOF
11227#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011228#include "confdefs.h"
11229/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011230 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011231#include <assert.h>
11232/* 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
Martin v. Löwis69c0ff32001-10-15 14:34:42 +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 $ac_func ();
11239char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011240
Barry Warsawfe33b792003-01-07 22:42:49 +000011241#ifdef F77_DUMMY_MAIN
11242# ifdef __cplusplus
11243 extern "C"
11244# endif
11245 int F77_DUMMY_MAIN() { return 1; }
11246#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011247int
11248main ()
11249{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011250/* The GNU C library defines this for functions which it implements
11251 to always fail with ENOSYS. Some functions are actually named
11252 something starting with __ and the normal name is an alias. */
11253#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11254choke me
11255#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011256f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011257#endif
11258
Martin v. Löwis11437992002-04-12 09:54:03 +000011259 ;
11260 return 0;
11261}
11262_ACEOF
11263rm -f conftest.$ac_objext conftest$ac_exeext
11264if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11265 (eval $ac_link) 2>&5
11266 ac_status=$?
11267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11268 (exit $ac_status); } &&
11269 { ac_try='test -s conftest$ac_exeext'
11270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11271 (eval $ac_try) 2>&5
11272 ac_status=$?
11273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11274 (exit $ac_status); }; }; then
11275 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011276else
Martin v. Löwis11437992002-04-12 09:54:03 +000011277 echo "$as_me: failed program was:" >&5
11278cat conftest.$ac_ext >&5
11279eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011280fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011281rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011282fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011283echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11284echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11285if test `eval echo '${'$as_ac_var'}'` = yes; then
11286 cat >>confdefs.h <<_ACEOF
11287#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11288_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011289
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011290fi
11291done
11292
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011293 fi
11294
Martin v. Löwis11437992002-04-12 09:54:03 +000011295 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11296echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11297if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11298 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011299else
Martin v. Löwis11437992002-04-12 09:54:03 +000011300 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011301LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011302cat >conftest.$ac_ext <<_ACEOF
11303#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011304#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011305
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011306/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011307#ifdef __cplusplus
11308extern "C"
11309#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011310/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011311 builtin and then its argument prototype would still apply. */
11312char usconfig ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011313#ifdef F77_DUMMY_MAIN
11314# ifdef __cplusplus
11315 extern "C"
11316# endif
11317 int F77_DUMMY_MAIN() { return 1; }
11318#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011319int
11320main ()
11321{
11322usconfig ();
11323 ;
11324 return 0;
11325}
11326_ACEOF
11327rm -f conftest.$ac_objext conftest$ac_exeext
11328if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11329 (eval $ac_link) 2>&5
11330 ac_status=$?
11331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11332 (exit $ac_status); } &&
11333 { ac_try='test -s conftest$ac_exeext'
11334 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11335 (eval $ac_try) 2>&5
11336 ac_status=$?
11337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11338 (exit $ac_status); }; }; then
11339 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011340else
Martin v. Löwis11437992002-04-12 09:54:03 +000011341 echo "$as_me: failed program was:" >&5
11342cat conftest.$ac_ext >&5
11343ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011344fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011345rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11346LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011347fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011348echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11349echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11350if test $ac_cv_lib_mpc_usconfig = yes; then
11351 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011352#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011353_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011354
Martin v. Löwis130fb172001-07-19 11:00:41 +000011355 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011356 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011357 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011358fi
11359
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011360
Neal Norwitza978ab02002-11-02 16:58:05 +000011361 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011362 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11363echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11364if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11365 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011366else
Martin v. Löwis11437992002-04-12 09:54:03 +000011367 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011368LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011369cat >conftest.$ac_ext <<_ACEOF
11370#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011371#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011372
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011373/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011374#ifdef __cplusplus
11375extern "C"
11376#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011377/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011378 builtin and then its argument prototype would still apply. */
11379char thr_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011380#ifdef F77_DUMMY_MAIN
11381# ifdef __cplusplus
11382 extern "C"
11383# endif
11384 int F77_DUMMY_MAIN() { return 1; }
11385#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011386int
11387main ()
11388{
11389thr_create ();
11390 ;
11391 return 0;
11392}
11393_ACEOF
11394rm -f conftest.$ac_objext conftest$ac_exeext
11395if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11396 (eval $ac_link) 2>&5
11397 ac_status=$?
11398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11399 (exit $ac_status); } &&
11400 { ac_try='test -s conftest$ac_exeext'
11401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11402 (eval $ac_try) 2>&5
11403 ac_status=$?
11404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11405 (exit $ac_status); }; }; then
11406 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011407else
Martin v. Löwis11437992002-04-12 09:54:03 +000011408 echo "$as_me: failed program was:" >&5
11409cat conftest.$ac_ext >&5
11410ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011411fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011412rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11413LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011414fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011415echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11416echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11417if test $ac_cv_lib_thread_thr_create = yes; then
11418 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011419#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011420_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011421
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011422 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011423 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011424 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011425fi
11426
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011427 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011428
Martin v. Löwis130fb172001-07-19 11:00:41 +000011429 if test "$USE_THREAD_MODULE" != "#"
11430 then
11431 # If the above checks didn't disable threads, (at least) OSF1
11432 # needs this '-threads' argument during linking.
11433 case $ac_sys_system in
11434 OSF1) LDLAST=-threads;;
11435 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011436 fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011437
11438 if test "$posix_threads" = yes -a \
11439 "$ac_sys_system" = "SunOS" -a \
11440 "$ac_sys_release" = "5.6"; then
11441
11442cat >>confdefs.h <<\_ACEOF
11443#define HAVE_PTHREAD_DESTRUCTOR 1
11444_ACEOF
11445
11446 fi
11447
Guido van Rossum627b2d71993-12-24 10:39:16 +000011448fi
11449
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011450# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011451
11452
11453echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11454echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011455# Check whether --enable-ipv6 or --disable-ipv6 was given.
11456if test "${enable_ipv6+set}" = set; then
11457 enableval="$enable_ipv6"
11458 case "$enableval" in
11459 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011460 echo "$as_me:$LINENO: result: no" >&5
11461echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011462 ipv6=no
11463 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011464 *) echo "$as_me:$LINENO: result: yes" >&5
11465echo "${ECHO_T}yes" >&6
11466 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011467#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011468_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011469
11470 ipv6=yes
11471 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011472 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011473else
Martin v. Löwis11437992002-04-12 09:54:03 +000011474
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011475 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011476 echo "$as_me:$LINENO: result: no" >&5
11477echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011478 ipv6=no
11479
11480else
Martin v. Löwis11437992002-04-12 09:54:03 +000011481 cat >conftest.$ac_ext <<_ACEOF
11482#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011483#include "confdefs.h"
11484 /* AF_INET6 available check */
11485#include <sys/types.h>
11486#include <sys/socket.h>
11487main()
11488{
11489 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11490 exit(1);
11491 else
11492 exit(0);
11493}
11494
Martin v. Löwis11437992002-04-12 09:54:03 +000011495_ACEOF
11496rm -f conftest$ac_exeext
11497if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11498 (eval $ac_link) 2>&5
11499 ac_status=$?
11500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11501 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11503 (eval $ac_try) 2>&5
11504 ac_status=$?
11505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11506 (exit $ac_status); }; }; then
11507 echo "$as_me:$LINENO: result: yes" >&5
11508echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011509 ipv6=yes
11510else
Martin v. Löwis11437992002-04-12 09:54:03 +000011511 echo "$as_me: program exited with status $ac_status" >&5
11512echo "$as_me: failed program was:" >&5
11513cat conftest.$ac_ext >&5
11514( exit $ac_status )
11515echo "$as_me:$LINENO: result: no" >&5
11516echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011517 ipv6=no
11518fi
Barry Warsawfe33b792003-01-07 22:42:49 +000011519rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011520fi
11521
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011522if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011523 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11524echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11525 cat >conftest.$ac_ext <<_ACEOF
11526#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011527#include "confdefs.h"
11528#include <sys/types.h>
11529#include <netinet/in.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000011530#ifdef F77_DUMMY_MAIN
11531# ifdef __cplusplus
11532 extern "C"
11533# endif
11534 int F77_DUMMY_MAIN() { return 1; }
11535#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011536int
11537main ()
11538{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011539struct sockaddr_in6 x;
11540x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011541 ;
11542 return 0;
11543}
11544_ACEOF
11545rm -f conftest.$ac_objext
11546if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11547 (eval $ac_compile) 2>&5
11548 ac_status=$?
11549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11550 (exit $ac_status); } &&
11551 { ac_try='test -s conftest.$ac_objext'
11552 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11553 (eval $ac_try) 2>&5
11554 ac_status=$?
11555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11556 (exit $ac_status); }; }; then
11557 echo "$as_me:$LINENO: result: yes" >&5
11558echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011559 ipv6=yes
11560else
Martin v. Löwis11437992002-04-12 09:54:03 +000011561 echo "$as_me: failed program was:" >&5
11562cat conftest.$ac_ext >&5
11563echo "$as_me:$LINENO: result: no" >&5
11564echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011565 ipv6=no
11566fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011567rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011568fi
11569
11570if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011571 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011572#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011573_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011574
11575fi
11576
Martin v. Löwis11437992002-04-12 09:54:03 +000011577fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011578
11579ipv6type=unknown
11580ipv6lib=none
11581ipv6trylibc=no
11582
11583if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011584 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11585echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011586 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11587 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011588 case $i in
11589 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011590 cat >conftest.$ac_ext <<_ACEOF
11591#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011592#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011593
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011594#include <netinet/in.h>
11595#ifdef IPV6_INRIA_VERSION
11596yes
11597#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011598_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011599if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011600 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011601 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011602fi
11603rm -f conftest*
11604
11605 ;;
11606 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011607 cat >conftest.$ac_ext <<_ACEOF
11608#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011609#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011610
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011611#include <netinet/in.h>
11612#ifdef __KAME__
11613yes
11614#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011615_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011616if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011617 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011618 ipv6type=$i;
11619 ipv6lib=inet6
11620 ipv6libdir=/usr/local/v6/lib
11621 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011622fi
11623rm -f conftest*
11624
11625 ;;
11626 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011627 cat >conftest.$ac_ext <<_ACEOF
11628#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011629#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011630
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011631#include <features.h>
11632#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11633yes
11634#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011635_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011636if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011637 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011638 ipv6type=$i;
11639 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011640fi
11641rm -f conftest*
11642
11643 ;;
11644 linux-inet6)
11645 if test -d /usr/inet6; then
11646 ipv6type=$i
11647 ipv6lib=inet6
11648 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011649 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011650 fi
11651 ;;
11652 solaris)
11653 if test -f /etc/netconfig; then
11654 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11655 ipv6type=$i
11656 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011657 fi
11658 fi
11659 ;;
11660 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011661 cat >conftest.$ac_ext <<_ACEOF
11662#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011663#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011664
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011665#include <sys/param.h>
11666#ifdef _TOSHIBA_INET6
11667yes
11668#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011669_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011670if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011671 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011672 ipv6type=$i;
11673 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011674 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011675fi
11676rm -f conftest*
11677
11678 ;;
11679 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011680 cat >conftest.$ac_ext <<_ACEOF
11681#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011682#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011683
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011684#include </usr/local/v6/include/sys/v6config.h>
11685#ifdef __V6D__
11686yes
11687#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011688_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011689if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011690 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011691 ipv6type=$i;
11692 ipv6lib=v6;
11693 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011694 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011695fi
11696rm -f conftest*
11697
11698 ;;
11699 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011700 cat >conftest.$ac_ext <<_ACEOF
11701#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011702#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011703
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011704#include <sys/param.h>
11705#ifdef _ZETA_MINAMI_INET6
11706yes
11707#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011708_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011709if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011710 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011711 ipv6type=$i;
11712 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011713 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011714fi
11715rm -f conftest*
11716
11717 ;;
11718 esac
11719 if test "$ipv6type" != "unknown"; then
11720 break
11721 fi
11722 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011723 echo "$as_me:$LINENO: result: $ipv6type" >&5
11724echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011725fi
11726
11727if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11728 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11729 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11730 echo "using lib$ipv6lib"
11731 else
11732 if test $ipv6trylibc = "yes"; then
11733 echo "using libc"
11734 else
11735 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11736 echo "You need to fetch lib$ipv6lib.a from appropriate"
11737 echo 'ipv6 kit and compile beforehand.'
11738 exit 1
11739 fi
11740 fi
11741fi
11742
Jack Jansen7b8c7542002-04-14 20:12:41 +000011743# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000011744echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
11745echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000011746
11747# Check whether --with-universal-newlines or --without-universal-newlines was given.
11748if test "${with_universal_newlines+set}" = set; then
11749 withval="$with_universal_newlines"
11750
11751fi;
11752
11753if test -z "$with_universal_newlines"
11754then with_universal_newlines="yes"
11755fi
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011756if test "$with_universal_newlines" = "no"
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011757then
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011758 echo --without-universal-newlines is unsupported, see README
11759 exit 1
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011760else
Martin v. Löwise8aea582002-04-16 05:51:02 +000011761
11762cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011763#define WITH_UNIVERSAL_NEWLINES 1
11764_ACEOF
11765
11766fi
11767echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11768echo "${ECHO_T}$with_universal_newlines" >&6
11769
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011770# Check for --with-doc-strings
11771echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11772echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11773
11774# Check whether --with-doc-strings or --without-doc-strings was given.
11775if test "${with_doc_strings+set}" = set; then
11776 withval="$with_doc_strings"
11777
11778fi;
11779
11780if test -z "$with_doc_strings"
11781then with_doc_strings="yes"
11782fi
11783if test "$with_doc_strings" != "no"
11784then
11785
11786cat >>confdefs.h <<\_ACEOF
11787#define WITH_DOC_STRINGS 1
11788_ACEOF
11789
11790fi
11791echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11792echo "${ECHO_T}$with_doc_strings" >&6
11793
Neil Schemenauera35c6882001-02-27 04:45:05 +000011794# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011795echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11796echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11797
Neil Schemenauera35c6882001-02-27 04:45:05 +000011798# Check whether --with-pymalloc or --without-pymalloc was given.
11799if test "${with_pymalloc+set}" = set; then
11800 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011801
Martin v. Löwis11437992002-04-12 09:54:03 +000011802fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011803
Neil Schemenauer16c22972002-03-22 15:34:49 +000011804if test -z "$with_pymalloc"
11805then with_pymalloc="yes"
11806fi
11807if test "$with_pymalloc" != "no"
11808then
Martin v. Löwis11437992002-04-12 09:54:03 +000011809
11810cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011811#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011812_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011813
11814fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011815echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11816echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011817
Barry Warsawef82cd72000-06-30 16:21:01 +000011818# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011819echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11820echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11821
Barry Warsawef82cd72000-06-30 16:21:01 +000011822# Check whether --with-wctype-functions or --without-wctype-functions was given.
11823if test "${with_wctype_functions+set}" = set; then
11824 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011825
Barry Warsawef82cd72000-06-30 16:21:01 +000011826if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011827then
11828
11829cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011830#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011831_ACEOF
11832
11833 echo "$as_me:$LINENO: result: yes" >&5
11834echo "${ECHO_T}yes" >&6
11835else echo "$as_me:$LINENO: result: no" >&5
11836echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011837fi
11838else
Martin v. Löwis11437992002-04-12 09:54:03 +000011839 echo "$as_me:$LINENO: result: no" >&5
11840echo "${ECHO_T}no" >&6
11841fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011842
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011843# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011844
Guido van Rossum98935bf2001-09-05 19:13:16 +000011845DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011846
Martin v. Löwis11437992002-04-12 09:54:03 +000011847echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11848echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11849
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011850# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011851if test "${with_sgi_dl+set}" = set; then
11852 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011853
11854echo "$as_me:$LINENO: result: $withval" >&5
11855echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000011856echo --with-sgi-dl is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011857exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011858
11859cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011860#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011861_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011862
Guido van Rossume97ee181999-12-20 21:27:22 +000011863DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011864dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011865if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011866then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011867else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11868echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11869 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011870fi
11871DLINCLDIR=${dldir}
11872LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011873else
Martin v. Löwis11437992002-04-12 09:54:03 +000011874 echo "$as_me:$LINENO: result: no" >&5
11875echo "${ECHO_T}no" >&6
11876fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011877
Martin v. Löwis11437992002-04-12 09:54:03 +000011878echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11879echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011880
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011881# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011882if test "${with_dl_dld+set}" = set; then
11883 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011884
11885echo "$as_me:$LINENO: result: $withval" >&5
11886echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000011887echo --with-dl-dld is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011888exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011889
11890cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011891#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011892_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011893
Guido van Rossume97ee181999-12-20 21:27:22 +000011894DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011895dldir=`echo "$withval" | sed 's/,.*//'`
11896dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011897if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011898then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011899else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&5
11900echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&2;}
11901 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011902fi
11903DLINCLDIR=${dldir}
11904LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011905else
Martin v. Löwis11437992002-04-12 09:54:03 +000011906 echo "$as_me:$LINENO: result: no" >&5
11907echo "${ECHO_T}no" >&6
11908fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011909
Guido van Rossume97ee181999-12-20 21:27:22 +000011910# the dlopen() function means we might want to use dynload_shlib.o. some
11911# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011912
Thomas Wouters3a584202000-08-05 23:28:51 +000011913for ac_func in dlopen
11914do
Martin v. Löwis11437992002-04-12 09:54:03 +000011915as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11916echo "$as_me:$LINENO: checking for $ac_func" >&5
11917echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11918if eval "test \"\${$as_ac_var+set}\" = set"; then
11919 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011920else
Martin v. Löwis11437992002-04-12 09:54:03 +000011921 cat >conftest.$ac_ext <<_ACEOF
11922#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011923#include "confdefs.h"
11924/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011925 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011926#include <assert.h>
11927/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011928#ifdef __cplusplus
11929extern "C"
11930#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011931/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011932 builtin and then its argument prototype would still apply. */
11933char $ac_func ();
11934char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011935
Barry Warsawfe33b792003-01-07 22:42:49 +000011936#ifdef F77_DUMMY_MAIN
11937# ifdef __cplusplus
11938 extern "C"
11939# endif
11940 int F77_DUMMY_MAIN() { return 1; }
11941#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011942int
11943main ()
11944{
Guido van Rossume97ee181999-12-20 21:27:22 +000011945/* The GNU C library defines this for functions which it implements
11946 to always fail with ENOSYS. Some functions are actually named
11947 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011948#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011949choke me
11950#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011951f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011952#endif
11953
Martin v. Löwis11437992002-04-12 09:54:03 +000011954 ;
11955 return 0;
11956}
11957_ACEOF
11958rm -f conftest.$ac_objext conftest$ac_exeext
11959if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11960 (eval $ac_link) 2>&5
11961 ac_status=$?
11962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11963 (exit $ac_status); } &&
11964 { ac_try='test -s conftest$ac_exeext'
11965 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11966 (eval $ac_try) 2>&5
11967 ac_status=$?
11968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11969 (exit $ac_status); }; }; then
11970 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011971else
Martin v. Löwis11437992002-04-12 09:54:03 +000011972 echo "$as_me: failed program was:" >&5
11973cat conftest.$ac_ext >&5
11974eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011975fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011976rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011977fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011978echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11979echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11980if test `eval echo '${'$as_ac_var'}'` = yes; then
11981 cat >>confdefs.h <<_ACEOF
11982#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11983_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011984
Guido van Rossume97ee181999-12-20 21:27:22 +000011985fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011986done
Guido van Rossume97ee181999-12-20 21:27:22 +000011987
Michael W. Hudson54241132001-12-07 15:38:26 +000011988
Guido van Rossume97ee181999-12-20 21:27:22 +000011989# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11990# loading of modules.
11991
Martin v. Löwis11437992002-04-12 09:54:03 +000011992echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11993echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011994if test -z "$DYNLOADFILE"
11995then
11996 case $ac_sys_system/$ac_sys_release in
11997 AIX*) DYNLOADFILE="dynload_aix.o";;
11998 BeOS*) DYNLOADFILE="dynload_beos.o";;
11999 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000012000 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012001 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000012002 *)
12003 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
12004 # out any dynamic loading
12005 if test "$ac_cv_func_dlopen" = yes
12006 then DYNLOADFILE="dynload_shlib.o"
12007 else DYNLOADFILE="dynload_stub.o"
12008 fi
12009 ;;
12010 esac
12011fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012012echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
12013echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012014if test "$DYNLOADFILE" != "dynload_stub.o"
12015then
Martin v. Löwis11437992002-04-12 09:54:03 +000012016
12017cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012018#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012019_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012020
12021fi
12022
Neil Schemenauer4e425612001-06-19 15:44:15 +000012023# MACHDEP_OBJS can be set to platform-specific object files needed by Python
12024
Michael W. Hudson54241132001-12-07 15:38:26 +000012025
Martin v. Löwis11437992002-04-12 09:54:03 +000012026echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
12027echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012028if test -z "$MACHDEP_OBJS"
12029then
Jack Jansene578a632001-08-15 01:27:14 +000012030 MACHDEP_OBJS=$extra_machdep_objs
12031else
12032 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000012033fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012034echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
12035echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012036
Guido van Rossum627b2d71993-12-24 10:39:16 +000012037# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
Martin v. Löwis9c36c292002-12-21 18:34:06 +000012111
Martin v. Löwis438b5342002-12-27 10:16:42 +000012112
Neal Norwitz10b214c2003-02-13 02:11:10 +000012113
Guido van Rossum162e38c2003-02-19 15:25:10 +000012114
Martin v. Löwisd5843682002-11-21 20:41:28 +000012115for ac_func in alarm chown clock confstr ctermid execv \
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012116 fchdir fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012117 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
12118 getpriority getpwent getwd \
Neal Norwitz10b214c2003-02-13 02:11:10 +000012119 hstrerror inet_aton inet_pton kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000012120 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000012121 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000012122 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000012123 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012124 sigaction siginterrupt sigrelse strftime strptime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000012125 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012126 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000012127do
Martin v. Löwis11437992002-04-12 09:54:03 +000012128as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12129echo "$as_me:$LINENO: checking for $ac_func" >&5
12130echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12131if eval "test \"\${$as_ac_var+set}\" = set"; then
12132 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012133else
Martin v. Löwis11437992002-04-12 09:54:03 +000012134 cat >conftest.$ac_ext <<_ACEOF
12135#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012136#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012137/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012138 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012139#include <assert.h>
12140/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012141#ifdef __cplusplus
12142extern "C"
12143#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012144/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012145 builtin and then its argument prototype would still apply. */
12146char $ac_func ();
12147char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012148
Barry Warsawfe33b792003-01-07 22:42:49 +000012149#ifdef F77_DUMMY_MAIN
12150# ifdef __cplusplus
12151 extern "C"
12152# endif
12153 int F77_DUMMY_MAIN() { return 1; }
12154#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012155int
12156main ()
12157{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012158/* The GNU C library defines this for functions which it implements
12159 to always fail with ENOSYS. Some functions are actually named
12160 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012161#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012162choke me
12163#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012164f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012165#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012166
Martin v. Löwis11437992002-04-12 09:54:03 +000012167 ;
12168 return 0;
12169}
12170_ACEOF
12171rm -f conftest.$ac_objext conftest$ac_exeext
12172if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12173 (eval $ac_link) 2>&5
12174 ac_status=$?
12175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12176 (exit $ac_status); } &&
12177 { ac_try='test -s conftest$ac_exeext'
12178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12179 (eval $ac_try) 2>&5
12180 ac_status=$?
12181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12182 (exit $ac_status); }; }; then
12183 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012184else
Martin v. Löwis11437992002-04-12 09:54:03 +000012185 echo "$as_me: failed program was:" >&5
12186cat conftest.$ac_ext >&5
12187eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012188fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012189rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012190fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012191echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12192echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12193if test `eval echo '${'$as_ac_var'}'` = yes; then
12194 cat >>confdefs.h <<_ACEOF
12195#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12196_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012197
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012198fi
12199done
12200
Michael W. Hudson54241132001-12-07 15:38:26 +000012201
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012202# For some functions, having a definition is not sufficient, since
12203# we want to take their address.
12204echo "$as_me:$LINENO: checking for chroot" >&5
12205echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12206cat >conftest.$ac_ext <<_ACEOF
12207#line $LINENO "configure"
12208#include "confdefs.h"
12209#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012210#ifdef F77_DUMMY_MAIN
12211# ifdef __cplusplus
12212 extern "C"
12213# endif
12214 int F77_DUMMY_MAIN() { return 1; }
12215#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012216int
12217main ()
12218{
12219void *x=chroot
12220 ;
12221 return 0;
12222}
12223_ACEOF
12224rm -f conftest.$ac_objext
12225if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12226 (eval $ac_compile) 2>&5
12227 ac_status=$?
12228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12229 (exit $ac_status); } &&
12230 { ac_try='test -s conftest.$ac_objext'
12231 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12232 (eval $ac_try) 2>&5
12233 ac_status=$?
12234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12235 (exit $ac_status); }; }; then
12236
12237cat >>confdefs.h <<\_ACEOF
12238#define HAVE_CHROOT 1
12239_ACEOF
12240
12241 echo "$as_me:$LINENO: result: yes" >&5
12242echo "${ECHO_T}yes" >&6
12243else
12244 echo "$as_me: failed program was:" >&5
12245cat conftest.$ac_ext >&5
12246echo "$as_me:$LINENO: result: no" >&5
12247echo "${ECHO_T}no" >&6
12248
12249fi
12250rm -f conftest.$ac_objext conftest.$ac_ext
12251echo "$as_me:$LINENO: checking for link" >&5
12252echo $ECHO_N "checking for link... $ECHO_C" >&6
12253cat >conftest.$ac_ext <<_ACEOF
12254#line $LINENO "configure"
12255#include "confdefs.h"
12256#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012257#ifdef F77_DUMMY_MAIN
12258# ifdef __cplusplus
12259 extern "C"
12260# endif
12261 int F77_DUMMY_MAIN() { return 1; }
12262#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012263int
12264main ()
12265{
12266void *x=link
12267 ;
12268 return 0;
12269}
12270_ACEOF
12271rm -f conftest.$ac_objext
12272if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12273 (eval $ac_compile) 2>&5
12274 ac_status=$?
12275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12276 (exit $ac_status); } &&
12277 { ac_try='test -s conftest.$ac_objext'
12278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12279 (eval $ac_try) 2>&5
12280 ac_status=$?
12281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12282 (exit $ac_status); }; }; then
12283
12284cat >>confdefs.h <<\_ACEOF
12285#define HAVE_LINK 1
12286_ACEOF
12287
12288 echo "$as_me:$LINENO: result: yes" >&5
12289echo "${ECHO_T}yes" >&6
12290else
12291 echo "$as_me: failed program was:" >&5
12292cat conftest.$ac_ext >&5
12293echo "$as_me:$LINENO: result: no" >&5
12294echo "${ECHO_T}no" >&6
12295
12296fi
12297rm -f conftest.$ac_objext conftest.$ac_ext
12298echo "$as_me:$LINENO: checking for symlink" >&5
12299echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12300cat >conftest.$ac_ext <<_ACEOF
12301#line $LINENO "configure"
12302#include "confdefs.h"
12303#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012304#ifdef F77_DUMMY_MAIN
12305# ifdef __cplusplus
12306 extern "C"
12307# endif
12308 int F77_DUMMY_MAIN() { return 1; }
12309#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012310int
12311main ()
12312{
12313void *x=symlink
12314 ;
12315 return 0;
12316}
12317_ACEOF
12318rm -f conftest.$ac_objext
12319if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12320 (eval $ac_compile) 2>&5
12321 ac_status=$?
12322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12323 (exit $ac_status); } &&
12324 { ac_try='test -s conftest.$ac_objext'
12325 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12326 (eval $ac_try) 2>&5
12327 ac_status=$?
12328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12329 (exit $ac_status); }; }; then
12330
12331cat >>confdefs.h <<\_ACEOF
12332#define HAVE_SYMLINK 1
12333_ACEOF
12334
12335 echo "$as_me:$LINENO: result: yes" >&5
12336echo "${ECHO_T}yes" >&6
12337else
12338 echo "$as_me: failed program was:" >&5
12339cat conftest.$ac_ext >&5
12340echo "$as_me:$LINENO: result: no" >&5
12341echo "${ECHO_T}no" >&6
12342
12343fi
12344rm -f conftest.$ac_objext conftest.$ac_ext
12345
Martin v. Löwisd5843682002-11-21 20:41:28 +000012346# On some systems (eg. FreeBSD 5), we would find a definition of the
12347# functions ctermid_r, setgroups in the library, but no prototype
12348# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12349# address to avoid compiler warnings and potential miscompilations
12350# because of the missing prototypes.
12351
12352echo "$as_me:$LINENO: checking for ctermid_r" >&5
12353echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
12354cat >conftest.$ac_ext <<_ACEOF
12355#line $LINENO "configure"
12356#include "confdefs.h"
12357
12358#include "confdefs.h"
12359#include <stdio.h>
12360
Barry Warsawfe33b792003-01-07 22:42:49 +000012361#ifdef F77_DUMMY_MAIN
12362# ifdef __cplusplus
12363 extern "C"
12364# endif
12365 int F77_DUMMY_MAIN() { return 1; }
12366#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012367int
12368main ()
12369{
12370void* p = ctermid_r
12371 ;
12372 return 0;
12373}
12374_ACEOF
12375rm -f conftest.$ac_objext
12376if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12377 (eval $ac_compile) 2>&5
12378 ac_status=$?
12379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12380 (exit $ac_status); } &&
12381 { ac_try='test -s conftest.$ac_objext'
12382 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12383 (eval $ac_try) 2>&5
12384 ac_status=$?
12385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12386 (exit $ac_status); }; }; then
12387
12388cat >>confdefs.h <<\_ACEOF
12389#define HAVE_CTERMID_R 1
12390_ACEOF
12391
12392 echo "$as_me:$LINENO: result: yes" >&5
12393echo "${ECHO_T}yes" >&6
12394else
12395 echo "$as_me: failed program was:" >&5
12396cat conftest.$ac_ext >&5
12397echo "$as_me:$LINENO: result: no" >&5
12398echo "${ECHO_T}no" >&6
12399
12400fi
12401rm -f conftest.$ac_objext conftest.$ac_ext
12402
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012403echo "$as_me:$LINENO: checking for flock" >&5
12404echo $ECHO_N "checking for flock... $ECHO_C" >&6
12405cat >conftest.$ac_ext <<_ACEOF
12406#line $LINENO "configure"
12407#include "confdefs.h"
12408
12409#include "confdefs.h"
12410#include <sys/file.h>
12411
12412#ifdef F77_DUMMY_MAIN
12413# ifdef __cplusplus
12414 extern "C"
12415# endif
12416 int F77_DUMMY_MAIN() { return 1; }
12417#endif
12418int
12419main ()
12420{
12421void* p = flock
12422 ;
12423 return 0;
12424}
12425_ACEOF
12426rm -f conftest.$ac_objext
12427if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12428 (eval $ac_compile) 2>&5
12429 ac_status=$?
12430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12431 (exit $ac_status); } &&
12432 { ac_try='test -s conftest.$ac_objext'
12433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12434 (eval $ac_try) 2>&5
12435 ac_status=$?
12436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12437 (exit $ac_status); }; }; then
12438
12439cat >>confdefs.h <<\_ACEOF
12440#define HAVE_FLOCK 1
12441_ACEOF
12442
12443 echo "$as_me:$LINENO: result: yes" >&5
12444echo "${ECHO_T}yes" >&6
12445else
12446 echo "$as_me: failed program was:" >&5
12447cat conftest.$ac_ext >&5
12448echo "$as_me:$LINENO: result: no" >&5
12449echo "${ECHO_T}no" >&6
12450
12451fi
12452rm -f conftest.$ac_objext conftest.$ac_ext
12453
12454echo "$as_me:$LINENO: checking for getpagesize" >&5
12455echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
12456cat >conftest.$ac_ext <<_ACEOF
12457#line $LINENO "configure"
12458#include "confdefs.h"
12459
12460#include "confdefs.h"
12461#include <unistd.h>
12462
12463#ifdef F77_DUMMY_MAIN
12464# ifdef __cplusplus
12465 extern "C"
12466# endif
12467 int F77_DUMMY_MAIN() { return 1; }
12468#endif
12469int
12470main ()
12471{
12472void* p = getpagesize
12473 ;
12474 return 0;
12475}
12476_ACEOF
12477rm -f conftest.$ac_objext
12478if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12479 (eval $ac_compile) 2>&5
12480 ac_status=$?
12481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12482 (exit $ac_status); } &&
12483 { ac_try='test -s conftest.$ac_objext'
12484 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12485 (eval $ac_try) 2>&5
12486 ac_status=$?
12487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12488 (exit $ac_status); }; }; then
12489
12490cat >>confdefs.h <<\_ACEOF
12491#define HAVE_GETPAGESIZE 1
12492_ACEOF
12493
12494 echo "$as_me:$LINENO: result: yes" >&5
12495echo "${ECHO_T}yes" >&6
12496else
12497 echo "$as_me: failed program was:" >&5
12498cat conftest.$ac_ext >&5
12499echo "$as_me:$LINENO: result: no" >&5
12500echo "${ECHO_T}no" >&6
12501
12502fi
12503rm -f conftest.$ac_objext conftest.$ac_ext
12504
Martin v. Löwisd5843682002-11-21 20:41:28 +000012505echo "$as_me:$LINENO: checking for setgroups" >&5
12506echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
12507cat >conftest.$ac_ext <<_ACEOF
12508#line $LINENO "configure"
12509#include "confdefs.h"
12510
12511#include "confdefs.h"
12512#include <unistd.h.h>
12513
Barry Warsawfe33b792003-01-07 22:42:49 +000012514#ifdef F77_DUMMY_MAIN
12515# ifdef __cplusplus
12516 extern "C"
12517# endif
12518 int F77_DUMMY_MAIN() { return 1; }
12519#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012520int
12521main ()
12522{
12523void* p = setgroups
12524 ;
12525 return 0;
12526}
12527_ACEOF
12528rm -f conftest.$ac_objext
12529if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12530 (eval $ac_compile) 2>&5
12531 ac_status=$?
12532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12533 (exit $ac_status); } &&
12534 { ac_try='test -s conftest.$ac_objext'
12535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12536 (eval $ac_try) 2>&5
12537 ac_status=$?
12538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12539 (exit $ac_status); }; }; then
12540
12541cat >>confdefs.h <<\_ACEOF
12542#define HAVE_SETGROUPS 1
12543_ACEOF
12544
12545 echo "$as_me:$LINENO: result: yes" >&5
12546echo "${ECHO_T}yes" >&6
12547else
12548 echo "$as_me: failed program was:" >&5
12549cat conftest.$ac_ext >&5
12550echo "$as_me:$LINENO: result: no" >&5
12551echo "${ECHO_T}no" >&6
12552
12553fi
12554rm -f conftest.$ac_objext conftest.$ac_ext
12555
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012556# check for openpty and forkpty
12557
Martin v. Löwis11437992002-04-12 09:54:03 +000012558
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012559for ac_func in openpty
12560do
Martin v. Löwis11437992002-04-12 09:54:03 +000012561as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12562echo "$as_me:$LINENO: checking for $ac_func" >&5
12563echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12564if eval "test \"\${$as_ac_var+set}\" = set"; then
12565 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012566else
Martin v. Löwis11437992002-04-12 09:54:03 +000012567 cat >conftest.$ac_ext <<_ACEOF
12568#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012569#include "confdefs.h"
12570/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012571 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012572#include <assert.h>
12573/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012574#ifdef __cplusplus
12575extern "C"
12576#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012577/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012578 builtin and then its argument prototype would still apply. */
12579char $ac_func ();
12580char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012581
Barry Warsawfe33b792003-01-07 22:42:49 +000012582#ifdef F77_DUMMY_MAIN
12583# ifdef __cplusplus
12584 extern "C"
12585# endif
12586 int F77_DUMMY_MAIN() { return 1; }
12587#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012588int
12589main ()
12590{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012591/* The GNU C library defines this for functions which it implements
12592 to always fail with ENOSYS. Some functions are actually named
12593 something starting with __ and the normal name is an alias. */
12594#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12595choke me
12596#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012597f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012598#endif
12599
Martin v. Löwis11437992002-04-12 09:54:03 +000012600 ;
12601 return 0;
12602}
12603_ACEOF
12604rm -f conftest.$ac_objext conftest$ac_exeext
12605if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12606 (eval $ac_link) 2>&5
12607 ac_status=$?
12608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12609 (exit $ac_status); } &&
12610 { ac_try='test -s conftest$ac_exeext'
12611 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12612 (eval $ac_try) 2>&5
12613 ac_status=$?
12614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12615 (exit $ac_status); }; }; then
12616 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012617else
Martin v. Löwis11437992002-04-12 09:54:03 +000012618 echo "$as_me: failed program was:" >&5
12619cat conftest.$ac_ext >&5
12620eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012621fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012622rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012623fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012624echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12625echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12626if test `eval echo '${'$as_ac_var'}'` = yes; then
12627 cat >>confdefs.h <<_ACEOF
12628#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12629_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012630
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012631else
Martin v. Löwis11437992002-04-12 09:54:03 +000012632 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
12633echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
12634if test "${ac_cv_lib_util_openpty+set}" = set; then
12635 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012636else
Martin v. Löwis11437992002-04-12 09:54:03 +000012637 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012638LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012639cat >conftest.$ac_ext <<_ACEOF
12640#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012641#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012642
Fred Drake8cef4cf2000-06-28 16:40:38 +000012643/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012644#ifdef __cplusplus
12645extern "C"
12646#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012647/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012648 builtin and then its argument prototype would still apply. */
12649char openpty ();
Barry Warsawfe33b792003-01-07 22:42:49 +000012650#ifdef F77_DUMMY_MAIN
12651# ifdef __cplusplus
12652 extern "C"
12653# endif
12654 int F77_DUMMY_MAIN() { return 1; }
12655#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012656int
12657main ()
12658{
12659openpty ();
12660 ;
12661 return 0;
12662}
12663_ACEOF
12664rm -f conftest.$ac_objext conftest$ac_exeext
12665if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12666 (eval $ac_link) 2>&5
12667 ac_status=$?
12668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12669 (exit $ac_status); } &&
12670 { ac_try='test -s conftest$ac_exeext'
12671 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12672 (eval $ac_try) 2>&5
12673 ac_status=$?
12674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12675 (exit $ac_status); }; }; then
12676 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012677else
Martin v. Löwis11437992002-04-12 09:54:03 +000012678 echo "$as_me: failed program was:" >&5
12679cat conftest.$ac_ext >&5
12680ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012681fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012682rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12683LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012684fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012685echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
12686echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
12687if test $ac_cv_lib_util_openpty = yes; then
12688 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012689#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012690_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012691 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012692fi
12693
12694fi
12695done
12696
Martin v. Löwis11437992002-04-12 09:54:03 +000012697
Fred Drake8cef4cf2000-06-28 16:40:38 +000012698for ac_func in forkpty
12699do
Martin v. Löwis11437992002-04-12 09:54:03 +000012700as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12701echo "$as_me:$LINENO: checking for $ac_func" >&5
12702echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12703if eval "test \"\${$as_ac_var+set}\" = set"; then
12704 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012705else
Martin v. Löwis11437992002-04-12 09:54:03 +000012706 cat >conftest.$ac_ext <<_ACEOF
12707#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012708#include "confdefs.h"
12709/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012710 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000012711#include <assert.h>
12712/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012713#ifdef __cplusplus
12714extern "C"
12715#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012716/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012717 builtin and then its argument prototype would still apply. */
12718char $ac_func ();
12719char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000012720
Barry Warsawfe33b792003-01-07 22:42:49 +000012721#ifdef F77_DUMMY_MAIN
12722# ifdef __cplusplus
12723 extern "C"
12724# endif
12725 int F77_DUMMY_MAIN() { return 1; }
12726#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012727int
12728main ()
12729{
Fred Drake8cef4cf2000-06-28 16:40:38 +000012730/* The GNU C library defines this for functions which it implements
12731 to always fail with ENOSYS. Some functions are actually named
12732 something starting with __ and the normal name is an alias. */
12733#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12734choke me
12735#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012736f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000012737#endif
12738
Martin v. Löwis11437992002-04-12 09:54:03 +000012739 ;
12740 return 0;
12741}
12742_ACEOF
12743rm -f conftest.$ac_objext conftest$ac_exeext
12744if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12745 (eval $ac_link) 2>&5
12746 ac_status=$?
12747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12748 (exit $ac_status); } &&
12749 { ac_try='test -s conftest$ac_exeext'
12750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12751 (eval $ac_try) 2>&5
12752 ac_status=$?
12753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12754 (exit $ac_status); }; }; then
12755 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012756else
Martin v. Löwis11437992002-04-12 09:54:03 +000012757 echo "$as_me: failed program was:" >&5
12758cat conftest.$ac_ext >&5
12759eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012760fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012761rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012762fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012763echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12764echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12765if test `eval echo '${'$as_ac_var'}'` = yes; then
12766 cat >>confdefs.h <<_ACEOF
12767#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12768_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012769
Fred Drake8cef4cf2000-06-28 16:40:38 +000012770else
Martin v. Löwis11437992002-04-12 09:54:03 +000012771 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
12772echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
12773if test "${ac_cv_lib_util_forkpty+set}" = set; then
12774 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012775else
Martin v. Löwis11437992002-04-12 09:54:03 +000012776 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012777LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012778cat >conftest.$ac_ext <<_ACEOF
12779#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012780#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012781
Fred Drake8cef4cf2000-06-28 16:40:38 +000012782/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012783#ifdef __cplusplus
12784extern "C"
12785#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012786/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012787 builtin and then its argument prototype would still apply. */
12788char forkpty ();
Barry Warsawfe33b792003-01-07 22:42:49 +000012789#ifdef F77_DUMMY_MAIN
12790# ifdef __cplusplus
12791 extern "C"
12792# endif
12793 int F77_DUMMY_MAIN() { return 1; }
12794#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012795int
12796main ()
12797{
12798forkpty ();
12799 ;
12800 return 0;
12801}
12802_ACEOF
12803rm -f conftest.$ac_objext conftest$ac_exeext
12804if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12805 (eval $ac_link) 2>&5
12806 ac_status=$?
12807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12808 (exit $ac_status); } &&
12809 { ac_try='test -s conftest$ac_exeext'
12810 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12811 (eval $ac_try) 2>&5
12812 ac_status=$?
12813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12814 (exit $ac_status); }; }; then
12815 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012816else
Martin v. Löwis11437992002-04-12 09:54:03 +000012817 echo "$as_me: failed program was:" >&5
12818cat conftest.$ac_ext >&5
12819ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012820fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012821rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12822LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012823fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012824echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
12825echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
12826if test $ac_cv_lib_util_forkpty = yes; then
12827 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012828#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012829_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012830 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012831fi
12832
12833fi
12834done
12835
Jack Jansendd19cf82001-12-06 22:36:17 +000012836
Michael W. Hudson54241132001-12-07 15:38:26 +000012837# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012838
12839
12840
12841
12842
12843
Fred Drake8cef4cf2000-06-28 16:40:38 +000012844for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
12845do
Martin v. Löwis11437992002-04-12 09:54:03 +000012846as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12847echo "$as_me:$LINENO: checking for $ac_func" >&5
12848echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12849if eval "test \"\${$as_ac_var+set}\" = set"; then
12850 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012851else
Martin v. Löwis11437992002-04-12 09:54:03 +000012852 cat >conftest.$ac_ext <<_ACEOF
12853#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012854#include "confdefs.h"
12855/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012856 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012857#include <assert.h>
12858/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012859#ifdef __cplusplus
12860extern "C"
12861#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012862/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012863 builtin and then its argument prototype would still apply. */
12864char $ac_func ();
12865char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012866
Barry Warsawfe33b792003-01-07 22:42:49 +000012867#ifdef F77_DUMMY_MAIN
12868# ifdef __cplusplus
12869 extern "C"
12870# endif
12871 int F77_DUMMY_MAIN() { return 1; }
12872#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012873int
12874main ()
12875{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012876/* The GNU C library defines this for functions which it implements
12877 to always fail with ENOSYS. Some functions are actually named
12878 something starting with __ and the normal name is an alias. */
12879#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12880choke me
12881#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012882f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012883#endif
12884
Martin v. Löwis11437992002-04-12 09:54:03 +000012885 ;
12886 return 0;
12887}
12888_ACEOF
12889rm -f conftest.$ac_objext conftest$ac_exeext
12890if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12891 (eval $ac_link) 2>&5
12892 ac_status=$?
12893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12894 (exit $ac_status); } &&
12895 { ac_try='test -s conftest$ac_exeext'
12896 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12897 (eval $ac_try) 2>&5
12898 ac_status=$?
12899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12900 (exit $ac_status); }; }; then
12901 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012902else
Martin v. Löwis11437992002-04-12 09:54:03 +000012903 echo "$as_me: failed program was:" >&5
12904cat conftest.$ac_ext >&5
12905eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012906fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012907rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012908fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012909echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12910echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12911if test `eval echo '${'$as_ac_var'}'` = yes; then
12912 cat >>confdefs.h <<_ACEOF
12913#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12914_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012915
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012916fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012917done
12918
Michael W. Hudson54241132001-12-07 15:38:26 +000012919
Martin v. Löwis11437992002-04-12 09:54:03 +000012920
12921
12922
12923
12924
Martin v. Löwis1142de32002-03-29 16:28:31 +000012925for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000012926do
Martin v. Löwis11437992002-04-12 09:54:03 +000012927as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12928echo "$as_me:$LINENO: checking for $ac_func" >&5
12929echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12930if eval "test \"\${$as_ac_var+set}\" = set"; then
12931 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012932else
Martin v. Löwis11437992002-04-12 09:54:03 +000012933 cat >conftest.$ac_ext <<_ACEOF
12934#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012935#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012936/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012937 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012938#include <assert.h>
12939/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012940#ifdef __cplusplus
12941extern "C"
12942#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012943/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012944 builtin and then its argument prototype would still apply. */
12945char $ac_func ();
12946char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012947
Barry Warsawfe33b792003-01-07 22:42:49 +000012948#ifdef F77_DUMMY_MAIN
12949# ifdef __cplusplus
12950 extern "C"
12951# endif
12952 int F77_DUMMY_MAIN() { return 1; }
12953#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012954int
12955main ()
12956{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012957/* The GNU C library defines this for functions which it implements
12958 to always fail with ENOSYS. Some functions are actually named
12959 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012960#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012961choke me
12962#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012963f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012964#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012965
Martin v. Löwis11437992002-04-12 09:54:03 +000012966 ;
12967 return 0;
12968}
12969_ACEOF
12970rm -f conftest.$ac_objext conftest$ac_exeext
12971if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12972 (eval $ac_link) 2>&5
12973 ac_status=$?
12974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12975 (exit $ac_status); } &&
12976 { ac_try='test -s conftest$ac_exeext'
12977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12978 (eval $ac_try) 2>&5
12979 ac_status=$?
12980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12981 (exit $ac_status); }; }; then
12982 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012983else
Martin v. Löwis11437992002-04-12 09:54:03 +000012984 echo "$as_me: failed program was:" >&5
12985cat conftest.$ac_ext >&5
12986eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012987fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012988rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000012989fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012990echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12991echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12992if test `eval echo '${'$as_ac_var'}'` = yes; then
12993 cat >>confdefs.h <<_ACEOF
12994#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12995_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000012996
Martin v. Löwis1142de32002-03-29 16:28:31 +000012997else
Martin v. Löwis11437992002-04-12 09:54:03 +000012998 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012999fi
13000done
13001
13002
Martin v. Löwis11437992002-04-12 09:54:03 +000013003
Martin v. Löwis1142de32002-03-29 16:28:31 +000013004for ac_func in getpgrp
13005do
Martin v. Löwis11437992002-04-12 09:54:03 +000013006as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13007echo "$as_me:$LINENO: checking for $ac_func" >&5
13008echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13009if eval "test \"\${$as_ac_var+set}\" = set"; then
13010 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000013011else
Martin v. Löwis11437992002-04-12 09:54:03 +000013012 cat >conftest.$ac_ext <<_ACEOF
13013#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013014#include "confdefs.h"
13015/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013016 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000013017#include <assert.h>
13018/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013019#ifdef __cplusplus
13020extern "C"
13021#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013022/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013023 builtin and then its argument prototype would still apply. */
13024char $ac_func ();
13025char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000013026
Barry Warsawfe33b792003-01-07 22:42:49 +000013027#ifdef F77_DUMMY_MAIN
13028# ifdef __cplusplus
13029 extern "C"
13030# endif
13031 int F77_DUMMY_MAIN() { return 1; }
13032#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013033int
13034main ()
13035{
Martin v. Löwis1142de32002-03-29 16:28:31 +000013036/* The GNU C library defines this for functions which it implements
13037 to always fail with ENOSYS. Some functions are actually named
13038 something starting with __ and the normal name is an alias. */
13039#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13040choke me
13041#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013042f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000013043#endif
13044
Martin v. Löwis11437992002-04-12 09:54:03 +000013045 ;
13046 return 0;
13047}
13048_ACEOF
13049rm -f conftest.$ac_objext conftest$ac_exeext
13050if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13051 (eval $ac_link) 2>&5
13052 ac_status=$?
13053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13054 (exit $ac_status); } &&
13055 { ac_try='test -s conftest$ac_exeext'
13056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13057 (eval $ac_try) 2>&5
13058 ac_status=$?
13059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13060 (exit $ac_status); }; }; then
13061 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013062else
Martin v. Löwis11437992002-04-12 09:54:03 +000013063 echo "$as_me: failed program was:" >&5
13064cat conftest.$ac_ext >&5
13065eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013066fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013067rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013068fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013069echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13070echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13071if test `eval echo '${'$as_ac_var'}'` = yes; then
13072 cat >>confdefs.h <<_ACEOF
13073#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13074_ACEOF
13075 cat >conftest.$ac_ext <<_ACEOF
13076#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013077#include "confdefs.h"
13078#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000013079#ifdef F77_DUMMY_MAIN
13080# ifdef __cplusplus
13081 extern "C"
13082# endif
13083 int F77_DUMMY_MAIN() { return 1; }
13084#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013085int
13086main ()
13087{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013088getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013089 ;
13090 return 0;
13091}
13092_ACEOF
13093rm -f conftest.$ac_objext
13094if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13095 (eval $ac_compile) 2>&5
13096 ac_status=$?
13097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13098 (exit $ac_status); } &&
13099 { ac_try='test -s conftest.$ac_objext'
13100 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13101 (eval $ac_try) 2>&5
13102 ac_status=$?
13103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13104 (exit $ac_status); }; }; then
13105
13106cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013107#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013108_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013109
Martin v. Löwis11437992002-04-12 09:54:03 +000013110
Guido van Rossumf78abae1997-01-21 22:02:36 +000013111else
Martin v. Löwis11437992002-04-12 09:54:03 +000013112 echo "$as_me: failed program was:" >&5
13113cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013114fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013115rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013116
Guido van Rossum627b2d71993-12-24 10:39:16 +000013117fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013118done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013119
Jack Jansen150753c2003-03-29 22:07:47 +000013120
13121for ac_func in setpgrp
13122do
13123as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13124echo "$as_me:$LINENO: checking for $ac_func" >&5
13125echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13126if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013127 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013128else
Martin v. Löwis11437992002-04-12 09:54:03 +000013129 cat >conftest.$ac_ext <<_ACEOF
13130#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013131#include "confdefs.h"
Jack Jansen150753c2003-03-29 22:07:47 +000013132/* System header to define __stub macros and hopefully few prototypes,
13133 which can conflict with char $ac_func (); below. */
13134#include <assert.h>
13135/* Override any gcc2 internal prototype to avoid an error. */
13136#ifdef __cplusplus
13137extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000013138#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013139/* We use char because int might match the return type of a gcc2
13140 builtin and then its argument prototype would still apply. */
13141char $ac_func ();
13142char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013143
Barry Warsawfe33b792003-01-07 22:42:49 +000013144#ifdef F77_DUMMY_MAIN
13145# ifdef __cplusplus
13146 extern "C"
13147# endif
13148 int F77_DUMMY_MAIN() { return 1; }
13149#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013150int
13151main ()
13152{
Jack Jansen150753c2003-03-29 22:07:47 +000013153/* The GNU C library defines this for functions which it implements
13154 to always fail with ENOSYS. Some functions are actually named
13155 something starting with __ and the normal name is an alias. */
13156#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13157choke me
13158#else
13159f = $ac_func;
13160#endif
13161
Martin v. Löwis11437992002-04-12 09:54:03 +000013162 ;
13163 return 0;
13164}
13165_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013166rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000013167if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13168 (eval $ac_link) 2>&5
13169 ac_status=$?
13170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013171 (exit $ac_status); } &&
13172 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13174 (eval $ac_try) 2>&5
13175 ac_status=$?
13176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13177 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000013178 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013179else
Jack Jansen150753c2003-03-29 22:07:47 +000013180 echo "$as_me: failed program was:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013181cat conftest.$ac_ext >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013182eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013183fi
Jack Jansen150753c2003-03-29 22:07:47 +000013184rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013185fi
Jack Jansen150753c2003-03-29 22:07:47 +000013186echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13187echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13188if test `eval echo '${'$as_ac_var'}'` = yes; then
13189 cat >>confdefs.h <<_ACEOF
13190#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13191_ACEOF
13192 cat >conftest.$ac_ext <<_ACEOF
13193#line $LINENO "configure"
13194#include "confdefs.h"
13195#include <unistd.h>
13196#ifdef F77_DUMMY_MAIN
13197# ifdef __cplusplus
13198 extern "C"
13199# endif
13200 int F77_DUMMY_MAIN() { return 1; }
13201#endif
13202int
13203main ()
13204{
13205setpgrp(0,0);
13206 ;
13207 return 0;
13208}
13209_ACEOF
13210rm -f conftest.$ac_objext
13211if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13212 (eval $ac_compile) 2>&5
13213 ac_status=$?
13214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13215 (exit $ac_status); } &&
13216 { ac_try='test -s conftest.$ac_objext'
13217 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13218 (eval $ac_try) 2>&5
13219 ac_status=$?
13220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13221 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013222
13223cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013224#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013225_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013226
Jack Jansen150753c2003-03-29 22:07:47 +000013227
13228else
13229 echo "$as_me: failed program was:" >&5
13230cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013231fi
Jack Jansen150753c2003-03-29 22:07:47 +000013232rm -f conftest.$ac_objext conftest.$ac_ext
13233
13234fi
13235done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013236
Martin v. Löwis11437992002-04-12 09:54:03 +000013237
Thomas Wouters3a584202000-08-05 23:28:51 +000013238for ac_func in gettimeofday
13239do
Martin v. Löwis11437992002-04-12 09:54:03 +000013240as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13241echo "$as_me:$LINENO: checking for $ac_func" >&5
13242echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13243if eval "test \"\${$as_ac_var+set}\" = set"; then
13244 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013245else
Martin v. Löwis11437992002-04-12 09:54:03 +000013246 cat >conftest.$ac_ext <<_ACEOF
13247#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013248#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013249/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013250 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013251#include <assert.h>
13252/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013253#ifdef __cplusplus
13254extern "C"
13255#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013256/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013257 builtin and then its argument prototype would still apply. */
13258char $ac_func ();
13259char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013260
Barry Warsawfe33b792003-01-07 22:42:49 +000013261#ifdef F77_DUMMY_MAIN
13262# ifdef __cplusplus
13263 extern "C"
13264# endif
13265 int F77_DUMMY_MAIN() { return 1; }
13266#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013267int
13268main ()
13269{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013270/* The GNU C library defines this for functions which it implements
13271 to always fail with ENOSYS. Some functions are actually named
13272 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013273#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013274choke me
13275#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013276f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013277#endif
13278
Martin v. Löwis11437992002-04-12 09:54:03 +000013279 ;
13280 return 0;
13281}
13282_ACEOF
13283rm -f conftest.$ac_objext conftest$ac_exeext
13284if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13285 (eval $ac_link) 2>&5
13286 ac_status=$?
13287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13288 (exit $ac_status); } &&
13289 { ac_try='test -s conftest$ac_exeext'
13290 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13291 (eval $ac_try) 2>&5
13292 ac_status=$?
13293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13294 (exit $ac_status); }; }; then
13295 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013296else
Martin v. Löwis11437992002-04-12 09:54:03 +000013297 echo "$as_me: failed program was:" >&5
13298cat conftest.$ac_ext >&5
13299eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013300fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013301rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013302fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013303echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13304echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13305if test `eval echo '${'$as_ac_var'}'` = yes; then
13306 cat >>confdefs.h <<_ACEOF
13307#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13308_ACEOF
13309 cat >conftest.$ac_ext <<_ACEOF
13310#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013311#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013312#include <sys/time.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000013313#ifdef F77_DUMMY_MAIN
13314# ifdef __cplusplus
13315 extern "C"
13316# endif
13317 int F77_DUMMY_MAIN() { return 1; }
13318#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013319int
13320main ()
13321{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013322gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013323 ;
13324 return 0;
13325}
13326_ACEOF
13327rm -f conftest.$ac_objext
13328if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13329 (eval $ac_compile) 2>&5
13330 ac_status=$?
13331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13332 (exit $ac_status); } &&
13333 { ac_try='test -s conftest.$ac_objext'
13334 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13335 (eval $ac_try) 2>&5
13336 ac_status=$?
13337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13338 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013339 :
13340else
Martin v. Löwis11437992002-04-12 09:54:03 +000013341 echo "$as_me: failed program was:" >&5
13342cat conftest.$ac_ext >&5
13343
13344cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013345#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013346_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013347
Martin v. Löwis11437992002-04-12 09:54:03 +000013348
Guido van Rossum627b2d71993-12-24 10:39:16 +000013349fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013350rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013351
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013352fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013353done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013354
Michael W. Hudson54241132001-12-07 15:38:26 +000013355
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013356echo "$as_me:$LINENO: checking for major" >&5
13357echo $ECHO_N "checking for major... $ECHO_C" >&6
13358cat >conftest.$ac_ext <<_ACEOF
13359#line $LINENO "configure"
13360#include "confdefs.h"
13361
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013362#if defined(MAJOR_IN_MKDEV)
13363#include <sys/mkdev.h>
13364#elif defined(MAJOR_IN_SYSMACROS)
13365#include <sys/sysmacros.h>
13366#else
13367#include <sys/types.h>
13368#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013369
Barry Warsawfe33b792003-01-07 22:42:49 +000013370#ifdef F77_DUMMY_MAIN
13371# ifdef __cplusplus
13372 extern "C"
13373# endif
13374 int F77_DUMMY_MAIN() { return 1; }
13375#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013376int
13377main ()
13378{
13379
13380 makedev(major(0),minor(0));
13381
13382 ;
13383 return 0;
13384}
13385_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000013386rm -f conftest.$ac_objext conftest$ac_exeext
13387if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13388 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013389 ac_status=$?
13390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13391 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000013392 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013393 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13394 (eval $ac_try) 2>&5
13395 ac_status=$?
13396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13397 (exit $ac_status); }; }; then
13398
13399
13400cat >>confdefs.h <<\_ACEOF
13401#define HAVE_DEVICE_MACROS 1
13402_ACEOF
13403
13404 echo "$as_me:$LINENO: result: yes" >&5
13405echo "${ECHO_T}yes" >&6
13406
13407else
13408 echo "$as_me: failed program was:" >&5
13409cat conftest.$ac_ext >&5
13410
13411 echo "$as_me:$LINENO: result: no" >&5
13412echo "${ECHO_T}no" >&6
13413
13414fi
Martin v. Löwise3271202002-11-07 07:42:30 +000013415rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013416
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013417# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013418# for [no]getaddrinfo in netdb.h.
13419echo "$as_me:$LINENO: checking for getaddrinfo" >&5
13420echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
13421cat >conftest.$ac_ext <<_ACEOF
13422#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013423#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013424
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013425#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013426#include <sys/socket.h>
13427#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013428#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013429
Barry Warsawfe33b792003-01-07 22:42:49 +000013430#ifdef F77_DUMMY_MAIN
13431# ifdef __cplusplus
13432 extern "C"
13433# endif
13434 int F77_DUMMY_MAIN() { return 1; }
13435#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013436int
13437main ()
13438{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013439
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013440getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013441
Martin v. Löwis11437992002-04-12 09:54:03 +000013442 ;
13443 return 0;
13444}
13445_ACEOF
13446rm -f conftest.$ac_objext conftest$ac_exeext
13447if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13448 (eval $ac_link) 2>&5
13449 ac_status=$?
13450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13451 (exit $ac_status); } &&
13452 { ac_try='test -s conftest$ac_exeext'
13453 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13454 (eval $ac_try) 2>&5
13455 ac_status=$?
13456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13457 (exit $ac_status); }; }; then
13458
13459echo "$as_me:$LINENO: result: yes" >&5
13460echo "${ECHO_T}yes" >&6
13461echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
13462echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013463if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013464 echo "$as_me:$LINENO: result: buggy" >&5
13465echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013466buggygetaddrinfo=yes
13467else
Martin v. Löwis11437992002-04-12 09:54:03 +000013468 cat >conftest.$ac_ext <<_ACEOF
13469#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013470#include "confdefs.h"
13471
13472#include <sys/types.h>
13473#include <netdb.h>
13474#include <string.h>
13475#include <sys/socket.h>
13476#include <netinet/in.h>
13477
13478main()
13479{
13480 int passive, gaierr, inet4 = 0, inet6 = 0;
13481 struct addrinfo hints, *ai, *aitop;
13482 char straddr[INET6_ADDRSTRLEN], strport[16];
13483
13484 for (passive = 0; passive <= 1; passive++) {
13485 memset(&hints, 0, sizeof(hints));
13486 hints.ai_family = AF_UNSPEC;
13487 hints.ai_flags = passive ? AI_PASSIVE : 0;
13488 hints.ai_socktype = SOCK_STREAM;
13489 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13490 (void)gai_strerror(gaierr);
13491 goto bad;
13492 }
13493 for (ai = aitop; ai; ai = ai->ai_next) {
13494 if (ai->ai_addr == NULL ||
13495 ai->ai_addrlen == 0 ||
13496 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13497 straddr, sizeof(straddr), strport, sizeof(strport),
13498 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13499 goto bad;
13500 }
13501 switch (ai->ai_family) {
13502 case AF_INET:
13503 if (strcmp(strport, "54321") != 0) {
13504 goto bad;
13505 }
13506 if (passive) {
13507 if (strcmp(straddr, "0.0.0.0") != 0) {
13508 goto bad;
13509 }
13510 } else {
13511 if (strcmp(straddr, "127.0.0.1") != 0) {
13512 goto bad;
13513 }
13514 }
13515 inet4++;
13516 break;
13517 case AF_INET6:
13518 if (strcmp(strport, "54321") != 0) {
13519 goto bad;
13520 }
13521 if (passive) {
13522 if (strcmp(straddr, "::") != 0) {
13523 goto bad;
13524 }
13525 } else {
13526 if (strcmp(straddr, "::1") != 0) {
13527 goto bad;
13528 }
13529 }
13530 inet6++;
13531 break;
13532 case AF_UNSPEC:
13533 goto bad;
13534 break;
13535 default:
13536 /* another family support? */
13537 break;
13538 }
13539 }
13540 }
13541
13542 if (!(inet4 == 0 || inet4 == 2))
13543 goto bad;
13544 if (!(inet6 == 0 || inet6 == 2))
13545 goto bad;
13546
13547 if (aitop)
13548 freeaddrinfo(aitop);
13549 exit(0);
13550
13551 bad:
13552 if (aitop)
13553 freeaddrinfo(aitop);
13554 exit(1);
13555}
13556
Martin v. Löwis11437992002-04-12 09:54:03 +000013557_ACEOF
13558rm -f conftest$ac_exeext
13559if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13560 (eval $ac_link) 2>&5
13561 ac_status=$?
13562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13563 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13565 (eval $ac_try) 2>&5
13566 ac_status=$?
13567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13568 (exit $ac_status); }; }; then
13569 echo "$as_me:$LINENO: result: good" >&5
13570echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013571buggygetaddrinfo=no
13572else
Martin v. Löwis11437992002-04-12 09:54:03 +000013573 echo "$as_me: program exited with status $ac_status" >&5
13574echo "$as_me: failed program was:" >&5
13575cat conftest.$ac_ext >&5
13576( exit $ac_status )
13577echo "$as_me:$LINENO: result: buggy" >&5
13578echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013579buggygetaddrinfo=yes
13580fi
Barry Warsawfe33b792003-01-07 22:42:49 +000013581rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013582fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013583else
Martin v. Löwis11437992002-04-12 09:54:03 +000013584 echo "$as_me: failed program was:" >&5
13585cat conftest.$ac_ext >&5
13586
13587echo "$as_me:$LINENO: result: no" >&5
13588echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013589buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013590
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013591fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013592rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013593
13594if test "$buggygetaddrinfo" = "yes"; then
13595 if test "$ipv6" = "yes"; then
13596 echo 'Fatal: You must get working getaddrinfo() function.'
13597 echo ' or you can specify "--disable-ipv6"'.
13598 exit 1
13599 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013600else
Martin v. Löwis11437992002-04-12 09:54:03 +000013601
13602cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013603#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013604_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013605
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013606fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013607
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013608for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013609do
Martin v. Löwis11437992002-04-12 09:54:03 +000013610as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13611echo "$as_me:$LINENO: checking for $ac_func" >&5
13612echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13613if eval "test \"\${$as_ac_var+set}\" = set"; then
13614 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013615else
Martin v. Löwis11437992002-04-12 09:54:03 +000013616 cat >conftest.$ac_ext <<_ACEOF
13617#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013618#include "confdefs.h"
13619/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013620 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013621#include <assert.h>
13622/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013623#ifdef __cplusplus
13624extern "C"
13625#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013626/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013627 builtin and then its argument prototype would still apply. */
13628char $ac_func ();
13629char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013630
Barry Warsawfe33b792003-01-07 22:42:49 +000013631#ifdef F77_DUMMY_MAIN
13632# ifdef __cplusplus
13633 extern "C"
13634# endif
13635 int F77_DUMMY_MAIN() { return 1; }
13636#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013637int
13638main ()
13639{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013640/* The GNU C library defines this for functions which it implements
13641 to always fail with ENOSYS. Some functions are actually named
13642 something starting with __ and the normal name is an alias. */
13643#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13644choke me
13645#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013646f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013647#endif
13648
Martin v. Löwis11437992002-04-12 09:54:03 +000013649 ;
13650 return 0;
13651}
13652_ACEOF
13653rm -f conftest.$ac_objext conftest$ac_exeext
13654if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13655 (eval $ac_link) 2>&5
13656 ac_status=$?
13657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13658 (exit $ac_status); } &&
13659 { ac_try='test -s conftest$ac_exeext'
13660 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13661 (eval $ac_try) 2>&5
13662 ac_status=$?
13663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13664 (exit $ac_status); }; }; then
13665 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013666else
Martin v. Löwis11437992002-04-12 09:54:03 +000013667 echo "$as_me: failed program was:" >&5
13668cat conftest.$ac_ext >&5
13669eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013670fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013671rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013672fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013673echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13674echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13675if test `eval echo '${'$as_ac_var'}'` = yes; then
13676 cat >>confdefs.h <<_ACEOF
13677#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13678_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013679
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013680fi
13681done
13682
Michael W. Hudson54241132001-12-07 15:38:26 +000013683
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013684# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000013685echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
13686echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13687if test "${ac_cv_header_time+set}" = set; then
13688 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013689else
Martin v. Löwis11437992002-04-12 09:54:03 +000013690 cat >conftest.$ac_ext <<_ACEOF
13691#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013692#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013693#include <sys/types.h>
13694#include <sys/time.h>
13695#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013696
Barry Warsawfe33b792003-01-07 22:42:49 +000013697#ifdef F77_DUMMY_MAIN
13698# ifdef __cplusplus
13699 extern "C"
13700# endif
13701 int F77_DUMMY_MAIN() { return 1; }
13702#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013703int
13704main ()
13705{
13706if ((struct tm *) 0)
13707return 0;
13708 ;
13709 return 0;
13710}
13711_ACEOF
13712rm -f conftest.$ac_objext
13713if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13714 (eval $ac_compile) 2>&5
13715 ac_status=$?
13716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13717 (exit $ac_status); } &&
13718 { ac_try='test -s conftest.$ac_objext'
13719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13720 (eval $ac_try) 2>&5
13721 ac_status=$?
13722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13723 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013724 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013725else
Martin v. Löwis11437992002-04-12 09:54:03 +000013726 echo "$as_me: failed program was:" >&5
13727cat conftest.$ac_ext >&5
13728ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013729fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013730rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013731fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013732echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
13733echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013734if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013735
13736cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013737#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013738_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013739
13740fi
13741
Martin v. Löwis11437992002-04-12 09:54:03 +000013742echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
13743echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
13744if test "${ac_cv_struct_tm+set}" = set; then
13745 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013746else
Martin v. Löwis11437992002-04-12 09:54:03 +000013747 cat >conftest.$ac_ext <<_ACEOF
13748#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013749#include "confdefs.h"
13750#include <sys/types.h>
13751#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013752
Barry Warsawfe33b792003-01-07 22:42:49 +000013753#ifdef F77_DUMMY_MAIN
13754# ifdef __cplusplus
13755 extern "C"
13756# endif
13757 int F77_DUMMY_MAIN() { return 1; }
13758#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013759int
13760main ()
13761{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013762struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000013763 ;
13764 return 0;
13765}
13766_ACEOF
13767rm -f conftest.$ac_objext
13768if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13769 (eval $ac_compile) 2>&5
13770 ac_status=$?
13771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13772 (exit $ac_status); } &&
13773 { ac_try='test -s conftest.$ac_objext'
13774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13775 (eval $ac_try) 2>&5
13776 ac_status=$?
13777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13778 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013779 ac_cv_struct_tm=time.h
13780else
Martin v. Löwis11437992002-04-12 09:54:03 +000013781 echo "$as_me: failed program was:" >&5
13782cat conftest.$ac_ext >&5
13783ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013784fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013785rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013786fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013787echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
13788echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013789if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013790
13791cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013792#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013793_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013794
13795fi
13796
Martin v. Löwis11437992002-04-12 09:54:03 +000013797echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
13798echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
13799if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
13800 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013801else
Martin v. Löwis11437992002-04-12 09:54:03 +000013802 cat >conftest.$ac_ext <<_ACEOF
13803#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013804#include "confdefs.h"
13805#include <sys/types.h>
13806#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013807
13808
Barry Warsawfe33b792003-01-07 22:42:49 +000013809#ifdef F77_DUMMY_MAIN
13810# ifdef __cplusplus
13811 extern "C"
13812# endif
13813 int F77_DUMMY_MAIN() { return 1; }
13814#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013815int
13816main ()
13817{
13818static struct tm ac_aggr;
13819if (ac_aggr.tm_zone)
13820return 0;
13821 ;
13822 return 0;
13823}
13824_ACEOF
13825rm -f conftest.$ac_objext
13826if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13827 (eval $ac_compile) 2>&5
13828 ac_status=$?
13829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13830 (exit $ac_status); } &&
13831 { ac_try='test -s conftest.$ac_objext'
13832 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13833 (eval $ac_try) 2>&5
13834 ac_status=$?
13835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13836 (exit $ac_status); }; }; then
13837 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013838else
Martin v. Löwis11437992002-04-12 09:54:03 +000013839 echo "$as_me: failed program was:" >&5
13840cat conftest.$ac_ext >&5
13841ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013842fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013843rm -f conftest.$ac_objext conftest.$ac_ext
13844fi
13845echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
13846echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
13847if test $ac_cv_member_struct_tm_tm_zone = yes; then
13848
13849cat >>confdefs.h <<_ACEOF
13850#define HAVE_STRUCT_TM_TM_ZONE 1
13851_ACEOF
13852
13853
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013854fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013855
Martin v. Löwis11437992002-04-12 09:54:03 +000013856if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13857
13858cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013859#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013860_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013861
13862else
Martin v. Löwis11437992002-04-12 09:54:03 +000013863 echo "$as_me:$LINENO: checking for tzname" >&5
13864echo $ECHO_N "checking for tzname... $ECHO_C" >&6
13865if test "${ac_cv_var_tzname+set}" = set; then
13866 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013867else
Martin v. Löwis11437992002-04-12 09:54:03 +000013868 cat >conftest.$ac_ext <<_ACEOF
13869#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013870#include "confdefs.h"
13871#include <time.h>
13872#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013873extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013874#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013875
Barry Warsawfe33b792003-01-07 22:42:49 +000013876#ifdef F77_DUMMY_MAIN
13877# ifdef __cplusplus
13878 extern "C"
13879# endif
13880 int F77_DUMMY_MAIN() { return 1; }
13881#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013882int
13883main ()
13884{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013885atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000013886 ;
13887 return 0;
13888}
13889_ACEOF
13890rm -f conftest.$ac_objext conftest$ac_exeext
13891if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13892 (eval $ac_link) 2>&5
13893 ac_status=$?
13894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13895 (exit $ac_status); } &&
13896 { ac_try='test -s conftest$ac_exeext'
13897 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13898 (eval $ac_try) 2>&5
13899 ac_status=$?
13900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13901 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013902 ac_cv_var_tzname=yes
13903else
Martin v. Löwis11437992002-04-12 09:54:03 +000013904 echo "$as_me: failed program was:" >&5
13905cat conftest.$ac_ext >&5
13906ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013907fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013908rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013909fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013910echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
13911echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013912 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013913
13914cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013915#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013916_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013917
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013918 fi
13919fi
13920
Martin v. Löwis11437992002-04-12 09:54:03 +000013921echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
13922echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
13923if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
13924 echo $ECHO_N "(cached) $ECHO_C" >&6
13925else
13926 cat >conftest.$ac_ext <<_ACEOF
13927#line $LINENO "configure"
13928#include "confdefs.h"
13929$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000013930#ifdef F77_DUMMY_MAIN
13931# ifdef __cplusplus
13932 extern "C"
13933# endif
13934 int F77_DUMMY_MAIN() { return 1; }
13935#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013936int
13937main ()
13938{
13939static struct stat ac_aggr;
13940if (ac_aggr.st_rdev)
13941return 0;
13942 ;
13943 return 0;
13944}
13945_ACEOF
13946rm -f conftest.$ac_objext
13947if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13948 (eval $ac_compile) 2>&5
13949 ac_status=$?
13950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13951 (exit $ac_status); } &&
13952 { ac_try='test -s conftest.$ac_objext'
13953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13954 (eval $ac_try) 2>&5
13955 ac_status=$?
13956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13957 (exit $ac_status); }; }; then
13958 ac_cv_member_struct_stat_st_rdev=yes
13959else
13960 echo "$as_me: failed program was:" >&5
13961cat conftest.$ac_ext >&5
13962ac_cv_member_struct_stat_st_rdev=no
13963fi
13964rm -f conftest.$ac_objext conftest.$ac_ext
13965fi
13966echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
13967echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
13968if test $ac_cv_member_struct_stat_st_rdev = yes; then
13969
13970cat >>confdefs.h <<_ACEOF
13971#define HAVE_STRUCT_STAT_ST_RDEV 1
13972_ACEOF
13973
13974
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013975fi
13976
Martin v. Löwis11437992002-04-12 09:54:03 +000013977echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
13978echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
13979if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
13980 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013981else
Martin v. Löwis11437992002-04-12 09:54:03 +000013982 cat >conftest.$ac_ext <<_ACEOF
13983#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013984#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013985$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000013986#ifdef F77_DUMMY_MAIN
13987# ifdef __cplusplus
13988 extern "C"
13989# endif
13990 int F77_DUMMY_MAIN() { return 1; }
13991#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013992int
13993main ()
13994{
13995static struct stat ac_aggr;
13996if (ac_aggr.st_blksize)
13997return 0;
13998 ;
13999 return 0;
14000}
14001_ACEOF
14002rm -f conftest.$ac_objext
14003if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14004 (eval $ac_compile) 2>&5
14005 ac_status=$?
14006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14007 (exit $ac_status); } &&
14008 { ac_try='test -s conftest.$ac_objext'
14009 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14010 (eval $ac_try) 2>&5
14011 ac_status=$?
14012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14013 (exit $ac_status); }; }; then
14014 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014015else
Martin v. Löwis11437992002-04-12 09:54:03 +000014016 echo "$as_me: failed program was:" >&5
14017cat conftest.$ac_ext >&5
14018ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014019fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014020rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014021fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014022echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
14023echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
14024if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014025
Martin v. Löwis11437992002-04-12 09:54:03 +000014026cat >>confdefs.h <<_ACEOF
14027#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
14028_ACEOF
14029
14030
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014031fi
14032
Martin v. Löwis11437992002-04-12 09:54:03 +000014033echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
14034echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
14035if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
14036 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014037else
Martin v. Löwis11437992002-04-12 09:54:03 +000014038 cat >conftest.$ac_ext <<_ACEOF
14039#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014040#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014041$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014042#ifdef F77_DUMMY_MAIN
14043# ifdef __cplusplus
14044 extern "C"
14045# endif
14046 int F77_DUMMY_MAIN() { return 1; }
14047#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014048int
14049main ()
14050{
14051static struct stat ac_aggr;
14052if (ac_aggr.st_blocks)
14053return 0;
14054 ;
14055 return 0;
14056}
14057_ACEOF
14058rm -f conftest.$ac_objext
14059if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14060 (eval $ac_compile) 2>&5
14061 ac_status=$?
14062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14063 (exit $ac_status); } &&
14064 { ac_try='test -s conftest.$ac_objext'
14065 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14066 (eval $ac_try) 2>&5
14067 ac_status=$?
14068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14069 (exit $ac_status); }; }; then
14070 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014071else
Martin v. Löwis11437992002-04-12 09:54:03 +000014072 echo "$as_me: failed program was:" >&5
14073cat conftest.$ac_ext >&5
14074ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014075fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014076rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014077fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014078echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
14079echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
14080if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014081
Martin v. Löwis11437992002-04-12 09:54:03 +000014082cat >>confdefs.h <<_ACEOF
14083#define HAVE_STRUCT_STAT_ST_BLOCKS 1
14084_ACEOF
14085
14086
14087cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014088#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014089_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014090
14091else
Martin v. Löwis11437992002-04-12 09:54:03 +000014092 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014093fi
14094
Michael W. Hudson54241132001-12-07 15:38:26 +000014095
Martin v. Löwis11437992002-04-12 09:54:03 +000014096
14097echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
14098echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
14099if test "${ac_cv_header_time_altzone+set}" = set; then
14100 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014101else
Martin v. Löwis11437992002-04-12 09:54:03 +000014102 cat >conftest.$ac_ext <<_ACEOF
14103#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014104#include "confdefs.h"
14105#include <time.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014106#ifdef F77_DUMMY_MAIN
14107# ifdef __cplusplus
14108 extern "C"
14109# endif
14110 int F77_DUMMY_MAIN() { return 1; }
14111#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014112int
14113main ()
14114{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014115return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000014116 ;
14117 return 0;
14118}
14119_ACEOF
14120rm -f conftest.$ac_objext
14121if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14122 (eval $ac_compile) 2>&5
14123 ac_status=$?
14124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14125 (exit $ac_status); } &&
14126 { ac_try='test -s conftest.$ac_objext'
14127 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14128 (eval $ac_try) 2>&5
14129 ac_status=$?
14130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14131 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014132 ac_cv_header_time_altzone=yes
14133else
Martin v. Löwis11437992002-04-12 09:54:03 +000014134 echo "$as_me: failed program was:" >&5
14135cat conftest.$ac_ext >&5
14136ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000014137fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014138rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014139fi
14140
Martin v. Löwis11437992002-04-12 09:54:03 +000014141echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
14142echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014143if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014144
14145cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014146#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014147_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014148
14149fi
14150
Guido van Rossumda88dad1995-01-26 00:46:29 +000014151was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014152echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
14153echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
14154cat >conftest.$ac_ext <<_ACEOF
14155#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014156#include "confdefs.h"
14157
14158#include <sys/types.h>
14159#include <sys/select.h>
14160#include <sys/time.h>
14161
Barry Warsawfe33b792003-01-07 22:42:49 +000014162#ifdef F77_DUMMY_MAIN
14163# ifdef __cplusplus
14164 extern "C"
14165# endif
14166 int F77_DUMMY_MAIN() { return 1; }
14167#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014168int
14169main ()
14170{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014171;
Martin v. Löwis11437992002-04-12 09:54:03 +000014172 ;
14173 return 0;
14174}
14175_ACEOF
14176rm -f conftest.$ac_objext
14177if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14178 (eval $ac_compile) 2>&5
14179 ac_status=$?
14180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14181 (exit $ac_status); } &&
14182 { ac_try='test -s conftest.$ac_objext'
14183 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14184 (eval $ac_try) 2>&5
14185 ac_status=$?
14186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14187 (exit $ac_status); }; }; then
14188
14189
14190cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014191#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014192_ACEOF
14193
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014194 was_it_defined=yes
14195
Guido van Rossumf78abae1997-01-21 22:02:36 +000014196else
Martin v. Löwis11437992002-04-12 09:54:03 +000014197 echo "$as_me: failed program was:" >&5
14198cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014199fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014200rm -f conftest.$ac_objext conftest.$ac_ext
14201echo "$as_me:$LINENO: result: $was_it_defined" >&5
14202echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000014203
Martin v. Löwis11437992002-04-12 09:54:03 +000014204echo "$as_me:$LINENO: checking for addrinfo" >&5
14205echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
14206if test "${ac_cv_struct_addrinfo+set}" = set; then
14207 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014208else
Martin v. Löwis11437992002-04-12 09:54:03 +000014209 cat >conftest.$ac_ext <<_ACEOF
14210#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014211#include "confdefs.h"
14212
14213# include <netdb.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014214#ifdef F77_DUMMY_MAIN
14215# ifdef __cplusplus
14216 extern "C"
14217# endif
14218 int F77_DUMMY_MAIN() { return 1; }
14219#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014220int
14221main ()
14222{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014223struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000014224 ;
14225 return 0;
14226}
14227_ACEOF
14228rm -f conftest.$ac_objext
14229if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14230 (eval $ac_compile) 2>&5
14231 ac_status=$?
14232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14233 (exit $ac_status); } &&
14234 { ac_try='test -s conftest.$ac_objext'
14235 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14236 (eval $ac_try) 2>&5
14237 ac_status=$?
14238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14239 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014240 ac_cv_struct_addrinfo=yes
14241else
Martin v. Löwis11437992002-04-12 09:54:03 +000014242 echo "$as_me: failed program was:" >&5
14243cat conftest.$ac_ext >&5
14244ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014245fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014246rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014247fi
14248
Martin v. Löwis11437992002-04-12 09:54:03 +000014249echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
14250echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014251if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014252
14253cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014254#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014255_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014256
14257fi
14258
Martin v. Löwis11437992002-04-12 09:54:03 +000014259echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
14260echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
14261if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
14262 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014263else
Martin v. Löwis11437992002-04-12 09:54:03 +000014264 cat >conftest.$ac_ext <<_ACEOF
14265#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014266#include "confdefs.h"
14267
14268# include <sys/types.h>
14269# include <sys/socket.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014270#ifdef F77_DUMMY_MAIN
14271# ifdef __cplusplus
14272 extern "C"
14273# endif
14274 int F77_DUMMY_MAIN() { return 1; }
14275#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014276int
14277main ()
14278{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014279struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000014280 ;
14281 return 0;
14282}
14283_ACEOF
14284rm -f conftest.$ac_objext
14285if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14286 (eval $ac_compile) 2>&5
14287 ac_status=$?
14288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14289 (exit $ac_status); } &&
14290 { ac_try='test -s conftest.$ac_objext'
14291 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14292 (eval $ac_try) 2>&5
14293 ac_status=$?
14294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14295 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014296 ac_cv_struct_sockaddr_storage=yes
14297else
Martin v. Löwis11437992002-04-12 09:54:03 +000014298 echo "$as_me: failed program was:" >&5
14299cat conftest.$ac_ext >&5
14300ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014301fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014302rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014303fi
14304
Martin v. Löwis11437992002-04-12 09:54:03 +000014305echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
14306echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014307if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014308
14309cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014310#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014311_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014312
14313fi
14314
Guido van Rossum627b2d71993-12-24 10:39:16 +000014315# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000014316
Michael W. Hudson54241132001-12-07 15:38:26 +000014317
Martin v. Löwis11437992002-04-12 09:54:03 +000014318echo "$as_me:$LINENO: checking whether char is unsigned" >&5
14319echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
14320if test "${ac_cv_c_char_unsigned+set}" = set; then
14321 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000014322else
Martin v. Löwis11437992002-04-12 09:54:03 +000014323 cat >conftest.$ac_ext <<_ACEOF
14324#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000014325#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014326$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014327#ifdef F77_DUMMY_MAIN
14328# ifdef __cplusplus
14329 extern "C"
14330# endif
14331 int F77_DUMMY_MAIN() { return 1; }
14332#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014333int
14334main ()
14335{
14336static int test_array [1 - 2 * !(((char) -1) < 0)];
14337test_array [0] = 0
14338
14339 ;
14340 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000014341}
Martin v. Löwis11437992002-04-12 09:54:03 +000014342_ACEOF
14343rm -f conftest.$ac_objext
14344if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14345 (eval $ac_compile) 2>&5
14346 ac_status=$?
14347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14348 (exit $ac_status); } &&
14349 { ac_try='test -s conftest.$ac_objext'
14350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14351 (eval $ac_try) 2>&5
14352 ac_status=$?
14353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14354 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000014355 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014356else
14357 echo "$as_me: failed program was:" >&5
14358cat conftest.$ac_ext >&5
14359ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014360fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014361rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014362fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014363echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
14364echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014365if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014366 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014367#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014368_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014369
14370fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000014371
Barry Warsawfe33b792003-01-07 22:42:49 +000014372echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
14373echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
14374if test "${ac_cv_prog_cc_stdc+set}" = set; then
14375 echo $ECHO_N "(cached) $ECHO_C" >&6
14376else
14377 ac_cv_prog_cc_stdc=no
14378ac_save_CC=$CC
14379cat >conftest.$ac_ext <<_ACEOF
14380#line $LINENO "configure"
14381#include "confdefs.h"
14382#include <stdarg.h>
14383#include <stdio.h>
14384#include <sys/types.h>
14385#include <sys/stat.h>
14386/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
14387struct buf { int x; };
14388FILE * (*rcsopen) (struct buf *, struct stat *, int);
14389static char *e (p, i)
14390 char **p;
14391 int i;
14392{
14393 return p[i];
14394}
14395static char *f (char * (*g) (char **, int), char **p, ...)
14396{
14397 char *s;
14398 va_list v;
14399 va_start (v,p);
14400 s = g (p, va_arg (v,int));
14401 va_end (v);
14402 return s;
14403}
14404int test (int i, double x);
14405struct s1 {int (*f) (int a);};
14406struct s2 {int (*f) (double a);};
14407int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
14408int argc;
14409char **argv;
14410#ifdef F77_DUMMY_MAIN
14411# ifdef __cplusplus
14412 extern "C"
14413# endif
14414 int F77_DUMMY_MAIN() { return 1; }
14415#endif
14416int
14417main ()
14418{
14419return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
14420 ;
14421 return 0;
14422}
14423_ACEOF
14424# Don't try gcc -ansi; that turns off useful extensions and
14425# breaks some systems' header files.
14426# AIX -qlanglvl=ansi
14427# Ultrix and OSF/1 -std1
14428# HP-UX 10.20 and later -Ae
14429# HP-UX older versions -Aa -D_HPUX_SOURCE
14430# SVR4 -Xc -D__EXTENSIONS__
14431for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
14432do
14433 CC="$ac_save_CC $ac_arg"
14434 rm -f conftest.$ac_objext
14435if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14436 (eval $ac_compile) 2>&5
14437 ac_status=$?
14438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14439 (exit $ac_status); } &&
14440 { ac_try='test -s conftest.$ac_objext'
14441 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14442 (eval $ac_try) 2>&5
14443 ac_status=$?
14444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14445 (exit $ac_status); }; }; then
14446 ac_cv_prog_cc_stdc=$ac_arg
14447break
14448else
14449 echo "$as_me: failed program was:" >&5
14450cat conftest.$ac_ext >&5
14451fi
14452rm -f conftest.$ac_objext
14453done
14454rm -f conftest.$ac_ext conftest.$ac_objext
14455CC=$ac_save_CC
14456
14457fi
14458
14459case "x$ac_cv_prog_cc_stdc" in
14460 x|xno)
14461 echo "$as_me:$LINENO: result: none needed" >&5
14462echo "${ECHO_T}none needed" >&6 ;;
14463 *)
14464 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
14465echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
14466 CC="$CC $ac_cv_prog_cc_stdc" ;;
14467esac
14468
Martin v. Löwis11437992002-04-12 09:54:03 +000014469echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
14470echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14471if test "${ac_cv_c_const+set}" = set; then
14472 echo $ECHO_N "(cached) $ECHO_C" >&6
14473else
14474 cat >conftest.$ac_ext <<_ACEOF
14475#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014476#include "confdefs.h"
14477
Barry Warsawfe33b792003-01-07 22:42:49 +000014478#ifdef F77_DUMMY_MAIN
14479# ifdef __cplusplus
14480 extern "C"
14481# endif
14482 int F77_DUMMY_MAIN() { return 1; }
14483#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014484int
14485main ()
14486{
14487/* FIXME: Include the comments suggested by Paul. */
14488#ifndef __cplusplus
14489 /* Ultrix mips cc rejects this. */
14490 typedef int charset[2];
14491 const charset x;
14492 /* SunOS 4.1.1 cc rejects this. */
14493 char const *const *ccp;
14494 char **p;
14495 /* NEC SVR4.0.2 mips cc rejects this. */
14496 struct point {int x, y;};
14497 static struct point const zero = {0,0};
14498 /* AIX XL C 1.02.0.0 rejects this.
14499 It does not let you subtract one const X* pointer from another in
14500 an arm of an if-expression whose if-part is not a constant
14501 expression */
14502 const char *g = "string";
14503 ccp = &g + (g ? g-g : 0);
14504 /* HPUX 7.0 cc rejects these. */
14505 ++ccp;
14506 p = (char**) ccp;
14507 ccp = (char const *const *) p;
14508 { /* SCO 3.2v4 cc rejects this. */
14509 char *t;
14510 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014511
Martin v. Löwis11437992002-04-12 09:54:03 +000014512 *t++ = 0;
14513 }
14514 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
14515 int x[] = {25, 17};
14516 const int *foo = &x[0];
14517 ++foo;
14518 }
14519 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14520 typedef const int *iptr;
14521 iptr p = 0;
14522 ++p;
14523 }
14524 { /* AIX XL C 1.02.0.0 rejects this saying
14525 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14526 struct s { int j; const int *ap[3]; };
14527 struct s *b; b->j = 5;
14528 }
14529 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14530 const int foo = 10;
14531 }
14532#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000014533
Martin v. Löwis11437992002-04-12 09:54:03 +000014534 ;
14535 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000014536}
Martin v. Löwis11437992002-04-12 09:54:03 +000014537_ACEOF
14538rm -f conftest.$ac_objext
14539if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14540 (eval $ac_compile) 2>&5
14541 ac_status=$?
14542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14543 (exit $ac_status); } &&
14544 { ac_try='test -s conftest.$ac_objext'
14545 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14546 (eval $ac_try) 2>&5
14547 ac_status=$?
14548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14549 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014550 ac_cv_c_const=yes
14551else
Martin v. Löwis11437992002-04-12 09:54:03 +000014552 echo "$as_me: failed program was:" >&5
14553cat conftest.$ac_ext >&5
14554ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014555fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014556rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014557fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014558echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
14559echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014560if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014561
14562cat >>confdefs.h <<\_ACEOF
14563#define const
14564_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014565
14566fi
14567
Michael W. Hudson54241132001-12-07 15:38:26 +000014568
Guido van Rossumda88dad1995-01-26 00:46:29 +000014569works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014570echo "$as_me:$LINENO: checking for working volatile" >&5
14571echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
14572cat >conftest.$ac_ext <<_ACEOF
14573#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014574#include "confdefs.h"
14575
Barry Warsawfe33b792003-01-07 22:42:49 +000014576#ifdef F77_DUMMY_MAIN
14577# ifdef __cplusplus
14578 extern "C"
14579# endif
14580 int F77_DUMMY_MAIN() { return 1; }
14581#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014582int
14583main ()
14584{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014585volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014586 ;
14587 return 0;
14588}
14589_ACEOF
14590rm -f conftest.$ac_objext
14591if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14592 (eval $ac_compile) 2>&5
14593 ac_status=$?
14594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14595 (exit $ac_status); } &&
14596 { ac_try='test -s conftest.$ac_objext'
14597 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14598 (eval $ac_try) 2>&5
14599 ac_status=$?
14600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14601 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014602 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014603else
Martin v. Löwis11437992002-04-12 09:54:03 +000014604 echo "$as_me: failed program was:" >&5
14605cat conftest.$ac_ext >&5
14606
14607cat >>confdefs.h <<\_ACEOF
14608#define volatile
14609_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014610
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014611
Guido van Rossum627b2d71993-12-24 10:39:16 +000014612fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014613rm -f conftest.$ac_objext conftest.$ac_ext
14614echo "$as_me:$LINENO: result: $works" >&5
14615echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014616
Guido van Rossumda88dad1995-01-26 00:46:29 +000014617works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014618echo "$as_me:$LINENO: checking for working signed char" >&5
14619echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
14620cat >conftest.$ac_ext <<_ACEOF
14621#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014622#include "confdefs.h"
14623
Barry Warsawfe33b792003-01-07 22:42:49 +000014624#ifdef F77_DUMMY_MAIN
14625# ifdef __cplusplus
14626 extern "C"
14627# endif
14628 int F77_DUMMY_MAIN() { return 1; }
14629#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014630int
14631main ()
14632{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014633signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000014634 ;
14635 return 0;
14636}
14637_ACEOF
14638rm -f conftest.$ac_objext
14639if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14640 (eval $ac_compile) 2>&5
14641 ac_status=$?
14642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14643 (exit $ac_status); } &&
14644 { ac_try='test -s conftest.$ac_objext'
14645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14646 (eval $ac_try) 2>&5
14647 ac_status=$?
14648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14649 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014650 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014651else
Martin v. Löwis11437992002-04-12 09:54:03 +000014652 echo "$as_me: failed program was:" >&5
14653cat conftest.$ac_ext >&5
14654
14655cat >>confdefs.h <<\_ACEOF
14656#define signed
14657_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000014658
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014659
Guido van Rossum7f43da71994-08-01 12:15:30 +000014660fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014661rm -f conftest.$ac_objext conftest.$ac_ext
14662echo "$as_me:$LINENO: result: $works" >&5
14663echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014664
Guido van Rossumda88dad1995-01-26 00:46:29 +000014665have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014666echo "$as_me:$LINENO: checking for prototypes" >&5
14667echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
14668cat >conftest.$ac_ext <<_ACEOF
14669#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014670#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014671int foo(int x) { return 0; }
Barry Warsawfe33b792003-01-07 22:42:49 +000014672#ifdef F77_DUMMY_MAIN
14673# ifdef __cplusplus
14674 extern "C"
14675# endif
14676 int F77_DUMMY_MAIN() { return 1; }
14677#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014678int
14679main ()
14680{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014681return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000014682 ;
14683 return 0;
14684}
14685_ACEOF
14686rm -f conftest.$ac_objext
14687if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14688 (eval $ac_compile) 2>&5
14689 ac_status=$?
14690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14691 (exit $ac_status); } &&
14692 { ac_try='test -s conftest.$ac_objext'
14693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14694 (eval $ac_try) 2>&5
14695 ac_status=$?
14696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14697 (exit $ac_status); }; }; then
14698
14699
14700cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014701#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014702_ACEOF
14703
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014704 have_prototypes=yes
14705
Guido van Rossumf78abae1997-01-21 22:02:36 +000014706else
Martin v. Löwis11437992002-04-12 09:54:03 +000014707 echo "$as_me: failed program was:" >&5
14708cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014709fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014710rm -f conftest.$ac_objext conftest.$ac_ext
14711echo "$as_me:$LINENO: result: $have_prototypes" >&5
14712echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014713
Guido van Rossumda88dad1995-01-26 00:46:29 +000014714works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014715echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
14716echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
14717cat >conftest.$ac_ext <<_ACEOF
14718#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014719#include "confdefs.h"
14720
14721#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000014722int foo(int x, ...) {
14723 va_list va;
14724 va_start(va, x);
14725 va_arg(va, int);
14726 va_arg(va, char *);
14727 va_arg(va, double);
14728 return 0;
14729}
Guido van Rossum7f43da71994-08-01 12:15:30 +000014730
Barry Warsawfe33b792003-01-07 22:42:49 +000014731#ifdef F77_DUMMY_MAIN
14732# ifdef __cplusplus
14733 extern "C"
14734# endif
14735 int F77_DUMMY_MAIN() { return 1; }
14736#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014737int
14738main ()
14739{
Guido van Rossum90eea071996-08-30 20:58:57 +000014740return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000014741 ;
14742 return 0;
14743}
14744_ACEOF
14745rm -f conftest.$ac_objext
14746if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14747 (eval $ac_compile) 2>&5
14748 ac_status=$?
14749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14750 (exit $ac_status); } &&
14751 { ac_try='test -s conftest.$ac_objext'
14752 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14753 (eval $ac_try) 2>&5
14754 ac_status=$?
14755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14756 (exit $ac_status); }; }; then
14757
14758
14759cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014760#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014761_ACEOF
14762
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014763 works=yes
14764
Guido van Rossumf78abae1997-01-21 22:02:36 +000014765else
Martin v. Löwis11437992002-04-12 09:54:03 +000014766 echo "$as_me: failed program was:" >&5
14767cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000014768fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014769rm -f conftest.$ac_objext conftest.$ac_ext
14770echo "$as_me:$LINENO: result: $works" >&5
14771echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014772
Guido van Rossumda88dad1995-01-26 00:46:29 +000014773if test "$have_prototypes" = yes; then
14774bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014775echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
14776echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
14777cat >conftest.$ac_ext <<_ACEOF
14778#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014779#include "confdefs.h"
14780#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014781#ifdef F77_DUMMY_MAIN
14782# ifdef __cplusplus
14783 extern "C"
14784# endif
14785 int F77_DUMMY_MAIN() { return 1; }
14786#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014787int
14788main ()
14789{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014790char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000014791 ;
14792 return 0;
14793}
14794_ACEOF
14795rm -f conftest.$ac_objext
14796if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14797 (eval $ac_compile) 2>&5
14798 ac_status=$?
14799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14800 (exit $ac_status); } &&
14801 { ac_try='test -s conftest.$ac_objext'
14802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14803 (eval $ac_try) 2>&5
14804 ac_status=$?
14805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14806 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014807 :
14808else
Martin v. Löwis11437992002-04-12 09:54:03 +000014809 echo "$as_me: failed program was:" >&5
14810cat conftest.$ac_ext >&5
14811
14812cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014813#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014814_ACEOF
14815
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014816 bad_prototypes=yes
14817
Guido van Rossum627b2d71993-12-24 10:39:16 +000014818fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014819rm -f conftest.$ac_objext conftest.$ac_ext
14820echo "$as_me:$LINENO: result: $bad_prototypes" >&5
14821echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000014822fi
14823
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014824# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000014825echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
14826echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
14827cat >conftest.$ac_ext <<_ACEOF
14828#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014829#include "confdefs.h"
14830#include <sys/types.h>
14831#include <sys/socket.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014832#ifdef F77_DUMMY_MAIN
14833# ifdef __cplusplus
14834 extern "C"
14835# endif
14836 int F77_DUMMY_MAIN() { return 1; }
14837#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014838int
14839main ()
14840{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014841struct sockaddr x;
14842x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014843 ;
14844 return 0;
14845}
14846_ACEOF
14847rm -f conftest.$ac_objext
14848if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14849 (eval $ac_compile) 2>&5
14850 ac_status=$?
14851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14852 (exit $ac_status); } &&
14853 { ac_try='test -s conftest.$ac_objext'
14854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14855 (eval $ac_try) 2>&5
14856 ac_status=$?
14857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14858 (exit $ac_status); }; }; then
14859 echo "$as_me:$LINENO: result: yes" >&5
14860echo "${ECHO_T}yes" >&6
14861
14862cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014863#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014864_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014865
14866else
Martin v. Löwis11437992002-04-12 09:54:03 +000014867 echo "$as_me: failed program was:" >&5
14868cat conftest.$ac_ext >&5
14869echo "$as_me:$LINENO: result: no" >&5
14870echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014871fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014872rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014873
Guido van Rossumda88dad1995-01-26 00:46:29 +000014874va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014875echo "$as_me:$LINENO: checking whether va_list is an array" >&5
14876echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
14877cat >conftest.$ac_ext <<_ACEOF
14878#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014879#include "confdefs.h"
14880
14881#ifdef HAVE_STDARG_PROTOTYPES
14882#include <stdarg.h>
14883#else
14884#include <varargs.h>
14885#endif
14886
Barry Warsawfe33b792003-01-07 22:42:49 +000014887#ifdef F77_DUMMY_MAIN
14888# ifdef __cplusplus
14889 extern "C"
14890# endif
14891 int F77_DUMMY_MAIN() { return 1; }
14892#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014893int
14894main ()
14895{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014896va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000014897 ;
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
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014913 :
14914else
Martin v. Löwis11437992002-04-12 09:54:03 +000014915 echo "$as_me: failed program was:" >&5
14916cat conftest.$ac_ext >&5
14917
14918
14919cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014920#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014921_ACEOF
14922
Guido van Rossumda88dad1995-01-26 00:46:29 +000014923 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014924
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014925fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014926rm -f conftest.$ac_objext conftest.$ac_ext
14927echo "$as_me:$LINENO: result: $va_list_is_array" >&5
14928echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014929
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014930# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014931
14932
14933
14934echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
14935echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
14936if test "${ac_cv_func_gethostbyname_r+set}" = set; then
14937 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014938else
Martin v. Löwis11437992002-04-12 09:54:03 +000014939 cat >conftest.$ac_ext <<_ACEOF
14940#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014941#include "confdefs.h"
14942/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014943 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014944#include <assert.h>
14945/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014946#ifdef __cplusplus
14947extern "C"
14948#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014949/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014950 builtin and then its argument prototype would still apply. */
14951char gethostbyname_r ();
14952char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014953
Barry Warsawfe33b792003-01-07 22:42:49 +000014954#ifdef F77_DUMMY_MAIN
14955# ifdef __cplusplus
14956 extern "C"
14957# endif
14958 int F77_DUMMY_MAIN() { return 1; }
14959#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014960int
14961main ()
14962{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014963/* The GNU C library defines this for functions which it implements
14964 to always fail with ENOSYS. Some functions are actually named
14965 something starting with __ and the normal name is an alias. */
14966#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
14967choke me
14968#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014969f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014970#endif
14971
Martin v. Löwis11437992002-04-12 09:54:03 +000014972 ;
14973 return 0;
14974}
14975_ACEOF
14976rm -f conftest.$ac_objext conftest$ac_exeext
14977if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14978 (eval $ac_link) 2>&5
14979 ac_status=$?
14980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14981 (exit $ac_status); } &&
14982 { ac_try='test -s conftest$ac_exeext'
14983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14984 (eval $ac_try) 2>&5
14985 ac_status=$?
14986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14987 (exit $ac_status); }; }; then
14988 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014989else
Martin v. Löwis11437992002-04-12 09:54:03 +000014990 echo "$as_me: failed program was:" >&5
14991cat conftest.$ac_ext >&5
14992ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014993fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014994rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014995fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014996echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
14997echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
14998if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014999
Martin v. Löwis11437992002-04-12 09:54:03 +000015000 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015001#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015002_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015003
Martin v. Löwis11437992002-04-12 09:54:03 +000015004 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
15005echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015006 OLD_CFLAGS=$CFLAGS
15007 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015008 cat >conftest.$ac_ext <<_ACEOF
15009#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015010#include "confdefs.h"
15011
15012# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015013
Barry Warsawfe33b792003-01-07 22:42:49 +000015014#ifdef F77_DUMMY_MAIN
15015# ifdef __cplusplus
15016 extern "C"
15017# endif
15018 int F77_DUMMY_MAIN() { return 1; }
15019#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015020int
15021main ()
15022{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015023
15024 char *name;
15025 struct hostent *he, *res;
15026 char buffer[2048];
15027 int buflen = 2048;
15028 int h_errnop;
15029
15030 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015031
15032 ;
15033 return 0;
15034}
15035_ACEOF
15036rm -f conftest.$ac_objext
15037if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15038 (eval $ac_compile) 2>&5
15039 ac_status=$?
15040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15041 (exit $ac_status); } &&
15042 { ac_try='test -s conftest.$ac_objext'
15043 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15044 (eval $ac_try) 2>&5
15045 ac_status=$?
15046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15047 (exit $ac_status); }; }; then
15048
15049 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015050#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015051_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015052
Martin v. Löwis11437992002-04-12 09:54:03 +000015053
15054cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015055#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015056_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015057
Martin v. Löwis11437992002-04-12 09:54:03 +000015058 echo "$as_me:$LINENO: result: yes" >&5
15059echo "${ECHO_T}yes" >&6
15060
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015061else
Martin v. Löwis11437992002-04-12 09:54:03 +000015062 echo "$as_me: failed program was:" >&5
15063cat conftest.$ac_ext >&5
15064
15065 echo "$as_me:$LINENO: result: no" >&5
15066echo "${ECHO_T}no" >&6
15067 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
15068echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
15069 cat >conftest.$ac_ext <<_ACEOF
15070#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015071#include "confdefs.h"
15072
15073# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015074
Barry Warsawfe33b792003-01-07 22:42:49 +000015075#ifdef F77_DUMMY_MAIN
15076# ifdef __cplusplus
15077 extern "C"
15078# endif
15079 int F77_DUMMY_MAIN() { return 1; }
15080#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015081int
15082main ()
15083{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015084
15085 char *name;
15086 struct hostent *he;
15087 char buffer[2048];
15088 int buflen = 2048;
15089 int h_errnop;
15090
15091 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015092
15093 ;
15094 return 0;
15095}
15096_ACEOF
15097rm -f conftest.$ac_objext
15098if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15099 (eval $ac_compile) 2>&5
15100 ac_status=$?
15101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15102 (exit $ac_status); } &&
15103 { ac_try='test -s conftest.$ac_objext'
15104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15105 (eval $ac_try) 2>&5
15106 ac_status=$?
15107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15108 (exit $ac_status); }; }; then
15109
15110 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015111#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015112_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015113
Martin v. Löwis11437992002-04-12 09:54:03 +000015114
15115cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015116#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015117_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015118
Martin v. Löwis11437992002-04-12 09:54:03 +000015119 echo "$as_me:$LINENO: result: yes" >&5
15120echo "${ECHO_T}yes" >&6
15121
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015122else
Martin v. Löwis11437992002-04-12 09:54:03 +000015123 echo "$as_me: failed program was:" >&5
15124cat conftest.$ac_ext >&5
15125
15126 echo "$as_me:$LINENO: result: no" >&5
15127echo "${ECHO_T}no" >&6
15128 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
15129echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
15130 cat >conftest.$ac_ext <<_ACEOF
15131#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015132#include "confdefs.h"
15133
15134# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015135
Barry Warsawfe33b792003-01-07 22:42:49 +000015136#ifdef F77_DUMMY_MAIN
15137# ifdef __cplusplus
15138 extern "C"
15139# endif
15140 int F77_DUMMY_MAIN() { return 1; }
15141#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015142int
15143main ()
15144{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015145
15146 char *name;
15147 struct hostent *he;
15148 struct hostent_data data;
15149
15150 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000015151
15152 ;
15153 return 0;
15154}
15155_ACEOF
15156rm -f conftest.$ac_objext
15157if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15158 (eval $ac_compile) 2>&5
15159 ac_status=$?
15160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15161 (exit $ac_status); } &&
15162 { ac_try='test -s conftest.$ac_objext'
15163 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15164 (eval $ac_try) 2>&5
15165 ac_status=$?
15166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15167 (exit $ac_status); }; }; then
15168
15169 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015170#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015171_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015172
Martin v. Löwis11437992002-04-12 09:54:03 +000015173
15174cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015175#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015176_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015177
Martin v. Löwis11437992002-04-12 09:54:03 +000015178 echo "$as_me:$LINENO: result: yes" >&5
15179echo "${ECHO_T}yes" >&6
15180
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015181else
Martin v. Löwis11437992002-04-12 09:54:03 +000015182 echo "$as_me: failed program was:" >&5
15183cat conftest.$ac_ext >&5
15184
15185 echo "$as_me:$LINENO: result: no" >&5
15186echo "${ECHO_T}no" >&6
15187
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015188fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015189rm -f conftest.$ac_objext conftest.$ac_ext
15190
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015191fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015192rm -f conftest.$ac_objext conftest.$ac_ext
15193
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015194fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015195rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015196 CFLAGS=$OLD_CFLAGS
15197
15198else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015199
Martin v. Löwis11437992002-04-12 09:54:03 +000015200
15201for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000015202do
Martin v. Löwis11437992002-04-12 09:54:03 +000015203as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15204echo "$as_me:$LINENO: checking for $ac_func" >&5
15205echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15206if eval "test \"\${$as_ac_var+set}\" = set"; then
15207 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015208else
Martin v. Löwis11437992002-04-12 09:54:03 +000015209 cat >conftest.$ac_ext <<_ACEOF
15210#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015211#include "confdefs.h"
15212/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015213 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015214#include <assert.h>
15215/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015216#ifdef __cplusplus
15217extern "C"
15218#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015219/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015220 builtin and then its argument prototype would still apply. */
15221char $ac_func ();
15222char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015223
Barry Warsawfe33b792003-01-07 22:42:49 +000015224#ifdef F77_DUMMY_MAIN
15225# ifdef __cplusplus
15226 extern "C"
15227# endif
15228 int F77_DUMMY_MAIN() { return 1; }
15229#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015230int
15231main ()
15232{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015233/* The GNU C library defines this for functions which it implements
15234 to always fail with ENOSYS. Some functions are actually named
15235 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015236#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015237choke me
15238#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015239f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015240#endif
15241
Martin v. Löwis11437992002-04-12 09:54:03 +000015242 ;
15243 return 0;
15244}
15245_ACEOF
15246rm -f conftest.$ac_objext conftest$ac_exeext
15247if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15248 (eval $ac_link) 2>&5
15249 ac_status=$?
15250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15251 (exit $ac_status); } &&
15252 { ac_try='test -s conftest$ac_exeext'
15253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15254 (eval $ac_try) 2>&5
15255 ac_status=$?
15256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15257 (exit $ac_status); }; }; then
15258 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015259else
Martin v. Löwis11437992002-04-12 09:54:03 +000015260 echo "$as_me: failed program was:" >&5
15261cat conftest.$ac_ext >&5
15262eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015263fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015264rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015265fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015266echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15267echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15268if test `eval echo '${'$as_ac_var'}'` = yes; then
15269 cat >>confdefs.h <<_ACEOF
15270#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15271_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015272
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015273fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015274done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015275
Michael W. Hudson54241132001-12-07 15:38:26 +000015276
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015277fi
15278
Michael W. Hudson54241132001-12-07 15:38:26 +000015279
15280
15281
15282
15283
15284
Guido van Rossum627b2d71993-12-24 10:39:16 +000015285# checks for system services
15286# (none yet)
15287
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015288# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000015289echo "$as_me:$LINENO: checking for __fpu_control" >&5
15290echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
15291if test "${ac_cv_func___fpu_control+set}" = set; then
15292 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015293else
Martin v. Löwis11437992002-04-12 09:54:03 +000015294 cat >conftest.$ac_ext <<_ACEOF
15295#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015296#include "confdefs.h"
15297/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015298 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015299#include <assert.h>
15300/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015301#ifdef __cplusplus
15302extern "C"
15303#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015304/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015305 builtin and then its argument prototype would still apply. */
15306char __fpu_control ();
15307char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015308
Barry Warsawfe33b792003-01-07 22:42:49 +000015309#ifdef F77_DUMMY_MAIN
15310# ifdef __cplusplus
15311 extern "C"
15312# endif
15313 int F77_DUMMY_MAIN() { return 1; }
15314#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015315int
15316main ()
15317{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015318/* The GNU C library defines this for functions which it implements
15319 to always fail with ENOSYS. Some functions are actually named
15320 something starting with __ and the normal name is an alias. */
15321#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
15322choke me
15323#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015324f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015325#endif
15326
Martin v. Löwis11437992002-04-12 09:54:03 +000015327 ;
15328 return 0;
15329}
15330_ACEOF
15331rm -f conftest.$ac_objext conftest$ac_exeext
15332if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15333 (eval $ac_link) 2>&5
15334 ac_status=$?
15335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15336 (exit $ac_status); } &&
15337 { ac_try='test -s conftest$ac_exeext'
15338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15339 (eval $ac_try) 2>&5
15340 ac_status=$?
15341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15342 (exit $ac_status); }; }; then
15343 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015344else
Martin v. Löwis11437992002-04-12 09:54:03 +000015345 echo "$as_me: failed program was:" >&5
15346cat conftest.$ac_ext >&5
15347ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015348fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015349rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015350fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015351echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
15352echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
15353if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015354 :
15355else
Martin v. Löwis11437992002-04-12 09:54:03 +000015356
15357echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
15358echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
15359if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
15360 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015361else
Martin v. Löwis11437992002-04-12 09:54:03 +000015362 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015363LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015364cat >conftest.$ac_ext <<_ACEOF
15365#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015366#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015367
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015368/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015369#ifdef __cplusplus
15370extern "C"
15371#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015372/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015373 builtin and then its argument prototype would still apply. */
15374char __fpu_control ();
Barry Warsawfe33b792003-01-07 22:42:49 +000015375#ifdef F77_DUMMY_MAIN
15376# ifdef __cplusplus
15377 extern "C"
15378# endif
15379 int F77_DUMMY_MAIN() { return 1; }
15380#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015381int
15382main ()
15383{
15384__fpu_control ();
15385 ;
15386 return 0;
15387}
15388_ACEOF
15389rm -f conftest.$ac_objext conftest$ac_exeext
15390if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15391 (eval $ac_link) 2>&5
15392 ac_status=$?
15393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15394 (exit $ac_status); } &&
15395 { ac_try='test -s conftest$ac_exeext'
15396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15397 (eval $ac_try) 2>&5
15398 ac_status=$?
15399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15400 (exit $ac_status); }; }; then
15401 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015402else
Martin v. Löwis11437992002-04-12 09:54:03 +000015403 echo "$as_me: failed program was:" >&5
15404cat conftest.$ac_ext >&5
15405ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015406fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015407rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15408LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015409fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015410echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
15411echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
15412if test $ac_cv_lib_ieee___fpu_control = yes; then
15413 cat >>confdefs.h <<_ACEOF
15414#define HAVE_LIBIEEE 1
15415_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015416
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015417 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015418
Guido van Rossum627b2d71993-12-24 10:39:16 +000015419fi
15420
Michael W. Hudson54241132001-12-07 15:38:26 +000015421
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015422fi
15423
Michael W. Hudson54241132001-12-07 15:38:26 +000015424
Guido van Rossum7f253911997-05-09 02:42:48 +000015425# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000015426echo "$as_me:$LINENO: checking for --with-fpectl" >&5
15427echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
15428
Guido van Rossum7f253911997-05-09 02:42:48 +000015429# Check whether --with-fpectl or --without-fpectl was given.
15430if test "${with_fpectl+set}" = set; then
15431 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000015432
Guido van Rossum7f253911997-05-09 02:42:48 +000015433if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015434then
15435
15436cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000015437#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015438_ACEOF
15439
15440 echo "$as_me:$LINENO: result: yes" >&5
15441echo "${ECHO_T}yes" >&6
15442else echo "$as_me:$LINENO: result: no" >&5
15443echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015444fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015445else
Martin v. Löwis11437992002-04-12 09:54:03 +000015446 echo "$as_me:$LINENO: result: no" >&5
15447echo "${ECHO_T}no" >&6
15448fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000015449
Guido van Rossum7f43da71994-08-01 12:15:30 +000015450# check for --with-libm=...
15451
Guido van Rossum563e7081996-09-10 18:20:48 +000015452case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000015453Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015454BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000015455*) LIBM=-lm
15456esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015457echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
15458echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
15459
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015460# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015461if test "${with_libm+set}" = set; then
15462 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000015463
Guido van Rossum7f253911997-05-09 02:42:48 +000015464if test "$withval" = no
15465then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000015466 echo "$as_me:$LINENO: result: force LIBM empty" >&5
15467echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015468elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015469then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015470 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
15471echo "${ECHO_T}set LIBM=\"$withval\"" >&6
15472else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
15473echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
15474 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015475fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015476else
Martin v. Löwis11437992002-04-12 09:54:03 +000015477 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
15478echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
15479fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015480
15481# check for --with-libc=...
15482
Martin v. Löwis11437992002-04-12 09:54:03 +000015483echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
15484echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
15485
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015486# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015487if test "${with_libc+set}" = set; then
15488 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000015489
Guido van Rossum7f253911997-05-09 02:42:48 +000015490if test "$withval" = no
15491then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000015492 echo "$as_me:$LINENO: result: force LIBC empty" >&5
15493echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015494elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015495then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015496 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
15497echo "${ECHO_T}set LIBC=\"$withval\"" >&6
15498else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
15499echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
15500 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015501fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015502else
Martin v. Löwis11437992002-04-12 09:54:03 +000015503 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
15504echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
15505fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015506
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015507# check for hypot() in math library
15508LIBS_SAVE=$LIBS
15509LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000015510
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015511for ac_func in hypot
15512do
Martin v. Löwis11437992002-04-12 09:54:03 +000015513as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15514echo "$as_me:$LINENO: checking for $ac_func" >&5
15515echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15516if eval "test \"\${$as_ac_var+set}\" = set"; then
15517 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015518else
Martin v. Löwis11437992002-04-12 09:54:03 +000015519 cat >conftest.$ac_ext <<_ACEOF
15520#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015521#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015522/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015523 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015524#include <assert.h>
15525/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015526#ifdef __cplusplus
15527extern "C"
15528#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015529/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015530 builtin and then its argument prototype would still apply. */
15531char $ac_func ();
15532char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015533
Barry Warsawfe33b792003-01-07 22:42:49 +000015534#ifdef F77_DUMMY_MAIN
15535# ifdef __cplusplus
15536 extern "C"
15537# endif
15538 int F77_DUMMY_MAIN() { return 1; }
15539#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015540int
15541main ()
15542{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015543/* The GNU C library defines this for functions which it implements
15544 to always fail with ENOSYS. Some functions are actually named
15545 something starting with __ and the normal name is an alias. */
15546#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15547choke me
15548#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015549f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015550#endif
15551
Martin v. Löwis11437992002-04-12 09:54:03 +000015552 ;
15553 return 0;
15554}
15555_ACEOF
15556rm -f conftest.$ac_objext conftest$ac_exeext
15557if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15558 (eval $ac_link) 2>&5
15559 ac_status=$?
15560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15561 (exit $ac_status); } &&
15562 { ac_try='test -s conftest$ac_exeext'
15563 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15564 (eval $ac_try) 2>&5
15565 ac_status=$?
15566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15567 (exit $ac_status); }; }; then
15568 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015569else
Martin v. Löwis11437992002-04-12 09:54:03 +000015570 echo "$as_me: failed program was:" >&5
15571cat conftest.$ac_ext >&5
15572eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015573fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015574rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015575fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015576echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15577echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15578if test `eval echo '${'$as_ac_var'}'` = yes; then
15579 cat >>confdefs.h <<_ACEOF
15580#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15581_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000015582
Michael W. Hudson54241132001-12-07 15:38:26 +000015583else
Martin v. Löwis11437992002-04-12 09:54:03 +000015584 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015585fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015586done
15587
Michael W. Hudson54241132001-12-07 15:38:26 +000015588
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015589LIBS=$LIBS_SAVE
15590
Guido van Rossumef2255b2000-03-10 22:30:29 +000015591# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015592if test "${ac_cv_header_wchar_h+set}" = set; then
15593 echo "$as_me:$LINENO: checking for wchar.h" >&5
15594echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15595if test "${ac_cv_header_wchar_h+set}" = set; then
15596 echo $ECHO_N "(cached) $ECHO_C" >&6
15597fi
15598echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15599echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015600else
Martin v. Löwis11437992002-04-12 09:54:03 +000015601 # Is the header compilable?
15602echo "$as_me:$LINENO: checking wchar.h usability" >&5
15603echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
15604cat >conftest.$ac_ext <<_ACEOF
15605#line $LINENO "configure"
15606#include "confdefs.h"
15607$ac_includes_default
15608#include <wchar.h>
15609_ACEOF
15610rm -f conftest.$ac_objext
15611if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15612 (eval $ac_compile) 2>&5
15613 ac_status=$?
15614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15615 (exit $ac_status); } &&
15616 { ac_try='test -s conftest.$ac_objext'
15617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15618 (eval $ac_try) 2>&5
15619 ac_status=$?
15620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15621 (exit $ac_status); }; }; then
15622 ac_header_compiler=yes
15623else
15624 echo "$as_me: failed program was:" >&5
15625cat conftest.$ac_ext >&5
15626ac_header_compiler=no
15627fi
15628rm -f conftest.$ac_objext conftest.$ac_ext
15629echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15630echo "${ECHO_T}$ac_header_compiler" >&6
15631
15632# Is the header present?
15633echo "$as_me:$LINENO: checking wchar.h presence" >&5
15634echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
15635cat >conftest.$ac_ext <<_ACEOF
15636#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015637#include "confdefs.h"
15638#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015639_ACEOF
15640if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15641 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15642 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000015643 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015644 rm -f conftest.er1
15645 cat conftest.err >&5
15646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15647 (exit $ac_status); } >/dev/null; then
15648 if test -s conftest.err; then
15649 ac_cpp_err=$ac_c_preproc_warn_flag
15650 else
15651 ac_cpp_err=
15652 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015653else
Martin v. Löwis11437992002-04-12 09:54:03 +000015654 ac_cpp_err=yes
15655fi
15656if test -z "$ac_cpp_err"; then
15657 ac_header_preproc=yes
15658else
15659 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000015660 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015661 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015662fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015663rm -f conftest.err conftest.$ac_ext
15664echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15665echo "${ECHO_T}$ac_header_preproc" >&6
15666
15667# So? What about this header?
15668case $ac_header_compiler:$ac_header_preproc in
15669 yes:no )
15670 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
15671echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15672 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
15673echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
15674 no:yes )
15675 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
15676echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
15677 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
15678echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
15679 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
15680echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
15681esac
15682echo "$as_me:$LINENO: checking for wchar.h" >&5
15683echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15684if test "${ac_cv_header_wchar_h+set}" = set; then
15685 echo $ECHO_N "(cached) $ECHO_C" >&6
15686else
15687 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000015688fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015689echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15690echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
15691
15692fi
15693if test $ac_cv_header_wchar_h = yes; then
15694
15695
15696cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015697#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015698_ACEOF
15699
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015700 wchar_h="yes"
15701
Guido van Rossumef2255b2000-03-10 22:30:29 +000015702else
Martin v. Löwis11437992002-04-12 09:54:03 +000015703 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015704
15705fi
15706
Michael W. Hudson54241132001-12-07 15:38:26 +000015707
Martin v. Löwis11437992002-04-12 09:54:03 +000015708
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015709# determine wchar_t size
15710if test "$wchar_h" = yes
15711then
Martin v. Löwis11437992002-04-12 09:54:03 +000015712 echo "$as_me:$LINENO: checking for wchar_t" >&5
15713echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
15714if test "${ac_cv_type_wchar_t+set}" = set; then
15715 echo $ECHO_N "(cached) $ECHO_C" >&6
15716else
15717 cat >conftest.$ac_ext <<_ACEOF
15718#line $LINENO "configure"
15719#include "confdefs.h"
15720#include <wchar.h>
15721
Barry Warsawfe33b792003-01-07 22:42:49 +000015722#ifdef F77_DUMMY_MAIN
15723# ifdef __cplusplus
15724 extern "C"
15725# endif
15726 int F77_DUMMY_MAIN() { return 1; }
15727#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015728int
15729main ()
15730{
15731if ((wchar_t *) 0)
15732 return 0;
15733if (sizeof (wchar_t))
15734 return 0;
15735 ;
15736 return 0;
15737}
15738_ACEOF
15739rm -f conftest.$ac_objext
15740if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15741 (eval $ac_compile) 2>&5
15742 ac_status=$?
15743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15744 (exit $ac_status); } &&
15745 { ac_try='test -s conftest.$ac_objext'
15746 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15747 (eval $ac_try) 2>&5
15748 ac_status=$?
15749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15750 (exit $ac_status); }; }; then
15751 ac_cv_type_wchar_t=yes
15752else
15753 echo "$as_me: failed program was:" >&5
15754cat conftest.$ac_ext >&5
15755ac_cv_type_wchar_t=no
15756fi
15757rm -f conftest.$ac_objext conftest.$ac_ext
15758fi
15759echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
15760echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
15761
15762echo "$as_me:$LINENO: checking size of wchar_t" >&5
15763echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
15764if test "${ac_cv_sizeof_wchar_t+set}" = set; then
15765 echo $ECHO_N "(cached) $ECHO_C" >&6
15766else
15767 if test "$ac_cv_type_wchar_t" = yes; then
15768 # The cast to unsigned long works around a bug in the HP C Compiler
15769 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15770 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15771 # This bug is HP SR number 8606223364.
15772 if test "$cross_compiling" = yes; then
15773 # Depending upon the size, compute the lo and hi bounds.
15774cat >conftest.$ac_ext <<_ACEOF
15775#line $LINENO "configure"
15776#include "confdefs.h"
15777#include <wchar.h>
15778
Barry Warsawfe33b792003-01-07 22:42:49 +000015779#ifdef F77_DUMMY_MAIN
15780# ifdef __cplusplus
15781 extern "C"
15782# endif
15783 int F77_DUMMY_MAIN() { return 1; }
15784#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015785int
15786main ()
15787{
15788static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
15789test_array [0] = 0
15790
15791 ;
15792 return 0;
15793}
15794_ACEOF
15795rm -f conftest.$ac_objext
15796if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15797 (eval $ac_compile) 2>&5
15798 ac_status=$?
15799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15800 (exit $ac_status); } &&
15801 { ac_try='test -s conftest.$ac_objext'
15802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15803 (eval $ac_try) 2>&5
15804 ac_status=$?
15805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15806 (exit $ac_status); }; }; then
15807 ac_lo=0 ac_mid=0
15808 while :; do
15809 cat >conftest.$ac_ext <<_ACEOF
15810#line $LINENO "configure"
15811#include "confdefs.h"
15812#include <wchar.h>
15813
Barry Warsawfe33b792003-01-07 22:42:49 +000015814#ifdef F77_DUMMY_MAIN
15815# ifdef __cplusplus
15816 extern "C"
15817# endif
15818 int F77_DUMMY_MAIN() { return 1; }
15819#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015820int
15821main ()
15822{
15823static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
15824test_array [0] = 0
15825
15826 ;
15827 return 0;
15828}
15829_ACEOF
15830rm -f conftest.$ac_objext
15831if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15832 (eval $ac_compile) 2>&5
15833 ac_status=$?
15834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15835 (exit $ac_status); } &&
15836 { ac_try='test -s conftest.$ac_objext'
15837 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15838 (eval $ac_try) 2>&5
15839 ac_status=$?
15840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15841 (exit $ac_status); }; }; then
15842 ac_hi=$ac_mid; break
15843else
15844 echo "$as_me: failed program was:" >&5
15845cat conftest.$ac_ext >&5
15846ac_lo=`expr $ac_mid + 1`
15847 if test $ac_lo -le $ac_mid; then
15848 ac_lo= ac_hi=
15849 break
15850 fi
15851 ac_mid=`expr 2 '*' $ac_mid + 1`
15852fi
15853rm -f conftest.$ac_objext conftest.$ac_ext
15854 done
15855else
15856 echo "$as_me: failed program was:" >&5
15857cat conftest.$ac_ext >&5
15858cat >conftest.$ac_ext <<_ACEOF
15859#line $LINENO "configure"
15860#include "confdefs.h"
15861#include <wchar.h>
15862
Barry Warsawfe33b792003-01-07 22:42:49 +000015863#ifdef F77_DUMMY_MAIN
15864# ifdef __cplusplus
15865 extern "C"
15866# endif
15867 int F77_DUMMY_MAIN() { return 1; }
15868#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015869int
15870main ()
15871{
15872static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
15873test_array [0] = 0
15874
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 ac_hi=-1 ac_mid=-1
15892 while :; do
15893 cat >conftest.$ac_ext <<_ACEOF
15894#line $LINENO "configure"
15895#include "confdefs.h"
15896#include <wchar.h>
15897
Barry Warsawfe33b792003-01-07 22:42:49 +000015898#ifdef F77_DUMMY_MAIN
15899# ifdef __cplusplus
15900 extern "C"
15901# endif
15902 int F77_DUMMY_MAIN() { return 1; }
15903#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015904int
15905main ()
15906{
15907static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
15908test_array [0] = 0
15909
15910 ;
15911 return 0;
15912}
15913_ACEOF
15914rm -f conftest.$ac_objext
15915if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15916 (eval $ac_compile) 2>&5
15917 ac_status=$?
15918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15919 (exit $ac_status); } &&
15920 { ac_try='test -s conftest.$ac_objext'
15921 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15922 (eval $ac_try) 2>&5
15923 ac_status=$?
15924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15925 (exit $ac_status); }; }; then
15926 ac_lo=$ac_mid; break
15927else
15928 echo "$as_me: failed program was:" >&5
15929cat conftest.$ac_ext >&5
15930ac_hi=`expr '(' $ac_mid ')' - 1`
15931 if test $ac_mid -le $ac_hi; then
15932 ac_lo= ac_hi=
15933 break
15934 fi
15935 ac_mid=`expr 2 '*' $ac_mid`
15936fi
15937rm -f conftest.$ac_objext conftest.$ac_ext
15938 done
15939else
15940 echo "$as_me: failed program was:" >&5
15941cat conftest.$ac_ext >&5
15942ac_lo= ac_hi=
15943fi
15944rm -f conftest.$ac_objext conftest.$ac_ext
15945fi
15946rm -f conftest.$ac_objext conftest.$ac_ext
15947# Binary search between lo and hi bounds.
15948while test "x$ac_lo" != "x$ac_hi"; do
15949 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
15950 cat >conftest.$ac_ext <<_ACEOF
15951#line $LINENO "configure"
15952#include "confdefs.h"
15953#include <wchar.h>
15954
Barry Warsawfe33b792003-01-07 22:42:49 +000015955#ifdef F77_DUMMY_MAIN
15956# ifdef __cplusplus
15957 extern "C"
15958# endif
15959 int F77_DUMMY_MAIN() { return 1; }
15960#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015961int
15962main ()
15963{
15964static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
15965test_array [0] = 0
15966
15967 ;
15968 return 0;
15969}
15970_ACEOF
15971rm -f conftest.$ac_objext
15972if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15973 (eval $ac_compile) 2>&5
15974 ac_status=$?
15975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15976 (exit $ac_status); } &&
15977 { ac_try='test -s conftest.$ac_objext'
15978 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15979 (eval $ac_try) 2>&5
15980 ac_status=$?
15981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15982 (exit $ac_status); }; }; then
15983 ac_hi=$ac_mid
15984else
15985 echo "$as_me: failed program was:" >&5
15986cat conftest.$ac_ext >&5
15987ac_lo=`expr '(' $ac_mid ')' + 1`
15988fi
15989rm -f conftest.$ac_objext conftest.$ac_ext
15990done
15991case $ac_lo in
15992?*) ac_cv_sizeof_wchar_t=$ac_lo;;
15993'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15994echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15995 { (exit 1); exit 1; }; } ;;
15996esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015997else
15998 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015999 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
16000echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16001 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000016002else
Martin v. Löwis11437992002-04-12 09:54:03 +000016003 cat >conftest.$ac_ext <<_ACEOF
16004#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016005#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016006#include <wchar.h>
16007
16008long longval () { return (long) (sizeof (wchar_t)); }
16009unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000016010#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016011#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000016012#ifdef F77_DUMMY_MAIN
16013# ifdef __cplusplus
16014 extern "C"
16015# endif
16016 int F77_DUMMY_MAIN() { return 1; }
16017#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016018int
16019main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016020{
Martin v. Löwis11437992002-04-12 09:54:03 +000016021
16022 FILE *f = fopen ("conftest.val", "w");
16023 if (! f)
16024 exit (1);
16025 if (((long) (sizeof (wchar_t))) < 0)
16026 {
16027 long i = longval ();
16028 if (i != ((long) (sizeof (wchar_t))))
16029 exit (1);
16030 fprintf (f, "%ld\n", i);
16031 }
16032 else
16033 {
16034 unsigned long i = ulongval ();
16035 if (i != ((long) (sizeof (wchar_t))))
16036 exit (1);
16037 fprintf (f, "%lu\n", i);
16038 }
16039 exit (ferror (f) || fclose (f) != 0);
16040
16041 ;
16042 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000016043}
Martin v. Löwis11437992002-04-12 09:54:03 +000016044_ACEOF
16045rm -f conftest$ac_exeext
16046if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16047 (eval $ac_link) 2>&5
16048 ac_status=$?
16049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16050 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16052 (eval $ac_try) 2>&5
16053 ac_status=$?
16054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16055 (exit $ac_status); }; }; then
16056 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000016057else
Martin v. Löwis11437992002-04-12 09:54:03 +000016058 echo "$as_me: program exited with status $ac_status" >&5
16059echo "$as_me: failed program was:" >&5
16060cat conftest.$ac_ext >&5
16061( exit $ac_status )
16062{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
16063echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
16064 { (exit 1); exit 1; }; }
16065fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016066rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016067fi
16068fi
16069rm -f conftest.val
16070else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016071 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000016072fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016073fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016074echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
16075echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
16076cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016077#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016078_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016079
Michael W. Hudson54241132001-12-07 15:38:26 +000016080
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016081fi
16082
Martin v. Löwis11437992002-04-12 09:54:03 +000016083echo "$as_me:$LINENO: checking what type to use for unicode" >&5
16084echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016085# Check whether --enable-unicode or --disable-unicode was given.
16086if test "${enable_unicode+set}" = set; then
16087 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000016088
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016089else
16090 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000016091fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016092
16093if test $enable_unicode = yes
16094then
Martin v. Löwisfd917792001-06-27 20:22:04 +000016095 # Without any arguments, Py_UNICODE defaults to two-byte mode
16096 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016097fi
16098
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016099
16100
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016101case "$enable_unicode" in
16102ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000016103 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016104#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000016105_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016106
16107 ;;
16108ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000016109 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016110#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000016111_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016112
16113 ;;
16114esac
16115
Michael W. Hudson54241132001-12-07 15:38:26 +000016116
Martin v. Löwis11437992002-04-12 09:54:03 +000016117
16118
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016119
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016120if test "$enable_unicode" = "no"
16121then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016122 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000016123 echo "$as_me:$LINENO: result: not used" >&5
16124echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016125else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016126 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000016127
16128cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016129#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016130_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016131
16132 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
16133 then
16134 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016135
Martin v. Löwis11437992002-04-12 09:54:03 +000016136cat >>confdefs.h <<\_ACEOF
16137#define HAVE_USABLE_WCHAR_T 1
16138_ACEOF
16139
16140 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016141#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016142_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016143
16144 elif test "$ac_cv_sizeof_short" = "$unicode_size"
16145 then
16146 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000016147 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016148#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000016149_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016150
16151 elif test "$ac_cv_sizeof_long" = "$unicode_size"
16152 then
16153 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000016154 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016155#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000016156_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016157
16158 else
16159 PY_UNICODE_TYPE="no type found"
16160 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016161 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
16162echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016163fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016164
16165# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000016166echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
16167echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
16168if test "${ac_cv_c_bigendian+set}" = set; then
16169 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000016170else
Martin v. Löwis11437992002-04-12 09:54:03 +000016171 # See if sys/param.h defines the BYTE_ORDER macro.
16172cat >conftest.$ac_ext <<_ACEOF
16173#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016174#include "confdefs.h"
16175#include <sys/types.h>
16176#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000016177
Barry Warsawfe33b792003-01-07 22:42:49 +000016178#ifdef F77_DUMMY_MAIN
16179# ifdef __cplusplus
16180 extern "C"
16181# endif
16182 int F77_DUMMY_MAIN() { return 1; }
16183#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016184int
16185main ()
16186{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016187#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
16188 bogus endian macros
16189#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016190
16191 ;
16192 return 0;
16193}
16194_ACEOF
16195rm -f conftest.$ac_objext
16196if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16197 (eval $ac_compile) 2>&5
16198 ac_status=$?
16199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16200 (exit $ac_status); } &&
16201 { ac_try='test -s conftest.$ac_objext'
16202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16203 (eval $ac_try) 2>&5
16204 ac_status=$?
16205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16206 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016207 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000016208cat >conftest.$ac_ext <<_ACEOF
16209#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016210#include "confdefs.h"
16211#include <sys/types.h>
16212#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000016213
Barry Warsawfe33b792003-01-07 22:42:49 +000016214#ifdef F77_DUMMY_MAIN
16215# ifdef __cplusplus
16216 extern "C"
16217# endif
16218 int F77_DUMMY_MAIN() { return 1; }
16219#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016220int
16221main ()
16222{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016223#if BYTE_ORDER != BIG_ENDIAN
16224 not big endian
16225#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016226
16227 ;
16228 return 0;
16229}
16230_ACEOF
16231rm -f conftest.$ac_objext
16232if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16233 (eval $ac_compile) 2>&5
16234 ac_status=$?
16235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16236 (exit $ac_status); } &&
16237 { ac_try='test -s conftest.$ac_objext'
16238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16239 (eval $ac_try) 2>&5
16240 ac_status=$?
16241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16242 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016243 ac_cv_c_bigendian=yes
16244else
Martin v. Löwis11437992002-04-12 09:54:03 +000016245 echo "$as_me: failed program was:" >&5
16246cat conftest.$ac_ext >&5
16247ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016248fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016249rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016250else
Martin v. Löwis11437992002-04-12 09:54:03 +000016251 echo "$as_me: failed program was:" >&5
16252cat conftest.$ac_ext >&5
16253# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000016254if test "$cross_compiling" = yes; then
Barry Warsawfe33b792003-01-07 22:42:49 +000016255 # try to guess the endianess by grep'ing values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000016256 ac_cv_c_bigendian=unknown
16257 cat >conftest.$ac_ext <<_ACEOF
16258#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016259#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016260short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16261short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16262void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
16263short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16264short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16265void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Barry Warsawfe33b792003-01-07 22:42:49 +000016266#ifdef F77_DUMMY_MAIN
16267# ifdef __cplusplus
16268 extern "C"
16269# endif
16270 int F77_DUMMY_MAIN() { return 1; }
16271#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016272int
16273main ()
16274{
16275 _ascii (); _ebcdic ();
16276 ;
16277 return 0;
16278}
16279_ACEOF
16280rm -f conftest.$ac_objext
16281if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16282 (eval $ac_compile) 2>&5
16283 ac_status=$?
16284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16285 (exit $ac_status); } &&
16286 { ac_try='test -s conftest.$ac_objext'
16287 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16288 (eval $ac_try) 2>&5
16289 ac_status=$?
16290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16291 (exit $ac_status); }; }; then
Barry Warsawfe33b792003-01-07 22:42:49 +000016292 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016293 ac_cv_c_bigendian=yes
16294fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016295if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016296 if test "$ac_cv_c_bigendian" = unknown; then
16297 ac_cv_c_bigendian=no
16298 else
16299 # finding both strings is unlikely to happen, but who knows?
16300 ac_cv_c_bigendian=unknown
16301 fi
16302fi
16303else
16304 echo "$as_me: failed program was:" >&5
16305cat conftest.$ac_ext >&5
16306fi
16307rm -f conftest.$ac_objext conftest.$ac_ext
16308else
16309 cat >conftest.$ac_ext <<_ACEOF
16310#line $LINENO "configure"
16311#include "confdefs.h"
16312int
16313main ()
16314{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016315 /* Are we little or big endian? From Harbison&Steele. */
16316 union
16317 {
16318 long l;
16319 char c[sizeof (long)];
16320 } u;
16321 u.l = 1;
16322 exit (u.c[sizeof (long) - 1] == 1);
16323}
Martin v. Löwis11437992002-04-12 09:54:03 +000016324_ACEOF
16325rm -f conftest$ac_exeext
16326if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16327 (eval $ac_link) 2>&5
16328 ac_status=$?
16329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16330 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16331 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16332 (eval $ac_try) 2>&5
16333 ac_status=$?
16334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16335 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016336 ac_cv_c_bigendian=no
16337else
Martin v. Löwis11437992002-04-12 09:54:03 +000016338 echo "$as_me: program exited with status $ac_status" >&5
16339echo "$as_me: failed program was:" >&5
16340cat conftest.$ac_ext >&5
16341( exit $ac_status )
16342ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000016343fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016344rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016345fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016346fi
16347rm -f conftest.$ac_objext conftest.$ac_ext
16348fi
16349echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
16350echo "${ECHO_T}$ac_cv_c_bigendian" >&6
16351case $ac_cv_c_bigendian in
16352 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000016353
Martin v. Löwis11437992002-04-12 09:54:03 +000016354cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016355#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016356_ACEOF
16357 ;;
16358 no)
16359 ;;
16360 *)
Barry Warsawfe33b792003-01-07 22:42:49 +000016361 { { echo "$as_me:$LINENO: error: unknown endianess
Martin v. Löwis11437992002-04-12 09:54:03 +000016362presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Barry Warsawfe33b792003-01-07 22:42:49 +000016363echo "$as_me: error: unknown endianess
Martin v. Löwis11437992002-04-12 09:54:03 +000016364presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
16365 { (exit 1); exit 1; }; } ;;
16366esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000016367
Michael W. Hudson54241132001-12-07 15:38:26 +000016368
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016369# Check whether right shifting a negative integer extends the sign bit
16370# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000016371echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
16372echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
16373if test "${ac_cv_rshift_extends_sign+set}" = set; then
16374 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016375else
Martin v. Löwis11437992002-04-12 09:54:03 +000016376
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016377if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000016378 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016379else
Martin v. Löwis11437992002-04-12 09:54:03 +000016380 cat >conftest.$ac_ext <<_ACEOF
16381#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016382#include "confdefs.h"
16383
16384int main()
16385{
Vladimir Marangozova6180282000-07-12 05:05:06 +000016386 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016387}
16388
Martin v. Löwis11437992002-04-12 09:54:03 +000016389_ACEOF
16390rm -f conftest$ac_exeext
16391if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16392 (eval $ac_link) 2>&5
16393 ac_status=$?
16394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16395 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16397 (eval $ac_try) 2>&5
16398 ac_status=$?
16399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16400 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000016401 ac_cv_rshift_extends_sign=yes
16402else
Martin v. Löwis11437992002-04-12 09:54:03 +000016403 echo "$as_me: program exited with status $ac_status" >&5
16404echo "$as_me: failed program was:" >&5
16405cat conftest.$ac_ext >&5
16406( exit $ac_status )
16407ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000016408fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016409rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016410fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000016411fi
16412
Martin v. Löwis11437992002-04-12 09:54:03 +000016413echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
16414echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016415if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016416then
Martin v. Löwis11437992002-04-12 09:54:03 +000016417
16418cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016419#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016420_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016421
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016422fi
16423
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016424# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016425echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
16426echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
16427if test "${ac_cv_have_getc_unlocked+set}" = set; then
16428 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016429else
Martin v. Löwis11437992002-04-12 09:54:03 +000016430
16431cat >conftest.$ac_ext <<_ACEOF
16432#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016433#include "confdefs.h"
16434#include <stdio.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000016435#ifdef F77_DUMMY_MAIN
16436# ifdef __cplusplus
16437 extern "C"
16438# endif
16439 int F77_DUMMY_MAIN() { return 1; }
16440#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016441int
16442main ()
16443{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016444
16445 FILE *f = fopen("/dev/null", "r");
16446 flockfile(f);
16447 getc_unlocked(f);
16448 funlockfile(f);
16449
Martin v. Löwis11437992002-04-12 09:54:03 +000016450 ;
16451 return 0;
16452}
16453_ACEOF
16454rm -f conftest.$ac_objext conftest$ac_exeext
16455if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16456 (eval $ac_link) 2>&5
16457 ac_status=$?
16458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16459 (exit $ac_status); } &&
16460 { ac_try='test -s conftest$ac_exeext'
16461 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16462 (eval $ac_try) 2>&5
16463 ac_status=$?
16464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16465 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016466 ac_cv_have_getc_unlocked=yes
16467else
Martin v. Löwis11437992002-04-12 09:54:03 +000016468 echo "$as_me: failed program was:" >&5
16469cat conftest.$ac_ext >&5
16470ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016471fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016472rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016473fi
16474
Martin v. Löwis11437992002-04-12 09:54:03 +000016475echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
16476echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016477if test "$ac_cv_have_getc_unlocked" = yes
16478then
Martin v. Löwis11437992002-04-12 09:54:03 +000016479
16480cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016481#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016482_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016483
16484fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016485
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000016486# check for readline 2.2
16487cat >conftest.$ac_ext <<_ACEOF
16488#line $LINENO "configure"
16489#include "confdefs.h"
16490#include <readline/readline.h>
16491_ACEOF
16492if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16493 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16494 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000016495 egrep -v '^ *\+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000016496 rm -f conftest.er1
16497 cat conftest.err >&5
16498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16499 (exit $ac_status); } >/dev/null; then
16500 if test -s conftest.err; then
16501 ac_cpp_err=$ac_c_preproc_warn_flag
16502 else
16503 ac_cpp_err=
16504 fi
16505else
16506 ac_cpp_err=yes
16507fi
16508if test -z "$ac_cpp_err"; then
16509 have_readline=yes
16510else
16511 echo "$as_me: failed program was:" >&5
16512 cat conftest.$ac_ext >&5
16513 have_readline=no
16514fi
16515rm -f conftest.err conftest.$ac_ext
16516if test $have_readline = yes
16517then
16518 cat >conftest.$ac_ext <<_ACEOF
16519#line $LINENO "configure"
16520#include "confdefs.h"
16521#include <readline/readline.h>
16522
16523_ACEOF
16524if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000016525 egrep "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000016526
16527cat >>confdefs.h <<\_ACEOF
16528#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
16529_ACEOF
16530
16531fi
16532rm -f conftest*
16533
16534fi
16535
Martin v. Löwis0daad592001-09-30 21:09:59 +000016536# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000016537echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
16538echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
16539if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
16540 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000016541else
Martin v. Löwis11437992002-04-12 09:54:03 +000016542 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000016543LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016544cat >conftest.$ac_ext <<_ACEOF
16545#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000016546#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016547
Guido van Rossum353ae582001-07-10 16:45:32 +000016548/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016549#ifdef __cplusplus
16550extern "C"
16551#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000016552/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016553 builtin and then its argument prototype would still apply. */
16554char rl_pre_input_hook ();
Barry Warsawfe33b792003-01-07 22:42:49 +000016555#ifdef F77_DUMMY_MAIN
16556# ifdef __cplusplus
16557 extern "C"
16558# endif
16559 int F77_DUMMY_MAIN() { return 1; }
16560#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016561int
16562main ()
16563{
16564rl_pre_input_hook ();
16565 ;
16566 return 0;
16567}
16568_ACEOF
16569rm -f conftest.$ac_objext conftest$ac_exeext
16570if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16571 (eval $ac_link) 2>&5
16572 ac_status=$?
16573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16574 (exit $ac_status); } &&
16575 { ac_try='test -s conftest$ac_exeext'
16576 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16577 (eval $ac_try) 2>&5
16578 ac_status=$?
16579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16580 (exit $ac_status); }; }; then
16581 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000016582else
Martin v. Löwis11437992002-04-12 09:54:03 +000016583 echo "$as_me: failed program was:" >&5
16584cat conftest.$ac_ext >&5
16585ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000016586fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016587rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16588LIBS=$ac_check_lib_save_LIBS
16589fi
16590echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
16591echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
16592if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016593
Martin v. Löwis11437992002-04-12 09:54:03 +000016594cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016595#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016596_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016597
Martin v. Löwis0daad592001-09-30 21:09:59 +000016598fi
16599
Michael W. Hudson54241132001-12-07 15:38:26 +000016600
Martin v. Löwis0daad592001-09-30 21:09:59 +000016601# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000016602echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
16603echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
16604if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
16605 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000016606else
Martin v. Löwis11437992002-04-12 09:54:03 +000016607 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000016608LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016609cat >conftest.$ac_ext <<_ACEOF
16610#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000016611#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016612
Martin v. Löwis0daad592001-09-30 21:09:59 +000016613/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016614#ifdef __cplusplus
16615extern "C"
16616#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000016617/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016618 builtin and then its argument prototype would still apply. */
16619char rl_completion_matches ();
Barry Warsawfe33b792003-01-07 22:42:49 +000016620#ifdef F77_DUMMY_MAIN
16621# ifdef __cplusplus
16622 extern "C"
16623# endif
16624 int F77_DUMMY_MAIN() { return 1; }
16625#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016626int
16627main ()
16628{
16629rl_completion_matches ();
16630 ;
16631 return 0;
16632}
16633_ACEOF
16634rm -f conftest.$ac_objext conftest$ac_exeext
16635if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16636 (eval $ac_link) 2>&5
16637 ac_status=$?
16638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16639 (exit $ac_status); } &&
16640 { ac_try='test -s conftest$ac_exeext'
16641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16642 (eval $ac_try) 2>&5
16643 ac_status=$?
16644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16645 (exit $ac_status); }; }; then
16646 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000016647else
Martin v. Löwis11437992002-04-12 09:54:03 +000016648 echo "$as_me: failed program was:" >&5
16649cat conftest.$ac_ext >&5
16650ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000016651fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016652rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16653LIBS=$ac_check_lib_save_LIBS
16654fi
16655echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
16656echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
16657if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016658
Martin v. Löwis11437992002-04-12 09:54:03 +000016659cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000016660#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016661_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000016662
Guido van Rossum353ae582001-07-10 16:45:32 +000016663fi
16664
Jack Jansendd19cf82001-12-06 22:36:17 +000016665
Martin v. Löwis11437992002-04-12 09:54:03 +000016666echo "$as_me:$LINENO: checking for broken nice()" >&5
16667echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
16668if test "${ac_cv_broken_nice+set}" = set; then
16669 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016670else
Martin v. Löwis11437992002-04-12 09:54:03 +000016671
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016672if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000016673 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016674else
Martin v. Löwis11437992002-04-12 09:54:03 +000016675 cat >conftest.$ac_ext <<_ACEOF
16676#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016677#include "confdefs.h"
16678
16679int main()
16680{
16681 int val1 = nice(1);
16682 if (val1 != -1 && val1 == nice(2))
16683 exit(0);
16684 exit(1);
16685}
16686
Martin v. Löwis11437992002-04-12 09:54:03 +000016687_ACEOF
16688rm -f conftest$ac_exeext
16689if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16690 (eval $ac_link) 2>&5
16691 ac_status=$?
16692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16693 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16694 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16695 (eval $ac_try) 2>&5
16696 ac_status=$?
16697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16698 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016699 ac_cv_broken_nice=yes
16700else
Martin v. Löwis11437992002-04-12 09:54:03 +000016701 echo "$as_me: program exited with status $ac_status" >&5
16702echo "$as_me: failed program was:" >&5
16703cat conftest.$ac_ext >&5
16704( exit $ac_status )
16705ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016706fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016707rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016708fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016709fi
16710
Martin v. Löwis11437992002-04-12 09:54:03 +000016711echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
16712echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016713if test "$ac_cv_broken_nice" = yes
16714then
Martin v. Löwis11437992002-04-12 09:54:03 +000016715
16716cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016717#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016718_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016719
16720fi
16721
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016722# tzset(3) exists and works like we expect it to
16723echo "$as_me:$LINENO: checking for working tzset()" >&5
16724echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
16725if test "${ac_cv_working_tzset+set}" = set; then
16726 echo $ECHO_N "(cached) $ECHO_C" >&6
16727else
16728
16729if test "$cross_compiling" = yes; then
16730 ac_cv_working_tzset=no
16731else
16732 cat >conftest.$ac_ext <<_ACEOF
16733#line $LINENO "configure"
16734#include "confdefs.h"
16735
16736#include <stdlib.h>
16737#include <time.h>
16738int main()
16739{
16740 int gmt_hour;
16741 int eastern_hour;
16742 time_t now;
16743 now = time((time_t*)NULL);
Neal Norwitz7f2588c2003-04-11 15:35:53 +000016744 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016745 tzset();
16746 gmt_hour = localtime(&now)->tm_hour;
Neal Norwitz7f2588c2003-04-11 15:35:53 +000016747 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016748 tzset();
16749 eastern_hour = localtime(&now)->tm_hour;
16750 if (eastern_hour == gmt_hour)
16751 exit(1);
16752 exit(0);
16753}
16754
16755_ACEOF
16756rm -f conftest$ac_exeext
16757if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16758 (eval $ac_link) 2>&5
16759 ac_status=$?
16760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16761 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16762 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16763 (eval $ac_try) 2>&5
16764 ac_status=$?
16765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16766 (exit $ac_status); }; }; then
16767 ac_cv_working_tzset=yes
16768else
16769 echo "$as_me: program exited with status $ac_status" >&5
16770echo "$as_me: failed program was:" >&5
16771cat conftest.$ac_ext >&5
16772( exit $ac_status )
16773ac_cv_working_tzset=no
16774fi
16775rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16776fi
16777fi
16778
16779echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
16780echo "${ECHO_T}$ac_cv_working_tzset" >&6
16781if test "$ac_cv_working_tzset" = yes
16782then
16783
16784cat >>confdefs.h <<\_ACEOF
16785#define HAVE_WORKING_TZSET 1
16786_ACEOF
16787
16788fi
16789
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016790# Look for subsecond timestamps in struct stat
16791echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
16792echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
16793if test "${ac_cv_stat_tv_nsec+set}" = set; then
16794 echo $ECHO_N "(cached) $ECHO_C" >&6
16795else
16796 cat >conftest.$ac_ext <<_ACEOF
16797#line $LINENO "configure"
16798#include "confdefs.h"
16799#include <sys/stat.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000016800#ifdef F77_DUMMY_MAIN
16801# ifdef __cplusplus
16802 extern "C"
16803# endif
16804 int F77_DUMMY_MAIN() { return 1; }
16805#endif
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016806int
16807main ()
16808{
16809
16810struct stat st;
16811st.st_mtim.tv_nsec = 1;
16812
16813 ;
16814 return 0;
16815}
16816_ACEOF
16817rm -f conftest.$ac_objext
16818if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16819 (eval $ac_compile) 2>&5
16820 ac_status=$?
16821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16822 (exit $ac_status); } &&
16823 { ac_try='test -s conftest.$ac_objext'
16824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16825 (eval $ac_try) 2>&5
16826 ac_status=$?
16827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16828 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000016829 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016830else
16831 echo "$as_me: failed program was:" >&5
16832cat conftest.$ac_ext >&5
16833ac_cv_stat_tv_nsec=no
16834fi
16835rm -f conftest.$ac_objext conftest.$ac_ext
16836fi
16837
16838echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
16839echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
16840if test "$ac_cv_stat_tv_nsec" = yes
16841then
16842
16843cat >>confdefs.h <<\_ACEOF
16844#define HAVE_STAT_TV_NSEC 1
16845_ACEOF
16846
16847fi
16848
Jack Jansen666b1e72001-10-31 12:11:48 +000016849# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000016850echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
16851echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
16852if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
16853 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016854else
Martin v. Löwis11437992002-04-12 09:54:03 +000016855 cat >conftest.$ac_ext <<_ACEOF
16856#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000016857#include "confdefs.h"
16858#include <curses.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000016859#ifdef F77_DUMMY_MAIN
16860# ifdef __cplusplus
16861 extern "C"
16862# endif
16863 int F77_DUMMY_MAIN() { return 1; }
16864#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016865int
16866main ()
16867{
Jack Jansen666b1e72001-10-31 12:11:48 +000016868
16869 int rtn;
16870 rtn = mvwdelch(0,0,0);
16871
Martin v. Löwis11437992002-04-12 09:54:03 +000016872 ;
16873 return 0;
16874}
16875_ACEOF
16876rm -f conftest.$ac_objext
16877if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16878 (eval $ac_compile) 2>&5
16879 ac_status=$?
16880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16881 (exit $ac_status); } &&
16882 { ac_try='test -s conftest.$ac_objext'
16883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16884 (eval $ac_try) 2>&5
16885 ac_status=$?
16886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16887 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000016888 ac_cv_mvwdelch_is_expression=yes
16889else
Martin v. Löwis11437992002-04-12 09:54:03 +000016890 echo "$as_me: failed program was:" >&5
16891cat conftest.$ac_ext >&5
16892ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016893fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016894rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000016895fi
16896
Martin v. Löwis11437992002-04-12 09:54:03 +000016897echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
16898echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016899
16900if test "$ac_cv_mvwdelch_is_expression" = yes
16901then
Martin v. Löwis11437992002-04-12 09:54:03 +000016902
16903cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016904#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016905_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016906
16907fi
16908
Martin v. Löwis11437992002-04-12 09:54:03 +000016909echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
16910echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
16911if test "${ac_cv_window_has_flags+set}" = set; then
16912 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016913else
Martin v. Löwis11437992002-04-12 09:54:03 +000016914 cat >conftest.$ac_ext <<_ACEOF
16915#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000016916#include "confdefs.h"
16917#include <curses.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000016918#ifdef F77_DUMMY_MAIN
16919# ifdef __cplusplus
16920 extern "C"
16921# endif
16922 int F77_DUMMY_MAIN() { return 1; }
16923#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016924int
16925main ()
16926{
Jack Jansen666b1e72001-10-31 12:11:48 +000016927
16928 WINDOW *w;
16929 w->_flags = 0;
16930
Martin v. Löwis11437992002-04-12 09:54:03 +000016931 ;
16932 return 0;
16933}
16934_ACEOF
16935rm -f conftest.$ac_objext
16936if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16937 (eval $ac_compile) 2>&5
16938 ac_status=$?
16939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16940 (exit $ac_status); } &&
16941 { ac_try='test -s conftest.$ac_objext'
16942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16943 (eval $ac_try) 2>&5
16944 ac_status=$?
16945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16946 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000016947 ac_cv_window_has_flags=yes
16948else
Martin v. Löwis11437992002-04-12 09:54:03 +000016949 echo "$as_me: failed program was:" >&5
16950cat conftest.$ac_ext >&5
16951ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016952fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016953rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000016954fi
16955
Martin v. Löwis11437992002-04-12 09:54:03 +000016956echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
16957echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016958
Jack Jansen666b1e72001-10-31 12:11:48 +000016959
16960if test "$ac_cv_window_has_flags" = yes
16961then
Martin v. Löwis11437992002-04-12 09:54:03 +000016962
16963cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016964#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016965_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016966
16967fi
16968
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016969echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
16970echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
16971
16972if test -e /dev/ptmx
16973then
16974 echo "$as_me:$LINENO: result: yes" >&5
16975echo "${ECHO_T}yes" >&6
16976
16977cat >>confdefs.h <<\_ACEOF
16978#define HAVE_DEV_PTMX 1
16979_ACEOF
16980
16981else
16982 echo "$as_me:$LINENO: result: no" >&5
16983echo "${ECHO_T}no" >&6
16984fi
16985
Neal Norwitz865400f2003-03-21 01:42:58 +000016986echo "$as_me:$LINENO: checking for /dev/ptc" >&5
16987echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
16988
16989if test -e /dev/ptc
16990then
16991 echo "$as_me:$LINENO: result: yes" >&5
16992echo "${ECHO_T}yes" >&6
16993
16994cat >>confdefs.h <<\_ACEOF
16995#define HAVE_DEV_PTC 1
16996_ACEOF
16997
16998else
16999 echo "$as_me:$LINENO: result: no" >&5
17000echo "${ECHO_T}no" >&6
17001fi
17002
Martin v. Löwis11437992002-04-12 09:54:03 +000017003echo "$as_me:$LINENO: checking for socklen_t" >&5
17004echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
17005if test "${ac_cv_type_socklen_t+set}" = set; then
17006 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000017007else
Martin v. Löwis11437992002-04-12 09:54:03 +000017008 cat >conftest.$ac_ext <<_ACEOF
17009#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000017010#include "confdefs.h"
Martin v. Löwis01c04012002-11-11 14:58:44 +000017011
17012#ifdef HAVE_SYS_TYPES_H
17013#include <sys/types.h>
17014#endif
17015#ifdef HAVE_SYS_SOCKET_H
17016#include <sys/socket.h>
17017#endif
17018
17019
Barry Warsawfe33b792003-01-07 22:42:49 +000017020#ifdef F77_DUMMY_MAIN
17021# ifdef __cplusplus
17022 extern "C"
17023# endif
17024 int F77_DUMMY_MAIN() { return 1; }
17025#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017026int
17027main ()
17028{
17029if ((socklen_t *) 0)
17030 return 0;
17031if (sizeof (socklen_t))
17032 return 0;
17033 ;
17034 return 0;
17035}
17036_ACEOF
17037rm -f conftest.$ac_objext
17038if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17039 (eval $ac_compile) 2>&5
17040 ac_status=$?
17041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17042 (exit $ac_status); } &&
17043 { ac_try='test -s conftest.$ac_objext'
17044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17045 (eval $ac_try) 2>&5
17046 ac_status=$?
17047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17048 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000017049 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000017050else
Martin v. Löwis11437992002-04-12 09:54:03 +000017051 echo "$as_me: failed program was:" >&5
17052cat conftest.$ac_ext >&5
17053ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000017054fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017055rm -f conftest.$ac_objext conftest.$ac_ext
17056fi
17057echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
17058echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
17059if test $ac_cv_type_socklen_t = yes; then
17060 :
17061else
Guido van Rossum95713eb2000-05-18 20:53:31 +000017062
Martin v. Löwis01c04012002-11-11 14:58:44 +000017063cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017064#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000017065_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017066
17067fi
17068
Michael W. Hudson54241132001-12-07 15:38:26 +000017069
Michael W. Hudson54241132001-12-07 15:38:26 +000017070
17071
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000017072for h in `(cd $srcdir;echo Python/thread_*.h)`
17073do
17074 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
17075done
17076
Michael W. Hudson54241132001-12-07 15:38:26 +000017077
Jack Jansen0b06be72002-06-21 14:48:38 +000017078SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000017079echo "$as_me:$LINENO: checking for build directories" >&5
17080echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017081for dir in $SRCDIRS; do
17082 if test ! -d $dir; then
17083 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000017084 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017085done
Martin v. Löwis11437992002-04-12 09:54:03 +000017086echo "$as_me:$LINENO: result: done" >&5
17087echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000017088
Guido van Rossum627b2d71993-12-24 10:39:16 +000017089# generate output files
Barry Warsawfe33b792003-01-07 22:42:49 +000017090ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017091
Martin v. Löwis11437992002-04-12 09:54:03 +000017092cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017093# This file is a shell script that caches the results of configure
17094# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017095# scripts and configure runs, see configure's option --config-cache.
17096# It is not useful on other systems. If it contains results you don't
17097# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017098#
Martin v. Löwis11437992002-04-12 09:54:03 +000017099# config.status only pays attention to the cache file if you give it
17100# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017101#
Barry Warsawfe33b792003-01-07 22:42:49 +000017102# `ac_cv_env_foo' variables (set or unset) will be overriden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017103# loading this file, other *unset* `ac_cv_foo' will be assigned the
17104# following values.
17105
17106_ACEOF
17107
Guido van Rossumf78abae1997-01-21 22:02:36 +000017108# The following way of writing the cache mishandles newlines in values,
17109# but we know of no workaround that is simple, portable, and efficient.
17110# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017111# Ultrix sh set writes to stderr and can't be redirected directly,
17112# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000017113{
17114 (set) 2>&1 |
17115 case `(ac_space=' '; set | grep ac_space) 2>&1` in
17116 *ac_space=\ *)
17117 # `set' does not quote correctly, so add quotes (double-quote
17118 # substitution turns \\\\ into \\, and sed turns \\ into \).
17119 sed -n \
17120 "s/'/'\\\\''/g;
17121 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17122 ;;
17123 *)
17124 # `set' quotes correctly as required by POSIX, so do not add quotes.
17125 sed -n \
17126 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17127 ;;
17128 esac;
17129} |
17130 sed '
17131 t clear
17132 : clear
17133 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17134 t end
17135 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17136 : end' >>confcache
17137if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017138 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017139 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17140 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017141 else
17142 echo "not updating unwritable cache $cache_file"
17143 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017144fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017145rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017146
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017147test "x$prefix" = xNONE && prefix=$ac_default_prefix
17148# Let make expand exec_prefix.
17149test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017150
Martin v. Löwis11437992002-04-12 09:54:03 +000017151# VPATH may cause trouble with some makes, so we remove $(srcdir),
17152# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17153# trailing colons and then remove the whole line if VPATH becomes empty
17154# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000017155if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017156 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17157s/:*\$(srcdir):*/:/;
17158s/:*\${srcdir}:*/:/;
17159s/:*@srcdir@:*/:/;
17160s/^\([^=]*=[ ]*\):*/\1/;
17161s/:*$//;
17162s/^[^=]*=[ ]*$//;
17163}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017164fi
17165
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017166DEFS=-DHAVE_CONFIG_H
17167
Martin v. Löwis11437992002-04-12 09:54:03 +000017168
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017169: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000017170ac_clean_files_save=$ac_clean_files
17171ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17172{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
17173echo "$as_me: creating $CONFIG_STATUS" >&6;}
17174cat >$CONFIG_STATUS <<_ACEOF
17175#! $SHELL
17176# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017177# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017178# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017179# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017180
Martin v. Löwis11437992002-04-12 09:54:03 +000017181debug=false
17182SHELL=\${CONFIG_SHELL-$SHELL}
17183_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000017184
Martin v. Löwis11437992002-04-12 09:54:03 +000017185cat >>$CONFIG_STATUS <<\_ACEOF
Barry Warsawfe33b792003-01-07 22:42:49 +000017186
Martin v. Löwis11437992002-04-12 09:54:03 +000017187## --------------------- ##
17188## M4sh Initialization. ##
17189## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017190
Martin v. Löwis11437992002-04-12 09:54:03 +000017191# Be Bourne compatible
17192if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17193 emulate sh
17194 NULLCMD=:
17195elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17196 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000017197fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017198
Barry Warsawfe33b792003-01-07 22:42:49 +000017199# NLS nuisances.
Martin v. Löwis11437992002-04-12 09:54:03 +000017200# Support unset when possible.
17201if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17202 as_unset=unset
17203else
17204 as_unset=false
17205fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017206
Barry Warsawfe33b792003-01-07 22:42:49 +000017207(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
17208 { $as_unset LANG || test "${LANG+set}" != set; } ||
17209 { LANG=C; export LANG; }
17210(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
17211 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
17212 { LC_ALL=C; export LC_ALL; }
17213(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
17214 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
17215 { LC_TIME=C; export LC_TIME; }
17216(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
17217 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
17218 { LC_CTYPE=C; export LC_CTYPE; }
17219(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
17220 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
17221 { LANGUAGE=C; export LANGUAGE; }
17222(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
17223 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
17224 { LC_COLLATE=C; export LC_COLLATE; }
17225(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
17226 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
17227 { LC_NUMERIC=C; export LC_NUMERIC; }
17228(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
17229 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
17230 { LC_MESSAGES=C; export LC_MESSAGES; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017231
17232
17233# Name of the executable.
Barry Warsawfe33b792003-01-07 22:42:49 +000017234as_me=`(basename "$0") 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017235$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17236 X"$0" : 'X\(//\)$' \| \
17237 X"$0" : 'X\(/\)$' \| \
17238 . : '\(.\)' 2>/dev/null ||
17239echo X/"$0" |
17240 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
17241 /^X\/\(\/\/\)$/{ s//\1/; q; }
17242 /^X\/\(\/\).*/{ s//\1/; q; }
17243 s/.*/./; q'`
17244
17245# PATH needs CR, and LINENO needs CR and PATH.
17246# Avoid depending upon Character Ranges.
17247as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17248as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17249as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17250as_cr_digits='0123456789'
17251as_cr_alnum=$as_cr_Letters$as_cr_digits
17252
17253# The user is always right.
17254if test "${PATH_SEPARATOR+set}" != set; then
17255 echo "#! /bin/sh" >conftest.sh
17256 echo "exit 0" >>conftest.sh
17257 chmod +x conftest.sh
Barry Warsawfe33b792003-01-07 22:42:49 +000017258 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017259 PATH_SEPARATOR=';'
17260 else
17261 PATH_SEPARATOR=:
17262 fi
17263 rm -f conftest.sh
17264fi
17265
17266
17267 as_lineno_1=$LINENO
17268 as_lineno_2=$LINENO
17269 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17270 test "x$as_lineno_1" != "x$as_lineno_2" &&
17271 test "x$as_lineno_3" = "x$as_lineno_2" || {
17272 # Find who we are. Look in the path if we contain no path at all
17273 # relative or not.
17274 case $0 in
17275 *[\\/]* ) as_myself=$0 ;;
17276 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17277for as_dir in $PATH
17278do
17279 IFS=$as_save_IFS
17280 test -z "$as_dir" && as_dir=.
17281 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17282done
17283
17284 ;;
17285 esac
17286 # We did not find ourselves, most probably we were run as `sh COMMAND'
17287 # in which case we are not to be found in the path.
17288 if test "x$as_myself" = x; then
17289 as_myself=$0
17290 fi
17291 if test ! -f "$as_myself"; then
17292 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
17293echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
17294 { (exit 1); exit 1; }; }
17295 fi
17296 case $CONFIG_SHELL in
17297 '')
17298 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17299for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
17300do
17301 IFS=$as_save_IFS
17302 test -z "$as_dir" && as_dir=.
17303 for as_base in sh bash ksh sh5; do
17304 case $as_dir in
17305 /*)
17306 if ("$as_dir/$as_base" -c '
17307 as_lineno_1=$LINENO
17308 as_lineno_2=$LINENO
17309 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17310 test "x$as_lineno_1" != "x$as_lineno_2" &&
17311 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
17312 CONFIG_SHELL=$as_dir/$as_base
17313 export CONFIG_SHELL
17314 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
17315 fi;;
17316 esac
17317 done
17318done
17319;;
Jack Jansendd19cf82001-12-06 22:36:17 +000017320 esac
17321
Martin v. Löwis11437992002-04-12 09:54:03 +000017322 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
17323 # uniformly replaced by the line number. The first 'sed' inserts a
17324 # line-number line before each line; the second 'sed' does the real
17325 # work. The second script uses 'N' to pair each line-number line
17326 # with the numbered line, and appends trailing '-' during
17327 # substitution so that $LINENO is not a special case at line end.
17328 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
17329 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
17330 sed '=' <$as_myself |
17331 sed '
17332 N
17333 s,$,-,
17334 : loop
17335 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
17336 t loop
17337 s,-$,,
17338 s,^['$as_cr_digits']*\n,,
17339 ' >$as_me.lineno &&
17340 chmod +x $as_me.lineno ||
17341 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
17342echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
17343 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017344
Martin v. Löwis11437992002-04-12 09:54:03 +000017345 # Don't try to exec as it changes $[0], causing all sort of problems
17346 # (the dirname of $[0] is not the place where we might find the
17347 # original and so on. Autoconf is especially sensible to this).
17348 . ./$as_me.lineno
17349 # Exit status is that of the last command.
17350 exit
17351}
17352
17353
17354case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
17355 *c*,-n*) ECHO_N= ECHO_C='
17356' ECHO_T=' ' ;;
17357 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
17358 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
17359esac
17360
17361if expr a : '\(a\)' >/dev/null 2>&1; then
17362 as_expr=expr
17363else
17364 as_expr=false
17365fi
17366
17367rm -f conf$$ conf$$.exe conf$$.file
17368echo >conf$$.file
17369if ln -s conf$$.file conf$$ 2>/dev/null; then
17370 # We could just check for DJGPP; but this test a) works b) is more generic
17371 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17372 if test -f conf$$.exe; then
17373 # Don't use ln at all; we don't have any links
17374 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017375 else
Martin v. Löwis11437992002-04-12 09:54:03 +000017376 as_ln_s='ln -s'
17377 fi
17378elif ln conf$$.file conf$$ 2>/dev/null; then
17379 as_ln_s=ln
17380else
17381 as_ln_s='cp -p'
17382fi
17383rm -f conf$$ conf$$.exe conf$$.file
17384
17385as_executable_p="test -f"
17386
17387# Sed expression to map a string onto a valid CPP name.
17388as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
17389
17390# Sed expression to map a string onto a valid variable name.
17391as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
17392
17393
17394# IFS
17395# We need space, tab and new line, in precisely that order.
17396as_nl='
17397'
17398IFS=" $as_nl"
17399
17400# CDPATH.
Barry Warsawfe33b792003-01-07 22:42:49 +000017401$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017402
17403exec 6>&1
17404
17405# Open the log real soon, to keep \$[0] and so on meaningful, and to
17406# report actual input values of CONFIG_FILES etc. instead of their
17407# values after options handling. Logging --version etc. is OK.
17408exec 5>>config.log
17409{
17410 echo
17411 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17412## Running $as_me. ##
17413_ASBOX
17414} >&5
17415cat >&5 <<_CSEOF
17416
Martin v. Löwis88afe662002-10-26 13:47:44 +000017417This file was extended by python $as_me 2.3, which was
Barry Warsawfe33b792003-01-07 22:42:49 +000017418generated by GNU Autoconf 2.53. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017419
17420 CONFIG_FILES = $CONFIG_FILES
17421 CONFIG_HEADERS = $CONFIG_HEADERS
17422 CONFIG_LINKS = $CONFIG_LINKS
17423 CONFIG_COMMANDS = $CONFIG_COMMANDS
17424 $ $0 $@
17425
17426_CSEOF
17427echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
17428echo >&5
17429_ACEOF
17430
17431# Files that config.status was made for.
17432if test -n "$ac_config_files"; then
17433 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17434fi
17435
17436if test -n "$ac_config_headers"; then
17437 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17438fi
17439
17440if test -n "$ac_config_links"; then
17441 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17442fi
17443
17444if test -n "$ac_config_commands"; then
17445 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17446fi
17447
17448cat >>$CONFIG_STATUS <<\_ACEOF
17449
17450ac_cs_usage="\
17451\`$as_me' instantiates files from templates according to the
17452current configuration.
17453
17454Usage: $0 [OPTIONS] [FILE]...
17455
17456 -h, --help print this help, then exit
17457 -V, --version print version number, then exit
17458 -d, --debug don't remove temporary files
17459 --recheck update $as_me by reconfiguring in the same conditions
17460 --file=FILE[:TEMPLATE]
17461 instantiate the configuration file FILE
17462 --header=FILE[:TEMPLATE]
17463 instantiate the configuration header FILE
17464
17465Configuration files:
17466$config_files
17467
17468Configuration headers:
17469$config_headers
17470
17471Report bugs to <bug-autoconf@gnu.org>."
17472_ACEOF
17473
17474cat >>$CONFIG_STATUS <<_ACEOF
17475ac_cs_version="\\
Martin v. Löwis88afe662002-10-26 13:47:44 +000017476python config.status 2.3
Barry Warsawfe33b792003-01-07 22:42:49 +000017477configured by $0, generated by GNU Autoconf 2.53,
Martin v. Löwis11437992002-04-12 09:54:03 +000017478 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17479
17480Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17481Free Software Foundation, Inc.
17482This config.status script is free software; the Free Software Foundation
17483gives unlimited permission to copy, distribute and modify it."
17484srcdir=$srcdir
17485INSTALL="$INSTALL"
17486_ACEOF
17487
17488cat >>$CONFIG_STATUS <<\_ACEOF
17489# If no file are specified by the user, then we need to provide default
17490# value. By we need to know if files were specified by the user.
17491ac_need_defaults=:
17492while test $# != 0
17493do
17494 case $1 in
17495 --*=*)
17496 ac_option=`expr "x$1" : 'x\([^=]*\)='`
17497 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Barry Warsawfe33b792003-01-07 22:42:49 +000017498 shift
17499 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17500 shift
Martin v. Löwis11437992002-04-12 09:54:03 +000017501 ;;
Barry Warsawfe33b792003-01-07 22:42:49 +000017502 -*);;
Martin v. Löwis11437992002-04-12 09:54:03 +000017503 *) # This is not an option, so the user has probably given explicit
17504 # arguments.
17505 ac_need_defaults=false;;
17506 esac
17507
Barry Warsawfe33b792003-01-07 22:42:49 +000017508 case $1 in
Martin v. Löwis11437992002-04-12 09:54:03 +000017509 # Handling of the options.
17510_ACEOF
17511cat >>$CONFIG_STATUS <<_ACEOF
17512 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17513 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17514 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17515_ACEOF
17516cat >>$CONFIG_STATUS <<\_ACEOF
17517 --version | --vers* | -V )
17518 echo "$ac_cs_version"; exit 0 ;;
17519 --he | --h)
17520 # Conflict between --help and --header
17521 { { echo "$as_me:$LINENO: error: ambiguous option: $1
17522Try \`$0 --help' for more information." >&5
17523echo "$as_me: error: ambiguous option: $1
17524Try \`$0 --help' for more information." >&2;}
17525 { (exit 1); exit 1; }; };;
17526 --help | --hel | -h )
17527 echo "$ac_cs_usage"; exit 0 ;;
17528 --debug | --d* | -d )
17529 debug=: ;;
17530 --file | --fil | --fi | --f )
Barry Warsawfe33b792003-01-07 22:42:49 +000017531 shift
17532 CONFIG_FILES="$CONFIG_FILES $1"
Martin v. Löwis11437992002-04-12 09:54:03 +000017533 ac_need_defaults=false;;
17534 --header | --heade | --head | --hea )
Barry Warsawfe33b792003-01-07 22:42:49 +000017535 shift
17536 CONFIG_HEADERS="$CONFIG_HEADERS $1"
Martin v. Löwis11437992002-04-12 09:54:03 +000017537 ac_need_defaults=false;;
17538
17539 # This is an error.
17540 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
17541Try \`$0 --help' for more information." >&5
17542echo "$as_me: error: unrecognized option: $1
17543Try \`$0 --help' for more information." >&2;}
17544 { (exit 1); exit 1; }; } ;;
17545
17546 *) ac_config_targets="$ac_config_targets $1" ;;
17547
17548 esac
17549 shift
17550done
17551
17552_ACEOF
17553
17554
17555
17556
17557
17558cat >>$CONFIG_STATUS <<\_ACEOF
17559for ac_config_target in $ac_config_targets
17560do
17561 case "$ac_config_target" in
17562 # Handling of arguments.
17563 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17564 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
17565 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17566 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
17567echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17568 { (exit 1); exit 1; }; };;
17569 esac
17570done
17571
17572# If the user did not use the arguments to specify the items to instantiate,
17573# then the envvar interface is used. Set only those that are not.
17574# We use the long form for the default assignment because of an extremely
17575# bizarre bug on SunOS 4.1.3.
17576if $ac_need_defaults; then
17577 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17578 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17579fi
17580
17581# Create a temporary directory, and hook for its removal unless debugging.
17582$debug ||
17583{
17584 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17585 trap '{ (exit 1); exit 1; }' 1 2 13 15
17586}
17587
17588# Create a (secure) tmp directory for tmp files.
17589: ${TMPDIR=/tmp}
17590{
17591 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17592 test -n "$tmp" && test -d "$tmp"
17593} ||
17594{
17595 tmp=$TMPDIR/cs$$-$RANDOM
17596 (umask 077 && mkdir $tmp)
17597} ||
17598{
17599 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17600 { (exit 1); exit 1; }
17601}
17602
17603_ACEOF
17604
17605cat >>$CONFIG_STATUS <<_ACEOF
17606
17607#
17608# CONFIG_FILES section.
17609#
17610
17611# No need to generate the scripts if there are no CONFIG_FILES.
17612# This happens for instance when ./config.status config.h
17613if test -n "\$CONFIG_FILES"; then
17614 # Protect against being on the right side of a sed subst in config.status.
17615 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17616 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17617s,@SHELL@,$SHELL,;t t
17618s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17619s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17620s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17621s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17622s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17623s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17624s,@exec_prefix@,$exec_prefix,;t t
17625s,@prefix@,$prefix,;t t
17626s,@program_transform_name@,$program_transform_name,;t t
17627s,@bindir@,$bindir,;t t
17628s,@sbindir@,$sbindir,;t t
17629s,@libexecdir@,$libexecdir,;t t
17630s,@datadir@,$datadir,;t t
17631s,@sysconfdir@,$sysconfdir,;t t
17632s,@sharedstatedir@,$sharedstatedir,;t t
17633s,@localstatedir@,$localstatedir,;t t
17634s,@libdir@,$libdir,;t t
17635s,@includedir@,$includedir,;t t
17636s,@oldincludedir@,$oldincludedir,;t t
17637s,@infodir@,$infodir,;t t
17638s,@mandir@,$mandir,;t t
17639s,@build_alias@,$build_alias,;t t
17640s,@host_alias@,$host_alias,;t t
17641s,@target_alias@,$target_alias,;t t
17642s,@DEFS@,$DEFS,;t t
17643s,@ECHO_C@,$ECHO_C,;t t
17644s,@ECHO_N@,$ECHO_N,;t t
17645s,@ECHO_T@,$ECHO_T,;t t
17646s,@LIBS@,$LIBS,;t t
17647s,@VERSION@,$VERSION,;t t
17648s,@SOVERSION@,$SOVERSION,;t t
17649s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
17650s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
17651s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
17652s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
17653s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
17654s,@MACHDEP@,$MACHDEP,;t t
17655s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000017656s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000017657s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000017658s,@CXX@,$CXX,;t t
17659s,@MAINOBJ@,$MAINOBJ,;t t
17660s,@EXEEXT@,$EXEEXT,;t t
17661s,@CC@,$CC,;t t
17662s,@CFLAGS@,$CFLAGS,;t t
17663s,@LDFLAGS@,$LDFLAGS,;t t
17664s,@CPPFLAGS@,$CPPFLAGS,;t t
17665s,@ac_ct_CC@,$ac_ct_CC,;t t
17666s,@OBJEXT@,$OBJEXT,;t t
17667s,@CPP@,$CPP,;t t
17668s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
17669s,@LIBRARY@,$LIBRARY,;t t
17670s,@LDLIBRARY@,$LDLIBRARY,;t t
17671s,@DLLLIBRARY@,$DLLLIBRARY,;t t
17672s,@BLDLIBRARY@,$BLDLIBRARY,;t t
17673s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
17674s,@INSTSONAME@,$INSTSONAME,;t t
17675s,@RUNSHARED@,$RUNSHARED,;t t
17676s,@LINKCC@,$LINKCC,;t t
17677s,@RANLIB@,$RANLIB,;t t
17678s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17679s,@AR@,$AR,;t t
17680s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17681s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17682s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17683s,@LN@,$LN,;t t
17684s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000017685s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000017686s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
17687s,@SO@,$SO,;t t
17688s,@LDSHARED@,$LDSHARED,;t t
17689s,@BLDSHARED@,$BLDSHARED,;t t
17690s,@CCSHARED@,$CCSHARED,;t t
17691s,@LINKFORSHARED@,$LINKFORSHARED,;t t
17692s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017693s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000017694s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
17695s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
17696s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
17697s,@LDLAST@,$LDLAST,;t t
17698s,@THREADOBJ@,$THREADOBJ,;t t
17699s,@DLINCLDIR@,$DLINCLDIR,;t t
17700s,@DYNLOADFILE@,$DYNLOADFILE,;t t
17701s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
17702s,@LIBOBJS@,$LIBOBJS,;t t
17703s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
17704s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
17705s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
17706s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
17707s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
17708s,@LIBM@,$LIBM,;t t
17709s,@LIBC@,$LIBC,;t t
17710s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
17711s,@THREADHEADERS@,$THREADHEADERS,;t t
17712s,@SRCDIRS@,$SRCDIRS,;t t
17713CEOF
17714
17715_ACEOF
17716
17717 cat >>$CONFIG_STATUS <<\_ACEOF
17718 # Split the substitutions into bite-sized pieces for seds with
17719 # small command number limits, like on Digital OSF/1 and HP-UX.
17720 ac_max_sed_lines=48
17721 ac_sed_frag=1 # Number of current file.
17722 ac_beg=1 # First line for current file.
17723 ac_end=$ac_max_sed_lines # Line after last line for current file.
17724 ac_more_lines=:
17725 ac_sed_cmds=
17726 while $ac_more_lines; do
17727 if test $ac_beg -gt 1; then
17728 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17729 else
17730 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17731 fi
17732 if test ! -s $tmp/subs.frag; then
17733 ac_more_lines=false
17734 else
17735 # The purpose of the label and of the branching condition is to
17736 # speed up the sed processing (if there are no `@' at all, there
17737 # is no need to browse any of the substitutions).
17738 # These are the two extra sed commands mentioned above.
17739 (echo ':t
17740 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17741 if test -z "$ac_sed_cmds"; then
17742 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17743 else
17744 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17745 fi
17746 ac_sed_frag=`expr $ac_sed_frag + 1`
17747 ac_beg=$ac_end
17748 ac_end=`expr $ac_end + $ac_max_sed_lines`
17749 fi
17750 done
17751 if test -z "$ac_sed_cmds"; then
17752 ac_sed_cmds=cat
17753 fi
17754fi # test -n "$CONFIG_FILES"
17755
17756_ACEOF
17757cat >>$CONFIG_STATUS <<\_ACEOF
17758for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17759 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17760 case $ac_file in
17761 - | *:- | *:-:* ) # input from stdin
17762 cat >$tmp/stdin
17763 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17764 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17765 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17766 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17767 * ) ac_file_in=$ac_file.in ;;
17768 esac
17769
17770 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17771 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17772$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17773 X"$ac_file" : 'X\(//\)[^/]' \| \
17774 X"$ac_file" : 'X\(//\)$' \| \
17775 X"$ac_file" : 'X\(/\)' \| \
17776 . : '\(.\)' 2>/dev/null ||
17777echo X"$ac_file" |
17778 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17779 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17780 /^X\(\/\/\)$/{ s//\1/; q; }
17781 /^X\(\/\).*/{ s//\1/; q; }
17782 s/.*/./; q'`
Barry Warsawfe33b792003-01-07 22:42:49 +000017783 { case "$ac_dir" in
17784 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17785 *) as_incr_dir=.;;
17786esac
17787as_dummy="$ac_dir"
17788for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17789 case $as_mkdir_dir in
17790 # Skip DOS drivespec
17791 ?:) as_incr_dir=$as_mkdir_dir ;;
17792 *)
17793 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17794 test -d "$as_incr_dir" ||
17795 mkdir "$as_incr_dir" ||
17796 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
17797echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
17798 { (exit 1); exit 1; }; }
17799 ;;
17800 esac
17801done; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017802
17803 ac_builddir=.
17804
17805if test "$ac_dir" != .; then
17806 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
17807 # A "../" for each directory in $ac_dir_suffix.
17808 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
17809else
17810 ac_dir_suffix= ac_top_builddir=
17811fi
17812
17813case $srcdir in
17814 .) # No --srcdir option. We are building in place.
17815 ac_srcdir=.
17816 if test -z "$ac_top_builddir"; then
17817 ac_top_srcdir=.
17818 else
17819 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
17820 fi ;;
17821 [\\/]* | ?:[\\/]* ) # Absolute path.
17822 ac_srcdir=$srcdir$ac_dir_suffix;
17823 ac_top_srcdir=$srcdir ;;
17824 *) # Relative path.
17825 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
17826 ac_top_srcdir=$ac_top_builddir$srcdir ;;
17827esac
17828# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
17829# absolute.
17830ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017831ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000017832ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
17833ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
17834
17835
17836 case $INSTALL in
17837 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17838 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
17839 esac
17840
17841 if test x"$ac_file" != x-; then
17842 { echo "$as_me:$LINENO: creating $ac_file" >&5
17843echo "$as_me: creating $ac_file" >&6;}
17844 rm -f "$ac_file"
17845 fi
17846 # Let's still pretend it is `configure' which instantiates (i.e., don't
17847 # use $as_me), people would be surprised to read:
17848 # /* config.h. Generated by config.status. */
17849 if test x"$ac_file" = x-; then
17850 configure_input=
17851 else
17852 configure_input="$ac_file. "
17853 fi
17854 configure_input=$configure_input"Generated from `echo $ac_file_in |
17855 sed 's,.*/,,'` by configure."
17856
17857 # First look for the input files in the build tree, otherwise in the
17858 # src tree.
17859 ac_file_inputs=`IFS=:
17860 for f in $ac_file_in; do
17861 case $f in
17862 -) echo $tmp/stdin ;;
17863 [\\/$]*)
17864 # Absolute (can't be DOS-style, as IFS=:)
17865 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17866echo "$as_me: error: cannot find input file: $f" >&2;}
17867 { (exit 1); exit 1; }; }
17868 echo $f;;
17869 *) # Relative
17870 if test -f "$f"; then
17871 # Build tree
17872 echo $f
17873 elif test -f "$srcdir/$f"; then
17874 # Source tree
17875 echo $srcdir/$f
17876 else
17877 # /dev/null tree
17878 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17879echo "$as_me: error: cannot find input file: $f" >&2;}
17880 { (exit 1); exit 1; }; }
17881 fi;;
17882 esac
17883 done` || { (exit 1); exit 1; }
17884_ACEOF
17885cat >>$CONFIG_STATUS <<_ACEOF
17886 sed "$ac_vpsub
17887$extrasub
17888_ACEOF
17889cat >>$CONFIG_STATUS <<\_ACEOF
17890:t
17891/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17892s,@configure_input@,$configure_input,;t t
17893s,@srcdir@,$ac_srcdir,;t t
17894s,@abs_srcdir@,$ac_abs_srcdir,;t t
17895s,@top_srcdir@,$ac_top_srcdir,;t t
17896s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
17897s,@builddir@,$ac_builddir,;t t
17898s,@abs_builddir@,$ac_abs_builddir,;t t
17899s,@top_builddir@,$ac_top_builddir,;t t
17900s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
17901s,@INSTALL@,$ac_INSTALL,;t t
17902" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17903 rm -f $tmp/stdin
17904 if test x"$ac_file" != x-; then
17905 mv $tmp/out $ac_file
17906 else
17907 cat $tmp/out
17908 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017909 fi
17910
Martin v. Löwis11437992002-04-12 09:54:03 +000017911done
17912_ACEOF
17913cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017914
Martin v. Löwis11437992002-04-12 09:54:03 +000017915#
17916# CONFIG_HEADER section.
17917#
Guido van Rossum627b2d71993-12-24 10:39:16 +000017918
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017919# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17920# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017921#
17922# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000017923ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
17924ac_dB='[ ].*$,\1#\2'
17925ac_dC=' '
17926ac_dD=',;t'
17927# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17928ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
17929ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017930ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000017931ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017932
Martin v. Löwis11437992002-04-12 09:54:03 +000017933for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000017934 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000017935 case $ac_file in
17936 - | *:- | *:-:* ) # input from stdin
17937 cat >$tmp/stdin
17938 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17939 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17940 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17941 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17942 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017943 esac
17944
Martin v. Löwis11437992002-04-12 09:54:03 +000017945 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
17946echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000017947
Martin v. Löwis11437992002-04-12 09:54:03 +000017948 # First look for the input files in the build tree, otherwise in the
17949 # src tree.
17950 ac_file_inputs=`IFS=:
17951 for f in $ac_file_in; do
17952 case $f in
17953 -) echo $tmp/stdin ;;
17954 [\\/$]*)
17955 # Absolute (can't be DOS-style, as IFS=:)
17956 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17957echo "$as_me: error: cannot find input file: $f" >&2;}
17958 { (exit 1); exit 1; }; }
17959 echo $f;;
17960 *) # Relative
17961 if test -f "$f"; then
17962 # Build tree
17963 echo $f
17964 elif test -f "$srcdir/$f"; then
17965 # Source tree
17966 echo $srcdir/$f
17967 else
17968 # /dev/null tree
17969 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17970echo "$as_me: error: cannot find input file: $f" >&2;}
17971 { (exit 1); exit 1; }; }
17972 fi;;
17973 esac
17974 done` || { (exit 1); exit 1; }
17975 # Remove the trailing spaces.
17976 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017977
Martin v. Löwis11437992002-04-12 09:54:03 +000017978_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017979
Martin v. Löwis11437992002-04-12 09:54:03 +000017980# Transform confdefs.h into two sed scripts, `conftest.defines' and
17981# `conftest.undefs', that substitutes the proper values into
17982# config.h.in to produce config.h. The first handles `#define'
17983# templates, and the second `#undef' templates.
17984# And first: Protect against being on the right side of a sed subst in
17985# config.status. Protect against being in an unquoted here document
17986# in config.status.
17987rm -f conftest.defines conftest.undefs
17988# Using a here document instead of a string reduces the quoting nightmare.
17989# Putting comments in sed scripts is not portable.
17990#
17991# `end' is used to avoid that the second main sed command (meant for
17992# 0-ary CPP macros) applies to n-ary macro definitions.
17993# See the Autoconf documentation for `clear'.
17994cat >confdef2sed.sed <<\_ACEOF
17995s/[\\&,]/\\&/g
17996s,[\\$`],\\&,g
17997t clear
17998: clear
17999s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
18000t end
18001s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
18002: end
18003_ACEOF
18004# If some macros were called several times there might be several times
18005# the same #defines, which is useless. Nevertheless, we may not want to
18006# sort them, since we want the *last* AC-DEFINE to be honored.
18007uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
18008sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
18009rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018010
18011# This sed command replaces #undef with comments. This is necessary, for
18012# example, in the case of _POSIX_SOURCE, which is predefined and required
18013# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000018014cat >>conftest.undefs <<\_ACEOF
18015s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
18016_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018017
Martin v. Löwis11437992002-04-12 09:54:03 +000018018# Break up conftest.defines because some shells have a limit on the size
18019# of here documents, and old seds have small limits too (100 cmds).
18020echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Barry Warsawfe33b792003-01-07 22:42:49 +000018021echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018022echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
18023echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018024rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000018025while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000018026do
Martin v. Löwis11437992002-04-12 09:54:03 +000018027 # Write a limited-size here document to $tmp/defines.sed.
18028 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
18029 # Speed up: don't consider the non `#define' lines.
18030 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
18031 # Work around the forget-to-reset-the-flag bug.
18032 echo 't clr' >>$CONFIG_STATUS
18033 echo ': clr' >>$CONFIG_STATUS
18034 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018035 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018036 sed -f $tmp/defines.sed $tmp/in >$tmp/out
18037 rm -f $tmp/in
18038 mv $tmp/out $tmp/in
18039' >>$CONFIG_STATUS
18040 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
18041 rm -f conftest.defines
18042 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000018043done
Martin v. Löwis11437992002-04-12 09:54:03 +000018044rm -f conftest.defines
Barry Warsawfe33b792003-01-07 22:42:49 +000018045echo ' fi # egrep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018046echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018047
Martin v. Löwis11437992002-04-12 09:54:03 +000018048# Break up conftest.undefs because some shells have a limit on the size
18049# of here documents, and old seds have small limits too (100 cmds).
18050echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
18051rm -f conftest.tail
18052while grep . conftest.undefs >/dev/null
18053do
18054 # Write a limited-size here document to $tmp/undefs.sed.
18055 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
18056 # Speed up: don't consider the non `#undef'
18057 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
18058 # Work around the forget-to-reset-the-flag bug.
18059 echo 't clr' >>$CONFIG_STATUS
18060 echo ': clr' >>$CONFIG_STATUS
18061 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
18062 echo 'CEOF
18063 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
18064 rm -f $tmp/in
18065 mv $tmp/out $tmp/in
18066' >>$CONFIG_STATUS
18067 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
18068 rm -f conftest.undefs
18069 mv conftest.tail conftest.undefs
18070done
18071rm -f conftest.undefs
18072
18073cat >>$CONFIG_STATUS <<\_ACEOF
18074 # Let's still pretend it is `configure' which instantiates (i.e., don't
18075 # use $as_me), people would be surprised to read:
18076 # /* config.h. Generated by config.status. */
18077 if test x"$ac_file" = x-; then
18078 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000018079 else
Martin v. Löwis11437992002-04-12 09:54:03 +000018080 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000018081 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018082 cat $tmp/in >>$tmp/config.h
18083 rm -f $tmp/in
18084 if test x"$ac_file" != x-; then
18085 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
18086 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
18087echo "$as_me: $ac_file is unchanged" >&6;}
18088 else
18089 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18090$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18091 X"$ac_file" : 'X\(//\)[^/]' \| \
18092 X"$ac_file" : 'X\(//\)$' \| \
18093 X"$ac_file" : 'X\(/\)' \| \
18094 . : '\(.\)' 2>/dev/null ||
18095echo X"$ac_file" |
18096 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18097 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18098 /^X\(\/\/\)$/{ s//\1/; q; }
18099 /^X\(\/\).*/{ s//\1/; q; }
18100 s/.*/./; q'`
Barry Warsawfe33b792003-01-07 22:42:49 +000018101 { case "$ac_dir" in
18102 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18103 *) as_incr_dir=.;;
18104esac
18105as_dummy="$ac_dir"
18106for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18107 case $as_mkdir_dir in
18108 # Skip DOS drivespec
18109 ?:) as_incr_dir=$as_mkdir_dir ;;
18110 *)
18111 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18112 test -d "$as_incr_dir" ||
18113 mkdir "$as_incr_dir" ||
18114 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18115echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18116 { (exit 1); exit 1; }; }
18117 ;;
18118 esac
18119done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018120
Martin v. Löwis11437992002-04-12 09:54:03 +000018121 rm -f $ac_file
18122 mv $tmp/config.h $ac_file
18123 fi
18124 else
18125 cat $tmp/config.h
18126 rm -f $tmp/config.h
18127 fi
18128done
18129_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000018130
Martin v. Löwis11437992002-04-12 09:54:03 +000018131cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018132
Martin v. Löwis11437992002-04-12 09:54:03 +000018133{ (exit 0); exit 0; }
18134_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018135chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018136ac_clean_files=$ac_clean_files_save
18137
18138
18139# configure is writing to config.log, and then calls config.status.
18140# config.status does its own redirection, appending to config.log.
18141# Unfortunately, on DOS this fails, as config.log is still kept open
18142# by configure, so config.status won't be able to write to it; its
18143# output is simply discarded. So we exec the FD to /dev/null,
18144# effectively closing config.log, so it can be properly (re)opened and
18145# appended to by config.status. When coming back to configure, we
18146# need to make the FD available again.
18147if test "$no_create" != yes; then
18148 ac_cs_success=:
18149 exec 5>/dev/null
18150 $SHELL $CONFIG_STATUS || ac_cs_success=false
18151 exec 5>>config.log
18152 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18153 # would make configure fail if this is the last instruction.
18154 $ac_cs_success || { (exit 1); exit 1; }
18155fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018156
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018157
18158echo "creating Setup"
18159if test ! -f Modules/Setup
18160then
18161 cp $srcdir/Modules/Setup.dist Modules/Setup
18162fi
18163
18164echo "creating Setup.local"
18165if test ! -f Modules/Setup.local
18166then
18167 echo "# Edit this file for local setup changes" >Modules/Setup.local
18168fi
18169
18170echo "creating Makefile"
18171$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
18172 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000018173 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018174mv config.c Modules